Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcvs2svn2009-10-05 17:49:24 +0000
committercvs2svn2009-10-05 17:49:24 +0000
commit3f79bc5a1f954dd6169428415b883297fe991d75 (patch)
treeb66d5a5fea2a394d84f078d451f11ad05ca3c2a8
parent32fc6a9ac50c46f0448717cb3f07a6cb9648d211 (diff)
downloadrt.equinox.p2-20091005.tar.gz
rt.equinox.p2-20091005.tar.xz
rt.equinox.p2-20091005.zip
This commit was manufactured by cvs2svn to create tag 'v20091005'.v20091005
Sprout from master 2009-10-05 17:49:23 UTC Pascal Rapicault <prapicau> 'Remove the need to pass in the profile for an IUProfilePropertyQuery' Cherrypick from master 2009-08-28 20:06:59 UTC Andrew Niefer <aniefer> '280339 - [publisher] Allow quoting of spaces in .product arguments': bundles/org.eclipse.equinox.p2.tests/All p2 Tests.launch Delete: bundles/ie.wombat.jbdiff.test/.classpath 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/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/.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/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/.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/about.html bundles/org.eclipse.equinox.frameworkadmin.equinox/build.properties bundles/org.eclipse.equinox.frameworkadmin.equinox/plugin.properties bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Activator.java 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/.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/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/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/.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/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/BundleInfo.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/.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/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/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/.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/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.artifact.repository/.classpath bundles/org.eclipse.equinox.p2.artifact.repository/.cvsignore bundles/org.eclipse.equinox.p2.artifact.repository/.externalToolBuilders/org.eclipse.equinox.p2.artifact.repository buildAntTasks.xml.launch bundles/org.eclipse.equinox.p2.artifact.repository/.project bundles/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.artifact.repository/about.html bundles/org.eclipse.equinox.p2.artifact.repository/build.properties bundles/org.eclipse.equinox.p2.artifact.repository/buildAntTasks.xml bundles/org.eclipse.equinox.p2.artifact.repository/plugin.properties bundles/org.eclipse.equinox.p2.artifact.repository/plugin.xml bundles/org.eclipse.equinox.p2.artifact.repository/schema/artifactComparators.exsd bundles/org.eclipse.equinox.p2.artifact.repository/schema/artifactRepositories.exsd bundles/org.eclipse.equinox.p2.artifact.repository/schema/processingSteps.exsd bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/FileMirrorLog.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/IArtifactMirrorLog.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/MirrorApplication.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/Mirroring.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/XMLMirrorLog.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processing/AbstractBufferingStep.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processing/Messages.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processing/messages.properties bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5ArtifactComparator.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/Messages.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/messages.properties bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Activator.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryManager.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRequest.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepositoryFactory.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorRequest.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorSelector.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/RawMirrorRequest.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/SignatureVerifier.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/messages.properties bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/BlobStore.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/DownloadJob.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/Mapper.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/UniversalUniqueIdentifier.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/ArtifactComparatorFactory.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/ArtifactDescriptor.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactComparator.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactDescriptor.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepository.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepositoryManager.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRequest.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IFileArtifactRepository.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/Messages.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStep.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepDescriptor.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepHandler.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ZipVerifierStep.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/messages.properties bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/AbstractArtifactRepository.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/ArtifactRepositoryFactory.java bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/SimpleArtifactRepositoryFactory.java bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/AddChildTask.java bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/AntMirrorLog.java bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/CreateCompositeArtifactRepositoryTask.java bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/MirrorApplicationTask.java bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/RemoveChildTask.java bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/ValidateTask.java bundles/org.eclipse.equinox.p2.console/.classpath 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.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/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.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.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/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/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.directorywatcher/.classpath 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/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.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/org/eclipse/equinox/internal/p2/exemplarysetup/Activator.java 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/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/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/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/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.installer/.classpath bundles/org.eclipse.equinox.p2.installer/.project bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.installer/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.installer/README.txt bundles/org.eclipse.equinox.p2.installer/about.html bundles/org.eclipse.equinox.p2.installer/build.properties bundles/org.eclipse.equinox.p2.installer/installer.product bundles/org.eclipse.equinox.p2.installer/installer.properties bundles/org.eclipse.equinox.p2.installer/plugin.properties bundles/org.eclipse.equinox.p2.installer/plugin.xml bundles/org.eclipse.equinox.p2.installer/product_lg.gif bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/HeadlessInstallAdvisor.java bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallApplication.java bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallDescriptionParser.java bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallUpdateProductOperation.java bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallerActivator.java bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/Messages.java bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/messages.properties bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/InstallDialog.java bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/ProxiesDialog.java bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/SWTInstallAdvisor.java bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/provisional/p2/installer/IInstallOperation.java bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/provisional/p2/installer/InstallAdvisor.java bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/provisional/p2/installer/InstallDescription.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/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/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/p2 tools - mirror metadata.launch 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/schema/metadataRepositories.exsd bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/MirrorApplication.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/Mirroring.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/RangeQuery.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/VersionRangedName.java 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/CacheManager.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/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/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/org/eclipse/equinox/internal/provisional/p2/metadata/repository/IMetadataRepository.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/p2/metadata/repository/IMetadataRepositoryManager.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/AbstractMetadataRepository.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/MetadataRepositoryFactory.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/RepositoryReference.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/SimpleMetadataRepositoryFactory.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/MirrorApplicationTask.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/.project 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/src/org/eclipse/equinox/internal/p2/metadata/ArtifactKey.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/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/MetadataActivator.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/UpdateDescriptor.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IArtifactKey.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ICopyright.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnit.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnitFragment.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnitPatch.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ILicense.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IProvidedCapability.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IRequiredCapability.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IRequirementChange.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointData.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointInstruction.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointType.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IUpdateDescriptor.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/MetadataFactory.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/CapabilityQuery.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/IUPropertyQuery.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/InstallableUnitQuery.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/LatestIUVersionQuery.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/UpdateQuery.java 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/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/SingleElementCollector.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/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.repository.tools/.classpath bundles/org.eclipse.equinox.p2.repository.tools/.cvsignore bundles/org.eclipse.equinox.p2.repository.tools/.externalToolBuilders/Build Repository Tools JARs.launch bundles/org.eclipse.equinox.p2.repository.tools/.project bundles/org.eclipse.equinox.p2.repository.tools/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.repository.tools/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.repository.tools/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.repository.tools/about.html bundles/org.eclipse.equinox.p2.repository.tools/build.properties bundles/org.eclipse.equinox.p2.repository.tools/lib/.cvsignore bundles/org.eclipse.equinox.p2.repository.tools/plugin.properties bundles/org.eclipse.equinox.p2.repository.tools/plugin.xml bundles/org.eclipse.equinox.p2.repository.tools/scripts/buildAntJARs.xml bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Annotation.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationComponent.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationComponentValue.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationDefaultAttribute.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AttributeNamesConstants.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/CharOperation.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileAttribute.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileReader.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileStruct.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFormatException.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/CodeAttribute.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPool.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPoolConstant.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPoolEntry.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantValueAttribute.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/DefaultBytecodeVisitor.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Disassembler.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/EnclosingMethodAttribute.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ExceptionAttribute.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ExceptionTableEntry.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/FieldInfo.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/IModifierConstants.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/IOpcodeMnemonics.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/InnerClassesAttribute.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/InnerClassesAttributeEntry.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/JarComparator.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Messages.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/MethodInfo.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/OpcodeStringValues.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ParameterAnnotation.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeInvisibleAnnotationsAttribute.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeInvisibleParameterAnnotationsAttribute.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeVisibleAnnotationsAttribute.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeVisibleParameterAnnotationsAttribute.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Signature.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/SignatureAttribute.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/SourceFileAttribute.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/TypeConstants.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Utility.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/messages.properties bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/AbstractApplication.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Activator.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/CompositeRepositoryApplication.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Messages.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RepositoryDescriptor.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RepositoryUtilities.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/SlicingOptions.java bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/messages.properties bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/AbstractRepositoryTask.java bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ComparatorDescription.java bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/DestinationRepository.java bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/IUDescription.java bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorTask.java bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ProcessRepoTask.java bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/Repo2RunnableTask.java bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RepositoryFileSet.java bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RepositoryList.java bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/SlicingOption.java bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/TaskHelper.java bundles/org.eclipse.equinox.p2.repository/.classpath bundles/org.eclipse.equinox.p2.repository/.project bundles/org.eclipse.equinox.p2.repository/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.repository/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.repository/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.repository/about.html bundles/org.eclipse.equinox.p2.repository/build.properties bundles/org.eclipse.equinox.p2.repository/plugin.properties bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeRepositoryIO.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeRepositoryState.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeWriter.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/Messages.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLConstants.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/messages.properties bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Activator.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/AuthenticationFailedException.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Credentials.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/DownloadStatus.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/FileInfo.java 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/JREHttpClientRequiredException.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryPreferences.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/RepositoryTracing.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTransport.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Transport.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/DebugHelper.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/Messages.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/RepositoryHelper.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/messages.properties bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/ICompositeRepository.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IRepository.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IRepositoryManager.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IStateful.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryCreationException.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/repository/AbstractRepository.java bundles/org.eclipse.equinox.p2.sar/.classpath 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/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.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/plugin.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/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.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/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/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/.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/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/.classpath bundles/org.eclipse.equinox.p2.tools/.cvsignore bundles/org.eclipse.equinox.p2.tools/.project bundles/org.eclipse.equinox.p2.tools/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.tools/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.tools/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.tools/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.tools/about.html bundles/org.eclipse.equinox.p2.tools/build.properties bundles/org.eclipse.equinox.p2.tools/p2 tools - compare metadata.launch bundles/org.eclipse.equinox.p2.tools/p2 tools - file server.launch bundles/org.eclipse.equinox.p2.tools/p2 tools - mirror.launch bundles/org.eclipse.equinox.p2.tools/plugin.properties bundles/org.eclipse.equinox.p2.tools/plugin.xml bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/Activator.java bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/FileServerApplication.java bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/MetadataCompareApplication.java bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/UpdateCheckerApplication.java bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/MirrorApplication.java bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/RangeQuery.java bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/RepositoryMirroring.java bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/VersionRangedName.java bundles/org.eclipse.equinox.p2.tools/updatechecker app.launch bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.classpath 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/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/ConfigurationConstants.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.natives/.classpath 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/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.rcp/.classpath bundles/org.eclipse.equinox.p2.ui.admin.rcp/.cvsignore bundles/org.eclipse.equinox.p2.ui.admin.rcp/.project bundles/org.eclipse.equinox.p2.ui.admin.rcp/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.ui.admin.rcp/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.ui.admin.rcp/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.ui.admin.rcp/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.ui.admin.rcp/ProvAdminUI.launch bundles/org.eclipse.equinox.p2.ui.admin.rcp/about.html bundles/org.eclipse.equinox.p2.ui.admin.rcp/build.properties bundles/org.eclipse.equinox.p2.ui.admin.rcp/config.ini bundles/org.eclipse.equinox.p2.ui.admin.rcp/icons/provision.gif bundles/org.eclipse.equinox.p2.ui.admin.rcp/icons/pview.gif bundles/org.eclipse.equinox.p2.ui.admin.rcp/plugin.properties bundles/org.eclipse.equinox.p2.ui.admin.rcp/plugin.xml bundles/org.eclipse.equinox.p2.ui.admin.rcp/plugin_customization.ini bundles/org.eclipse.equinox.p2.ui.admin.rcp/rcp.product bundles/org.eclipse.equinox.p2.ui.admin.rcp/splash.bmp bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/Activator.java bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/Application.java bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationActionBarAdvisor.java bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchAdvisor.java bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchWindowAdvisor.java bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ProvAdminUIMessages.java bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ProvisioningRCPPerspective.java bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/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/src/org/eclipse/equinox/internal/p2/ui/admin/AddArtifactRepositoryOperation.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddMetadataRepositoryOperation.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/MetadataRepositoriesView.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/RefreshArtifactRepositoriesOperation.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RefreshMetadataRepositoriesOperation.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveArtifactRepositoryOperation.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveMetadataRepositoryOperation.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.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/plugin.properties bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/plugin.xml bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateAction.java 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.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/about.html bundles/org.eclipse.equinox.p2.updatechecker/build.properties bundles/org.eclipse.equinox.p2.updatechecker/plugin.properties bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/Activator.java 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/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.p2.updatesite/.classpath bundles/org.eclipse.equinox.p2.updatesite/.cvsignore bundles/org.eclipse.equinox.p2.updatesite/.project bundles/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.updatesite/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.updatesite/UpdateSite Publisher.launch bundles/org.eclipse.equinox.p2.updatesite/about.html bundles/org.eclipse.equinox.p2.updatesite/build.properties bundles/org.eclipse.equinox.p2.updatesite/plugin.properties bundles/org.eclipse.equinox.p2.updatesite/plugin.xml bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/Activator.java bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryPublisherApplication.java bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryXMLAction.java bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DigestParser.java bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/LocalUpdateSiteAction.java bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/Messages.java bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteFeaturesAction.java bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteUpdateSiteAction.java bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteCategory.java bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteModel.java bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteXMLAction.java bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSite.java bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSitePublisherApplication.java bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepository.java bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepositoryFactory.java bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/messages.properties bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/Messages.java bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepository.java bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepositoryFactory.java bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/messages.properties 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/about.html bundles/org.eclipse.equinox.simpleconfigurator.manipulator/build.properties bundles/org.eclipse.equinox.simpleconfigurator.manipulator/plugin.properties bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/provisional/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/Activator.java 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/.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/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/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/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/Messages.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.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/messages.properties 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/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/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.sdk/.project features/org.eclipse.equinox.p2.sdk/build.properties features/org.eclipse.equinox.p2.sdk/epl-v10.html features/org.eclipse.equinox.p2.sdk/feature.properties features/org.eclipse.equinox.p2.sdk/feature.xml features/org.eclipse.equinox.p2.sdk/license.html org.eclipse.equinox.p2.releng/.project org.eclipse.equinox.p2.releng/HOW TO RUN.txt org.eclipse.equinox.p2.releng/Provisioning base.target 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/buildtime-features/org.eclipse.equinox.p2.user.ui/.project org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/build.properties org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/eclipse_update_120.jpg org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/epl-v10.html org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/feature.properties org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/feature.xml org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/license.html org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/build.properties org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/eclipse_update_120.jpg org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/epl-v10.html org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/feature.properties org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/license.html org.eclipse.equinox.p2.releng/ecf.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/.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/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/.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/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/.project34
-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.MF26
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/about.html28
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/build.properties17
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Activator.java99
-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.java313
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java746
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxConstants.java62
-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.java112
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java592
-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.java662
-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.java40
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java191
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/messages.properties29
-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/.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.MF16
-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/src/org/eclipse/equinox/frameworkadmin/tests/AbstractFwkAdminTest.java432
-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.java54
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug196525.java99
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug258370.java92
-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.java43
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FwkAdminAndSimpleConfiguratorTest.java97
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherConfigLocationTest.java66
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherDataTest.java93
-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.java124
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoConfigurationValueInEclipseIni.java57
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoRenamingLauncherIni.java73
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/OSGiVersionChange.java124
-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.java134
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingABundle.java55
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingAllBundles.java76
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RenamingLauncherIni.java72
-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.java68
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorTest.java60
-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.java52
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.java79
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/UtilsTest.java67
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/.project34
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.core.prefs265
-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.MF29
-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/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.java327
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java444
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulator.java71
-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/BundleInfo.java231
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundlesState.java142
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java188
-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.java253
-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/.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.prefs342
-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.MF30
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/build.properties16
-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/src/org/eclipse/equinox/internal/p2/artifact/optimizers/AbstractDeltaStep.java75
-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/VersionlessArtifactKey.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Application.java77
-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.java256
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Application.java81
-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.java275
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java69
-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.java103
-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/.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/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java67
-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.artifact.repository/.classpath8
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/.cvsignore3
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/.externalToolBuilders/org.eclipse.equinox.p2.artifact.repository buildAntTasks.xml.launch18
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/.project44
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.jdt.core.prefs346
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.jdt.ui.prefs58
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF77
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/build.properties25
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/buildAntTasks.xml9
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/plugin.xml81
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/schema/artifactComparators.exsd106
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/schema/artifactRepositories.exsd128
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/schema/processingSteps.exsd115
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/FileMirrorLog.java125
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/IArtifactMirrorLog.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/MirrorApplication.java263
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/Mirroring.java273
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/XMLMirrorLog.java166
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processing/AbstractBufferingStep.java104
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processing/Messages.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processing/messages.properties13
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5ArtifactComparator.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java83
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/Messages.java34
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/messages.properties19
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java79
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Activator.java72
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryManager.java126
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRequest.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java520
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepositoryFactory.java127
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.java81
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorRequest.java235
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorSelector.java283
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/RawMirrorRequest.java78
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/SignatureVerifier.java104
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/messages.properties62
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/BlobStore.java128
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/DownloadJob.java78
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/Mapper.java138
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java952
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java511
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/UniversalUniqueIdentifier.java349
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/ArtifactComparatorFactory.java52
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/ArtifactDescriptor.java191
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactComparator.java31
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactDescriptor.java62
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepository.java133
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepositoryManager.java149
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRequest.java33
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IFileArtifactRepository.java32
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/Messages.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStep.java126
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepDescriptor.java89
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepHandler.java203
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ZipVerifierStep.java43
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/messages.properties14
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/AbstractArtifactRepository.java78
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/ArtifactRepositoryFactory.java75
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/SimpleArtifactRepositoryFactory.java129
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/AddChildTask.java82
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/AntMirrorLog.java105
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/CreateCompositeArtifactRepositoryTask.java120
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/MirrorApplicationTask.java221
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/RemoveChildTask.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/ValidateTask.java68
-rw-r--r--bundles/org.eclipse.equinox.p2.console/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.console/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.core.prefs340
-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.MF27
-rw-r--r--bundles/org.eclipse.equinox.p2.console/Provisioning console.launch20
-rw-r--r--bundles/org.eclipse.equinox.p2.console/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.console/build.properties17
-rw-r--r--bundles/org.eclipse.equinox.p2.console/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/Activator.java77
-rw-r--r--bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java401
-rw-r--r--bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java237
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/.classpath8
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/.cvsignore2
-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.prefs346
-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.MF30
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/build.properties23
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/config.ini88
-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.xml26
-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.java644
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java964
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Messages.java82
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/messages.properties63
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java179
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/.classpath7
-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.MF29
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/about.html38
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/build.properties17
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Activator.java59
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java237
-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.java224
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/EntryAdvice.java68
-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.java317
-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.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.prefs339
-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.MF24
-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/org/eclipse/equinox/internal/p2/exemplarysetup/Activator.java154
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/.cvsignore3
-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.MF34
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/build.properties19
-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/src/org/eclipse/equinox/internal/p2/extensionlocation/Activator.java101
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/BundlePoolFilteredListener.java69
-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.java232
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepositoryFactory.java91
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepository.java199
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepositoryFactory.java93
-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.java355
-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/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/.options1
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.core.prefs331
-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.MF24
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/build.properties19
-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/schema/GarbageCollector.exsd104
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Application.java78
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/CoreGarbageCollector.java58
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GCActivator.java110
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java161
-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.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Messages.java25
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/messages.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.core.prefs341
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.ui.prefs59
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/META-INF/MANIFEST.MF26
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/README.txt2
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/build.properties19
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/installer.product132
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/installer.properties7
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/plugin.xml35
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/product_lg.gifbin9559 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/HeadlessInstallAdvisor.java82
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallApplication.java236
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallDescriptionParser.java226
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallUpdateProductOperation.java277
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallerActivator.java92
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/Messages.java86
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/messages.properties68
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/InstallDialog.java566
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/ProxiesDialog.java312
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/SWTInstallAdvisor.java81
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/provisional/p2/installer/IInstallOperation.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/provisional/p2/installer/InstallAdvisor.java69
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/provisional/p2/installer/InstallDescription.java170
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/.classpath8
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/.cvsignore4
-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.prefs344
-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.MF40
-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.xml37
-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.java445
-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.java159
-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.java207
-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.java573
-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.java1397
-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.java1386
-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/.cvsignore3
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/.externalToolBuilders/org.eclipse.equinox.p2.metadata.reposiroy buildAntTasks.xml.launch18
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/.project44
-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.MF64
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/build.properties25
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/buildAntTasks.xml9
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/p2 tools - mirror metadata.launch24
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/plugin.xml53
-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/mirror/MirrorApplication.java175
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/Mirroring.java62
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/RangeQuery.java49
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/VersionRangedName.java53
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java87
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CacheManager.java420
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java294
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepositoryFactory.java163
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java220
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Messages.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryIO.java337
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryManager.java171
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/URLMetadataRepository.java83
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java862
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java311
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/XMLConstants.java91
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/messages.properties24
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/p2/metadata/repository/IMetadataRepository.java79
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/p2/metadata/repository/IMetadataRepositoryManager.java155
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/AbstractMetadataRepository.java72
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/MetadataRepositoryFactory.java100
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/RepositoryReference.java57
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/SimpleMetadataRepositoryFactory.java161
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AddChildTask.java79
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/CreateCompositeMetadataRepositoryTask.java109
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/MirrorApplicationTask.java128
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/RemoveChildTask.java77
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.core.prefs347
-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.MF86
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/build.properties17
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ArtifactKey.java119
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Copyright.java65
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java297
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitFragment.java46
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitPatch.java52
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/License.java147
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/MetadataActivator.java32
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ProvidedCapability.java81
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java185
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequirementChange.java119
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java181
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointData.java91
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointInstruction.java163
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointType.java56
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/UpdateDescriptor.java51
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IArtifactKey.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ICopyright.java38
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnit.java283
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnitFragment.java19
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnitPatch.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ILicense.java60
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IProvidedCapability.java61
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IRequiredCapability.java88
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IRequirementChange.java35
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointData.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointInstruction.java72
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointType.java54
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IUpdateDescriptor.java53
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/MetadataFactory.java422
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/CapabilityQuery.java62
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/IUPropertyQuery.java51
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/InstallableUnitQuery.java96
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/LatestIUVersionQuery.java53
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/UpdateQuery.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/.classpath8
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/.cvsignore1
-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.prefs347
-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.MF55
-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.properties26
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/plugin.xml55
-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.java39
-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/SingleElementCollector.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java508
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/DataLoader.java156
-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.java266
-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.java129
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java749
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/messages.properties28
-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.java551
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java360
-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.java102
-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.java191
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherInfo.java94
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherResult.java145
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IAdditionalInstallableUnitAdvice.java20
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ICapabilityAdvice.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFeatureRootAdvice.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFilterAdvice.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ILicenseAdvice.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IPropertyAdvice.java31
-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.java26
-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/IVersionAdvice.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/JREAction.java241
-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.java161
-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.java190
-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.java31
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/VersionAdvice.java135
-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.java211
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileParser.java555
-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.java810
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigAdvice.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java377
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/DefaultCUsAction.java69
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EclipseInstallAction.java242
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java249
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxLauncherCUAction.java89
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/Feature.java327
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java194
-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.java64
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IBrandingAdvice.java38
-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.java94
-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.java190
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductFileAdvice.java331
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductPublisherApplication.java58
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/URLEntry.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/LocalizationHelper.java200
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java229
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java183
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/FeaturesAndBundlesPublisherTask.java84
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/ProductPublisherTask.java139
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java183
-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.repository.tools/.classpath8
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/.cvsignore3
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/.externalToolBuilders/Build Repository Tools JARs.launch20
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/.project44
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/.settings/org.eclipse.jdt.core.prefs347
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/META-INF/MANIFEST.MF35
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/build.properties26
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/lib/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/plugin.properties13
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/plugin.xml54
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/scripts/buildAntJARs.xml8
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Annotation.java90
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationComponent.java60
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationComponentValue.java277
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationDefaultAttribute.java35
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AttributeNamesConstants.java142
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/CharOperation.java602
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileAttribute.java47
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileReader.java468
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileStruct.java82
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFormatException.java59
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/CodeAttribute.java1114
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPool.java104
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPoolConstant.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPoolEntry.java396
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantValueAttribute.java37
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/DefaultBytecodeVisitor.java2071
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Disassembler.java1149
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/EnclosingMethodAttribute.java101
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ExceptionAttribute.java61
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ExceptionTableEntry.java70
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/FieldInfo.java170
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/IModifierConstants.java104
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/IOpcodeMnemonics.java220
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/InnerClassesAttribute.java56
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/InnerClassesAttributeEntry.java100
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/JarComparator.java283
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Messages.java107
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/MethodInfo.java213
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/OpcodeStringValues.java222
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ParameterAnnotation.java63
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeInvisibleAnnotationsAttribute.java56
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeInvisibleParameterAnnotationsAttribute.java56
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeVisibleAnnotationsAttribute.java56
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeVisibleParameterAnnotationsAttribute.java56
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Signature.java1163
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/SignatureAttribute.java42
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/SourceFileAttribute.java49
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/TypeConstants.java153
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Utility.java689
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/messages.properties98
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/AbstractApplication.java249
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Activator.java120
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/CompositeRepositoryApplication.java183
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Messages.java68
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java284
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java152
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java277
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RepositoryDescriptor.java115
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RepositoryUtilities.java57
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/SlicingOptions.java82
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/messages.properties48
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/AbstractRepositoryTask.java188
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ComparatorDescription.java54
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java69
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/DestinationRepository.java58
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/IUDescription.java153
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorTask.java114
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ProcessRepoTask.java161
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java86
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/Repo2RunnableTask.java69
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RepositoryFileSet.java67
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RepositoryList.java42
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/SlicingOption.java110
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/TaskHelper.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/.settings/org.eclipse.jdt.core.prefs351
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/.settings/org.eclipse.jdt.ui.prefs60
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF43
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/build.properties17
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java214
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeRepositoryIO.java87
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeRepositoryState.java93
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeWriter.java68
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/Messages.java37
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLConstants.java64
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java753
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java307
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/messages.properties27
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Activator.java164
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/AuthenticationFailedException.java20
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java420
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Credentials.java482
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/DownloadStatus.java77
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/FileInfo.java147
-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.java496
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/JREHttpClientRequiredException.java20
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java86
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java164
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryPreferences.java49
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatus.java153
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatusHelper.java322
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTracing.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTransport.java245
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Transport.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java1029
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/DebugHelper.java125
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/Messages.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/RepositoryHelper.java81
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/messages.properties21
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties73
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/ICompositeRepository.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IRepository.java188
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IRepositoryManager.java211
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IStateful.java33
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryCreationException.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java149
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/repository/AbstractRepository.java135
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/.classpath7
-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/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.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.MF30
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/build.properties16
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/plugin.xml4
-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/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.java63
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchZipStepTest.java82
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JarDeltaProcessorTest.java73
-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.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.prefs69
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/META-INF/MANIFEST.MF13
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/build.properties5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/plugin.xml9
-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.java295
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/All p2 Tests.launch7
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/.classpath7
-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.MF17
-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/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.java92
-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/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/.settings/org.eclipse.jdt.core.prefs343
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/META-INF/MANIFEST.MF31
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/build.properties18
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/p2 tools - compare metadata.launch24
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/p2 tools - file server.launch24
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/p2 tools - mirror.launch24
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/plugin.xml22
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/Activator.java29
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/FileServerApplication.java94
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/MetadataCompareApplication.java238
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/UpdateCheckerApplication.java117
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/MirrorApplication.java150
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/RangeQuery.java49
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/RepositoryMirroring.java254
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/VersionRangedName.java51
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/updatechecker app.launch24
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.classpath7
-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.MF44
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/build.properties18
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.xml234
-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.java29
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java137
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java246
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/LazyManipulator.java146
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Messages.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java256
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PublisherUtil.java43
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/SourceManipulator.java78
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java329
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/WhatIsRunning.java24
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ActionConstants.java49
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java287
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramArgumentAction.java90
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddRepositoryAction.java57
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddSourceBundleAction.java67
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java64
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ChmodAction.java150
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CollectAction.java90
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java80
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallFeatureAction.java79
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java122
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java103
-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.java57
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveSourceBundleAction.java66
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java255
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetLauncherNameAction.java47
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetProgramPropertyAction.java71
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java106
-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.java63
-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.properties29
-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/ConfigurationConstants.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java260
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java180
-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.java124
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java176
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java122
-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.natives/.classpath7
-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.prefs331
-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.MF24
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/build.properties18
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.xml111
-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.java113
-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.java117
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupcopyAction.java104
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupzipAction.java131
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CollectAction.java65
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CopyAction.java164
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/LinkAction.java109
-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.java50
-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.java104
-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.rcp/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/.settings/org.eclipse.jdt.core.prefs331
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/.settings/org.eclipse.pde.core.prefs3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/META-INF/MANIFEST.MF14
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/ProvAdminUI.launch306
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/build.properties21
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/config.ini50
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/icons/provision.gifbin368 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/icons/pview.gifbin219 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/plugin.properties21
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/plugin.xml53
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/plugin_customization.ini2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/rcp.product200
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/splash.bmpbin403614 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/Activator.java69
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/Application.java55
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationActionBarAdvisor.java47
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchAdvisor.java24
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchWindowAdvisor.java38
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ProvAdminUIMessages.java31
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ProvisioningRCPPerspective.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/messages.properties15
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/.cvsignore1
-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.prefs331
-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.MF40
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/build.properties21
-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/src/org/eclipse/equinox/internal/p2/ui/admin/AddArtifactRepositoryOperation.java46
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddMetadataRepositoryOperation.java46
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java83
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java129
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java223
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java183
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIMessages.java102
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java227
-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/RefreshArtifactRepositoriesOperation.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RefreshMetadataRepositoriesOperation.java52
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveArtifactRepositoryOperation.java38
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveMetadataRepositoryOperation.java38
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java192
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java127
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java136
-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.java240
-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.java90
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java75
-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.java273
-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.java148
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/messages.properties79
-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.sdk.scheduler/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.cvsignore1
-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.prefs330
-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.properties17
-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/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateAction.java157
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateMessages.java88
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java168
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.java275
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java510
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java295
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPreferencePage.java353
-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.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java139
-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.properties73
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/.project34
-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/about.html38
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/build.properties17
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/Activator.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java184
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateChecker.java57
-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.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.jdt.core.prefs351
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/META-INF/MANIFEST.MF51
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/UpdateSite Publisher.launch23
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/about.html38
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/build.properties18
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/plugin.xml56
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/Activator.java54
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryPublisherApplication.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryXMLAction.java38
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java819
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DigestParser.java114
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/LocalUpdateSiteAction.java104
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/Messages.java51
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteFeaturesAction.java80
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteUpdateSiteAction.java67
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteCategory.java199
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java451
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteModel.java314
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteXMLAction.java357
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSite.java581
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSitePublisherApplication.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepository.java139
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepositoryFactory.java153
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/messages.properties29
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/Messages.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepository.java105
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepositoryFactory.java128
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/messages.properties14
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.project34
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.core.prefs265
-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.MF20
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/about.html28
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/build.properties18
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/plugin.properties13
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/provisional/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java43
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/Activator.java47
-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.java456
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java131
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/.cvsignore3
-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.prefs270
-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.MF26
-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/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.java60
-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.java78
-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.java189
-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/.cvsignore2
-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.properties119
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/buildProduct.xml26
-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.MF28
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/build.properties9
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product100
-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.xml153
-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.java77
-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.java32
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java52
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/Messages.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java124
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java97
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/messages.properties15
-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.MF25
-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/prestartupdate.product103
-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.java97
-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.java33
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchWindowAdvisor.java26
-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.java193
-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.MF29
-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/product_lg.gifbin9559 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/sdkbundlevisibility.product100
-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.java39
-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.java52
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/Messages.java33
-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.java124
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/ProvisioningPreferencePage.java138
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/UpdateHandler.java97
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/messages.properties22
-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.product100
-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.sdk/.project17
-rw-r--r--features/org.eclipse.equinox.p2.sdk/build.properties56
-rwxr-xr-xfeatures/org.eclipse.equinox.p2.sdk/epl-v10.html328
-rwxr-xr-xfeatures/org.eclipse.equinox.p2.sdk/feature.properties147
-rw-r--r--features/org.eclipse.equinox.p2.sdk/feature.xml656
-rwxr-xr-xfeatures/org.eclipse.equinox.p2.sdk/license.html79
-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/Provisioning base.target26
-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.properties125
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/feature.xml237
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/license.html79
-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.properties125
-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.html79
-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.properties125
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/feature.xml195
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/license.html79
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/.project17
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/build.properties16
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/epl-v10.html328
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/feature.properties128
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/feature.xml318
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/license.html79
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/build.properties16
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/epl-v10.html328
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/feature.properties144
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/license.html79
-rw-r--r--org.eclipse.equinox.p2.releng/ecf.psf18
-rw-r--r--org.eclipse.equinox.p2.releng/projectSet-extssh.psf61
-rw-r--r--org.eclipse.equinox.p2.releng/projectSet.psf61
1355 files changed, 3 insertions, 136708 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/.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/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/.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/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/.project b/bundles/org.eclipse.equinox.frameworkadmin.equinox/.project
deleted file mode 100644
index e1ceadb55..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.project
+++ /dev/null
@@ -1,34 +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>
- </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 acf9f5eb1..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/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.frameworkadmin.equinox;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.frameworkadmin.equinox.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Import-Package: org.eclipse.core.runtime.internal.adaptor,
- 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.internal.frameworkadmin.equinox.utils;x-internal:=true
-Require-Bundle: org.eclipse.equinox.common
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
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 b0b12db73..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/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.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/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Activator.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Activator.java
deleted file mode 100644
index 4a3ec8674..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Activator.java
+++ /dev/null
@@ -1,99 +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.util.Dictionary;
-import java.util.Hashtable;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.osgi.framework.*;
-
-/**
- * This bundle provides the {@link FrameworkAdmin} implementation for Felix.
- *
- * This bundle registers {@link Manipulator} object with these service property values.
- *
- * FW_NAME = "Equinox";
- * FW_VERSION = "3.3";
- * LAUCNHER_NAME = "Eclipse.exe";
- * LAUNCHER_VERSION = "3.2";
- *
- * The launching by the eclipse launcher is supported.
- *
- * Handling plugins in non Jar format is not supported.
- *
- * FwBundleState supports retrieving fw persistent data
- * and resolving bundles if running on equinox.
- * FwBundleState Does NOT support retrieving start Levels from fw persistent data location/
- *
- */
-public class Activator implements BundleActivator {
- private static BundleContext context;
- private ServiceRegistration registrationFA;
- EquinoxFwAdminImpl fwAdmin = null;
-
- private void registerFwAdmin() {
- Dictionary props = new Hashtable();
- props.put(Constants.SERVICE_VENDOR, "Eclipse.org");
-
- props.put(FrameworkAdmin.SERVICE_PROP_KEY_FW_NAME, EquinoxConstants.FW_NAME);
- props.put(FrameworkAdmin.SERVICE_PROP_KEY_FW_VERSION, EquinoxConstants.FW_VERSION);
- props.put(FrameworkAdmin.SERVICE_PROP_KEY_LAUNCHER_NAME, EquinoxConstants.LAUNCHER_NAME);
- props.put(FrameworkAdmin.SERVICE_PROP_KEY_LAUNCHER_VERSION, EquinoxConstants.LAUNCHER_VERSION);
-
- if (EquinoxFwAdminImpl.isRunningFw(context)) {
- props.put(FrameworkAdmin.SERVICE_PROP_KEY_RUNNING_SYSTEM_FLAG, "true");
- fwAdmin = new EquinoxFwAdminImpl(context, true);
- } else
- fwAdmin = new EquinoxFwAdminImpl(context);
-
- registrationFA = context.registerService(FrameworkAdmin.class.getName(), fwAdmin, props);
- }
-
- /**
- * TODO: These services are never disposed.
- */
- public static Object acquireService(String serviceName) {
- //be tolerant of concurrent shutdown
- BundleContext theContext = context;
- if (theContext == null)
- return null;
- ServiceReference reference = theContext.getServiceReference(serviceName);
- if (reference == null)
- return null;
- return theContext.getService(reference);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext bundleContext) throws Exception {
- Activator.context = bundleContext;
- Log.init(bundleContext);
- registerFwAdmin();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext bundleContext) throws Exception {
- Activator.context = null;
- if (registrationFA != null)
- registrationFA.unregister();
- if (fwAdmin != null)
- fwAdmin.deactivate();
- Log.dispose();
- }
-}
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 77b570552..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java
+++ /dev/null
@@ -1,313 +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;
-
-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().getParentFile().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 ? launcherData.getFwJar().getParentFile().toURI() : launcherFolder;
- }
- URI configArea = getConfigurationLocation(lines, osgiInstallArea, launcherData);
- if (configArea == null)
- throw new FrameworkAdminRuntimeException("config area is null", "");
- 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, "can't make absolute of:" + vm);
- return;
- }
- }
-
- private void setVM(List lines, File vm, URI launcherFolder) {
- if (vm == null) {
- ParserUtils.removeArgument(EquinoxConstants.OPTION_VM, lines);
- return;
- }
- URI 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, "can't make absolute of:" + 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, "can't make absolute of:" + 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, "can't make absolute of:" + 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, "can't make absolute of:" + 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, "can't make relative of:" + 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$
- }
-
- 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 df244e83f..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java
+++ /dev/null
@@ -1,746 +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;
-
-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.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 EclipseEnvironmentInof
- 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();
-
- /**
- * 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, boolean useFwPersistentData) {
- this.context = context;
- this.fwAdmin = fwAdmin;
- // 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, Properties platformProperties) {
- super();
- this.context = context;
- this.fwAdmin = fwAdmin;
- // 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);
- PlatformAdmin platformAdmin = (PlatformAdmin) Activator.acquireService(PlatformAdmin.class.getName());
- 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) {
- // TODO default value should be set more precisely.
- File installArea = null;
- String installAreaSt = configData.getProperty(EquinoxConstants.PROP_INSTALL);
- if (installAreaSt == null) {
- if (manipulator.getLauncherData().getLauncher() == null) {
- // TODO implement
- } else {
- installArea = manipulator.getLauncherData().getLauncher().getParentFile();
- }
- } else {
- if (installAreaSt.startsWith("file:")) //$NON-NLS-1$
- installArea = new File(installAreaSt.substring("file:".length())); //$NON-NLS-1$
- else
- throw new IllegalStateException(NLS.bind(Messages.exception_fileURLExpected, EquinoxConstants.PROP_INSTALL, installAreaSt));
- }
- if (DEBUG)
- Log.log(LogService.LOG_DEBUG, this, "initialize(useFwPersistentDat)", "installArea=" + installArea); //$NON-NLS-1$ //$NON-NLS-2$
- 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)
- return;
- PlatformAdmin platformAdmin = (PlatformAdmin) Activator.acquireService(PlatformAdmin.class.getName());
- 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 99d104ea3..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxConstants.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.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_SHOWSPLASH = "-showsplash"; //$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 12f8e30ca..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwAdminImpl.java
+++ /dev/null
@@ -1,112 +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.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.osgi.framework.*;
-
-public class EquinoxFwAdminImpl implements FrameworkAdmin {
-
- /**
- * 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.
- */
- static boolean isRunningFw(BundleContext context) {
- //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;
- }
-
- BundleContext context = null;
-
- boolean active = false;
-
- private boolean runningFw = false;
- private ConfiguratorManipulator configuratorManipulator = null;
-
- // private String configuratorManipulatorFactoryName = null;
-
- EquinoxFwAdminImpl() {
- this(null, false);
- }
-
- EquinoxFwAdminImpl(BundleContext context) {
- this(context, false);
- }
-
- EquinoxFwAdminImpl(String configuratorManipulatorFactoryName) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
- this.context = null;
- this.active = true;
- this.runningFw = false;
- // this.configuratorManipulatorFactoryName = configuratorManipulatorFactoryName;
- loadConfiguratorManipulator(configuratorManipulatorFactoryName);
- }
-
- private void loadConfiguratorManipulator(String configuratorManipulatorFactoryName) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
- if (configuratorManipulatorFactoryName == null)
- this.configuratorManipulator = null;
- else
- this.configuratorManipulator = ConfiguratorManipulatorFactory.getInstance(configuratorManipulatorFactoryName);
- return;
- }
-
- EquinoxFwAdminImpl(BundleContext context, boolean runningFw) {
- this.context = context;
- this.active = true;
- this.runningFw = runningFw;
- }
-
- void deactivate() {
- active = false;
- }
-
- public Manipulator getManipulator() {
- return new EquinoxManipulatorImpl(context, this);
- }
-
- public Manipulator getRunningManipulator() {
- if (this.runningFw)
- return new EquinoxManipulatorImpl(context, this, true);
- return null;
- }
-
- public boolean isActive() {
- return active;
- }
-
- 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);
- }
-
- public ConfiguratorManipulator getConfiguratorManipulator() {
- return configuratorManipulator;
- }
-
-}
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 5a778a8e0..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java
+++ /dev/null
@@ -1,592 +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;
-
-import java.io.*;
-import java.net.*;
-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.*;
-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 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, URI base, 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);
-
- String launcherName = null;
- String launcherPath = 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);
- // if (key.equals(EquinoxConstants.PROP_LAUNCHER_NAME))
- // if (launcherData.getLauncher() == null)
- // launcherName = value;
- // if (key.equals(EquinoxConstants.PROP_LAUNCHER_PATH))
- // if (launcherData.getLauncher() == null)
- // launcherPath = value;
- String[] KNOWN_PROPERTIES = {EquinoxConstants.PROP_BUNDLES, EquinoxConstants.PROP_FW_EXTENSIONS, EquinoxConstants.PROP_INITIAL_STARTLEVEL, EquinoxConstants.PROP_BUNDLES_STARTLEVEL};
- top: for (Enumeration enumeration = props.keys(); enumeration.hasMoreElements();) {
- String key = (String) enumeration.nextElement();
- for (int i = 0; i < KNOWN_PROPERTIES.length; i++) {
- if (KNOWN_PROPERTIES[i].equals(key))
- continue top;
- }
- String value = props.getProperty(key);
- configData.setProperty(key, value);
- }
- if (launcherName != null && launcherPath != null) {
- launcherData.setLauncher(new File(launcherPath, launcherName + EquinoxConstants.EXE_EXTENSION));
- }
- 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()), configData.getProperties(), 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("Can't determinate the osgi.framework location");
- //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("Can't determinate the osgi.framework location");
- }
- }
- 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)
- props.setProperty(EquinoxConstants.PROP_LAUNCHER_PATH, URIUtil.makeAbsolute(URIUtil.fromString(props.getProperty(EquinoxConstants.PROP_LAUNCHER_PATH)), root).toString());
- }
-
- 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, ParserUtils.getOSGiInstallArea(Arrays.asList(launcherData.getProgramArgs()), configProps, launcherData).toURI(), bInfos);
- writeInitialStartLevel(configData, configProps);
- writeDefaultStartLevel(configData, configProps);
- } catch (URISyntaxException e) {
- throw new FrameworkAdminRuntimeException(e, "saving config.ini");
- }
-
- 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(Messages.exception_failedToCreateDir);
- }
-
- 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 012203130..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java
+++ /dev/null
@@ -1,662 +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;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.*;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-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.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("fwConfigLocation is not a directory but its name does NOT equal \"" + EquinoxConstants.CONFIG_INI + "\"!\n" + "\tfwConfigLocation=" + fwConfigLocation.getAbsolutePath() + "\n\t,fwPersistentDataLocation=" + fwPersistentDataLocation.getAbsolutePath());
- launcherData.setFwConfigLocation(fwConfigLocation);
- }
- if (fwPersistentDataLocation != null) {
- // Log.log(LogService.LOG_DEBUG, "fwConfigLocation=" + fwConfigLocation.getAbsolutePath() + ",\n\tfwInstancePrivateArea=" + fwPersistentDataLocation.getAbsolutePath());
- //if (!fwConfigLocation.getParentFile().equals(fwPersistentDataLocation))
- //throw new IllegalStateException("!configFile.getParentFile().equals(fwInstancePrivateArea)\n" + "\tconfigFile=" + fwConfigLocation.getAbsolutePath() + "\n\t,fwInstancePrivateArea=" + fwPersistentDataLocation.getAbsolutePath());
- if (!fwConfigLocation.equals(fwPersistentDataLocation))
- throw new IllegalStateException("!fwConfigLocation.equals(fwPersistentDataLocation)\n" + "\t!fwConfigLocation=" + fwConfigLocation.getAbsolutePath() + "\n\t,fwPersistentDataLocation=" + fwPersistentDataLocation.getAbsolutePath());
- } else
- launcherData.setFwPersistentDataLocation(fwConfigLocation, launcherData.isClean());
- //launcherData.setFwPersistentDataLocation(fwConfigLocation.getParentFile(), launcherData.isClean());
- } else {
- if (fwPersistentDataLocation != null) {
- launcherData.setFwConfigLocation(fwPersistentDataLocation);
- //launcherData.setFwConfigLocation(new File(fwPersistentDataLocation, EquinoxConstants.CONFIG_INI));
- } else {
- File home = launcherData.getHome();
- if (home == null)
- throw new IllegalStateException("All of fwConfigLocation, fwPersistentDataLocation, and home are not set");
- fwConfigLocation = new File(home, "configuration");
- 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 boolean runtime;
-
- ConfiguratorManipulator configuratorManipulator;
-
- EquinoxFwAdminImpl fwAdmin = null;
-
- EquinoxManipulatorImpl(BundleContext context, EquinoxFwAdminImpl fwAdmin) {
- this(context, fwAdmin, false);
- }
-
- EquinoxManipulatorImpl(BundleContext context, EquinoxFwAdminImpl fwAdmin, boolean runtime) {
- this.context = context;
- this.fwAdmin = fwAdmin;
- 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, 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, 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"))
- 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");
- boolean found = false;
- String launcherSt = null;
- while (tokenizer.hasMoreTokens()) {
- String token = tokenizer.nextToken();
- if (found) {
- launcherSt = token;
- break;
- }
- if (token.equals("-launcher"))
- 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 load() throws IllegalStateException, IOException, FrameworkAdminRuntimeException {
- // this.load(true);
- // }
-
- public void initialize() {
- Log.log(LogService.LOG_DEBUG, this, "initialize()", "BEGIN");
- 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:"))
- throw new IllegalStateException("Current implementation assume that property value keyed by " + EquinoxConstants.PROP_OSGI_FW + " must start with \"file:\". But it was not:" + fwJarLocation);
- File fwJar = new File(fwJarLocation.substring("file:".length()));
- //System.out.println("fwJar=" + fwJar);
- 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
- StartLevel slAdmin = (StartLevel) Activator.acquireService(StartLevel.class.getName());
- int initialBSL = configData.getInitialBundleStartLevel();
- if (initialBSL != slAdmin.getInitialBundleStartLevel())
- configData.setInitialBundleStartLevel(slAdmin.getInitialBundleStartLevel());
-
- // for (int j = 0; j < bInfos.length; j++)
- // configData.addBundle(bInfos[j]);
- }
-
- /* (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");
- loadWithoutFwPersistentData();
-
- BundlesState bundlesState = null;
- if (EquinoxBundlesState.checkFullySupported()) {
- bundlesState = new EquinoxBundlesState(context, fwAdmin, this, !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, "loading");
- }
- }
-
- // 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");
- 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."))
- return true;
- return false;
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append("++++++++++++++++++++++++++++++++++++++++++\n" + "Class:" + this.getClass().getName() + "\n");
- sb.append("------------- LauncherData -----------\n");
- sb.append(launcherData.toString());
- sb.append("------------- ConfigData -----------\n");
- sb.append(configData.toString());
- sb.append("\n" + Utils.toStringProperties("platformProperties", this.platformProperties));
- sb.append("++++++++++++++++++++++++++++++++++++++++++\n");
- 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 9884e662c..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Messages.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 - 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_fileURLExpected;
- public static String exception_bundleManifest;
- public static String exception_createAbsoluteURI;
-
- 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;
-
- 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 973795aba..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java
+++ /dev/null
@@ -1,191 +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 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;
-
- //TODO This is not enough because if you only have -startup then osgi.install.area from the config.ini is used
- File result = getOSGiInstallArea(programArgs, properties, launcherData.getLauncher() == null ? null : launcherData.getLauncher().getParentFile().toURI());
- if (result != null)
- return result;
-
- 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 (parentFolder.lastSegment().equalsIgnoreCase("plugins")) //$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() && args.get(i + 1) != null && ((String) args.get(i + 1)).charAt(0) != '-')
- return (String) args.get(i + 1);
- }
- }
- 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 7e0332122..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/messages.properties
+++ /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
-###############################################################################
-
-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_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}\".
-
-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}.
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/.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 41f2e9dd2..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.admin,org.eclipse.equinox.p2.tools,org.eclipse.equinox.p2.selfhosting,org.eclipse.equinox.p2.ui.admin.rcp,ie.wombat.jbdiff.test,org.eclipse.equinox.p2.ui.sdk"/>
-<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.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.core.filesystem@default:default,org.eclipse.update.core@default:default,org.eclipse.core.expressions@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.contenttype@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.equinox.app@default:default,org.eclipse.ui.forms@default:default,org.eclipse.compare@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.ui.console@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.swt@default:default,org.eclipse.help@default:default,org.eclipse.update.ui@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.swt.cocoa.macosx@default:false,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.core.filebuffers@default:default,org.eclipse.debug.core@default:default,org.eclipse.ant.core@default:default,com.ibm.icu@default:default,org.eclipse.pde.junit.runtime@default:default,org.eclipse.update.configurator@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.osgi.services@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.jface.text@default:default,org.eclipse.core.databinding@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.search@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.core.net@default:default,org.eclipse.jdt.core@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.security@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.team.ui@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.compare.core@default:default,javax.servlet@default:default,org.eclipse.ui@default:default,org.apache.ant@default:default,org.eclipse.osgi@-1:true,org.junit@default:default,org.eclipse.equinox.security.macosx@default:false,org.eclipse.equinox.registry@default:default,org.eclipse.text@default:default,org.eclipse.debug.ui@default:default,org.eclipse.core.resources.compatibility@default:false,org.eclipse.jface@default:default,org.eclipse.team.core@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.ui.navigator@default:default,org.eclipse.equinox.security.ui@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.sar@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.core.tests.harness@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.equinox.p2.exemplarysetup@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.tests.ui@default:default,org.eclipse.equinox.p2.examples.rcp.cloud@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.easymock@default:default,org.eclipse.ecf@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.tests.optimizers@default:default,org.eclipse.equinox.frameworkadmin.test@default:default,org.apache.commons.codec@default:default,org.apache.commons.httpclient@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.sat4j.pb@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.sat4j.core@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.installer@default:default,org.eclipse.equinox.p2.tests@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.artifact.processors@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.artifact.optimizers@default:default,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.test.performance@default:default,org.apache.commons.logging@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,ie.wombat.jbdiff@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@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>
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 d2b9fa466..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +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,4.0.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
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/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 3e0bebd84..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AbstractFwkAdminTest.java
+++ /dev/null
@@ -1,432 +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.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) {
- 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 (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 startSimpleConfiguratormManipulator() {
- 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 stopSimpleConfiguratormManipulator() {
- 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 {
- startSimpleConfiguratormManipulator();
- 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 b6ab89d9c..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java
+++ /dev/null
@@ -1,54 +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(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 3165081cb..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug196525.java
+++ /dev/null
@@ -1,99 +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.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 {
- startSimpleConfiguratormManipulator();
- //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 d94006d86..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug258370.java
+++ /dev/null
@@ -1,92 +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.equinox.internal.provisional.frameworkadmin.FrameworkAdminRuntimeException;
-
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-
-import java.net.URISyntaxException;
-
-import org.osgi.framework.BundleException;
-
-import java.io.File;
-import java.io.IOException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-
-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 4b6e483bd..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.internal.provisional.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);
- 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 5ccf81e2d..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FrameworkExtensionTest.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.frameworkadmin.tests;
-
-import org.osgi.framework.Constants;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-
-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 b700e9fd4..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FwkAdminAndSimpleConfiguratorTest.java
+++ /dev/null
@@ -1,97 +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.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();
- startSimpleConfiguratormManipulator();
- }
-
- protected Manipulator getNewManipulator(String workArea) throws FrameworkAdminRuntimeException, IOException, BundleException {
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- installFolder = Activator.getContext().getDataFile(workArea);
- 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 eec9ace3f..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherConfigLocationTest.java
+++ /dev/null
@@ -1,66 +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.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 {
- startSimpleConfiguratormManipulator();
- 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 edcdcb7b3..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherDataTest.java
+++ /dev/null
@@ -1,93 +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 org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-
-import junit.framework.TestCase;
-
-/**
- * @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 896d10dca..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 org.eclipse.osgi.service.environment.Constants;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxConstants;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-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 130734533..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ManipulatorTests.java
+++ /dev/null
@@ -1,124 +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.*;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils;
-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 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"});
- }
-
- public void testParserUtils_removeArgument() 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 testParserUtils_setValueForArgument() 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 testParserUtils_getValueForArgument() 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));
- }
-}
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 453038aa1..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoConfigurationValueInEclipseIni.java
+++ /dev/null
@@ -1,57 +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.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 c3d9fa1f0..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoRenamingLauncherIni.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.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 {
- startSimpleConfiguratormManipulator();
- 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 293a680dd..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/OSGiVersionChange.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.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.internal.provisional.frameworkadmin.*;
-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/ReaderTest1.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest1.java
deleted file mode 100644
index e5e279992..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 {
- startSimpleConfiguratormManipulator();
-
- 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 096e8087e..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();
- startSimpleConfiguratormManipulator();
-
- 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 772f2cd95..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 {
- startSimpleConfiguratormManipulator();
-
- 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 4440747ef..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();
- startSimpleConfiguratormManipulator();
-
- 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 bb834bf7d..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();
- startSimpleConfiguratormManipulator();
-
- 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 7247644f8..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 {
- startSimpleConfiguratormManipulator();
-
- 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 eed733a57..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 {
- startSimpleConfiguratormManipulator();
-
- 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 481dfe797..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RelativePathTest.java
+++ /dev/null
@@ -1,134 +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.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);
- 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 c60f93492..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingABundle.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.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.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 2d44e96fe..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingAllBundles.java
+++ /dev/null
@@ -1,76 +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.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 {
- startSimpleConfiguratormManipulator();
- 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 9b83e0818..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RenamingLauncherIni.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.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.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 {
- startSimpleConfiguratormManipulator();
- 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 1af667f55..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 {
- startSimpleConfiguratormManipulator();
- 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 {
- startSimpleConfiguratormManipulator();
- 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 {
- startSimpleConfiguratormManipulator();
- 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 736a32bdd..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorComingAndGoing.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.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.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);
- 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 4c8b2e71e..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorTest.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 org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-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 {
- startSimpleConfiguratormManipulator();
- 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");
- }
-}
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 d723d048b..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.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.frameworkadmin.tests;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-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 c970c7d5c..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.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.frameworkadmin.tests;
-
-import org.eclipse.core.runtime.Platform;
-
-import java.io.File;
-import java.io.IOException;
-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());
- }
-}
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 4ea79ed06..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/UtilsTest.java
+++ /dev/null
@@ -1,67 +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 org.eclipse.osgi.service.environment.Constants;
-
-import java.io.File;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-
-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/.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 fd68207bc..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,265 +0,0 @@
-#Mon Aug 24 11:50:51 EDT 2009
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-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.compiler.compliance=1.4
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=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_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_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.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.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.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.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_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.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-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.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.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.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.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.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.brace_position_for_annotation_type_declaration=end_of_line
-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.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.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 d898c018e..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,29 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.frameworkadmin;singleton:=true
-Bundle-Version: 1.0.200.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.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/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 9a479d614..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/SimpleBundlesState.java
+++ /dev/null
@@ -1,327 +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.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"))
- continue;
-
- String fragmentHost = Utils.getManifestMainAttributes(location, Constants.FRAGMENT_HOST);
- if (fragmentHost == null)
- continue;
- int index = fragmentHost.indexOf(";");
- 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)) {
- 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, 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 a6d3ef7b8..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java
+++ /dev/null
@@ -1,444 +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.internal.provisional.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 {
- String fileExtention = bundleLocation.getName();
- fileExtention = fileExtention.substring(fileExtention.lastIndexOf('.') + 1);
- // Handle a JAR'd bundle
- if ("jar".equalsIgnoreCase(fileExtention) && 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 {
- // 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"))
- 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");
- }
- }
-
- /*
- * 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, ",");
- 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() + "!/");
- 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");
- String date = df.format(new Date());
- String filename = file.getName();
- int index = filename.lastIndexOf(".");
- if (index != -1)
- filename = filename.substring(0, index) + "." + date + "." + filename.substring(index + 1);
- else
- filename = filename + "." + date;
- 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, "/");
- //System.out.println("from.toExternalForm()=" + from.toExternalForm());
- String fromSt = Utils.removeLastCh(from.toExternalForm(), '/');
- //System.out.println("fromSt=" + fromSt);
- if (path.startsWith("/")) {
- String fileSt = from.getFile();
- return new URL(fromSt.substring(0, fromSt.lastIndexOf(fileSt) - 1) + path);
- }
- return new URL(fromSt + "/" + path);
- }
-
- 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 f400e355f..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulator.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.provisional.configuratormanipulator;
-
-import java.io.File;
-import java.io.IOException;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-
-/**
- *
- * This interface provides methods that enable client bundles to
- * manipulate the corresponding ConfiguratorBundle.
- *
- * @see Configurator
- */
-
-public interface ConfiguratorManipulator {
- String SERVICE_PROP_KEY_CONFIGURATOR_BUNDLESYMBOLICNAME = "org.eclipse.equinox.configurator.BundleSymbolicName";
-
- /**
- * 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 11124551b..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";
-
- 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/BundleInfo.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundleInfo.java
deleted file mode 100644
index 48e8903e7..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundleInfo.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.provisional.frameworkadmin;
-
-import java.net.URI;
-import org.eclipse.core.runtime.URIUtil;
-
-/**
- * This object represents information of a bundle. This class is a copy of the BundleInfo
- * class in org.eclipse.equinox.simpleconfigurator
- *
- */
-public class BundleInfo {
- public static final int NO_LEVEL = -1;
- public static final int NO_BUNDLEID = -1;
-
- private String symbolicName = null;
- private String version = null;
- private URI baseLocation;
- private URI location;
- private long bundleId = NO_BUNDLEID;
-
- private boolean markedAsStarted = false;
- private int startLevel = NO_LEVEL;
- private boolean resolved = false;
-
- private String manifest;
- private String fragmentHost;
-
- public BundleInfo() {
- }
-
- public BundleInfo(URI location) {
- this.location = location;
- }
-
- public BundleInfo(URI location, boolean started) {
- this.location = location;
- this.markedAsStarted = started;
- }
-
- public BundleInfo(URI location, int startLevel) {
- this.location = location;
- this.startLevel = startLevel;
- }
-
- public BundleInfo(URI location, int startLevel, boolean started) {
- this.location = location;
- this.startLevel = startLevel;
- this.markedAsStarted = started;
- }
-
- public BundleInfo(URI location, int startLevel, boolean started, long bundleId) {
- this.location = location;
- this.startLevel = startLevel;
- this.markedAsStarted = started;
- this.bundleId = bundleId;
- }
-
- 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 long getBundleId() {
- return bundleId;
- }
-
- public URI getBaseLocation() {
- return baseLocation;
- }
-
- public URI getLocation() {
- return location;
- }
-
- public String getManifest() {
- return manifest;
- }
-
- public int getStartLevel() {
- return startLevel;
- }
-
- public String getSymbolicName() {
- return symbolicName;
- }
-
- public String getVersion() {
- return version;
- }
-
- public String getFragmentHost() {
- return fragmentHost;
- }
-
- public boolean isMarkedAsStarted() {
- return markedAsStarted;
- }
-
- public boolean isResolved() {
- return resolved;
- }
-
- public void setBundleId(long bundleId) {
- this.bundleId = bundleId;
- }
-
- public void setBaseLocation(URI baseLocation) {
- this.baseLocation = baseLocation;
- }
-
- public void setLocation(URI location) {
- this.location = location;
- }
-
- public void setManifest(String manifest) {
- this.manifest = manifest;
- }
-
- public void setMarkedAsStarted(boolean markedAsStarted) {
- this.markedAsStarted = markedAsStarted;
- }
-
- public void setResolved(boolean resolved) {
- this.resolved = resolved;
- }
-
- public void setStartLevel(int level) {
- this.startLevel = level;
- }
-
- public void setSymbolicName(String symbolicName) {
- this.symbolicName = symbolicName;
- }
-
- public void setVersion(String value) {
- this.version = value;
- }
-
- 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$
- if (version != null)
- buffer.append(version);
-
- if (fragmentHost != null) {
- buffer.append(", fragmentHost="); //$NON-NLA-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 == 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.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 971373bfc..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundlesState.java
+++ /dev/null
@@ -1,142 +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;
-
-/**
- * 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 {@value 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 {@value 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 {@value 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 {@value 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 {@value FwLauncherException#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 {@value 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 {@value 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 118a9113f..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java
+++ /dev/null
@@ -1,188 +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.*;
-
-/**
- * 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 {
-
- private 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;
- }
-
- 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();
- appendProperties(ret, 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 setProperties(Properties props) {
- properties.clear();
- appendProperties(properties, 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");
- for (Enumeration enumeration = props.keys(); enumeration.hasMoreElements();) {
- String key = (String) enumeration.nextElement();
- String value = props.getProperty(key);
- if (value == null || value.equals(""))
- continue;
- sb.append("\t{" + key + " ,\t" + value + "}\n");
- }
- } else
- sb.append("empty\n");
- }
-}
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 a14575094..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";
- String SERVICE_PROP_KEY_FW_VERSION = "org.eclipse.equinox.frameworkhandler.framework.version";
-
- String SERVICE_PROP_KEY_LAUNCHER_NAME = "org.eclipse.equinox.frameworkhandler.launcher.name";
- String SERVICE_PROP_KEY_LAUNCHER_VERSION = "org.eclipse.equinox.frameworkhandler.launcher.version";
- String SERVICE_PROP_KEY_RUNNING_SYSTEM_FLAG = "org.eclipse.equinox.frameworkhandler.runningfwflag";
-
- /**
- * 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 4a8bd51d9..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java
+++ /dev/null
@@ -1,253 +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("-"))
- 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;
- }
-
- 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");
- sb.append("fwName=" + this.fwName + "\n");
- sb.append("fwVersion=" + this.fwVersion + "\n");
- sb.append("launcherName=" + this.launcherName + "\n");
- sb.append("launcherVersion=" + this.launcherVersion + "\n");
-
- sb.append("jvm=" + this.jvm + "\n");
- if (this.jvmArgs.size() == 0)
- sb.append("jvmArgs = null\n");
- else {
- sb.append("jvmArgs=\n");
- int i = 0;
- for (Iterator iterator = jvmArgs.iterator(); iterator.hasNext(); iterator.next())
- sb.append("\tjvmArgs[" + i++ + "]=" + iterator + "\n");
-
- }
- if (this.programArgs.size() == 0)
- sb.append("programArgs = null\n");
- else {
- sb.append("programArgs=\n");
- int i = 0;
- for (Iterator iterator = programArgs.iterator(); iterator.hasNext(); iterator.next())
- sb.append("\tprogramArgs[" + i++ + "]=" + iterator + "\n");
- }
- sb.append("fwConfigLocation=" + this.fwConfigLocation + "\n");
- sb.append("fwJar=" + this.fwJar + "\n");
- sb.append("fwPersistentDataLocation=" + this.fwPersistentDataLocation + "\n");
- sb.append("home=" + this.home + "\n");
- sb.append("launcher=" + this.launcher + "\n");
- sb.append("launcherConfigLocation=" + this.launcherConfigLocation + "\n");
- sb.append("clean=" + this.isClean() + "\n");
-
- 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 303290b8e..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.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 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 7cdeb7319..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="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.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 d1e9ee398..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,342 +0,0 @@
-#Mon Nov 05 16:53:31 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.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 e0b0eaeab..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.artifact.optimizers;singleton:=true
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.artifact.optimizers.Activator
-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,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.internal.provisional.equinox.p2.jarprocessor,
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0"
-Bundle-ActivationPolicy: lazy
-Require-Bundle: org.eclipse.equinox.common,
- org.eclipse.equinox.p2.artifact.repository
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-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
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 48a852fb1..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/build.properties
+++ /dev/null
@@ -1,16 +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
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/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 ca7040f95..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/AbstractDeltaStep.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
- * 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.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-
-/**
- * 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(ProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
- super.initialize(descriptor, context);
- readArtifactKey(descriptor);
- }
-
- protected void readArtifactKey(ProcessingStepDescriptor 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/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 c6228cd7a..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/VersionlessArtifactKey.java
+++ /dev/null
@@ -1,40 +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.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-
-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 c66d2a8c2..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Application.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.artifact.optimizers.jardelta;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.Activator;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-
-/**
- * The optimizer <code>Application</code> for JBDiff based optimizations.
- */
-public class Application implements IApplication {
-
- 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 = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
- if (manager == null)
- // TODO log here
- return null;
- return manager.loadRepository(location, null);
- }
-
- public void stop() {
- // nothing to do yet
- }
-
- 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 099283bd5..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 baseEntries;
- private ArrayList additions;
- private ArrayList 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 (Iterator i = baseEntries.iterator(); i.hasNext();)
- writeEntry(result, new ZipEntry(((String) i.next()) + ".delete"), null, false);
- // write out the additions.
- for (Iterator i = additions.iterator(); i.hasNext();)
- writeEntry(result, (ZipEntry) i.next(), targetJar, false);
- // write out the changes.
- for (Iterator i = changes.iterator(); i.hasNext();)
- writeEntry(result, (ZipEntry) i.next(), 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();
- additions = new ArrayList();
- // start out assuming that all the base entries are being removed
- baseEntries = getEntries(baseJar);
- for (Enumeration e = targetJar.entries(); e.hasMoreElements();)
- check((ZipEntry) 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 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("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 f26de9b8e..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.internal.provisional.p2.artifact.repository.ArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-
-/**
- * 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 233f9be42..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Optimizer.java
+++ /dev/null
@@ -1,256 +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.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-
-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 ARTIFACT_DESCRIPTOR_VERSION_COMPARATOR = new ArtifactDescriptorVersionComparator();
- private static final Comparator 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 + ")");
- IArtifactKey[][] keys = getSortedRelatedArtifactKeys(repository.getArtifactKeys());
- 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.");
-
- }
-
- 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(IArtifactKey[] artifactKeys) {
- Map map = new HashMap();
- for (int i = 0; i < artifactKeys.length; i++) {
- IArtifactKey freeKey = getVersionlessKey(artifactKeys[i]);
- List values = (List) map.get(freeKey);
- if (values == null) {
- values = new ArrayList();
- map.put(freeKey, values);
- }
- values.add(artifactKeys[i]);
- }
- IArtifactKey[][] lists = new IArtifactKey[map.size()][];
- int i = 0;
- for (Iterator iterator = map.values().iterator(); iterator.hasNext();) {
- List artifactKeyList = (List) iterator.next();
- IArtifactKey[] relatedArtifactKeys = (IArtifactKey[]) 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 canonical, IArtifactKey[] relatedArtifactKeys) {
- System.out.println("Optimizing " + canonical);
-
- 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());
- String predecessorData = descriptors[i].getArtifactKey().toExternalForm();
- ArtifactDescriptor newDescriptor = new ArtifactDescriptor(canonical);
- ProcessingStepDescriptor patchStep = new ProcessingStepDescriptor(JAR_DELTA_PATCH_STEP, predecessorData, true);
- ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {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(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 completeDescriptors = new ArrayList(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 = (IArtifactDescriptor[]) 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 {
- public int compare(Object artifactDescriptor0, Object artifactDescriptor1) {
- return -1 * ((IArtifactDescriptor) artifactDescriptor0).getArtifactKey().getVersion().compareTo(((IArtifactDescriptor) artifactDescriptor1).getArtifactKey().getVersion());
- }
- }
-
- static final class ArtifactKeyVersionComparator implements Comparator {
- public int compare(Object artifactKey0, Object artifactKey1) {
- return -1 * ((IArtifactKey) artifactKey0).getVersion().compareTo(((IArtifactKey) 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 c5289ea13..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Application.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.artifact.optimizers.jbdiff;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.Activator;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-
-/**
- * The optimizer <code>Application</code> for JBDiff based optimizations.
- */
-public class Application implements IApplication {
-
- 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 = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
- if (manager == null)
- // TODO log here
- return null;
- return manager.loadRepository(location, null);
- }
-
- public void stop() {
- // nothing to do yet
- }
-
- 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 63fca12cf..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.internal.provisional.p2.artifact.repository.ArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-
-/**
- *
- */
-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 31ab41b60..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.internal.provisional.p2.artifact.repository.ArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-
-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 33b50566f..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Optimizer.java
+++ /dev/null
@@ -1,275 +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.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-
-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 ARTIFACT_DESCRIPTOR_VERSION_COMPARATOR = new ArtifactDescriptorVersionComparator();
- private static final Comparator 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 + ")");
- IArtifactKey[][] keys = getSortedRelatedArtifactKeys(repository.getArtifactKeys());
- 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(IArtifactKey[] artifactKeys) {
- Map map = new HashMap();
- for (int i = 0; i < artifactKeys.length; i++) {
- IArtifactKey freeKey = new VersionlessArtifactKey(artifactKeys[i]);
- List values = (List) map.get(freeKey);
- if (values == null) {
- values = new ArrayList();
- map.put(freeKey, values);
- }
- values.add(artifactKeys[i]);
- }
- IArtifactKey[][] lists = new IArtifactKey[map.size()][];
- int i = 0;
- for (Iterator iterator = map.values().iterator(); iterator.hasNext();) {
- List artifactKeyList = (List) iterator.next();
- IArtifactKey[] relatedArtifactKeys = (IArtifactKey[]) 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);
- ProcessingStepDescriptor patchStep = new ProcessingStepDescriptor(strategy, predecessorData, true);
- ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {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(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 completeDescriptors = new ArrayList(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 = (IArtifactDescriptor[]) 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 {
- public int compare(Object artifactDescriptor0, Object artifactDescriptor1) {
- return -1 * ((IArtifactDescriptor) artifactDescriptor0).getArtifactKey().getVersion().compareTo(((IArtifactDescriptor) artifactDescriptor1).getArtifactKey().getVersion());
- }
- }
-
- static final class ArtifactKeyVersionComparator implements Comparator {
- public int compare(Object artifactKey0, Object artifactKey1) {
- return -1 * ((IArtifactKey) artifactKey0).getVersion().compareTo(((IArtifactKey) 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 f6ddeb69f..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.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.internal.p2.artifact.optimizers.pack200;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.Activator;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-
-public class Application implements IApplication {
- //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 = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
- if (manager == null)
- // TODO log here
- return null;
- return manager.loadRepository(location, null);
- }
-
- public void stop() {
- //nothing to do
- }
-
- 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 e2fa5ac37..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Optimizer.java
+++ /dev/null
@@ -1,103 +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 org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.osgi.util.NLS;
-
-public class Optimizer {
- private static final String PACKED_FORMAT = "packed"; //$NON-NLS-1$
- private IArtifactRepository repository;
-
- public Optimizer(IArtifactRepository repository) {
- this.repository = repository;
- }
-
- public void run() {
- IArtifactKey[] keys = repository.getArtifactKeys();
- for (int i = 0; i < keys.length; i++) {
- IArtifactKey key = keys[i];
- 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);
- ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
- newDescriptor.setProcessingSteps(steps);
- newDescriptor.setProperty(IArtifactDescriptor.FORMAT, PACKED_FORMAT);
- 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 PACKED_FORMAT.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/.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 a4a5c3ecb..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-Localization: plugin
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Require-Bundle: org.eclipse.equinox.common,
- org.eclipse.equinox.p2.artifact.repository
-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.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.osgi.framework;version="1.4.0"
-Bundle-Vendor: %providerName
-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
-Bundle-Activator: org.eclipse.equinox.internal.p2.artifact.processors.Activator
-Bundle-ActivationPolicy: lazy
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/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 e4369e050..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java
+++ /dev/null
@@ -1,67 +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 org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
-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.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-
-/**
- * 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(ProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
- super.initialize(descriptor, context);
- if (!getStatus().isOK())
- return;
- fetchLocalArtifactRepository();
- }
-
- /**
- * Fetch a local artifact repository containing the fetched artifact key.
- */
- private void fetchLocalArtifactRepository() {
- if (repository != null)
- return;
- IArtifactRepositoryManager repoMgr = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
- 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 42dda53ab..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.internal.provisional.p2.artifact.repository.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 9ae9b2f92..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.internal.provisional.p2.artifact.repository.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 876a7e990..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.internal.provisional.p2.artifact.repository.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.artifact.repository/.classpath b/bundles/org.eclipse.equinox.p2.artifact.repository/.classpath
deleted file mode 100644
index ef379494d..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.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.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.artifact.repository/.cvsignore b/bundles/org.eclipse.equinox.p2.artifact.repository/.cvsignore
deleted file mode 100644
index 3101cbf46..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-bin
-bin_ant
-ant_tasks
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/.externalToolBuilders/org.eclipse.equinox.p2.artifact.repository buildAntTasks.xml.launch b/bundles/org.eclipse.equinox.p2.artifact.repository/.externalToolBuilders/org.eclipse.equinox.p2.artifact.repository buildAntTasks.xml.launch
deleted file mode 100644
index c2ad0a0ec..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/.externalToolBuilders/org.eclipse.equinox.p2.artifact.repository buildAntTasks.xml.launch
+++ /dev/null
@@ -1,18 +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.artifact.repository/buildAntTasks.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.artifact.repository"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.artifact.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.artifact.repository/.project b/bundles/org.eclipse.equinox.p2.artifact.repository/.project
deleted file mode 100644
index 529f56491..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/.project
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.artifact.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.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value>&lt;project&gt;/.externalToolBuilders/org.eclipse.equinox.p2.artifact.repository buildAntTasks.xml.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.artifact.repository/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index fc844dcb3..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,346 +0,0 @@
-#Tue Dec 09 10:24:31 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.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=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.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=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.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.artifact.repository/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 1546d829a..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/.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.artifact.repository/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 979e4e8b4..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=true
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF
deleted file mode 100644
index 47a52bd07..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,77 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.artifact.repository;singleton:=true
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.0.100.qualifier
-Export-Package: org.eclipse.equinox.internal.p2.artifact.mirror;x-internal:=true,
- org.eclipse.equinox.internal.p2.artifact.processing;x-friends:="org.eclipse.equinox.p2.artifact.processors,org.eclipse.equinox.p2.artifact.optimizers",
- org.eclipse.equinox.internal.p2.artifact.processors.md5;x-internal:=true,
- org.eclipse.equinox.internal.p2.artifact.processors.pack200;x-friends:="org.eclipse.equinox.p2.artifact.processors,org.eclipse.equinox.p2.artifact.optimizers",
- org.eclipse.equinox.internal.p2.artifact.repository;x-friends:="org.eclipse.equinox.p2.metadata.generator,org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.reconciler.dropins",
- org.eclipse.equinox.internal.p2.artifact.repository.simple;x-friends:="org.eclipse.equinox.p2.selfhosting,org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.equinox.p2.tests",
- org.eclipse.equinox.internal.provisional.p2.artifact.repository;
- x-friends:="org.eclipse.equinox.p2.artifact.optimizers,
- org.eclipse.equinox.p2.artifact.processors,
- org.eclipse.equinox.p2.director.app,
- org.eclipse.equinox.p2.directorywatcher,
- org.eclipse.equinox.p2.metadata.generator,
- org.eclipse.equinox.p2.updatesite,
- org.eclipse.equinox.p2.engine,
- org.eclipse.equinox.p2.touchpoint.eclipse,
- org.eclipse.equinox.p2.ui.admin,
- org.eclipse.equinox.p2.console,
- org.eclipse.equinox.p2.ui,
- org.eclipse.equinox.p2.ui.sdk,
- org.eclipse.equinox.p2.touchpoint.natives,
- org.eclipse.equinox.p2.extensionlocation,
- org.eclipse.equinox.p2.garbagecollector,
- org.eclipse.equinox.p2.reconciler.dropins,
- org.eclipse.equinox.p2.installer,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.pde.ui,
- org.eclipse.equinox.p2.repository.tools,
- org.eclipse.pde.core",
- org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing;
- x-friends:="org.eclipse.equinox.p2.artifact.processors,
- org.eclipse.equinox.p2.artifact.optimizers,
- org.eclipse.equinox.p2.artifact.repository,
- org.eclipse.equinox.p2.metadata.generator,
- org.eclipse.equinox.p2.ui,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.updatesite",
- org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository;
- x-friends:="org.eclipse.equinox.p2.touchpoint.eclipse,
- org.eclipse.equinox.p2.touchpoint.natives,
- org.eclipse.equinox.p2.extensionlocation,
- org.eclipse.equinox.p2.updatesite"
-Import-Package: javax.xml.parsers,
- org.eclipse.core.runtime.jobs,
- org.eclipse.equinox.app;version="1.0.0";resolution:=optional,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.jarprocessor,
- org.eclipse.equinox.internal.p2.metadata,
- 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,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.core.location,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.repository,
- org.eclipse.internal.provisional.equinox.p2.jarprocessor;resolution:=optional,
- org.eclipse.osgi.framework.log;version="1.0.0",
- org.eclipse.osgi.signedcontent;version="1.0.0",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.util.tracker;version="1.4.0",
- org.w3c.dom,
- org.xml.sax;resolution:=optional
-Bundle-Activator: org.eclipse.equinox.internal.p2.artifact.repository.Activator
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.equinox.registry
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/about.html b/bundles/org.eclipse.equinox.p2.artifact.repository/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.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.artifact.repository/build.properties b/bundles/org.eclipse.equinox.p2.artifact.repository/build.properties
deleted file mode 100644
index f00d7fb2b..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/build.properties
+++ /dev/null
@@ -1,25 +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/,\
- .,\
- plugin.xml,\
- about.html,\
- plugin.properties,\
- ant_tasks/artifactRepository-ant.jar
-src.includes = about.html,\
- schema/
-jars.extra.classpath = platform:/plugin/org.apache.ant/lib/ant.jar
-jars.compile.order = .,\
- ant_tasks/artifactRepository-ant.jar
-source.ant_tasks/artifactRepository-ant.jar = src_ant/
-output.ant_tasks/artifactRepository-ant.jar = bin_ant/
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/buildAntTasks.xml b/bundles/org.eclipse.equinox.p2.artifact.repository/buildAntTasks.xml
deleted file mode 100644
index 78fb71d9e..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/buildAntTasks.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="org.eclipse.equinox.p2.artifact.repository" 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/artifactRepository-ant.jar" failonerror="false"/>
- <jar destfile="${basedir}/ant_tasks/artifactRepository-ant.jar" basedir="${basedir}/bin_ant"/>
- </target>
-</project> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/plugin.properties b/bundles/org.eclipse.equinox.p2.artifact.repository/plugin.properties
deleted file mode 100644
index f33a49b79..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.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:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Equinox Provisioning Artifact Repository Support
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/plugin.xml b/bundles/org.eclipse.equinox.p2.artifact.repository/plugin.xml
deleted file mode 100644
index 4a2c12a20..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/plugin.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension-point id="artifactRepositories" name="Artifact Repositories" schema="schema/artifactRepositories.exsd"/>
- <extension-point id="processingSteps" name="Processing Steps" schema="schema/processingSteps.exsd"/>
- <extension-point id="artifactComparators" name="Artifact Comparators" schema="schema/artifactComparators.exsd"/>
-
- <extension
- point="org.eclipse.equinox.p2.artifact.repository.processingSteps"
- id="org.eclipse.equinox.p2.processing.Pack200Unpacker">
- <step class="org.eclipse.equinox.internal.p2.artifact.processors.pack200.Pack200ProcessorStep"/>
- </extension>
-
- <extension id="simpleRepository" point="org.eclipse.equinox.p2.artifact.repository.artifactRepositories">
- <filter suffix="artifacts.xml"/>
- <factory class="org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.SimpleArtifactRepositoryFactory"/>
- </extension>
-
- <extension id="compositeRepository" point="org.eclipse.equinox.p2.artifact.repository.artifactRepositories">
- <filter suffix="compositeArtifacts.xml"/>
- <factory class="org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepositoryFactory"/>
- </extension>
-
- <extension
- point="org.eclipse.equinox.p2.artifact.repository.processingSteps"
- id="org.eclipse.equinox.p2.processing.SignatureVerifier">
- <step class="org.eclipse.equinox.internal.p2.artifact.repository.SignatureVerifier"/>
- </extension>
-
- <extension id="mirrorApplication" point="org.eclipse.core.runtime.applications">
- <application cardinality="1" thread="main" visible="true">
- <run class="org.eclipse.equinox.internal.p2.artifact.mirror.MirrorApplication"/>
- </application>
- </extension>
-
- <extension
- point="org.eclipse.equinox.p2.artifact.repository.processingSteps"
- id="org.eclipse.equinox.p2.processing.MD5Verifier">
- <step class="org.eclipse.equinox.internal.p2.artifact.processors.md5.MD5Verifier"/>
- </extension>
-
- <extension point="org.eclipse.equinox.p2.artifact.repository.artifactComparators">
- <artifactComparator class="org.eclipse.equinox.internal.p2.artifact.processors.md5.MD5ArtifactComparator"
- id="org.eclipse.equinox.artifact.md5.comparator"/>
- </extension>
-
- <extension point="org.eclipse.ant.core.antTasks">
-
- <antTask
- library="ant_tasks/artifactRepository-ant.jar"
- name="p2.composite.artifact.repository.add"
- class="org.eclipse.equinox.internal.p2.artifact.repository.ant.AddChildTask">
- </antTask>
-
- <antTask
- library="ant_tasks/artifactRepository-ant.jar"
- name="p2.composite.artifact.repository.create"
- class="org.eclipse.equinox.internal.p2.artifact.repository.ant.CreateCompositeArtifactRepositoryTask">
- </antTask>
-
- <antTask
- library="ant_tasks/artifactRepository-ant.jar"
- name="p2.artifact.mirror"
- class="org.eclipse.equinox.internal.p2.artifact.repository.ant.MirrorApplicationTask">
- </antTask>
-
- <antTask
- library="ant_tasks/artifactRepository-ant.jar"
- name="p2.composite.artifact.repository.remove"
- class="org.eclipse.equinox.internal.p2.artifact.repository.ant.RemoveChildTask">
- </antTask>
-
- <antTask
- library="ant_tasks/artifactRepository-ant.jar"
- name="p2.composite.artifact.repository.validate"
- class="org.eclipse.equinox.internal.p2.artifact.repository.ant.ValidateTask">
- </antTask>
-
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/schema/artifactComparators.exsd b/bundles/org.eclipse.equinox.p2.artifact.repository/schema/artifactComparators.exsd
deleted file mode 100644
index a2295dfc6..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/schema/artifactComparators.exsd
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.equinox.p2.artifact.repository" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.equinox.p2.artifact.repository" id="artifactComparators" name="Artifact Comparators"/>
- </appinfo>
- <documentation>
- This extension point is used to provide IArtifactDescriptor verification capabilities
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="artifactComparator"/>
- </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="artifactComparator">
- <complexType>
- <attribute name="class" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <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.artifact.repository/schema/artifactRepositories.exsd b/bundles/org.eclipse.equinox.p2.artifact.repository/schema/artifactRepositories.exsd
deleted file mode 100644
index 003ec5970..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/schema/artifactRepositories.exsd
+++ /dev/null
@@ -1,128 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.equinox.p2.artifact.repository" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.equinox.p2.artifact.repository" id="artifactRepositories" name="Artifact Repositories"/>
- </appinfo>
- <documentation>
- This extension point is used to provide artifact repository implementations
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="factory"/>
- <element ref="filter" 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="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.artifact.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 a subclass of &lt;tt&gt;org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.ArtifactRepositoryFactory&lt;/tt&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- This bundle provides an artifact repository factory for the IArtifactRepositoryManager#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.artifact.repository/schema/processingSteps.exsd b/bundles/org.eclipse.equinox.p2.artifact.repository/schema/processingSteps.exsd
deleted file mode 100644
index 40786b891..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/schema/processingSteps.exsd
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.equinox.p2.artifact.repository" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.equinox.p2.artifact.repository" id="processingSteps" name="Processing Steps"/>
- </appinfo>
- <documentation>
- This extension point is used to provide processing step implementations
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="step"/>
- </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>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="step">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.equinox.p2.artifact.repository.processing.ProcessingStep:"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- org.eclipse.equinox.p2.artifact.repository ?.?.?
- </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.p2.artifact.repository.processing.ProcessingStep&lt;/tt&gt;
- </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 compeople AG 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.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/FileMirrorLog.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/FileMirrorLog.java
deleted file mode 100644
index a0602b4d2..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/FileMirrorLog.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.artifact.mirror;
-
-import java.io.*;
-import java.util.Date;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-
-public class FileMirrorLog implements IArtifactMirrorLog {
-
- private static final String INDENT = "\t"; //$NON-NLS-1$
- private static final String SEPARATOR = System.getProperty("line.separator"); //$NON-NLS-1$
- private BufferedWriter out;
- private boolean consoleMessage = false;
- private int minSeverity = IStatus.OK;
- private boolean hasRoot = false;
-
- public FileMirrorLog(String location, int minSeverity, String root) {
- this.minSeverity = minSeverity;
- try {
- File log = new File(location);
- if (log.getParentFile().exists() || log.getParentFile().mkdirs()) {
- out = new BufferedWriter(new FileWriter(log, true));
- if (root != null) {
- log(root + " - " + new Date()); //$NON-NLS-1$
- hasRoot = true;
- }
- } else
- throw new IOException(Messages.exception_unableToCreateParentDir);
- } catch (IOException e) {
- exceptionOccurred(null, e);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#log(org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor, org.eclipse.core.runtime.IStatus)
- */
- public void log(IArtifactDescriptor descriptor, IStatus status) {
- if (status.getSeverity() >= minSeverity) {
- log(descriptor.toString());
- log(status, INDENT);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#log(org.eclipse.core.runtime.IStatus)
- */
- public void log(IStatus status) {
- log(status, ""); //$NON-NLS-1$
- }
-
- /*
- * Write a status to the log, indenting it based on status depth.
- * @param status the status to log
- * @param depth the depth of the status
- */
- private void log(IStatus status, String prefix) {
- if (status.getSeverity() >= minSeverity) {
- // Write status to log
- log(prefix + status.getMessage());
-
- // Write exception to log if applicable
- String exceptionMessage = status.getException() != null ? status.getException().getMessage() : null;
- if (exceptionMessage != null)
- log(prefix + exceptionMessage);
-
- // Write the children of the status to the log
- IStatus[] nestedStatus = status.getChildren();
- if (nestedStatus != null)
- for (int i = 0; i < nestedStatus.length; i++)
- log(nestedStatus[i], prefix + INDENT);
- }
- }
-
- /*
- * Write a message to the log
- * @param message the message to write
- */
- private void log(String message) {
- try {
- out.write((hasRoot ? INDENT : "") + message + SEPARATOR); //$NON-NLS-1$
- } catch (IOException e) {
- exceptionOccurred((hasRoot ? INDENT : "") + message, e); //$NON-NLS-1$
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#close()
- */
- public void close() {
- try {
- if (out != null)
- out.close();
- } catch (IOException e) {
- exceptionOccurred(null, e);
- }
- }
-
- /*
- * Show an error message if this the first time, and print status messages.
- */
- private void exceptionOccurred(String message, Exception e) {
- if (!consoleMessage) {
- System.err.println(Messages.MirrorLog_Exception_Occurred);
- e.printStackTrace(System.err);
- System.err.println(Messages.MirrorLog_Console_Log);
- consoleMessage = true;
- }
- if (message != null)
- System.out.println(message);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/IArtifactMirrorLog.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/IArtifactMirrorLog.java
deleted file mode 100644
index 959a7a35d..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/IArtifactMirrorLog.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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.mirror;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-
-public interface IArtifactMirrorLog {
-
- // Log a status associated with a descriptor
- public void log(IArtifactDescriptor descriptor, IStatus status);
-
- // Log a status
- public void log(IStatus status);
-
- // Notify that logging is completed & cleanup resources
- public void close();
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/MirrorApplication.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/MirrorApplication.java
deleted file mode 100644
index 83983b520..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/MirrorApplication.java
+++ /dev/null
@@ -1,263 +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.artifact.mirror;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-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.p2.artifact.processors.md5.MD5ArtifactComparator;
-import org.eclipse.equinox.internal.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.osgi.framework.log.FrameworkLog;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * An application that performs mirroring of artifacts between repositories.
- */
-public class MirrorApplication implements IApplication {
-
- private URI sourceLocation;
- private URI destinationLocation;
- private URI baselineLocation;
- private IArtifactRepository source;
- private IArtifactRepository destination;
- private IArtifactRepository baseline;
- private boolean append = true;
- private boolean raw = false;
- private boolean failOnError = true;
- private boolean validate = false;
- private boolean verbose = false;
- private IArtifactRepositoryManager cachedManager;
- private boolean sourceLoaded = false;
- private boolean destinationLoaded = false;
- private boolean baselineLoaded = false;
- private boolean compare = false;
- private String comparatorID = MD5ArtifactComparator.MD5_COMPARATOR_ID; //use MD5 as default
- private String destinationName;
- private IArtifactMirrorLog mirrorLog;
- private IArtifactMirrorLog comparatorLog;
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext context) throws Exception {
- try {
- Map args = context.getArguments();
- initializeFromArguments((String[]) args.get(IApplicationContext.APPLICATION_ARGS));
- setupRepositories();
-
- Mirroring mirroring = new Mirroring(source, destination, raw);
- mirroring.setCompare(compare);
- mirroring.setComparatorId(comparatorID);
- mirroring.setBaseline(baseline);
- mirroring.setValidate(validate);
- if (comparatorLog != null)
- mirroring.setComparatorLog(comparatorLog);
-
- IStatus result = mirroring.run(failOnError, verbose);
- if (!result.isOK()) {
- //only noteworthy statuses should be resulted from mirroring.run
- if (result.matches(IStatus.INFO))
- System.err.println("Mirroring completed. Please check log file for more information."); //$NON-NLS-1$
- else
- System.err.println("Mirroring completed with warnings and/or errors. Please check log file for more information."); //$NON-NLS-1$
- log(result);
- }
- return IApplication.EXIT_OK;
- } catch (Exception e) {
- System.err.println(e.getMessage());
- throw e;
- } finally {
- cleanup();
- }
- }
-
- /*
- * Return the artifact repository manager. We need to check the service here
- * as well as creating one manually in case we are running a stand-alone application
- * in which no one has registered a manager yet.
- */
- private IArtifactRepositoryManager getManager() {
- if (cachedManager != null)
- return cachedManager;
- IArtifactRepositoryManager result = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
- // service not available... create one and hang onto it
- if (result == null) {
- cachedManager = new ArtifactRepositoryManager();
- result = cachedManager;
- }
- return result;
- }
-
- private void setupRepositories() throws ProvisionException {
- if (destinationLocation == null || sourceLocation == null)
- throw new IllegalStateException(Messages.exception_needSourceDestination);
-
- //Check if repositories are already loaded
- sourceLoaded = getManager().contains(sourceLocation);
- destinationLoaded = getManager().contains(destinationLocation);
-
- //must execute before initializeDestination is called
- source = getManager().loadRepository(sourceLocation, 0, null);
- destination = initializeDestination();
-
- if (baselineLocation != null) {
- baselineLoaded = getManager().contains(baselineLocation);
- try {
- baseline = getManager().loadRepository(baselineLocation, 0, null);
- } catch (ProvisionException e) {
- // catch the exception and log it. we will continue without doing a baseline comparison
- System.err.println("Error occurred while trying to load baseline repository.");
- e.printStackTrace();
- }
- }
- }
-
- private IArtifactRepository initializeDestination() throws ProvisionException {
- try {
- IArtifactRepository repository = getManager().loadRepository(destinationLocation, IRepositoryManager.REPOSITORY_HINT_MODIFIABLE, null);
- if (repository != null && repository.isModifiable()) {
- if (destinationName != null)
- repository.setName(destinationName);
- if (!append)
- repository.removeAll();
- return repository;
- }
- } catch (ProvisionException e) {
- //fall through and create a new repository below
- }
- //This code assumes source has been successfully loaded before this point
- //No existing repository; create a new repository at destinationLocation but with source's attributes.
- // TODO for now create a Simple repo by default.
- return (IArtifactRepository) RepositoryHelper.validDestinationRepository(getManager().createRepository(destinationLocation, destinationName == null ? source.getName() : destinationName, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, source.getProperties()));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
- public void stop() {
- // nothing to do
- }
-
- public void initializeFromArguments(String[] args) throws Exception {
- if (args == null)
- return;
-
- String comparatorLogLocation = null;
- String mirrorLogLocation = null;
-
- for (int i = 0; i < args.length; i++) {
- // check for args without parameters (i.e., a flag arg)
- if (args[i].equalsIgnoreCase("-raw")) //$NON-NLS-1$
- raw = true;
- if (args[i].equalsIgnoreCase("-ignoreErrors")) //$NON-NLS-1$
- failOnError = false;
- if (args[i].equalsIgnoreCase("-verbose")) //$NON-NLS-1$
- verbose = true;
- if (args[i].equalsIgnoreCase("-compare")) //$NON-NLS-1$
- compare = true;
- if (args[i].equalsIgnoreCase("-validate")) //$NON-NLS-1$
- validate = 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("-comparator")) //$NON-NLS-1$
- comparatorID = arg;
- if (args[i - 1].equalsIgnoreCase("-comparatorLog")) //$NON-NLS-1$
- comparatorLogLocation = arg;
- if (args[i - 1].equalsIgnoreCase("-destinationName")) //$NON-NLS-1$
- destinationName = arg;
- if (args[i - 1].equalsIgnoreCase("-writeMode")) //$NON-NLS-1$
- if (args[i].equalsIgnoreCase("clean")) //$NON-NLS-1$
- append = false;
- if (args[i - 1].equalsIgnoreCase("-log")) //$NON-NLS-1$
- mirrorLogLocation = arg;
-
- try {
- if (args[i - 1].equalsIgnoreCase("-source")) //$NON-NLS-1$
- sourceLocation = RepositoryHelper.localRepoURIHelper(URIUtil.fromString(arg));
- if (args[i - 1].equalsIgnoreCase("-destination")) //$NON-NLS-1$
- destinationLocation = RepositoryHelper.localRepoURIHelper(URIUtil.fromString(arg));
- if (args[i - 1].equalsIgnoreCase("-compareAgainst")) { //$NON-NLS-1$
- baselineLocation = RepositoryHelper.localRepoURIHelper(URIUtil.fromString(arg));
- compare = true;
- }
- } catch (URISyntaxException e) {
- throw new IllegalArgumentException(NLS.bind(Messages.exception_malformedRepoURI, arg));
- }
- }
- // Create logs
- if (mirrorLogLocation != null)
- mirrorLog = getLog(mirrorLogLocation, "p2.artifact.mirror"); //$NON-NLS-1$
- if (comparatorLogLocation != null && comparatorID != null)
- comparatorLog = getLog(comparatorLogLocation, comparatorID);
- }
-
- public void setLog(IArtifactMirrorLog log) {
- mirrorLog = log;
- }
-
- /*
- * Create a MirrorLog based on a filename
- */
- private IArtifactMirrorLog getLog(String location, String root) {
- if (location.toLowerCase().endsWith(".xml")) //$NON-NLS-1$
- return new XMLMirrorLog(location, verbose ? IStatus.INFO : IStatus.ERROR, root);
- return new FileMirrorLog(location, verbose ? IStatus.INFO : IStatus.ERROR, root);
- }
-
- /*
- * Log the result of mirroring
- */
- private void log(IStatus status) {
- if (mirrorLog == null) {
- FrameworkLog log = (FrameworkLog) ServiceHelper.getService(Activator.getContext(), FrameworkLog.class.getName());
- if (log != null)
- System.err.println("Log file location: " + log.getFile()); //$NON-NLS-1$
- LogHelper.log(status);
- } else
- mirrorLog.log(status);
- }
-
- /*
- * Cleanup
- */
- private void cleanup() {
- //if the repository was not already loaded before the mirror application started, close it.
- if (!sourceLoaded && sourceLocation != null)
- getManager().removeRepository(sourceLocation);
- if (!destinationLoaded && destinationLocation != null)
- getManager().removeRepository(destinationLocation);
- if (baselineLocation != null && !baselineLoaded)
- getManager().removeRepository(baselineLocation);
-
- // Close logs
- if (mirrorLog != null)
- mirrorLog.close();
- if (comparatorLog != null)
- comparatorLog.close();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/Mirroring.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/Mirroring.java
deleted file mode 100644
index 45573693b..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/Mirroring.java
+++ /dev/null
@@ -1,273 +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) - various ongoing maintenance
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.mirror;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * A utility class that performs mirroring of artifacts between repositories.
- */
-public class Mirroring {
- private IArtifactRepository source;
- private IArtifactRepository destination;
- private IArtifactRepository baseline;
- private boolean raw;
- private boolean compare = false;
- private boolean validate = false;
- private IArtifactComparator comparator;
- private String comparatorID;
- private IArtifactKey[] keysToMirror;
- private IArtifactMirrorLog comparatorLog;
-
- private IArtifactComparator getComparator() {
- if (comparator == null)
- comparator = ArtifactComparatorFactory.getArtifactComparator(comparatorID);
- return comparator;
- }
-
- public Mirroring(IArtifactRepository source, IArtifactRepository destination, boolean raw) {
- this.source = source;
- this.destination = destination;
- this.raw = raw;
- }
-
- public void setCompare(boolean compare) {
- this.compare = compare;
- }
-
- public void setComparatorId(String id) {
- this.comparatorID = id;
- }
-
- public void setComparatorLog(IArtifactMirrorLog comparatorLog) {
- this.comparatorLog = comparatorLog;
- }
-
- public void setBaseline(IArtifactRepository baseline) {
- this.baseline = baseline;
- }
-
- public void setValidate(boolean validate) {
- this.validate = validate;
- }
-
- public MultiStatus run(boolean failOnError, boolean verbose) {
- if (!destination.isModifiable())
- throw new IllegalStateException(NLS.bind(Messages.exception_destinationNotModifiable, destination.getLocation()));
- if (compare)
- getComparator(); //initialize the comparator. Only needed if we're comparing. Used to force error if comparatorID is invalid.
- IArtifactKey[] keys = keysToMirror == null ? source.getArtifactKeys() : keysToMirror;
- MultiStatus multiStatus = new MultiStatus(Activator.ID, IStatus.OK, Messages.message_mirroringStatus, null);
- for (int i = 0; i < keys.length; i++) {
- IArtifactKey key = keys[i];
- IArtifactDescriptor[] descriptors = source.getArtifactDescriptors(key);
- for (int j = 0; j < descriptors.length; j++) {
- IStatus result = mirror(descriptors[j], verbose);
- //Only log INFO and WARNING if we want verbose logging. Always log ERRORs
- if (!result.isOK() && (verbose || result.getSeverity() == IStatus.ERROR))
- multiStatus.add(result);
- //stop mirroring as soon as we have an error
- if (failOnError && multiStatus.getSeverity() == IStatus.ERROR)
- return multiStatus;
- }
- }
- if (validate) {
- // Simple validation of the mirror
- IStatus validation = validateMirror(verbose);
- if (!validation.isOK() && (verbose || validation.getSeverity() == IStatus.ERROR))
- multiStatus.add(validation);
- }
- return multiStatus;
- }
-
- private IStatus mirror(IArtifactDescriptor descriptor, boolean verbose) {
- IArtifactDescriptor newDescriptor = raw ? descriptor : new ArtifactDescriptor(descriptor);
-
- if (verbose)
- System.out.println("Mirroring: " + descriptor.getArtifactKey() + " (Descriptor: " + descriptor + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- if (compare && baseline != null)
- if (baseline.contains(descriptor)) {
- // we have to create an output stream based on the descriptor found in the baseline otherwise all
- // the properties will be copied over from the wrong descriptor and our repository will be inconsistent.
- IArtifactDescriptor baselineDescriptor = getBaselineDescriptor(descriptor);
-
- // if we found a descriptor in the baseline then we'll use it to copy the artifact
- if (baselineDescriptor != null) {
- MultiStatus status = new MultiStatus(Activator.ID, IStatus.OK, NLS.bind(Messages.Mirroring_compareAndDownload, descriptor), null);
- //Compare source against baseline
- IStatus comparison = getComparator().compare(baseline, baselineDescriptor, source, descriptor);
- if (comparatorLog != null)
- comparatorLog.log(baselineDescriptor, comparison);
- status.add(comparison);
- if (destination.contains(baselineDescriptor))
- return compareToDestination(baselineDescriptor);
-
- //download artifact from baseline
- status.add(downloadArtifact(baseline, baselineDescriptor, baselineDescriptor));
- return status;
- }
- }
-
- // Check if the destination already contains the file.
- if (destination.contains(newDescriptor)) {
- if (compare)
- return compareToDestination(descriptor);
- String message = NLS.bind(Messages.mirror_alreadyExists, descriptor, destination);
- return new Status(IStatus.INFO, Activator.ID, ProvisionException.ARTIFACT_EXISTS, message, null);
- }
-
- return downloadArtifact(source, newDescriptor, descriptor);
- }
-
- /**
- * Takes an IArtifactDescriptor descriptor and the ProvisionException that was thrown when destination.getOutputStream(descriptor)
- * and compares descriptor to the duplicate descriptor in the destination.
- *
- * Callers should verify the ProvisionException was thrown due to the artifact existing in the destination before invoking this method.
- * @param descriptor
- * @return the status of the compare
- */
- private IStatus compareToDestination(IArtifactDescriptor descriptor) {
- IArtifactDescriptor[] destDescriptors = destination.getArtifactDescriptors(descriptor.getArtifactKey());
- IArtifactDescriptor destDescriptor = null;
- for (int i = 0; destDescriptor == null && i < destDescriptors.length; i++) {
- if (destDescriptors[i].equals(descriptor))
- destDescriptor = destDescriptors[i];
- }
- if (destDescriptor == null)
- return new Status(IStatus.INFO, Activator.ID, ProvisionException.ARTIFACT_EXISTS, Messages.Mirroring_NO_MATCHING_DESCRIPTOR, null);
- return compare(source, descriptor, destination, destDescriptor);
- }
-
- private IStatus compare(IArtifactRepository sourceRepository, IArtifactDescriptor sourceDescriptor, IArtifactRepository destRepository, IArtifactDescriptor destDescriptor) {
- IStatus comparison = getComparator().compare(sourceRepository, sourceDescriptor, destRepository, destDescriptor);
- if (comparatorLog != null)
- comparatorLog.log(sourceDescriptor, comparison);
- return comparison;
- }
-
- /*
- * Create, and execute a MirrorRequest for a given descriptor.
- */
- private IStatus downloadArtifact(IArtifactRepository sourceRepo, IArtifactDescriptor destDescriptor, IArtifactDescriptor srcDescriptor) {
- RawMirrorRequest request = new RawMirrorRequest(srcDescriptor, destDescriptor, destination);
- request.setSourceRepository(sourceRepo);
-
- request.perform(new NullProgressMonitor());
-
- return request.getResult();
- }
-
- public void setArtifactKeys(IArtifactKey[] keys) {
- this.keysToMirror = keys;
- }
-
- /*
- * Get the equivalent descriptor from the baseline repository
- */
- private IArtifactDescriptor getBaselineDescriptor(IArtifactDescriptor descriptor) {
- IArtifactDescriptor[] baselineDescriptors = baseline.getArtifactDescriptors(descriptor.getArtifactKey());
- for (int i = 0; i < baselineDescriptors.length; i++) {
- if (baselineDescriptors[i].equals(descriptor))
- return baselineDescriptors[i];
- }
- return null;
- }
-
- /*
- * Simple validation of a mirror to see if all source descriptors are present in the destination
- */
- private IStatus validateMirror(boolean verbose) {
- MultiStatus status = new MultiStatus(Activator.ID, 0, Messages.Mirroring_ValidationError, null);
-
- // The keys that were mirrored in this session
- IArtifactKey[] keys = keysToMirror == null ? source.getArtifactKeys() : keysToMirror;
-
- for (int i = 0; i < keys.length; i++) {
- IArtifactDescriptor[] srcDescriptors = source.getArtifactDescriptors(keys[i]);
- IArtifactDescriptor[] destDescriptors = destination.getArtifactDescriptors(keys[i]);
-
- Arrays.sort(srcDescriptors, new ArtifactDescriptorComparator());
- Arrays.sort(destDescriptors, new ArtifactDescriptorComparator());
-
- int src = 0;
- int dest = 0;
- while (src < srcDescriptors.length && dest < destDescriptors.length) {
- if (!destDescriptors[dest].equals(srcDescriptors[src])) {
- if (destDescriptors[dest].toString().compareTo((srcDescriptors[src].toString())) > 0) {
- // Missing an artifact
- if (verbose)
- System.out.println(NLS.bind(Messages.Mirroring_MISSING_DESCRIPTOR, srcDescriptors[src]));
- status.add(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Mirroring_MISSING_DESCRIPTOR, srcDescriptors[src++])));
- } else {
- // Its okay if there are extra descriptors in the destination
- dest++;
- }
- } else {
- // check properties for differences
- Map destMap = destDescriptors[dest].getProperties();
- Map srcProperties = null;
- if (baseline != null) {
- IArtifactDescriptor baselineDescriptor = getBaselineDescriptor(destDescriptors[dest]);
- if (baselineDescriptor != null)
- srcProperties = baselineDescriptor.getProperties();
- }
- // Baseline not set, or could not find descriptor so we'll use the source descriptor
- if (srcProperties == null)
- srcProperties = srcDescriptors[src].getProperties();
-
- // Cycle through properties of the originating descriptor & compare
- for (Iterator iter = srcProperties.keySet().iterator(); iter.hasNext();) {
- String key = (String) iter.next();
- if (!srcProperties.get(key).equals(destMap.get(key))) {
- if (verbose)
- System.out.println(NLS.bind(Messages.Mirroring_DIFFERENT_DESCRIPTOR_PROPERTY, new Object[] {destDescriptors[dest], key, srcProperties.get(key), destMap.get(key)}));
- status.add(new Status(IStatus.WARNING, Activator.ID, NLS.bind(Messages.Mirroring_DIFFERENT_DESCRIPTOR_PROPERTY, new Object[] {destDescriptors[dest], key, srcProperties.get(key), destMap.get(key)})));
- }
- }
- src++;
- dest++;
- }
- }
-
- // If there are still source descriptors they're missing from the destination repository
- while (src < srcDescriptors.length) {
- if (verbose)
- System.out.println(NLS.bind(Messages.Mirroring_MISSING_DESCRIPTOR, srcDescriptors[src]));
- status.add(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Mirroring_MISSING_DESCRIPTOR, srcDescriptors[src++])));
- }
- }
-
- return status;
- }
-
- // Simple comparator for ArtifactDescriptors
- protected class ArtifactDescriptorComparator implements Comparator {
-
- public int compare(Object arg0, Object arg1) {
- if (arg0 != null && arg1 != null)
- return arg0.toString().compareTo(arg1.toString());
- else if (arg1 == null && arg0 == null)
- return 0;
- else if (arg1 == null)
- return 1;
- return -1;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/XMLMirrorLog.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/XMLMirrorLog.java
deleted file mode 100644
index 81e56d5da..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/XMLMirrorLog.java
+++ /dev/null
@@ -1,166 +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.artifact.mirror;
-
-import java.io.*;
-import java.util.Date;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
-import org.eclipse.equinox.internal.p2.persistence.XMLWriter;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-
-public class XMLMirrorLog implements IArtifactMirrorLog {
- private static final String DEFAULT_FORMAT = "canonical"; //$NON-NLS-1$
- // Constants used in XML tags
- private static final String LOG = "log"; //$NON-NLS-1$
- private static final String TIME_ATTRIBUTE = "time"; //$NON-NLS-1$
- private static final String DESCRIPTOR_ELEMENT = "descriptor"; //$NON-NLS-1$
- private static final String DESCRIPTOR_CLASSIFIER_ATTRIBUTE = "classifier"; //$NON-NLS-1$
- private static final String DESCRIPTOR_FORMAT_ATTRIBUTE = "format"; //$NON-NLS-1$
- private static final String DESCRIPTOR_ID_ATTRIBUTE = "id"; //$NON-NLS-1$
- private static final String DESCRIPTOR_VERSION_ATTRIBUTE = "version"; //$NON-NLS-1$
- private static final String STATUS_ELEMENT = "status"; //$NON-NLS-1$
- private static final String STATUS_SEVERITY_ATTRIBUTE = "severity"; //$NON-NLS-1$
- private static final String STATUS_MESSAGE_ATTRIBUTE = "message"; //$NON-NLS-1$
-
- private int minStatus = IStatus.OK;
- private XMLWriter writer;
- private OutputStream outputStream;
- private boolean consoleMessage = false;
-
- public XMLMirrorLog(String location, int minStatus, String root) {
- this.minStatus = minStatus;
-
- try {
- outputStream = new FileOutputStream(location);
- writer = new XMLWriter(outputStream, null);
- if (root != null)
- writer.start(root.toLowerCase());
- else
- writer.start(LOG);
- writer.attribute(TIME_ATTRIBUTE, new Date());
- } catch (UnsupportedEncodingException e) {
- exceptionOccurred(e);
- } catch (FileNotFoundException e) {
- exceptionOccurred(e);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#log(org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor, org.eclipse.core.runtime.IStatus)
- */
- public void log(IArtifactDescriptor descriptor, IStatus status) {
- if (status.getSeverity() < minStatus)
- return;
- // Start descriptor tag
- if (writer != null) {
- writer.start(DESCRIPTOR_ELEMENT);
- writer.attribute(DESCRIPTOR_ID_ATTRIBUTE, descriptor.getArtifactKey().getId());
- writer.attribute(DESCRIPTOR_CLASSIFIER_ATTRIBUTE, descriptor.getArtifactKey().getClassifier());
- writer.attribute(DESCRIPTOR_VERSION_ATTRIBUTE, descriptor.getArtifactKey().getVersion());
- if (descriptor.getProperties().get(IArtifactDescriptor.FORMAT) != null)
- writer.attribute(DESCRIPTOR_FORMAT_ATTRIBUTE, descriptor.getProperties().get(IArtifactDescriptor.FORMAT));
- else
- writer.attribute(DESCRIPTOR_FORMAT_ATTRIBUTE, DEFAULT_FORMAT);
- } else
- // Creation of the XML writer failed, dump results to the console
- System.out.println(descriptor);
-
- log(status);
-
- // Close descriptor tag
- if (writer != null)
- writer.end();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#log(org.eclipse.core.runtime.IStatus)
- */
- public void log(IStatus status) {
- if (status.getSeverity() < minStatus)
- return;
-
- if (writer != null) {
- // Start status tag
- writer.start(STATUS_ELEMENT);
- // Set severity attribute
- switch (status.getSeverity()) {
- case IStatus.OK :
- writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "OK"); //$NON-NLS-1$
- break;
- case IStatus.INFO :
- writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "INFO"); //$NON-NLS-1$
- break;
- case IStatus.WARNING :
- writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "WARNING"); //$NON-NLS-1$
- break;
- case IStatus.ERROR :
- writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "ERROR"); //$NON-NLS-1$
- break;
- case IStatus.CANCEL :
- writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "CANCEL"); //$NON-NLS-1$
- break;
- default :
- writer.attribute(STATUS_SEVERITY_ATTRIBUTE, status.getSeverity());
- }
- // Set message attribute
- writer.attribute(STATUS_MESSAGE_ATTRIBUTE, status.getMessage());
- } else
- // Creation of the XML writer failed, dump results to the console
- System.out.println(status);
-
- // Log children statuses
- IStatus[] nestedStatus = status.getChildren();
- if (nestedStatus != null)
- for (int i = 0; i < nestedStatus.length; i++)
- log(nestedStatus[i]);
-
- // Close status tag
- if (writer != null)
- writer.end();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#close()
- */
- public void close() {
- try {
- if (writer != null) {
- // Close opening tag & flush results
- writer.end();
- writer.flush();
- }
- } finally {
- if (outputStream != null)
- try {
- // Close output stream
- outputStream.close();
- } catch (IOException e) {
- exceptionOccurred(e);
- }
- }
- }
-
- /*
- * Show an error message if this the first time
- */
- private void exceptionOccurred(Exception e) {
- if (!consoleMessage) {
- System.err.println(Messages.MirrorLog_Exception_Occurred);
- e.printStackTrace(System.err);
- System.err.println(Messages.MirrorLog_Console_Log);
- consoleMessage = true;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processing/AbstractBufferingStep.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processing/AbstractBufferingStep.java
deleted file mode 100644
index 17e7b4138..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processing/AbstractBufferingStep.java
+++ /dev/null
@@ -1,104 +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.processing;
-
-import java.io.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.osgi.util.NLS;
-
-public abstract class AbstractBufferingStep extends ProcessingStep {
- private static final String WORK_DIR_PREFIX = "work"; //$NON-NLS-1$
- private static final String WORK_DIR_SUFFIX = ""; //$NON-NLS-1$
- protected static final String JAR_SUFFIX = ".jar"; //$NON-NLS-1$
- protected static final String INCOMING_ROOT = "p2.optimizers.incoming"; //$NON-NLS-1$
- protected static final String RESULT_ROOT = "p2.optimizers.result"; //$NON-NLS-1$
- protected static final String PREDECESSOR_ROOT = "p2.optimizers.predecessor"; //$NON-NLS-1$
-
- protected OutputStream incomingStream;
- private File workDir;
-
- protected AbstractBufferingStep() {
- super();
- }
-
- public void write(int b) throws IOException {
- OutputStream stream = getOutputStream();
- stream.write(b);
- }
-
- protected OutputStream getOutputStream() throws IOException {
- if (incomingStream != null)
- return incomingStream;
- // if buffering, store input stream in temporary file
- incomingStream = createIncomingStream();
- return incomingStream;
- }
-
- protected abstract OutputStream createIncomingStream() throws IOException;
-
- public void close() throws IOException {
- // When we go to close we must have seen all the content we are going to see.
- // If no one wrote to the temp stream then we return an error. If there is
- // content then close the temporary stream and perform the processing.
- // Performing the step should result in the new content being written to
- // the destination. Make sure we delete the temporary file if any.
- try {
- if (incomingStream != null) {
- incomingStream.close();
- // if canceled then skip processing
- if (getStatus() != null && getStatus().getSeverity() != IStatus.CANCEL)
- performProcessing();
- } else {
- setStatus(new Status(IStatus.ERROR, Activator.ID, Messages.Empty_stream));
- }
- } finally {
- incomingStream = null;
- cleanupTempFiles();
- cleanupWorkDir();
- }
-
- super.close();
- // TODO need to get real status here. sometimes the optimizers do not give
- // any reasonable return status
- // COMMENT status is initially set to OK!
- }
-
- protected abstract void performProcessing() throws IOException;
-
- protected void cleanupTempFiles() {
- }
-
- private void cleanupWorkDir() throws IOException {
- if (workDir != null) {
- FileUtils.deleteAll(workDir);
- // TODO try twice since there seems to be some cases where the dir is not
- // deleted the first time. At least on Windows...
- FileUtils.deleteAll(workDir);
- }
- }
-
- protected File getWorkDir() throws IOException {
- if (workDir != null)
- return workDir;
- workDir = File.createTempFile(WORK_DIR_PREFIX, WORK_DIR_SUFFIX);
- if (!workDir.delete())
- throw new IOException(NLS.bind(Messages.Can_not_delete_temp_dir, workDir));
- if (!workDir.mkdirs())
- throw new IOException(NLS.bind(Messages.Can_not_create_temp_dir, workDir));
- return workDir;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processing/Messages.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processing/Messages.java
deleted file mode 100644
index 52285b00f..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processing/Messages.java
+++ /dev/null
@@ -1,27 +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.processing;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.artifact.processing.messages"; //$NON-NLS-1$
-
- public static String Can_not_create_temp_dir;
- public static String Can_not_delete_temp_dir;
- public static String Empty_stream;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processing/messages.properties b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processing/messages.properties
deleted file mode 100644
index b95da029f..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processing/messages.properties
+++ /dev/null
@@ -1,13 +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
-###############################################################################
-Can_not_create_temp_dir=Cannot create temporary working directory {0}.
-Can_not_delete_temp_dir=Cannot create temporary working directory {1}.
-Empty_stream=Empty intermediate incoming stream. Probably zero length input.
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5ArtifactComparator.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5ArtifactComparator.java
deleted file mode 100644
index 52c61ad02..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5ArtifactComparator.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.artifact.processors.md5;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.osgi.util.NLS;
-
-public class MD5ArtifactComparator implements IArtifactComparator {
-
- public static String MD5_COMPARATOR_ID = "org.eclipse.equinox.artifact.md5.comparator"; //$NON-NLS-1$
-
- public IStatus compare(IArtifactRepository source, IArtifactDescriptor sourceDescriptor, IArtifactRepository destination, IArtifactDescriptor destDescriptor) {
- String sourceMD5 = sourceDescriptor.getProperty(IArtifactDescriptor.DOWNLOAD_MD5);
- String destMD5 = destDescriptor.getProperty(IArtifactDescriptor.DOWNLOAD_MD5);
-
- if (sourceMD5 == null && destMD5 == null)
- return new Status(IStatus.INFO, Activator.ID, NLS.bind(Messages.info_noMD5Infomation, sourceDescriptor));
-
- if (sourceMD5 == null)
- return new Status(IStatus.INFO, Activator.ID, NLS.bind(Messages.info_noMD5InRepository, source, sourceDescriptor));
-
- if (destMD5 == null)
- return new Status(IStatus.INFO, Activator.ID, NLS.bind(Messages.info_noMD5InRepository, destination, destDescriptor));
-
- if (sourceMD5.equals(destMD5))
- return Status.OK_STATUS;
-
- return new Status(IStatus.WARNING, Activator.ID, NLS.bind(Messages.warning_differentMD5, new Object[] {URIUtil.toUnencodedString(sourceDescriptor.getRepository().getLocation()), URIUtil.toUnencodedString(destDescriptor.getRepository().getLocation()), sourceDescriptor}));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java
deleted file mode 100644
index 3e102c43f..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.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
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.processors.md5;
-
-import java.io.IOException;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.osgi.util.NLS;
-
-public class MD5Verifier extends ProcessingStep {
-
- protected String expectedMD5;
- private MessageDigest md5;
-
- public MD5Verifier() {
- super();
- }
-
- public MD5Verifier(String expected) {
- super();
- this.expectedMD5 = expected;
- basicInitialize(null);
- }
-
- //This handle the case where the MD5 verification is initiated by a processing step
- public void initialize(ProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
- super.initialize(descriptor, context);
- String data = descriptor.getData();
- if (IArtifactDescriptor.DOWNLOAD_MD5.equals(data))
- expectedMD5 = context.getProperty(IArtifactDescriptor.DOWNLOAD_MD5);
- else if (IArtifactDescriptor.ARTIFACT_MD5.equals(data))
- expectedMD5 = context.getProperty(IArtifactDescriptor.ARTIFACT_MD5);
- else
- expectedMD5 = data;
- basicInitialize(descriptor);
- }
-
- private void basicInitialize(ProcessingStepDescriptor descriptor) {
- int code = (descriptor == null) ? IStatus.ERROR : descriptor.isRequired() ? IStatus.ERROR : IStatus.INFO;
- if (expectedMD5 == null || expectedMD5.length() != 32)
- setStatus(new Status(code, Activator.ID, NLS.bind(Messages.Error_invalid_hash, expectedMD5)));
- try {
- md5 = MessageDigest.getInstance("MD5"); //$NON-NLS-1$
- } catch (NoSuchAlgorithmException e) {
- setStatus(new Status(code, Activator.ID, Messages.Error_MD5_unavailable, e));
- }
- }
-
- public void write(int b) throws IOException {
- md5.update((byte) b);
- getDestination().write(b);
- }
-
- public void close() throws IOException {
- byte[] digest = md5.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));
- }
-
- // if the hashes don't line up set the status to error.
- if (!buf.toString().equals(expectedMD5))
- setStatus(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Error_unexpected_hash, expectedMD5, buf)));
- super.close();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/Messages.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/Messages.java
deleted file mode 100644
index b7e113cab..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/Messages.java
+++ /dev/null
@@ -1,34 +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.processors.md5;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.artifact.processors.md5.messages"; //$NON-NLS-1$
-
- public static String Error_invalid_hash;
- public static String Error_MD5_unavailable;
- public static String Error_unexpected_hash;
- public static String info_noMD5Infomation;
- public static String info_noMD5InRepository;
- public static String warning_differentMD5;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- //empty
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/messages.properties b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/messages.properties
deleted file mode 100644
index 736b651ea..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/messages.properties
+++ /dev/null
@@ -1,19 +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_invalid_hash=MD5 value not available or incorrect size, {0}.
-Error_MD5_unavailable=Could not create MD5 algorithm.
-Error_unexpected_hash=MD5 hash is not as expected. Expected: {0} and found {1}.
-
-info_noMD5Infomation=No MD5 information available for the artifact [{0}].
-info_noMD5InRepository=The repository {0} does not contain MD5 information for artifact [{1}].
-
-warning_differentMD5=The repositories {0} and {1} have different MD5 sums for the artifact [{2}]. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java
deleted file mode 100644
index 7ba8e6387..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java
+++ /dev/null
@@ -1,79 +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.pack200;
-
-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.artifact.repository.Activator;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.jarprocessor.UnpackStep;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor.Options;
-
-/**
- * The Pack200Unpacker expects an input containing ".jar.pack.gz" data.
- */
-public class Pack200ProcessorStep extends AbstractBufferingStep {
- public static final String PACKED_SUFFIX = ".pack.gz"; //$NON-NLS-1$
-
- private File incoming;
-
- protected OutputStream createIncomingStream() throws IOException {
- incoming = File.createTempFile(INCOMING_ROOT, JAR_SUFFIX + PACKED_SUFFIX);
- return new BufferedOutputStream(new FileOutputStream(incoming));
- }
-
- public void initialize(ProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
- super.initialize(descriptor, context);
- if (!UnpackStep.canUnpack())
- setStatus(new Status(IStatus.ERROR, Activator.ID, "Unpack facility not configured")); //$NON-NLS-1$
- }
-
- protected void cleanupTempFiles() {
- super.cleanupTempFiles();
- if (incoming != null)
- incoming.delete();
- }
-
- protected void performProcessing() throws IOException {
- File resultFile = null;
- try {
- resultFile = process();
- // now write the processed 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, "Unpacking fails because intermediate file is empty: " + resultFile)); //$NON-NLS-1$
- }
- } finally {
- if (resultFile != null)
- resultFile.delete();
- }
- }
-
- protected File process() throws IOException {
- Options options = new Options();
- options.unpack = 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 = false;
- new JarProcessorExecutor().runJarProcessor(options);
- return new File(getWorkDir(), incoming.getName().substring(0, incoming.getName().length() - PACKED_SUFFIX.length()));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Activator.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Activator.java
deleted file mode 100644
index ee7fcd4a3..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Activator.java
+++ /dev/null
@@ -1,72 +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.repository;
-
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.osgi.framework.*;
-import org.osgi.util.tracker.ServiceTracker;
-import org.osgi.util.tracker.ServiceTrackerCustomizer;
-
-public class Activator implements BundleActivator, ServiceTrackerCustomizer {
- public static final String ID = "org.eclipse.equinox.p2.artifact.repository"; //$NON-NLS-1$
- public static final String REPO_PROVIDER_XPT = ID + '.' + "artifactRepositories"; //$NON-NLS-1$
-
- private static BundleContext context;
- private ServiceRegistration repositoryManagerRegistration;
- private ArtifactRepositoryManager repositoryManager;
- private ServiceTracker busTracker;
-
- public static BundleContext getContext() {
- return Activator.context;
- }
-
- public void start(BundleContext aContext) throws Exception {
- Activator.context = aContext;
- repositoryManager = new ArtifactRepositoryManager();
- repositoryManagerRegistration = aContext.registerService(IArtifactRepositoryManager.class.getName(), repositoryManager, null);
-
- // need to track event bus coming and going to make sure cache gets cleaned on
- // repository removals
- busTracker = new ServiceTracker(context, IProvisioningEventBus.SERVICE_NAME, this);
- busTracker.open();
- }
-
- public void stop(BundleContext aContext) throws Exception {
- Activator.context = null;
- if (repositoryManagerRegistration != null)
- repositoryManagerRegistration.unregister();
- repositoryManagerRegistration = null;
- if (repositoryManager != null) {
- repositoryManager.shutdown();
- repositoryManager = null;
- }
- busTracker.close();
- }
-
- public Object addingService(ServiceReference reference) {
- IProvisioningEventBus bus = (IProvisioningEventBus) context.getService(reference);
- if (repositoryManager != null)
- repositoryManager.setEventBus(bus);
- return bus;
- }
-
- public void modifiedService(ServiceReference reference, Object service) {
- // ignored
-
- }
-
- public void removedService(ServiceReference reference, Object service) {
- if (repositoryManager != null)
- repositoryManager.unsetEventBus((IProvisioningEventBus) service);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryManager.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryManager.java
deleted file mode 100644
index 46811e78f..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryManager.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
- * Genuitec LLC - various bug fixes
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository;
-
-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.ServiceHelper;
-import org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.location.AgentLocation;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.ArtifactRepositoryFactory;
-
-/**
- * Default implementation of {@link IArtifactRepositoryManager}.
- *
- * TODO the current assumption that the "location" is the dir/root limits us to
- * having just one repository in a given URL..
- */
-public class ArtifactRepositoryManager extends AbstractRepositoryManager implements IArtifactRepositoryManager {
-
- public ArtifactRepositoryManager() {
- super();
- }
-
- public void addRepository(IArtifactRepository repository) {
- super.addRepository(repository, true, null);
- }
-
- public IArtifactRequest createMirrorRequest(IArtifactKey key, IArtifactRepository destination, Properties destinationDescriptorProperties, Properties destinationRepositoryProperties) {
- return new MirrorRequest(key, destination, destinationDescriptorProperties, destinationRepositoryProperties);
- }
-
- public IArtifactRepository createRepository(URI location, String name, String type, Map properties) throws ProvisionException {
- return (IArtifactRepository) doCreateRepository(location, name, type, properties);
- }
-
- protected IRepository factoryCreate(URI location, String name, String type, Map properties, IExtension extension) throws ProvisionException {
- ArtifactRepositoryFactory factory = (ArtifactRepositoryFactory) createExecutableExtension(extension, EL_FACTORY);
- if (factory == null)
- return null;
- return factory.create(location, name, type, properties);
- }
-
- protected IRepository factoryLoad(URI location, IExtension extension, int flags, SubMonitor monitor) throws ProvisionException {
- ArtifactRepositoryFactory factory = (ArtifactRepositoryFactory) createExecutableExtension(extension, EL_FACTORY);
- if (factory == null)
- return null;
- return factory.load(location, flags, monitor.newChild(10));
- }
-
- protected String getBundleId() {
- return Activator.ID;
- }
-
- protected String getDefaultSuffix() {
- return "artifacts.xml"; //$NON-NLS-1$
- }
-
- protected String getRepositoryProviderExtensionPointId() {
- return Activator.REPO_PROVIDER_XPT;
- }
-
- /**
- * Restores metadata repositories specified as system properties.
- */
- protected String getRepositorySystemProperty() {
- return "eclipse.p2.artifactRepository"; //$NON-NLS-1$
- }
-
- protected int getRepositoryType() {
- return IRepository.TYPE_ARTIFACT;
- }
-
- public IArtifactRepository loadRepository(URI location, IProgressMonitor monitor) throws ProvisionException {
- return loadRepository(location, 0, monitor);
- }
-
- public IArtifactRepository loadRepository(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
- return (IArtifactRepository) loadRepository(location, monitor, null, flags);
- }
-
- public IArtifactRepository refreshRepository(URI location, IProgressMonitor monitor) throws ProvisionException {
- return (IArtifactRepository) basicRefreshRepository(location, monitor);
- }
-
- /**
- * Restore the download cache
- */
- protected void restoreSpecialRepositories() {
- // TODO while recreating, we may want to have proxies on repo instead of the real repo object to limit what is activated.
- AgentLocation location = (AgentLocation) ServiceHelper.getService(Activator.getContext(), AgentLocation.class.getName());
- if (location == null)
- // TODO should do something here since we are failing to restore.
- return;
- try {
- loadRepository(location.getArtifactRepositoryURI(), null);
- return;
- } catch (ProvisionException e) {
- // log but still continue and try to create a new one
- if (e.getStatus().getCode() != ProvisionException.REPOSITORY_NOT_FOUND)
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error occurred while loading download cache.", e)); //$NON-NLS-1$
- }
- try {
- Map properties = new HashMap(1);
- properties.put(IRepository.PROP_SYSTEM, Boolean.TRUE.toString());
- createRepository(location.getArtifactRepositoryURI(), "download cache", TYPE_SIMPLE_REPOSITORY, properties); //$NON-NLS-1$
- } catch (ProvisionException e) {
- LogHelper.log(e);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRequest.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRequest.java
deleted file mode 100644
index 352daa6d1..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRequest.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.internal.p2.artifact.repository;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-
-/**
- * Base class for all requests on an {@link IArtifactRepository}.
- */
-public abstract class ArtifactRequest implements IArtifactRequest {
- private static final Status DEFAULT_STATUS = new Status(IStatus.ERROR, Activator.ID, "default"); //$NON-NLS-1$
- protected IArtifactKey artifact;
- protected String resolvedKey;
- protected IArtifactRepository source;
- protected IStatus result = DEFAULT_STATUS;
-
- public ArtifactRequest(IArtifactKey key) {
- artifact = key;
- // TODO do we need to make this configurable? for now set default request handler to ECF
- }
-
- public IArtifactKey getArtifactKey() {
- return artifact;
- }
-
- /**
- * Returns the result of the previous call to {@link #perform(IProgressMonitor)},
- * or <code>null</code> if perform has never been called.
- *
- * @return The result of the previous perform call.
- */
- public IStatus getResult() {
- if (result == DEFAULT_STATUS)
- return new Status(IStatus.ERROR, Activator.ID, "No repository found containing: " + getArtifactKey().toString());
-
- return result;
- }
-
- protected IArtifactRepository getSourceRepository() {
- return source;
- }
-
- /**
- * Performs the artifact request, and sets the result status.
- *
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- */
- abstract public void perform(IProgressMonitor monitor);
-
- /**
- * Sets the result of an invocation of {@link #perform(IProgressMonitor)}.
- * This method is called by subclasses to set the result status for
- * this request.
- *
- * @param value The result status
- */
- protected void setResult(IStatus value) {
- result = value;
- }
-
- public void setSourceRepository(IArtifactRepository value) {
- source = value;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
deleted file mode 100644
index 411fc37f7..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
+++ /dev/null
@@ -1,520 +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.artifact.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.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.persistence.CompositeRepositoryIO;
-import org.eclipse.equinox.internal.p2.persistence.CompositeRepositoryState;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.repository.ICompositeRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.AbstractArtifactRepository;
-import org.eclipse.osgi.util.NLS;
-
-public class CompositeArtifactRepository extends AbstractArtifactRepository implements IArtifactRepository, ICompositeRepository {
-
- static final public String REPOSITORY_TYPE = CompositeArtifactRepository.class.getName();
- static final private Integer REPOSITORY_VERSION = new Integer(1);
- static final public String XML_EXTENSION = ".xml"; //$NON-NLS-1$
- static final public String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
- static final public String CONTENT_FILENAME = "compositeArtifacts"; //$NON-NLS-1$
- public static final String PI_REPOSITORY_TYPE = "compositeArtifactRepository"; //$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 childrenURIs = new ArrayList();
- // keep a list of the repositories that we have successfully loaded
- private List loadedRepos = new ArrayList();
-
- /**
- * Create a Composite repository in memory.
- * @return the repository or null if unable to create one
- */
- public static CompositeArtifactRepository createMemoryComposite() {
- IArtifactRepositoryManager manager = getManager();
- if (manager == null)
- return null;
- try {
- //create a unique URI
- long time = System.currentTimeMillis();
- URI repositoryURI = new URI("memory:" + String.valueOf(time)); //$NON-NLS-1$
- while (manager.contains(repositoryURI))
- repositoryURI = new URI("memory:" + String.valueOf(++time)); //$NON-NLS-1$
-
- CompositeArtifactRepository result = (CompositeArtifactRepository) manager.createRepository(repositoryURI, repositoryURI.toString(), IArtifactRepositoryManager.TYPE_COMPOSITE_REPOSITORY, null);
- manager.removeRepository(repositoryURI);
- return result;
- } catch (ProvisionException e) {
- LogHelper.log(e);
- // just return null
- } catch (URISyntaxException e) {
- // just return null
- }
- return null;
- }
-
- static private IArtifactRepositoryManager getManager() {
- return (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
- }
-
- /*
- * This is only called by the parser when loading a repository.
- */
- public CompositeArtifactRepository(CompositeRepositoryState state) {
- super(state.getName(), state.getType(), state.getVersion(), state.getLocation(), state.getDescription(), state.getProvider(), state.getProperties());
- for (int i = 0; i < state.getChildren().length; i++)
- addChild(state.getChildren()[i], false);
- }
-
- public CompositeArtifactRepository(URI location, String repositoryName, Map properties) {
- super(repositoryName, REPOSITORY_TYPE, REPOSITORY_VERSION.toString(), location, null, null, properties);
- save();
- }
-
- /*
- * 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((URI[]) childrenURIs.toArray(new URI[childrenURIs.size()]));
- return result;
- }
-
- /*
- * Add the given object to the specified list if it doesn't already exist
- * in it. Return a boolean value indicating whether or not the object was
- * actually added.
- */
- private static boolean add(List list, Object obj) {
- return list.contains(obj) ? false : list.add(obj);
- }
-
- public static URI getActualLocation(URI base, boolean compress) {
- return getActualLocation(base, compress ? JAR_EXTENSION : XML_EXTENSION);
- }
-
- private static URI getActualLocation(URI base, String extension) {
- final String name = CONTENT_FILENAME + extension;
- String spec = base.toString();
- if (spec.endsWith(name))
- return base;
- if (spec.endsWith("/")) //$NON-NLS-1$
- spec += name;
- else
- spec += "/" + name; //$NON-NLS-1$
- try {
- return new URI(spec);
- } catch (URISyntaxException e) {
- return null;
- }
- }
-
- private boolean isLocal() {
- return "file".equalsIgnoreCase(location.getScheme()); //$NON-NLS-1$
- }
-
- public boolean isModifiable() {
- return isLocal();
- }
-
- public void addChild(URI childURI) {
- addChild(childURI, true);
- }
-
- private void addChild(URI childURI, boolean save) {
- URI absolute = URIUtil.makeAbsolute(childURI, location);
- if (childrenURIs.contains(childURI) || childrenURIs.contains(absolute))
- return;
- childrenURIs.add(childURI);
- if (save)
- save();
- try {
- IArtifactRepository repo = load(childURI);
- loadedRepos.add(new ChildInfo(repo));
- } catch (ProvisionException e) {
- LogHelper.log(e);
- }
- }
-
- public boolean addChild(URI childURI, String comparatorID) {
- try {
- IArtifactRepository repo = load(childURI);
- if (isSane(repo, comparatorID)) {
- addChild(childURI);
- //Add was successful
- return true;
- }
- } catch (ProvisionException e) {
- LogHelper.log(e);
- }
-
- //Add was not successful
- return false;
- }
-
- 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, location) : URIUtil.makeAbsolute(childURI, location);
- if (!removed)
- childrenURIs.remove(other);
-
- if (removed) {
- // we removed the child from the list so remove the associated repo object as well
- ChildInfo found = null;
- for (Iterator iter = loadedRepos.iterator(); found == null && iter.hasNext();) {
- ChildInfo current = (ChildInfo) iter.next();
- URI repoLocation = current.repo.getLocation();
- if (URIUtil.sameURI(childURI, repoLocation))
- found = current;
- else if (URIUtil.sameURI(other, repoLocation))
- found = current;
- }
- if (found != null)
- loadedRepos.remove(found);
- save();
- }
- }
-
- public void removeAllChildren() {
- childrenURIs.clear();
- loadedRepos.clear();
- save();
- }
-
- public List getChildren() {
- List result = new ArrayList();
- for (Iterator iter = childrenURIs.iterator(); iter.hasNext();)
- result.add(URIUtil.makeAbsolute((URI) iter.next(), location));
- return result;
- }
-
- /**
- * Composite repositories should be unable to directly modify their child repositories
- */
- public synchronized void addDescriptor(IArtifactDescriptor descriptor) {
- throw new UnsupportedOperationException(Messages.exception_unsupportedAddToComposite);
- }
-
- /**
- * Composite repositories should be unable to directly modify their child repositories
- */
- public void addDescriptors(IArtifactDescriptor[] descriptors) {
- throw new UnsupportedOperationException(Messages.exception_unsupportedAddToComposite);
- }
-
- /**
- * Composite repositories should be unable to directly modify their child repositories
- */
- public void removeDescriptor(IArtifactKey key) {
- throw new UnsupportedOperationException(Messages.exception_unsupportedRemoveFromComposite);
- }
-
- /**
- * Composite repositories should be unable to directly modify their child repositories
- */
- public void removeDescriptor(IArtifactDescriptor descriptor) {
- throw new UnsupportedOperationException(Messages.exception_unsupportedRemoveFromComposite);
- }
-
- /**
- * Composite repositories should be unable to directly modify their child repositories
- */
- public synchronized void removeAll() {
- throw new UnsupportedOperationException(Messages.exception_unsupportedRemoveFromComposite);
- }
-
- /**
- * Composite repositories should be unable to directly modify their child repositories,
- * Composite repositories should not have their own content.
- * Therefore, they should not be allowed to have OutputStreams
- */
- public OutputStream getOutputStream(IArtifactDescriptor descriptor) {
- throw new UnsupportedOperationException(Messages.exception_unsupportedGetOutputStream);
- }
-
- public boolean contains(IArtifactKey key) {
- for (Iterator repositoryIterator = loadedRepos.iterator(); repositoryIterator.hasNext();) {
- ChildInfo current = (ChildInfo) repositoryIterator.next();
- if (current.isGood() && current.repo.contains(key))
- return true;
- }
- return false;
- }
-
- public boolean contains(IArtifactDescriptor descriptor) {
- for (Iterator repositoryIterator = loadedRepos.iterator(); repositoryIterator.hasNext();) {
- ChildInfo current = (ChildInfo) repositoryIterator.next();
- if (current.isGood() && current.repo.contains(descriptor))
- return true;
- }
- return false;
- }
-
- public IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key) {
- ArrayList result = new ArrayList();
- for (Iterator repositoryIterator = loadedRepos.iterator(); repositoryIterator.hasNext();) {
- ChildInfo current = (ChildInfo) repositoryIterator.next();
- if (current.isGood()) {
- IArtifactDescriptor[] tempResult = current.repo.getArtifactDescriptors(key);
- for (int i = 0; i < tempResult.length; i++)
- add(result, tempResult[i]);
- }
- }
- return (IArtifactDescriptor[]) result.toArray(new IArtifactDescriptor[result.size()]);
- }
-
- public IArtifactKey[] getArtifactKeys() {
- ArrayList result = new ArrayList();
- for (Iterator repositoryIterator = loadedRepos.iterator(); repositoryIterator.hasNext();) {
- ChildInfo current = (ChildInfo) repositoryIterator.next();
- if (current.isGood()) {
- IArtifactKey[] tempResult = current.repo.getArtifactKeys();
- for (int i = 0; i < tempResult.length; i++)
- add(result, tempResult[i]);
- }
- }
- return (IArtifactKey[]) result.toArray(new IArtifactKey[result.size()]);
- }
-
- public IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor) {
- SubMonitor subMonitor = SubMonitor.convert(monitor, requests.length);
- MultiStatus multiStatus = new MultiStatus(Activator.ID, IStatus.OK, Messages.message_childrenRepos, null);
- for (Iterator repositoryIterator = loadedRepos.iterator(); repositoryIterator.hasNext() && requests.length > 0;) {
- IArtifactRepository current = ((ChildInfo) repositoryIterator.next()).repo;
- IArtifactRequest[] applicable = getRequestsForRepository(current, requests);
- IStatus dlStatus = current.getArtifacts(applicable, subMonitor.newChild(requests.length));
- multiStatus.add(dlStatus);
- if (dlStatus.getSeverity() == IStatus.CANCEL)
- return multiStatus;
- requests = filterUnfetched(requests);
- subMonitor.setWorkRemaining(requests.length);
-
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- }
- return multiStatus;
- }
-
- public IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- return getRawOrNormalArtifact(descriptor, destination, monitor, false);
- }
-
- public IStatus getRawArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- return getRawOrNormalArtifact(descriptor, destination, monitor, true);
- }
-
- private IStatus getRawOrNormalArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor, boolean raw) {
- for (Iterator childIterator = loadedRepos.iterator(); childIterator.hasNext();) {
- ChildInfo current = (ChildInfo) childIterator.next();
- if (current.isGood() && current.repo.contains(descriptor)) {
- // Child hasn't failed & contains descriptor
- IStatus status = raw ? current.repo.getRawArtifact(descriptor, destination, monitor) : current.repo.getArtifact(descriptor, destination, monitor);
- if (!status.isOK()) {
- // Download failed
- if (status.getCode() == CODE_RETRY || status.getCode() == IStatus.CANCEL)
- // Child has mirrors & wants to be retried, or we were canceled
- return status;
- // Child has failed us, mark it bad
- current.setBad();
- if (childIterator.hasNext())
- // More children are available, set retry
- return new MultiStatus(Activator.ID, CODE_RETRY, new IStatus[] {status}, NLS.bind(Messages.retryRequest, current.repo.getLocation(), descriptor.getArtifactKey()), null);
- // Nothing that can be done, pass child's failure on
- return status;
- }
- return Status.OK_STATUS;
- }
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- }
- return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.artifact_not_found, descriptor));
- }
-
- private IArtifactRequest[] filterUnfetched(IArtifactRequest[] requests) {
- ArrayList filteredRequests = new ArrayList();
- for (int i = 0; i < requests.length; i++) {
- if (requests[i].getResult() == null || !requests[i].getResult().isOK()) {
- filteredRequests.add(requests[i]);
- }
- }
-
- IArtifactRequest[] filteredArtifactRequests = new IArtifactRequest[filteredRequests.size()];
- filteredRequests.toArray(filteredArtifactRequests);
- return filteredArtifactRequests;
- }
-
- private IArtifactRequest[] getRequestsForRepository(IArtifactRepository repository, IArtifactRequest[] requests) {
- ArrayList applicable = new ArrayList();
- for (int i = 0; i < requests.length; i++) {
- if (repository.contains(requests[i].getArtifactKey()))
- applicable.add(requests[i]);
- }
- return (IArtifactRequest[]) applicable.toArray(new IArtifactRequest[applicable.size()]);
- }
-
- private void save() {
- if (!isModifiable())
- return;
- boolean compress = "true".equalsIgnoreCase((String) properties.get(PROP_COMPRESSED)); //$NON-NLS-1$
- OutputStream os = null;
- try {
- URI actualLocation = getActualLocation(location, false);
- File artifactsFile = URIUtil.toFile(actualLocation);
- File jarFile = URIUtil.toFile(getActualLocation(location, true));
- if (!compress) {
- if (jarFile.exists()) {
- jarFile.delete();
- }
- if (!artifactsFile.exists()) {
- // create parent folders
- artifactsFile.getParentFile().mkdirs();
- }
- os = new FileOutputStream(artifactsFile);
- } else {
- if (artifactsFile.exists()) {
- artifactsFile.delete();
- }
- if (!jarFile.exists()) {
- if (!jarFile.getParentFile().exists())
- jarFile.getParentFile().mkdirs();
- jarFile.createNewFile();
- }
- JarOutputStream jOs = new JarOutputStream(new FileOutputStream(jarFile));
- jOs.putNextEntry(new JarEntry(new Path(artifactsFile.getAbsolutePath()).lastSegment()));
- os = jOs;
- }
- super.setProperty(IRepository.PROP_TIMESTAMP, Long.toString(System.currentTimeMillis()));
- new CompositeRepositoryIO().write(toState(), os, PI_REPOSITORY_TYPE);
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_WRITE, NLS.bind(Messages.io_failedWrite, location), e));
- }
- }
-
- private IArtifactRepository load(URI repoURI) throws ProvisionException {
- // make sure we are dealing with an absolute location
- repoURI = URIUtil.makeAbsolute(repoURI, location);
- boolean loaded = getManager().contains(repoURI);
- IArtifactRepository repo = getManager().loadRepository(repoURI, null);
- if (!loaded) {
- //set enabled to false so repositories do not get polled twice
- getManager().setEnabled(repoURI, false);
- //set repository to system to hide from users
- getManager().setRepositoryProperty(repoURI, IRepository.PROP_SYSTEM, String.valueOf(true));
- }
- return repo;
- }
-
- /**
- * A method to check if the content of a repository is consistent with the other children by
- * comparing content using the artifactComparator specified by the comparatorID
- * @param toCheckRepo the repository to check
- * @param comparatorID
- * @return <code>true</code> if toCheckRepo is consistent, <code>false</code> if toCheckRepo
- * contains an equal descriptor to that of a child and they refer to different artifacts on disk.
- */
- private boolean isSane(IArtifactRepository toCheckRepo, String comparatorID) {
- IArtifactComparator comparator = ArtifactComparatorFactory.getArtifactComparator(comparatorID);
- for (Iterator repositoryIterator = loadedRepos.iterator(); repositoryIterator.hasNext();) {
- IArtifactRepository current = ((ChildInfo) repositoryIterator.next()).repo;
- if (!current.equals(toCheckRepo)) {
- if (!isSane(toCheckRepo, current, comparator))
- return false;
- }
- }
- return true;
- }
-
- /*
- * Check the two given repositories against each other using the given comparator.
- */
- private boolean isSane(IArtifactRepository one, IArtifactRepository two, IArtifactComparator comparator) {
- IArtifactKey[] toCheckKeys = one.getArtifactKeys();
- for (int i = 0; i < toCheckKeys.length; i++) {
- IArtifactKey key = toCheckKeys[i];
- if (!two.contains(key))
- continue;
- IArtifactDescriptor[] toCheckDescriptors = one.getArtifactDescriptors(key);
- IArtifactDescriptor[] currentDescriptors = two.getArtifactDescriptors(key);
- for (int j = 0; j < toCheckDescriptors.length; j++) {
- if (!two.contains(toCheckDescriptors[j]))
- continue;
- for (int k = 0; k < currentDescriptors.length; k++) {
- if (currentDescriptors[k].equals(toCheckDescriptors[j])) {
- IStatus compareResult = comparator.compare(two, currentDescriptors[k], two, toCheckDescriptors[j]);
- if (!compareResult.isOK()) {
- LogHelper.log(compareResult);
- return false;
- }
- break;
- }
- }
- }
- }
- return true;
- }
-
- /**
- * A method that verifies that all children with matching artifact descriptors contain the same set of bytes
- * The verification is done using the artifactComparator specified by comparatorID
- * Assumes more valuable logging and output is the responsibility of the artifactComparator implementation.
- * @param comparatorID
- * @returns true if the repository is consistent, false if two equal descriptors refer to different artifacts on disk.
- */
- public boolean validate(String comparatorID) {
- IArtifactComparator comparator = ArtifactComparatorFactory.getArtifactComparator(comparatorID);
- ChildInfo[] repos = (ChildInfo[]) loadedRepos.toArray(new ChildInfo[loadedRepos.size()]);
- for (int outer = 0; outer < repos.length; outer++) {
- for (int inner = outer + 1; inner < repos.length; inner++) {
- if (!isSane(repos[outer].repo, repos[inner].repo, comparator))
- return false;
- }
- }
- return true;
- }
-
- private static class ChildInfo {
- IArtifactRepository repo;
- boolean good = true;
-
- ChildInfo(IArtifactRepository IArtifactRepository) {
- this.repo = IArtifactRepository;
- }
-
- void setBad() {
- good = false;
- }
-
- boolean isGood() {
- return good;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepositoryFactory.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepositoryFactory.java
deleted file mode 100644
index e587abfca..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepositoryFactory.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.artifact.repository;
-
-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.internal.p2.repository.RepositoryTransport;
-import org.eclipse.equinox.internal.p2.repository.Transport;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.ArtifactRepositoryFactory;
-import org.eclipse.osgi.util.NLS;
-
-public class CompositeArtifactRepositoryFactory extends ArtifactRepositoryFactory {
-
- public IArtifactRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
- final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
- long time = 0;
- final String debugMsg = "Restoring artifact repository "; //$NON-NLS-1$
- if (Tracing.DEBUG_METADATA_PARSING) {
- Tracing.debug(debugMsg + location);
- time = -System.currentTimeMillis();
- }
- File localFile = null;
- boolean local = false;
- try {
- SubMonitor sub = SubMonitor.convert(monitor, 300);
- OutputStream artifacts = null;
- // try with compressed
- boolean compress = true;
- if (PROTOCOL_FILE.equals(location.getScheme())) {
- local = true;
- localFile = URIUtil.toFile(CompositeArtifactRepository.getActualLocation(location, true));
- if (!localFile.exists()) {
- localFile = URIUtil.toFile(CompositeArtifactRepository.getActualLocation(location, false));
- compress = false;
- }
- } else {
- //not local, return null if the caller wanted a modifiable repo
- if ((flags & IRepositoryManager.REPOSITORY_HINT_MODIFIABLE) > 0) {
- return null;
- }
-
- //download to local temp file
- localFile = File.createTempFile(CompositeArtifactRepository.CONTENT_FILENAME, CompositeArtifactRepository.XML_EXTENSION);
- try {
- artifacts = new BufferedOutputStream(new FileOutputStream(localFile));
- IStatus status = getTransport().download(CompositeArtifactRepository.getActualLocation(location, compress), artifacts, sub.newChild(100));
- if (!status.isOK()) {
- // retry uncompressed
- compress = false;
- status = getTransport().download(CompositeArtifactRepository.getActualLocation(location, compress), artifacts, sub.newChild(100));
- if (!status.isOK())
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, status.getMessage(), null));
- }
- } finally {
- if (artifacts != null)
- artifacts.close();
- }
- }
- InputStream descriptorStream = null;
- try {
- descriptorStream = new BufferedInputStream(new FileInputStream(localFile));
- if (compress) {
- URI actualLocation = CompositeArtifactRepository.getActualLocation(location, false);
- JarInputStream jInStream = new JarInputStream(descriptorStream);
- JarEntry jarEntry = jInStream.getNextJarEntry();
- String filename = URIUtil.lastSegment(actualLocation);
- while (jarEntry != null && filename != null && !(filename.equals(jarEntry.getName()))) {
- jarEntry = jInStream.getNextJarEntry();
- }
- if (jarEntry == null) {
- //there is a jar but the entry is missing or invalid, so treat this as an invalid repository
- throw new IOException(NLS.bind(Messages.io_invalidLocation, actualLocation.getPath()));
- }
- descriptorStream = jInStream;
- }
- CompositeRepositoryIO io = new CompositeRepositoryIO();
- CompositeRepositoryState resultState = io.read(localFile.toURL(), descriptorStream, CompositeArtifactRepository.PI_REPOSITORY_TYPE, sub.newChild(100));
- if (resultState.getLocation() == null)
- resultState.setLocation(location);
- CompositeArtifactRepository result = new CompositeArtifactRepository(resultState);
- if (Tracing.DEBUG_METADATA_PARSING) {
- time += System.currentTimeMillis();
- Tracing.debug(debugMsg + "time (ms): " + time); //$NON-NLS-1$
- }
- return result;
- } finally {
- if (descriptorStream != null)
- descriptorStream.close();
- }
- } 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 (!local && localFile != null && !localFile.delete())
- localFile.deleteOnExit();
- }
- }
-
- public IArtifactRepository create(URI location, String name, String type, Map properties) {
- return new CompositeArtifactRepository(location, name, properties);
- }
-
- private Transport getTransport() {
- return RepositoryTransport.getInstance();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.java
deleted file mode 100644
index c15f22c0d..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.artifact.repository.messages"; //$NON-NLS-1$
-
- public static String artifact_not_found;
- public static String available_already_in;
- public static String downloading;
- public static String error_closing_stream;
- public static String io_failedRead;
- public static String io_failedWrite;
- public static String io_incompatibleVersion;
- public static String io_invalidLocation;
- public static String SignatureVerification_failedRead;
- public static String SignatureVerification_invalidContent;
- public static String SignatureVerification_invalidFileContent;
-
- public static String SignatureVerifier_OutOfMemory;
- public static String io_parseError;
- public static String mirroring;
- public static String repoMan_internalError;
- public static String repoFailedWrite;
-
- public static String sar_downloading;
- public static String sar_downloadJobName;
- public static String sar_failedMkdir;
- public static String sar_reportStatus;
-
- public static String mirror_alreadyExists;
- public static String message_mirroringStatus;
- public static String message_childrenRepos;
- public static String exception_comparatorNotFound;
- public static String exception_noComparators;
- public static String exception_destinationNotModifiable;
- public static String exception_needSourceDestination;
- public static String exception_malformedRepoURI;
- public static String exception_unsupportedAddToComposite;
-
- public static String exception_unsupportedGetOutputStream;
- public static String exception_unsupportedRemoveFromComposite;
-
- public static String Mirroring_NO_MATCHING_DESCRIPTOR;
- public static String Mirroring_MISSING_DESCRIPTOR;
- public static String Mirroring_DIFFERENT_DESCRIPTOR_PROPERTY;
-
- public static String Mirroring_ValidationError;
- public static String Mirroring_compareAndDownload;
-
- public static String MirrorLog_Console_Log;
- public static String MirrorLog_Exception_Occurred;
-
- public static String MirrorRequest_multipleDownloadProblems;
-
- public static String exception_unableToCreateParentDir;
-
- public static String folder_artifact_not_file_repo;
-
- public static String retryRequest;
-
- static {
- // initialize resource bundles
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- // Do not instantiate
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorRequest.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorRequest.java
deleted file mode 100644
index 5623b78e5..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorRequest.java
+++ /dev/null
@@ -1,235 +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) - various ongoing maintenance
- * Genuitec LLC - various bug fixes
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository;
-
-import java.io.*;
-import java.util.Properties;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepHandler;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * A request to mirror (copy) an artifact into a given destination artifact repository.
- */
-public class MirrorRequest extends ArtifactRequest {
- private static final ProcessingStepDescriptor[] EMPTY_STEPS = new ProcessingStepDescriptor[0];
-
- protected final IArtifactRepository target;
-
- private final Properties targetDescriptorProperties;
- private final Properties targetRepositoryProperties;
- protected IArtifactDescriptor descriptor;
-
- public MirrorRequest(IArtifactKey key, IArtifactRepository targetRepository, Properties targetDescriptorProperties, Properties targetRepositoryProperties) {
- super(key);
- target = targetRepository;
- if (targetDescriptorProperties == null || targetDescriptorProperties.isEmpty()) {
- this.targetDescriptorProperties = null;
- } else {
- this.targetDescriptorProperties = new Properties();
- this.targetDescriptorProperties.putAll(targetDescriptorProperties);
- }
-
- if (targetRepositoryProperties == null || targetRepositoryProperties.isEmpty()) {
- this.targetRepositoryProperties = null;
- } else {
- this.targetRepositoryProperties = new Properties();
- this.targetRepositoryProperties.putAll(targetRepositoryProperties);
- }
- }
-
- public void perform(IProgressMonitor monitor) {
- monitor.subTask(NLS.bind(Messages.downloading, getArtifactKey().getId()));
- // Do we already have the artifact in the target?
- if (target.contains(getArtifactKey())) {
- setResult(new Status(IStatus.OK, Activator.ID, NLS.bind(Messages.available_already_in, getArtifactKey())));
- return;
- }
-
- // if the request does not have a descriptor then try to fill one in by getting
- // the list of all and randomly picking one that appears to be optimized.
- IArtifactDescriptor optimized = null;
- IArtifactDescriptor canonical = null;
- if (descriptor == null) {
- IArtifactDescriptor[] descriptors = source.getArtifactDescriptors(getArtifactKey());
- if (descriptors.length > 0) {
- for (int i = 0; i < descriptors.length; i++) {
- if (descriptors[i].getProperty(IArtifactDescriptor.FORMAT) == null)
- canonical = descriptors[i];
- else if (ProcessingStepHandler.canProcess(descriptors[i]))
- optimized = descriptors[i];
- }
- boolean chooseCanonical = source.getLocation().getScheme().equals("file"); //$NON-NLS-1$
- // If the source repo is local then look for a canonical descriptor so we don't waste processing time.
- descriptor = chooseCanonical ? canonical : optimized;
- // if the descriptor is still null then we could not find our first choice of format so switch the logic.
- if (descriptor == null)
- descriptor = !chooseCanonical ? canonical : optimized;
- }
- }
-
- // if the descriptor is not set now then the repo does not have the requested artifact
- // TODO improve the reporting here. It may be the case that the repo has the artifact
- // but the client does not have a processor
- if (descriptor == null) {
- setResult(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.artifact_not_found, getArtifactKey())));
- return;
- }
-
- ArtifactDescriptor destinationDescriptor = getDestinationDescriptor(descriptor);
- IStatus status = transfer(destinationDescriptor, descriptor, monitor);
- // if ok, cancelled or transfer has already been done with the canonical form return with status set
- if (status.getSeverity() == IStatus.CANCEL) {
- setResult(status);
- return;
- }
- if (monitor.isCanceled()) {
- setResult(Status.CANCEL_STATUS);
- return;
- }
- if (status.isOK()) {
- setResult(status);
- return;
- }
-
- // failed, first remove possibly erroneously added descriptor
- if (target.contains(destinationDescriptor))
- target.removeDescriptor(destinationDescriptor);
-
- if (descriptor == canonical || canonical == null) {
- setResult(status);
- return;
- }
-
- IStatus canonicalStatus = transfer(getDestinationDescriptor(canonical), canonical, monitor);
- // To prevent the optimized transfer status severity from dominating the canonical, only merge
- // if the canonical severity is equal to or higher than the optimized transfer severity.
- if (canonicalStatus.getSeverity() < status.getSeverity())
- setResult(canonicalStatus);
- else
- setResult(new MultiStatus(Activator.ID, canonicalStatus.getCode() != 0 ? canonicalStatus.getCode() : status.getCode(), new IStatus[] {status, canonicalStatus}, Messages.MirrorRequest_multipleDownloadProblems, null));
- }
-
- private ArtifactDescriptor getDestinationDescriptor(IArtifactDescriptor sourceDescriptor) {
- // Get the descriptor to use to store the artifact
- // Since we are mirroring, ensure we clear out data from the original descriptor that may
- // not apply in the new repo location.
- // TODO this is brittle. perhaps the repo itself should do this? there are cases where
- // we really do need to give the repo the actual descriptor to use however...
- ArtifactDescriptor destinationDescriptor = new ArtifactDescriptor(sourceDescriptor);
- destinationDescriptor.setProcessingSteps(EMPTY_STEPS);
- destinationDescriptor.setProperty(IArtifactDescriptor.DOWNLOAD_MD5, null);
- destinationDescriptor.setProperty(IArtifactDescriptor.DOWNLOAD_CONTENTTYPE, null);
- destinationDescriptor.setProperty(IArtifactDescriptor.FORMAT, null);
- if (targetDescriptorProperties != null)
- destinationDescriptor.addProperties(targetDescriptorProperties);
- if (targetRepositoryProperties != null)
- destinationDescriptor.addRepositoryProperties(targetRepositoryProperties);
- return destinationDescriptor;
- }
-
- /**
- * Keep retrying the source repository until it reports back that it will be impossible
- * to get the artifact from it.
- * @param destinationDescriptor
- * @param sourceDescriptor
- * @param monitor
- * @return the status of the transfer operation
- */
- protected IStatus transfer(IArtifactDescriptor destinationDescriptor, IArtifactDescriptor sourceDescriptor, IProgressMonitor monitor) {
- IStatus status = Status.OK_STATUS;
- // go until we get one (OK), there are no more mirrors to consider or the operation is cancelled.
- // TODO this needs to be redone with a much better mirror management scheme.
- do {
- status = transferSingle(destinationDescriptor, sourceDescriptor, monitor);
- } while (status.getSeverity() == IStatus.ERROR && status.getCode() == IArtifactRepository.CODE_RETRY);
- return status;
- }
-
- private IStatus transferSingle(IArtifactDescriptor destinationDescriptor, IArtifactDescriptor sourceDescriptor, IProgressMonitor monitor) {
- OutputStream destination;
- try {
- destination = target.getOutputStream(destinationDescriptor);
- } catch (ProvisionException e) {
- return e.getStatus();
- }
-
- IStatus status = null;
- // Do the actual transfer
- try {
- status = getArtifact(sourceDescriptor, destination, monitor);
- if (destination instanceof IStateful && status != null && !status.isOK()) {
- IStatus destStatus = ((IStateful) destination).getStatus();
- IStatus root = extractRootCause(status);
- Throwable e = root != null ? root.getException() : null;
- ((IStateful) destination).setStatus(new MultiStatus(Activator.ID, status.getCode(), new IStatus[] {status, destStatus}, status.getMessage(), e));
- }
- } finally {
- try {
- destination.close();
- } catch (IOException e) {
- if (status != null && status.getSeverity() == IStatus.ERROR && status.getCode() == IArtifactRepository.CODE_RETRY)
- return new MultiStatus(Activator.ID, status.getCode(), new IStatus[] {status}, NLS.bind(Messages.error_closing_stream, getArtifactKey(), target.getLocation()), e);
- return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.error_closing_stream, getArtifactKey(), target.getLocation()), e);
- }
- if (status != null && status.getSeverity() == IStatus.ERROR) {
- IStatus root = extractRootCause(status);
- if (root != null && FileNotFoundException.class == root.getException().getClass())
- return new Status(IStatus.ERROR, Activator.ID, status.getCode(), NLS.bind(Messages.artifact_not_found, getArtifactKey()), root.getException());
- }
- }
- return status;
- }
-
- protected IStatus getArtifact(IArtifactDescriptor sourceDescriptor, OutputStream destination, IProgressMonitor monitor) {
- return getSourceRepository().getArtifact(sourceDescriptor, destination, monitor);
- }
-
- /**
- * Extract the root cause. The root cause is the first severe non-MultiStatus status
- * containing an exception when searching depth first otherwise null.
- * @param status
- * @return root cause
- */
- private static IStatus extractRootCause(IStatus status) {
- if (status == null)
- return null;
- if (!status.isMultiStatus())
- return constraintStatus(status);
-
- IStatus[] children = ((MultiStatus) status).getChildren();
- if (children == null)
- return constraintStatus(status);
-
- for (int i = 0; i < children.length; i++) {
- IStatus deeper = extractRootCause(children[i]);
- if (deeper != null)
- return deeper;
- }
-
- return constraintStatus(status);
- }
-
- private static IStatus constraintStatus(IStatus status) {
- return status.getSeverity() == IStatus.ERROR && status.getException() != null ? status : null;
- }
-
- public String toString() {
- return Messages.mirroring + getArtifactKey() + " into " + target; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorSelector.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorSelector.java
deleted file mode 100644
index 8104d23e8..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorSelector.java
+++ /dev/null
@@ -1,283 +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 - bug fixes
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-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.repository.DownloadStatus;
-import org.eclipse.equinox.internal.p2.repository.RepositoryTransport;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.w3c.dom.*;
-import org.xml.sax.InputSource;
-
-/**
- * Mirror support class for repositories. This class implements
- * mirror support equivalent to the mirroring of update manager sites. A repository
- * optionally provides a mirror URL via the {@link IRepository#PROP_MIRRORS_URL} key.
- * The contents of the file at this URL is expected to be an XML document
- * containing a list of <mirror> elements. The mirrors are assumed to be already
- * sorted geographically with closer mirrors first.
- */
-public class MirrorSelector {
- private static final double LOG2 = Math.log(2);
-
- /**
- * Encapsulates information about a single mirror
- */
- public static class MirrorInfo implements Comparable {
- long bytesPerSecond;
- int failureCount;
- private final int initialRank;
- String locationString;
-
- public MirrorInfo(String location, int initialRank) {
- this.initialRank = initialRank;
- this.locationString = location;
- if (!locationString.endsWith("/")) //$NON-NLS-1$
- locationString = locationString + "/"; //$NON-NLS-1$
- failureCount = 0;
- bytesPerSecond = DownloadStatus.UNKNOWN_RATE;
- }
-
- /**
- * Comparison used to sort mirrors.
- */
- public int compareTo(Object o) {
- if (!(o instanceof MirrorInfo))
- return 0;
- MirrorInfo that = (MirrorInfo) o;
- //less failures is better
- if (this.failureCount != that.failureCount)
- return this.failureCount - that.failureCount;
- //faster is better
- if (this.bytesPerSecond != that.bytesPerSecond)
- return (int) (that.bytesPerSecond - this.bytesPerSecond);
- //trust that initial rank indicates geographical proximity
- return this.initialRank - that.initialRank;
- }
-
- public void incrementFailureCount() {
- this.failureCount++;
- }
-
- public void setBytesPerSecond(long newValue) {
- this.bytesPerSecond = newValue;
- }
-
- public String toString() {
- return "Mirror(" + locationString + ',' + failureCount + ',' + bytesPerSecond + ')'; //$NON-NLS-1$
- }
- }
-
- /**
- * The URI of the base repository being mirrored.
- */
- URI baseURI;
-
- MirrorInfo[] mirrors;
-
- private final IRepository repository;
-
- private final Random random = new Random();
-
- /**
- * Constructs a mirror support class for the given repository. Mirrors are
- * not contacted and the mirrorsURL document is not parsed until a
- * mirror location request is sent.
- */
- public MirrorSelector(IRepository repository) {
- this.repository = repository;
- try {
- String base = (String) repository.getProperties().get(IRepository.PROP_MIRRORS_BASE_URL);
- if (base != null) {
- this.baseURI = new URI(base);
- } else {
- URI repositoryLocation = repository.getLocation();
- if (repositoryLocation != null)
- this.baseURI = repositoryLocation;
- }
- } catch (URISyntaxException e) {
- log("Error initializing mirrors for: " + repository.getLocation(), e); //$NON-NLS-1$
- }
- }
-
- /**
- * Parses the given mirror URL to obtain the list of mirrors. Returns the mirrors,
- * or null if mirrors could not be computed.
- *
- * Originally copied from DefaultSiteParser.getMirrors in org.eclipse.update.core
- */
- private MirrorInfo[] computeMirrors(String mirrorsURL, IProgressMonitor monitor) {
- try {
- String countryCode = Activator.getContext().getProperty("eclipse.p2.countryCode"); //$NON-NLS-1$
- if (countryCode == null || countryCode.trim().length() == 0)
- countryCode = Locale.getDefault().getCountry().toLowerCase();
- String timeZone = Activator.getContext().getProperty("eclipse.p2.timeZone"); //$NON-NLS-1$
- if (timeZone == null || timeZone.trim().length() == 0)
- timeZone = Integer.toString(new GregorianCalendar().get(Calendar.ZONE_OFFSET) / (60 * 60 * 1000));
-
- if (mirrorsURL.indexOf('?') != -1) {
- mirrorsURL = mirrorsURL + '&';
- } else {
- mirrorsURL = mirrorsURL + '?';
- }
- mirrorsURL = mirrorsURL + "countryCode=" + countryCode + "&timeZone=" + timeZone + "&format=xml"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
- DocumentBuilder builder = domFactory.newDocumentBuilder();
- Document document = null;
- // Use Transport to read the mirrors list (to benefit from proxy support, authentication, etc)
- RepositoryTransport transport = RepositoryTransport.getInstance();
- InputSource input = new InputSource(mirrorsURL);
- input.setByteStream(transport.stream(URIUtil.fromString(mirrorsURL), monitor));
- document = builder.parse(input);
- if (document == null)
- return null;
- NodeList mirrorNodes = document.getElementsByTagName("mirror"); //$NON-NLS-1$
- int mirrorCount = mirrorNodes.getLength();
- MirrorInfo[] infos = new MirrorInfo[mirrorCount + 1];
- for (int i = 0; i < mirrorCount; i++) {
- Element mirrorNode = (Element) mirrorNodes.item(i);
- String infoURL = mirrorNode.getAttribute("url"); //$NON-NLS-1$
- infos[i] = new MirrorInfo(infoURL, i);
- }
- //p2: add the base site as the last resort mirror so we can track download speed and failure rate
- infos[mirrorCount] = new MirrorInfo(baseURI.toString(), mirrorCount);
- return infos;
- } catch (Exception e) {
- // log if absolute url
- if (mirrorsURL != null && (mirrorsURL.startsWith("http://") //$NON-NLS-1$
- || mirrorsURL.startsWith("https://") //$NON-NLS-1$
- || mirrorsURL.startsWith("file://") //$NON-NLS-1$
- || mirrorsURL.startsWith("ftp://") //$NON-NLS-1$
- || mirrorsURL.startsWith("jar://"))) //$NON-NLS-1$
- log("Error processing mirrors URL: " + mirrorsURL, e); //$NON-NLS-1$
- return null;
- }
- }
-
- /**
- * Returns an equivalent location for the given artifact location in the base
- * repository. Always falls back to the given input location in case of failure
- * to compute mirrors. Never returns null.
- */
- public synchronized URI getMirrorLocation(URI inputLocation, IProgressMonitor monitor) {
- Assert.isNotNull(inputLocation);
- if (baseURI == null)
- return inputLocation;
- URI relativeLocation = baseURI.relativize(inputLocation);
- //if we failed to relativize the location, we can't select a mirror
- if (relativeLocation == null || relativeLocation.isAbsolute())
- return inputLocation;
- MirrorInfo selectedMirror = selectMirror(monitor);
- if (selectedMirror == null)
- return inputLocation;
- if (Tracing.DEBUG_MIRRORS)
- Tracing.debug("Selected mirror for artifact " + inputLocation + ": " + selectedMirror); //$NON-NLS-1$ //$NON-NLS-2$
- try {
- return new URI(selectedMirror.locationString + relativeLocation.getPath());
- } catch (URISyntaxException e) {
- log("Unable to make location " + inputLocation + " relative to mirror " + selectedMirror.locationString, e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return inputLocation;
- }
-
- /**
- * Returns the mirror locations for this repository, or <code>null</code> if
- * they could not be computed.
- */
- private MirrorInfo[] initMirrors(IProgressMonitor monitor) {
- if (mirrors != null)
- return mirrors;
- String mirrorsURL = (String) repository.getProperties().get(IRepository.PROP_MIRRORS_URL);
- if (mirrorsURL != null)
- mirrors = computeMirrors(mirrorsURL, monitor);
- return mirrors;
- }
-
- private void log(String message, Throwable exception) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message, exception));
- }
-
- /**
- * Reports the result of a mirror download
- */
- public synchronized void reportResult(String toDownload, IStatus result) {
- if (mirrors == null)
- return;
- for (int i = 0; i < mirrors.length; i++) {
- MirrorInfo mirror = mirrors[i];
- if (toDownload.startsWith(mirror.locationString)) {
- if (!result.isOK() && result.getSeverity() != IStatus.CANCEL)
- mirror.incrementFailureCount();
- if (result instanceof DownloadStatus) {
- long oldRate = mirror.bytesPerSecond;
- long newRate = ((DownloadStatus) result).getTransferRate();
- //average old and new rate so one slow download doesn't ruin the mirror's reputation
- if (oldRate > 0)
- newRate = (oldRate + newRate) / 2;
- mirror.setBytesPerSecond(newRate);
- }
- if (Tracing.DEBUG_MIRRORS)
- Tracing.debug("Updated mirror " + mirror); //$NON-NLS-1$
- Arrays.sort(mirrors);
- return;
- }
- }
- }
-
- /**
- * Return whether or not all the mirrors for this selector have proven to be invalid
- * @return whether or not there is a valid mirror in this selector.
- */
- public synchronized boolean hasValidMirror() {
- // return true if there is a mirror and it has not failed. Since the mirrors
- // list is sorted with failures last, we only have to test the first element for failure.
- return mirrors != null && mirrors.length > 0 && mirrors[0].failureCount == 0;
- }
-
- /**
- * Selects a mirror from the given list of mirrors. Returns null if a mirror
- * could not be found.
- */
- private MirrorInfo selectMirror(IProgressMonitor monitor) {
- initMirrors(monitor);
- int mirrorCount;
- if (mirrors == null || (mirrorCount = mirrors.length) == 0)
- return null;
- //this is a function that randomly selects a mirror based on a logarithmic
- //distribution. Mirror 0 has a 1/2 chance of being selected, mirror 1 has a 1/4 chance,
- // mirror 2 has a 1/8 chance, etc. This introduces some variation in the mirror
- //selection, while still heavily favoring better mirrors
- //the algorithm computes the most significant digit in a binary number by computing the base 2 logarithm
- //if the first digit is most significant, mirror 0 is selected, if the second is most significant, mirror 1 is selected, etc
- int highestMirror = Math.min(15, mirrorCount);
- int result = (int) (Math.log(random.nextInt(1 << highestMirror) + 1) / LOG2);
- if (result >= highestMirror || result < 0)
- result = highestMirror - 1;
- MirrorInfo selected = mirrors[highestMirror - 1 - result];
- //if we selected a mirror that has failed in the past, revert to best available mirror
- if (selected.failureCount > 0)
- selected = mirrors[0];
- //for now, don't tolerate failing mirrors
- if (selected.failureCount > 0)
- return null;
- return selected;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/RawMirrorRequest.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/RawMirrorRequest.java
deleted file mode 100644
index 3c82b5565..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/RawMirrorRequest.java
+++ /dev/null
@@ -1,78 +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.artifact.repository;
-
-import java.io.OutputStream;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.artifact.processors.md5.MD5Verifier;
-import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-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.osgi.util.NLS;
-
-public class RawMirrorRequest extends MirrorRequest {
- protected IArtifactDescriptor sourceDescriptor, targetDescriptor;
-
- public RawMirrorRequest(IArtifactDescriptor sourceDescriptor, IArtifactDescriptor targetDescriptor, IArtifactRepository targetRepository) {
- super(sourceDescriptor.getArtifactKey(), targetRepository, null, null);
- this.sourceDescriptor = sourceDescriptor;
- this.targetDescriptor = targetDescriptor;
- }
-
- public void perform(IProgressMonitor monitor) {
- monitor.subTask(NLS.bind(Messages.downloading, getArtifactKey().getId()));
- // Do we already have the descriptor in the target?
- if (target.contains(targetDescriptor)) {
- setResult(new Status(IStatus.INFO, Activator.ID, NLS.bind(Messages.mirror_alreadyExists, targetDescriptor, target)));
- return;
- }
- // Does the source actually have the descriptor?
- if (!source.contains(getArtifactDescriptor())) {
- setResult(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.artifact_not_found, getArtifactKey())));
- return;
- }
- IStatus status = transfer(targetDescriptor, sourceDescriptor, monitor);
-
- // if ok, cancelled or transfer has already been done with the canonical form return with status set
- if (status.getSeverity() == IStatus.CANCEL) {
- setResult(status);
- return;
- }
- if (monitor.isCanceled()) {
- setResult(Status.CANCEL_STATUS);
- return;
- }
- if (status.isOK()) {
- setResult(status);
- return;
- }
-
- // failed, first remove possibly erroneously added descriptor
- if (target.contains(targetDescriptor))
- target.removeDescriptor(targetDescriptor);
-
- setResult(status);
- }
-
- public IArtifactDescriptor getArtifactDescriptor() {
- return sourceDescriptor;
- }
-
- // Perform the mirror operation without any processing steps
- protected IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- ProcessingStepHandler handler = new ProcessingStepHandler();
- if (SimpleArtifactRepository.MD5_CHECK_ENABLED && descriptor.getProperty(IArtifactDescriptor.DOWNLOAD_MD5) != null)
- destination = handler.link(new ProcessingStep[] {new MD5Verifier(descriptor.getProperty(IArtifactDescriptor.DOWNLOAD_MD5))}, destination, monitor);
- return getSourceRepository().getRawArtifact(descriptor, destination, monitor);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/SignatureVerifier.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/SignatureVerifier.java
deleted file mode 100644
index 55330678a..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/SignatureVerifier.java
+++ /dev/null
@@ -1,104 +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 - continuing development
-*******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository;
-
-import java.io.*;
-import java.security.GeneralSecurityException;
-import java.util.ArrayList;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.osgi.signedcontent.*;
-
-/**
- * Processing step validating the signature of the artifact being downloaded
- */
-public class SignatureVerifier extends ProcessingStep {
- private File inputFile;
- private OutputStream tempStream;
-
- public boolean areRequirementsSatisfied() {
- return true;
- }
-
- public void write(int b) throws IOException {
- getOutputStream().write(b);
- }
-
- public void write(byte[] bytes, int off, int len) throws IOException {
- getOutputStream().write(bytes, off, len);
- }
-
- private OutputStream getOutputStream() throws IOException {
- if (tempStream != null)
- return tempStream;
- // store input stream in temporary file
- inputFile = File.createTempFile("signatureFile", ".jar"); //$NON-NLS-1$ //$NON-NLS-2$
- tempStream = new BufferedOutputStream(new FileOutputStream(inputFile));
- return tempStream;
- }
-
- private void verify() throws IOException {
- BufferedInputStream resultStream = null;
- try {
- if (tempStream == null)
- // hmmm, no one wrote to this stream so there is nothing to pass on
- return;
- // Ok, so there is content, close the tempStream
- tempStream.close();
- setStatus(verifyContent());
-
- // now write the content to the final destination
- resultStream = new BufferedInputStream(new FileInputStream(inputFile));
- FileUtils.copyStream(resultStream, true, getDestination(), false);
- resultStream = null;
- } finally {
- if (inputFile != null)
- inputFile.delete();
- if (resultStream != null)
- resultStream.close();
- }
- }
-
- private IStatus verifyContent() throws IOException {
- SignedContentFactory verifierFactory = (SignedContentFactory) ServiceHelper.getService(Activator.getContext(), SignedContentFactory.class.getName());
- SignedContent signedContent;
- try {
- signedContent = verifierFactory.getSignedContent(inputFile);
- } catch (GeneralSecurityException e) {
- return new Status(IStatus.ERROR, Activator.ID, Messages.SignatureVerification_failedRead + inputFile, e);
- }
- ArrayList allStatus = new ArrayList(0);
- SignedContentEntry[] entries = signedContent.getSignedEntries();
- for (int i = 0; i < entries.length; i++)
- try {
- entries[i].verify();
- } catch (InvalidContentException e) {
- allStatus.add(new Status(IStatus.ERROR, Activator.ID, Messages.SignatureVerification_invalidContent + entries[i].getName(), e));
- } catch (OutOfMemoryError e) {
- allStatus.add(new Status(IStatus.ERROR, Activator.ID, Messages.SignatureVerifier_OutOfMemory, e));
- break;
- }
- if (allStatus.size() > 0)
- return new MultiStatus(Activator.ID, IStatus.ERROR, (IStatus[]) allStatus.toArray(new IStatus[allStatus.size()]), Messages.SignatureVerification_invalidFileContent + inputFile, null);
- return Status.OK_STATUS;
- }
-
- public void close() throws IOException {
- // When we go to close we must have seen all the content we are going to see
- // So before closing, verify and write the result to the destination
- verify();
- super.close();
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/messages.properties b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/messages.properties
deleted file mode 100644
index 9b80fc9ef..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/messages.properties
+++ /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
-###############################################################################
-artifact_not_found=Artifact not found: {0}.
-available_already_in=The artifact is already available in the repository {0}.
-downloading=Downloading {0}
-error_closing_stream=Error closing the output stream for {0} on repository {1}.
-
-io_failedRead=Unable to read repository at {0}.
-io_parseError=Error parsing simple artifact repository.
-io_incompatibleVersion=Simple artifact repository has incompatible version {0}; expected {1}.
-io_invalidLocation=Invalid repository location: {0}.
-mirroring=Mirroring:
-io_failedWrite=Error occurred while writing repository at {0}.
-
-repoFailedWrite=Unable to write to repository: {0}.
-
-repoMan_internalError=Internal error.
-
-SignatureVerification_failedRead=Error reading signed content:
-SignatureVerification_invalidContent=Invalid content:
-SignatureVerification_invalidFileContent=File has invalid content:
-SignatureVerifier_OutOfMemory=Out of memory: Cannot verify signed content.
-
-sar_downloading=Download {0} artifacts
-sar_downloadJobName=Install download
-sar_failedMkdir=Failed to create directory {0}.
-sar_reportStatus=Problems downloading artifact: {0}.
-
-mirror_alreadyExists=Artifact: {0} already exists in repository: {1}.
-
-message_mirroringStatus = Messages while mirroring artifact descriptors.
-message_childrenRepos = Messages while trying children repositories.
-
-exception_comparatorNotFound = The Artifact Comparator {0} was not found.
-exception_noComparators = No Artifact Comparators are available.
-exception_destinationNotModifiable = The destination repository must be modifiable: {0}.
-exception_needSourceDestination = Must specify a source and destination.
-exception_malformedRepoURI = The repository location ({0}) must be a URI.
-Mirroring_NO_MATCHING_DESCRIPTOR=Could not match descriptor for compare
-Mirroring_MISSING_DESCRIPTOR=Missing descriptor: {0}.
-Mirroring_DIFFERENT_DESCRIPTOR_PROPERTY=Descriptor {0} has different properties for {1}, source: {2}, destination: {3}.
-Mirroring_ValidationError=Error occurred while validating mirror.
-Mirroring_compareAndDownload=Compare and download of {0} from baseline.
-MirrorLog_Console_Log=Logging to the console instead.
-MirrorLog_Exception_Occurred=An exception occurred while writing to the log:
-MirrorRequest_multipleDownloadProblems=Multiple problems occurred while downloading.
-
-exception_unsupportedAddToComposite = Cannot add descriptors to a composite repository.
-exception_unsupportedGetOutputStream=Cannot write artifacts to a composite repository.
-exception_unsupportedRemoveFromComposite = Cannot remove descriptors from a composite repository.
-
-exception_unableToCreateParentDir = Unable to create parent directory.
-folder_artifact_not_file_repo=Artifact {0} is a folder but the repository is an archive or remote location.
-retryRequest=Download of {0} failed on repository {1}. Retrying. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/BlobStore.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/BlobStore.java
deleted file mode 100644
index e3697cbee..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/BlobStore.java
+++ /dev/null
@@ -1,128 +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.artifact.repository.simple;
-
-import java.io.*;
-import java.net.URI;
-import java.util.Iterator;
-import java.util.Set;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.URIUtil;
-
-/**
- * Blob store which maps UUIDs to blobs on disk. The UUID is mapped
- * to a file in the file-system and the blob is the file contents. For scalability,
- * the blobs are split among 255 directories with the names 00 to FF.
- */
-public class BlobStore {
- protected URI store;
-
- protected boolean fileBased;
- /** Limits the range of directories' names. */
- protected byte mask;
-
- //private static short[] randomArray = {213, 231, 37, 85, 211, 29, 161, 175, 187, 3, 147, 246, 170, 30, 202, 183, 242, 47, 254, 189, 25, 248, 193, 2, 119, 133, 125, 12, 76, 213, 219, 79, 69, 133, 202, 80, 150, 190, 157, 190, 80, 190, 219, 150, 169, 117, 95, 10, 77, 214, 233, 70, 5, 188, 44, 91, 165, 149, 177, 93, 17, 112, 4, 41, 230, 148, 188, 107, 213, 31, 52, 60, 111, 246, 226, 121, 129, 197, 144, 248, 92, 133, 96, 116, 104, 67, 74, 144, 185, 141, 96, 34, 182, 90, 36, 217, 28, 205, 107, 52, 201, 14, 8, 1, 27, 216, 60, 35, 251, 194, 7, 156, 32, 5, 145, 29, 96, 61, 110, 145, 50, 56, 235, 239, 170, 138, 17, 211, 56, 98, 101, 126, 27, 57, 211, 144, 206, 207, 179, 111, 160, 50, 243, 69, 106, 118, 155, 159, 28, 57, 11, 175, 43, 173, 96, 181, 99, 169, 171, 156, 246, 243, 30, 198, 251, 81, 77, 92, 160, 235, 215, 187, 23, 71, 58, 247, 127, 56, 118, 132, 79, 188, 42, 188, 158, 121, 255, 65, 154, 118, 172, 217, 4, 47, 105, 204, 135, 27, 43, 90, 9, 31, 59, 115, 193, 28, 55, 101, 9, 117, 211, 112, 61, 55, 23, 235, 51, 104, 123, 138, 76, 148, 115, 119, 81, 54, 39, 46, 149, 191, 79, 16, 222, 69, 219, 136, 148, 181, 77, 250, 101, 223, 140, 194, 141, 44, 195, 217, 31, 223, 207, 149, 245, 115, 243, 183};
- private static byte[] randomArray = {-43, -25, 37, 85, -45, 29, -95, -81, -69, 3, -109, -10, -86, 30, -54, -73, -14, 47, -2, -67, 25, -8, -63, 2, 119, -123, 125, 12, 76, -43, -37, 79, 69, -123, -54, 80, -106, -66, -99, -66, 80, -66, -37, -106, -87, 117, 95, 10, 77, -42, -23, 70, 5, -68, 44, 91, -91, -107, -79, 93, 17, 112, 4, 41, -26, -108, -68, 107, -43, 31, 52, 60, 111, -10, -30, 121, -127, -59, -112, -8, 92, -123, 96, 116, 104, 67, 74, -112, -71, -115, 96, 34, -74, 90, 36, -39, 28, -51, 107, 52, -55, 14, 8, 1, 27, -40, 60, 35, -5, -62, 7, -100, 32, 5, -111, 29, 96, 61, 110, -111, 50, 56, -21, -17, -86, -118, 17, -45, 56, 98, 101, 126, 27, 57, -45, -112, -50, -49, -77, 111, -96, 50, -13, 69, 106, 118, -101, -97, 28, 57, 11, -81, 43, -83, 96, -75, 99, -87, -85, -100, -10, -13, 30,
- -58, -5, 81, 77, 92, -96, -21, -41, -69, 23, 71, 58, -9, 127, 56, 118, -124, 79, -68, 42, -68, -98, 121, -1, 65, -102, 118, -84, -39, 4, 47, 105, -52, -121, 27, 43, 90, 9, 31, 59, 115, -63, 28, 55, 101, 9, 117, -45, 112, 61, 55, 23, -21, 51, 104, 123, -118, 76, -108, 115, 119, 81, 54, 39, 46, -107, -65, 79, 16, -34, 69, -37, -120, -108, -75, 77, -6, 101, -33, -116, -62, -115, 44, -61, -39, 31, -33, -49, -107, -11, 115, -13, -73,};
-
- /**
- * The limit is the maximum number of directories managed by this store.
- * This number must be power of 2 and do not exceed 256. The location
- * should be an existing valid directory.
- */
- public BlobStore(URI store, int limit) {
- Assert.isNotNull(store);
- this.store = store;
- fileBased = "file".equalsIgnoreCase(store.getScheme()); //$NON-NLS-1$
- if (fileBased)
- Assert.isTrue(!URIUtil.toFile(store).isFile());
- Assert.isTrue(limit == 256 || limit == 128 || limit == 64 || limit == 32 || limit == 16 || limit == 8 || limit == 4 || limit == 2 || limit == 1);
- mask = (byte) (limit - 1);
- }
-
- public OutputStream getOutputStream(byte[] uuid) throws IOException {
- if (!fileBased)
- return null;
- new File(folderFor(uuid)).mkdir();
- return new FileOutputStream(URIUtil.toFile(fileFor(uuid)));
- }
-
- /* (non-Javadoc)
- * @see UniversalUniqueIdentifier#appendByteString(StringBuffer, byte)
- */
- private void appendByteString(StringBuffer buffer, byte value) {
- String hexString;
- if (value < 0)
- hexString = Integer.toHexString(256 + value);
- else
- hexString = Integer.toHexString(value);
- if (hexString.length() == 1)
- buffer.append("0"); //$NON-NLS-1$
- buffer.append(hexString);
- }
-
- /* (non-Javadoc)
- * Converts an array of bytes into a String.
- *
- * @see UniversalUniqueIdentifier#toString()
- */
- private String bytesToHexString(byte[] b) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < b.length; i++)
- appendByteString(buffer, b[i]);
- return buffer.toString();
- }
-
- /**
- * Deletes a blobFile.
- */
- public void deleteBlob(byte[] uuid) {
- Assert.isNotNull(uuid);
- if (fileBased)
- new File(fileFor(uuid)).delete();
- }
-
- /**
- * Delete all of the blobs in the given set.
- */
- public void deleteBlobs(Set set) {
- for (Iterator i = set.iterator(); i.hasNext();)
- deleteBlob((byte[]) i.next());
- }
-
- public URI fileFor(byte[] uuid) {
- return URIUtil.append(folderFor(uuid), bytesToHexString(uuid));
- }
-
- /**
- * Find out the name of the directory that fits better to this UUID.
- */
- public URI folderFor(byte[] uuid) {
- byte hash = hashUUIDbytes(uuid);
- hash &= mask; // limit the range of the directory
- return URIUtil.append(store, Integer.toHexString(hash + (128 & mask)) + '/'); // +(128 & mask) makes sure 00h is the lower value
- }
-
- public InputStream getBlob(byte[] uuid) throws IOException {
- return URIUtil.toURL(fileFor(uuid)).openStream();
- }
-
- /**
- * Converts a byte array into a byte hash representation. It is used to
- * get a directory name.
- */
- protected byte hashUUIDbytes(byte[] uuid) {
- byte hash = 0;
- for (int i = 0; i < uuid.length; i++)
- hash ^= randomArray[uuid[i] + 128]; // +128 makes sure the index is >0
- return hash;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/DownloadJob.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/DownloadJob.java
deleted file mode 100644
index 0001a2804..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/DownloadJob.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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 maintenance
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository.simple;
-
-import java.util.LinkedList;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRequest;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRequest;
-
-public class DownloadJob extends Job {
- static final Object FAMILY = new Object();
-
- private LinkedList requestsPending;
- private SimpleArtifactRepository repository;
- private IProgressMonitor masterMonitor;
- private MultiStatus overallStatus;
-
- DownloadJob(String name) {
- super(name);
- setSystem(true);
- }
-
- void initialize(SimpleArtifactRepository repository, LinkedList requestsPending, IProgressMonitor masterMonitor, MultiStatus overallStatus) {
- this.repository = repository;
- this.requestsPending = requestsPending;
- this.masterMonitor = masterMonitor;
- this.overallStatus = overallStatus;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
- */
- public boolean belongsTo(Object family) {
- return family == FAMILY;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus run(IProgressMonitor jobMonitor) {
- jobMonitor.beginTask("Downloading software", IProgressMonitor.UNKNOWN);
- do {
- // get the request we are going to process
- IArtifactRequest request;
- synchronized (requestsPending) {
- if (requestsPending.isEmpty())
- break;
- request = (IArtifactRequest) requestsPending.removeFirst();
- }
- if (masterMonitor.isCanceled())
- return Status.CANCEL_STATUS;
- // process the actual request
- SubProgressMonitor subMonitor = new SubProgressMonitor(masterMonitor, 1);
- subMonitor.beginTask("", 1); //$NON-NLS-1$
- try {
- IStatus status = repository.getArtifact((ArtifactRequest) request, subMonitor);
- if (!status.isOK()) {
- synchronized (overallStatus) {
- overallStatus.add(status);
- }
- }
- } finally {
- subMonitor.done();
- }
- } while (true);
-
- jobMonitor.done();
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/Mapper.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/Mapper.java
deleted file mode 100644
index de962a7c7..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/Mapper.java
+++ /dev/null
@@ -1,138 +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) - various ongoing maintenance
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository.simple;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Dictionary;
-import java.util.Hashtable;
-import org.eclipse.core.runtime.URIUtil;
-import org.osgi.framework.*;
-
-public class Mapper {
- private Filter[] filters;
- private String[] outputStrings;
-
- private static final String REPOURL = "repoUrl"; //$NON-NLS-1$
- private static final String CLASSIFIER = "classifier"; //$NON-NLS-1$
- private static final String FORMAT = "format"; //$NON-NLS-1$
- private static final String ID = "id"; //$NON-NLS-1$
- private static final String VERSION = "version"; //$NON-NLS-1$
-
- public Mapper() {
- filters = new Filter[0];
- outputStrings = new String[0];
- }
-
- /**
- * mapping rule: LDAP filter --> output value
- * the more specific filters should be given first.
- */
- public void initialize(BundleContext ctx, String[][] mappingRules) {
- filters = new Filter[mappingRules.length];
- outputStrings = new String[mappingRules.length];
- for (int i = 0; i < mappingRules.length; i++) {
- try {
- filters[i] = ctx.createFilter(mappingRules[i][0]);
- outputStrings[i] = mappingRules[i][1];
- } catch (InvalidSyntaxException e) {
- //TODO Neeed to process this
- e.printStackTrace();
- }
- }
- }
-
- public URI map(URI repositoryLocation, String classifier, String id, String version, String format) {
- String locationString = URIUtil.toUnencodedString(repositoryLocation);
- Dictionary values = new Hashtable(5);
- if (repositoryLocation != null)
- values.put(REPOURL, locationString);
-
- if (classifier != null)
- values.put(CLASSIFIER, classifier);
-
- if (id != null)
- values.put(ID, id);
-
- if (version != null)
- values.put(VERSION, version);
-
- if (format != null)
- values.put(FORMAT, format);
-
- for (int i = 0; i < filters.length; i++) {
- if (filters[i].match(values))
- return doReplacement(outputStrings[i], locationString, classifier, id, version, format);
- }
- return null;
- }
-
- private URI doReplacement(String pattern, String repoLocation, String classifier, String id, String version, String format) {
- try {
- // currently our mapping rules assume the repo URL is not "/" terminated.
- // This may be the case for repoURLs in the root of a URL space e.g. root of a jar file or file:/c:/
- if (repoLocation.endsWith("/")) //$NON-NLS-1$
- repoLocation = repoLocation.substring(0, repoLocation.length() - 1);
-
- StringBuffer output = new StringBuffer(pattern);
- int index = 0;
- while (index < output.length()) {
- int beginning = output.indexOf("${", index); //$NON-NLS-1$
- if (beginning == -1)
- return URIUtil.fromString(output.toString());
-
- int end = output.indexOf("}", beginning); //$NON-NLS-1$
- if (end == -1)
- return URIUtil.fromString(pattern);
-
- String varName = output.substring(beginning + 2, end);
- String varValue = null;
- if (varName.equalsIgnoreCase(CLASSIFIER)) {
- varValue = classifier;
- } else if (varName.equalsIgnoreCase(ID)) {
- varValue = id;
- } else if (varName.equalsIgnoreCase(VERSION)) {
- varValue = version;
- } else if (varName.equalsIgnoreCase(REPOURL)) {
- varValue = repoLocation;
- } else if (varName.equalsIgnoreCase(FORMAT)) {
- varValue = format;
- }
- if (varValue == null)
- varValue = ""; //$NON-NLS-1$
-
- output.replace(beginning, end + 1, varValue);
- index = beginning + varValue.length();
- }
- return URIUtil.fromString(output.toString());
- } catch (URISyntaxException e) {
- return null;
- }
- }
-
- public String toString() {
- StringBuffer result = new StringBuffer();
- for (int i = 0; i < filters.length; i++) {
- result.append(filters[i]).append('-').append('>').append(outputStrings[i]).append('\n');
- }
- return result.toString();
- }
-
- public String[][] serialize() {
- String[][] result = new String[filters.length][2];
- for (int i = 0; i < filters.length; i++) {
- result[i][0] = filters[i].toString();
- result[i][1] = outputStrings[i];
- }
- return result;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
deleted file mode 100644
index fc225be63..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
+++ /dev/null
@@ -1,952 +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 - support for multi-threaded downloads
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository.simple;
-
-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.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.p2.artifact.processors.md5.MD5Verifier;
-import org.eclipse.equinox.internal.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.repository.RepositoryTransport;
-import org.eclipse.equinox.internal.p2.repository.Transport;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
-import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.AbstractArtifactRepository;
-import org.eclipse.osgi.util.NLS;
-
-public class SimpleArtifactRepository extends AbstractArtifactRepository implements IArtifactRepository, IFileArtifactRepository {
- /**
- * A boolean property controlling whether mirroring is enabled.
- */
- public static final boolean MIRRORS_ENABLED = !"false".equals(Activator.getContext().getProperty("eclipse.p2.mirrors")); //$NON-NLS-1$//$NON-NLS-2$
-
- public static final boolean MD5_CHECK_ENABLED = !"false".equals(Activator.getContext().getProperty("eclipse.p2.MD5Check")); //$NON-NLS-1$//$NON-NLS-2$
-
- /**
- * The key for a integer property controls the maximum number
- * of threads that should be used when optimizing downloads from a remote
- * artifact repository.
- */
- public static final String PROP_MAX_THREADS = "eclipse.p2.max.threads"; //$NON-NLS-1$
-
- /**
- * Allows override of whether threading should be used.
- */
- public static final String PROP_FORCE_THREADING = "eclipse.p2.force.threading"; //$NON-NLS-1$
-
- public class ArtifactOutputStream extends OutputStream implements IStateful {
- private boolean closed;
- private long count = 0;
- private IArtifactDescriptor descriptor;
- private OutputStream destination;
- private File file;
- private IStatus status = Status.OK_STATUS;
- private OutputStream firstLink;
-
- public ArtifactOutputStream(OutputStream os, IArtifactDescriptor descriptor) {
- this(os, descriptor, null);
- }
-
- public ArtifactOutputStream(OutputStream os, IArtifactDescriptor descriptor, File file) {
- this.destination = os;
- this.descriptor = descriptor;
- this.file = file;
- }
-
- public void close() throws IOException {
- if (closed)
- return;
- closed = true;
-
- try {
- destination.close();
- } catch (IOException e) {
- // cleanup if possible
- if (file != null)
- delete(file);
- if (getStatus().isOK())
- throw e;
- // if the stream has already been e.g. canceled, we can return - the status is already set correctly
- return;
- }
- // if the steps ran ok and there was actual content, write the artifact descriptor
- // TODO the count check is a bit bogus but helps in some error cases (e.g., the optimizer)
- // where errors occurred in a processing step earlier in the chain. We likely need a better
- // or more explicit way of handling this case.
- OutputStream testStream = firstLink == null ? this : firstLink;
- if (ProcessingStepHandler.checkStatus(testStream).isOK() && count > 0) {
- ((ArtifactDescriptor) descriptor).setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, Long.toString(count));
- addDescriptor(descriptor);
- } else if (file != null)
- // cleanup if possible
- delete(file);
- }
-
- public IStatus getStatus() {
- return status;
- }
-
- public OutputStream getDestination() {
- return destination;
- }
-
- public void setStatus(IStatus status) {
- this.status = status == null ? Status.OK_STATUS : status;
- }
-
- public void write(byte[] b) throws IOException {
- destination.write(b);
- count += b.length;
- }
-
- public void write(byte[] b, int off, int len) throws IOException {
- destination.write(b, off, len);
- count += len;
- }
-
- public void write(int b) throws IOException {
- destination.write(b);
- count++;
- }
-
- public void setFirstLink(OutputStream value) {
- firstLink = value;
- }
- }
-
- // TODO: optimize
- // we could stream right into the folder
- public static class ZippedFolderOutputStream extends OutputStream {
-
- private final File folder;
- private final FileOutputStream fos;
- private final File zipFile;
-
- public ZippedFolderOutputStream(File folder) throws IOException {
- this.folder = folder;
- zipFile = File.createTempFile(folder.getName(), JAR_EXTENSION, null);
- fos = new FileOutputStream(zipFile);
- }
-
- public void close() throws IOException {
- fos.close();
- try {
- FileUtils.unzipFile(zipFile, folder);
- } finally {
- zipFile.delete();
- }
- }
-
- public void flush() throws IOException {
- fos.flush();
- }
-
- public String toString() {
- return fos.toString();
- }
-
- public void write(byte[] b) throws IOException {
- fos.write(b);
- }
-
- public void write(byte[] b, int off, int len) throws IOException {
- fos.write(b, off, len);
- }
-
- public void write(int b) throws IOException {
- fos.write(b);
- }
- }
-
- private static final String ARTIFACT_FOLDER = "artifact.folder"; //$NON-NLS-1$
- private static final String ARTIFACT_UUID = "artifact.uuid"; //$NON-NLS-1$
- static final private String BLOBSTORE = ".blobstore/"; //$NON-NLS-1$
- static final private String CONTENT_FILENAME = "artifacts"; //$NON-NLS-1$
- static final private String[][] PACKED_MAPPING_RULES = { {"(& (classifier=osgi.bundle) (format=packed))", "${repoUrl}/plugins/${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) (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$
-
- static final private String[][] DEFAULT_MAPPING_RULES = { {"(& (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$
- private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
- static final private String REPOSITORY_TYPE = IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY;
-
- static final private Integer REPOSITORY_VERSION = new Integer(1);
- private static final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
- protected Set artifactDescriptors = new HashSet();
- protected Map artifactMap = new HashMap();
- private transient BlobStore blobStore;
- transient private Mapper mapper = new Mapper();
-
- static final private String PACKED_FORMAT = "packed"; //$NON-NLS-1$
- static final private String PUBLISH_PACK_FILES_AS_SIBLINGS = "publishPackFilesAsSiblings"; //$NON-NLS-1$
-
- private static final int DEFAULT_MAX_THREADS = 4;
-
- protected String[][] mappingRules = DEFAULT_MAPPING_RULES;
-
- private MirrorSelector mirrors;
-
- static void delete(File toDelete) {
- if (toDelete.isDirectory()) {
- File[] children = toDelete.listFiles();
- if (children != null) {
- for (int i = 0; i < children.length; i++) {
- delete(children[i]);
- }
- }
- }
- toDelete.delete();
- }
-
- public static URI getActualLocation(URI base, boolean compress) throws IOException {
- return getActualLocation(base, compress ? JAR_EXTENSION : XML_EXTENSION);
- }
-
- private static URI getActualLocation(URI base, String extension) throws IOException {
- final String name = CONTENT_FILENAME + extension;
- String spec = base.toString();
- if (spec.endsWith(name))
- return base;
- if (spec.endsWith("/")) //$NON-NLS-1$
- spec += name;
- else
- spec += "/" + name; //$NON-NLS-1$
- try {
- return new URI(spec);
- } catch (URISyntaxException e) {
- throw new IOException(NLS.bind(Messages.io_invalidLocation, spec));
- }
- }
-
- public static URI getBlobStoreLocation(URI base) {
- return URIUtil.append(base, BLOBSTORE);
- }
-
- /*
- * This is only called by the parser when loading a repository.
- */
- SimpleArtifactRepository(String name, String type, String version, String description, String provider, Set artifacts, String[][] mappingRules, Map properties) {
- super(name, type, version, null, description, provider, properties);
- this.artifactDescriptors.addAll(artifacts);
- this.mappingRules = mappingRules;
- for (Iterator it = artifactDescriptors.iterator(); it.hasNext();)
- mapDescriptor((IArtifactDescriptor) it.next());
- }
-
- private void mapDescriptor(IArtifactDescriptor descriptor) {
- IArtifactKey key = descriptor.getArtifactKey();
- Collection descriptors = (Collection) artifactMap.get(key);
- if (descriptors == null) {
- descriptors = new ArrayList();
- artifactMap.put(key, descriptors);
- }
- descriptors.add(descriptor);
- }
-
- private void unmapDescriptor(IArtifactDescriptor descriptor) {
- IArtifactKey key = descriptor.getArtifactKey();
- Collection descriptors = (Collection) artifactMap.get(key);
- if (descriptors == null)
- return;
-
- descriptors.remove(descriptor);
- if (descriptors.isEmpty())
- artifactMap.remove(key);
- }
-
- public SimpleArtifactRepository(String repositoryName, URI location, Map properties) {
- super(repositoryName, REPOSITORY_TYPE, REPOSITORY_VERSION.toString(), location, null, null, properties);
- initializeAfterLoad(location);
- if (properties != null) {
- if (properties.containsKey(PUBLISH_PACK_FILES_AS_SIBLINGS)) {
- synchronized (this) {
- String newValue = (String) properties.get(PUBLISH_PACK_FILES_AS_SIBLINGS);
- if (Boolean.TRUE.toString().equals(newValue)) {
- mappingRules = PACKED_MAPPING_RULES;
- } else {
- mappingRules = DEFAULT_MAPPING_RULES;
- }
- initializeMapper();
- }
- }
- }
- save();
- }
-
- public synchronized void addDescriptor(IArtifactDescriptor toAdd) {
- // TODO perhaps the argument here should be ArtifactDescriptor. IArtifactDescriptors are for
- // people who are reading the repository.
- // TODO: here we may want to ensure that the artifact has not been added concurrently
- ((ArtifactDescriptor) toAdd).setRepository(this);
- artifactDescriptors.add(toAdd);
- mapDescriptor(toAdd);
- save();
- }
-
- public synchronized void addDescriptors(IArtifactDescriptor[] descriptors) {
-
- for (int i = 0; i < descriptors.length; i++) {
- ((ArtifactDescriptor) descriptors[i]).setRepository(this);
- artifactDescriptors.add(descriptors[i]);
- mapDescriptor(descriptors[i]);
- }
- save();
- }
-
- private synchronized OutputStream addPostSteps(ProcessingStepHandler handler, IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- ArrayList steps = new ArrayList();
- steps.add(new SignatureVerifier());
- if (steps.isEmpty())
- return destination;
- ProcessingStep[] stepArray = (ProcessingStep[]) steps.toArray(new ProcessingStep[steps.size()]);
- // TODO should probably be using createAndLink here
- return handler.link(stepArray, destination, monitor);
- }
-
- private OutputStream addPreSteps(ProcessingStepHandler handler, IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- ArrayList steps = new ArrayList();
- if (IArtifactDescriptor.TYPE_ZIP.equals(descriptor.getProperty(IArtifactDescriptor.DOWNLOAD_CONTENTTYPE)))
- steps.add(new ZipVerifierStep());
- if (MD5_CHECK_ENABLED && descriptor.getProperty(IArtifactDescriptor.DOWNLOAD_MD5) != null)
- steps.add(new MD5Verifier(descriptor.getProperty(IArtifactDescriptor.DOWNLOAD_MD5)));
- // Add steps here if needed
- if (steps.isEmpty())
- return destination;
- ProcessingStep[] stepArray = (ProcessingStep[]) steps.toArray(new ProcessingStep[steps.size()]);
- // TODO should probably be using createAndLink here
- return handler.link(stepArray, destination, monitor);
- }
-
- private byte[] bytesFromHexString(String string) {
- byte[] bytes = new byte[UniversalUniqueIdentifier.BYTES_SIZE];
- for (int i = 0; i < string.length(); i += 2) {
- String byteString = string.substring(i, i + 2);
- bytes[i / 2] = (byte) Integer.parseInt(byteString, 16);
- }
- return bytes;
- }
-
- private String bytesToHexString(byte[] bytes) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < bytes.length; i++) {
- String hexString;
- if (bytes[i] < 0)
- hexString = Integer.toHexString(256 + bytes[i]);
- else
- hexString = Integer.toHexString(bytes[i]);
- if (hexString.length() == 1)
- buffer.append("0"); //$NON-NLS-1$
- buffer.append(hexString);
- }
- return buffer.toString();
- }
-
- public synchronized boolean contains(IArtifactDescriptor descriptor) {
- return artifactDescriptors.contains(descriptor);
- }
-
- public synchronized boolean contains(IArtifactKey key) {
- return artifactMap.containsKey(key);
- }
-
- public synchronized URI createLocation(ArtifactDescriptor descriptor) {
- if (flatButPackedEnabled(descriptor)) {
- return getLocationForPackedButFlatArtifacts(descriptor);
- }
- // if the descriptor is canonical, clear out any UUID that might be set and use the Mapper
- if (descriptor.getProcessingSteps().length == 0) {
- descriptor.setProperty(ARTIFACT_UUID, null);
- IArtifactKey key = descriptor.getArtifactKey();
- URI result = mapper.map(location, key.getClassifier(), key.getId(), key.getVersion().toString(), descriptor.getProperty(IArtifactDescriptor.FORMAT));
- if (result != null) {
- if (isFolderBased(descriptor) && URIUtil.lastSegment(result).endsWith(JAR_EXTENSION)) {
- return URIUtil.removeFileExtension(result);
- }
- return result;
- }
- }
-
- // Otherwise generate a location by creating a UUID, remembering it in the properties
- // and computing the location
- byte[] bytes = new UniversalUniqueIdentifier().toBytes();
- descriptor.setProperty(ARTIFACT_UUID, bytesToHexString(bytes));
- return blobStore.fileFor(bytes);
- }
-
- /**
- * Removes the given descriptor, and the physical artifact corresponding
- * to that descriptor. Returns <code>true</code> if and only if the
- * descriptor existed in the repository, and was successfully removed.
- */
- private boolean doRemoveArtifact(IArtifactDescriptor descriptor) {
- if (((ArtifactDescriptor) descriptor).getRepositoryProperty(ArtifactDescriptor.ARTIFACT_REFERENCE) == null) {
- File file = getArtifactFile(descriptor);
- if (file == null)
- return false;
- delete(file);
- if (file.exists())
- return false;
- }
- boolean result = artifactDescriptors.remove(descriptor);
- if (result)
- unmapDescriptor(descriptor);
-
- return result;
- }
-
- protected IStatus downloadArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- if (isFolderBased(descriptor)) {
- File artifactFolder = getArtifactFile(descriptor);
- if (artifactFolder == null) {
- if (getLocation(descriptor) != null && !URIUtil.isFileURI(getLocation(descriptor)))
- return reportStatus(descriptor, destination, new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.folder_artifact_not_file_repo, descriptor.getArtifactKey())));
- return reportStatus(descriptor, destination, new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.artifact_not_found, descriptor.getArtifactKey())));
- }
- // TODO: optimize and ensure manifest is written first
- File zipFile = null;
- try {
- zipFile = File.createTempFile(artifactFolder.getName(), JAR_EXTENSION, null);
- FileUtils.zip(artifactFolder.listFiles(), null, zipFile, FileUtils.createRootPathComputer(artifactFolder));
- FileInputStream fis = new FileInputStream(zipFile);
- FileUtils.copyStream(fis, true, destination, false);
- } catch (IOException e) {
- return reportStatus(descriptor, destination, new Status(IStatus.ERROR, Activator.ID, e.getMessage()));
- } finally {
- if (zipFile != null)
- zipFile.delete();
- }
- return reportStatus(descriptor, destination, Status.OK_STATUS);
- }
-
- //download from the best available mirror
- URI baseLocation = getLocation(descriptor);
- if (baseLocation == null)
- return new Status(IStatus.ERROR, Activator.ID, "Can not find the location of " + descriptor);
- URI mirrorLocation = getMirror(baseLocation, monitor);
- IStatus status = downloadArtifact(descriptor, mirrorLocation, destination, monitor);
- IStatus result = reportStatus(descriptor, destination, status);
- // if the original download went reasonably but the reportStatus found some issues
- // (e..g, in the processing steps/validators) then mark the mirror as bad and return
- // a retry code (assuming we have more mirrors)
- if ((status.isOK() || status.matches(IStatus.INFO | IStatus.WARNING)) && result.getSeverity() == IStatus.ERROR) {
- if (mirrors != null) {
- mirrors.reportResult(mirrorLocation.toString(), result);
- if (mirrors.hasValidMirror())
- return new MultiStatus(Activator.ID, CODE_RETRY, new IStatus[] {result}, "Retry another mirror", null); //$NON-NLS-1$
- }
- }
- // if the original status was a retry, don't lose that.
- return status.getCode() == CODE_RETRY ? status : result;
- }
-
- private IStatus downloadArtifact(IArtifactDescriptor descriptor, URI mirrorLocation, OutputStream destination, IProgressMonitor monitor) {
- IStatus result = getTransport().download(mirrorLocation, destination, monitor);
- if (mirrors != null)
- mirrors.reportResult(mirrorLocation.toString(), result);
- if (result.isOK() || result.getSeverity() == IStatus.CANCEL)
- return result;
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- // If there are more valid mirrors then return an error with a special code that tells the caller
- // to keep trying. Note that the message in the status is largely irrelevant but the child
- // status tells the story of why we failed on this try.
- // TODO find a better way of doing this.
- if (mirrors != null && mirrors.hasValidMirror())
- return new MultiStatus(Activator.ID, CODE_RETRY, new IStatus[] {result}, "Retry another mirror", null); //$NON-NLS-1$
- return result;
- }
-
- /**
- * Returns an equivalent mirror location for the given artifact location.
- * @param baseLocation The location of the artifact in this repository
- * @return the Location of the artifact in this repository, or an equivalent mirror
- */
- private synchronized URI getMirror(URI baseLocation, IProgressMonitor monitor) {
- if (!MIRRORS_ENABLED || (!isForceThreading() && isLocal()))
- return baseLocation;
- if (mirrors == null)
- mirrors = new MirrorSelector(this);
- return mirrors.getMirrorLocation(baseLocation, monitor);
- }
-
- public Object getAdapter(Class adapter) {
- // if we are adapting to file or writable repositories then make sure we have a file location
- if (adapter == IFileArtifactRepository.class)
- if (!isLocal())
- return null;
- return super.getAdapter(adapter);
- }
-
- IStatus getArtifact(ArtifactRequest request, IProgressMonitor monitor) {
- request.setSourceRepository(this);
- request.perform(monitor);
- return request.getResult();
- }
-
- public IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- ProcessingStepHandler handler = new ProcessingStepHandler();
- destination = processDestination(handler, descriptor, destination, monitor);
- IStatus status = ProcessingStepHandler.checkStatus(destination);
- if (!status.isOK() && status.getSeverity() != IStatus.INFO)
- return status;
-
- return downloadArtifact(descriptor, destination, monitor);
- }
-
- public IStatus getRawArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- return downloadArtifact(descriptor, destination, monitor);
- }
-
- public synchronized IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key) {
- Collection result = (Collection) artifactMap.get(key);
- if (result == null)
- return new IArtifactDescriptor[0];
-
- return (IArtifactDescriptor[]) result.toArray(new IArtifactDescriptor[result.size()]);
- }
-
- public File getArtifactFile(IArtifactDescriptor descriptor) {
- URI result = getLocation(descriptor);
- if (result == null || !URIUtil.isFileURI(result))
- return null;
- return URIUtil.toFile(result);
- }
-
- public File getArtifactFile(IArtifactKey key) {
- IArtifactDescriptor descriptor = getCompleteArtifactDescriptor(key);
- if (descriptor == null)
- return null;
- return getArtifactFile(descriptor);
- }
-
- public synchronized IArtifactKey[] getArtifactKeys() {
- // there may be more descriptors than keys to collect up the unique keys
- return (IArtifactKey[]) artifactMap.keySet().toArray(new IArtifactKey[artifactMap.keySet().size()]);
- }
-
- public IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor) {
- final MultiStatus overallStatus = new MultiStatus(Activator.ID, IStatus.OK, null, null);
- LinkedList requestsPending = new LinkedList(Arrays.asList(requests));
-
- int numberOfJobs = Math.min(requests.length, getMaximumThreads());
- if (numberOfJobs <= 1 || (!isForceThreading() && isLocal())) {
- SubMonitor subMonitor = SubMonitor.convert(monitor, requests.length);
- try {
- for (int i = 0; i < requests.length; i++) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- IStatus result = getArtifact((ArtifactRequest) requests[i], subMonitor.newChild(1));
- if (!result.isOK())
- overallStatus.add(result);
- }
- } finally {
- subMonitor.done();
- }
- } else {
- // initialize the various jobs needed to process the get artifact requests
- monitor.beginTask(NLS.bind(Messages.sar_downloading, Integer.toString(requests.length)), requests.length);
- try {
- DownloadJob jobs[] = new DownloadJob[numberOfJobs];
- for (int i = 0; i < numberOfJobs; i++) {
- jobs[i] = new DownloadJob(Messages.sar_downloadJobName + i);
- jobs[i].initialize(this, requestsPending, monitor, overallStatus);
- jobs[i].schedule();
- }
- // wait for all the jobs to complete
- try {
- Job.getJobManager().join(DownloadJob.FAMILY, null);
- } catch (InterruptedException e) {
- //ignore
- }
- } finally {
- monitor.done();
- }
- }
- return (monitor.isCanceled() ? Status.CANCEL_STATUS : overallStatus);
- }
-
- public synchronized IArtifactDescriptor getCompleteArtifactDescriptor(IArtifactKey key) {
- Collection descriptors = (Collection) artifactMap.get(key);
- if (descriptors == null)
- return null;
-
- for (Iterator iterator = descriptors.iterator(); iterator.hasNext();) {
- IArtifactDescriptor desc = (IArtifactDescriptor) iterator.next();
- // look for a descriptor that matches the key and is "complete"
- if (desc.getArtifactKey().equals(key) && desc.getProcessingSteps().length == 0)
- return desc;
- }
- return null;
- }
-
- public synchronized Set getDescriptors() {
- return artifactDescriptors;
- }
-
- /**
- * Typically non-canonical forms of the artifact are stored in the blob store.
- * However, we support having the pack200 files alongside the canonical artifact
- * for compatibility with the format used in optimized update sites. We call
- * this arrangement "flat but packed".
- */
- private boolean flatButPackedEnabled(IArtifactDescriptor descriptor) {
- return Boolean.TRUE.toString().equals(getProperties().get(PUBLISH_PACK_FILES_AS_SIBLINGS)) && PACKED_FORMAT.equals(descriptor.getProperty(IArtifactDescriptor.FORMAT));
- }
-
- /**
- * @see #flatButPackedEnabled(IArtifactDescriptor)
- */
- private URI getLocationForPackedButFlatArtifacts(IArtifactDescriptor descriptor) {
- IArtifactKey key = descriptor.getArtifactKey();
- return mapper.map(location, key.getClassifier(), key.getId(), key.getVersion().toString(), descriptor.getProperty(IArtifactDescriptor.FORMAT));
- }
-
- public synchronized URI getLocation(IArtifactDescriptor descriptor) {
- // if the artifact has a uuid then use it
- String uuid = descriptor.getProperty(ARTIFACT_UUID);
- if (uuid != null)
- return blobStore.fileFor(bytesFromHexString(uuid));
-
- if (flatButPackedEnabled(descriptor)) {
- return getLocationForPackedButFlatArtifacts(descriptor);
- }
-
- try {
- // if the artifact is just a reference then return the reference location
- if (descriptor instanceof ArtifactDescriptor) {
- String artifactReference = ((ArtifactDescriptor) descriptor).getRepositoryProperty(ArtifactDescriptor.ARTIFACT_REFERENCE);
- if (artifactReference != null) {
- try {
- return new URI(artifactReference);
- } catch (URISyntaxException e) {
- return URIUtil.fromString(artifactReference);
- }
- }
- }
-
- // if the descriptor is complete then use the mapping rules...
- if (descriptor.getProcessingSteps().length == 0) {
- IArtifactKey key = descriptor.getArtifactKey();
- URI result = mapper.map(location, key.getClassifier(), key.getId(), key.getVersion().toString(), descriptor.getProperty(IArtifactDescriptor.FORMAT));
- if (result != null) {
- if (isFolderBased(descriptor) && URIUtil.lastSegment(result).endsWith(JAR_EXTENSION))
- return URIUtil.removeFileExtension(result);
-
- return result;
- }
- }
- } catch (URISyntaxException e) {
- return null;
- }
- // in the end there is not enough information so return null
- return null;
- }
-
- /**
- * Returns the maximum number of concurrent download threads.
- */
- private int getMaximumThreads() {
- try {
- String maxThreadString = (String) getProperties().get(PROP_MAX_THREADS);
- if (maxThreadString != null)
- return Math.max(1, Integer.parseInt(maxThreadString));
- } catch (NumberFormatException nfe) {
- // return default number of threads
- }
- return DEFAULT_MAX_THREADS;
- }
-
- public OutputStream getOutputStream(IArtifactDescriptor descriptor) throws ProvisionException {
- assertModifiable();
-
- // Create a copy of the original descriptor that we can manipulate and add to our repo.
- ArtifactDescriptor newDescriptor = new ArtifactDescriptor(descriptor);
- if (isFolderBased(descriptor))
- newDescriptor.setRepositoryProperty(ARTIFACT_FOLDER, Boolean.TRUE.toString());
-
- // Check if the artifact is already in this repository, check the newDescriptor instead of the original
- // since the implementation of hash/equals on the descriptor matters here.
- if (contains(newDescriptor)) {
- String msg = NLS.bind(Messages.available_already_in, getLocation().toString());
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.ARTIFACT_EXISTS, msg, null));
- }
-
- // Determine writing location
- URI newLocation = createLocation(newDescriptor);
- if (newLocation == null)
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, "No location for " + newDescriptor));
- String file = URIUtil.toFile(newLocation).getAbsolutePath();
-
- // TODO at this point we have to assume that the repository is file-based. Eventually
- // we should end up with writeable URLs...
- // Make sure that the file does not exist and that the parents do
- File outputFile = new File(file);
- if (outputFile.exists()) {
- System.err.println("Artifact repository out of sync. Overwriting " + outputFile.getAbsoluteFile()); //$NON-NLS-1$
- delete(outputFile);
- }
-
- OutputStream target = null;
- try {
- if (isFolderBased(newDescriptor)) {
- mkdirs(outputFile);
- if (!outputFile.isDirectory())
- throw failedWrite(new IOException(NLS.bind(Messages.sar_failedMkdir, outputFile.toString())));
- target = new ZippedFolderOutputStream(outputFile);
- } else {
- // file based
- File parent = outputFile.getParentFile();
- parent.mkdirs();
- if (!parent.isDirectory())
- throw failedWrite(new IOException(NLS.bind(Messages.sar_failedMkdir, parent.toString())));
- target = new FileOutputStream(file);
- }
-
- // finally create and return an output stream suitably wrapped so that when it is
- // closed the repository is updated with the descriptor
- return new ArtifactOutputStream(new BufferedOutputStream(target), newDescriptor, outputFile);
- } catch (IOException e) {
- throw failedWrite(e);
- }
-
- }
-
- /**
- * We implement mkdirs ourselves because this code is known to run in
- * highly concurrent scenarios, and there is a race condition in the JRE implementation
- * of mkdirs (see bug 265654).
- */
- private void mkdirs(File dir) {
- if (dir == null || dir.exists())
- return;
- if (dir.mkdir())
- return;
- mkdirs(dir.getParentFile());
- dir.mkdir();
- }
-
- private ProvisionException failedWrite(Exception e) throws ProvisionException {
- String msg = NLS.bind(Messages.repoFailedWrite, getLocation());
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_WRITE, msg, e));
- }
-
- public synchronized String[][] getRules() {
- return mappingRules;
- }
-
- private Transport getTransport() {
- return RepositoryTransport.getInstance();
- }
-
- // use this method to setup any transient fields etc after the object has been restored from a stream
- public synchronized void initializeAfterLoad(URI location) {
- this.location = location;
- blobStore = new BlobStore(getBlobStoreLocation(location), 128);
- initializeMapper();
- for (Iterator i = artifactDescriptors.iterator(); i.hasNext();) {
- ((ArtifactDescriptor) i.next()).setRepository(this);
- }
- }
-
- private synchronized void initializeMapper() {
- mapper = new Mapper();
- mapper.initialize(Activator.getContext(), mappingRules);
- }
-
- private boolean isFolderBased(IArtifactDescriptor descriptor) {
- // if the artifact is just a reference then return the reference location
- if (descriptor instanceof ArtifactDescriptor) {
- String useArtifactFolder = ((ArtifactDescriptor) descriptor).getRepositoryProperty(ARTIFACT_FOLDER);
- if (useArtifactFolder != null)
- return Boolean.valueOf(useArtifactFolder).booleanValue();
- }
- //TODO: refactor this when the artifact folder property is consistently set in repository properties
- return Boolean.valueOf(descriptor.getProperty(ARTIFACT_FOLDER)).booleanValue();
- }
-
- private boolean isForceThreading() {
- return "true".equals(getProperties().get(PROP_FORCE_THREADING)); //$NON-NLS-1$
- }
-
- private boolean isLocal() {
- return "file".equalsIgnoreCase(location.getScheme()); //$NON-NLS-1$
- }
-
- public boolean isModifiable() {
- return isLocal();
- }
-
- public OutputStream processDestination(ProcessingStepHandler handler, IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- destination = addPostSteps(handler, descriptor, destination, monitor);
- destination = handler.createAndLink(descriptor.getProcessingSteps(), descriptor, destination, monitor);
- destination = addPreSteps(handler, descriptor, destination, monitor);
- return destination;
- }
-
- public synchronized void removeAll() {
- IArtifactDescriptor[] toRemove = (IArtifactDescriptor[]) artifactDescriptors.toArray(new IArtifactDescriptor[artifactDescriptors.size()]);
- boolean changed = false;
- for (int i = 0; i < toRemove.length; i++)
- changed |= doRemoveArtifact(toRemove[i]);
- if (changed)
- save();
- }
-
- public synchronized void removeDescriptor(IArtifactDescriptor descriptor) {
- if (doRemoveArtifact(descriptor))
- save();
- }
-
- public synchronized void removeDescriptor(IArtifactKey key) {
- IArtifactDescriptor[] toRemove = getArtifactDescriptors(key);
- boolean changed = false;
- for (int i = 0; i < toRemove.length; i++)
- changed |= doRemoveArtifact(toRemove[i]);
- if (changed)
- save();
- }
-
- private IStatus reportStatus(IArtifactDescriptor descriptor, OutputStream destination, IStatus status) {
- // If the destination is just a normal stream then the status is simple. Just return
- // it and do not close the destination
- if (!(destination instanceof ProcessingStep))
- return status;
-
- // If the destination is a processing step then close the stream to flush the data through all
- // the steps. then collect up the status from all the steps and return
- try {
- destination.close();
- } catch (IOException e) {
- return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.sar_reportStatus, descriptor.getArtifactKey().toExternalForm()), e);
- }
-
- // An error occurred obtaining the artifact, ProcessingStep errors aren't important
- if (status.matches(IStatus.ERROR))
- return status;
-
- IStatus stepStatus = ProcessingStepHandler.getErrorStatus(destination);
- // if the steps all ran ok and there is no interesting information, return the status from this method
- if (!stepStatus.isMultiStatus() && stepStatus.isOK())
- return status;
- // else gather up the status from the steps
- MultiStatus result = new MultiStatus(Activator.ID, IStatus.OK, new IStatus[0], NLS.bind(Messages.sar_reportStatus, descriptor.getArtifactKey().toExternalForm()), null);
-
- if (!status.isOK()) {
- // Transport pushes its status onto the output stream if the stream implements IStateful, to prevent
- // duplication determine if the Status is present in the ProcessingStep status.
- boolean found = false;
- IStatus[] stepStatusChildren = stepStatus.getChildren();
- for (int i = 0; i < stepStatusChildren.length && !found; i++)
- if (stepStatusChildren[i] == status)
- found = true;
- if (!found)
- result.merge(status);
- }
-
- result.merge(stepStatus);
- return result;
- }
-
- public void save() {
- boolean compress = "true".equalsIgnoreCase((String) properties.get(PROP_COMPRESSED)); //$NON-NLS-1$
- save(compress);
- }
-
- public void save(boolean compress) {
- assertModifiable();
- OutputStream os = null;
- try {
- try {
- URI actualLocation = getActualLocation(location, false);
- File artifactsFile = URIUtil.toFile(actualLocation);
- File jarFile = URIUtil.toFile(getActualLocation(location, true));
- if (!compress) {
- if (jarFile.exists()) {
- jarFile.delete();
- }
- if (!artifactsFile.exists()) {
- // create parent folders
- mkdirs(artifactsFile.getParentFile());
- }
- os = new FileOutputStream(artifactsFile);
- } else {
- if (artifactsFile.exists()) {
- artifactsFile.delete();
- }
- if (!jarFile.exists()) {
- mkdirs(jarFile.getParentFile());
- jarFile.createNewFile();
- }
- JarOutputStream jOs = new JarOutputStream(new FileOutputStream(jarFile));
- jOs.putNextEntry(new JarEntry(new Path(artifactsFile.getAbsolutePath()).lastSegment()));
- os = jOs;
- }
- super.setProperty(IRepository.PROP_TIMESTAMP, Long.toString(System.currentTimeMillis()));
- new SimpleArtifactRepositoryIO().write(this, os);
- } catch (IOException e) {
- // TODO proper exception handling
- e.printStackTrace();
- } finally {
- if (os != null)
- os.close();
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- public String setProperty(String key, String newValue) {
- String oldValue = super.setProperty(key, newValue);
- if (oldValue == newValue || (oldValue != null && oldValue.equals(newValue)))
- return oldValue;
- if (PUBLISH_PACK_FILES_AS_SIBLINGS.equals(key)) {
- synchronized (this) {
- if (Boolean.TRUE.toString().equals(newValue)) {
- mappingRules = PACKED_MAPPING_RULES;
- } else {
- mappingRules = DEFAULT_MAPPING_RULES;
- }
- initializeMapper();
- }
- }
- save();
- //force repository manager to reload this repository because it caches properties
- ArtifactRepositoryManager manager = (ArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
- if (manager.removeRepository(getLocation()))
- manager.addRepository(this);
- return oldValue;
- }
-
- public synchronized void setRules(String[][] rules) {
- mappingRules = rules;
- }
-
- public String toString() {
- return location.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java
deleted file mode 100644
index b7b10d0b5..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java
+++ /dev/null
@@ -1,511 +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.artifact.repository.simple;
-
-import java.io.*;
-import java.net.URL;
-import java.util.*;
-import javax.xml.parsers.ParserConfigurationException;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
-import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
-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.ArtifactKey;
-import org.eclipse.equinox.internal.p2.persistence.XMLParser;
-import org.eclipse.equinox.internal.p2.persistence.XMLWriter;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.ArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-import org.xml.sax.*;
-
-/**
- * This class reads and writes artifact repository metadata
- * (e.g. table of contents files);
- *
- * This class is not used for reading or writing the actual artifacts.
- */
-
-// TODO: Should a registration/factory mechanism be supported
-// for getting a repository reader/writer given a repository type
-public class SimpleArtifactRepositoryIO {
-
- /**
- * Writes the given artifact repository to the stream.
- * This method performs buffering, and closes the stream when finished.
- */
- public void write(SimpleArtifactRepository repository, OutputStream output) {
- OutputStream bufferedOutput = null;
- try {
- try {
- bufferedOutput = new BufferedOutputStream(output);
- Writer repositoryWriter = new Writer(bufferedOutput);
- repositoryWriter.write(repository);
- } finally {
- if (bufferedOutput != null) {
- bufferedOutput.close();
- }
- }
- } catch (IOException ioe) {
- // TODO shouldn't this throw a core exception?
- ioe.printStackTrace();
- }
- }
-
- /**
- * Reads the artifact repository from the given stream,
- * and returns the contained array of abstract artifact repositories.
- *
- * This method performs buffering, and closes the stream when finished.
- */
- public IArtifactRepository 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);
- 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);
- }
- SimpleArtifactRepository repository = repositoryParser.getRepository();
- if (repository == null)
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, Messages.io_parseError, null));
- return repository;
- } 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));
- }
- }
-
- private interface XMLConstants extends org.eclipse.equinox.internal.p2.persistence.XMLConstants {
-
- // Constants defining the structure of the XML for a SimpleArtifactRepository
-
- // A format version number for simple artifact repository XML.
- public static final Version COMPATIBLE_VERSION = new Version(1, 0, 0);
- public static final Version CURRENT_VERSION = new Version(1, 1, 0);
- public static final VersionRange XML_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, new Version(2, 0, 0), false);
-
- // Constants for processing instructions
- public static final String PI_REPOSITORY_TARGET = "artifactRepository"; //$NON-NLS-1$
- public static XMLWriter.ProcessingInstruction[] PI_DEFAULTS = new XMLWriter.ProcessingInstruction[] {XMLWriter.ProcessingInstruction.makeTargetVersionInstruction(PI_REPOSITORY_TARGET, CURRENT_VERSION)};
-
- // Constants for artifact repository elements
- public static final String REPOSITORY_ELEMENT = "repository"; //$NON-NLS-1$
- public static final String REPOSITORY_PROPERTIES_ELEMENT = "repositoryProperties"; //$NON-NLS-1$
- public static final String MAPPING_RULES_ELEMENT = "mappings"; //$NON-NLS-1$
- public static final String MAPPING_RULE_ELEMENT = "rule"; //$NON-NLS-1$
- public static final String ARTIFACTS_ELEMENT = "artifacts"; //$NON-NLS-1$
- public static final String ARTIFACT_ELEMENT = "artifact"; //$NON-NLS-1$
- public static final String PROCESSING_STEPS_ELEMENT = "processing"; //$NON-NLS-1$
- public static final String PROCESSING_STEP_ELEMENT = "step"; //$NON-NLS-1$
-
- public static final String MAPPING_RULE_FILTER_ATTRIBUTE = "filter"; //$NON-NLS-1$
- public static final String MAPPING_RULE_OUTPUT_ATTRIBUTE = "output"; //$NON-NLS-1$
-
- public static final String ARTIFACT_CLASSIFIER_ATTRIBUTE = CLASSIFIER_ATTRIBUTE;
-
- public static final String STEP_DATA_ATTRIBUTE = "data"; //$NON-NLS-1$
- public static final String STEP_REQUIRED_ATTRIBUTE = "required"; //$NON-NLS-1$
- }
-
- // XML writer for a SimpleArtifactRepository
- protected class Writer extends XMLWriter implements XMLConstants {
-
- public Writer(OutputStream output) throws IOException {
- super(output, PI_DEFAULTS);
- }
-
- /**
- * Write the given artifact repository to the output stream.
- */
- public void write(SimpleArtifactRepository 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());
- writeMappingRules(repository.getRules());
- writeArtifacts(repository.getDescriptors());
-
- end(REPOSITORY_ELEMENT);
- flush();
- }
-
- private void writeMappingRules(String[][] rules) {
- if (rules.length > 0) {
- start(MAPPING_RULES_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, rules.length);
- for (int i = 0; i < rules.length; i++) {
- start(MAPPING_RULE_ELEMENT);
- attribute(MAPPING_RULE_FILTER_ATTRIBUTE, rules[i][0]);
- attribute(MAPPING_RULE_OUTPUT_ATTRIBUTE, rules[i][1]);
- end(MAPPING_RULE_ELEMENT);
- }
- end(MAPPING_RULES_ELEMENT);
- }
- }
-
- private void writeArtifacts(Set artifactDescriptors) {
- start(ARTIFACTS_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, artifactDescriptors.size());
- for (Iterator iter = artifactDescriptors.iterator(); iter.hasNext();) {
- ArtifactDescriptor descriptor = (ArtifactDescriptor) iter.next();
- IArtifactKey key = descriptor.getArtifactKey();
- start(ARTIFACT_ELEMENT);
- attribute(ARTIFACT_CLASSIFIER_ATTRIBUTE, key.getClassifier());
- attribute(ID_ATTRIBUTE, key.getId());
- attribute(VERSION_ATTRIBUTE, key.getVersion());
- writeProcessingSteps(descriptor.getProcessingSteps());
- writeProperties(descriptor.getProperties());
- writeProperties(REPOSITORY_PROPERTIES_ELEMENT, descriptor.getRepositoryProperties());
- end(ARTIFACT_ELEMENT);
- }
- end(ARTIFACTS_ELEMENT);
- }
-
- private void writeProcessingSteps(ProcessingStepDescriptor[] processingSteps) {
- if (processingSteps.length > 0) {
- start(PROCESSING_STEPS_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, processingSteps.length);
- for (int i = 0; i < processingSteps.length; i++) {
- start(PROCESSING_STEP_ELEMENT);
- attribute(ID_ATTRIBUTE, processingSteps[i].getProcessorId());
- attribute(STEP_DATA_ATTRIBUTE, processingSteps[i].getData());
- attribute(STEP_REQUIRED_ATTRIBUTE, processingSteps[i].isRequired());
- end(PROCESSING_STEP_ELEMENT);
- }
- end(PROCESSING_STEPS_ELEMENT);
- }
- }
- }
-
- /*
- * Parser for the contents of a SimpleArtifactRepository,
- * as written by the Writer class.
- */
- private class Parser extends XMLParser implements XMLConstants {
-
- private SimpleArtifactRepository theRepository = null;
-
- public Parser(BundleContext context, String bundleId) {
- super(context, bundleId);
- }
-
- 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();
- RepositoryHandler repositoryHandler = new RepositoryHandler();
- xmlReader.setContentHandler(new RepositoryDocHandler(REPOSITORY_ELEMENT, repositoryHandler));
- xmlReader.parse(new InputSource(stream));
- if (isValidXML()) {
- theRepository = repositoryHandler.getRepository();
- }
- } catch (SAXException e) {
- throw new IOException(e.getMessage());
- } catch (ParserConfigurationException e) {
- throw new IOException(e.getMessage());
- } finally {
- stream.close();
- }
- }
-
- public SimpleArtifactRepository 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)) {
- // TODO: should the root handler be constructed based on class
- // via an extension registry mechanism?
- // String clazz = extractPIClass(data);
- // TODO: version tolerance by extension
- Version repositoryVersion = extractPIVersion(target, data);
- if (!XML_TOLERANCE.isIncluded(repositoryVersion)) {
- throw new SAXException(NLS.bind(Messages.io_incompatibleVersion, repositoryVersion, 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 String[] attrValues = new String[required.length + optional.length];
-
- private MappingRulesHandler mappingRulesHandler = null;
- private PropertiesHandler propertiesHandler = null;
- private ArtifactsHandler artifactsHandler = null;
-
- private SimpleArtifactRepository repository = null;
-
- public RepositoryHandler() {
- super();
- }
-
- public SimpleArtifactRepository getRepository() {
- return repository;
- }
-
- protected void handleRootAttributes(Attributes attributes) {
- attrValues = parseAttributes(attributes, required, optional);
- attrValues[2] = checkVersion(REPOSITORY_ELEMENT, VERSION_ATTRIBUTE, attrValues[2]).toString();
- }
-
- public void startElement(String name, Attributes attributes) {
- if (MAPPING_RULES_ELEMENT.equals(name)) {
- if (mappingRulesHandler == null) {
- mappingRulesHandler = new MappingRulesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (ARTIFACTS_ELEMENT.equals(name)) {
- if (artifactsHandler == null) {
- artifactsHandler = new ArtifactsHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (PROPERTIES_ELEMENT.equals(name)) {
- if (propertiesHandler == null) {
- propertiesHandler = new PropertiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else {
- invalidElement(name, attributes);
- }
- }
-
- protected void finished() {
- if (isValidXML()) {
- String[][] mappingRules = (mappingRulesHandler == null ? new String[0][0] //
- : mappingRulesHandler.getMappingRules());
- Map properties = (propertiesHandler == null ? new OrderedProperties(0) //
- : propertiesHandler.getProperties());
- Set artifacts = (artifactsHandler == null ? new HashSet(0) //
- : artifactsHandler.getArtifacts());
- repository = new SimpleArtifactRepository(attrValues[0], attrValues[1], attrValues[2], attrValues[3], //
- attrValues[4], artifacts, mappingRules, properties);
- }
- }
- }
-
- protected class MappingRulesHandler extends AbstractHandler {
-
- private List mappingRules;
-
- public MappingRulesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, MAPPING_RULES_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- mappingRules = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
- }
-
- public String[][] getMappingRules() {
- String[][] rules = new String[mappingRules.size()][2];
- for (int index = 0; index < mappingRules.size(); index++) {
- String[] ruleAttributes = (String[]) mappingRules.get(index);
- rules[index] = ruleAttributes;
- }
- return rules;
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(MAPPING_RULE_ELEMENT)) {
- new MappingRuleHandler(this, attributes, mappingRules);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class MappingRuleHandler extends AbstractHandler {
-
- private final String[] required = new String[] {MAPPING_RULE_FILTER_ATTRIBUTE, MAPPING_RULE_OUTPUT_ATTRIBUTE};
-
- public MappingRuleHandler(AbstractHandler parentHandler, Attributes attributes, List mappingRules) {
- super(parentHandler, MAPPING_RULE_ELEMENT);
- mappingRules.add(parseRequiredAttributes(attributes, required));
- }
-
- public void startElement(String name, Attributes attributes) {
- invalidElement(name, attributes);
- }
- }
-
- protected class ArtifactsHandler extends AbstractHandler {
-
- private Set artifacts;
-
- public ArtifactsHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, ARTIFACTS_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- artifacts = (size != null ? new LinkedHashSet(new Integer(size).intValue()) : new LinkedHashSet(4));
- }
-
- public Set getArtifacts() {
- return artifacts;
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(ARTIFACT_ELEMENT)) {
- new ArtifactHandler(this, attributes, artifacts);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class ArtifactHandler extends AbstractHandler {
-
- private final String[] required = new String[] {ARTIFACT_CLASSIFIER_ATTRIBUTE, ID_ATTRIBUTE, VERSION_ATTRIBUTE};
-
- private Set artifacts;
- ArtifactDescriptor currentArtifact = null;
-
- private PropertiesHandler propertiesHandler = null;
- private PropertiesHandler repositoryPropertiesHandler = null;
- private ProcessingStepsHandler processingStepsHandler = null;
-
- public ArtifactHandler(AbstractHandler parentHandler, Attributes attributes, Set artifacts) {
- super(parentHandler, ARTIFACT_ELEMENT);
- this.artifacts = artifacts;
- String[] values = parseRequiredAttributes(attributes, required);
- Version version = checkVersion(ARTIFACT_ELEMENT, VERSION_ATTRIBUTE, values[2]);
- // TODO: resolve access restriction on ArtifactKey construction
- currentArtifact = new ArtifactDescriptor(new ArtifactKey(values[0], values[1], version));
- }
-
- public void startElement(String name, Attributes attributes) {
- if (PROCESSING_STEPS_ELEMENT.equals(name)) {
- if (processingStepsHandler == null) {
- processingStepsHandler = new ProcessingStepsHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (PROPERTIES_ELEMENT.equals(name)) {
- if (propertiesHandler == null) {
- propertiesHandler = new PropertiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (REPOSITORY_PROPERTIES_ELEMENT.equals(name)) {
- if (repositoryPropertiesHandler == null) {
- repositoryPropertiesHandler = new PropertiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else {
- invalidElement(name, attributes);
- }
- }
-
- protected void finished() {
- if (isValidXML() && currentArtifact != null) {
- Map properties = (propertiesHandler == null ? new OrderedProperties(0) : propertiesHandler.getProperties());
- currentArtifact.addProperties(properties);
-
- properties = (repositoryPropertiesHandler == null ? new OrderedProperties(0) : repositoryPropertiesHandler.getProperties());
- currentArtifact.addRepositoryProperties(properties);
-
- ProcessingStepDescriptor[] processingSteps = (processingStepsHandler == null ? new ProcessingStepDescriptor[0] //
- : processingStepsHandler.getProcessingSteps());
- currentArtifact.setProcessingSteps(processingSteps);
- artifacts.add(currentArtifact);
- }
- }
- }
-
- protected class ProcessingStepsHandler extends AbstractHandler {
-
- private List processingSteps;
-
- public ProcessingStepsHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, PROCESSING_STEPS_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- processingSteps = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
- }
-
- public ProcessingStepDescriptor[] getProcessingSteps() {
- return (ProcessingStepDescriptor[]) processingSteps.toArray(new ProcessingStepDescriptor[processingSteps.size()]);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(PROCESSING_STEP_ELEMENT)) {
- new ProcessingStepHandler(this, attributes, processingSteps);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class ProcessingStepHandler extends AbstractHandler {
-
- private final String[] required = new String[] {ID_ATTRIBUTE, STEP_REQUIRED_ATTRIBUTE};
- private final String[] optional = new String[] {STEP_DATA_ATTRIBUTE};
-
- public ProcessingStepHandler(AbstractHandler parentHandler, Attributes attributes, List processingSteps) {
- super(parentHandler, PROCESSING_STEP_ELEMENT);
- String[] attributeValues = parseAttributes(attributes, required, optional);
- processingSteps.add(new ProcessingStepDescriptor(attributeValues[0], attributeValues[2], checkBoolean(PROCESSING_STEP_ELEMENT, STEP_REQUIRED_ATTRIBUTE, attributeValues[1]).booleanValue()));
- }
-
- public void startElement(String name, Attributes attributes) {
- invalidElement(name, attributes);
- }
- }
-
- protected String getErrorMessage() {
- return Messages.io_parseError;
- }
-
- public String toString() {
- // TODO:
- return null;
- }
-
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/UniversalUniqueIdentifier.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/UniversalUniqueIdentifier.java
deleted file mode 100644
index 636893afa..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/UniversalUniqueIdentifier.java
+++ /dev/null
@@ -1,349 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 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.repository.simple;
-
-import java.io.*;
-import java.math.BigInteger;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.security.SecureRandom;
-import java.util.GregorianCalendar;
-import java.util.Random;
-import org.eclipse.core.runtime.Assert;
-
-public class UniversalUniqueIdentifier implements java.io.Serializable {
-
- /**
- * All serializable objects should have a stable serialVersionUID
- */
- private static final long serialVersionUID = 1L;
-
- /* INSTANCE FIELDS =============================================== */
-
- private byte[] fBits = new byte[BYTES_SIZE];
-
- /* NON-FINAL PRIVATE STATIC FIELDS =============================== */
-
- private static BigInteger fgPreviousClockValue;
- private static int fgClockAdjustment = 0;
- private static int fgClockSequence = -1;
- private static byte[] nodeAddress;
-
- static {
- nodeAddress = computeNodeAddress();
- }
-
- /* PRIVATE STATIC FINAL FIELDS =================================== */
-
- private static Random fgRandomNumberGenerator = new Random();
-
- /* PUBLIC STATIC FINAL FIELDS ==================================== */
-
- public static final int BYTES_SIZE = 16;
- public static final byte[] UNDEFINED_UUID_BYTES = new byte[16];
- public static final int MAX_CLOCK_SEQUENCE = 0x4000;
- public static final int MAX_CLOCK_ADJUSTMENT = 0x7FFF;
- public static final int TIME_FIELD_START = 0;
- public static final int TIME_FIELD_STOP = 6;
- public static final int TIME_HIGH_AND_VERSION = 7;
- public static final int CLOCK_SEQUENCE_HIGH_AND_RESERVED = 8;
- public static final int CLOCK_SEQUENCE_LOW = 9;
- public static final int NODE_ADDRESS_START = 10;
- public static final int NODE_ADDRESS_BYTE_SIZE = 6;
-
- public static final int BYTE_MASK = 0xFF;
-
- public static final int HIGH_NIBBLE_MASK = 0xF0;
-
- public static final int LOW_NIBBLE_MASK = 0x0F;
-
- public static final int SHIFT_NIBBLE = 4;
-
- public static final int ShiftByte = 8;
-
- /**
- UniversalUniqueIdentifier default constructor returns a
- new instance that has been initialized to a unique value.
- */
- public UniversalUniqueIdentifier() {
- this.setVersion(1);
- this.setVariant(1);
- this.setTimeValues();
- this.setNode(getNodeAddress());
- }
-
- /**
- Constructor that accepts the bytes to use for the instance.&nbsp;&nbsp; The format
- of the byte array is compatible with the <code>toBytes()</code> method.
-
- <p>The constructor returns the undefined uuid if the byte array is invalid.
-
- @see #toBytes()
- @see #BYTES_SIZE
- */
- public UniversalUniqueIdentifier(byte[] byteValue) {
- fBits = new byte[BYTES_SIZE];
- if (byteValue.length >= BYTES_SIZE)
- System.arraycopy(byteValue, 0, fBits, 0, BYTES_SIZE);
- }
-
- private void appendByteString(StringBuffer buffer, byte value) {
- String hexString;
-
- if (value < 0)
- hexString = Integer.toHexString(256 + value);
- else
- hexString = Integer.toHexString(value);
- if (hexString.length() == 1)
- buffer.append("0"); //$NON-NLS-1$
- buffer.append(hexString);
- }
-
- private static BigInteger clockValueNow() {
- GregorianCalendar now = new GregorianCalendar();
- BigInteger nowMillis = BigInteger.valueOf(now.getTime().getTime());
- BigInteger baseMillis = BigInteger.valueOf(now.getGregorianChange().getTime());
-
- return (nowMillis.subtract(baseMillis).multiply(BigInteger.valueOf(10000L)));
- }
-
- /**
- Simply increases the visibility of <code>Object</code>'s clone.
- Otherwise, no new behaviour.
- */
- public Object clone() {
- try {
- return super.clone();
- } catch (CloneNotSupportedException e) {
- Assert.isTrue(false, "Clone not supported");
- return null;
- }
- }
-
- public static int compareTime(byte[] fBits1, byte[] fBits2) {
- for (int i = TIME_FIELD_STOP; i >= 0; i--)
- if (fBits1[i] != fBits2[i])
- return (0xFF & fBits1[i]) - (0xFF & fBits2[i]);
- return 0;
- }
-
- /**
- * Answers the node address attempting to mask the IP
- * address of this machine.
- *
- * @return byte[] the node address
- */
- private static byte[] computeNodeAddress() {
-
- byte[] address = new byte[NODE_ADDRESS_BYTE_SIZE];
-
- // Seed the secure randomizer with some oft-varying inputs
- int thread = Thread.currentThread().hashCode();
- long time = System.currentTimeMillis();
- int objectId = System.identityHashCode(new String());
- ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
- DataOutputStream out = new DataOutputStream(byteOut);
- byte[] ipAddress = getIPAddress();
-
- try {
- if (ipAddress != null)
- out.write(ipAddress);
- out.write(thread);
- out.writeLong(time);
- out.write(objectId);
- out.close();
- } catch (IOException exc) {
- //ignore the failure, we're just trying to come up with a random seed
- }
- byte[] rand = byteOut.toByteArray();
-
- SecureRandom randomizer = new SecureRandom(rand);
- randomizer.nextBytes(address);
-
- // set the MSB of the first octet to 1 to distinguish from IEEE node addresses
- address[0] = (byte) (address[0] | (byte) 0x80);
-
- return address;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof UniversalUniqueIdentifier))
- return false;
-
- byte[] other = ((UniversalUniqueIdentifier) obj).fBits;
- if (fBits == other)
- return true;
- if (fBits.length != other.length)
- return false;
- for (int i = 0; i < fBits.length; i++) {
- if (fBits[i] != other[i])
- return false;
- }
- return true;
- }
-
- /**
- Answers the IP address of the local machine using the
- Java API class <code>InetAddress</code>.
-
- @return byte[] the network address in network order
- @see java.net.InetAddress#getLocalHost()
- @see java.net.InetAddress#getAddress()
- */
- protected static byte[] getIPAddress() {
- try {
- return InetAddress.getLocalHost().getAddress();
- } catch (UnknownHostException e) {
- //valid for this to be thrown be a machine with no IP connection
- //It is VERY important NOT to throw this exception
- return null;
- }
- }
-
- private static byte[] getNodeAddress() {
- return nodeAddress;
- }
-
- public int hashCode() {
- return fBits[0] + fBits[3] + fBits[7] + fBits[11] + fBits[15];
- }
-
- private static int nextClockSequence() {
-
- if (fgClockSequence == -1)
- fgClockSequence = (int) (fgRandomNumberGenerator.nextDouble() * MAX_CLOCK_SEQUENCE);
-
- fgClockSequence = (fgClockSequence + 1) % MAX_CLOCK_SEQUENCE;
-
- return fgClockSequence;
- }
-
- private static BigInteger nextTimestamp() {
-
- BigInteger timestamp = clockValueNow();
- int timestampComparison;
-
- timestampComparison = timestamp.compareTo(fgPreviousClockValue);
-
- if (timestampComparison == 0) {
- if (fgClockAdjustment == MAX_CLOCK_ADJUSTMENT) {
- while (timestamp.compareTo(fgPreviousClockValue) == 0)
- timestamp = clockValueNow();
- timestamp = nextTimestamp();
- } else
- fgClockAdjustment++;
- } else {
- fgClockAdjustment = 0;
-
- if (timestampComparison < 0)
- nextClockSequence();
- }
-
- return timestamp;
- }
-
- private void setClockSequence(int clockSeq) {
- int clockSeqHigh = (clockSeq >>> ShiftByte) & LOW_NIBBLE_MASK;
- int reserved = fBits[CLOCK_SEQUENCE_HIGH_AND_RESERVED] & HIGH_NIBBLE_MASK;
-
- fBits[CLOCK_SEQUENCE_HIGH_AND_RESERVED] = (byte) (reserved | clockSeqHigh);
- fBits[CLOCK_SEQUENCE_LOW] = (byte) (clockSeq & BYTE_MASK);
- }
-
- protected void setNode(byte[] bytes) {
-
- for (int index = 0; index < NODE_ADDRESS_BYTE_SIZE; index++)
- fBits[index + NODE_ADDRESS_START] = bytes[index];
- }
-
- private void setTimestamp(BigInteger timestamp) {
- BigInteger value = timestamp;
- BigInteger bigByte = BigInteger.valueOf(256L);
- BigInteger[] results;
- int version;
- int timeHigh;
-
- for (int index = TIME_FIELD_START; index < TIME_FIELD_STOP; index++) {
- results = value.divideAndRemainder(bigByte);
- value = results[0];
- fBits[index] = (byte) results[1].intValue();
- }
- version = fBits[TIME_HIGH_AND_VERSION] & HIGH_NIBBLE_MASK;
- timeHigh = value.intValue() & LOW_NIBBLE_MASK;
- fBits[TIME_HIGH_AND_VERSION] = (byte) (timeHigh | version);
- }
-
- protected synchronized void setTimeValues() {
- this.setTimestamp(timestamp());
- this.setClockSequence(fgClockSequence);
- }
-
- protected int setVariant(int variantIdentifier) {
- int clockSeqHigh = fBits[CLOCK_SEQUENCE_HIGH_AND_RESERVED] & LOW_NIBBLE_MASK;
- int variant = variantIdentifier & LOW_NIBBLE_MASK;
-
- fBits[CLOCK_SEQUENCE_HIGH_AND_RESERVED] = (byte) ((variant << SHIFT_NIBBLE) | clockSeqHigh);
- return (variant);
- }
-
- protected void setVersion(int versionIdentifier) {
- int timeHigh = fBits[TIME_HIGH_AND_VERSION] & LOW_NIBBLE_MASK;
- int version = versionIdentifier & LOW_NIBBLE_MASK;
-
- fBits[TIME_HIGH_AND_VERSION] = (byte) (timeHigh | (version << SHIFT_NIBBLE));
- }
-
- private static BigInteger timestamp() {
- BigInteger timestamp;
-
- if (fgPreviousClockValue == null) {
- fgClockAdjustment = 0;
- nextClockSequence();
- timestamp = clockValueNow();
- } else
- timestamp = nextTimestamp();
-
- fgPreviousClockValue = timestamp;
- return fgClockAdjustment == 0 ? timestamp : timestamp.add(BigInteger.valueOf(fgClockAdjustment));
- }
-
- /**
- This representation is compatible with the (byte[]) constructor.
-
- @see #UniversalUniqueIdentifier(byte[])
- */
- public byte[] toBytes() {
- byte[] result = new byte[fBits.length];
-
- System.arraycopy(fBits, 0, result, 0, fBits.length);
- return result;
- }
-
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < fBits.length; i++)
- appendByteString(buffer, fBits[i]);
- return buffer.toString();
- }
-
- public String toStringAsBytes() {
- String result = "{"; //$NON-NLS-1$
-
- for (int i = 0; i < fBits.length; i++) {
- result += fBits[i];
- if (i < fBits.length + 1)
- result += ","; //$NON-NLS-1$
- }
- return result + "}"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/ArtifactComparatorFactory.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/ArtifactComparatorFactory.java
deleted file mode 100644
index b9568b02d..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/ArtifactComparatorFactory.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
- * Compeople AG (Stefan Liebig) - various ongoing maintenance
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.artifact.repository;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.RegistryFactory;
-import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
-import org.eclipse.osgi.util.NLS;
-
-public class ArtifactComparatorFactory {
- private static final String comparatorPoint = "org.eclipse.equinox.p2.artifact.repository.artifactComparators"; //$NON-NLS-1$
- private static final String ATTR_ID = "id"; //$NON-NLS-1$
- private static final String ATTR_CLASS = "class"; //$NON-NLS-1$
-
- public static IArtifactComparator getArtifactComparator(String comparatorID) {
- IConfigurationElement[] extensions = RegistryFactory.getRegistry().getConfigurationElementsFor(comparatorPoint);
-
- IConfigurationElement element = null;
- if (comparatorID == null && extensions.length > 0) {
- element = extensions[0]; //just take the first one
- } else {
- for (int i = 0; i < extensions.length; i++) {
- if (extensions[i].getAttribute(ATTR_ID).equals(comparatorID)) {
- element = extensions[i];
- break;
- }
- }
- }
- if (element != null) {
- try {
- Object execExt = element.createExecutableExtension(ATTR_CLASS);
- if (execExt instanceof IArtifactComparator)
- return (IArtifactComparator) execExt;
- } catch (Exception e) {
- //fall through
- }
- }
-
- if (comparatorID != null)
- throw new IllegalArgumentException(NLS.bind(Messages.exception_comparatorNotFound, comparatorID));
- throw new IllegalArgumentException(Messages.exception_noComparators);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/ArtifactDescriptor.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/ArtifactDescriptor.java
deleted file mode 100644
index 33c526325..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/ArtifactDescriptor.java
+++ /dev/null
@@ -1,191 +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.artifact.repository;
-
-import java.util.Arrays;
-import java.util.Map;
-import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-
-/**
- * This represents information about a given artifact stored on a particular byte server.
- */
-public class ArtifactDescriptor implements IArtifactDescriptor {
- public static final String ARTIFACT_REFERENCE = "artifact.reference"; //$NON-NLS-1$
-
- private static final ProcessingStepDescriptor[] EMPTY_STEPS = new ProcessingStepDescriptor[0];
-
- protected IArtifactKey key; // The key associated with this artifact
-
- // The list of post processing steps that must be applied one the artifact once it
- // has been downloaded (e.g, unpack, then md5 checksum, then...)
- protected ProcessingStepDescriptor[] processingSteps = EMPTY_STEPS;
-
- protected Map properties = new OrderedProperties();
- protected Map repositoryProperties = new OrderedProperties();
-
- protected transient IArtifactRepository repository;
-
- // QUESTION: Do we need any description or user readable name
-
- public ArtifactDescriptor(IArtifactDescriptor base) {
- super();
- key = base.getArtifactKey();
- processingSteps = base.getProcessingSteps();
- properties.putAll(base.getProperties());
- repository = base.getRepository();
- // TODO this property is hardcoded for the blob store.
- // setProperty("artifact.uuid", base.getProperty("artifact.uuid"));
- }
-
- public ArtifactDescriptor(ArtifactDescriptor base) {
- super();
- key = base.key;
- processingSteps = base.processingSteps;
- properties = base.properties;
- repository = base.repository;
- }
-
- public ArtifactDescriptor(IArtifactKey key) {
- super();
- this.key = key;
- }
-
- public IArtifactKey getArtifactKey() {
- return key;
- }
-
- public String getProperty(String propertyKey) {
- return (String) properties.get(propertyKey);
- }
-
- public void setProperty(String key, String value) {
- if (value == null)
- properties.remove(key);
- else
- properties.put(key, value);
- }
-
- public void addProperties(Map additionalProperties) {
- properties.putAll(additionalProperties);
- }
-
- /**
- * Returns a read-only collection of the properties of the artifact descriptor.
- * @return the properties of this artifact descriptor.
- */
- public Map getProperties() {
- return OrderedProperties.unmodifiableProperties(properties);
- }
-
- public String getRepositoryProperty(String propertyKey) {
- return (String) repositoryProperties.get(propertyKey);
- }
-
- public void setRepositoryProperty(String key, String value) {
- if (value == null)
- repositoryProperties.remove(key);
- else
- repositoryProperties.put(key, value);
- }
-
- public void addRepositoryProperties(Map additionalProperties) {
- repositoryProperties.putAll(additionalProperties);
- }
-
- /**
- * Returns a read-only collection of the repository properties of the artifact descriptor.
- * @return the repository properties of this artifact descriptor.
- */
- public Map getRepositoryProperties() {
- return OrderedProperties.unmodifiableProperties(repositoryProperties);
- }
-
- public ProcessingStepDescriptor[] getProcessingSteps() {
- return processingSteps;
- }
-
- public void setProcessingSteps(ProcessingStepDescriptor[] value) {
- processingSteps = value == null ? EMPTY_STEPS : value;
- }
-
- // Implementation of both equals and hash depends on the implementation of
- // SimpleArtifactRepository#getOutputStream(IArtifactDescriptor)
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- ArtifactDescriptor other = (ArtifactDescriptor) obj;
- if (key == null) {
- if (other.key != null)
- return false;
- } else if (!key.equals(other.key))
- return false;
- if (!Arrays.equals(processingSteps, other.processingSteps))
- return false;
-
- //Properties affecting SimpleArtifactRepository#getLocation
- String locationProperty = getRepositoryProperty(ARTIFACT_REFERENCE);
- String otherProperty = other.getRepositoryProperty(ARTIFACT_REFERENCE);
- // want not null and the same, or both null
- if (locationProperty != null ? !locationProperty.equals(otherProperty) : otherProperty != null)
- return false;
-
- locationProperty = getProperty(FORMAT);
- otherProperty = other.getProperty(FORMAT);
- if (locationProperty != null ? !locationProperty.equals(otherProperty) : otherProperty != null)
- return false;
-
- return true;
- }
-
- private int hashCode(Object[] array) {
- int prime = 31;
- if (array == null)
- return 0;
- int result = 1;
- for (int index = 0; index < array.length; index++) {
- result = prime * result + (array[index] == null ? 0 : array[index].hashCode());
- }
- return result;
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((key == null) ? 0 : key.hashCode());
- result = prime * result + hashCode(processingSteps);
-
- String[] hashProperties = new String[] {getRepositoryProperty(ARTIFACT_REFERENCE), getProperty(FORMAT)};
- result = prime * result + hashCode(hashProperties);
- return result;
- }
-
- public IArtifactRepository getRepository() {
- return repository;
- }
-
- public void setRepository(IArtifactRepository value) {
- repository = value;
- }
-
- public String toString() {
- String format = getProperty(IArtifactDescriptor.FORMAT);
- if (format == null)
- return "canonical: " + key.toString(); //$NON-NLS-1$
- return format + ": " + key.toString(); //$NON-NLS-1$
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactComparator.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactComparator.java
deleted file mode 100644
index 6ba7d556f..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactComparator.java
+++ /dev/null
@@ -1,31 +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.artifact.repository;
-
-import org.eclipse.core.runtime.IStatus;
-
-public interface IArtifactComparator {
-
- /**
- * Compare 2 equivalent IArtifactDescriptors from different repositories.
- *
- * IArtifactDescriptors with the same id and version should represent the same
- * set of bytes. The comparator should ensure this is true and return an error
- * or warning otherwise.
- *
- * @param source - The source IArtifactRepository
- * @param sourceDescriptor - The IArtifactDescriptor from the source repository
- * @param destination - The target IArtifactRepository
- * @param destDescriptor - The IArtifactDescriptor from the target repository
- *
- * @return IStatus
- */
- public IStatus compare(IArtifactRepository source, IArtifactDescriptor sourceDescriptor, IArtifactRepository destination, IArtifactDescriptor destDescriptor);
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactDescriptor.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactDescriptor.java
deleted file mode 100644
index 835950693..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactDescriptor.java
+++ /dev/null
@@ -1,62 +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.artifact.repository;
-
-import java.util.Map;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-
-public interface IArtifactDescriptor {
-
- public static final String DOWNLOAD_SIZE = "download.size"; //$NON-NLS-1$
- public static final String ARTIFACT_SIZE = "artifact.size"; //$NON-NLS-1$
- public static final String DOWNLOAD_MD5 = "download.md5"; //$NON-NLS-1$
- public static final String DOWNLOAD_CONTENTTYPE = "download.contentType"; //$NON-NLS-1$
- public static final String TYPE_ZIP = "application/zip"; //$NON-NLS-1$
- public static final String ARTIFACT_MD5 = "artifact.md5"; //$NON-NLS-1$
- public static final String FORMAT = "format"; //$NON-NLS-1$
-
- /**
- * Return the key for the artifact described by this descriptor.
- * @return the key associated with this descriptor
- */
- public abstract IArtifactKey getArtifactKey();
-
- /**
- * Return the value of the given property in this descriptor <code>null</code>
- * is returned if no such property exists
- * @param key the property key to look for
- * @return the value of the given property or <code>null</code>
- */
- public abstract String getProperty(String key);
-
- /**
- * Returns a read-only collection of the properties of the artifact descriptor.
- * @return the properties of this artifact descriptor.
- */
- public Map getProperties();
-
- /**
- * Return the list of processing steps associated with this descriptor.
- * An empty set of steps implies that this descriptor describes a complete
- * copy of the artifact in its native form.
- * @return the list of processing steps for this descriptor
- */
- public abstract ProcessingStepDescriptor[] getProcessingSteps();
-
- /**
- * Return the artifact repository that holds the artifact described by this descriptor.
- * <code>null</code> is returned if this descriptor is not held in a repository.
- *
- * @return the repository holding this artifact or <code>null</code> if none.
- */
- public abstract IArtifactRepository getRepository();
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepository.java
deleted file mode 100644
index c793545ab..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepository.java
+++ /dev/null
@@ -1,133 +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.artifact.repository;
-
-import java.io.OutputStream;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.AbstractArtifactRepository;
-
-/**
- * A repository containing artifacts.
- * <p>
- * This interface is not intended to be implemented by clients. Artifact repository
- * implementations must subclass {@link AbstractArtifactRepository} rather than
- * implementing this interface directly.
- * </p>
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IArtifactRepository extends IRepository {
-
- /**
- * The return code to use when a client could/should retry a failed getArtifact() operation.
- * For example, the repository may have additional mirrors that could be consulted.
- */
- public static int CODE_RETRY = 13;
-
- /**
- * Add the given descriptor to the set of descriptors in this repository. This is
- * a relatively low-level operation that should be used only when the actual related
- * content is in this repository and the given descriptor accurately describes
- * that content.
- * @param descriptor the descriptor to add.
- */
- public void addDescriptor(IArtifactDescriptor descriptor);
-
- /**
- * Add the given artifact descriptors to this repository
- * @param descriptors the artifact descriptors to add
- */
- public void addDescriptors(IArtifactDescriptor[] descriptors);
-
- /**
- * Returns true if this repository contains the given descriptor.
- * @param descriptor the descriptor to query
- * @return true if the given descriptor is already in this repository
- */
- public boolean contains(IArtifactDescriptor descriptor);
-
- /**
- * Returns true if this repository contains the given artifact key.
- * @param key the key to query
- * @return true if the given key is already in this repository
- */
- public boolean contains(IArtifactKey key);
-
- /**
- * Write to the given output stream the bytes represented by the artifact descriptor processed by the processing steps of the given descriptor.
- */
- public IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor);
-
- /**
- * Write to the given output stream the bytes represented by the artifact descriptor without processing by the steps of the given descriptor.
- */
- public IStatus getRawArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor);
-
- /**
- * Return the set of artifact descriptors describing the ways that this repository
- * can supply the artifact associated with the given artifact key
- * @param key the artifact key to lookup
- * @return the descriptors associated with the given key
- */
- public IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key);
-
- /**
- * Returns the list of artifact keys managed by this repository
- * @return list of artifact keys
- */
- public IArtifactKey[] getArtifactKeys();
-
- /**
- * Executes the given artifact requests on this byte server.
- * @param requests The artifact requests
- * @param monitor
- * @return a status object that is <code>OK</code> if requests were
- * processed successfully. Otherwise, a status indicating information,
- * warnings, or errors that occurred while executing the artifact requests
- */
- public IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor);
-
- /**
- * Open an output stream to which a client can write the data for the given
- * artifact descriptor.
- * @param descriptor the descriptor describing the artifact data to be written to the
- * resultant stream
- * @return the stream to which the artifact content can be written. The returned output
- * stream may implement <code>IStateful</code>.
- * @throws ProvisionException if the output stream could not be created. Reasons include:
- * <ul>
- * <li>An I/O exception occurred (@link {@link ProvisionException#REPOSITORY_FAILED_WRITE}) .</li>
- * <li>An artifact already exists at that location ({@link ProvisionException#ARTIFACT_EXISTS}).</li>
- * </ul>
- */
- public OutputStream getOutputStream(IArtifactDescriptor descriptor) throws ProvisionException;
-
- /**
- * Remove the all keys, descriptors, and contents from this repository.
- */
- public void removeAll();
-
- /**
- * Remove the given descriptor and its corresponding content in this repository.
- * @param descriptor the descriptor to remove.
- */
- public void removeDescriptor(IArtifactDescriptor descriptor);
-
- /**
- * Remove the given key and all related content and descriptors from this repository.
- * @param key the key to remove.
- */
- public void removeDescriptor(IArtifactKey key);
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepositoryManager.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepositoryManager.java
deleted file mode 100644
index c804670f4..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepositoryManager.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.provisional.p2.artifact.repository;
-
-import java.net.URI;
-import java.util.Map;
-import java.util.Properties;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
-/**
- * A metadata repository manager is used to create, access, and manipulate
- * {@link IArtifactRepository} instances. See {@link IRepositoryManager}
- * for a general description of the characteristics of repository managers.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IArtifactRepositoryManager extends IRepositoryManager {
- /**
- * The name used for obtaining a reference to the metadata repository manager service
- */
- public static final String SERVICE_NAME = IArtifactRepositoryManager.class.getName();
-
- public static final IArtifactRequest[] NO_ARTIFACT_REQUEST = new IArtifactRequest[0];
-
- /**
- * Repository type for a simple repository based on a URL or local file system location.
- */
- public static final String TYPE_SIMPLE_REPOSITORY = "org.eclipse.equinox.p2.artifact.repository.simpleRepository"; //$NON-NLS-1$
- public static final String TYPE_COMPOSITE_REPOSITORY = "org.eclipse.equinox.p2.artifact.repository.compositeRepository"; //$NON-NLS-1$
-
- /**
- * Return a new request to mirror the given artifact into the destination repository.
- * @param key the artifact to mirror
- * @param destination the destination where the artifact will be mirrored
- * @param destinationDescriptorProperties additional properties for use in creating the repository's ArtifactDescriptor,
- * or <code>null</code> to indicate no additional properties are needed
- * @param destinationRepositoryProperties additional repository specific properties for use in creating the repositor's ArtifactDescriptor,
- * , or <code>null</code> to indicate no additional properties are needed
- * @return the newly created request object
- */
- public IArtifactRequest createMirrorRequest(IArtifactKey key, IArtifactRepository destination, Properties destinationDescriptorProperties, Properties destinationRepositoryProperties);
-
- /**
- * Creates and returns a new empty artifact repository of the given type at
- * the given location.
- * <p>
- * The resulting repository is added to the list of repositories tracked by
- * the repository manager. Clients must make a subsequent call to {@link #removeRepository(URI)}
- * if they do not want the repository manager to remember the repository for subsequent
- * load attempts.
- * </p>
- *
- * @param location the absolute location for the new repository
- * @param name the name of the new repository
- * @param type the kind of repository to create
- * @param properties the properties to set on the repository
- * @return the newly created repository
- * @throws ProvisionException if the repository could not be created. Reasons include:
- * <ul>
- * <li>The repository type is unknown.</li>
- * <li>There was an error writing to the given repository location.</li>
- * <li>A repository already exists at that location.</li>
- * </ul>
- */
- public IArtifactRepository createRepository(URI location, String name, String type, Map properties) throws ProvisionException;
-
- /**
- * Loads the repository at the given location. The location is expected to contain
- * data that describes a valid artifact repository of a known type. If this manager
- * already knows a repository at the given location then that repository is returned.
- * <p>
- * The resulting repository is added to the list of repositories tracked by
- * the repository manager. Clients must make a subsequent call to {@link #removeRepository(URI)}
- * if they do not want the repository manager to remember the repository for subsequent
- * load attempts.
- * </p>
- *
- * @param location the absolute location in which to look for a repository description
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- * @return a repository object for the given location
- * @throws ProvisionException if the repository could not be created. Reasons include:
- * <ul>
- * <li>There is no existing repository at that location.</li>
- * <li>The repository at that location could not be read.</li>
- * </ul>
- */
- public IArtifactRepository loadRepository(URI location, IProgressMonitor monitor) throws ProvisionException;
-
- /**
- * Loads the repository at the given location. The location is expected to contain
- * data that describes a valid artifact repository of a known type. If this manager
- * already knows a repository at the given location then that repository is returned.
- * <p>
- * The resulting repository is added to the list of repositories tracked by
- * the repository manager. Clients must make a subsequent call to {@link #removeRepository(URI)}
- * if they do not want the repository manager to remember the repository for subsequent
- * load attempts.
- * </p>
- * <p>
- * The flags passed in should be taken as a hint for the type of repository to load. If
- * the manager cannot load a repository that satisfies these hints, it can fail fast.
- * </p>
- * @param location the absolute location in which to look for a repository description
- * @param flags - bit-wise or of flags to consider when loading the repository
- * (currently only {@link IRepositoryManager#REPOSITORY_HINT_MODIFIABLE} is supported)
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- * @return a repository object for the given location
- * @throws ProvisionException if the repository could not be created. Reasons include:
- * <ul>
- * <li>There is no existing repository at that location.</li>
- * <li>The repository at that location could not be read.</li>
- * </ul>
- * @see IRepositoryManager#REPOSITORY_HINT_MODIFIABLE
- */
- public IArtifactRepository loadRepository(URI location, int flags, IProgressMonitor monitor) throws ProvisionException;
-
- /**
- * Refreshes the repository corresponding to the given URL. This method discards
- * any cached state held by the repository manager and reloads the repository
- * contents. The provided repository location must already be known to the repository
- * manager.
- *
- * @param location The absolute location of the repository to refresh
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- * @return The refreshed metadata repository
- * @throws ProvisionException if the repository could not be created. Reasons include:
- * <ul>
- * <li>The location is not known to the repository manager.</li>
- * <li>There is no existing repository at that location.</li>
- * <li>The repository at that location could not be read.</li>
- * </ul>
- */
- public IArtifactRepository refreshRepository(URI location, IProgressMonitor monitor) throws ProvisionException;
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRequest.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRequest.java
deleted file mode 100644
index f68e11d3c..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRequest.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.provisional.p2.artifact.repository;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-
-/**
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IArtifactRequest {
-
- public IArtifactKey getArtifactKey();
-
- /**
- * Returns the result of the previous call to {@link ArtifactRequest#perform(IProgressMonitor)},
- * or <code>null</code> if perform has never been called.
- *
- * @return The result of the previous perform call.
- */
- public IStatus getResult();
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IFileArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IFileArtifactRepository.java
deleted file mode 100644
index 6e6e07be3..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IFileArtifactRepository.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.provisional.p2.artifact.repository;
-
-import java.io.File;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-
-public interface IFileArtifactRepository extends IArtifactRepository {
- /**
- * Return the location of the full local file corresponding to the given
- * artifact key to the given key, or <code>null</code> if not available.
- *
- * @return the location of the requested artifact or<code>null</code> if not available
- */
- public File getArtifactFile(IArtifactKey key);
-
- /**
- * Return the location of the local file corresponding to the given
- * artifact descriptor, or <code>null</code> if not available.
- *
- * @return the location of the requested descriptor or<code>null</code> if not available
- */
- public File getArtifactFile(IArtifactDescriptor descriptor);
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/Messages.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/Messages.java
deleted file mode 100644
index 6d35da258..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/Messages.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.internal.provisional.p2.artifact.repository.processing;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.messages"; //$NON-NLS-1$
- public static String cannot_get_extension;
- public static String cannot_instantiate_step;
- public static String ZipVerifierStep_invalid_archive;
- public static String processing_step_results;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- //
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStep.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStep.java
deleted file mode 100644
index 15375f95d..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStep.java
+++ /dev/null
@@ -1,126 +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 - continuing development
-*******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
-
-/**
- * ProcessingSteps process the data written to them and pass the resultant data on
- * to a configured destination stream. Steps may monitor (e.g., count) the data, compute information
- * about the data (e.g., checksum or hash) or transform the data (e.g., unpack200).
- */
-public abstract class ProcessingStep extends OutputStream implements IStateful {
-
- private OutputStream destination;
- private IProgressMonitor monitor;
- private IStatus status = Status.OK_STATUS;
-
- protected ProcessingStep() {
- super();
- }
-
- /**
- * Initialize this processing step according to the information in the given
- * descriptor and context. After initialization, this step is ready for linking
- * with other steps or output streams
- * @param descriptor description of the step
- * @param context the context in which the step is being used
- */
- public void initialize(ProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
- // nothing to do here!
- }
-
- /**
- * Link this step with the given output stream and configure the step to use the given
- * progress monitor. After linking the step is ready to have data written to it.
- * @param destination the stream into which to write the processed data
- * @param monitor the progress monitor to use for reporting activity
- */
- public void link(OutputStream destination, IProgressMonitor monitor) {
- this.destination = destination;
- this.monitor = monitor;
- }
-
- /**
- * Process the given byte and pass the result on to the configured destination stream
- * @param b the byte being written
- */
- public void write(int b) throws IOException {
- // nothing to do here!
- }
-
- /**
- * Flush any unwritten data from this stream.
- */
- public void flush() throws IOException {
- super.flush();
- if (destination != null)
- destination.flush();
- }
-
- /**
- * Close this stream and, if the configured destination is a ProcessingStep,
- * close it as well. Typically a chain of steps terminates in a conventional
- * output stream. Implementors of this method should ensure they set the
- * status of the step.
- */
- public void close() throws IOException {
- super.close();
- if (destination instanceof ProcessingStep)
- destination.close();
- monitor = null;
- }
-
- public IStatus getStatus() {
- return status;
- }
-
- public void setStatus(IStatus value) {
- if (value == null)
- value = Status.OK_STATUS;
- if (status != null && status.getSeverity() >= value.getSeverity())
- return;
- status = value;
- }
-
- /**
- * Get the progress monitor.
- * @return the progress monitor; may be null
- */
- protected IProgressMonitor getProgressMonitor() {
- return monitor;
- }
-
- /**
- * Get the stream to write the processed data into.
- *
- * @return output stream for processed data
- */
- protected OutputStream getDestination() {
- return destination;
- }
-
- /**
- * Return the status of this step. The status will be <code>null</code> if the
- * step has not yet executed. If the step has executed the returned status
- * indicates the success or failure of the step.
- * @param deep whether or not to aggregate the status of any linked steps
- * @return the requested status
- */
- public IStatus getStatus(boolean deep) {
- return ProcessingStepHandler.getStatus(this, deep);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepDescriptor.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepDescriptor.java
deleted file mode 100644
index f7db92d7e..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepDescriptor.java
+++ /dev/null
@@ -1,89 +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.internal.provisional.p2.artifact.repository.processing;
-
-/**
- * The description of a processor step.
- */
-public class ProcessingStepDescriptor {
-
- private final String processorId; //the operation to be applied (e.g: unpack, md5, signature verification, etc.)
- private final String data; //data requested for the processing (eg. expected checksum)
- private final boolean required; //whether the step is optional or not
-
- /**
- * Create a processing step description.
- *
- * @param processorId
- * @param data
- * @param required
- */
- public ProcessingStepDescriptor(String processorId, String data, boolean required) {
- super();
- this.processorId = processorId;
- this.data = data;
- this.required = required;
- }
-
- public String getProcessorId() {
- return processorId;
- }
-
- public String getData() {
- return data;
- }
-
- public boolean isRequired() {
- return required;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((data == null) ? 0 : data.hashCode());
- result = prime * result + ((processorId == null) ? 0 : processorId.hashCode());
- result = prime * result + (required ? 1231 : 1237);
- return result;
- }
-
- /* (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 ProcessingStepDescriptor))
- return false;
- final ProcessingStepDescriptor other = (ProcessingStepDescriptor) obj;
- if (data == null) {
- if (other.data != null)
- return false;
- } else if (!data.equals(other.data))
- return false;
- if (processorId == null) {
- if (other.processorId != null)
- return false;
- } else if (!processorId.equals(other.processorId))
- return false;
- if (required != other.required)
- return false;
- return true;
- }
-
- public String toString() {
- return "Processor: " + processorId + (required ? "(req)" : "(notReq)") + " ,data: " + data; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepHandler.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepHandler.java
deleted file mode 100644
index 508c46486..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepHandler.java
+++ /dev/null
@@ -1,203 +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 - continuing development
-*******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing;
-
-import java.io.OutputStream;
-import java.util.ArrayList;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
-import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.ArtifactOutputStream;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Creates processing step instances from extensions and executes them.
- */
-public class ProcessingStepHandler {
-
- private static final String PROCESSING_STEPS_EXTENSION_ID = "org.eclipse.equinox.p2.artifact.repository.processingSteps"; //$NON-NLS-1$
-
- //TODO This method can go
- public static IStatus checkStatus(OutputStream output) {
- return getStatus(output, true);
- }
-
- /**
- * Check to see that we have processors for all the steps in the given descriptor
- * @param descriptor the descriptor to check
- * @return whether or not processors for all the descriptor's steps are installed
- */
- public static boolean canProcess(IArtifactDescriptor descriptor) {
- IExtensionRegistry registry = RegistryFactory.getRegistry();
- IExtensionPoint point = registry.getExtensionPoint(PROCESSING_STEPS_EXTENSION_ID);
- if (point == null)
- return false;
- ProcessingStepDescriptor[] steps = descriptor.getProcessingSteps();
- for (int i = 0; i < steps.length; i++) {
- if (point.getExtension(steps[i].getProcessorId()) == null)
- return false;
- }
- return true;
- }
-
- /**
- * Return the status of this step. The status will be <code>null</code> if the
- * step has not yet executed. If the step has executed the returned status
- * indicates the success or failure of the step.
- * @param deep whether or not to aggregate the status of any linked steps
- * @return the requested status
- */
- public static IStatus getStatus(OutputStream stream, boolean deep) {
- if (!deep)
- return getStatus(stream);
- ArrayList list = new ArrayList();
- int severity = collectStatus(stream, list);
- if (severity == IStatus.OK)
- return Status.OK_STATUS;
- IStatus[] result = (IStatus[]) list.toArray(new IStatus[list.size()]);
- return new MultiStatus(Activator.ID, severity, result, Messages.processing_step_results, null);
- }
-
- /**
- * Return statuses from this step and any linked step, discarding OK statuses until an error status is received.
- * @param stream the stream representing the first step
- * @return the requested status
- */
- public static IStatus getErrorStatus(OutputStream stream) {
- ArrayList list = new ArrayList();
- int severity = collectErrorStatus(stream, list);
- if (severity == IStatus.OK)
- return Status.OK_STATUS;
- IStatus[] result = (IStatus[]) list.toArray(new IStatus[list.size()]);
- return new MultiStatus(Activator.ID, 0, result, Messages.processing_step_results, null);
- }
-
- private static int collectErrorStatus(OutputStream stream, ArrayList list) {
- IStatus status = getStatus(stream);
- if (!status.isOK())
- list.add(status);
- if (status.matches(IStatus.ERROR))
- // Errors past this should be bogus as they rely on output from this step
- return status.getSeverity();
-
- OutputStream destination = getDestination(stream);
- if (destination == null || !(destination instanceof IStateful))
- return status.getSeverity();
- int result = collectErrorStatus(destination, list);
- // TODO greater than test here is a little brittle but it is very unlikely that we will add
- // a new status severity.
- return status.getSeverity() > result ? status.getSeverity() : result;
- }
-
- public static IStatus getStatus(OutputStream stream) {
- if (stream instanceof IStateful)
- return ((IStateful) stream).getStatus();
- return Status.OK_STATUS;
- }
-
- private static int collectStatus(OutputStream stream, ArrayList list) {
- IStatus status = getStatus(stream);
- list.add(status);
- OutputStream destination = getDestination(stream);
- if (destination == null || !(destination instanceof IStateful))
- return status.getSeverity();
- int result = collectStatus(destination, list);
- // TODO greater than test here is a little brittle but it is very unlikely that we will add
- // a new status severity.
- return status.getSeverity() > result ? status.getSeverity() : result;
- }
-
- private static OutputStream getDestination(OutputStream stream) {
- if (stream instanceof ProcessingStep)
- return ((ProcessingStep) stream).getDestination();
- if (stream instanceof ArtifactOutputStream)
- return ((ArtifactOutputStream) stream).getDestination();
- return null;
- }
-
- public ProcessingStep[] create(ProcessingStepDescriptor[] descriptors, IArtifactDescriptor context) {
- ProcessingStep[] result = new ProcessingStep[descriptors.length];
- for (int i = 0; i < descriptors.length; i++)
- result[i] = create(descriptors[i], context);
- return result;
- }
-
- public ProcessingStep create(ProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
- IExtensionRegistry registry = RegistryFactory.getRegistry();
- IExtension extension = registry.getExtension(PROCESSING_STEPS_EXTENSION_ID, descriptor.getProcessorId());
- Exception error;
- if (extension != null) {
- IConfigurationElement[] config = extension.getConfigurationElements();
- try {
- Object object = config[0].createExecutableExtension("class"); //$NON-NLS-1$
- ProcessingStep step = (ProcessingStep) object;
- step.initialize(descriptor, context);
- return step;
- } catch (Exception e) {
- error = e;
- }
- } else
- error = new ProcessingStepHandlerException(NLS.bind(Messages.cannot_get_extension, PROCESSING_STEPS_EXTENSION_ID, descriptor.getProcessorId()));
-
- int severity = descriptor.isRequired() ? IStatus.ERROR : IStatus.INFO;
- ProcessingStep result = new EmptyProcessingStep();
- result.setStatus(new Status(severity, Activator.ID, Messages.cannot_instantiate_step + descriptor.getProcessorId(), error));
- return result;
- }
-
- public OutputStream createAndLink(ProcessingStepDescriptor[] descriptors, IArtifactDescriptor context, OutputStream output, IProgressMonitor monitor) {
- if (descriptors == null)
- return output;
- ProcessingStep[] steps = create(descriptors, context);
- return link(steps, output, monitor);
- }
-
- public OutputStream link(ProcessingStep[] steps, OutputStream output, IProgressMonitor monitor) {
- OutputStream previous = output;
- for (int i = steps.length - 1; i >= 0; i--) {
- ProcessingStep step = steps[i];
- step.link(previous, monitor);
- previous = step;
- }
- if (steps.length == 0)
- return previous;
- // now link the artifact stream to the first stream in the new chain
- ArtifactOutputStream lastLink = getArtifactStream(previous);
- if (lastLink != null)
- lastLink.setFirstLink(previous);
- return previous;
- }
-
- // Traverse the chain of processing steps and return the stream served up by
- // the artifact repository or null if one cannot be found.
- private ArtifactOutputStream getArtifactStream(OutputStream stream) {
- OutputStream current = stream;
- while (current instanceof ProcessingStep)
- current = ((ProcessingStep) current).getDestination();
- if (current instanceof ArtifactOutputStream)
- return (ArtifactOutputStream) current;
- return null;
- }
-
- protected static final class EmptyProcessingStep extends ProcessingStep {
- // Just to hold the status
- }
-
- protected static final class ProcessingStepHandlerException extends Exception {
- private static final long serialVersionUID = 1L;
-
- public ProcessingStepHandlerException(String message) {
- super(message);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ZipVerifierStep.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ZipVerifierStep.java
deleted file mode 100644
index a649b0c23..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ZipVerifierStep.java
+++ /dev/null
@@ -1,43 +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.artifact.repository.processing;
-
-import java.io.IOException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
-
-public class ZipVerifierStep extends ProcessingStep {
- static final int[] ZIP_HEADER = new int[] {0x50, 0x4b, 0x03, 0x04};
-
- private int valid = 0; //-1 indicates that it is not a zip, >3 indicates that we are done the verification
-
- public void write(int b) throws IOException {
- getDestination().write(b);
- if (valid > 3)
- return;
- if (valid == -1) {
- return;
- }
- if (b != ZIP_HEADER[valid++]) {
- valid = -1;
- setStatus(new Status(IStatus.ERROR, Activator.ID, Messages.ZipVerifierStep_invalid_archive));
- return;
- }
- }
-
- public void close() throws IOException {
- if (valid > 3) {
- setStatus(Status.OK_STATUS);
- } else {
- setStatus(new Status(IStatus.ERROR, Activator.ID, Messages.ZipVerifierStep_invalid_archive));
- }
- super.close();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/messages.properties b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/messages.properties
deleted file mode 100644
index 9459df431..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/messages.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-cannot_instantiate_step=Could not instantiate step:
-###############################################################################
-# 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
-###############################################################################
-cannot_get_extension=Could not get extension {0} for descriptor id {1}.
-ZipVerifierStep_invalid_archive=Downloaded stream not a valid archive. Check the server.
-processing_step_results=Result of processing steps. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/AbstractArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/AbstractArtifactRepository.java
deleted file mode 100644
index a5b04501b..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/AbstractArtifactRepository.java
+++ /dev/null
@@ -1,78 +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.spi.p2.artifact.repository;
-
-import java.io.OutputStream;
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.spi.p2.repository.AbstractRepository;
-
-public abstract class AbstractArtifactRepository extends AbstractRepository implements IArtifactRepository {
-
- protected AbstractArtifactRepository(String name, String type, String version, URI location, String description, String provider, Map properties) {
- super(name, type, version, location, description, provider, properties);
- }
-
- public abstract boolean contains(IArtifactDescriptor descriptor);
-
- public abstract boolean contains(IArtifactKey key);
-
- public abstract IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor);
-
- public abstract IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key);
-
- public abstract IArtifactKey[] getArtifactKeys();
-
- public abstract IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor);
-
- public abstract OutputStream getOutputStream(IArtifactDescriptor descriptor) throws ProvisionException;
-
- public void addDescriptor(IArtifactDescriptor descriptor) {
- assertModifiable();
- }
-
- public void addDescriptors(IArtifactDescriptor[] descriptors) {
- assertModifiable();
- }
-
- public void removeDescriptor(IArtifactDescriptor descriptor) {
- assertModifiable();
- }
-
- public void removeDescriptor(IArtifactKey key) {
- assertModifiable();
- }
-
- public void removeAll() {
- assertModifiable();
- }
-
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (!(o instanceof AbstractArtifactRepository)) {
- return false;
- }
- if (URIUtil.sameURI(getLocation(), ((AbstractArtifactRepository) o).getLocation()))
- return true;
- return false;
- }
-
- public int hashCode() {
- return (this.getLocation().toString().hashCode()) * 87;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/ArtifactRepositoryFactory.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/ArtifactRepositoryFactory.java
deleted file mode 100644
index fce9f4e85..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/ArtifactRepositoryFactory.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.provisional.spi.p2.artifact.repository;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
-/**
- * An artifact repository factory is responsible for creating and loading instances
- * of a particular type of artifact repository. Factories are provided via the
- * <tt>org.eclipse.equinox.p2.artifact.repository.artifactRepositories</tt> extension point.
- */
-public abstract class ArtifactRepositoryFactory {
-
- /**
- * Creates and returns a new empty artifact repository of the given type at
- * the given location.
- *
- * @param location the location for the new repository
- * @param name the name of the new repository
- * @param type the kind of repository to create
- * @param properties the properties to set on the repository
- * @return the newly created repository
- * @throws ProvisionException if the repository could not be created. Reasons include:
- * <ul>
- * <li>The repository type is unknown.</li>
- * <li>There was an error writing to the given repository location.</li>
- * <li>A repository already exists at that location.</li>
- * </ul>
- */
- public abstract IArtifactRepository create(URI location, String name, String type, Map properties) throws ProvisionException;
-
- /**
- * Loads and returns the repository of this factory's type at the given location.
- * <p>
- * The error code returned in the case of failure is significant. In particular an
- * error code of {@link ProvisionException#REPOSITORY_FAILED_READ} indicates
- * that the location definitely identifies a repository of this type, but an error occurred
- * while loading the repository. The repository manager will not attempt to load
- * a repository from that location using any other factory. An error code of
- * {@link ProvisionException#REPOSITORY_NOT_FOUND} indicates there is no
- * repository of this type at the given location, and the repository manager is free
- * to try again with a different repository factory.
- * </p>
- * <p>
- * The flags passed in should be taken as a hint for the type of repository to load. If
- * the factory knows it will not load a repository that satisfies these hints, it can fail
- * fast and return null.
- * @see IRepositoryManager#REPOSITORY_HINT_MODIFIABLE
- * </p>
- * @param location the location in which to look for a repository description
- * @param flags to consider while loading the repository
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- * @return a repository object for the given location
- * @throws ProvisionException if the repository could not be created. Reasons include:
- * <ul>
- * <li>There is no existing repository at that location.</li>
- * <li>The repository at that location could not be read.</li>
- * </ul>
- */
- public abstract IArtifactRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException;
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/SimpleArtifactRepositoryFactory.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/SimpleArtifactRepositoryFactory.java
deleted file mode 100644
index d9744eadb..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/SimpleArtifactRepositoryFactory.java
+++ /dev/null
@@ -1,129 +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.spi.p2.artifact.repository;
-
-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.artifact.repository.Activator;
-import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
-import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository;
-import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepositoryIO;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.p2.repository.RepositoryTransport;
-import org.eclipse.equinox.internal.p2.repository.Transport;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.osgi.util.NLS;
-
-public class SimpleArtifactRepositoryFactory extends ArtifactRepositoryFactory {
-
- public IArtifactRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
- final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
- long time = 0;
- final String debugMsg = "Restoring artifact repository "; //$NON-NLS-1$
- if (Tracing.DEBUG_METADATA_PARSING) {
- Tracing.debug(debugMsg + location);
- time = -System.currentTimeMillis();
- }
- File localFile = null;
- boolean local = false;
- try {
- SubMonitor sub = SubMonitor.convert(monitor, 300);
- OutputStream artifacts = null;
- // try with compressed
- boolean compress = true;
- if (PROTOCOL_FILE.equals(location.getScheme())) {
- local = true;
- localFile = URIUtil.toFile(SimpleArtifactRepository.getActualLocation(location, true));
- if (!localFile.exists()) {
- localFile = URIUtil.toFile(SimpleArtifactRepository.getActualLocation(location, false));
- compress = false;
- }
- } else {
- //not local, return null if the caller wanted a modifiable repo
- if ((flags & IRepositoryManager.REPOSITORY_HINT_MODIFIABLE) > 0) {
- return null;
- }
-
- //download to local temp file
- localFile = File.createTempFile("artifacts", ".xml"); //$NON-NLS-1$ //$NON-NLS-2$
- try {
- artifacts = new BufferedOutputStream(new FileOutputStream(localFile));
- IStatus status = getTransport().download(SimpleArtifactRepository.getActualLocation(location, compress), artifacts, sub.newChild(100));
- if (!status.isOK()) {
- // not meaningful to continue on an authentication exception (user will likely just be prompted again)
- if (status.getCode() == ProvisionException.REPOSITORY_FAILED_AUTHENTICATION)
- throw new ProvisionException(status);
- // retry uncompressed
- compress = false;
- status = getTransport().download(SimpleArtifactRepository.getActualLocation(location, compress), artifacts, sub.newChild(100));
- if (!status.isOK())
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, status.getMessage(), null));
- }
- } finally {
- if (artifacts != null)
- artifacts.close();
- }
- }
- InputStream descriptorStream = null;
- try {
- descriptorStream = new BufferedInputStream(new FileInputStream(localFile));
- if (compress) {
- URI actualLocation = SimpleArtifactRepository.getActualLocation(location, false);
- JarInputStream jInStream = new JarInputStream(descriptorStream);
- JarEntry jarEntry = jInStream.getNextJarEntry();
- String filename = URIUtil.lastSegment(actualLocation);
- while (jarEntry != null && filename != null && !(filename.equals(jarEntry.getName()))) {
- jarEntry = jInStream.getNextJarEntry();
- }
- if (jarEntry == null) {
- //there is a jar but the entry is missing or invalid, so treat this as an invalid repository
- throw new IOException(NLS.bind(Messages.io_invalidLocation, actualLocation.getPath()));
- }
- descriptorStream = jInStream;
- }
- SimpleArtifactRepositoryIO io = new SimpleArtifactRepositoryIO();
- SimpleArtifactRepository result = (SimpleArtifactRepository) io.read(localFile.toURL(), descriptorStream, sub.newChild(100));
- result.initializeAfterLoad(location);
- if (Tracing.DEBUG_METADATA_PARSING) {
- time += System.currentTimeMillis();
- Tracing.debug(debugMsg + "time (ms): " + time); //$NON-NLS-1$
- }
- return result;
- } finally {
- if (descriptorStream != null)
- descriptorStream.close();
- }
- } 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 (!local && localFile != null && !localFile.delete())
- localFile.deleteOnExit();
- }
- }
-
- public IArtifactRepository create(URI location, String name, String type, Map properties) {
- return new SimpleArtifactRepository(name, location, properties);
- }
-
- private Transport getTransport() {
- return RepositoryTransport.getInstance();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/AddChildTask.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/AddChildTask.java
deleted file mode 100644
index a2e122805..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/AddChildTask.java
+++ /dev/null
@@ -1,82 +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.artifact.repository.ant;
-
-import java.net.URI;
-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.artifact.repository.Activator;
-import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-
-/**
- * Ant task to add a child artifact repository to an already-existing composite artifact repository.
- */
-public class AddChildTask extends Task {
-
- URI location; // location of the composite repository
- URI child; // address of the child to add
- String comparatorID; // comparator to use for compare (optional)
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() {
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
- if (manager == null)
- throw new BuildException("Unable to acquire artifact repository manager service.");
-
- // get the composite repository
- CompositeArtifactRepository repo = null;
- try {
- repo = (CompositeArtifactRepository) manager.loadRepository(location, null);
- } catch (ProvisionException e) {
- throw new BuildException("Exception while loading repository.", e);
- }
-
- // just do a straight add if the user didn't specify a comparator.
- if (comparatorID == null) {
- repo.addChild(child);
- return;
- }
-
- // otherwise run the comparator when we try and add the child and print out the result.
- if (repo.addChild(child, comparatorID))
- System.out.println(child + " was added successfully.");
- else
- System.out.println(child + " was not added.");
- }
-
- /*
- * 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);
- }
-
- /*
- * Set the identifier of the comparator to use.
- */
- public void setComparatorID(String value) {
- comparatorID = value;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/AntMirrorLog.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/AntMirrorLog.java
deleted file mode 100644
index 9d30c11f0..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/AntMirrorLog.java
+++ /dev/null
@@ -1,105 +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.artifact.repository.ant;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog;
-import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-
-public class AntMirrorLog implements IArtifactMirrorLog {
-
- private boolean consoleMessage = false;
- private Method log;
- private Object task;
-
- public AntMirrorLog(Object task) throws NoSuchMethodException {
- this.task = task;
- try {
- log = task.getClass().getMethod("log", new Class[] {String.class, int.class}); //$NON-NLS-1$
- } catch (SecurityException e) {
- exceptionOccurred(null, e);
- }
- }
-
- public void log(IArtifactDescriptor descriptor, IStatus status) {
- log(descriptor.toString(), status.getSeverity());
- log(status);
- }
-
- public void log(IStatus status) {
- int severity = status.getSeverity();
- // Log the status message
- log(status.getMessage(), severity);
- // Log the exception if applicable
- if (status.getException() != null)
- log(status.getException().getMessage(), severity);
-
- // Log any children of this status
- IStatus[] nestedStatus = status.getChildren();
- if (nestedStatus != null)
- for (int i = 0; i < nestedStatus.length; i++)
- log(nestedStatus[i]);
- }
-
- public void close() {
- // nothing to do here
- }
-
- /*
- * Log a message to the Ant Task
- */
- private void log(String message, int statusSeverity) {
- try {
- log.invoke(task, new Object[] {message, new Integer(mapLogLevels(statusSeverity))});
- } catch (IllegalArgumentException e) {
- exceptionOccurred(message, e);
- } catch (IllegalAccessException e) {
- exceptionOccurred(message, e);
- } catch (InvocationTargetException e) {
- exceptionOccurred(message, e);
- }
- }
-
- /*
- * Show an error message if this the first time, and print status messages.
- */
- private void exceptionOccurred(String message, Exception e) {
- if (!consoleMessage) {
- System.err.println(Messages.MirrorLog_Exception_Occurred);
- e.printStackTrace(System.err);
- System.err.println(Messages.MirrorLog_Console_Log);
- consoleMessage = true;
- }
- if (message != null)
- System.out.println(message);
- }
-
- /**
- * Copied from AntLogAdapter in pde build.
- */
- private int mapLogLevels(int iStatusLevel) {
- switch (iStatusLevel) {
- case IStatus.ERROR :
- return 0;
- case IStatus.OK :
- return 2;
- case IStatus.INFO :
- return 2;
- case IStatus.WARNING :
- return 1;
- default :
- return 1;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/CreateCompositeArtifactRepositoryTask.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/CreateCompositeArtifactRepositoryTask.java
deleted file mode 100644
index a86224e53..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/CreateCompositeArtifactRepositoryTask.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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.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.apache.tools.ant.Task;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
-import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
-/**
- * Ant task for creating a new composite artifact repository.
- */
-public class CreateCompositeArtifactRepositoryTask extends Task {
-
- URI location; // desired location of the composite repository
- String name = "Composite Artifact Repository";
- boolean compressed = true;
- boolean failOnExists = false; // should we fail if a repo already exists?
- Map properties = new HashMap();
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() {
- validate();
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
- if (manager == null)
- throw new BuildException("Unable to aquire artifact 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 {
- IArtifactRepository repository = manager.loadRepository(location, null);
- if (repository instanceof CompositeArtifactRepository) {
- 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);
- }
-
- // set the properties
- if (compressed)
- properties.put(IRepository.PROP_COMPRESSED, Boolean.toString(true));
-
- // create the repository
- try {
- manager.createRepository(location, name, IArtifactRepositoryManager.TYPE_COMPOSITE_REPOSITORY, properties);
- } catch (ProvisionException e) {
- throw new BuildException("Error occurred while creating composite artifact repository.", e);
- }
- }
-
- /*
- * Perform basic sanity checking of some of the parameters.
- */
- private void validate() {
- if (location == null)
- throw new BuildException("Must specify repository location.");
- if (name == null)
- throw new BuildException("Must specify a repository name.");
- }
-
- /*
- * Set the name of the composite repository.
- */
- public void setName(String value) {
- name = value;
- }
-
- /*
- * Set the location of the repository.
- */
- public void setLocation(String value) throws URISyntaxException {
- location = URIUtil.fromString(value);
- }
-
- /*
- * Set a value indicating whether or not the 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.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/MirrorApplicationTask.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/MirrorApplicationTask.java
deleted file mode 100644
index 5040961cf..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/MirrorApplicationTask.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.internal.p2.artifact.repository.ant;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.artifact.mirror.MirrorApplication;
-import org.osgi.framework.Bundle;
-
-/**
- * Ant task for running the artifact repository mirroring application.
- */
-public class MirrorApplicationTask extends Task {
-
- private static final String EMPTY_STRING = ""; //$NON-NLS-1$
- private static final String ARG_COMPARATOR = "-comparator"; //$NON-NLS-1$
- private static final String ARG_COMPARE = "-compare"; //$NON-NLS-1$
- private static final String ARG_COMPARE_AGAINST = "-compareAgainst"; //$NON-NLS-1$
- private static final String ARG_COMPARATOR_LOG = "-comparatorLog"; //$NON-NLS-1$
- private static final String ARG_DESTINATION = "-destination"; //$NON-NLS-1$
- private static final String ARG_DESTINATION_NAME = "-destinationName"; //$NON-NLS-1$
- private static final String ARG_IGNORE_ERRORS = "-ignoreErrors"; //$NON-NLS-1$
- private static final String ARG_LOG = "-log"; //$NON-NLS-1$
- private static final String ARG_RAW = "-raw"; //$NON-NLS-1$
- private static final String ARG_SOURCE = "-source"; //$NON-NLS-1$
- private static final String ARG_VERBOSE = "-verbose"; //$NON-NLS-1$
- private static final String ARG_WRITE_MODE = "-writeMode"; //$NON-NLS-1$
-
- URL source;
- URL destination;
- String destinationName;
- URL baseline; // location of known good repository for compare against (optional)
- File mirrorLog; // file to log mirror output to (optional)
- File comparatorLog; // file to comparator output to (optional)
- String comparatorID; // specifies a comparator (optional)
- String writeMode;
- boolean compare = false;
- boolean ignoreErrors = false;
- boolean raw = false; // use raw artifact descriptors?
- boolean verbose = false;
-
- /*
- * Runs the mirror application with the given arguments.
- */
- private void runMirrorApplication(final String[] args) throws Exception {
- MirrorApplication app = new MirrorApplication();
- if (mirrorLog == null)
- app.setLog(new AntMirrorLog(this));
- app.start(new IApplicationContext() {
-
- public void applicationRunning() {
- // nothing to do
- }
-
- public Map getArguments() {
- Map arguments = new HashMap();
- arguments.put(IApplicationContext.APPLICATION_ARGS, args);
- return arguments;
- }
-
- public String getBrandingApplication() {
- return null;
- }
-
- public Bundle getBrandingBundle() {
- return null;
- }
-
- public String getBrandingDescription() {
- return null;
- }
-
- public String getBrandingId() {
- return null;
- }
-
- public String getBrandingName() {
- return null;
- }
-
- public String getBrandingProperty(String key) {
- return null;
- }
- });
- }
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() {
- // Compare against if baseline specified
- boolean compareAgainst = baseline != null;
- boolean comparator = comparatorID != null;
-
- // create arguments
- String[] args = new String[] { //
- ARG_SOURCE, source.toExternalForm(), //
- ARG_DESTINATION, destination.toExternalForm(), //
- ARG_WRITE_MODE, writeMode == null ? EMPTY_STRING : writeMode, //
- compare ? ARG_COMPARE : EMPTY_STRING, //
- ignoreErrors ? ARG_IGNORE_ERRORS : EMPTY_STRING, //
- raw ? ARG_RAW : EMPTY_STRING, //
- verbose ? ARG_VERBOSE : EMPTY_STRING, //
- compareAgainst ? ARG_COMPARE_AGAINST : EMPTY_STRING, //
- compareAgainst ? baseline.toExternalForm() : EMPTY_STRING, //
- comparator ? ARG_COMPARATOR : EMPTY_STRING, //
- comparator ? comparatorID : EMPTY_STRING, //
- mirrorLog != null ? ARG_LOG : EMPTY_STRING, //
- mirrorLog != null ? mirrorLog.getAbsolutePath() : EMPTY_STRING, //
- comparatorLog != null ? ARG_COMPARATOR_LOG : EMPTY_STRING, //
- comparatorLog != null ? comparatorLog.getAbsolutePath() : EMPTY_STRING, //
- destinationName != null ? ARG_DESTINATION_NAME : EMPTY_STRING, //
- destinationName != null ? destinationName : EMPTY_STRING};
-
- try {
- runMirrorApplication(args);
- } catch (Exception e) {
- throw new BuildException("Exception while running mirror application.", e);
- }
- }
-
- /*
- * Set the location of the source.
- */
- public void setSource(String value) throws MalformedURLException {
- source = new URL(value);
- }
-
- /*
- * Set the location of the destination.
- */
- public void setDestination(String value) throws MalformedURLException {
- destination = new URL(value);
- }
-
- /*
- * Set the name of the destination repository.
- */
- public void setDestinationName(String value) {
- destinationName = value;
- }
-
- /*
- * Set the location of the baseline repository. (used in comparison)
- */
- public void setBaseline(String value) throws MalformedURLException {
- baseline = new URL(value);
- compare = true;
- }
-
- /*
- * Set the identifier of the comparator to use.
- */
- public void setComparatorID(String value) {
- comparatorID = value;
- compare = true;
- }
-
- /*
- * Set the location of the comparator log
- */
- public void setComparatorLog(String value) {
- comparatorLog = new File(value);
- }
-
- /*
- * Set the write mode. (e.g. clean or append)
- */
- public void setWriteMode(String value) {
- writeMode = value;
- }
-
- /*
- * Set the log location if applicable
- */
- public void setLog(String value) {
- mirrorLog = new File(value);
- }
-
- /*
- * Set whether or not the application should be calling a comparator when mirroring.
- */
- public void setCompare(boolean value) {
- compare = value;
- }
-
- /*
- * Set whether or not we should ignore errors when running the mirror application.
- */
- public void setIgnoreErrors(boolean value) {
- ignoreErrors = value;
- }
-
- /*
- * Set whether or not the the artifacts are raw.
- */
- public void setRaw(boolean value) {
- raw = value;
- }
-
- /*
- * Set whether or not the mirror application should be run in verbose mode.
- */
- public void setVerbose(boolean value) {
- verbose = value;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/RemoveChildTask.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/RemoveChildTask.java
deleted file mode 100644
index 2a1212660..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/RemoveChildTask.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.artifact.repository.ant;
-
-import java.net.URI;
-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.artifact.repository.Activator;
-import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-
-/**
- * Ant task for removing a specific child from a composite artifact repository.
- */
-public class RemoveChildTask extends Task {
-
- URI location; // location of the composite repository
- URI child; // location of child to remove
- boolean allChildren = false; // should we remove all children?
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() {
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
- if (manager == null)
- throw new BuildException("Unable to aquire artifact repository manager service.");
-
- // load repository
- CompositeArtifactRepository repo;
- try {
- repo = (CompositeArtifactRepository) manager.loadRepository(location, null);
- } catch (ProvisionException e) {
- throw new BuildException("Error occurred while loading repository.", e);
- }
-
- // remove all children or just a specified child
- if (allChildren)
- repo.removeAllChildren();
- else
- repo.removeChild(child);
- }
-
- /*
- * Set the repository location.
- */
- public void setLocation(String value) throws URISyntaxException {
- location = URIUtil.fromString(value);
- }
-
- /*
- * Set the child repository location.
- */
- public void setChild(String value) throws URISyntaxException {
- child = URIUtil.fromString(value);
- }
-
- /*
- * Set whether or not we want to remove all the children.
- */
- public void setAllChildren(String value) {
- allChildren = Boolean.valueOf(value).booleanValue();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/ValidateTask.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/ValidateTask.java
deleted file mode 100644
index 96a4d3a7e..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/ValidateTask.java
+++ /dev/null
@@ -1,68 +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.artifact.repository.ant;
-
-import java.net.URI;
-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.artifact.repository.Activator;
-import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-
-/**
- * Ant task for validating the contents of a composite artifact repository.
- */
-public class ValidateTask extends Task {
-
- URI location; // location of the composite repository
- String comparatorID; // specifies the comparator we want to use.
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() {
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
- if (manager == null)
- throw new BuildException("Unable to aquire artifact repository manager service.");
-
- // load the repository
- CompositeArtifactRepository repo = null;
- try {
- repo = (CompositeArtifactRepository) manager.loadRepository(location, null);
- } catch (ProvisionException e) {
- throw new BuildException("Exception while loading repository.", e);
- }
-
- // perform the sanity check
- if (repo.validate(comparatorID))
- System.err.println("Valid repository at: " + location);
- else
- System.err.println("Invalid repository at: " + location);
- }
-
- /*
- * Set the repository location.
- */
- public void setLocation(String value) throws URISyntaxException {
- location = URIUtil.fromString(value);
- }
-
- /*
- * Set the ID of the comparator.
- */
- public void setComparatorID(String value) {
- comparatorID = value;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.console/.classpath b/bundles/org.eclipse.equinox.p2.console/.classpath
deleted file mode 100644
index 7cdeb7319..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="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.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 a455b6228..000000000
--- a/bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,340 +0,0 @@
-#Thu Sep 13 22:02:41 EDT 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=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.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.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.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 edbb69a25..000000000
--- a/bundles/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,27 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.console;singleton:=true
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.0.100.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.console.Activator
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.equinox.internal.p2.console;x-friends:="org.eclipse.equinox.p2.director.app,org.eclipse.equinox.p2.tools"
-Import-Package: org.eclipse.core.runtime;common=split,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.repository,
- 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.4.0",
- org.osgi.util.tracker;version="1.3.0"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
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 c4d876982..000000000
--- a/bundles/org.eclipse.equinox.p2.console/Provisioning console.launch
+++ /dev/null
@@ -1,20 +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="d:\tmp\selfhosting"/>
-<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.PROGRAM_ARGUMENTS" value="-console -consolelog"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.equinox.app*1.0.100.v20080303@default:default,org.eclipse.equinox.preferences*3.2.200.v20080201@default:default,javax.servlet*2.4.0.v200711021030@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.core.net*1.0.100.I20080226@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.core.runtime.compatibility.auth*3.2.100.v20070502@default:default,org.eclipse.equinox.registry*3.4.0.v20080201@default:default,org.eclipse.core.contenttype*3.3.0.v20080201@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<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.sat4j.pb*2.0.0.v20080307@default:default,org.eclipse.equinox.p2.garbagecollector*0.1.0.qualifier@default:default,org.eclipse.equinox.p2.core*0.1.0.qualifier@default:default,org.eclipse.ecf.provider.filetransfer*1.6.0.qualifier@default:default,org.eclipse.equinox.p2.metadata*0.1.0.qualifier@default:default,org.eclipse.equinox.p2.exemplarysetup*0.1.0.qualifier@default:true,org.eclipse.equinox.p2.console*0.1.0.qualifier@default:true,org.eclipse.equinox.p2.touchpoint.eclipse*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.sat4j.core*2.0.0.v20080307@default:default,org.eclipse.equinox.simpleconfigurator.manipulator*0.1.0.qualifier@default:default,org.eclipse.equinox.p2.director*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.equinox.p2.touchpoint.natives*0.1.0.qualifier@default:default,org.eclipse.equinox.simpleconfigurator*0.1.0.qualifier@1:true,org.eclipse.equinox.p2.jarprocessor*0.1.0.qualifier@default:default,org.eclipse.ecf.identity*1.3.0.qualifier@default:default"/>
-</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 a6b8330d2..000000000
--- a/bundles/org.eclipse.equinox.p2.console/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.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/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 78398a0b0..000000000
--- a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/Activator.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.console;
-
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.osgi.framework.*;
-import org.osgi.util.tracker.ServiceTracker;
-import org.osgi.util.tracker.ServiceTrackerCustomizer;
-
-public class Activator implements BundleActivator, ServiceTrackerCustomizer {
- // 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 profileTracker;
- private ProvCommandProvider provider;
- private ServiceRegistration providerRegistration = null;
-
- public static BundleContext getContext() {
- return context;
- }
-
- public Activator() {
- super();
- }
-
- public void start(BundleContext context) throws Exception {
- Activator.context = context;
- boolean registerCommands = true;
- try {
- Class.forName(PROVIDER_NAME);
- } catch (ClassNotFoundException e) {
- registerCommands = false;
- }
-
- if (registerCommands) {
- profileTracker = new ServiceTracker(context, IProfileRegistry.class.getName(), this);
- profileTracker.open();
- }
- }
-
- public void stop(BundleContext context) throws Exception {
- profileTracker.close();
- if (providerRegistration != null)
- providerRegistration.unregister();
- providerRegistration = null;
- Activator.context = null;
- }
-
- public Object addingService(ServiceReference reference) {
- BundleContext context = Activator.getContext();
- IProfileRegistry registry = (IProfileRegistry) context.getService(reference);
- provider = new ProvCommandProvider(context.getProperty("eclipse.p2.profile"), registry);
- providerRegistration = context.registerService(PROVIDER_NAME, provider, null);
- return registry;
- }
-
- public void modifiedService(ServiceReference reference, Object service) {
- // TODO Auto-generated method stub
- }
-
- public void removedService(ServiceReference reference, Object 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 0250c920c..000000000
--- a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java
+++ /dev/null
@@ -1,401 +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
- * Band XI - add more commands
- ******************************************************************************/
-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.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.IUPropertyQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-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 Profile profile;
-
- public ProvCommandProvider(String profileId, IProfileRegistry registry) {
- // 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 a metadata repository.
- */
- public void _provaddrepo(CommandInterpreter interpreter) {
- String urlString = interpreter.nextArgument();
- if (urlString == null) {
- interpreter.print("Repository location must be provided");
- interpreter.println();
- return;
- }
- URI repoURL = toURI(interpreter, urlString);
- if (repoURL == null)
- return;
- if (ProvisioningHelper.addMetadataRepository(repoURL) == null)
- interpreter.println("Unable to add repository: " + repoURL);
- }
-
- public void _provdelrepo(CommandInterpreter interpreter) {
- String urlString = interpreter.nextArgument();
- if (urlString == null) {
- interpreter.print("Repository location must be provided");
- interpreter.println();
- return;
- }
- URI repoURL = toURI(interpreter, urlString);
- if (repoURL == null)
- return;
- ProvisioningHelper.removeMetadataRepository(repoURL);
- }
-
- public void _provaddartifactrepo(CommandInterpreter interpreter) {
- String urlString = interpreter.nextArgument();
- if (urlString == null) {
- interpreter.print("Repository location must be provided");
- interpreter.println();
- return;
- }
- URI repoURL = toURI(interpreter, urlString);
- if (repoURL == null)
- return;
- if (ProvisioningHelper.addArtifactRepository(repoURL) == null)
- interpreter.println("Unable to add repository: " + repoURL);
- }
-
- public void _provdelartifactrepo(CommandInterpreter interpreter) {
- String urlString = interpreter.nextArgument();
- if (urlString == null) {
- interpreter.print("Repository location must be provided");
- interpreter.println();
- return;
- }
- URI repoURL = toURI(interpreter, urlString);
- if (repoURL == null)
- return;
- ProvisioningHelper.removeArtifactRepository(repoURL);
- }
-
- /**
- * 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"))
- profileId = IProfileRegistry.SELF;
- if (iu == null || version == null || profileId == null) {
- interpreter.println("Installable unit id, version, and profile Id must be provided");
- return;
- }
- IStatus s = null;
- try {
- s = ProvisioningHelper.install(iu, version, ProvisioningHelper.getProfile(profileId), new NullProgressMonitor());
- } catch (ProvisionException e) {
- interpreter.println("installation failed ");
- e.printStackTrace();
- return;
- }
- if (s.isOK())
- interpreter.println("installation complete");
- else
- interpreter.println("installation failed " + s.getMessage());
- }
-
- /**
- * 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();
- Properties props = new Properties();
- props.setProperty(IProfile.PROP_INSTALL_FOLDER, location);
- props.setProperty(IProfile.PROP_FLAVOR, flavor);
- if (environments != null)
- props.setProperty(IProfile.PROP_ENVIRONMENTS, environments);
-
- try {
- ProvisioningHelper.addProfile(profileId, props);
- } catch (ProvisionException e) {
- interpreter.println("add profile failed " + e.getMessage());
- }
- }
-
- /**
- * Deletes a profile given an id, location, and flavor
- */
- public void _provdelprofile(CommandInterpreter interpreter) {
- String profileId = interpreter.nextArgument();
- if (profileId == null) {
- interpreter.println("Id must be provided");
- return;
- }
- ProvisioningHelper.removeProfile(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(repoURL, new InstallableUnitQuery(id, new VersionRange(version)), null));
- 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();
- 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(repoLocation, new InstallableUnitQuery(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 queryable = null;
- if (urlString == null) {
- queryable = (IQueryable) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
- if (queryable == null)
- return;
- } else {
- URI repoURL = toURI(interpreter, urlString);
- if (repoURL == null)
- return;
- queryable = ProvisioningHelper.getMetadataRepository(repoURL);
- if (queryable == null)
- return;
- }
- Query query = new IUPropertyQuery(IInstallableUnit.PROP_TYPE_GROUP, Boolean.TRUE.toString());
- IInstallableUnit[] units = sort(queryable.query(query, new Collector(), 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();
- 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(repoURL);
- IArtifactKey[] keys = null;
- try {
- keys = (repo != null) ? repo.getArtifactKeys() : null;
- } catch (UnsupportedOperationException e) {
- interpreter.println("Repository does not support list commands.");
- return;
- }
- if (keys == null || keys.length == 0) {
- interpreter.println("Repository has no artifacts");
- return;
- }
- IFileArtifactRepository fileRepo = (IFileArtifactRepository) repo.getAdapter(IFileArtifactRepository.class);
- for (int i = 0; i < keys.length; i++) {
- IArtifactDescriptor[] descriptors = repo.getArtifactDescriptors(keys[i]);
- for (int j = 0; j < descriptors.length; j++) {
- IArtifactDescriptor descriptor = descriptors[j];
- File location = null;
- if (fileRepo != null)
- location = fileRepo.getArtifactFile(descriptor);
- println(interpreter, keys[i], 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();
- 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"))
- profileId = IProfileRegistry.SELF;
- target = ProvisioningHelper.getProfile(profileId);
- if (target == null)
- return;
-
- // list the profile contents
- IInstallableUnit[] result = sort(target.query(new InstallableUnitQuery(id, new VersionRange(range)), new Collector(), null));
- for (int i = 0; i < result.length; i++)
- interpreter.println(result[i]);
- }
-
- private IInstallableUnit[] sort(Collector collector) {
- IInstallableUnit[] units = (IInstallableUnit[]) collector.toArray(IInstallableUnit.class);
- Arrays.sort(units, new Comparator() {
- public int compare(Object arg0, Object arg1) {
- return arg0.toString().compareTo(arg1.toString());
- }
- });
- return units;
- }
-
- public String getHelp() {
- StringBuffer help = new StringBuffer();
- help.append(NEW_LINE);
- help.append("---"); //$NON-NLS-1$
- help.append("Provisioning Commands");
- help.append("---"); //$NON-NLS-1$
- help.append(NEW_LINE);
- help.append("\tprovlr [<repository URL> <iu id | *> <version range | *>] - Lists all metadata repositories, or the contents of a given metadata repository");
- help.append(NEW_LINE);
- help.append("\tprovlar [<repository URL>] - Lists all artifact repositories, or the contents of a given artifact repository");
- help.append(NEW_LINE);
- help.append("\tprovliu [<repository URL | *> <iu id | *> <version range | *>] - Lists the IUs that match the pattern in the given repo. * matches all");
- help.append(NEW_LINE);
- help.append("\tprovlp [<profile id | *> - Lists all profiles, or the contents of the profile at the given profile");
- help.append(NEW_LINE);
- help.append("\tprovlg [<repository URL> <iu id | *> <version range | *>] - Lists all IUs with group capabilities in the given repo or in all repos if the URL is omitted");
- help.append(NEW_LINE);
- help.append("\tprovinstall <InstallableUnit> <version> <profileId> - Provisions an IU to the profile with the give id");
- help.append(NEW_LINE);
- help.append("\tprovaddrepo <repository URL> - Adds a metadata repository");
- help.append(NEW_LINE);
- help.append("\tprovaddartifactrepo <repository URL> - Adds an artifact repository");
- help.append(NEW_LINE);
- help.append("\tprovaddprofile <profileId> <location> <flavor> - Adds a profile with the given id, location and flavor");
- 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 d94181437..000000000
--- a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java
+++ /dev/null
@@ -1,237 +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.console;
-
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-
-public class ProvisioningHelper {
-
- public static IMetadataRepository addMetadataRepository(URI location) {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
- if (manager == null)
- throw new IllegalStateException("No metadata repository manager found"); //$NON-NLS-1$
- 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"; //$NON-NLS-1$
- try {
- return manager.createRepository(location, repositoryName, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
- } catch (ProvisionException e) {
- return null;
- }
- }
-
- public static IMetadataRepository getMetadataRepository(URI location) {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
- if (manager == null)
- throw new IllegalStateException("No metadata repository manager found");
- try {
- return manager.loadRepository(location, null);
- } catch (ProvisionException e) {
- return null;
- }
- }
-
- public static void removeMetadataRepository(URI location) {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
- if (manager == null)
- throw new IllegalStateException("No metadata repository manager found");
- manager.removeRepository(location);
- }
-
- public static IArtifactRepository addArtifactRepository(URI location) {
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
- 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"; //$NON-NLS-1$
- try {
- return manager.createRepository(location, repositoryName, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
- } catch (ProvisionException e) {
- return null;
- }
- }
-
- public static void removeArtifactRepository(URI location) {
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
- if (manager == null)
- // TODO log here
- return;
- manager.removeRepository(location);
- }
-
- public static IProfile addProfile(String profileId, Properties properties) throws ProvisionException {
- IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(Activator.getContext(), IProfileRegistry.class.getName());
- if (profileRegistry == null)
- return null;
- IProfile profile = profileRegistry.getProfile(profileId);
- if (profile != null)
- return profile;
-
- Map profileProperties = new HashMap();
-
- for (Iterator it = properties.keySet().iterator(); it.hasNext();) {
- String key = (String) it.next();
- profileProperties.put(key, properties.getProperty(key));
- }
-
- 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());
- else
- profileProperties.put(IProfile.PROP_ENVIRONMENTS, "");
- }
-
- return profileRegistry.addProfile(profileId, profileProperties);
- }
-
- public static void removeProfile(String profileId) {
- IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(Activator.getContext(), IProfileRegistry.class.getName());
- if (profileRegistry == null)
- return;
- profileRegistry.removeProfile(profileId);
- }
-
- public static IProfile[] getProfiles() {
- IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(Activator.getContext(), IProfileRegistry.class.getName());
- if (profileRegistry == null)
- return new IProfile[0];
- return profileRegistry.getProfiles();
- }
-
- public static IProfile getProfile(String id) {
- IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(Activator.getContext(), IProfileRegistry.class.getName());
- 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
- */
- public static Collector getInstallableUnits(URI location, Query query, IProgressMonitor monitor) {
- return getInstallableUnits(location, query, new Collector(), monitor);
- }
-
- public static Collector getInstallableUnits(URI location, Query query, Collector collector, IProgressMonitor monitor) {
- IQueryable queryable = null;
- if (location == null) {
- queryable = (IQueryable) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
- } else {
- queryable = getMetadataRepository(location);
- }
- if (queryable != null)
- return queryable.query(query, collector, monitor);
- return collector;
- }
-
- public static URI[] getMetadataRepositories() {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
- 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
- */
- public static IStatus install(String unitId, String version, IProfile profile, IProgressMonitor progress) throws ProvisionException {
- if (profile == null)
- return null;
- Collector units = getInstallableUnits(null, new InstallableUnitQuery(unitId, new Version(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();
- if (repos != null) {
- for (int i = 0; i < repos.length; i++)
- error.append(repos[i] + "\n");
- }
- throw new ProvisionException(error.toString());
- }
-
- IPlanner planner = (IPlanner) ServiceHelper.getService(Activator.getContext(), IPlanner.class.getName());
- if (planner == null)
- throw new ProvisionException("No planner service found.");
-
- IEngine engine = (IEngine) ServiceHelper.getService(Activator.getContext(), IEngine.SERVICE_NAME);
- if (engine == null)
- throw new ProvisionException("No director service found.");
- IInstallableUnit[] toInstall = (IInstallableUnit[]) units.toArray(IInstallableUnit.class);
- ProvisioningContext context = new ProvisioningContext();
- ProfileChangeRequest request = new ProfileChangeRequest(profile);
- request.addInstallableUnits(toInstall);
- ProvisioningPlan result = planner.getProvisioningPlan(request, context, progress);
- return PlanExecutionHelper.executePlan(result, engine, context, progress);
- }
-
- public static URI[] getArtifactRepositories() {
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
- if (manager == null)
- // TODO log here
- return null;
- URI[] repos = manager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
- if (repos.length > 0)
- return repos;
- return null;
- }
-
- public static IArtifactRepository getArtifactRepository(URI repoURL) {
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
- try {
- if (manager != null)
- return manager.loadRepository(repoURL, null);
- } catch (ProvisionException e) {
- //for console, just ignore repositories that can't be read
- }
- return null;
- }
-}
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 75116d75c..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/CDC-1.1%Foundation-1.1"/>
- <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 905d1d66d..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-ant_tasks \ No newline at end of file
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 225deca2b..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="${project}"/>
-<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 05a85c1c8..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,346 +0,0 @@
-#Fri Apr 24 11:01:33 EDT 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=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=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.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.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.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.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 4931915c6..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.director.app;singleton:=true
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.0.100.qualifier
-Import-Package: org.eclipse.equinox.app,
- org.eclipse.equinox.internal.p2.console,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.osgi.framework.log,
- org.eclipse.osgi.service.environment,
- org.eclipse.osgi.util,
- org.osgi.framework,
- org.osgi.service.packageadmin
-Bundle-Activator: org.eclipse.equinox.internal.p2.director.app.Activator
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
-Export-Package: org.eclipse.equinox.internal.p2.director.app;x-internal:=true
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 fd5507d03..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/build.properties
+++ /dev/null
@@ -1,23 +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
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 9cfadc22c..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/config.ini
+++ /dev/null
@@ -1,88 +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.exemplarysetup@start,\
- 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 72c647563..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" 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="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.app.application&#13;&#10;-metadataRepository file:d:/tmp/cdt/site.xml -artifactRepository file:d:/tmp/cdt/site.xml -installIU org.eclipse.cdt.feature.group -destination d:/tmp/remoteInstall/eclipse/ -profile SDKProfile"/>
-<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.p2.data.area=d:/tmp/remoteInstall/eclipse/p2"/>
-<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.equinox.app@default:default,org.eclipse.osgi@:,org.eclipse.equinox.security@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.core.variables@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.common@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.jobs@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.runtime@default:true,org.eclipse.osgi.services@default:default,org.eclipse.core.runtime.compatibility.auth@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.core@default:default,org.eclipse.equinox.p2.exemplarysetup@default:true,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:true,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.director@default:default,org.sat4j.pb@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:true,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.simpleconfigurator@default:true,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.engine@default:default,org.sat4j.core@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 d4294922f..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/plugin.xml
+++ /dev/null
@@ -1,26 +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>
-</plugin>
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 e58c0461d..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java
+++ /dev/null
@@ -1,644 +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 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=226401
- * EclipseSource - 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.console.ProvisioningHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.*;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.LatestIUVersionQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-import org.eclipse.osgi.framework.log.FrameworkLog;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-/**
- * 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.
- */
-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$
- static private final String EXEMPLARY_SETUP = "org.eclipse.equinox.p2.exemplarysetup"; //$NON-NLS-1$
- static private final String FRAMEWORKADMIN_EQUINOX = "org.eclipse.equinox.frameworkadmin.equinox"; //$NON-NLS-1$
- static private final String SIMPLE_CONFIGURATOR_MANIPULATOR = "org.eclipse.equinox.simpleconfigurator.manipulator"; //$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;
-
- private ServiceReference packageAdminRef;
- private PackageAdmin packageAdmin;
-
- 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, Collector roots, boolean install) {
- ProfileChangeRequest request = new ProfileChangeRequest(profile);
- markRoots(request, roots);
- if (install) {
- request.addInstallableUnits((IInstallableUnit[]) roots.toArray(IInstallableUnit.class));
- } else {
- request.removeInstallableUnits((IInstallableUnit[]) roots.toArray(IInstallableUnit.class));
- }
- return request;
- }
-
- 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() {
- Properties values = new Properties();
- 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 = ProvisioningHelper.getProfile(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$
-
- Properties props = new Properties();
- props.setProperty(IProfile.PROP_INSTALL_FOLDER, destination.toOSString());
- props.setProperty(IProfile.PROP_FLAVOR, flavor);
- if (bundlePool == null || bundlePool.equals(Messages.destination_commandline))
- props.setProperty(IProfile.PROP_CACHE, destination.toOSString());
- else
- props.setProperty(IProfile.PROP_CACHE, bundlePool);
- if (roamingProfile)
- props.setProperty(IProfile.PROP_ROAMING, Boolean.TRUE.toString());
-
- String env = getEnvironmentProperty();
- if (env != null)
- props.setProperty(IProfile.PROP_ENVIRONMENTS, env);
- if (profileProperties != null) {
- putProperties(profileProperties, props);
- }
- profile = ProvisioningHelper.addProfile(profileId, props);
- String currentFlavor = profile.getProperty(IProfile.PROP_FLAVOR);
- if (currentFlavor != null && !currentFlavor.endsWith(flavor))
- throw new RuntimeException(NLS.bind("Install flavor {0} not consistent with profile flavor {1}", flavor, currentFlavor)); //$NON-NLS-1$
- }
- return profile;
- }
-
- private void initializeRepositories(boolean throwException) throws CoreException {
- if (artifactRepositoryLocations == null) {
- if (throwException)
- missingArgument("artifactRepository"); //$NON-NLS-1$
- } else {
- artifactManager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
- 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) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
- 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() {
- IDirector director = (IDirector) ServiceHelper.getService(Activator.getContext(), IDirector.class.getName());
- if (director == null)
- throw new RuntimeException(Messages.Missing_director);
-
- planner = (IPlanner) ServiceHelper.getService(Activator.getContext(), IPlanner.class.getName());
- if (planner == null)
- throw new RuntimeException(Messages.Missing_planner);
-
- engine = (IEngine) ServiceHelper.getService(Activator.getContext(), IEngine.SERVICE_NAME);
- if (engine == null)
- throw new RuntimeException(Messages.Missing_Engine);
- }
-
- private void markRoots(ProfileChangeRequest request, Collector roots) {
- for (Iterator iterator = roots.iterator(); iterator.hasNext();) {
- request.setInstallableUnitProfileProperty((IInstallableUnit) iterator.next(), IInstallableUnit.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) {
- ProvisioningPlan 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) {
- IInstallableUnit[] toAdd = request.getAddedInstallableUnits();
- IInstallableUnit[] toRemove = request.getRemovedInstallableUnits();
- for (int i = 0; i < toAdd.length; i++) {
- System.out.println(NLS.bind(Messages.Installing, toAdd[i].getId(), toAdd[i].getVersion()));
- }
- for (int i = 0; i < toRemove.length; i++) {
- System.out.println(NLS.bind(Messages.Uninstalling, toRemove[i].getId(), toRemove[i].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 = new Version(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, Properties 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("This application is deprecated. Please use the org.eclipse.equinox.p2.director application.");
- long time = -System.currentTimeMillis();
- initializeServices();
- processArguments(args);
-
- IStatus operationStatus = Status.OK_STATUS;
- InstallableUnitQuery query;
- Collector roots;
- try {
- initializeRepositories(command == COMMAND_INSTALL);
- switch (command) {
- case COMMAND_INSTALL :
- case COMMAND_UNINSTALL :
-
- IProfile profile = initializeProfile();
- query = new InstallableUnitQuery(root, version == null ? VersionRange.emptyRange : new VersionRange(version, true, version, true));
- roots = collectRootIUs(metadataRepositoryLocations, new CompositeQuery(new Query[] {query, new LatestIUVersionQuery()}), new Collector());
- if (roots.size() <= 0)
- roots = profile.query(query, roots, new NullProgressMonitor());
- if (roots.size() <= 0) {
- 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(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 = new InstallableUnitQuery(null, VersionRange.emptyRange);
- if (metadataRepositoryLocations == null)
- missingArgument("metadataRepository"); //$NON-NLS-1$
-
- roots = collectRootIUs(metadataRepositoryLocations, query, null);
- Iterator unitIterator = roots.iterator();
- while (unitIterator.hasNext()) {
- IInstallableUnit iu = (IInstallableUnit) 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 {
- private URI location;
-
- public LocationQueryable(URI location) {
- this.location = location;
- }
-
- public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
- return ProvisioningHelper.getInstallableUnits(location, query, collector, monitor);
- }
- }
-
- private Collector collectRootIUs(URI[] locations, Query query, Collector collector) {
- IProgressMonitor nullMonitor = new NullProgressMonitor();
-
- if (locations == null || locations.length == 0)
- return ProvisioningHelper.getInstallableUnits(null, query, collector, nullMonitor);
-
- Collector result = collector != null ? collector : new Collector();
- IQueryable[] locationQueryables = new IQueryable[locations.length];
- for (int i = 0; i < locations.length; i++) {
- locationQueryables[i] = new LocationQueryable(locations[i]);
- }
- return new CompoundQueryable(locationQueryables).query(query, result, nullMonitor);
- }
-
- private synchronized void setPackageAdmin(PackageAdmin service) {
- packageAdmin = service;
- }
-
- private boolean startEarly(String bundleName) throws BundleException {
- Bundle bundle = getBundle(bundleName);
- if (bundle == null)
- return false;
- bundle.start(Bundle.START_TRANSIENT);
- return true;
- }
-
- public Object start(IApplicationContext context) throws Exception {
- packageAdminRef = Activator.getContext().getServiceReference(PackageAdmin.class.getName());
- setPackageAdmin((PackageAdmin) Activator.getContext().getService(packageAdminRef));
- if (!startEarly(EXEMPLARY_SETUP)) {
- logFailure(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Missing_bundle, EXEMPLARY_SETUP)));
- return EXIT_ERROR;
- }
- if (!startEarly(SIMPLE_CONFIGURATOR_MANIPULATOR)) {
- logFailure(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Missing_bundle, SIMPLE_CONFIGURATOR_MANIPULATOR)));
- return EXIT_ERROR;
- }
- if (!startEarly(FRAMEWORKADMIN_EQUINOX)) {
- logFailure(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Missing_bundle, FRAMEWORKADMIN_EQUINOX)));
- return EXIT_ERROR;
- }
-
- return run((String[]) context.getArguments().get("application.args")); //$NON-NLS-1$
- }
-
- public void stop() {
- setPackageAdmin(null);
- Activator.getContext().ungetService(packageAdminRef);
- }
-
- private String toString(Properties context) {
- StringBuffer result = new StringBuffer();
- for (Enumeration iter = context.keys(); iter.hasMoreElements();) {
- String key = (String) iter.nextElement();
- result.append(key);
- result.append('=');
- result.append(context.get(key));
- if (iter.hasMoreElements())
- result.append(',');
- }
- 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(new URI[0]);
- context.setArtifactRepositories(new URI[0]);
- ProvisioningPlan 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(new URI[0]);
- context.setArtifactRepositories(new URI[0]);
- ProvisioningPlan 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 result = new ArrayList(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 (URI[]) 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 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()]);
- }
-
- 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 0d78d4f88..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
+++ /dev/null
@@ -1,964 +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 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=226401
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.director.app;
-
-import java.io.*;
-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.console.ProvisioningHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.*;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.LatestIUVersionQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-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
- * found in {@link 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 LocationQueryable implements IQueryable {
- private URI location;
-
- public LocationQueryable(URI location) {
- this.location = location;
- }
-
- public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
- return ProvisioningHelper.getInstallableUnits(location, query, collector, 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_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$
-
- static private final String BUNDLE_CORE = "org.eclipse.equinox.p2.core"; //$NON-NLS-1$
- static private final String BUNDLE_ENGINE = "org.eclipse.equinox.p2.engine"; //$NON-NLS-1$
- static private final String BUNDLE_EXEMPLARY_SETUP = "org.eclipse.equinox.p2.exemplarysetup"; //$NON-NLS-1$
- static private final String BUNDLE_FRAMEWORKADMIN_EQUINOX = "org.eclipse.equinox.frameworkadmin.equinox"; //$NON-NLS-1$
- static private final String BUNDLE_SIMPLE_CONFIGURATOR_MANIPULATOR = "org.eclipse.equinox.simpleconfigurator.manipulator"; //$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_DATA_AREA = "eclipse.p2.data.area"; //$NON-NLS-1$
-
- static private final String PROP_P2_PROFILE = "eclipse.p2.profile"; //$NON-NLS-1$
-
- public static final String LINE_SEPARATOR = System.getProperty("line.separator"); //$NON-NLS-1$
-
- private static void getURIs(List 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(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 vnames, String arg) {
- String[] roots = StringHelper.getArrayFromString(arg, ',');
- for (int i = 0; i < roots.length; ++i)
- vnames.add(VersionedName.parse(roots[i]));
- }
-
- private static String 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).toOSString();
- }
-
- private IArtifactRepositoryManager artifactManager;
- private IMetadataRepositoryManager metadataManager;
-
- private URI[] artifactReposForRemoval;
- private URI[] metadataReposForRemoval;
-
- private final List artifactRepositoryLocations = new ArrayList();
- private final List metadataRepositoryLocations = new ArrayList();
- private final List rootsToInstall = new ArrayList();
- private final List rootsToUninstall = new ArrayList();
- private final List rootsToList = new ArrayList();
-
- private String bundlePool = null;
- private String destination;
- private String sharedLocation;
- private String flavor;
- private boolean printHelpInfo = false;
- private boolean printIUList = false;
- private long revertToPreviousState = -1;
- private boolean verifyOnly = false;
- private boolean roamingProfile = false;
- private boolean stackTrace = 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 packageAdminRef;
- private IPlanner planner;
-
- private String preservedDataArea;
- private String preservedProfile;
- private boolean restartCore;
- private boolean restartEngine;
- private boolean restartExemplarySetup;
-
- private ProfileChangeRequest buildProvisioningRequest(IProfile profile, IInstallableUnit[] installs, IInstallableUnit[] uninstalls) {
- ProfileChangeRequest request = new ProfileChangeRequest(profile);
- markRoots(request, installs);
- markRoots(request, uninstalls);
- request.addInstallableUnits(installs);
- request.removeInstallableUnits(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 Collector collectRootIUs(Query query, Collector collector) {
- IProgressMonitor nullMonitor = new NullProgressMonitor();
-
- int top = metadataRepositoryLocations.size();
- if (top == 0)
- return ProvisioningHelper.getInstallableUnits(null, query, collector, nullMonitor);
-
- Collector result = collector != null ? collector : new Collector();
- IQueryable[] locationQueryables = new IQueryable[top];
- for (int i = 0; i < top; i++)
- locationQueryables[i] = new LocationQueryable((URI) metadataRepositoryLocations.get(i));
- return new CompoundQueryable(locationQueryables).query(query, result, nullMonitor);
- }
-
- private IInstallableUnit[] collectRoots(IProfile profile, List rootNames, boolean forInstall) throws CoreException {
- ArrayList allRoots = new ArrayList();
- int top = rootNames.size();
- for (int i = 0; i < top; ++i) {
- VersionedName rootName = (VersionedName) rootNames.get(i);
- Version v = rootName.getVersion();
- Query query = new InstallableUnitQuery(rootName.getId(), Version.emptyVersion.equals(v) ? VersionRange.emptyRange : new VersionRange(v, true, v, true));
- Collector roots;
- if (forInstall)
- roots = collectRootIUs(new CompositeQuery(new Query[] {query, new LatestIUVersionQuery()}), new Collector());
- else
- roots = new Collector();
- if (roots.size() <= 0)
- roots = profile.query(query, roots, new NullProgressMonitor());
- if (roots.size() <= 0)
- throw new CoreException(new Status(IStatus.ERROR, org.eclipse.equinox.internal.p2.director.app.Activator.ID, NLS.bind(Messages.Missing_IU, rootName)));
- allRoots.addAll(roots.toCollection());
- }
- return (IInstallableUnit[]) allRoots.toArray(new IInstallableUnit[allRoots.size()]);
-
- }
-
- 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 values = new HashMap();
- 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 initializeProfile() throws CoreException {
- if (profileId == null) {
- profileId = IProfileRegistry.SELF;
- noProfileId = true;
- }
- IProfile profile = ProvisioningHelper.getProfile(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$
-
- Properties props = new Properties();
- props.setProperty(IProfile.PROP_INSTALL_FOLDER, destination);
- props.setProperty(IProfile.PROP_FLAVOR, flavor);
- if (bundlePool == null)
- props.setProperty(IProfile.PROP_CACHE, sharedLocation == null ? destination : sharedLocation);
- else
- props.setProperty(IProfile.PROP_CACHE, bundlePool);
- if (roamingProfile)
- props.setProperty(IProfile.PROP_ROAMING, Boolean.TRUE.toString());
-
- String env = getEnvironmentProperty();
- if (env != null)
- props.setProperty(IProfile.PROP_ENVIRONMENTS, env);
- if (profileProperties != null)
- putProperties(profileProperties, props);
- profile = ProvisioningHelper.addProfile(profileId, props);
- String currentFlavor = profile.getProperty(IProfile.PROP_FLAVOR);
- if (currentFlavor != null && !currentFlavor.endsWith(flavor))
- throw new RuntimeException(NLS.bind(Messages.flavor_0_inconsistent_with_flavor_1, flavor, currentFlavor));
- }
- return profile;
- }
-
- private void initializeRepositories() throws CoreException {
- if (rootsToInstall.isEmpty() && revertToPreviousState == -1)
- // Not much point initializing repositories if we have nothing to install
- return;
-
- if (artifactRepositoryLocations == null)
- missingArgument("-artifactRepository"); //$NON-NLS-1$
-
- artifactManager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
- 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 = (URI) 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
- LogHelper.log(e.getStatus());
- }
- }
- if (!anyValid)
- //all repositories failed to load
- throw new ProvisionException(Messages.Application_NoRepositories);
-
- if (metadataRepositoryLocations == null)
- missingArgument("metadataRepository"); //$NON-NLS-1$
-
- metadataManager = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
- 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 = (URI) 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
- LogHelper.log(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.getName());
- packageAdmin = (PackageAdmin) context.getService(packageAdminRef);
- if (destination != null || sharedLocation != null) {
- restartExemplarySetup = stopTransient(BUNDLE_EXEMPLARY_SETUP);
- restartEngine = stopTransient(BUNDLE_ENGINE); // Since it uses the agent data location
- restartCore = stopTransient(BUNDLE_CORE); // Since it manages the agent data location
-
- // Set/Clear properties that we don't want to inherit from the caller
- String p2DataArea = sharedLocation == null ? new File(destination, "p2").getAbsolutePath() : sharedLocation; //$NON-NLS-1$
- preservedDataArea = System.setProperty(PROP_P2_DATA_AREA, p2DataArea);
- 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;
- }
- }
- if (profileId != null)
- preservedProfile = System.setProperty(PROP_P2_PROFILE, profileId);
- else
- preservedProfile = (String) System.getProperties().remove(PROP_P2_PROFILE);
- }
-
- if (!startTransient(BUNDLE_SIMPLE_CONFIGURATOR_MANIPULATOR))
- throw new ProvisionException(NLS.bind(Messages.Missing_bundle, BUNDLE_SIMPLE_CONFIGURATOR_MANIPULATOR));
- if (!startTransient(BUNDLE_FRAMEWORKADMIN_EQUINOX))
- throw new ProvisionException(NLS.bind(Messages.Missing_bundle, BUNDLE_FRAMEWORKADMIN_EQUINOX));
- if (!startTransient(BUNDLE_CORE))
- throw new ProvisionException(NLS.bind(Messages.Missing_bundle, BUNDLE_CORE));
- if (!startTransient(BUNDLE_ENGINE))
- throw new ProvisionException(NLS.bind(Messages.Missing_bundle, BUNDLE_ENGINE));
- if (!startTransient(BUNDLE_EXEMPLARY_SETUP))
- throw new ProvisionException(NLS.bind(Messages.Missing_bundle, BUNDLE_EXEMPLARY_SETUP));
-
- IDirector director = (IDirector) ServiceHelper.getService(context, IDirector.class.getName());
- if (director == null)
- throw new ProvisionException(Messages.Missing_director);
-
- planner = (IPlanner) ServiceHelper.getService(context, IPlanner.class.getName());
- if (planner == null)
- throw new ProvisionException(Messages.Missing_planner);
-
- engine = (IEngine) ServiceHelper.getService(context, IEngine.SERVICE_NAME);
- if (engine == null)
- throw new ProvisionException(Messages.Missing_Engine);
- }
-
- 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);
- }
-
- private void markRoots(ProfileChangeRequest request, IInstallableUnit[] roots) {
- for (int idx = 0; idx < roots.length; ++idx)
- request.setInstallableUnitProfileProperty(roots[idx], IInstallableUnit.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 allRoots = new ArrayList();
- if (rootsToList.size() == 0) {
- Collector roots = collectRootIUs(InstallableUnitQuery.ANY, null);
- allRoots.addAll(roots.toCollection());
- } else {
- Iterator r = rootsToList.iterator();
- while (r.hasNext()) {
- VersionedName rootName = (VersionedName) r.next();
- Version v = rootName.getVersion();
- Query query = new InstallableUnitQuery(rootName.getId(), Version.emptyVersion.equals(v) ? VersionRange.emptyRange : new VersionRange(v, true, v, true));
- Collector roots = collectRootIUs(query, null);
- allRoots.addAll(roots.toCollection());
- }
- }
-
- Collections.sort(allRoots);
- Iterator i = allRoots.iterator();
- while (i.hasNext()) {
- IInstallableUnit iu = (IInstallableUnit) i.next();
- System.out.println(iu.getId() + '=' + iu.getVersion());
- }
- }
-
- private void performProvisioningActions() throws CoreException {
- IProfile profile = initializeProfile();
- IInstallableUnit[] installs = collectRoots(profile, rootsToInstall, true);
- 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((URI[]) metadataRepositoryLocations.toArray(new URI[metadataRepositoryLocations.size()]));
- context.setArtifactRepositories((URI[]) artifactRepositoryLocations.toArray(new URI[artifactRepositoryLocations.size()]));
- 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 {
- ProvisioningPlan 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, ProvisioningPlan result) throws CoreException {
- IStatus operationStatus;
- if (!verifyOnly) {
- operationStatus = PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
- if (!operationStatus.isOK())
- throw new CoreException(operationStatus);
- }
- }
-
- private void printRequest(ProfileChangeRequest request) {
- IInstallableUnit[] toAdd = request.getAddedInstallableUnits();
- for (int i = 0; i < toAdd.length; i++) {
- System.out.println(NLS.bind(Messages.Installing, toAdd[i].getId(), toAdd[i].getVersion()));
- }
- IInstallableUnit[] toRemove = request.getRemovedInstallableUnits();
- for (int i = 0; i < toRemove.length; i++) {
- System.out.println(NLS.bind(Messages.Uninstalling, toRemove[i].getId(), toRemove[i].getVersion()));
- }
- }
-
- public void processArguments(String[] args) throws CoreException {
- if (args == null) {
- printHelpInfo = true;
- return;
- }
-
- 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_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/").toOSString(); //$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_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 && rootsToInstall.isEmpty() && rootsToUninstall.isEmpty() && revertToPreviousState == -1) {
- System.out.println(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, Properties 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 restoreServices() throws CoreException {
- BundleContext context = Activator.getContext();
- try {
- if (destination == null && sharedLocation == null)
- return;
-
- stopTransient(BUNDLE_EXEMPLARY_SETUP);
- stopTransient(BUNDLE_CORE); // Since it manages the agent data location
-
- if (preservedDataArea != null)
- System.setProperty(PROP_P2_DATA_AREA, preservedDataArea);
- else
- System.getProperties().remove(PROP_P2_DATA_AREA);
-
- if (preservedProfile != null)
- System.setProperty(PROP_P2_PROFILE, preservedProfile);
- else
- System.getProperties().remove(PROP_P2_PROFILE);
-
- if (restartCore)
- startTransient(BUNDLE_CORE);
- if (restartEngine)
- startTransient(BUNDLE_ENGINE);
- if (restartExemplarySetup)
- startTransient(BUNDLE_EXEMPLARY_SETUP);
- } finally {
- context.ungetService(packageAdminRef);
- }
- }
-
- public Object run(String[] args) throws CoreException {
- 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();
- System.out.println(NLS.bind(Messages.Operation_complete, new Long(System.currentTimeMillis() - time)));
- }
- return IApplication.EXIT_OK;
- } catch (CoreException e) {
- 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();
- restoreServices();
- }
- }
- }
-
- private void revertToPreviousState() throws CoreException {
- IProfile profile = initializeProfile();
- IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(Activator.getContext(), IProfileRegistry.class.getName());
- 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));
- ProvisioningPlan plan = planner.getDiffPlan(profile, targetProfile, new NullProgressMonitor());
-
- ProvisioningContext context = new ProvisioningContext((URI[]) metadataRepositoryLocations.toArray(new URI[metadataRepositoryLocations.size()]));
- context.setArtifactRepositories((URI[]) artifactRepositoryLocations.toArray(new URI[artifactRepositoryLocations.size()]));
- 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(' ');
- }
-
- 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_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};
- 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(new URI[0]);
- context.setArtifactRepositories(new URI[0]);
- ProvisioningPlan 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 boolean startTransient(String bundleName) throws CoreException {
- Bundle bundle = getBundle(bundleName);
- if (bundle == null)
- return false;
- try {
- bundle.start(Bundle.START_TRANSIENT);
- } catch (BundleException e) {
- throw new ProvisionException(NLS.bind(Messages.unable_to_start_bundle_0, bundleName));
- }
- return true;
- }
-
- public void stop() {
- // Nothing left to do here
- }
-
- private boolean stopTransient(String bundleName) throws CoreException {
- Bundle bundle = getBundle(bundleName);
- boolean wasActive = false;
- if (bundle != null) {
- wasActive = (bundle.getState() & (Bundle.ACTIVE | Bundle.STARTING)) != 0;
- if (wasActive)
- try {
- bundle.stop(Bundle.STOP_TRANSIENT);
- } catch (BundleException e) {
- throw new ProvisionException(NLS.bind(Messages.unable_to_stop_bundle_0, bundleName));
- }
- }
- return wasActive;
- }
-
- private String toString(Map context) {
- StringBuffer result = new StringBuffer();
- Iterator entries = context.entrySet().iterator();
- while (entries.hasNext()) {
- Map.Entry entry = (Map.Entry) entries.next();
- if (result.length() > 0)
- result.append(',');
- result.append((String) entry.getKey());
- result.append('=');
- result.append((String) 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);
- File destinationFile = new File(destination);
- if (!destinationFile.equals(new File(profile.getProperty(IProfile.PROP_INSTALL_FOLDER))))
- request.setProfileProperty(IProfile.PROP_INSTALL_FOLDER, destination);
- if (!destinationFile.equals(new File(profile.getProperty(IProfile.PROP_CACHE))))
- request.setProfileProperty(IProfile.PROP_CACHE, destination);
- 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(new URI[0]);
- context.setArtifactRepositories(new URI[0]);
- ProvisioningPlan 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));
- }
-} \ No newline at end of file
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 365375426..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Messages.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
- * 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 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 flavor_0_inconsistent_with_flavor_1;
-
- 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_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 Ignored_repo;
- public static String Installing;
- public static String Missing_bundle;
- 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 unable_to_start_bundle_0;
- public static String unable_to_stop_bundle_0;
- public static String Uninstalling;
- public static String unknown_option_0;
-
- 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 7f6e14438..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/messages.properties
+++ /dev/null
@@ -1,63 +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
-# Cloudsmith - ongoing development
-###############################################################################
-destination_commandline=<destination>
-Deprecated_application=This application is deprecated. 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_bundle=The ''{0}'' bundle is missing.
-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 colocated 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.
-flavor_0_inconsistent_with_flavor_1=Install flavor {0} not consistent with profile flavor {1}.
-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_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.
-unable_to_parse_0_to_uri_1=Unable to parse {0} into an URI: {1}.
-unable_to_start_bundle_0=Unable to start bundle {0}.
-unable_to_stop_bundle_0=Unable to stop bundle {0}.
-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 is not being found. \ No newline at end of file
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 eff7e3572..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java
+++ /dev/null
@@ -1,179 +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.director.app.ant;
-
-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.*;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.director.app.Application;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-
-/**
- * An Ant task to call the p2 Director application.
- *
- * @since 1.0
- */
-public class DirectorTask extends Task {
-
- boolean roaming;
- boolean list;
- String profile, flavor, os, ws, nl, arch, installIU, uninstallIU;
- File destination, bundlePool;
- URI metadataRepository, artifactRepository;
- Version version;
-
- /*
- * (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() throws BuildException {
- try {
- // collect the arguments and call the application
- new Application().run(getArguments());
- } catch (Exception e) {
- throw new BuildException("Exception while calling the director task.", e);
- }
- }
-
- private String[] getArguments() {
- List result = new ArrayList();
- if (roaming)
- result.add("-roaming");
- if (profile != null) {
- result.add("-profile");
- result.add(profile);
- }
- if (destination != null) {
- result.add("-destination");
- result.add(destination.getAbsolutePath());
- }
- if (bundlePool != null) {
- result.add("-bundlePool");
- result.add(bundlePool.getAbsolutePath());
- }
- if (metadataRepository != null) {
- result.add("-metadataRepository");
- result.add(metadataRepository.toString());
- }
- if (artifactRepository != null) {
- result.add("-artifactRepository");
- result.add(artifactRepository.toString());
- }
- if (flavor != null) {
- result.add("-flavor");
- result.add(flavor);
- }
- if (version != null) {
- result.add("-version");
- result.add(version.toString());
- }
- if (os != null) {
- result.add("-p2.os");
- result.add(os);
- }
- if (ws != null) {
- result.add("-p2.ws");
- result.add(ws);
- }
- if (arch != null) {
- result.add("-p2.arch");
- result.add(arch);
- }
- if (nl != null) {
- result.add("-p2.nl");
- result.add(nl);
- }
- if (list) {
- result.add(Application.COMMAND_NAMES[Application.COMMAND_LIST]);
- }
- if (installIU != null) {
- result.add(Application.COMMAND_NAMES[Application.COMMAND_INSTALL]);
- result.add(installIU);
- }
- if (uninstallIU != null) {
- result.add(Application.COMMAND_NAMES[Application.COMMAND_UNINSTALL]);
- result.add(uninstallIU);
- }
- return (String[]) 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("Error setting the artifact repository.", 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) {
- flavor = value;
- }
-
- public void setInstallIU(String value) {
- installIU = value;
- }
-
- public void setList(String value) {
- list = Boolean.valueOf(value).booleanValue();
- }
-
- public void setMetadataRepository(String value) {
- try {
- metadataRepository = URIUtil.fromString(value);
- } catch (URISyntaxException e) {
- log("Error setting the metadata repository.", e, Project.MSG_ERR);
- }
- }
-
- public void setNl(String value) {
- nl = value;
- }
-
- public void setOs(String value) {
- os = value;
- }
-
- public void setProfile(String value) {
- profile = value;
- }
-
- public void setRoaming(String value) {
- roaming = Boolean.valueOf(value).booleanValue();
- }
-
- public void setUninstallIU(String value) {
- uninstallIU = value;
- }
-
- public void setVersion(String value) {
- version = new Version(value);
- }
-
- public void setWs(String value) {
- ws = value;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/.classpath b/bundles/org.eclipse.equinox.p2.directorywatcher/.classpath
deleted file mode 100644
index 6f3b481ac..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/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.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 b94ca9b4f..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,329 +0,0 @@
-#Thu Oct 09 08:15:15 EDT 2008
-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=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.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.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.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.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.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.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=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.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.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.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.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-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.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_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.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.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
-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.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 79c3e8c02..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,29 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.directorywatcher;singleton:=true
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.0.100.qualifier
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.update,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.publisher.actions,
- org.eclipse.equinox.p2.publisher.eclipse,
- 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"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-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-Activator: org.eclipse.equinox.internal.provisional.p2.directorywatcher.Activator
-Bundle-ActivationPolicy: lazy
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 dc77b9c16..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/build.properties
+++ /dev/null
@@ -1,17 +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
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/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 54c196c30..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Activator.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
- * 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.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.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) ServiceHelper.getService(context, IArtifactRepositoryManager.class.getName());
- }
-
- public static IMetadataRepositoryManager getMetadataRepositoryManager() {
- return (IMetadataRepositoryManager) ServiceHelper.getService(context, IMetadataRepositoryManager.class.getName());
- }
-
- 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 8abed2915..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java
+++ /dev/null
@@ -1,237 +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.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-
-public class CachingArtifactRepository implements IArtifactRepository, IFileArtifactRepository {
-
- private static final String NULL = ""; //$NON-NLS-1$
- private IArtifactRepository innerRepo;
- private Set descriptorsToAdd = new HashSet();
- private Map artifactMap = new HashMap();
- private Set descriptorsToRemove = new HashSet();
- private Map propertyChanges = new HashMap();
-
- protected CachingArtifactRepository(IArtifactRepository innerRepo) {
- this.innerRepo = innerRepo;
- }
-
- public void save() {
- savePropertyChanges();
- saveAdditions();
- saveRemovals();
- }
-
- private void saveRemovals() {
- for (Iterator i = descriptorsToRemove.iterator(); i.hasNext();)
- innerRepo.removeDescriptor((IArtifactDescriptor) i.next());
- descriptorsToRemove.clear();
- }
-
- private void saveAdditions() {
- if (descriptorsToAdd.isEmpty())
- return;
- innerRepo.addDescriptors((IArtifactDescriptor[]) descriptorsToAdd.toArray(new IArtifactDescriptor[descriptorsToAdd.size()]));
- descriptorsToAdd.clear();
- artifactMap.clear();
- }
-
- private void savePropertyChanges() {
- for (Iterator i = propertyChanges.keySet().iterator(); i.hasNext();) {
- String key = (String) i.next();
- String value = (String) propertyChanges.get(key);
- innerRepo.setProperty(key, value == NULL ? null : value);
- }
- propertyChanges.clear();
- }
-
- private void mapDescriptor(IArtifactDescriptor descriptor) {
- IArtifactKey key = descriptor.getArtifactKey();
- Collection descriptors = (Collection) artifactMap.get(key);
- if (descriptors == null) {
- descriptors = new ArrayList();
- artifactMap.put(key, descriptors);
- }
- descriptors.add(descriptor);
- }
-
- private void unmapDescriptor(IArtifactDescriptor descriptor) {
- IArtifactKey key = descriptor.getArtifactKey();
- Collection descriptors = (Collection) 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) {
- Collection result = (Collection) artifactMap.get(key);
- if (result == null)
- return innerRepo.getArtifactDescriptors(key);
- result.addAll(Arrays.asList(innerRepo.getArtifactDescriptors(key)));
- return (IArtifactDescriptor[]) result.toArray(new IArtifactDescriptor[result.size()]);
- }
-
- public synchronized IArtifactKey[] getArtifactKeys() {
- // there may be more descriptors than keys to collect up the unique keys
- HashSet result = new HashSet();
- result.addAll(artifactMap.keySet());
- result.addAll(Arrays.asList(innerRepo.getArtifactKeys()));
- return (IArtifactKey[]) result.toArray(new IArtifactKey[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 = (IArtifactDescriptor[]) 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]);
- }
-
- /**
- * 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 getProperties() {
- // TODO need to combine the local and inner properties
- return innerRepo.getProperties();
- }
-
- public String getProvider() {
- return innerRepo.getProvider();
- }
-
- public String getType() {
- return innerRepo.getType();
- }
-
- public String getVersion() {
- return innerRepo.getVersion();
- }
-
- public boolean isModifiable() {
- return innerRepo.isModifiable();
- }
-
- public void setDescription(String description) {
- innerRepo.setDescription(description);
- }
-
- public void setName(String name) {
- innerRepo.setName(name);
- }
-
- public String setProperty(String key, String value) {
- String result = (String) getProperties().get(key);
- propertyChanges.put(key, value == null ? NULL : value);
- return result;
- }
-
- public void setProvider(String provider) {
- innerRepo.setProvider(provider);
- }
-
- 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;
- }
-}
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 dea2d358d..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryWatcher.java
+++ /dev/null
@@ -1,224 +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 listeners = new HashSet();
- private HashSet scannedFiles = new HashSet();
- private HashSet removals;
- private Set pendingDeletions;
- private WatcherThread watcher;
-
- public DirectoryWatcher(Dictionary properties, BundleContext context) {
- String dir = (String) 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();
- pendingDeletions = new HashSet();
- for (Iterator i = listeners.iterator(); i.hasNext();)
- ((DirectoryChangeListener) i.next()).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 (Iterator iterator = listeners.iterator(); iterator.hasNext();) {
- DirectoryChangeListener listener = (DirectoryChangeListener) iterator.next();
- if (isInterested(listener, file))
- processFile(file, listener);
- }
- }
- }
- }
- }
-
- private void stopPoll() {
- notifyRemovals();
- removals = scannedFiles;
- for (Iterator i = listeners.iterator(); i.hasNext();)
- ((DirectoryChangeListener) i.next()).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 removed = removals;
- for (Iterator i = listeners.iterator(); i.hasNext();) {
- DirectoryChangeListener listener = (DirectoryChangeListener) i.next();
- for (Iterator j = removed.iterator(); j.hasNext();) {
- File file = (File) j.next();
- 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 iterator = pendingDeletions.iterator(); iterator.hasNext();) {
- File 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 600681ae4..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/EntryAdvice.java
+++ /dev/null
@@ -1,68 +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 java.io.File;
-import java.net.URI;
-import java.util.Map;
-import java.util.Properties;
-import org.eclipse.equinox.internal.p2.update.Site;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.publisher.actions.IPropertyAdvice;
-
-/**
- * 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 Properties metadataProps = new Properties();
- private Properties artifactProps = new Properties();
-
- 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.setProperty(RepositoryListener.ARTIFACT_REFERENCE, reference.toString());
- if (location.isDirectory())
- artifactProps.setProperty(RepositoryListener.ARTIFACT_FOLDER, Boolean.TRUE.toString());
- else
- artifactProps.remove(RepositoryListener.ARTIFACT_FOLDER);
- artifactProps.setProperty(RepositoryListener.FILE_NAME, location.getAbsolutePath());
- metadataProps.setProperty(RepositoryListener.FILE_NAME, location.getAbsolutePath());
- metadataProps.setProperty(RepositoryListener.FILE_LAST_MODIFIED, Long.toString(timestamp));
- if (linkFile != null)
- metadataProps.setProperty(Site.PROP_LINK_FILE, linkFile);
- }
-
- public Map getInstructions(File location) {
- return null;
- }
-
- public Properties getArtifactProperties(IInstallableUnit iu, IArtifactDescriptor descriptor) {
- return artifactProps;
- }
-
- public Properties 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 4b280a903..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java
+++ /dev/null
@@ -1,317 +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 implementation and ideas
- * Code 9 - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.directorywatcher;
-
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
-import java.io.File;
-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.update.Site;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-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.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 currentFiles = new HashMap();
- private final Collection polledSeenFiles = new HashSet();
-
- 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 hidden <code>true</code> if the repository should be hidden, <code>false</code> if not.
- */
- public RepositoryListener(String repositoryName, boolean hidden) {
- URI location = Activator.getDefaultRepositoryLocation(this, repositoryName);
- metadataRepository = initializeMetadataRepository(repositoryName, location, hidden);
- artifactRepository = initializeArtifactRepository(repositoryName, location, hidden);
- 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);
- }
-
- protected CachingArtifactRepository initializeArtifactRepository(String repositoryName, URI repositoryLocation, boolean hidden) {
- 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 {
- String name = repositoryName;
- Map properties = new HashMap(1);
- if (hidden) {
- properties.put(IRepository.PROP_SYSTEM, Boolean.TRUE.toString());
- name = "artifact listener " + repositoryName; //$NON-NLS-1$
- }
- 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 repositoryName, URI repositoryLocation, boolean hidden) {
- 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 {
- String name = repositoryName;
- Map properties = new HashMap(1);
- if (hidden) {
- properties.put(IRepository.PROP_SYSTEM, Boolean.TRUE.toString());
- name = "metadata listener " + repositoryName; //$NON-NLS-1$
- }
- 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 = (String) 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 = (Long) 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 filesToRemove = new HashSet(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 removedFiles) {
- if (metadataRepository == null)
- return;
- final Collection changes = iusToChange.getIUs(null, null);
- // first remove any IUs that have changed or that are associated with removed files
- if (!removedFiles.isEmpty() || !changes.isEmpty()) {
- // create a query that will identify all ius related to removed files or ius that have changed
- IMatchQuery removeQuery = new MatchQuery() {
- public boolean isMatch(Object candidate) {
- if (!(candidate instanceof IInstallableUnit))
- return false;
- IInstallableUnit iu = (IInstallableUnit) candidate;
- if (changes.contains(iu))
- return true;
- String filename = iu.getProperty(FILE_NAME);
- if (filename == null) {
- String message = NLS.bind(Messages.filename_missing, "installable unit", iu.getId()); //$NON-NLS-1$
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message, null));
- return false;
- }
- File iuFile = new File(filename);
- return removedFiles.contains(iuFile);
- }
- };
- metadataRepository.removeInstallableUnits(removeQuery, null);
- }
- // Then add all the new IUs as well as the new copies of the ones that have changed
- Collection additions = iusToAdd.getIUs(null, null);
- additions.addAll(changes);
- if (!additions.isEmpty())
- metadataRepository.addInstallableUnits((IInstallableUnit[]) additions.toArray(new IInstallableUnit[additions.size()]));
- }
-
- /**
- * 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 removedFiles) {
- if (artifactRepository == null)
- return;
- if (!removedFiles.isEmpty()) {
- 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];
- String filename = descriptor.getRepositoryProperty(FILE_NAME);
- if (filename == null) {
- 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) {
- Collector ius = metadataRepository.query(InstallableUnitQuery.ANY, new Collector(), null);
- for (Iterator it = ius.iterator(); it.hasNext();) {
- IInstallableUnit iu = (IInstallableUnit) it.next();
- String filename = iu.getProperty(FILE_NAME);
- if (filename == null) {
- 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.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 b3fb58aaa..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,339 +0,0 @@
-#Thu Sep 06 23:48:04 EDT 2007
-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=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=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.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.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.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 efb5d09a7..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,24 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.exemplarysetup;singleton:=true
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.0.100.qualifier
-Import-Package: org.eclipse.equinox.internal.p2.core,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.director,
- org.eclipse.equinox.internal.p2.engine,
- org.eclipse.equinox.internal.p2.garbagecollector,
- org.eclipse.equinox.internal.p2.metadata.repository,
- org.eclipse.equinox.internal.p2.repository.helpers,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.osgi.framework;version="1.3.0"
-Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.equinox.internal.p2.exemplarysetup.Activator
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Export-Package: org.eclipse.equinox.internal.p2.exemplarysetup;x-internal:=true
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/org/eclipse/equinox/internal/p2/exemplarysetup/Activator.java b/bundles/org.eclipse.equinox.p2.exemplarysetup/src/org/eclipse/equinox/internal/p2/exemplarysetup/Activator.java
deleted file mode 100644
index 94179432e..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/src/org/eclipse/equinox/internal/p2/exemplarysetup/Activator.java
+++ /dev/null
@@ -1,154 +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.exemplarysetup;
-
-import org.eclipse.equinox.internal.p2.core.ProvisioningEventBus;
-import org.eclipse.equinox.internal.p2.director.SimpleDirector;
-import org.eclipse.equinox.internal.p2.director.SimplePlanner;
-import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
-import org.eclipse.equinox.internal.p2.garbagecollector.GarbageCollector;
-import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.director.IDirector;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.osgi.framework.*;
-
-public class Activator implements BundleActivator {
- public static BundleContext context;
-
- private IProvisioningEventBus bus;
- private ServiceRegistration registrationBus;
-
- private ServiceRegistration registrationDefaultManager;
-
- // private ArtifactRepositoryManager artifactRepoManager;
- // private ServiceRegistration registrationArtifactRepoManager;
-
- private IProfileRegistry profileRegistry;
- private ServiceRegistration registrationProfileRegistry;
-
- private IDirector director;
- private ServiceRegistration registrationDirector;
-
- private IPlanner planner;
- private ServiceRegistration registrationPlanner;
-
- private ServiceReference metadataRepositoryReference;
-
- public void start(BundleContext aContext) throws Exception {
- //Need to do the configuration of all the bits and pieces:
- Activator.context = aContext;
-
- registerEventBus();
- //create the profile registry
- registerProfileRegistry();
- registerMetadataRepositoryManager();
-
- //create the director and planner. The planner must be
- //registered first because the director finds it in its constructor.
- registerPlanner();
- registerDirector();
- startGarbageCollector();
-
- //create artifact repositories
- // registerDefaultArtifactRepoManager();
- }
-
- private void startGarbageCollector() {
- new GarbageCollector();
- }
-
- public void stop(BundleContext aContext) throws Exception {
- // unregisterDefaultArtifactRepoManager();
- unregisterDirector();
- unregisterPlanner();
- unregisterDefaultMetadataRepoManager();
- unregisterProfileRegistry();
- unregisterEventBus();
- Activator.context = null;
-
- }
-
- private void registerDirector() {
- director = new SimpleDirector();
- registrationDirector = context.registerService(IDirector.class.getName(), director, null);
- }
-
- private void unregisterDirector() {
- registrationDirector.unregister();
- registrationDirector = null;
- director = null;
- }
-
- private void registerPlanner() {
- planner = new SimplePlanner();
- registrationPlanner = context.registerService(IPlanner.class.getName(), planner, null);
- }
-
- private void unregisterPlanner() {
- registrationPlanner.unregister();
- registrationPlanner = null;
- planner = null;
- }
-
- private void registerProfileRegistry() {
- profileRegistry = new SimpleProfileRegistry();
- registrationProfileRegistry = context.registerService(IProfileRegistry.class.getName(), profileRegistry, null);
- }
-
- private void unregisterProfileRegistry() {
- registrationProfileRegistry.unregister();
- registrationProfileRegistry = null;
- profileRegistry = null;
- }
-
- /**
- * Returns a metadata repository manager, registering a service if there isn't
- * one registered already.
- */
- private void registerMetadataRepositoryManager() {
- //register a metadata repository manager if there isn't one already registered
- metadataRepositoryReference = context.getServiceReference(IMetadataRepositoryManager.SERVICE_NAME);
- if (metadataRepositoryReference == null) {
- final MetadataRepositoryManager manager = new MetadataRepositoryManager();
- manager.setEventBus(bus);
- registrationDefaultManager = context.registerService(IMetadataRepositoryManager.SERVICE_NAME, manager, null);
- metadataRepositoryReference = registrationDefaultManager.getReference();
- }
- }
-
- private void unregisterDefaultMetadataRepoManager() {
- //unget the service obtained for the metadata cache
- if (metadataRepositoryReference != null) {
- context.ungetService(metadataRepositoryReference);
- metadataRepositoryReference = null;
- }
-
- //unregister the service if we registered it
- if (registrationDefaultManager != null) {
- registrationDefaultManager.unregister();
- registrationDefaultManager = null;
- }
- }
-
- private void registerEventBus() {
- bus = new ProvisioningEventBus();
- registrationBus = context.registerService(IProvisioningEventBus.SERVICE_NAME, bus, null);
- }
-
- private void unregisterEventBus() {
- registrationBus.unregister();
- registrationBus = null;
- bus.close();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/.classpath b/bundles/org.eclipse.equinox.p2.extensionlocation/.classpath
deleted file mode 100644
index 6f3b481ac..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/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.p2.extensionlocation/.cvsignore b/bundles/org.eclipse.equinox.p2.extensionlocation/.cvsignore
deleted file mode 100644
index e043cc4e2..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-bin
-build.xml
-javaCompiler...args
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 aceba4d02..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,330 +0,0 @@
-#Thu Nov 20 12:57:22 PST 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.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 2eb10d82e..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,34 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.0.100.qualifier
-Bundle-SymbolicName: org.eclipse.equinox.p2.extensionlocation;singleton:=true
-Bundle-Activator: org.eclipse.equinox.internal.p2.extensionlocation.Activator
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Export-Package: org.eclipse.equinox.internal.p2.extensionlocation;x-friends:="org.eclipse.equinox.p2.reconciler.dropins"
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- 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.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.directorywatcher,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.repository,
- org.eclipse.equinox.p2.publisher.eclipse,
- 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
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-
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 39459475f..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/build.properties
+++ /dev/null
@@ -1,19 +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
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/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 a6aa54387..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Activator.java
+++ /dev/null
@@ -1,101 +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.internal.provisional.p2.artifact.repository.IFileArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-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() {
- ServiceReference reference = bundleContext.getServiceReference(IProfileRegistry.class.getName());
- if (reference == null)
- return null;
- IProfileRegistry profileRegistry = (IProfileRegistry) bundleContext.getService(reference);
- try {
- return profileRegistry.getProfile(IProfileRegistry.SELF);
- } finally {
- bundleContext.ungetService(reference);
- }
- }
-
- public static IFileArtifactRepository getBundlePoolRepository() {
- ServiceReference reference = bundleContext.getServiceReference(IProfileRegistry.class.getName());
- if (reference == null)
- return null;
- IProfileRegistry profileRegistry = (IProfileRegistry) bundleContext.getService(reference);
- IProfile profile = null;
- try {
- profile = profileRegistry.getProfile(IProfileRegistry.SELF);
- } finally {
- bundleContext.ungetService(reference);
- }
- if (profile == null)
- return null;
-
- return Util.getAggregatedBundleRepository(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 6615f0072..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/BundlePoolFilteredListener.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.extensionlocation;
-
-import java.io.File;
-import java.util.HashSet;
-import java.util.Set;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IFileArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.directorywatcher.DirectoryChangeListener;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-
-public class BundlePoolFilteredListener extends DirectoryChangeListener {
-
- private DirectoryChangeListener delegate;
- private Set bundlePoolFiles = new HashSet();
-
- public BundlePoolFilteredListener(DirectoryChangeListener listener) {
- delegate = listener;
- IFileArtifactRepository bundlePool = Activator.getBundlePoolRepository();
- if (bundlePool != null) {
- IArtifactKey[] keys = bundlePool.getArtifactKeys();
- for (int i = 0; i < keys.length; i++) {
- File artifactFile = bundlePool.getArtifactFile(keys[i]);
- 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 0d67e3da8..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java
+++ /dev/null
@@ -1,232 +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.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.spi.p2.repository.AbstractRepository;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-
-public class ExtensionLocationArtifactRepository extends AbstractRepository 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 STANDARD_P2_REPOSITORY_FILE_NAMES = Arrays.asList(new Object[] {"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(URI location, IFileArtifactRepository repository, IProgressMonitor monitor) throws ProvisionException {
- super(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 {
- ExtensionLocationArtifactRepository repo = (ExtensionLocationArtifactRepository) new ExtensionLocationArtifactRepositoryFactory().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 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 IArtifactKey[] getArtifactKeys() {
- ensureInitialized();
- return artifactRepository.getArtifactKeys();
- }
-
- 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 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;
- }
-}
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 b584ab2bf..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepositoryFactory.java
+++ /dev/null
@@ -1,91 +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.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IFileArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.ArtifactRepositoryFactory;
-import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.SimpleArtifactRepositoryFactory;
-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 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;
- try {
- new SimpleArtifactRepositoryFactory().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) new SimpleArtifactRepositoryFactory().create(repoLocation, name, type, properties);
- return new ExtensionLocationArtifactRepository(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 {
- IFileArtifactRepository repo = (IFileArtifactRepository) new SimpleArtifactRepositoryFactory().load(repoLocation, flags, null);
- return new ExtensionLocationArtifactRepository(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 ae3736ddb..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepository.java
+++ /dev/null
@@ -1,199 +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.File;
-import java.io.FilenameFilter;
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.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 STANDARD_P2_REPOSITORY_FILE_NAMES = Arrays.asList(new Object[] {"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(URI location, IMetadataRepository repository, IProgressMonitor monitor) throws ProvisionException {
- super(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 {
- ExtensionLocationMetadataRepository repo = (ExtensionLocationMetadataRepository) new ExtensionLocationMetadataRepositoryFactory().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.internal.provisional.p2.metadata.repository.IMetadataRepository#addInstallableUnits(org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit[])
- */
- public void addInstallableUnits(IInstallableUnit[] installableUnits) {
- throw new UnsupportedOperationException();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository#removeAll()
- */
- public void removeAll() {
- throw new UnsupportedOperationException();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository#removeInstallableUnits(org.eclipse.equinox.internal.provisional.p2.query.Query, org.eclipse.core.runtime.IProgressMonitor)
- */
- public boolean removeInstallableUnits(Query query, IProgressMonitor monitor) {
- throw new UnsupportedOperationException();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.query.IQueryable#query(org.eclipse.equinox.internal.provisional.p2.query.Query, org.eclipse.equinox.internal.provisional.p2.query.Collector, org.eclipse.core.runtime.IProgressMonitor)
- */
- public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
- ensureInitialized();
- return metadataRepository.query(query, collector, 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.internal.provisional.spi.p2.repository.AbstractRepository#getProperties()
- */
- public Map getProperties() {
- ensureInitialized();
- return metadataRepository.getProperties();
- }
-
- public void initialize(RepositoryState repositoryState) {
- //nothing to do
- }
-
- 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 628ffeb7e..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepositoryFactory.java
+++ /dev/null
@@ -1,93 +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.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.SimpleMetadataRepositoryFactory;
-import org.eclipse.osgi.util.NLS;
-
-public class ExtensionLocationMetadataRepositoryFactory extends MetadataRepositoryFactory {
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory#create(java.net.URL, java.lang.String, java.lang.String, java.util.Map)
- */
- public IMetadataRepository create(URI location, String name, String type, Map 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;
- try {
- new SimpleMetadataRepositoryFactory().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 = new SimpleMetadataRepositoryFactory().create(repoLocation, name, null, properties);
- return new ExtensionLocationMetadataRepository(location, repository, null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.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 {
- IMetadataRepository repository = new SimpleMetadataRepositoryFactory().load(repoLocation, flags, null);
- return new ExtensionLocationMetadataRepository(location, repository, monitor);
- } catch (ProvisionException e) {
- return create(location, Activator.getRepositoryName(location), ExtensionLocationMetadataRepository.TYPE, null);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.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 05113e87b..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java
+++ /dev/null
@@ -1,355 +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.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.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.directorywatcher.*;
-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(new File(plugins[i]).toString()))
- return true;
- return false;
- }
-
- /**
- * 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();
- metadataRepository = (ExtensionLocationMetadataRepository) factory.load(artifactRepository.getLocation(), 0, null);
- } else if (artifactRepository == null) {
- metadataRepository.reload();
- ExtensionLocationArtifactRepositoryFactory factory = new ExtensionLocationArtifactRepositoryFactory();
- 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 properties, String url, DirectoryChangeListener delegate) {
- this.siteLocation = url;
- this.delegate = delegate;
- this.policy = (String) properties.get(SITE_POLICY);
- Collection listCollection = new HashSet();
- String listString = (String) properties.get(SITE_LIST);
- if (listString != null)
- for (StringTokenizer tokenizer = new StringTokenizer(listString, ","); tokenizer.hasMoreTokens();) //$NON-NLS-1$
- listCollection.add(tokenizer.nextToken());
- this.list = (String[]) 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 result = new ArrayList();
- for (Enumeration e = properties.elements(); e.hasMoreElements();) {
- String line = (String) e.nextElement();
- StringTokenizer tokenizer = new StringTokenizer(line, ";"); //$NON-NLS-1$
- String targetSite = tokenizer.nextToken();
- if (!urlString.equals(targetSite))
- continue;
- result.add(tokenizer.nextToken());
- }
- toBeRemoved = (String[]) 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 result = new ArrayList();
- 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 pluginCache = getPlugins(siteFile);
- Map featureCache = getFeatures(siteFile);
- for (Iterator iter = featureCache.keySet().iterator(); iter.hasNext();) {
- File featureFile = (File) iter.next();
- // add the feature path
- result.add(featureFile.toString());
- Feature 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 = (File) pluginCache.get(key);
- if (pluginLocation != null)
- result.add(pluginLocation.toString());
- }
- }
- managedFiles = (String[]) 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 getFeatures(File location) {
- Map result = new HashMap();
- 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 getPlugins(File location) {
- File[] plugins = new File(location, PLUGINS).listFiles();
- Map result = new HashMap();
- 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 7cdeb7319..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="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.garbagecollector/.cvsignore b/bundles/org.eclipse.equinox.p2.garbagecollector/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
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 772f2af4d..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/.project
+++ /dev/null
@@ -1,34 +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>
- </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 78523cd05..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,331 +0,0 @@
-#Thu Aug 16 11:00:59 EDT 2007
-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=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.unsafeTypeOperation=warning
-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_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.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 74c92c083..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,24 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.garbagecollector;singleton:=true
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.0.100.qualifier
-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.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.4.0",
- org.osgi.service.prefs;version="1.1.0"
-Bundle-Activator: org.eclipse.equinox.internal.p2.garbagecollector.GCActivator
-Export-Package: org.eclipse.equinox.internal.p2.garbagecollector;x-friends:="org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.pde.core"
-Bundle-ActivationPolicy: lazy
-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)"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
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 f84c26ec6..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/build.properties
+++ /dev/null
@@ -1,19 +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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- schema/,\
- about.html,\
- plugin.properties
-src.includes = about.html
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/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 b4c63d7c6..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Application.java
+++ /dev/null
@@ -1,78 +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.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.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;
-
- /*
- * Return the profile with the given id, or null if not found.
- */
- private IProfile getProfile(String id) {
- IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(GCActivator.getContext(), IProfileRegistry.class.getName());
- 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 {
- // TODO - do we have to start exemplarySetup here?
- 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;
- IProfile profile = getProfile(profileId);
- if (profile == null)
- throw new IllegalArgumentException("\"" + profileId + "\" is not a valid profile identifier.");
- new GarbageCollector().runGC(profile);
- return 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 cf0eb709a..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/CoreGarbageCollector.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.p2.garbagecollector;
-
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-
-/**
- * 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
- */
- private 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, IArtifactRepository aRepository) {
- IArtifactKey[] repositoryKeys = aRepository.getArtifactKeys();
- for (int j = 0; j < repositoryKeys.length; j++) {
- boolean artifactIsActive = false;
- for (int k = 0; k < markSet.length; k++) {
- if (repositoryKeys[j].equals(markSet[k])) {
- artifactIsActive = true;
- break;
- }
- }
- if (!artifactIsActive) {
- aRepository.removeDescriptor(repositoryKeys[j]);
- if (debugMode) {
- Tracing.debug("Key removed:" + repositoryKeys[j]); //$NON-NLS-1$
- }
- }
- }
- }
-
- /*
- * 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 65ddf8bd9..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GCActivator.java
+++ /dev/null
@@ -1,110 +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 java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.preferences.*;
-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.core.eventbus.SynchronousProvisioningListener;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.osgi.service.debug.DebugOptions;
-import org.osgi.framework.*;
-import org.osgi.service.prefs.Preferences;
-
-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;
-
- private SynchronousProvisioningListener busListener;
-
- static Object getService(BundleContext ctx, String name) {
- ServiceReference reference = ctx.getServiceReference(name);
- if (reference == null)
- return null;
- Object result = ctx.getService(reference);
- ctx.ungetService(reference);
- return result;
- }
-
- public void start(BundleContext inContext) throws Exception {
- GCActivator.context = inContext;
- DebugOptions debug = (DebugOptions) getService(inContext, DebugOptions.class.getName());
- if (debug != null) {
- CoreGarbageCollector.setDebugMode(debug.getBooleanOption(DEBUG_STRING, DEFAULT_DEBUG));
- }
- registerGCTrigger();
- }
-
- // Register the listener used to trigger the GC.
- private void registerGCTrigger() {
- IProvisioningEventBus eventBus = (IProvisioningEventBus) getService(GCActivator.context, IProvisioningEventBus.SERVICE_NAME);
- if (eventBus == null) {
- LogHelper.log(new Status(IStatus.ERROR, GCActivator.ID, Messages.Missing_bus));
- return;
- }
- eventBus.addListener(busListener = new SynchronousProvisioningListener() {
- //The GC is triggered when an uninstall event occurred during a "transaction" and the transaction is committed.
- private boolean uninstallEventOccurred = false;
-
- public void notify(EventObject o) {
- if (o instanceof InstallableUnitEvent) {
- InstallableUnitEvent event = (InstallableUnitEvent) o;
- if (event.isUninstall() && event.isPost()) {
- uninstallEventOccurred = true;
- }
- } else if (o instanceof CommitOperationEvent) {
- if (uninstallEventOccurred == true) {
- CommitOperationEvent event = (CommitOperationEvent) o;
- if (getBooleanPreference(GC_ENABLED, true)) {
- new GarbageCollector().runGC(event.getProfile());
- }
- uninstallEventOccurred = false;
- }
- } else if (o instanceof RollbackOperationEvent) {
- uninstallEventOccurred = false;
- }
- }
- });
- }
-
- protected boolean getBooleanPreference(String key, boolean defaultValue) {
- IPreferencesService prefService = (IPreferencesService) getService(context, IPreferencesService.class.getName());
- if (prefService == null)
- return defaultValue;
- List nodes = new ArrayList();
- // 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(ID));
- nodes.add(new DefaultScope().getNode(ID));
- return Boolean.valueOf(prefService.get(key, Boolean.toString(defaultValue), (Preferences[]) nodes.toArray(new Preferences[nodes.size()]))).booleanValue();
- }
-
- private void unregisterGCTrigger() {
- IProvisioningEventBus eventBus = (IProvisioningEventBus) getService(GCActivator.context, IProvisioningEventBus.SERVICE_NAME);
- if (eventBus != null && busListener != null)
- eventBus.removeListener(busListener);
- }
-
- public void stop(BundleContext inContext) throws Exception {
- unregisterGCTrigger();
- GCActivator.context = null;
- }
-
- public static BundleContext getContext() {
- return context;
- }
-}
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 4db8c4514..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java
+++ /dev/null
@@ -1,161 +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 java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-
-/**
- * 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 {
- private static final String ATTRIBUTE_CLASS = "class"; //$NON-NLS-1$
- private static final String PT_MARKSET = GCActivator.ID + ".marksetproviders"; //$NON-NLS-1$
-
- /**
- * Maps IArtifactRepository objects to their respective "marked set" of IArtifactKeys
- */
- private Map markSet;
-
- public void runGC(IProfile profile) {
- markSet = new HashMap();
- 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();
- }
-
- 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 invokeCoreGC() {
- Iterator keyIterator = markSet.keySet().iterator();
- while (keyIterator.hasNext()) {
- IArtifactRepository nextRepo = (IArtifactRepository) keyIterator.next();
- IArtifactKey[] keys = (IArtifactKey[]) ((Collection) markSet.get(nextRepo)).toArray(new IArtifactKey[0]);
- MarkSet aMarkSet = new MarkSet(keys, nextRepo);
- new CoreGarbageCollector().clean(aMarkSet.getKeys(), aMarkSet.getRepo());
- }
- }
-
- 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) GCActivator.getService(GCActivator.getContext(), IProfileRegistry.class.getName());
- if (profileRegistry == null)
- return;
- IProfile[] registeredProfiles = profileRegistry.getProfiles();
-
- for (int j = 0; j < registeredProfiles.length; j++) {
- contributeMarkSets(runAttribute, registeredProfiles[j], false);
- }
- }
- }
-
- private class ParameterizedSafeRunnable implements ISafeRunnable {
- IConfigurationElement cfg;
- IProfile aProfile;
- MarkSet[] aProfileMarkSets;
-
- public ParameterizedSafeRunnable(IConfigurationElement runtAttribute, IProfile profile) {
- cfg = runtAttribute;
- aProfile = profile;
- }
-
- 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(aProfile);
- }
-
- public MarkSet[] getResult() {
- return aProfileMarkSets;
- }
- }
-
- 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 keys = (Collection) markSet.get(aProfileMarkSets[i].getRepo());
- if (keys == null) {
- if (addRepositories) {
- keys = new HashSet();
- markSet.put(aProfileMarkSets[i].getRepo(), keys);
- addKeys(keys, aProfileMarkSets[i].getKeys());
- }
- } else {
- addKeys(keys, aProfileMarkSets[i].getKeys());
- }
- }
- }
-
- private void addKeys(Collection keyList, IArtifactKey[] keyArray) {
- for (int i = 0; i < keyArray.length; i++)
- keyList.add(keyArray[i]);
- }
-}
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 d8b2446c9..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.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-
-/**
- * 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 edb21b3f5..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/MarkSetProvider.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.garbagecollector;
-
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-
-/**
- * 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(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(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 cd0fea7d1..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Messages.java
+++ /dev/null
@@ -1,25 +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.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;
- public static String Missing_bus;
-
- 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 a2eba873d..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/messages.properties
+++ /dev/null
@@ -1,12 +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
-###############################################################################
-Error_in_extension=An error occurred while calling to an IMarkSetProvider.
-Missing_bus=ProvisioningEventBus service could not be obtained, CoreGarbageCollector will not function properly.
diff --git a/bundles/org.eclipse.equinox.p2.installer/.classpath b/bundles/org.eclipse.equinox.p2.installer/.classpath
deleted file mode 100644
index 7cdeb7319..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/.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.installer/.project b/bundles/org.eclipse.equinox.p2.installer/.project
deleted file mode 100644
index 8fc72c3f0..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.installer</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.installer/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 99a0b3dc6..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,341 +0,0 @@
-#Thu Oct 11 16:46:31 EDT 2007
-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=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=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.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.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.p2.installer/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index a14e009a3..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,59 +0,0 @@
-#Thu Oct 11 16:54: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=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_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.installer/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.installer/META-INF/MANIFEST.MF
deleted file mode 100644
index 75cf0ac5d..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,26 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.installer;singleton:=true
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.0.200.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.installer.InstallerActivator
-Bundle-ActivationPolicy: lazy
-Require-Bundle: org.eclipse.osgi,
- org.eclipse.equinox.app,
- org.eclipse.equinox.common,
- org.eclipse.equinox.p2.director,
- org.eclipse.equinox.p2.metadata.repository,
- org.eclipse.equinox.p2.metadata,
- org.eclipse.equinox.p2.engine,
- org.eclipse.equinox.p2.core,
- org.eclipse.equinox.p2.artifact.repository,
- org.eclipse.swt,
- org.eclipse.core.net;bundle-version="1.1.0",
- org.eclipse.equinox.p2.repository;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Export-Package: org.eclipse.equinox.internal.p2.installer;x-internal:=true,
- org.eclipse.equinox.internal.p2.installer.ui;x-internal:=true,
- org.eclipse.equinox.internal.provisional.p2.installer;x-internal:=true
diff --git a/bundles/org.eclipse.equinox.p2.installer/README.txt b/bundles/org.eclipse.equinox.p2.installer/README.txt
deleted file mode 100644
index bafccac4b..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/README.txt
+++ /dev/null
@@ -1,2 +0,0 @@
- This is a simple install application that demonstrates use of p2. See the class
- comment on the InstallDescription class for details. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.installer/about.html b/bundles/org.eclipse.equinox.p2.installer/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/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.installer/build.properties b/bundles/org.eclipse.equinox.p2.installer/build.properties
deleted file mode 100644
index 973e370b6..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/build.properties
+++ /dev/null
@@ -1,19 +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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- product_lg.gif,\
- about.html,\
- plugin.properties
-src.includes = about.html
diff --git a/bundles/org.eclipse.equinox.p2.installer/installer.product b/bundles/org.eclipse.equinox.p2.installer/installer.product
deleted file mode 100644
index 20e7a439a..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/installer.product
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="Equinox p2 Installer" id="org.eclipse.equinox.p2.installer.product" application="org.eclipse.equinox.p2.installer.application" useFeatures="false" includeLaunchers="true">
-
- <aboutInfo>
- <image path="product_lg.gif"/>
- <text>
- P2 Installer
- </text>
- </aboutInfo>
-
- <configIni use="default">
- <linux>/org.eclipse.equinox.p2.installer/config.ini</linux>
- <solaris>/org.eclipse.equinox.p2.installer/config.ini</solaris>
- <win32>/org.eclipse.equinox.p2.installer/config.ini</win32>
- </configIni>
-
- <launcherArgs>
- <vmArgs>-Xmx512m</vmArgs>
- </launcherArgs>
-
- <windowImages/>
-
- <splash
- location="org.eclipse.equinox.p2.installer" />
- <launcher name="p2installer">
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- <plugin id="org.apache.commons.codec"/>
- <plugin id="org.apache.commons.httpclient"/>
- <plugin id="org.apache.commons.logging"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.net"/>
- <plugin id="org.eclipse.core.net.linux.x86" fragment="true"/>
- <plugin id="org.eclipse.core.net.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.core.net.win32.x86_64" fragment="true"/>
- <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.launcher"/>
- <plugin id="org.eclipse.equinox.launcher.carbon.macosx" fragment="true"/>
- <plugin id="org.eclipse.equinox.launcher.cocoa.macosx" fragment="true"/>
- <plugin id="org.eclipse.equinox.launcher.cocoa.macosx.x86_64" fragment="true"/>
- <plugin id="org.eclipse.equinox.launcher.gtk.linux.ppc" fragment="true"/>
- <plugin id="org.eclipse.equinox.launcher.gtk.linux.s390" fragment="true"/>
- <plugin id="org.eclipse.equinox.launcher.gtk.linux.s390x" fragment="true"/>
- <plugin id="org.eclipse.equinox.launcher.gtk.linux.x86" fragment="true"/>
- <plugin id="org.eclipse.equinox.launcher.gtk.linux.x86_64" fragment="true"/>
- <plugin id="org.eclipse.equinox.launcher.gtk.solaris.sparc" fragment="true"/>
- <plugin id="org.eclipse.equinox.launcher.gtk.solaris.x86" fragment="true"/>
- <plugin id="org.eclipse.equinox.launcher.motif.aix.ppc" fragment="true"/>
- <plugin id="org.eclipse.equinox.launcher.motif.hpux.ia64_32" fragment="true"/>
- <plugin id="org.eclipse.equinox.launcher.motif.linux.x86" fragment="true"/>
- <plugin id="org.eclipse.equinox.launcher.motif.solaris.sparc" fragment="true"/>
- <plugin id="org.eclipse.equinox.launcher.win32.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.equinox.launcher.win32.win32.x86_64" fragment="true"/>
- <plugin id="org.eclipse.equinox.launcher.wpf.win32.x86" fragment="true"/>
- <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.engine"/>
- <plugin id="org.eclipse.equinox.p2.exemplarysetup"/>
- <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
- <plugin id="org.eclipse.equinox.p2.installer"/>
- <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.repository"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.natives"/>
- <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.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
- <plugin id="org.eclipse.equinox.transforms.hook" fragment="true"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.services"/>
- <plugin id="org.eclipse.swt"/>
- <plugin id="org.eclipse.swt.carbon.macosx" fragment="true"/>
- <plugin id="org.eclipse.swt.cocoa.macosx" fragment="true"/>
- <plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/>
- <plugin id="org.eclipse.swt.gtk.linux.ppc" fragment="true"/>
- <plugin id="org.eclipse.swt.gtk.linux.s390" fragment="true"/>
- <plugin id="org.eclipse.swt.gtk.linux.s390x" fragment="true"/>
- <plugin id="org.eclipse.swt.gtk.linux.x86" fragment="true"/>
- <plugin id="org.eclipse.swt.gtk.linux.x86_64" fragment="true"/>
- <plugin id="org.eclipse.swt.gtk.solaris.sparc" fragment="true"/>
- <plugin id="org.eclipse.swt.gtk.solaris.x86" fragment="true"/>
- <plugin id="org.eclipse.swt.motif.aix.ppc" fragment="true"/>
- <plugin id="org.eclipse.swt.motif.hpux.ia64_32" fragment="true"/>
- <plugin id="org.eclipse.swt.motif.linux.x86" fragment="true"/>
- <plugin id="org.eclipse.swt.motif.solaris.sparc" fragment="true"/>
- <plugin id="org.eclipse.swt.photon.qnx.x86" fragment="true"/>
- <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.swt.win32.win32.x86_64" fragment="true"/>
- <plugin id="org.eclipse.swt.wpf.win32.x86" fragment="true"/>
- <plugin id="org.sat4j.core"/>
- <plugin id="org.sat4j.pb"/>
- </plugins>
-
- <configurations>
- <plugin id="org.eclipse.equinox.app" autoStart="true" startLevel="4" />
- <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
- <plugin id="org.eclipse.equinox.frameworkadmin.equinox" autoStart="true" startLevel="3" />
- <plugin id="org.eclipse.equinox.registry" autoStart="true" startLevel="3" />
- <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
- <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator" autoStart="true" startLevel="3" />
- </configurations>
-
-</product>
diff --git a/bundles/org.eclipse.equinox.p2.installer/installer.properties b/bundles/org.eclipse.equinox.p2.installer/installer.properties
deleted file mode 100644
index a917f01a9..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/installer.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.p2.metadata=http://download.eclipse.org/eclipse/updates/3.5
-eclipse.p2.artifacts=http://download.eclipse.org/eclipse/updates/3.5
-eclipse.p2.flavor=tooling
-eclipse.p2.profileName=Eclipse SDK
-eclipse.p2.launcherName=eclipse
-eclipse.p2.rootId=org.eclipse.sdk.ide
-eclipse.p2.autoStart=true
diff --git a/bundles/org.eclipse.equinox.p2.installer/plugin.properties b/bundles/org.eclipse.equinox.p2.installer/plugin.properties
deleted file mode 100644
index d8931e030..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/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 Installer
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.installer/plugin.xml b/bundles/org.eclipse.equinox.p2.installer/plugin.xml
deleted file mode 100644
index 39ef657fa..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/plugin.xml
+++ /dev/null
@@ -1,35 +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.installer.InstallApplication">
- </run>
- </application>
- </extension>
- <extension
- id="product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.eclipse.equinox.p2.installer.application"
- name="Equinox p2 Installer">
- <property
- name="appName"
- value="Equinox p2 Installer">
- </property>
- <property
- name="aboutImage"
- value="product_lg.gif">
- </property>
- <property
- name="aboutText"
- value="P2 Installer">
- </property>
- </product>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.installer/product_lg.gif b/bundles/org.eclipse.equinox.p2.installer/product_lg.gif
deleted file mode 100644
index bd95e283f..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/product_lg.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/HeadlessInstallAdvisor.java b/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/HeadlessInstallAdvisor.java
deleted file mode 100644
index d34d10caf..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/HeadlessInstallAdvisor.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.internal.p2.installer;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.provisional.p2.installer.*;
-
-/**
- * A headless install advisor that prints everything to a log.
- */
-public class HeadlessInstallAdvisor extends InstallAdvisor {
- class HeadlessProgressMonitor implements IProgressMonitor {
- private boolean canceled;
-
- public void beginTask(String name, int totalWork) {
- setResult(new Status(IStatus.INFO, InstallerActivator.PI_INSTALLER, name));
- }
-
- public void done() {
- //nothing to do
- }
-
- public void internalWorked(double work) {
- //nothing to do
- }
-
- public boolean isCanceled() {
- return canceled;
- }
-
- public void setCanceled(boolean value) {
- canceled = value;
- }
-
- public void setTaskName(String name) {
- setResult(new Status(IStatus.INFO, InstallerActivator.PI_INSTALLER, name));
- }
-
- public void subTask(String name) {
- //nothing to do
- }
-
- public void worked(int work) {
- //nothing to do
- }
- }
-
- public IStatus performInstall(IInstallOperation operation) {
- return operation.install(new HeadlessProgressMonitor());
- }
-
- public InstallDescription prepareInstallDescription(InstallDescription description) {
- // The headless advisor has no further input on the install location.
- return description;
- }
-
- public boolean promptForLaunch(InstallDescription description) {
- return false;
- }
-
- public void setResult(IStatus status) {
- LogHelper.log(status);
- }
-
- public void start() {
- //nothing to do
- }
-
- public void stop() {
- //nothing to do
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallApplication.java b/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallApplication.java
deleted file mode 100644
index f928dca6c..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallApplication.java
+++ /dev/null
@@ -1,236 +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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.installer;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import org.eclipse.core.net.proxy.IProxyService;
-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.installer.ui.SWTInstallAdvisor;
-import org.eclipse.equinox.internal.provisional.p2.installer.InstallAdvisor;
-import org.eclipse.equinox.internal.provisional.p2.installer.InstallDescription;
-import org.osgi.framework.*;
-
-/**
- * This is a simple installer application built using P2. The application must be given
- * an "install description" as a command line argument or system property
- * ({@link #SYS_PROP_INSTALL_DESCRIPTION}). The application reads this
- * install description, and looks for an existing profile in the local install registry that
- * matches it. If no profile is found, it creates a new profile, and installs the root
- * IU in the install description into the profile. It may then launch the installed application,
- * depending on the specification in the install description. If an existing profile is found,
- * the application instead performs an update on the existing profile with the new root
- * IU in the install description. Thus, an installed application can be updated by dropping
- * in a new install description file, and re-running this installer application.
- */
-public class InstallApplication implements IApplication {
- /**
- * A property whose value is the URL of an install description. An install description is a file
- * that contains all the information required to complete the install.
- */
- private static final String SYS_PROP_INSTALL_DESCRIPTION = "org.eclipse.equinox.p2.installDescription"; //$NON-NLS-1$
-
- /**
- * The install advisor. This field is non null while the install application is running.
- */
- private InstallAdvisor advisor;
-
- /**
- * Throws an exception of severity error with the given error message.
- */
- private static CoreException fail(String message, Throwable throwable) {
- return new CoreException(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, message, throwable));
- }
-
- /**
- * Copied from ServiceHelper because we need to obtain services
- * before p2 has been started.
- */
- 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;
- }
-
- /**
- * Loads the install description, filling in any missing data if needed.
- */
- private InstallDescription computeInstallDescription() throws CoreException {
- InstallDescription description = fetchInstallDescription(SubMonitor.convert(null));
- return advisor.prepareInstallDescription(description);
- }
-
- private InstallAdvisor createInstallContext() {
- //TODO create an appropriate advisor depending on whether headless or GUI install is desired.
- InstallAdvisor result = new SWTInstallAdvisor();
- result.start();
- return result;
- }
-
- /**
- * Fetch and return the install description to be installed.
- */
- private InstallDescription fetchInstallDescription(SubMonitor monitor) throws CoreException {
- String site = System.getProperty(SYS_PROP_INSTALL_DESCRIPTION);
- try {
- return InstallDescriptionParser.createDescription(site, monitor);
- } catch (Exception e) {
- throw fail(Messages.App_InvalidSite + site, e);
- }
- }
-
- private IStatus getStatus(final Exception failure) {
- Throwable cause = failure;
- //unwrap target exception if applicable
- if (failure instanceof InvocationTargetException) {
- cause = ((InvocationTargetException) failure).getTargetException();
- if (cause == null)
- cause = failure;
- }
- if (cause instanceof CoreException)
- return ((CoreException) cause).getStatus();
- return new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, Messages.App_Error, cause);
- }
-
- private void launchProduct(InstallDescription description) throws CoreException {
- IPath installLocation = description.getInstallLocation();
- IPath toRun = installLocation.append(description.getLauncherName());
- try {
- Runtime.getRuntime().exec(toRun.toString(), null, installLocation.toFile());
- } catch (IOException e) {
- throw fail(Messages.App_LaunchFailed + toRun, e);
- }
- //wait a few seconds to give the user a chance to read the message
- try {
- Thread.sleep(3000);
- } catch (InterruptedException e) {
- //ignore
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext appContext) {
- try {
- appContext.applicationRunning();
- initializeProxySupport();
- advisor = createInstallContext();
- //fetch description of what to install
- InstallDescription description = null;
- try {
- description = computeInstallDescription();
- startRequiredBundles(description);
- //perform long running install operation
- InstallUpdateProductOperation operation = new InstallUpdateProductOperation(InstallerActivator.getDefault().getContext(), description);
- IStatus result = advisor.performInstall(operation);
- if (!result.isOK()) {
- LogHelper.log(result);
- advisor.setResult(result);
- return IApplication.EXIT_OK;
- }
- //just exit after a successful update
- if (!operation.isFirstInstall())
- return IApplication.EXIT_OK;
- if (canAutoStart(description))
- launchProduct(description);
- else {
- //notify user that the product was installed
- //TODO present the user an option to immediately start the product
- advisor.setResult(result);
- }
- } catch (OperationCanceledException e) {
- advisor.setResult(Status.CANCEL_STATUS);
- } catch (Exception e) {
- IStatus error = getStatus(e);
- advisor.setResult(error);
- LogHelper.log(error);
- }
- return IApplication.EXIT_OK;
- } finally {
- if (advisor != null)
- advisor.stop();
- }
- }
-
- private void initializeProxySupport() {
- IProxyService proxies = (IProxyService) getService(InstallerActivator.getDefault().getContext(), IProxyService.class.getName());
- if (proxies == null)
- return;
- proxies.setProxiesEnabled(true);
- proxies.setSystemProxiesEnabled(true);
- }
-
- /**
- * Returns whether the configuration described by the given install
- * description can be started automatically.
- */
- private boolean canAutoStart(InstallDescription description) {
- if (!description.isAutoStart())
- return false;
- //can't start if we don't know launcher name and path
- if (description.getLauncherName() == null || description.getInstallLocation() == null)
- return false;
- return advisor.promptForLaunch(description);
- }
-
- /**
- * Starts the p2 bundles needed to continue with the install.
- */
- private void startRequiredBundles(InstallDescription description) throws CoreException {
- IPath installLocation = description.getInstallLocation();
- if (installLocation == null)
- throw fail(Messages.App_NoInstallLocation, null);
- //set agent location if specified
- IPath agentLocation = description.getAgentLocation();
- if (agentLocation != null) {
- String agentArea = System.getProperty("eclipse.p2.data.area"); //$NON-NLS-1$
- // TODO a bit of a hack here. If the value is already set and it is set to @config/p2 then
- // it may well be the default value put in by PDE. Overwrite it.
- // Its kind of unclear why we would NOT overwrite. At this point the user set their choice
- // of shared or standalone and those dicate where the agent should put its info...
- if (agentArea == null || agentArea.length() == 0 || agentArea.startsWith("@config")) //$NON-NLS-1$
- System.setProperty("eclipse.p2.data.area", agentLocation.toOSString()); //$NON-NLS-1$
- }
- //start up p2
- try {
- if (agentLocation != null) {
- // reset the agent location
- InstallerActivator.getDefault().getBundle("org.eclipse.equinox.p2.core").stop(Bundle.STOP_TRANSIENT); //$NON-NLS-1$
- InstallerActivator.getDefault().getBundle("org.eclipse.equinox.p2.core").start(Bundle.START_TRANSIENT); //$NON-NLS-1$
- }
- InstallerActivator.getDefault().getBundle("org.eclipse.equinox.p2.exemplarysetup").start(Bundle.START_TRANSIENT); //$NON-NLS-1$
- } catch (BundleException e) {
- throw fail(Messages.App_FailedStart, e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
- public void stop() {
- //note this method can be called from another thread
- InstallAdvisor tempContext = advisor;
- if (tempContext != null) {
- tempContext.stop();
- advisor = null;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallDescriptionParser.java b/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallDescriptionParser.java
deleted file mode 100644
index 37c349bf7..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallDescriptionParser.java
+++ /dev/null
@@ -1,226 +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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.installer;
-
-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.provisional.p2.core.VersionedName;
-import org.eclipse.equinox.internal.provisional.p2.installer.InstallDescription;
-
-/**
- * This class is responsible for loading install descriptions from a stream.
- */
-public class InstallDescriptionParser {
- private static final String PROP_AGENT_LOCATION = "eclipse.p2.agentLocation"; //$NON-NLS-1$
- private static final String PROP_ARTIFACT_REPOSITORY = "eclipse.p2.artifacts";//$NON-NLS-1$
- private static final String PROP_BUNDLE_LOCATION = "eclipse.p2.bundleLocation";//$NON-NLS-1$
- private static final String PROP_INSTALL_LOCATION = "eclipse.p2.installLocation";//$NON-NLS-1$
- private static final String PROP_IS_AUTO_START = "eclipse.p2.autoStart";//$NON-NLS-1$
- private static final String PROP_LAUNCHER_NAME = "eclipse.p2.launcherName";//$NON-NLS-1$
- private static final String PROP_METADATA_REPOSITORY = "eclipse.p2.metadata";//$NON-NLS-1$
- private static final String PROP_PROFILE_NAME = "eclipse.p2.profileName";//$NON-NLS-1$
- private static final String PROP_ROOT_ID = "eclipse.p2.rootId";//$NON-NLS-1$
- private static final String PROP_ROOT_VERSION = "eclipse.p2.rootVersion";//$NON-NLS-1$
- private static final String PROP_ROOTS = "eclipse.p2.roots";//$NON-NLS-1$
-
- /**
- * Loads and returns an install description that is stored in a properties file.
- * @param site The URL of the install properties file.
- */
- public static InstallDescription createDescription(String site, SubMonitor monitor) throws Exception {
- // if no description URL was given from the outside, look for an "install.properties" file
- // in relative to where the installer is running. This allows the installer to be self-contained
- if (site == null)
- site = "installer.properties"; //$NON-NLS-1$
-
- URI propsURI = URIUtil.fromString(site);
- InputStream in = null;
- if (!propsURI.isAbsolute()) {
- String installerInstallArea = System.getProperty("osgi.install.area");
- if (installerInstallArea == null)
- throw new IllegalStateException("Install area is not specified.");
-
- propsURI = URIUtil.append(URIUtil.fromString(installerInstallArea), site);
- File installerDescription = URIUtil.toFile(propsURI);
- if (!installerDescription.exists()) {
- throw new IllegalStateException("Can't find install description file: " + installerDescription);
- }
- }
- in = propsURI.toURL().openStream();
-
- Properties properties = new Properties();
- try {
- if (in != null)
- properties.load(in);
- } finally {
- safeClose(in);
- }
-
- URI base = getBase(propsURI);
- InstallDescription result = new InstallDescription();
- result = initialize(result, properties, base);
- initializeProfileProperties(result, properties);
-
- // now override the properties from anything interesting in system properties
- result = initialize(result, System.getProperties(), base);
- return result;
- }
-
- private static URI getBase(URI uri) {
- if (uri == null)
- return null;
-
- String uriString = uri.toString();
- int slashIndex = uriString.lastIndexOf('/');
- if (slashIndex == -1 || slashIndex == (uriString.length() - 1))
- return uri;
-
- return URI.create(uriString.substring(0, slashIndex + 1));
- }
-
- private static InstallDescription initialize(InstallDescription description, Properties properties, URI base) {
- String property = properties.getProperty(PROP_ARTIFACT_REPOSITORY);
- if (property != null)
- description.setArtifactRepositories(getURIs(property, base));
-
- property = properties.getProperty(PROP_METADATA_REPOSITORY);
- if (property != null)
- description.setMetadataRepositories(getURIs(property, base));
-
- property = properties.getProperty(PROP_IS_AUTO_START);
- if (property != null)
- description.setAutoStart(Boolean.TRUE.toString().equalsIgnoreCase(property));
-
- property = properties.getProperty(PROP_LAUNCHER_NAME);
- if (property != null)
- description.setLauncherName(property);
-
- property = properties.getProperty(PROP_INSTALL_LOCATION);
- if (property != null)
- description.setInstallLocation(new Path(property));
-
- property = properties.getProperty(PROP_AGENT_LOCATION);
- if (property != null)
- description.setAgentLocation(new Path(property));
-
- property = properties.getProperty(PROP_BUNDLE_LOCATION);
- if (property != null)
- description.setBundleLocation(new Path(property));
-
- property = properties.getProperty(PROP_PROFILE_NAME);
- if (property != null)
- description.setProductName(property);
-
- // Process the retro root id and rootVersion properties
- String id = properties.getProperty(PROP_ROOT_ID);
- if (id != null) {
- String version = properties.getProperty(PROP_ROOT_VERSION);
- try {
- description.setRoots(new VersionedName[] {new VersionedName(id, version)});
- } catch (IllegalArgumentException e) {
- LogHelper.log(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, "Invalid version in install description: " + version, e)); //$NON-NLS-1$
- }
- }
-
- String rootSpec = properties.getProperty(PROP_ROOTS);
- if (rootSpec != null) {
- String[] rootList = getArrayFromString(rootSpec, ","); //$NON-NLS-1$
- ArrayList roots = new ArrayList(rootList.length);
- for (int i = 0; i < rootList.length; i++) {
- try {
- roots.add(VersionedName.parse(rootList[i]));
- } catch (IllegalArgumentException e) {
- LogHelper.log(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, "Invalid version in install description: " + rootList[i], e)); //$NON-NLS-1$
- }
- }
- if (!roots.isEmpty())
- description.setRoots((VersionedName[]) roots.toArray(new VersionedName[roots.size()]));
- }
- return description;
- }
-
- /**
- * Add all of the given properties to profile properties of the given description
- * after removing the keys known to be for the installer. This allows install descriptions
- * to also set random profile properties.
- * @param description
- * @param properties
- */
- private static void initializeProfileProperties(InstallDescription description, Properties properties) {
- //any remaining properties are profile properties
- Map profileProperties = new HashMap(properties);
- profileProperties.remove(PROP_PROFILE_NAME);
- profileProperties.remove(PROP_ARTIFACT_REPOSITORY);
- profileProperties.remove(PROP_METADATA_REPOSITORY);
- profileProperties.remove(PROP_IS_AUTO_START);
- profileProperties.remove(PROP_LAUNCHER_NAME);
- profileProperties.remove(PROP_AGENT_LOCATION);
- profileProperties.remove(PROP_BUNDLE_LOCATION);
- profileProperties.remove(PROP_ROOT_ID);
- profileProperties.remove(PROP_ROOT_VERSION);
- profileProperties.remove(PROP_ROOTS);
- description.setProfileProperties(profileProperties);
- }
-
- /**
- * Returns an array of URIs from the given comma-separated list
- * of URLs. Returns null if the given spec does not contain any URLs.
- * @param base
- * @return An array of URIs in the given spec, or <code>null</code>
- */
- private static URI[] getURIs(String spec, URI base) {
- String[] urlSpecs = getArrayFromString(spec, ","); //$NON-NLS-1$
- ArrayList result = new ArrayList(urlSpecs.length);
- for (int i = 0; i < urlSpecs.length; i++) {
- try {
- URI uri = URIUtil.fromString(urlSpecs[i]);
- uri = URIUtil.makeAbsolute(uri, base);
- result.add(uri);
- } catch (URISyntaxException e) {
- LogHelper.log(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, "Invalid URL in install description: " + urlSpecs[i], e)); //$NON-NLS-1$
- }
- }
- if (result.isEmpty())
- return null;
- return (URI[]) result.toArray(new URI[result.size()]);
- }
-
- private static void safeClose(InputStream in) {
- try {
- if (in != null)
- in.close();
- } catch (IOException e) {
- //ignore secondary failure during close
- }
- }
-
- /**
- * 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()]);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallUpdateProductOperation.java b/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallUpdateProductOperation.java
deleted file mode 100644
index 2e2245192..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallUpdateProductOperation.java
+++ /dev/null
@@ -1,277 +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
- * Code 9 - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.installer;
-
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.*;
-import org.eclipse.equinox.internal.provisional.p2.director.IDirector;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.installer.IInstallOperation;
-import org.eclipse.equinox.internal.provisional.p2.installer.InstallDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-/**
- * This operation performs installation or update of an Eclipse-based product.
- */
-public class InstallUpdateProductOperation implements IInstallOperation {
-
- private IArtifactRepositoryManager artifactRepoMan;
- private BundleContext bundleContext;
- private IDirector director;
- private final InstallDescription installDescription;
- private boolean isInstall = true;
- private IMetadataRepositoryManager metadataRepoMan;
- private IProfileRegistry profileRegistry;
- private IStatus result;
-
- private ArrayList serviceReferences = new ArrayList();
-
- public InstallUpdateProductOperation(BundleContext context, InstallDescription description) {
- this.bundleContext = context;
- this.installDescription = description;
- }
-
- /**
- * Determine what top level installable units should be installed by the director
- */
- private IInstallableUnit[] computeUnitsToInstall() throws CoreException {
- ArrayList result = new ArrayList();
- VersionedName roots[] = installDescription.getRoots();
- for (int i = 0; i < roots.length; i++) {
- VersionedName root = roots[i];
- IInstallableUnit iu = findUnit(root);
- if (iu != null)
- result.add(iu);
- }
- return (IInstallableUnit[]) result.toArray(new IInstallableUnit[result.size()]);
- }
-
- /**
- * This profile is being updated; return the units to uninstall from the profile.
- */
- private IInstallableUnit[] computeUnitsToUninstall(IProfile p) {
- return (IInstallableUnit[]) p.query(InstallableUnitQuery.ANY, new Collector(), null).toArray(IInstallableUnit.class);
- }
-
- /**
- * Create and return the profile into which units will be installed.
- */
- private IProfile createProfile() throws ProvisionException {
- IProfile profile = getProfile();
- if (profile == null) {
- Map properties = new HashMap();
- properties.put(IProfile.PROP_INSTALL_FOLDER, installDescription.getInstallLocation().toString());
- EnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(InstallerActivator.getDefault().getContext(), EnvironmentInfo.class.getName());
- String env = "osgi.os=" + info.getOS() + ",osgi.ws=" + info.getWS() + ",osgi.arch=" + info.getOSArch(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- properties.put(IProfile.PROP_ENVIRONMENTS, env);
- properties.put(IProfile.PROP_NAME, installDescription.getProductName());
- properties.putAll(installDescription.getProfileProperties());
- IPath location = installDescription.getBundleLocation();
- if (location != null)
- properties.put(IProfile.PROP_CACHE, location.toOSString());
- profile = profileRegistry.addProfile(getProfileId(), properties);
- }
- return profile;
- }
-
- /**
- * Performs the actual product install or update.
- */
- private void doInstall(SubMonitor monitor) throws CoreException {
- prepareMetadataRepositories();
- prepareArtifactRepositories();
- IProfile p = createProfile();
- IInstallableUnit[] toInstall = computeUnitsToInstall();
- monitor.worked(5);
-
- IStatus s;
- ProfileChangeRequest request = new ProfileChangeRequest(p);
- if (isInstall) {
- monitor.setTaskName(NLS.bind(Messages.Op_Installing, installDescription.getProductName()));
- request.addInstallableUnits(toInstall);
- s = director.provision(request, null, monitor.newChild(90));
- } else {
- monitor.setTaskName(NLS.bind(Messages.Op_Updating, installDescription.getProductName()));
- IInstallableUnit[] toUninstall = computeUnitsToUninstall(p);
- request.removeInstallableUnits(toUninstall);
- request.addInstallableUnits(toInstall);
- s = director.provision(request, null, monitor.newChild(90));
- }
- if (!s.isOK())
- throw new CoreException(s);
- }
-
- /**
- * Returns an exception of severity error with the given error message.
- */
- private CoreException fail(String message) {
- return fail(message, null);
- }
-
- /**
- * Returns an exception of severity error with the given error message.
- */
- private CoreException fail(String message, Throwable throwable) {
- return new CoreException(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, message, throwable));
- }
-
- /**
- * Finds and returns the installable unit with the given id, and optionally the
- * given version.
- */
- private IInstallableUnit findUnit(VersionedName spec) throws CoreException {
- String id = spec.getId();
- if (id == null)
- throw fail(Messages.Op_NoId);
- Version version = spec.getVersion();
- VersionRange range = VersionRange.emptyRange;
- if (version != null && !version.equals(Version.emptyVersion))
- range = new VersionRange(version, true, version, true);
- Query query = new InstallableUnitQuery(id, range);
- Collector collector = new Collector();
- Iterator matches = metadataRepoMan.query(query, collector, 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)
- throw fail(Messages.Op_IUNotFound + id);
- return newest;
- }
-
- /**
- * Returns the profile being installed into.
- */
- private IProfile getProfile() {
- return profileRegistry.getProfile(getProfileId());
- }
-
- /**
- * Returns the id of the profile to use for install/update based on this operation's install description.
- */
- private String getProfileId() {
- IPath location = installDescription.getInstallLocation();
- if (location != null)
- return location.toString();
- return installDescription.getProductName();
- }
-
- /**
- * Returns the result of the install operation, or <code>null</code> if
- * no install operation has been run.
- */
- public IStatus getResult() {
- return result;
- }
-
- private Object getService(String name) throws CoreException {
- ServiceReference ref = bundleContext.getServiceReference(name);
- if (ref == null)
- throw fail(Messages.Op_NoService + name);
- Object service = bundleContext.getService(ref);
- if (service == null)
- throw fail(Messages.Op_NoServiceImpl + name);
- serviceReferences.add(ref);
- return service;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.installer.IInstallOperation#install(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus install(IProgressMonitor pm) {
- SubMonitor monitor = SubMonitor.convert(pm, Messages.Op_Preparing, 100);
- try {
- try {
- preInstall();
- isInstall = getProfile() == null;
- doInstall(monitor);
- result = new Status(IStatus.OK, InstallerActivator.PI_INSTALLER, isInstall ? Messages.Op_InstallComplete : Messages.Op_UpdateComplete, null);
- monitor.setTaskName(Messages.Op_Cleanup);
- } finally {
- postInstall();
- }
- } catch (CoreException e) {
- result = e.getStatus();
- } finally {
- monitor.done();
- }
- return result;
- }
-
- /**
- * Returns whether this operation represents the product being installed
- * for the first time, in a new profile.
- */
- public boolean isFirstInstall() {
- return isInstall;
- }
-
- private void postInstall() {
- for (Iterator it = serviceReferences.iterator(); it.hasNext();) {
- ServiceReference sr = (ServiceReference) it.next();
- bundleContext.ungetService(sr);
- }
- serviceReferences.clear();
- }
-
- private void preInstall() throws CoreException {
- //obtain required services
- serviceReferences.clear();
- director = (IDirector) getService(IDirector.class.getName());
- metadataRepoMan = (IMetadataRepositoryManager) getService(IMetadataRepositoryManager.class.getName());
- artifactRepoMan = (IArtifactRepositoryManager) getService(IArtifactRepositoryManager.class.getName());
- profileRegistry = (IProfileRegistry) getService(IProfileRegistry.class.getName());
- }
-
- private void prepareArtifactRepositories() throws ProvisionException {
- URI[] repos = installDescription.getArtifactRepositories();
- if (repos == null)
- return;
-
- // Repositories must be registered before they are loaded
- // This is to avoid them being possibly overridden with the configuration as a referenced repository
- for (int i = 0; i < repos.length; i++) {
- artifactRepoMan.addRepository(repos[i]);
- artifactRepoMan.loadRepository(repos[i], null);
- }
- }
-
- private void prepareMetadataRepositories() throws ProvisionException {
- URI[] repos = installDescription.getMetadataRepositories();
- if (repos == null)
- return;
-
- // Repositories must be registered before they are loaded
- // This is to avoid them being possibly overridden with the configuration as a referenced repository
- for (int i = 0; i < repos.length; i++) {
- metadataRepoMan.addRepository(repos[i]);
- metadataRepoMan.loadRepository(repos[i], null);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallerActivator.java b/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallerActivator.java
deleted file mode 100644
index 57a66c2db..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallerActivator.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.p2.installer;
-
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class InstallerActivator implements BundleActivator {
- // The plug-in ID
- public static final String PI_INSTALLER = "org.eclipse.equinox.p2.installer"; //$NON-NLS-1$
- // The shared instance
- private static InstallerActivator plugin;
-
- private BundleContext context;
-
- private PackageAdmin packageAdmin = null;
-
- private ServiceReference packageAdminRef = null;
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static InstallerActivator getDefault() {
- return plugin;
- }
-
- /**
- * The constructor
- */
- public InstallerActivator() {
- //nothing to do
- }
-
- public 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;
- }
-
- /**
- * Returns the bundle context for this bundle.
- * @return the bundle context
- */
- public BundleContext getContext() {
- return context;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext aContext) throws Exception {
- this.context = aContext;
- plugin = this;
- packageAdminRef = context.getServiceReference(PackageAdmin.class.getName());
- packageAdmin = (PackageAdmin) context.getService(packageAdminRef);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext aContext) throws Exception {
- context.ungetService(packageAdminRef);
- packageAdmin = null;
- packageAdminRef = null;
- plugin = null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/Messages.java b/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/Messages.java
deleted file mode 100644
index 803a99c19..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/Messages.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.internal.p2.installer;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- *
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.installer.messages"; //$NON-NLS-1$
- public static String Advisor_Canceled;
- public static String Advisor_Preparing;
- public static String App_Error;
- public static String App_FailedStart;
- public static String App_InvalidSite;
- public static String App_LaunchFailed;
- public static String App_NoInstallLocation;
- public static String Dialog_BrowseButton;
- public static String Dialog_CancelButton;
- public static String Dialog_CloseButton;
- public static String Dialog_ExplainShared;
- public static String Dialog_ExplainStandalone;
- public static String Dialog_InstallButton;
- public static String Dialog_InstalllingProgress;
- public static String Dialog_InternalError;
- public static String Dialog_LaunchButton;
- public static String Dialog_LayoutGroup;
- public static String Dialog_LocationField;
- public static String Dialog_LocationLabel;
- public static String Dialog_LocationPrompt;
- public static String Dialog_ManualProxyCheckBox;
- public static String Dialog_PromptStart;
- public static String Dialog_ProxiesGroup;
- public static String Dialog_SelectLocation;
- public static String Dialog_SettingsButton;
- public static String Dialog_SharedButton;
- public static String Dialog_ShellTitle;
- public static String Dialog_StandaloneButton;
- public static String Op_Cleanup;
- public static String Op_InstallComplete;
- public static String Op_Installing;
- public static String Op_IUNotFound;
- public static String Op_NoId;
- public static String Op_NoService;
- public static String Op_NoServiceImpl;
- public static String Op_Preparing;
- public static String Op_UpdateComplete;
- public static String Op_Updating;
- public static String ProxiesDialog_DialogTitle;
- public static String ProxiesDialog_EmptyHostMessage;
- public static String ProxiesDialog_EmptyPasswordMessage;
- public static String ProxiesDialog_EmptyProtMessage;
- public static String ProxiesDialog_EmptyUserMessage;
- public static String ProxiesDialog_FailedToReadProxySettingsMessage;
- public static String ProxiesDialog_FailedTorSetProxySettings;
- public static String ProxiesDialog_FailedToSetProxyMessage;
- public static String ProxiesDialog_HostLabel;
- public static String ProxiesDialog_InvalitHostMessage;
- public static String ProxiesDialog_NegativValue;
- public static String ProxiesDialog_OkLabel;
- public static String ProxiesDialog_PasswordLabel;
- public static String ProxiesDialog_PortLabel;
- public static String ProxiesDialog_ServiceNotAvailableMessage;
- public static String ProxiesDialog_ShemaLabel;
- public static String ProxiesDialog_StatusPrefix;
- public static String ProxiesDialog_UnknownProxyTypeMessage;
- public static String ProxiesDialog_UserLabel;
- public static String ProxiesDialog_WrongFormat;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- //nothing to do
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/messages.properties b/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/messages.properties
deleted file mode 100644
index 67dc69364..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/messages.properties
+++ /dev/null
@@ -1,68 +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
-###############################################################################
-Advisor_Canceled=Install canceled
-Advisor_Preparing=Preparing to install
-App_Error=An error occurred during installation
-App_FailedStart=Unable to start provisioning infrastructure
-App_InvalidSite=Invalid install site:
-App_LaunchFailed=Failed to launch the product:
-App_NoInstallLocation=Install failed because the install location was not set
-Dialog_BrowseButton=&Browse...
-Dialog_CancelButton=&Cancel
-Dialog_CloseButton=&Close
-Dialog_ExplainShared=In a shared install, common components are stored together, allowing them to be shared across multiple products.
-Dialog_ExplainStandalone=In a stand-alone install, each product is installed in its own directory without any sharing between products
-Dialog_InstallButton=&Install
-Dialog_InstalllingProgress=Installing...
-Dialog_InternalError=An internal error has occurred
-Dialog_LaunchButton=&Launch
-Dialog_LayoutGroup=Layout
-Dialog_LocationField=Location
-Dialog_LocationLabel=Select the product install directory:
-Dialog_LocationPrompt=Select where you want {0} to be installed
-Dialog_ManualProxyCheckBox=Use manual proxy settings
-Dialog_PromptStart=Install complete. Do you want to start {0} immediately?
-Dialog_ProxiesGroup=Proxy Settings
-Dialog_SelectLocation=Select the install location
-Dialog_SettingsButton=Settings...
-Dialog_SharedButton=&Shared install
-Dialog_ShellTitle=Installer
-Dialog_StandaloneButton=Stand-&alone install
-Op_Cleanup=Some final housekeeping
-Op_InstallComplete=Install complete
-Op_Installing=Installing {0}
-Op_IUNotFound=Installable unit not found:
-Op_NoId=Installable unit id not specified
-Op_NoService=Install requires a service that is not available:
-Op_NoServiceImpl=Install requires a service implementation that is not available:
-Op_Preparing=Preparing to install
-Op_UpdateComplete=Update complete
-Op_Updating=Updating {0}
-ProxiesDialog_DialogTitle=Proxy Settings Dialog
-ProxiesDialog_EmptyHostMessage=Empty host
-ProxiesDialog_EmptyPasswordMessage=Empty password
-ProxiesDialog_EmptyProtMessage=Empty port
-ProxiesDialog_EmptyUserMessage=Empty user
-ProxiesDialog_FailedToReadProxySettingsMessage=Failed to read proxy settings
-ProxiesDialog_FailedTorSetProxySettings=Failed to set proxy settings.
-ProxiesDialog_FailedToSetProxyMessage=Failed to set proxy
-ProxiesDialog_HostLabel=Host:
-ProxiesDialog_InvalitHostMessage=Invalid host
-ProxiesDialog_NegativValue=Proxy value can not be negativ
-ProxiesDialog_OkLabel=OK
-ProxiesDialog_PasswordLabel=Password:
-ProxiesDialog_PortLabel=Port:
-ProxiesDialog_ServiceNotAvailableMessage=Failed to set proxy settings. Service not available
-ProxiesDialog_ShemaLabel=Schema:
-ProxiesDialog_StatusPrefix=Status:
-ProxiesDialog_UnknownProxyTypeMessage=Not applied because proxy type unknown.
-ProxiesDialog_UserLabel=User:
-ProxiesDialog_WrongFormat=Wrong proxy format
diff --git a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/InstallDialog.java b/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/InstallDialog.java
deleted file mode 100644
index e744396cc..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/InstallDialog.java
+++ /dev/null
@@ -1,566 +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.installer.ui;
-
-import org.eclipse.equinox.internal.p2.installer.Messages;
-
-import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.installer.*;
-import org.eclipse.equinox.internal.provisional.p2.installer.IInstallOperation;
-import org.eclipse.equinox.internal.provisional.p2.installer.InstallDescription;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * The install wizard that drives the install. This dialog is used for user input
- * prior to the install, progress feedback during the install, and displaying results
- * at the end of the install.
- */
-public class InstallDialog {
- /**
- * A progress monitor implementation that asynchronously updates the progress bar.
- */
- class Monitor implements IProgressMonitor {
-
- boolean canceled = false, running = false;
- String subTaskName = ""; //$NON-NLS-1$
- double totalWork, usedWork;
-
- public void beginTask(final String name, final int work) {
- totalWork = work;
- running = true;
- update();
- }
-
- public void done() {
- running = false;
- usedWork = totalWork;
- update();
- }
-
- public void internalWorked(double work) {
- usedWork = Math.min(usedWork + work, totalWork);
- update();
- }
-
- public boolean isCanceled() {
- return returnCode == CANCEL;
- }
-
- public void setCanceled(boolean value) {
- returnCode = CANCEL;
- }
-
- public void setTaskName(String name) {
- subTaskName = name == null ? "" : name; //$NON-NLS-1$
- update();
- }
-
- public void subTask(String name) {
- subTaskName = name == null ? "" : name; //$NON-NLS-1$
- update();
- }
-
- void update() {
- Display display = getDisplay();
- if (display == null)
- return;
- display.asyncExec(new Runnable() {
- public void run() {
- Shell theShell = getShell();
- if (theShell == null || theShell.isDisposed())
- return;
- progressSubTask.setText(shorten(subTaskName));
- if (progressBar.isDisposed())
- return;
- progressBar.setVisible(running);
- progressBar.setMaximum(1000);
- progressBar.setMinimum(0);
- int value = (int) (usedWork / totalWork * 1000);
- if (progressBar.getSelection() < value)
- progressBar.setSelection(value);
- }
-
- private String shorten(String text) {
- if (text.length() <= 64)
- return text;
- int len = text.length();
- return text.substring(0, 30) + "..." + text.substring(len - 30, len); //$NON-NLS-1$
- }
- });
- }
-
- public void worked(int work) {
- internalWorked(work);
- }
- }
-
- /**
- * Encapsulates a result passed from an operation running in a background
- * thread to the UI thread.
- */
- static class Result {
- private boolean done;
- private IStatus status;
-
- synchronized void done() {
- done = true;
- }
-
- synchronized void failed(Throwable t) {
- String msg = Messages.Dialog_InternalError;
- status = new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, msg, t);
- }
-
- synchronized IStatus getStatus() {
- return status;
- }
-
- synchronized boolean isDone() {
- return done;
- }
-
- public void setStatus(IStatus status) {
- this.status = status;
- }
- }
-
- private static final int BUTTON_WIDTH = 100;
- private static final int CANCEL = 1;
- private static final int OK = 0;
-
- private Button cancelButton;
- private Composite contents;
- private Button okButton;
-
- ProgressBar progressBar;
- Label progressSubTask;
- Label progressTask;
-
- int returnCode = -1;
-
- private Button settingsBrowse;
- private Label settingsExplain;
- private Composite settingsGroup;
- private Text settingsLocation;
- private Label settingsLocationLabel;
- private Button settingsShared;
- private Button settingsStandalone;
-
- private Shell shell;
-
- private boolean waitingForClose = false;
- private Button proxySettingsButton;
- private Button manualProxyTypeCheckBox;
-
- /**
- * Creates and opens a progress monitor dialog.
- */
- public InstallDialog() {
- createShell();
- progressTask = new Label(contents, SWT.WRAP | SWT.LEFT);
- progressTask.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- createInstallSettingsControls();
- createProgressControls();
- createButtonBar();
-
- shell.pack();
- shell.layout();
- shell.open();
- }
-
- protected void browsePressed() {
- DirectoryDialog dirDialog = new DirectoryDialog(shell);
- dirDialog.setMessage(Messages.Dialog_SelectLocation);
- String location = dirDialog.open();
- if (location == null)
- location = ""; //$NON-NLS-1$
- settingsLocation.setText(location);
- validateInstallSettings();
- }
-
- protected void buttonPressed(int code) {
- returnCode = code;
- if (waitingForClose)
- close();
- //grey out the cancel button to indicate the request was heard
- if (code == CANCEL && !cancelButton.isDisposed())
- cancelButton.setEnabled(false);
- }
-
- public void close() {
- if (shell == null)
- return;
- if (!shell.isDisposed())
- shell.dispose();
- shell = null;
- }
-
- private void createButtonBar() {
- Composite buttonBar = new Composite(contents, SWT.NONE);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalAlignment = SWT.RIGHT;
- buttonBar.setLayoutData(data);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = true;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- buttonBar.setLayout(layout);
-
- okButton = new Button(buttonBar, SWT.PUSH);
- data = new GridData(BUTTON_WIDTH, SWT.DEFAULT);
- okButton.setLayoutData(data);
- okButton.setText(Messages.Dialog_InstallButton);
- okButton.setEnabled(false);
- okButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- buttonPressed(OK);
- }
- });
-
- cancelButton = new Button(buttonBar, SWT.PUSH);
- data = new GridData(BUTTON_WIDTH, SWT.DEFAULT);
- cancelButton.setLayoutData(data);
- cancelButton.setText(Messages.Dialog_CancelButton);
- cancelButton.setEnabled(false);
- cancelButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- buttonPressed(CANCEL);
- }
- });
- }
-
- /**
- * Creates the controls to prompt for the agent and install locations.
- */
- private void createInstallSettingsControls() {
- settingsGroup = new Composite(contents, SWT.NONE);
- GridLayout layout = new GridLayout();
- settingsGroup.setLayout(layout);
- settingsGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Listener validateListener = new Listener() {
- public void handleEvent(Event event) {
- validateInstallSettings();
- }
- };
-
- //The group asking for the product install directory
- Group installLocationGroup = new Group(settingsGroup, SWT.NONE);
- installLocationGroup.setLayout(new GridLayout());
- installLocationGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
- installLocationGroup.setText(Messages.Dialog_LocationField);
- settingsLocationLabel = new Label(installLocationGroup, SWT.NONE);
- settingsLocationLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- settingsLocationLabel.setText(Messages.Dialog_LocationLabel);
-
- //The sub-group with text entry field and browse button
- Composite locationFieldGroup = new Composite(installLocationGroup, SWT.NONE);
- locationFieldGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
- layout = new GridLayout();
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = false;
- locationFieldGroup.setLayout(layout);
- settingsLocation = new Text(locationFieldGroup, SWT.SINGLE | SWT.BORDER);
- settingsLocation.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- settingsLocation.addListener(SWT.Modify, validateListener);
- settingsLocation.addKeyListener(new KeyAdapter() {
- public void keyReleased(KeyEvent event) {
- if (event.character == SWT.CR || event.character == SWT.KEYPAD_CR)
- buttonPressed(OK);
- }
- });
- settingsBrowse = new Button(locationFieldGroup, SWT.PUSH);
- settingsBrowse.setLayoutData(new GridData(BUTTON_WIDTH, SWT.DEFAULT));
- settingsBrowse.setText(Messages.Dialog_BrowseButton);
- settingsBrowse.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- browsePressed();
- }
- });
-
- //Create the radio button group asking for the kind of install (shared vs. standalone)
- Group installKindGroup = new Group(settingsGroup, SWT.NONE);
- installKindGroup.setText(Messages.Dialog_LayoutGroup);
- installKindGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
- installKindGroup.setLayout(new GridLayout());
- settingsStandalone = new Button(installKindGroup, SWT.RADIO);
- settingsStandalone.setText(Messages.Dialog_StandaloneButton);
- settingsStandalone.addListener(SWT.Selection, validateListener);
- settingsStandalone.setSelection(true);
- settingsShared = new Button(installKindGroup, SWT.RADIO);
- settingsShared.setText(Messages.Dialog_SharedButton);
- settingsShared.addListener(SWT.Selection, validateListener);
- settingsExplain = new Label(installKindGroup, SWT.WRAP);
- GridData data = new GridData(SWT.DEFAULT, 40);
- data.grabExcessHorizontalSpace = true;
- data.horizontalAlignment = GridData.FILL;
- settingsExplain.setLayoutData(data);
- settingsExplain.setText(Messages.Dialog_ExplainStandalone);
-
- //The group asking for the product proxy configuration
- Group proxySettingsGroup = new Group(settingsGroup, SWT.NONE);
- proxySettingsGroup.setLayout(new GridLayout());
- proxySettingsGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
- proxySettingsGroup.setText(Messages.Dialog_ProxiesGroup);
-
- //The sub-group with check box, label entry field and settings button
- Composite proxySettingsFieldGroup = new Composite(proxySettingsGroup, SWT.NONE);
- proxySettingsFieldGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
- layout = new GridLayout();
- layout.numColumns = 3;
- layout.makeColumnsEqualWidth = false;
- proxySettingsFieldGroup.setLayout(layout);
-
- manualProxyTypeCheckBox = new Button(proxySettingsFieldGroup, SWT.CHECK);
- manualProxyTypeCheckBox.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- manualProxyTypeCheckBox.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- IProxyService proxies = (IProxyService) InstallApplication.getService(InstallerActivator.getDefault().getContext(), IProxyService.class.getName());
- if (proxies != null) {
- //When the manual check box is selected the system properties should be disabled.
- //This cases the net component to switch to manual proxy provider.
- proxies.setSystemProxiesEnabled(!manualProxyTypeCheckBox.getSelection());
- if (proxySettingsButton != null) {
- proxySettingsButton.setEnabled(manualProxyTypeCheckBox.getSelection());
- }
- } else {
- openMessage(Messages.ProxiesDialog_ServiceNotAvailableMessage, SWT.ICON_ERROR | SWT.OK);
- }
- }
- });
- manualProxyTypeCheckBox.setText(Messages.Dialog_ManualProxyCheckBox);
- proxySettingsButton = new Button(proxySettingsFieldGroup, SWT.PUSH);
- proxySettingsButton.setLayoutData(new GridData(BUTTON_WIDTH, SWT.DEFAULT));
- proxySettingsButton.setText(Messages.Dialog_SettingsButton);
- proxySettingsButton.setEnabled(manualProxyTypeCheckBox.getSelection());
- proxySettingsButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- IProxyService proxies = (IProxyService) InstallApplication.getService(InstallerActivator.getDefault().getContext(), IProxyService.class.getName());
- if (proxies != null) {
- ProxiesDialog proxiesDialog = new ProxiesDialog(proxies);
- proxiesDialog.open();
- } else {
- openMessage(Messages.ProxiesDialog_ServiceNotAvailableMessage, SWT.ICON_ERROR | SWT.OK);
- }
- }
- });
-
- //make the entire group invisible until we actually need to prompt for locations
- settingsGroup.setVisible(false);
- }
-
- private void createProgressControls() {
- progressBar = new ProgressBar(contents, SWT.HORIZONTAL | SWT.SMOOTH);
- progressBar.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- progressBar.setVisible(false);
- progressSubTask = new Label(contents, SWT.WRAP | SWT.LEFT);
- progressSubTask.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- }
-
- private void createShell() {
- shell = new Shell(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.MIN | SWT.RESIZE);
- shell.setBounds(300, 200, 600, 400);
- shell.setText(Messages.Dialog_ShellTitle);
- shell.setLayout(new FillLayout());
- contents = new Composite(shell, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 15;
- layout.marginHeight = 15;
- contents.setLayout(layout);
- }
-
- public Display getDisplay() {
- Shell theShell = shell;
- if (theShell == null || theShell.isDisposed())
- return null;
- return theShell.getDisplay();
- }
-
- public Shell getShell() {
- return shell;
- }
-
- /**
- * Asks the user to close the dialog, and returns once the dialog is closed.
- */
- public void promptForClose(String message) {
- Display display = getDisplay();
- if (display == null)
- return;
- progressTask.setText(message);
- progressSubTask.setText(""); //$NON-NLS-1$
- progressBar.setVisible(false);
- okButton.setVisible(false);
- cancelButton.setText(Messages.Dialog_CloseButton);
- cancelButton.setEnabled(true);
- waitingForClose = true;
- while (shell != null && !shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- }
-
- public boolean promptForLaunch(InstallDescription description) {
- Display display = getDisplay();
- if (display == null)
- return false;
- progressTask.setText(NLS.bind(Messages.Dialog_PromptStart, description.getProductName()));
- progressSubTask.setText(""); //$NON-NLS-1$
- progressBar.setVisible(false);
- okButton.setText(Messages.Dialog_LaunchButton);
- okButton.setVisible(true);
- cancelButton.setText(Messages.Dialog_CloseButton);
- cancelButton.setVisible(true);
- waitingForClose = true;
- while (shell != null && !shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- return returnCode == OK;
- }
-
- /**
- * Prompts the user for the install location, and whether the install should
- * be shared or standalone.
- */
- public void promptForLocations(InstallDescription description) {
- progressTask.setText(NLS.bind(Messages.Dialog_LocationPrompt, description.getProductName()));
- okButton.setText(Messages.Dialog_InstallButton);
- okButton.setVisible(true);
- cancelButton.setText(Messages.Dialog_CancelButton);
- cancelButton.setEnabled(true);
- settingsGroup.setVisible(true);
- validateInstallSettings();
- Display display = getDisplay();
- returnCode = -1;
- while (returnCode == -1 && shell != null && !shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- if (returnCode == CANCEL)
- close();
- if (shell == null || shell.isDisposed())
- throw new OperationCanceledException();
- setInstallSettingsEnablement(false);
- Path location = new Path(settingsLocation.getText());
- description.setInstallLocation(location);
- if (settingsStandalone.getSelection()) {
- //force everything to be co-located regardless of what values were set in the install description
- description.setAgentLocation(location.append("p2")); //$NON-NLS-1$
- description.setBundleLocation(location);
- } else {
- if (description.getAgentLocation() == null)
- description.setAgentLocation(new Path(System.getProperty("user.home")).append(".p2/")); //$NON-NLS-1$ //$NON-NLS-2$
- //use bundle pool location specified in install description
- //by default this will be null, causing the bundle pool to be nested in the agent location
- }
- okButton.setVisible(false);
- }
-
- /**
- * This method runs the given operation in the context of a progress dialog.
- * The dialog is opened automatically prior to starting the operation, and closed
- * automatically upon completion.
- * <p>
- * This method must be called from the UI thread. The operation will be
- * executed outside the UI thread.
- *
- * @param operation The operation to run
- * @return The result of the operation
- */
- public IStatus run(final IInstallOperation operation) {
- final Result result = new Result();
- Thread thread = new Thread() {
- public void run() {
- try {
- result.setStatus(operation.install(new Monitor()));
- } catch (ThreadDeath t) {
- //must rethrow or the thread won't die
- throw t;
- } catch (RuntimeException t) {
- result.failed(t);
- } catch (Error t) {
- result.failed(t);
- } finally {
- Display display = getDisplay();
- //ensure all events from the operation have run
- if (display != null) {
- display.syncExec(new Runnable() {
- public void run() {
- //do nothing
- }
- });
- }
- result.done();
- //wake the event loop
- if (display != null)
- display.wake();
- }
- }
- };
- waitingForClose = false;
- progressTask.setText(Messages.Dialog_InstalllingProgress);
- cancelButton.setText(Messages.Dialog_CancelButton);
- thread.start();
- Display display = getDisplay();
- while (!result.isDone()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- return result.getStatus();
- }
-
- private void setInstallSettingsEnablement(boolean value) {
- settingsLocation.setEnabled(value);
- settingsShared.setEnabled(value);
- settingsStandalone.setEnabled(value);
- settingsGroup.setEnabled(value);
- settingsExplain.setEnabled(value);
- settingsBrowse.setEnabled(value);
- settingsLocationLabel.setEnabled(value);
- }
-
- public void setMessage(String message) {
- if (progressTask != null && !progressTask.isDisposed())
- progressTask.setText(message);
- }
-
- /**
- * Validates that the user has correctly entered all required install settings.
- */
- void validateInstallSettings() {
- boolean enabled = settingsStandalone.getSelection() || settingsShared.getSelection();
- enabled &= Path.ROOT.isValidPath(settingsLocation.getText());
- if (enabled) {
- //make sure the install location is an absolute path
- IPath location = new Path(settingsLocation.getText());
- enabled &= location.isAbsolute();
- }
- okButton.setEnabled(enabled);
-
- if (settingsStandalone.getSelection())
- settingsExplain.setText(Messages.Dialog_ExplainStandalone);
- else
- settingsExplain.setText(Messages.Dialog_ExplainShared);
- }
-
- private void openMessage(String msg, int style) {
- MessageBox messageBox = new MessageBox(Display.getDefault().getActiveShell(), style);
- messageBox.setMessage(msg);
- messageBox.open();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/ProxiesDialog.java b/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/ProxiesDialog.java
deleted file mode 100644
index eaa0be727..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/ProxiesDialog.java
+++ /dev/null
@@ -1,312 +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:
- * EclipseSource
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.installer.ui;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.core.net.proxy.IProxyData;
-import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.installer.InstallerActivator;
-import org.eclipse.equinox.internal.p2.installer.Messages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-public final class ProxiesDialog {
-
- private IProxyData data;
- private Label typeLabel;
- private Combo typeCombo;
- private Label hostLabel;
- private Text hostText;
- private Label portLabel;
- private Text portText;
-
- private Label userIdLabel;
- private Text userIdText;
- private Label passwordLabel;
- private Text passwordText;
- private Button okButton;
- private Button cancelButton;
- private final IProxyService service;
- private Shell shell;
- private List types;
- private Label statuslabel;
-
- public ProxiesDialog(IProxyService service) {
- if (service == null) {
- throw new IllegalArgumentException();
- }
-
- this.service = service;
- initTypes();
- }
-
- public IProxyData getValue() {
- return data;
- }
-
- public void open() {
- this.data = service.getProxyData(IProxyData.HTTP_PROXY_TYPE);
- if (data == null) {
- openMessage(Messages.ProxiesDialog_FailedToReadProxySettingsMessage, SWT.ICON_ERROR | SWT.OK);
- return;
- }
-
- Shell activeShell = Display.getDefault().getActiveShell();
- shell = new Shell(activeShell, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.MIN | SWT.RESIZE);
- //Computes the bounds
- Rectangle bounds = null;
- if (activeShell == null) {
- bounds = new Rectangle(300, 200, 600, 400);
- } else {
- Rectangle parentBounds = activeShell.getBounds();
- bounds = new Rectangle(parentBounds.x + 100, parentBounds.y + 100, 600, 400);
- }
- shell.setBounds(bounds);
-
- shell.setText(Messages.ProxiesDialog_DialogTitle);
- shell.setLayout(new GridLayout());
-
- createDialogArea(shell);
- createButtonBar(shell);
-
- shell.pack();
- shell.open();
- }
-
- protected Control createDialogArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout(4, false));
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL));
-
- typeLabel = new Label(composite, SWT.NONE);
- typeLabel.setText(Messages.ProxiesDialog_ShemaLabel);
- typeLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1));
- typeCombo = new Combo(composite, SWT.BORDER);
- typeCombo.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 3, 1));
- //Currently only these three proxy types are supported.
- for (int i = 0; i < types.size(); i++) {
- typeCombo.add((String) types.get(i));
- }
-
- typeCombo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- String selection = typeCombo.getText();
- IProxyData selectedProxy = service.getProxyData(selection);
- if (selectedProxy == null) {
- updateStatus(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, IStatus.OK, Messages.ProxiesDialog_UnknownProxyTypeMessage, null));
- } else {
- data = selectedProxy;
- applyData();
- }
- }
- });
-
- hostLabel = new Label(composite, SWT.NONE);
- hostLabel.setText(Messages.ProxiesDialog_HostLabel);
- hostLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1));
- hostText = new Text(composite, SWT.BORDER);
- GridData gdata = new GridData(SWT.FILL, SWT.TOP, true, false);
- gdata.widthHint = 250;
- hostText.setLayoutData(gdata);
-
- portLabel = new Label(composite, SWT.NONE);
- portLabel.setText(Messages.ProxiesDialog_PortLabel);
- portText = new Text(composite, SWT.BORDER);
- gdata = new GridData();
- gdata.widthHint = 30;
- portText.setLayoutData(gdata);
-
- userIdLabel = new Label(composite, SWT.NONE);
- userIdLabel.setText(Messages.ProxiesDialog_UserLabel);
- userIdLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1));
- userIdText = new Text(composite, SWT.BORDER);
- userIdText.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 3, 1));
-
- passwordLabel = new Label(composite, SWT.NONE);
- passwordLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, true, 1, 1));
- passwordLabel.setText(Messages.ProxiesDialog_PasswordLabel);
- passwordText = new Text(composite, SWT.BORDER);
- passwordText.setEchoChar('*');
- passwordText.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true, 3, 1));
-
- ModifyListener validationListener = new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- updateStatus();
- }
- };
- typeCombo.addModifyListener(validationListener);
- hostText.addModifyListener(validationListener);
- portText.addModifyListener(validationListener);
- userIdText.addModifyListener(validationListener);
- passwordText.addModifyListener(validationListener);
-
- //Initialize the UI with the selected data
- applyData();
- hostText.setFocus();
- updateStatus();
- return composite;
- }
-
- private void createButtonBar(Composite parent) {
- Composite buttonBar = new Composite(parent, SWT.NONE);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.horizontalAlignment = SWT.RIGHT;
- buttonBar.setLayoutData(gridData);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- layout.makeColumnsEqualWidth = false;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- buttonBar.setLayout(layout);
-
- statuslabel = new Label(buttonBar, SWT.NONE);
- gridData = new GridData(300, SWT.DEFAULT);
- statuslabel.setLayoutData(gridData);
-
- okButton = new Button(buttonBar, SWT.PUSH);
- gridData = new GridData(100, SWT.DEFAULT);
- okButton.setLayoutData(gridData);
- okButton.setText(Messages.ProxiesDialog_OkLabel);
- okButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- okPressed();
- shell.dispose();
- }
- });
-
- cancelButton = new Button(buttonBar, SWT.PUSH);
- cancelButton.setLayoutData(gridData);
- cancelButton.setText(Messages.Dialog_CancelButton);
- cancelButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- shell.dispose();
- }
- });
- }
-
- public void create() {
- validateHostName();
- }
-
- private String toString(String str) {
- return str == null ? "" : str; //$NON-NLS-1$
- }
-
- private void applyData() {
- typeCombo.setText(toString(data.getType()));
- hostText.setText(toString(data.getHost()));
- if (data.getPort() != -1) {
- portText.setText(toString(Integer.toString(data.getPort())));
- } else {
- portText.setText(""); //$NON-NLS-1$
- }
- userIdText.setText(toString(data.getUserId()));
- passwordText.setText(toString(data.getPassword()));
- }
-
- private boolean validateHostName() {
- try {
- new URI(hostText.getText());
- } catch (URISyntaxException e) {
- updateStatus(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, IStatus.OK, Messages.ProxiesDialog_InvalitHostMessage, null));
- return false;
- }
- return true;
- }
-
- protected void okPressed() {
- data.setHost(hostText.getText());
- data.setPort(Integer.parseInt(portText.getText()));
- data.setUserid(userIdText.getText());
- data.setPassword(passwordText.getText());
- try {
- if (service != null) {
- service.setProxyData(new IProxyData[] {data});
- } else {
- openMessage(Messages.ProxiesDialog_ServiceNotAvailableMessage, SWT.ICON_ERROR | SWT.OK);
- }
- } catch (Exception e) {
- openMessage(Messages.ProxiesDialog_FailedTorSetProxySettings + e.getLocalizedMessage(), SWT.ICON_ERROR | SWT.OK);
- }
- }
-
- protected void updateStatus() {
- if (!validateHostName()) {
- return;
- }
- if (hostText.getText().length() == 0) {
- updateStatus(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, IStatus.OK, Messages.ProxiesDialog_EmptyHostMessage, null));
- return;
- }
-
- if (userIdText.getText().length() == 0) {
- updateStatus(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, IStatus.OK, Messages.ProxiesDialog_EmptyUserMessage, null));
- return;
- }
-
- if (passwordText.getText().length() == 0) {
- updateStatus(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, IStatus.OK, Messages.ProxiesDialog_EmptyPasswordMessage, null));
- return;
- }
-
- try {
- //Port checks
- String portAsString = portText.getText();
- if (portAsString == null || portAsString.length() == 0) {
- updateStatus(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, IStatus.OK, Messages.ProxiesDialog_EmptyProtMessage, null));
- return;
- }
- int port = Integer.parseInt(portAsString);
- if (port < 0) {
- updateStatus(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, IStatus.OK, Messages.ProxiesDialog_NegativValue, null));
- return;
- }
- } catch (NumberFormatException e) {
- updateStatus(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, IStatus.OK, Messages.ProxiesDialog_WrongFormat, null));
- return;
- }
- updateStatus(Status.OK_STATUS);
- }
-
- private void updateStatus(IStatus status) {
-
- if (okButton != null) {
- okButton.setEnabled(status.isOK());
- }
- if (statuslabel != null) {
- String statusText = status.isOK() ? "" : Messages.ProxiesDialog_StatusPrefix + status.getMessage(); //$NON-NLS-1$
- statuslabel.setText(statusText);
- }
- }
-
- private void openMessage(String msg, int style) {
- MessageBox messageBox = new MessageBox(Display.getDefault().getActiveShell(), style);
- messageBox.setMessage(msg);
- messageBox.open();
- }
-
- private void initTypes() {
- types = new ArrayList();
- types.add(IProxyData.HTTP_PROXY_TYPE);
- types.add(IProxyData.HTTPS_PROXY_TYPE);
- types.add(IProxyData.SOCKS_PROXY_TYPE);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/SWTInstallAdvisor.java b/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/SWTInstallAdvisor.java
deleted file mode 100644
index 236061516..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/SWTInstallAdvisor.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.installer.ui;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.installer.Messages;
-import org.eclipse.equinox.internal.provisional.p2.installer.*;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Install context that creates a simple SWT-based UI and interacts with a user.
- */
-public class SWTInstallAdvisor extends InstallAdvisor {
- private InstallDialog dialog;
- private boolean started = false;
- private boolean stopped = false;
-
- public IStatus performInstall(IInstallOperation operation) {
- return dialog.run(operation);
- }
-
- public InstallDescription prepareInstallDescription(InstallDescription description) {
- if (description.getInstallLocation() == null)
- dialog.promptForLocations(description);
- return description;
- }
-
- public boolean promptForLaunch(InstallDescription description) {
- return dialog.promptForLaunch(description);
- }
-
- public void setResult(IStatus status) {
- String message;
- if (status.getSeverity() == IStatus.CANCEL) {
- message = Messages.Advisor_Canceled;
- } else {
- message = status.getMessage();
- }
- dialog.promptForClose(message);
- }
-
- public synchronized void start() {
- if (stopped || started)
- return;
- started = true;
- Display display = Display.getCurrent();
- if (display == null)
- display = new Display();
- dialog = new InstallDialog();
- dialog.setMessage(Messages.Advisor_Preparing);
- }
-
- public synchronized void stop() {
- if (stopped || !started)
- return;
- stopped = true;
- final InstallDialog activeDialog = dialog;
- if (activeDialog == null)
- return;
- //clear the window now, so the reference is gone no matter what happens during cleanup
- dialog = null;
- final Display display = activeDialog.getDisplay();
- if (display == null || display.isDisposed())
- return;
- display.syncExec(new Runnable() {
- public void run() {
- activeDialog.close();
- }
- });
- display.dispose();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/provisional/p2/installer/IInstallOperation.java b/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/provisional/p2/installer/IInstallOperation.java
deleted file mode 100644
index fb05a890f..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/provisional/p2/installer/IInstallOperation.java
+++ /dev/null
@@ -1,41 +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.installer;
-
-import org.eclipse.core.runtime.*;
-
-/**
- * The operation that will perform the install. This interface exists to allow
- * the install advisor to act as the runnable context for the install, handling
- * progress monitoring and cancelation.
- * <p>
- * This interface is not intended to be implemented by clients.
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IInstallOperation {
- /**
- * Performs the install.
- * <p>
- * The provided monitor can be used to report progress and respond to
- * cancellation. If the progress monitor has been canceled, the job
- * should finish its execution at the earliest convenience and return a result
- * status of severity {@link IStatus#CANCEL}. The singleton
- * cancel status {@link Status#CANCEL_STATUS} can be used for
- * this purpose. The monitor is only valid for the duration of the invocation
- * of this method.
- *
- * @param monitor the monitor to be used for reporting progress and
- * responding to cancelation, or <code>null</code> if progress reporting
- * and cancelation are not desired.
- * @return resulting status of the run. The result must not be <code>null</code>
- */
- public IStatus install(IProgressMonitor monitor);
-}
diff --git a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/provisional/p2/installer/InstallAdvisor.java b/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/provisional/p2/installer/InstallAdvisor.java
deleted file mode 100644
index 76eacc554..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/provisional/p2/installer/InstallAdvisor.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.internal.provisional.p2.installer;
-
-import org.eclipse.core.runtime.*;
-
-/**
- * The install advisor helps to make decisions during install, and is the conduit
- * for reporting progress and results back to an end user or log.
- */
-public abstract class InstallAdvisor {
- /**
- * Performs the actual install. The advisor is responsible for handling progress
- * monitoring and cancelation. The advisor may perform the install in
- * another thread, but must block the calling thread until the install
- * completes.
- *
- * @param operation The install operation to run
- * @return IStatus The result of the install operation. This is typically
- * just the return value of {@link IInstallOperation#install(IProgressMonitor)},
- * but the advisor may alter the result status if desired.
- */
- public abstract IStatus performInstall(IInstallOperation operation);
-
- /**
- * Allows the advisor to modify or fill in missing values in the install description.
- * @param description The initial install description
- * @return The install description to be used for the install.
- * @exception OperationCanceledException if the install should be canceled.
- */
- public abstract InstallDescription prepareInstallDescription(InstallDescription description);
-
- /**
- * Prompts for whether the installed application should be launched immediately.
- * This method is only called after a successful install.
- *
- * @param description The initial install description
- * @return <code>true</code> if the product should be launched, and
- * <code>false</code> otherwise.
- */
- public abstract boolean promptForLaunch(InstallDescription description);
-
- /**
- * Reports some result information to the context. The status may be
- * information, warning, or an error.
- */
- public abstract void setResult(IStatus status);
-
- /**
- * Initializes the install advisor. This method must be called before calling any
- * other methods on the advisor are called. Subsequent invocations of this
- * method are ignored.
- */
- public abstract void start();
-
- /**
- * Stops the install advisor. The advisor becomes invalid after it has been
- * stopped; a stopped advisor cannot be restarted.
- */
- public abstract void stop();
-}
diff --git a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/provisional/p2/installer/InstallDescription.java b/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/provisional/p2/installer/InstallDescription.java
deleted file mode 100644
index 55f982b8a..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/provisional/p2/installer/InstallDescription.java
+++ /dev/null
@@ -1,170 +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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.installer;
-
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionedName;
-
-/**
- * An install information captures all the data needed to perform a product install.
- * This includes information on where the installed product comes from, what will
- * be installed, and where it will be installed.
- */
-public class InstallDescription {
- private URI[] artifactRepos;
- private IPath installLocation;
- private IPath agentLocation;
- private IPath bundleLocation;
- private boolean isAutoStart;
- private String launcherName;
- private URI[] metadataRepos;
- private String productName;
- private VersionedName[] roots;
- private final Map profileProperties = new HashMap();
-
- /**
- * Returns the p2 agent location, or <code>null</code> to indicate
- * the default agent location.
- */
- public IPath getAgentLocation() {
- return agentLocation;
- }
-
- /**
- * Returns the locations of the artifact repositories to install from
- * @return a list of artifact repository URLs
- */
- public URI[] getArtifactRepositories() {
- return artifactRepos;
- }
-
- /**
- * Returns the bundle pool location, or <code>null</code> to
- * indicate the default bundle pool location.
- */
- public IPath getBundleLocation() {
- return bundleLocation;
- }
-
- /**
- * Returns the local file system location to install into.
- * @return a local file system location
- */
- public IPath getInstallLocation() {
- return installLocation;
- }
-
- /**
- * Returns the name of the product's launcher executable
- * @return the name of the launcher executable
- */
- public String getLauncherName() {
- return launcherName;
- }
-
- /**
- * Returns the locations of the metadata repositories to install from
- * @return a list of metadata repository URLs
- */
- public URI[] getMetadataRepositories() {
- return metadataRepos;
- }
-
- /**
- * Returns the profile properties for this install.
- */
- public Map getProfileProperties() {
- return profileProperties;
- }
-
- /**
- * Returns a human-readable name for this install.
- * @return the name of the product
- */
- public String getProductName() {
- return productName;
- }
-
- /**
- * Returns whether the installed product should be started upon successful
- * install.
- * @return <code>true</code> if the product should be started upon successful
- * install, and <code>false</code> otherwise
- */
- public boolean isAutoStart() {
- return isAutoStart;
- }
-
- public void setAgentLocation(IPath agentLocation) {
- this.agentLocation = agentLocation;
- }
-
- public void setArtifactRepositories(URI[] value) {
- this.artifactRepos = value;
- }
-
- public void setAutoStart(boolean value) {
- this.isAutoStart = value;
- }
-
- public void setBundleLocation(IPath bundleLocation) {
- this.bundleLocation = bundleLocation;
- }
-
- public void setInstallLocation(IPath location) {
- this.installLocation = location;
- }
-
- public void setLauncherName(String name) {
- this.launcherName = name;
- }
-
- public void setMetadataRepositories(URI[] value) {
- this.metadataRepos = value;
- }
-
- /**
- * Supplies a set of profile properties to be added when the profile is created.
- * @param properties the profile properties to be added
- */
- public void setProfileProperties(Map properties) {
- profileProperties.putAll(properties);
- }
-
- /**
- * Returns the set of roots to be installed for this installation
- * @return the roots to install
- */
- public VersionedName[] getRoots() {
- return roots;
- }
-
- /**
- * Set the list of roots to install
- * @param value the set of roots to install
- */
- public void setRoots(VersionedName[] value) {
- roots = value;
- }
-
- /**
- * Set the name of the product being installed.
- * @param value the new name of the product to install
- */
- public void setProductName(String value) {
- productName = value;
- }
-
-}
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 e17d879bf..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-org.eclipse.equinox.simpleconfigurator.jar
-org.eclipse.update.configurator.jar
-bin
-ant_tasks \ No newline at end of file
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 ec9c3e8df..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="${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.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 9c8510351..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,344 +0,0 @@
-#Thu Feb 21 15:21:23 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.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.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.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.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 7af44e405..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,40 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.metadata.generator;singleton:=true
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.0.200.qualifier
-Require-Bundle: org.eclipse.equinox.p2.core,
- org.eclipse.osgi,
- org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
-Import-Package: javax.xml.parsers,
- org.eclipse.equinox.app;version="1.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.metadata,
- 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,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator,
- org.w3c.dom,
- org.xml.sax,
- org.xml.sax.helpers
-Bundle-Activator: org.eclipse.equinox.internal.p2.metadata.generator.Activator
-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"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
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 9b38c1230..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/plugin.xml
+++ /dev/null
@@ -1,37 +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>
-
- <extension point="org.eclipse.ant.core.antTasks">
- <antTask
- library="ant_tasks/generator-ant.jar"
- name="p2.generator"
- class="org.eclipse.equinox.internal.p2.metadata.generator.ant.GeneratorTask">
- </antTask>
- </extension>
-
- <extension point="org.eclipse.ant.core.extraClasspathEntries">
- <extraClasspathEntry library="ant_tasks/generator-ant.jar"/>
- </extension>
-
-</plugin>
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 1f46d991d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java
+++ /dev/null
@@ -1,445 +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.p2.artifact.repository.ArtifactRepositoryManager;
-import org.eclipse.equinox.internal.p2.core.ProvisioningEventBus;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.EclipseInstallGeneratorInfoProvider;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.Generator;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.ServiceRegistration;
-
-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 ArtifactRepositoryManager defaultArtifactManager;
- private ServiceRegistration registrationDefaultArtifactManager;
- private MetadataRepositoryManager defaultMetadataManager;
- private ServiceRegistration registrationDefaultMetadataManager;
- private IProvisioningEventBus bus;
- private ServiceRegistration registrationBus;
- 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 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) ServiceHelper.getService(Activator.context, IArtifactRepositoryManager.class.getName());
- 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) ServiceHelper.getService(Activator.context, IMetadataRepositoryManager.class.getName());
- 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);
-
- }
- }
-
- private void registerDefaultArtifactRepoManager() {
- if (ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName()) == null) {
- defaultArtifactManager = new ArtifactRepositoryManager();
- defaultArtifactManager.setEventBus(bus);
- registrationDefaultArtifactManager = Activator.getContext().registerService(IArtifactRepositoryManager.class.getName(), defaultArtifactManager, null);
- }
- }
-
- private void registerDefaultMetadataRepoManager() {
- if (ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName()) == null) {
- defaultMetadataManager = new MetadataRepositoryManager();
- defaultMetadataManager.setEventBus(bus);
- registrationDefaultMetadataManager = Activator.getContext().registerService(IMetadataRepositoryManager.class.getName(), defaultMetadataManager, null);
- }
- }
-
- private void registerEventBus() {
- if (ServiceHelper.getService(Activator.getContext(), IProvisioningEventBus.SERVICE_NAME) == null) {
- bus = new ProvisioningEventBus();
- registrationBus = Activator.getContext().registerService(IProvisioningEventBus.SERVICE_NAME, bus, null);
- }
- }
-
- 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 {
- registerEventBus();
- registerDefaultMetadataRepoManager();
- registerDefaultArtifactRepoManager();
- 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);
- }
-
- 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 (registrationDefaultMetadataManager != null) {
- registrationDefaultMetadataManager.unregister();
- registrationDefaultMetadataManager = null;
- }
- if (registrationDefaultArtifactManager != null) {
- registrationDefaultArtifactManager.unregister();
- registrationDefaultArtifactManager = null;
- }
- if (registrationBus != null) {
- registrationBus.unregister();
- registrationBus = 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 e00cf7aec..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/ProductQuery.java
+++ /dev/null
@@ -1,159 +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.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.MetadataGeneratorHelper;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.Generator.GeneratorResult;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.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;
-
- // Collector collects the largest version of each IU
- private final Collector collector = new Collector() {
- private final HashMap elements = new HashMap();
-
- public boolean accept(Object object) {
- if (!(object instanceof IInstallableUnit))
- return true;
- IInstallableUnit iu = (IInstallableUnit) object;
- if (elements.containsKey(iu.getId())) {
- IInstallableUnit existing = (IInstallableUnit) elements.get(iu.getId());
- if (existing.getVersion().compareTo(iu.getVersion()) >= 0)
- return true;
- getCollection().remove(existing);
- }
- elements.put(iu.getId(), iu);
- return super.accept(object);
- }
- };
-
- public ProductQuery(ProductFile product, String flavor, Map configIUs, String versionAdvice) {
- this.product = product;
- this.flavor = flavor;
- this.versionAdvice = versionAdvice;
- initialize(configIUs);
- }
-
- public Collector getCollector() {
- return this.collector;
- }
-
- 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 = new Version(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 ef3a743dd..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteFeature.java
+++ /dev/null
@@ -1,207 +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 == null || url2 == null)
- return false;
- if (url1 == url2)
- return true;
- if (url1.equals(url2))
- return true;
-
- // 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:/)
- if (!"file".equalsIgnoreCase(url1.getProtocol())) //$NON-NLS-1$
- return false;
- if (!"file".equalsIgnoreCase(url2.getProtocol())) //$NON-NLS-1$
- return false;
-
- File file1 = new File(url1.getFile());
- File file2 = new File(url2.getFile());
-
- if (file1 == null)
- return false;
-
- return (file1.equals(file2));
- }
-
- /**
- * 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 (getURL() == null)
- return false;
-
- if (!(object instanceof SiteFeature))
- return false;
-
- SiteFeature f = (SiteFeature) object;
-
- return sameURL(getURL(), f.getURL());
- }
-
- /**
- * 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 70c4a2fe0..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/EclipseInstallGeneratorInfoProvider.java
+++ /dev/null
@@ -1,573 +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.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.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
-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_SIMPLECONFIGURATOR_MANIPULATOR = "org.eclipse.equinox.simpleconfigurator.manipulator"; //$NON-NLS-1$
- private static final String ORG_ECLIPSE_EQUINOX_FRAMEWORKADMIN_EQUINOX = "org.eclipse.equinox.frameworkadmin.equinox"; //$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$
- result.setSpecialUnconfigCommands("rmdir(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), 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();
- }
- }
- // try {
- // frameworkAdminTracker.waitForService(500);
- // } catch (InterruptedException e) {
- // // ignore
- // }
-
- FrameworkAdmin admin = (FrameworkAdmin) frameworkAdminTracker.getService();
- if (admin == null) {
- startBundle(ORG_ECLIPSE_EQUINOX_FRAMEWORKADMIN_EQUINOX);
- startBundle(ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_MANIPULATOR);
- admin = (FrameworkAdmin) frameworkAdminTracker.getService();
- }
- return admin;
- }
-
- 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;
- }
-
- private boolean startBundle(String bundleId) {
- PackageAdmin packageAdmin = (PackageAdmin) ServiceHelper.getService(Activator.getContext(), PackageAdmin.class.getName());
- if (packageAdmin == null)
- return false;
-
- Bundle[] bundles = packageAdmin.getBundles(bundleId, null);
- if (bundles != null && bundles.length > 0) {
- for (int i = 0; i < bundles.length; i++) {
- try {
- if ((bundles[0].getState() & Bundle.RESOLVED) > 0) {
- bundles[0].start();
- return true;
- }
- } catch (BundleException e) {
- // failed, try next bundle
- }
- }
- }
- return false;
- }
-
- 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 3875e2888..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.internal.provisional.p2.core.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 8eb9157e0..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java
+++ /dev/null
@@ -1,1397 +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.*;
-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.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.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.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.*;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-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 query = new ProductQuery(productFile, info.getFlavor(), result.configurationIUs, info.getVersionAdvice());
- Collector collector = info.getMetadataRepository().query(query, query.getCollector(), null);
- for (Iterator iterator = collector.iterator(); iterator.hasNext();) {
- productContents.rootIUs.add(iterator.next());
- }
-
- String version = getProductVersion();
- VersionRange range = new VersionRange(new Version(version), true, new Version(version), true);
- ArrayList requires = new ArrayList(1);
- requires.add(MetadataFactory.createRequiredCapability(info.getFlavor() + productFile.getId(), productFile.getId() + PRODUCT_LAUCHER_SUFFIX, range, null, false, true));
- requires.add(MetadataFactory.createRequiredCapability(info.getFlavor() + productFile.getId(), productFile.getId() + PRODUCT_INI_SUFFIX, range, null, false, false));
- requires.add(MetadataFactory.createRequiredCapability(info.getFlavor() + productFile.getId(), productFile.getId() + PRODUCT_CONFIG_SUFFIX, range, null, false, false));
-
- //default CUs
- requires.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, MetadataGeneratorHelper.createDefaultConfigUnitId(MetadataGeneratorHelper.OSGI_BUNDLE_CLASSIFIER, info.getFlavor()), VersionRange.emptyRange, null, false, false));
- requires.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, MetadataGeneratorHelper.createDefaultConfigUnitId("source", info.getFlavor()), VersionRange.emptyRange, null, false, false)); //$NON-NLS-1$
- if (productFile.useFeatures())
- requires.add(MetadataFactory.createRequiredCapability(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(new Version(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.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, iu.getFilter(), false, false));
- }
- if (requires != null)
- reqsConfigurationUnits.addAll(requires);
- root.setRequiredCapabilities((IRequiredCapability[]) reqsConfigurationUnits.toArray(new IRequiredCapability[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(IInstallableUnit.PROP_TYPE_GROUP, Boolean.TRUE.toString());
- root.setCapabilities(new IProvidedCapability[] {MetadataGeneratorHelper.createSelfCapability(configurationIdentification, new Version(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((IInstallableUnit[]) allGeneratedUnits.toArray(new IInstallableUnit[allGeneratedUnits.size()]));
- }
-
- 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(), new Version(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 = new Version(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
- Query query = new InstallableUnitQuery(name);
- Collector collector = new Collector();
- Iterator matches = info.getMetadataRepository().query(query, collector, 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(), new Version(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((IInstallableUnit[]) allCUs.toArray(new IInstallableUnit[allCUs.size()]));
- }
-
- }
-
- /**
- * @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;
- Query query = new InstallableUnitQuery(bundle.getSymbolicName());
- Collector collector = new Collector();
- IMetadataRepository metadataRepository = info.getMetadataRepository();
- if (metadataRepository == null)
- continue;
- Iterator matches = metadataRepository.query(query, collector, 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());
- String filter = configuredIU == null ? null : configuredIU.getFilter();
- IInstallableUnit cu = MetadataGeneratorHelper.createBundleConfigurationUnit(bundle.getSymbolicName(), new Version(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((IInstallableUnit[]) defaults.toArray(new IInstallableUnit[defaults.size()]));
- }
- }
-
- /**
- * 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.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), VersionRange.emptyRange, iu.getFilter(), false, false));
- }
- cat.setRequiredCapabilities((IRequiredCapability[]) required.toArray(new IRequiredCapability[required.size()]));
- cat.setCapabilities(new IProvidedCapability[] {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);
- }
-
- /**
- * @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 = new Version(version);
- iu.setVersion(launcherVersion);
- iu.setSingleton(true);
- String filter = null;
- if (!ws.equals(CONFIG_ANY) && !os.equals(CONFIG_ANY) && !arch.equals(CONFIG_ANY)) {
- filter = "(& (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.setRequiredCapabilities(new IRequiredCapability[] {MetadataFactory.createRequiredCapability(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 IRequiredCapability[] {MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, launcherId, new VersionRange(launcherVersion, true, launcherVersion, true), null, false, false)});
- cu.setProperty(IInstallableUnit.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 (launcherNameIU != null && 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 = new Version(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 = new Version(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);
- IArtifactKey[] artifacts = featureIU.getArtifacts();
- storePluginShape(feature, result);
- for (int arti = 0; arti < artifacts.length; arti++) {
- IArtifactDescriptor ad = MetadataGeneratorHelper.createArtifactDescriptor(artifacts[arti], 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;
- metadataRepo.addReference(associateLocation, name, IRepository.TYPE_METADATA, flags);
- metadataRepo.addReference(associateLocation, name, IRepository.TYPE_ARTIFACT, flags);
- } 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 e26620cfd..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.internal.provisional.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 cf812eafe..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.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.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 93594b95b..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java
+++ /dev/null
@@ -1,1386 +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.provisional.p2.metadata.generator;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
-
-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.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-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.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.ArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.*;
-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 IRequiredCapability#getNamespace()
- * @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 IRequiredCapability#getName()
- * @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
- * @see IRequiredCapability#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 IRequiredCapability#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 IRequiredCapability#getNamespace()
- * @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 = new Version("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 String INSTALL_FEATURES_FILTER = "(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 = new Version(1, 0, 0);
-
- private static final Version versionMax = new Version(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE);
-
- public static final ITouchpointType TOUCHPOINT_NATIVE = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.native", new Version(1, 0, 0)); //$NON-NLS-1$
- public static final ITouchpointType TOUCHPOINT_OSGI = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.osgi", new Version(1, 0, 0)); //$NON-NLS-1$
-
- public static final IProvidedCapability BUNDLE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, new Version(1, 0, 0));
- public static final IProvidedCapability FEATURE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_FEATURE, new Version(1, 0, 0));
- public static final IProvidedCapability SOURCE_BUNDLE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_SOURCE, new Version(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$
-
- 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()));
- }
- 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) {
- final String PACKED_FORMAT = "packed"; //$NON-NLS-1$
- //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()));
- }
- ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
- result.setProcessingSteps(steps);
- result.setProperty(IArtifactDescriptor.FORMAT, PACKED_FORMAT);
- return result;
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- public static IInstallableUnit createBundleConfigurationUnit(String iuId, Version iuVersion, boolean isBundleFragment, GeneratorBundleInfo configInfo, String configurationFlavor, String 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 IRequiredCapability[] { //
- MetadataFactory.createRequiredCapability(CAPABILITY_NS_OSGI_BUNDLE, iuId, new VersionRange(iuVersion, true, versionMax, true), null, false, false, true), //
- MetadataFactory.createRequiredCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, new VersionRange(new Version(1, 0, 0), true, new Version(2, 0, 0), false), null, false, false, false)});
-
- //Adds capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, iuVersion), MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_FLAVOR, configurationFlavor, new Version(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, Version.fromOSGiVersion(base), false);
- } else {
- updateRange = new VersionRange("0.0.0"); //$NON-NLS-1$
- }
- 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(Version.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.createRequiredCapability(CAPABILITY_NS_OSGI_BUNDLE, bd.getHost().getName(), VersionRange.fromOSGiVersionRange(bd.getHost().getVersionRange()), null, false, false));
- for (int j = 0; j < requiredBundles.length; j++)
- reqsDeps.add(MetadataFactory.createRequiredCapability(CAPABILITY_NS_OSGI_BUNDLE, requiredBundles[j].getName(), VersionRange.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 = VersionRange.fromOSGiVersionRange(importSpec.getVersionRange());
-
- //TODO this needs to be refined to take into account all the attribute handled by imports
- reqsDeps.add(MetadataFactory.createRequiredCapability(CAPABILITY_NS_JAVA_PACKAGE, importPackageName, versionRange, null, isOptional(importSpec), false));
- }
- iu.setRequiredCapabilities((IRequiredCapability[]) reqsDeps.toArray(new IRequiredCapability[reqsDeps.size()]));
-
- // Create set of provided capabilities
- ArrayList providedCapabilities = new ArrayList();
- providedCapabilities.add(createSelfCapability(bd.getSymbolicName(), Version.fromOSGiVersion(bd.getVersion())));
- providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_OSGI_BUNDLE, bd.getSymbolicName(), Version.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(), Version.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(), Version.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(Version.fromOSGiVersion(bd.getVersion())); // TODO: is this a meaningful version?
-
- HostSpecification hostSpec = bd.getHost();
- IRequiredCapability[] hostReqs = new IRequiredCapability[] {MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, hostSpec.getName(), VersionRange.fromOSGiVersionRange(hostSpec.getVersionRange()), null, false, false, false)};
- fragment.setHost(hostReqs);
-
- fragment.setSingleton(true);
- fragment.setProperty(IInstallableUnit.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(), new Version(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.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, 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.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, parentCategory.getId(), VersionRange.emptyRange, parentCategory.getFilter(), false, false));
- }
- cat.setRequiredCapabilities((IRequiredCapability[]) reqsConfigurationUnits.toArray(new IRequiredCapability[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(IInstallableUnit.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 = new Version(1, 0, 0);
- cu.setVersion(configUnitVersion);
-
- // Add capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_FLAVOR, configurationFlavor, new Version(1, 0, 0))});
-
- // Create a required capability on bundles
- IRequiredCapability[] reqs = new IRequiredCapability[] {MetadataFactory.createRequiredCapability(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 = new Version(1, 0, 0);
- cu.setVersion(configUnitVersion);
-
- // Add capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_FLAVOR, configurationFlavor, new Version(1, 0, 0))});
-
- // Create a required capability on features
- IRequiredCapability[] reqs = new IRequiredCapability[] {MetadataFactory.createRequiredCapability(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 = new Version(1, 0, 0);
- cu.setVersion(configUnitVersion);
-
- // Add capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_FLAVOR, configurationFlavor, new Version(1, 0, 0))});
-
- // Create a required capability on source providers
- IRequiredCapability[] reqs = new IRequiredCapability[] {MetadataFactory.createRequiredCapability(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, new Version(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 = 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.setLicense(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 = 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.setLicense(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();
- IRequiredCapability[] required = new IRequiredCapability[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.createRequiredCapability(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.createRequiredCapability(IU_NAMESPACE, featureIU.getId(), new VersionRange(featureIU.getVersion(), true, featureIU.getVersion(), true), INSTALL_FEATURES_FILTER, false, false);
- iu.setRequiredCapabilities(required);
- iu.setTouchpointType(ITouchpointType.NONE);
- iu.setProperty(IInstallableUnit.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 = 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.setLicense(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]);
- IRequiredCapability req = MetadataFactory.createRequiredCapability(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);
- continue;
- }
- if (entries[i].isPlugin()) {
- IRequiredCapability from = MetadataFactory.createRequiredCapability(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.createRequiredCapability(IU_NAMESPACE, featureIU.getId(), new VersionRange(featureIU.getVersion(), true, featureIU.getVersion(), true), INSTALL_FEATURES_FILTER, false, false));
- iu.setRequiredCapabilities((IRequiredCapability[]) patchRequirements.toArray(new IRequiredCapability[patchRequirements.size()]));
- iu.setApplicabilityScope(new IRequiredCapability[][] {(IRequiredCapability[]) applicabilityScope.toArray(new IRequiredCapability[applicabilityScope.size()])});
- iu.setRequirementChanges((IRequirementChange[]) requirementChanges.toArray(new IRequirementChange[requirementChanges.size()]));
-
- //Generate lifecycle
- IRequiredCapability lifeCycle = null;
- if (applicabilityScope.size() > 0) {
- IRequiredCapability req = (IRequiredCapability) applicabilityScope.get(0);
- lifeCycle = MetadataFactory.createRequiredCapability(req.getNamespace(), req.getName(), req.getRange(), null, false, false, false);
- iu.setLifeCycle(lifeCycle);
- }
-
- iu.setTouchpointType(ITouchpointType.NONE);
- iu.setProperty(IInstallableUnit.PROP_TYPE_GROUP, Boolean.TRUE.toString());
- iu.setProperty(IInstallableUnit.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 IRequiredCapability[] {MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, id, new VersionRange(version, true, versionMax, true), null, false, false)});
- cu.setProperty(IInstallableUnit.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 IRequiredCapability[] {MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, launcherId, new VersionRange(LAUNCHER_VERSION, true, versionMax, true), null, false, false)});
- cu.setProperty(IInstallableUnit.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 = new Version("1.6"); //$NON-NLS-1$
- } else if (profileName.indexOf("1.5") > 0) { //$NON-NLS-1$
- version = new Version("1.5"); //$NON-NLS-1$
- } else if (profileName.indexOf("1.4") > 0) { //$NON-NLS-1$
- version = new Version("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 String 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 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 = new Version(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 || match.equals("compatible")) { //$NON-NLS-1$
- Version upper = new Version(version.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 = new Version(version.getMajor(), version.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;
- }
-
-};
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 ef379494d..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.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.repository/.cvsignore b/bundles/org.eclipse.equinox.p2.metadata.repository/.cvsignore
deleted file mode 100644
index 3101cbf46..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-bin
-bin_ant
-ant_tasks
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 864bdafe5..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/.externalToolBuilders/org.eclipse.equinox.p2.metadata.reposiroy buildAntTasks.xml.launch
+++ /dev/null
@@ -1,18 +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/buildAntTasks.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.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>
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 b1aa25ac4..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/.project
+++ /dev/null
@@ -1,44 +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.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 904df3197..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,329 +0,0 @@
-#Fri Feb 22 11:22:59 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.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.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 31d9eaa1e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,64 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.metadata.repository;singleton:=true
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.0.100.qualifier
-Export-Package: org.eclipse.equinox.internal.p2.metadata.mirror;x-internal:=true,
- 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.internal.p2.metadata.repository.io;x-friends:="org.eclipse.equinox.p2.engine",
- org.eclipse.equinox.internal.provisional.p2.metadata.repository;
- x-friends:="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.engine,
- org.eclipse.equinox.p2.extensionlocation,
- org.eclipse.equinox.p2.installer,
- 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.ui.admin,
- org.eclipse.equinox.p2.ui.sdk,
- org.eclipse.equinox.p2.updatechecker,
- org.eclipse.equinox.p2.updatesite,
- org.eclipse.pde.ui,
- org.eclipse.equinox.p2.touchpoint.eclipse,
- org.eclipse.equinox.p2.repository.tools,
- org.eclipse.pde.core",
- org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository;x-friends:="org.eclipse.equinox.p2.extensionlocation,org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.p2.engine"
-Import-Package: javax.xml.parsers,
- org.eclipse.ecf.core.util,
- org.eclipse.equinox.app;resolution:=optional,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.metadata,
- 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,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.core.location,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.repository,
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.util.tracker;version="1.3.0",
- org.xml.sax
-Bundle-Activator: org.eclipse.equinox.internal.p2.metadata.repository.Activator
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
- CDC-1.1/Foundation-1.1
-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"
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 7a8c0c188..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/build.properties
+++ /dev/null
@@ -1,25 +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
-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/
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/p2 tools - mirror metadata.launch b/bundles/org.eclipse.equinox.p2.metadata.repository/p2 tools - mirror metadata.launch
deleted file mode 100644
index 4d7cb3c6a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/p2 tools - mirror metadata.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/p2 tools - mirror metadata"/>
-<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.JAVA_COMMAND" value="java"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication&#13;&#10;-source http://download.eclipse.org/eclipse/updates/3.4milestones/&#13;&#10;-destination file:c:/p2"/>
-<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.security@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.app@default:true,org.eclipse.osgi.services@default:default,org.eclipse.osgi@:,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.common@default:default,org.eclipse.equinox.registry@default:default,javax.servlet@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.metadata.repository@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.sat4j.pb@default:default,org.eclipse.equinox.simpleconfigurator@default:true,org.eclipse.equinox.p2.director@default:default,org.sat4j.core@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.ecf@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.jarprocessor@default:default"/>
-</launchConfiguration>
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 c1bac455c..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/plugin.xml
+++ /dev/null
@@ -1,53 +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.provisional.spi.p2.metadata.repository.SimpleMetadataRepositoryFactory"/>
- </extension>
- <extension
- id="mirrorApplication"
- point="org.eclipse.core.runtime.applications">
- <application
- cardinality="1"
- thread="main"
- visible="true">
- <run
- class="org.eclipse.equinox.internal.p2.metadata.mirror.MirrorApplication">
- </run>
- </application>
- </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.metadata.mirror"
- class="org.eclipse.equinox.internal.p2.metadata.repository.ant.MirrorApplicationTask">
- </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/schema/metadataRepositories.exsd b/bundles/org.eclipse.equinox.p2.metadata.repository/schema/metadataRepositories.exsd
deleted file mode 100644
index f32458c40..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" 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="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/mirror/MirrorApplication.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/MirrorApplication.java
deleted file mode 100644
index 535fed636..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/MirrorApplication.java
+++ /dev/null
@@ -1,175 +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.internal.p2.metadata.mirror;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-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.metadata.repository.Activator;
-import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager;
-import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
-/**
- * An application that performs mirroring of artifacts between repositories.
- */
-public class MirrorApplication implements IApplication {
-
- private String[] rootSpecs;
- private URI sourceLocation;
- private URI destinationLocation;
- private IMetadataRepository source;
- private IMetadataRepository destination;
- private boolean transitive = false;
- private boolean append = true;
- private IMetadataRepositoryManager cachedManager;
- private boolean sourceLoaded = false;
- private boolean destinationLoaded = false;
- private String destinationName;
-
- /**
- * Convert a list of tokens into an array. The list separator has to be
- * specified.
- */
- public static String[] getArrayArgsFromString(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$
- if ((token.indexOf('[') >= 0 || token.indexOf('(') >= 0) && tokens.hasMoreTokens())
- result.add(token + separator + tokens.nextToken());
- else
- result.add(token);
- }
- }
- return (String[]) result.toArray(new String[result.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext context) throws Exception {
- try {
- initializeFromArguments((String[]) context.getArguments().get(IApplicationContext.APPLICATION_ARGS));
- setupRepositories();
- new Mirroring().mirror(source, destination, rootSpecs, transitive);
- return IApplication.EXIT_OK;
- } catch (Exception e) {
- System.err.println(e.getMessage());
- throw e;
- } finally {
- //if the repository was not already loaded before the mirror application started, close it.
- if (!sourceLoaded && sourceLocation != null)
- getManager().removeRepository(sourceLocation);
- if (!destinationLoaded && destinationLocation != null)
- getManager().removeRepository(destinationLocation);
- }
- }
-
- private void setupRepositories() throws ProvisionException {
- if (destinationLocation == null || sourceLocation == null)
- throw new IllegalStateException("Must specify a source and destination"); //$NON-NLS-1$
-
- //Check if repositories are already loaded
- //TODO modify the contains statement once the API is available
- sourceLoaded = getManager().contains(sourceLocation);
- //TODO modify the contains statement once the API is available
- destinationLoaded = getManager().contains(destinationLocation);
-
- //must execute before initializeDestination is called
- source = getManager().loadRepository(sourceLocation, 0, null);
- destination = initializeDestination();
- }
-
- /*
- * Return the metadata repository manager. We need to check the service here
- * as well as creating one manually in case we are running a stand-alone application
- * in which no one has registered a manager yet.
- */
- private IMetadataRepositoryManager getManager() {
- if (cachedManager != null)
- return cachedManager;
- IMetadataRepositoryManager result = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
- // service not available... create one and hang onto it
- if (result == null) {
- cachedManager = new MetadataRepositoryManager();
- result = cachedManager;
- }
- return result;
- }
-
- private IMetadataRepository initializeDestination() throws ProvisionException {
- try {
- IMetadataRepository repository = getManager().loadRepository(destinationLocation, IRepositoryManager.REPOSITORY_HINT_MODIFIABLE, null);
- if (repository != null && repository.isModifiable()) {
- if (destinationName != null)
- repository.setName(destinationName);
- if (!append)
- repository.removeAll();
- return repository;
- }
- } catch (ProvisionException e) {
- //fall through and create repo
- }
- //This code assumes source has been successfully loaded before this point
- //No existing repository; create a new repository at destinationLocation but with source's attributes.
- // TODO for now create a Simple repo by default.
- return (IMetadataRepository) RepositoryHelper.validDestinationRepository(getManager().createRepository(destinationLocation, destinationName == null ? source.getName() : destinationName, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, source.getProperties()));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
- public void stop() {
- //do nothing
- }
-
- 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("-destinationName")) //$NON-NLS-1$
- destinationName = arg;
- if (args[i - 1].equalsIgnoreCase("-writeMode")) //$NON-NLS-1$
- if (args[i].equalsIgnoreCase("clean")) //$NON-NLS-1$
- append = false;
-
- try {
- if (args[i - 1].equalsIgnoreCase("-source")) //$NON-NLS-1$
- sourceLocation = RepositoryHelper.localRepoURIHelper(URIUtil.fromString(arg));
- if (args[i - 1].equalsIgnoreCase("-destination")) //$NON-NLS-1$
- destinationLocation = RepositoryHelper.localRepoURIHelper(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("-roots")) //$NON-NLS-1$
- rootSpecs = getArrayArgsFromString(arg, ","); //$NON-NLS-1$
- if (args[i - 1].equalsIgnoreCase("-transitive")) //$NON-NLS-1$
- transitive = true;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/Mirroring.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/Mirroring.java
deleted file mode 100644
index 9746962a5..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/Mirroring.java
+++ /dev/null
@@ -1,62 +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.metadata.mirror;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-
-/**
- * A utility class that performs mirroring of metadatas between repositories.
- */
-public class Mirroring {
-
- public void validate(IMetadataRepository source, IMetadataRepository destination) {
- if (source == null)
- throw new IllegalStateException("Source repository is null."); //$NON-NLS-1$
- if (destination == null)
- throw new IllegalStateException("Destination repository is null."); //$NON-NLS-1$
- if (!destination.isModifiable())
- throw new IllegalStateException("Destination repository must be modifiable: " + destination.getLocation()); //$NON-NLS-1$
- }
-
- public void mirror(IMetadataRepository source, IMetadataRepository destination, String[] rootSpecs, boolean transitive) {
- if (rootSpecs == null)
- mirror(source, destination, InstallableUnitQuery.ANY, transitive);
- else {
- VersionRangedName[] roots = new VersionRangedName[rootSpecs.length];
- for (int i = 0; i < rootSpecs.length; i++)
- roots[i] = VersionRangedName.parse(rootSpecs[i]);
- mirror(source, destination, new RangeQuery(roots), transitive);
- }
- }
-
- public void mirror(IMetadataRepository source, IMetadataRepository destination, Query query, boolean transitive) {
- validate(source, destination);
- Collector result = source.query(query, new Collector(), null);
- mirror(source, destination, (IInstallableUnit[]) result.toArray(IInstallableUnit.class), transitive);
- }
-
- private void mirror(IMetadataRepository source, IMetadataRepository destination, IInstallableUnit[] roots, boolean transitive) {
- if (transitive)
- roots = addTransitiveIUs(source, roots);
- destination.addInstallableUnits(roots);
- }
-
- protected IInstallableUnit[] addTransitiveIUs(IMetadataRepository source, IInstallableUnit[] roots) {
- // TODO Here we should create a profile from the source repo and discover all the
- // IUs that are needed to support the given roots. For now just assume that the
- // given roots are enough.
- return roots;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/RangeQuery.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/RangeQuery.java
deleted file mode 100644
index e24e109c1..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/RangeQuery.java
+++ /dev/null
@@ -1,49 +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.internal.p2.metadata.mirror;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.MatchQuery;
-
-/**
- * A convenience query that will match any {@link IInstallableUnit}
- * it encounters.
- */
-public class RangeQuery extends MatchQuery {
- private VersionRangedName[] targets;
-
- /**
- * Creates a query that will match any {@link IInstallableUnit} with the given
- * VerionRangedName.
- *
- * @param targets The installable unit names with versions to match, or <code>null</code> to match any id
- */
- public RangeQuery(VersionRangedName[] targets) {
- this.targets = targets;
- }
-
- /**
- * Returns true if the <code>IInstallableUnit</code> object is contained in the <code>VerionRangedName</code>'s or targets is null.
- */
- public boolean isMatch(Object object) {
- if (!(object instanceof IInstallableUnit))
- return false;
- if (targets == null)
- return true;
- IInstallableUnit candidate = (IInstallableUnit) object;
- for (int i = 0; i < targets.length; i++) {
- VersionRangedName entry = targets[i];
- if (entry.getId().equalsIgnoreCase(candidate.getId()) && entry.getVersionRange().isIncluded(candidate.getVersion()))
- return true;
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/VersionRangedName.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/VersionRangedName.java
deleted file mode 100644
index 9d2f4c065..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/VersionRangedName.java
+++ /dev/null
@@ -1,53 +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.internal.p2.metadata.mirror;
-
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-
-public class VersionRangedName {
- private final String id;
- private final VersionRange range;
-
- /**
- * Creates and returns a new version ranged id from the given spec. The spec should be
- * id/version range.
- * @param spec the spec for the version ranged id to create
- * @return the parsed versioned id
- */
- public static VersionRangedName parse(String spec) {
- String[] segments = MirrorApplication.getArrayArgsFromString(spec, "/"); //$NON-NLS-1$
- return new VersionRangedName(segments[0], segments.length == 1 ? null : segments[1]);
- }
-
- public VersionRangedName(String id, String rangeSpec) {
- this(id, new VersionRange(rangeSpec));
- }
-
- public VersionRangedName(String id, VersionRange range) {
- if (id == null)
- throw new IllegalArgumentException("id cannot be null"); //$NON-NLS-1$
- this.id = id;
- this.range = range != null ? range : new VersionRange(null);
- }
-
- public String getId() {
- return id;
- }
-
- public VersionRange getVersionRange() {
- return range;
- }
-
- public String toString() {
- return id + "/" + (range == null ? "0.0.0" : range.toString()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-}
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 f8fa8c1db..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java
+++ /dev/null
@@ -1,87 +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.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.osgi.framework.*;
-import org.osgi.util.tracker.ServiceTracker;
-import org.osgi.util.tracker.ServiceTrackerCustomizer;
-
-public class Activator implements BundleActivator, ServiceTrackerCustomizer {
-
- 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;
- private static CacheManager cacheManager;
- private ServiceRegistration repositoryManagerRegistration;
- private MetadataRepositoryManager repositoryManager;
- private ServiceTracker busTracker;
-
- public static BundleContext getContext() {
- return bundleContext;
- }
-
- public static CacheManager getCacheManager() {
- return cacheManager;
- }
-
- public void start(BundleContext context) throws Exception {
- Activator.bundleContext = context;
- cacheManager = new CacheManager();
-
- cacheManager.registerRepoEventListener();
- repositoryManager = new MetadataRepositoryManager();
- repositoryManagerRegistration = context.registerService(IMetadataRepositoryManager.class.getName(), repositoryManager, null);
-
- // need to track event bus coming and going to make sure cache gets cleaned on
- // repository removals
- busTracker = new ServiceTracker(context, IProvisioningEventBus.SERVICE_NAME, this);
- busTracker.open();
-
- }
-
- public void stop(BundleContext context) throws Exception {
- if (cacheManager != null) {
- cacheManager.unregisterRepoEventListener();
- cacheManager = null;
- }
- Activator.bundleContext = null;
- if (repositoryManagerRegistration != null)
- repositoryManagerRegistration.unregister();
- repositoryManagerRegistration = null;
- if (repositoryManager != null) {
- repositoryManager.shutdown();
- repositoryManager = null;
- }
- }
-
- public Object addingService(ServiceReference reference) {
- IProvisioningEventBus bus = (IProvisioningEventBus) bundleContext.getService(reference);
- if (repositoryManager != null)
- repositoryManager.setEventBus(bus);
- if (cacheManager != null)
- cacheManager.registerRepoEventListener();
- return bus;
- }
-
- public void modifiedService(ServiceReference reference, Object service) {
- // ignored
-
- }
-
- public void removedService(ServiceReference reference, Object service) {
- if (repositoryManager != null)
- repositoryManager.unsetEventBus((IProvisioningEventBus) service);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CacheManager.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CacheManager.java
deleted file mode 100644
index 1d4f074ef..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CacheManager.java
+++ /dev/null
@@ -1,420 +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 - additional implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URL;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ecf.filetransfer.UserCancelledException;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.p2.repository.*;
-import org.eclipse.equinox.internal.p2.repository.Activator;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.SynchronousProvisioningListener;
-import org.eclipse.equinox.internal.provisional.p2.core.location.AgentLocation;
-import org.eclipse.equinox.internal.provisional.p2.repository.*;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * A class to manage metadata cache files. Creating the cache files will place
- * the file in the AgentData location in a cache directory.
- *
- * Using the bus listeners will allow the manager to listen for repository
- * events. When a repository is removed, it will remove the cache file if one
- * was created for the repository.
- */
-public class CacheManager {
- /**
- * IStateful implementation of BufferedOutputStream. Class is used to get the status from
- * a download operation.
- */
- private static class StatefulStream extends BufferedOutputStream implements IStateful {
- private IStatus status;
-
- public StatefulStream(OutputStream stream) {
- super(stream);
- }
-
- public IStatus getStatus() {
-
- return status;
- }
-
- public void setStatus(IStatus aStatus) {
- status = aStatus;
- }
-
- }
-
- private static SynchronousProvisioningListener busListener;
- private static final String DOWNLOADING = "downloading"; //$NON-NLS-1$
- private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
- private static final String PROP_RESUMABLE = "org.eclipse.equinox.p2.metadata.repository.resumable"; //$NON-NLS-1$
- private static final String RESUME_DEFAULT = "true"; //$NON-NLS-1$
- private static final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
-
- private final HashSet knownPrefixes = new HashSet(5);
-
- /**
- * Returns a hash of the repository location.
- */
- private int computeHash(URI repositoryLocation) {
- return repositoryLocation.hashCode();
- }
-
- /**
- * Returns a local cache file with the contents of the given remote location,
- * or <code>null</code> if a local cache could not be created.
- *
- * @param repositoryLocation The remote location to be cached
- * @param prefix The prefix to use when creating the cache file
- * @param monitor a progress monitor
- * @return A {@link File} object pointing to the cache file or <code>null</code>
- * if the location is not a repository.
- * @throws FileNotFoundException if neither jar nor xml index file exists at given location
- * @throws AuthenticationFailedException if jar not available and xml causes authentication fail
- * @throws IOException on general IO errors
- * @throws ProvisionException on any error (e.g. user cancellation, unknown host, malformed address, connection refused, etc.)
- * @throws OperationCanceledException - if user canceled
- */
- public File createCache(URI repositoryLocation, String prefix, IProgressMonitor monitor) throws IOException, ProvisionException {
-
- SubMonitor submonitor = SubMonitor.convert(monitor, 1000);
- try {
- knownPrefixes.add(prefix);
- File cacheFile = getCache(repositoryLocation, prefix);
- URI jarLocation = URIUtil.append(repositoryLocation, prefix + JAR_EXTENSION);
- URI xmlLocation = URIUtil.append(repositoryLocation, prefix + XML_EXTENSION);
- int hashCode = computeHash(repositoryLocation);
-
- // Knowing if cache is stale is complicated by the fact that a jar could have been
- // produced after an xml index (and vice versa), and by the need to capture any
- // errors, as these needs to be reported to the user as something meaningful - instead of
- // just a general "can't read repository".
- // (Previous impl of stale checking ignored errors, and caused multiple round-trips)
- boolean stale = true;
- long lastModified = 0L;
- String name = null;
- String useExtension = JAR_EXTENSION;
- URI remoteFile = jarLocation;
-
- if (cacheFile != null) {
- lastModified = cacheFile.lastModified();
- name = cacheFile.getName();
- }
- // get last modified on jar
- long lastModifiedRemote = 0L;
- // bug 269588 - server may return 0 when file exists, so extra flag is needed
- boolean useJar = true;
- try {
- lastModifiedRemote = getTransport().getLastModified(jarLocation, submonitor.newChild(1));
- if (lastModifiedRemote <= 0)
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Server returned lastModified <= 0 for " + jarLocation)); //$NON-NLS-1$
- } catch (AuthenticationFailedException e) {
- // it is not meaningful to continue - the credentials are for the server
- // do not pass the exception - it gives no additional meaningful user information
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_AUTHENTICATION, NLS.bind(Messages.CacheManager_AuthenticationFaileFor_0, repositoryLocation), null));
- } catch (CoreException e) {
- useJar = false;
- // give up on a timeout - if we did not get a 404 on the jar, we will just prolong the pain
- // by (almost certainly) also timing out on the xml.
- if (e.getStatus() != null && e.getStatus().getException() != null) {
- Throwable ex = e.getStatus().getException();
- if (ex.getClass() == java.net.SocketTimeoutException.class)
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, NLS.bind(Messages.CacheManager_FailedCommunicationWithRepo_0, repositoryLocation), ex));
- }
- } catch (OperationCanceledException e) {
- // must pass this on
- throw e;
- } catch (Exception e) {
- // not ideal, just skip the jar on error, and try the xml instead - report errors for
- // the xml.
- useJar = false;
- }
- if (submonitor.isCanceled())
- throw new OperationCanceledException();
-
- if (useJar) {
- // There is a jar, and it should be used - cache is stale if it is xml based or
- // if older (irrespective of jar or xml).
- // Bug 269588 - also stale if remote reports 0
- stale = lastModifiedRemote > lastModified || (name != null && name.endsWith(XML_EXTENSION) || lastModifiedRemote <= 0);
- } else {
- // Also need to check remote XML file, and handle cancel, and errors
- // (Status is reported based on finding the XML file as giving up on certain errors
- // when checking for the jar may not be correct).
- try {
- lastModifiedRemote = getTransport().getLastModified(xmlLocation, submonitor.newChild(1));
- // if lastModifiedRemote is 0 - something is wrong in the communication stack, as
- // a FileNotFound exception should have been thrown.
- // bug 269588 - server may return 0 when file exists - site is not correctly configured
- if (lastModifiedRemote <= 0)
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Server returned lastModified <= 0 for " + xmlLocation)); //$NON-NLS-1$
-
- } catch (UserCancelledException e) {
- throw new OperationCanceledException();
- } catch (FileNotFoundException e) {
- throw new FileNotFoundException(NLS.bind(Messages.CacheManager_Neither_0_nor_1_found, jarLocation, xmlLocation));
- } catch (AuthenticationFailedException e) {
- // do not pass the exception, it provides no additional meaningful user information
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_AUTHENTICATION, NLS.bind(Messages.CacheManager_AuthenticationFaileFor_0, repositoryLocation), null));
- } catch (CoreException e) {
- IStatus status = e.getStatus();
- if (status == null)
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, NLS.bind(Messages.CacheManager_FailedCommunicationWithRepo_0, repositoryLocation), e));
- else if (status.getException() instanceof FileNotFoundException)
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, status.getMessage(), null));
- throw new ProvisionException(status);
-
- }
- // There is an xml, and it should be used - cache is stale if it is jar based or
- // if older (irrespective of jar or xml).
- // bug 269588 - server may return 0 when file exists - assume it is stale
- stale = lastModifiedRemote > lastModified || (name != null && name.endsWith(JAR_EXTENSION) || lastModifiedRemote <= 0);
- useExtension = XML_EXTENSION;
- remoteFile = xmlLocation;
- }
-
- if (!stale)
- return cacheFile;
-
- // The cache is stale or missing, so we need to update it from the remote location
- cacheFile = new File(getCacheDirectory(), prefix + hashCode + useExtension);
- updateCache(cacheFile, remoteFile, lastModifiedRemote, submonitor);
- return cacheFile;
- } finally {
- submonitor.done();
- }
- }
-
- /**
- * Deletes the local cache file(s) for the given repository
- * @param repositoryLocation
- */
- void deleteCache(URI repositoryLocation) {
- for (Iterator it = knownPrefixes.iterator(); it.hasNext();) {
- String prefix = (String) it.next();
- File[] cacheFiles = getCacheFiles(repositoryLocation, prefix);
- for (int i = 0; i < cacheFiles.length; i++) {
- // delete the cache file if it exists
- safeDelete(cacheFiles[i]);
- // delete a resumable download if it exists
- safeDelete(new File(new File(cacheFiles[i].getParentFile(), DOWNLOADING), cacheFiles[i].getName()));
- }
- }
- }
-
- /**
- * Determines the local file path of the repository's cache file.
- * @param repositoryLocation The location to compute the cache for
- * @param prefix The prefix to use for this location
- * @return A {@link File} pointing to the cache file or <code>null</code> if
- * the cache file does not exist.
- */
- private File getCache(URI repositoryLocation, String prefix) {
- File[] files = getCacheFiles(repositoryLocation, prefix);
- if (files[0].exists())
- return files[0];
- return files[1].exists() ? files[1] : null;
- }
-
- /**
- * Returns the file corresponding to the data area to be used by the cache manager.
- */
- private File getCacheDirectory() {
- AgentLocation agentLocation = (AgentLocation) ServiceHelper.getService(Activator.getContext(), AgentLocation.class.getName());
- URL dataArea = agentLocation.getDataArea(Activator.ID + "/cache/"); //$NON-NLS-1$
- return URLUtil.toFile(dataArea);
- }
-
- /**
- * Determines the local file paths of the repository's potential cache files.
- * @param repositoryLocation The location to compute the cache for
- * @param prefix The prefix to use for this location
- * @return A {@link File} array with the cache files for JAR and XML extensions.
- */
- private File[] getCacheFiles(URI repositoryLocation, String prefix) {
- File[] files = new File[2];
- File dataAreaFile = getCacheDirectory();
- int hashCode = computeHash(repositoryLocation);
- files[0] = new File(dataAreaFile, prefix + hashCode + JAR_EXTENSION);
- files[1] = new File(dataAreaFile, prefix + hashCode + XML_EXTENSION);
- return files;
- }
-
- private RepositoryTransport getTransport() {
- return RepositoryTransport.getInstance();
- }
-
- public boolean isResumeEnabled() {
- String resumeProp = System.getProperty(PROP_RESUMABLE, RESUME_DEFAULT);
- return Boolean.valueOf(resumeProp).booleanValue();
- }
-
- /**
- * Make cacheFile resumable and return true if it was possible.
- * @param cacheFile - the partially downloaded file to make resumeable
- * @param remoteFile The remote file being cached
- * @param status - the download status reported for the partial download
- * @return true if the file was made resumable, false otherwise
- */
- private boolean makeResumeable(File cacheFile, URI remoteFile, IStatus status) {
- if (status == null || status.isOK() || cacheFile == null || !(status instanceof DownloadStatus))
- return false;
- // check if resume feature is turned off
- if (!isResumeEnabled())
- return false;
- DownloadStatus downloadStatus = (DownloadStatus) status;
- long currentLength = cacheFile.length();
- // if cache file does not exist, or nothing was written to it, there is nothing to resume
- if (currentLength == 0L)
- return false;
-
- long reportedSize = downloadStatus.getFileSize();
- long reportedModified = downloadStatus.getLastModified();
-
- if (reportedSize == DownloadStatus.UNKNOWN_SIZE || reportedSize == 0L) {
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, NLS.bind("Download of {0} not resumable because filesize not reported.", remoteFile))); //$NON-NLS-1$
- return false;
- }
- if (reportedModified <= 0) {
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, NLS.bind("Download of {0} not resumable because last-modified not reported.", remoteFile))); //$NON-NLS-1$
- return false;
- }
-
- // if more than what was reported has been written something odd is going on, and we can't
- // trust the reported size.
- // There is a small chance that user canceled in the time window after the full download is seen, and the result is returned. In this
- // case the reported and current lengths will be equal.
- if (reportedSize < currentLength) {
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, NLS.bind("Download of {0} not resumable because more was read then reported size.", remoteFile))); //$NON-NLS-1$
- return false;
- }
- File resumeDir = new File(cacheFile.getParentFile(), DOWNLOADING);
- if (!resumeDir.mkdir()) {
- if (!(resumeDir.exists() && resumeDir.isDirectory())) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind("Could not create directory {0} for resumable download of {1}", resumeDir, remoteFile))); //$NON-NLS-1$
- return false;
- }
- }
- // move partial cache file to "downloading" directory
- File resumeFile = new File(resumeDir, cacheFile.getName());
- if (!cacheFile.renameTo(resumeFile)) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind("Could not move {0} to {1} for resumed download", cacheFile, resumeFile))); //$NON-NLS-1$
- return false;
- }
- // touch the file with remote modified time
- if (!resumeFile.setLastModified(reportedModified)) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind("Could not set last modified time on {0} for resumed download", resumeFile))); //$NON-NLS-1$
- return false;
- }
- return true;
- }
-
- /**
- * Adds a {@link SynchronousProvisioningListener} to the event bus for
- * deleting cache files when the corresponding repository is deleted.
- */
- public void registerRepoEventListener() {
- IProvisioningEventBus eventBus = (IProvisioningEventBus) ServiceHelper.getService(Activator.getContext(), IProvisioningEventBus.SERVICE_NAME);
- if (eventBus == null) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "ProvisioningEventBus could not be obtained. Metadata caches may not be cleaned up properly.")); //$NON-NLS-1$
- return;
- }
- if (busListener == null) {
- busListener = new SynchronousProvisioningListener() {
- public void notify(EventObject o) {
- if (o instanceof RepositoryEvent) {
- RepositoryEvent event = (RepositoryEvent) o;
- if (RepositoryEvent.REMOVED == event.getKind() && IRepository.TYPE_METADATA == event.getRepositoryType()) {
- deleteCache(event.getRepositoryLocation());
- }
- }
- }
- };
- }
- // the bus could have disappeared and is now back again - so do this every time
- eventBus.addListener(busListener);
- }
-
- private boolean safeDelete(File file) {
- if (file.exists()) {
- if (!file.delete()) {
- file.deleteOnExit();
- return true;
- }
- }
- return false;
- }
-
- /**
- * Removes the {@link SynchronousProvisioningListener} that cleans up the
- * cache file from the event bus.
- */
- public void unregisterRepoEventListener() {
- IProvisioningEventBus eventBus = (IProvisioningEventBus) ServiceHelper.getService(Activator.getContext(), IProvisioningEventBus.SERVICE_NAME);
- if (eventBus != null && busListener != null) {
- eventBus.removeListener(busListener);
- busListener = null;
- }
- }
-
- private void updateCache(File cacheFile, URI remoteFile, long lastModifiedRemote, SubMonitor submonitor) throws FileNotFoundException, IOException, ProvisionException {
- cacheFile.getParentFile().mkdirs();
- File resumeFile = new File(new File(cacheFile.getParentFile(), DOWNLOADING), cacheFile.getName());
- // if append should be performed or not
- boolean append = false;
- if (resumeFile.exists()) {
- // the resume file can be too old
- if (lastModifiedRemote != resumeFile.lastModified() || lastModifiedRemote <= 0)
- safeDelete(resumeFile);
- else {
- if (resumeFile.renameTo(cacheFile))
- append = true;
- else
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind("Could not move resumable file {0} into cache", resumeFile))); //$NON-NLS-1$
- }
- }
-
- StatefulStream metadata = new StatefulStream(new FileOutputStream(cacheFile, append));
- IStatus result = null;
- try {
- submonitor.setWorkRemaining(1000);
- // resume from cache file's length if in append mode
- result = getTransport().download(remoteFile, metadata, append ? cacheFile.length() : -1, submonitor.newChild(1000));
- } catch (OperationCanceledException e) {
- // need to pick up the status - a new operation canceled exception is thrown at the end
- // as status will be CANCEL.
- result = metadata.getStatus();
- } finally {
- metadata.close();
- // result is null if a runtime error (other than OperationCanceledException)
- // occurred, just delete the cache file (or a later attempt could fail
- // with "premature end of file").
- if (result == null)
- cacheFile.delete();
- }
- if (result.isOK())
- return;
-
- // if possible, keep a partial download to be resumed.
- if (!makeResumeable(cacheFile, remoteFile, result))
- cacheFile.delete();
-
- if (result.getSeverity() == IStatus.CANCEL || submonitor.isCanceled())
- throw new OperationCanceledException();
- throw new ProvisionException(result);
- }
-}
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 98dce0085..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java
+++ /dev/null
@@ -1,294 +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.repository;
-
-import org.eclipse.equinox.internal.provisional.p2.repository.ICompositeRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
-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.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.persistence.CompositeRepositoryIO;
-import org.eclipse.equinox.internal.p2.persistence.CompositeRepositoryState;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.AbstractMetadataRepository;
-import org.eclipse.osgi.util.NLS;
-
-public class CompositeMetadataRepository extends AbstractMetadataRepository implements IMetadataRepository, ICompositeRepository {
-
- 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 childrenURIs = new ArrayList();
- // keep a list of the repositories that we have successfully loaded
- private List loadedRepos = new ArrayList();
-
- /**
- * Create a Composite repository in memory.
- * @return the repository or null if unable to create one
- */
- public static CompositeMetadataRepository createMemoryComposite() {
- IMetadataRepositoryManager manager = getManager();
- if (manager == 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 (manager.contains(repositoryURI))
- repositoryURI = new URI("memory:" + String.valueOf(++time)); //$NON-NLS-1$
-
- CompositeMetadataRepository result = (CompositeMetadataRepository) manager.createRepository(repositoryURI, repositoryURI.toString(), IMetadataRepositoryManager.TYPE_COMPOSITE_REPOSITORY, null);
- manager.removeRepository(repositoryURI);
- return result;
- } catch (ProvisionException e) {
- // just return null
- LogHelper.log(e);
- } catch (URISyntaxException e) {
- // just return null
- }
- return null;
- }
-
- static private IMetadataRepositoryManager getManager() {
- return (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
- }
-
- private boolean isLocal() {
- return "file".equalsIgnoreCase(location.getScheme()); //$NON-NLS-1$
- }
-
- public boolean isModifiable() {
- return isLocal();
- }
-
- public CompositeMetadataRepository(URI location, String name, Map properties) {
- super(name == null ? (location != null ? location.toString() : "") : name, REPOSITORY_TYPE, REPOSITORY_VERSION.toString(), location, null, null, properties); //$NON-NLS-1$
- //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.
- */
- public CompositeMetadataRepository(CompositeRepositoryState state) {
- super(state.getName(), state.getType(), state.getVersion(), state.getLocation(), state.getDescription(), state.getProvider(), state.getProperties());
- 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((URI[]) childrenURIs.toArray(new URI[childrenURIs.size()]));
- return result;
- }
-
- public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
- if (monitor == null)
- monitor = new NullProgressMonitor();
- try {
- // Query all the all the repositories this composite repo contains
- CompoundQueryable queryable = new CompoundQueryable((IQueryable[]) loadedRepos.toArray(new IQueryable[loadedRepos.size()]));
- collector = queryable.query(query, collector, monitor);
- } finally {
- if (monitor != null)
- monitor.done();
- }
- return collector;
- }
-
- private void addChild(URI childURI, boolean save) {
- URI absolute = URIUtil.makeAbsolute(childURI, location);
- 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);
- }
- }
-
- public void addChild(URI childURI) {
- addChild(childURI, true);
- }
-
- 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, location) : URIUtil.makeAbsolute(childURI, location);
- 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 (Iterator iter = loadedRepos.iterator(); found == null && iter.hasNext();) {
- IMetadataRepository current = (IMetadataRepository) iter.next();
- URI repoLocation = current.getLocation();
- if (URIUtil.sameURI(childURI, repoLocation))
- found = current;
- else if (URIUtil.sameURI(other, repoLocation))
- found = current;
- }
- if (found != null)
- loadedRepos.remove(found);
- save();
- }
- }
-
- public void removeAllChildren() {
- childrenURIs.clear();
- loadedRepos.clear();
- save();
- }
-
- public synchronized void addInstallableUnits(IInstallableUnit[] installableUnits) {
- throw new UnsupportedOperationException("Cannot add IUs to a composite repository");
- }
-
- public synchronized void removeAll() {
- throw new UnsupportedOperationException("Cannot remove IUs to a composite repository");
- }
-
- public synchronized boolean removeInstallableUnits(Query query, IProgressMonitor monitor) {
- throw new UnsupportedOperationException("Cannot remove IUs to a composite repository");
- }
-
- 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);
- }
-
- public synchronized void addReference(URI repositoryLocation, int repositoryType, int options) {
- throw new UnsupportedOperationException("Cannot add References to a composite repository");
- }
-
- // caller should be synchronized
- private void save() {
- if (!isModifiable())
- return;
- File file = getActualLocation(location);
- File jarFile = getActualLocation(location, JAR_EXTENSION);
- boolean compress = "true".equalsIgnoreCase((String) properties.get(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, location), e));
- }
- }
-
- public List getChildren() {
- List result = new ArrayList();
- for (Iterator iter = childrenURIs.iterator(); iter.hasNext();)
- result.add(URIUtil.makeAbsolute((URI) iter.next(), location));
- 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) {
- this.name = state.Name;
- this.type = state.Type;
- this.version = state.Version.toString();
- this.provider = state.Provider;
- this.description = state.Description;
- this.location = state.Location;
- this.properties = state.Properties;
- }
-}
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 c2560bbc3..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepositoryFactory.java
+++ /dev/null
@@ -1,163 +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;
-
-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.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.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 properties) {
- return new CompositeMetadataRepository(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 = 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
- localFile = Activator.getCacheManager().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.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory#validate(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus validate(URI location, IProgressMonitor monitor) {
- try {
- validateAndLoad(location, false, 0, monitor);
- } catch (ProvisionException e) {
- return e.getStatus();
- }
- return Status.OK_STATUS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory#load(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IMetadataRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
- return validateAndLoad(location, true, flags, monitor);
- }
-
- protected IMetadataRepository validateAndLoad(URI location, boolean doLoad, 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);
- if (doLoad) {
- 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(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();
- }
- return null;
- }
-
- /**
- * 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 6f9e61de7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java
+++ /dev/null
@@ -1,220 +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.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-
-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.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.AbstractMetadataRepository;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.RepositoryReference;
-
-/**
- * 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 {
-
- 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 HashSet units = new LinkedHashSet();
- protected HashSet repositories = new HashSet();
-
- 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() {
- super();
- }
-
- /**
- * 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(URI location, String name, Map properties) {
- super(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();
- }
-
- public synchronized void addInstallableUnits(IInstallableUnit[] installableUnits) {
- if (installableUnits == null || installableUnits.length == 0)
- return;
- units.addAll(Arrays.asList(installableUnits));
- save();
- }
-
- public synchronized void addReference(URI repositoryLocation, String nickname, int repositoryType, int options) {
- assertModifiable();
- repositories.add(new RepositoryReference(repositoryLocation, nickname, repositoryType, options));
- }
-
- public void initialize(RepositoryState state) {
- synchronized (this) {
- this.name = state.Name;
- this.type = state.Type;
- this.version = state.Version.toString();
- this.provider = state.Provider;
- this.description = state.Description;
- this.location = state.Location;
- this.properties = state.Properties;
- this.units.addAll(Arrays.asList(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) ServiceHelper.getService(Activator.getContext(), IProvisioningEventBus.SERVICE_NAME);
- if (bus == null)
- return;
-
- List repositoriesSnapshot = createRepositoriesSnapshot();
- for (Iterator it = repositoriesSnapshot.iterator(); it.hasNext();) {
- RepositoryReference reference = (RepositoryReference) it.next();
- boolean isEnabled = (reference.Options & IRepository.ENABLED) != 0;
- bus.publishEvent(new RepositoryEvent(reference.Location, reference.Type, RepositoryEvent.DISCOVERED, isEnabled));
- }
- }
-
- private synchronized List createRepositoriesSnapshot() {
- if (repositories.isEmpty())
- return Collections.EMPTY_LIST;
- return new ArrayList(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) {
- this.location = aLocation;
- }
-
- public boolean isModifiable() {
- return true;
- }
-
- public synchronized Collector query(Query query, Collector collector, IProgressMonitor monitor) {
- return query.perform(units.iterator(), collector);
- }
-
- public synchronized void removeAll() {
- units.clear();
- save();
- }
-
- public synchronized boolean removeInstallableUnits(Query query, IProgressMonitor monitor) {
- boolean changed = false;
- Collector results = query.perform(units.iterator(), new Collector());
- if (results.size() > 0) {
- changed = true;
- units.removeAll(results.toCollection());
- }
- if (changed)
- save();
- return changed;
- }
-
- // caller should be synchronized
- private void save() {
- File file = getActualLocation(location);
- File jarFile = getActualLocation(location, JAR_EXTENSION);
- boolean compress = "true".equalsIgnoreCase((String) properties.get(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().write(this, output);
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_WRITE, "Error saving metadata repository: " + location, e)); //$NON-NLS-1$
- }
- }
-
- 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) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
- if (manager.removeRepository(getLocation()))
- manager.addRepository(this);
- return oldValue;
- }
-}
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 56712b7f2..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Messages.java
+++ /dev/null
@@ -1,41 +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;
-
-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 CacheManager_AuthenticationFaileFor_0;
- public static String CacheManager_FailedCommunicationWithRepo_0;
- public static String CacheManager_Neither_0_nor_1_found;
- public static String io_failedRead;
- public static String io_failedWrite;
-
- public static String io_IncompatibleVersion;
- public static String io_parseError;
-
- public static String repo_loading;
-
- public static String repoMan_internalError;
- public static String repoMan_notExists;
- public static String repoMan_invalidLocation;
- public static String repoMan_relativeLocation;
-
-}
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 b123f4d62..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryIO.java
+++ /dev/null
@@ -1,337 +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 java.io.*;
-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.internal.provisional.p2.core.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.AbstractMetadataRepository;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.RepositoryReference;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.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 {
-
- /**
- * 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 = new Version(1, 0, 0);
- public static final Version CURRENT_VERSION = new Version(1, 1, 0);
- public static final VersionRange XML_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, new Version(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 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());
- Collector units = repository.query(InstallableUnitQuery.ANY, new Collector(), null);
- if (repository instanceof LocalMetadataRepository) {
- Set references = ((LocalMetadataRepository) repository).repositories;
- writeRepositoryReferences(references.iterator(), references.size());
- }
- writeInstallableUnits(units.iterator(), units.size());
-
- end(REPOSITORY_ELEMENT);
- flush();
- }
-
- /**
- * Writes a list of {@link RepositoryReference}.
- * @param references An Iterator of {@link RepositoryReference}.
- * @param size The number of references to write
- */
- protected void writeRepositoryReferences(Iterator references, int size) {
- if (size == 0)
- return;
- start(REPOSITORY_REFERENCES_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, size);
- while (references.hasNext())
- writeRepositoryReference((RepositoryReference) references.next());
- end(REPOSITORY_REFERENCES_ELEMENT);
- }
-
- private void writeRepositoryReference(RepositoryReference reference) {
- start(REPOSITORY_REFERENCE_ELEMENT);
- attribute(URI_ATTRIBUTE, reference.Location.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.Location).toExternalForm());
- } catch (MalformedURLException e) {
- attribute(URL_ATTRIBUTE, reference.Location.toString());
- }
-
- attribute(TYPE_ATTRIBUTE, Integer.toString(reference.Type));
- attribute(OPTIONS_ATTRIBUTE, Integer.toString(reference.Options));
- 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 RepositoryReference[0] : repositoryReferencesHandler.getReferences();
- try {
- //can't create repository if missing type - this is already logged when parsing attributes
- if (state.Type == null)
- return;
- Class clazz = Class.forName(state.Type);
- Object repositoryObject = clazz.newInstance();
- if (repositoryObject instanceof AbstractMetadataRepository) {
- repository = (AbstractMetadataRepository) repositoryObject;
- repository.initialize(state);
- }
- } catch (InstantiationException e) {
- // TODO: Throw a SAXException
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- // TODO: Throw a SAXException
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- // TODO: Throw a SAXException
- e.printStackTrace();
- }
- }
- }
- }
-
- 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 1c413778c..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryManager.java
+++ /dev/null
@@ -1,171 +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.repository;
-
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Default implementation of {@link IMetadataRepositoryManager}.
- */
-public class MetadataRepositoryManager extends AbstractRepositoryManager implements IMetadataRepositoryManager {
-
- public MetadataRepositoryManager() {
- super();
- }
-
- public void addRepository(IMetadataRepository repository) {
- super.addRepository(repository, true, null);
- }
-
- public IMetadataRepository createRepository(URI location, String name, String type, Map properties) throws ProvisionException {
- return (IMetadataRepository) doCreateRepository(location, name, type, properties);
- }
-
- protected IRepository factoryCreate(URI location, String name, String type, Map properties, IExtension extension) throws ProvisionException {
- MetadataRepositoryFactory factory = (MetadataRepositoryFactory) createExecutableExtension(extension, EL_FACTORY);
- if (factory == null)
- return null;
- return factory.create(location, name, type, properties);
- }
-
- protected IRepository factoryLoad(URI location, IExtension extension, int flags, SubMonitor monitor) throws ProvisionException {
- MetadataRepositoryFactory factory = (MetadataRepositoryFactory) createExecutableExtension(extension, EL_FACTORY);
- if (factory == null)
- return null;
- 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;
- }
-
- /**
- * Restores metadata repositories specified as system properties.
- */
- protected String getRepositorySystemProperty() {
- return "eclipse.p2.metadataRepository"; //$NON-NLS-1$
- }
-
- protected int getRepositoryType() {
- return IRepository.TYPE_METADATA;
- }
-
- /**
- * @deprecated see {@link #loadRepository(URI, int, IProgressMonitor)}
- */
- 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);
- }
-
- /**
- * Performs a query against all of the installable units of each known
- * repository, accumulating any objects that satisfy the query in the
- * provided collector.
- * <p>
- * Note that using this method can be quite expensive, as every known
- * metadata repository will be loaded in order to query each one. If a
- * client wishes to query only certain repositories, it is better to use
- * {@link #getKnownRepositories(int)} to filter the list of repositories
- * loaded and then query each of the returned repositories.
- * <p>
- * This method is long-running; progress and cancellation are provided
- * by the given progress monitor.
- *
- * @param query The query to perform against each installable unit in each known repository
- * @param collector Collects the results of the query
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- * @return The collector argument
- */
- public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
- URI[] locations = getKnownRepositories(REPOSITORIES_ALL);
- List queryables = new ArrayList(locations.length); // use a list since we don't know exactly how many will load
- SubMonitor sub = SubMonitor.convert(monitor, locations.length * 10);
- for (int i = 0; i < locations.length; i++) {
- try {
- if (sub.isCanceled())
- throw new OperationCanceledException();
- queryables.add(loadRepository(locations[i], sub.newChild(9)));
- } catch (ProvisionException e) {
- //ignore this repository for this query
- }
- }
- try {
- IQueryable[] queryablesArray = (IQueryable[]) queryables.toArray(new IQueryable[queryables.size()]);
- CompoundQueryable compoundQueryable = new CompoundQueryable(queryablesArray);
- compoundQueryable.query(query, collector, sub.newChild(locations.length * 1));
- } finally {
- sub.done();
- }
- return collector;
- }
-
- public IMetadataRepository refreshRepository(URI location, IProgressMonitor monitor) throws ProvisionException {
- return (IMetadataRepository) basicRefreshRepository(location, monitor);
- }
-
- public IStatus validateRepositoryLocation(URI location, IProgressMonitor monitor) {
- if (!location.isAbsolute())
- return new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_INVALID_LOCATION, NLS.bind(Messages.repoMan_relativeLocation, location.toString()), null);
- IMetadataRepository result = getRepository(location);
- if (result != null)
- return Status.OK_STATUS;
- String[] suffixes = getAllSuffixes();
- SubMonitor sub = SubMonitor.convert(monitor, Messages.repo_loading, suffixes.length * 100);
- IStatus status = new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, NLS.bind(Messages.repoMan_notExists, location.toString()), null);
- for (int i = 0; i < suffixes.length; i++) {
- SubMonitor loopMonitor = sub.newChild(100);
- IExtension[] providers = findMatchingRepositoryExtensions(suffixes[i], null);
- // Loop over the candidates and return the first one that successfully loads
- loopMonitor.beginTask("", providers.length * 10); //$NON-NLS-1$
- for (int j = 0; j < providers.length; j++) {
- MetadataRepositoryFactory factory = (MetadataRepositoryFactory) createExecutableExtension(providers[j], EL_FACTORY);
- if (factory != null) {
- status = factory.validate(location, loopMonitor.newChild(10));
- if (status.isOK()) {
- sub.done();
- return status;
- }
- }
- }
-
- }
- sub.done();
- return status;
- }
-}
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 8e3a4021d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/URLMetadataRepository.java
+++ /dev/null
@@ -1,83 +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
- *******************************************************************************/
-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.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.AbstractMetadataRepository;
-
-/**
- * A metadata repository backed by an arbitrary URL.
- */
-public class URLMetadataRepository extends AbstractMetadataRepository {
-
- public static final String CONTENT_FILENAME = "content"; //$NON-NLS-1$
- 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 HashSet units = new LinkedHashSet();
-
- 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() {
- super();
- }
-
- public URLMetadataRepository(URI location, String name, Map properties) {
- super(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) {
- this.name = state.Name;
- this.type = state.Type;
- this.version = state.Version.toString();
- this.provider = state.Provider;
- this.description = state.Description;
- this.location = state.Location;
- this.properties = state.Properties;
- this.units.addAll(Arrays.asList(state.Units));
- }
-
- // Use this method to setup any transient fields etc after the object has been restored from a stream
- public synchronized void initializeAfterLoad(URI repoLocation) {
- this.location = repoLocation;
- content = getActualLocation(location);
- }
-
- public boolean isModifiable() {
- return false;
- }
-
- public synchronized Collector query(Query query, Collector collector, IProgressMonitor monitor) {
- return query.perform(units.iterator(), collector);
- }
-}
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 a8ec4d7ee..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java
+++ /dev/null
@@ -1,862 +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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository.io;
-
-import java.net.URI;
-import java.util.*;
-import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.p2.persistence.XMLParser;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.*;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.RepositoryReference;
-import org.osgi.framework.BundleContext;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-
-public abstract class MetadataParser extends XMLParser implements XMLConstants {
-
- public MetadataParser(BundleContext context, String bundleId) {
- super(context, bundleId);
- }
-
- protected class RepositoryReferencesHandler extends AbstractHandler {
- private HashSet references;
-
- public RepositoryReferencesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, REPOSITORY_REFERENCES_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- references = (size != null ? new HashSet(Integer.parseInt(size)) : new HashSet(4));
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(REPOSITORY_REFERENCE_ELEMENT)) {
- new RepositoryReferenceHandler(this, attributes, references);
- } else {
- invalidElement(name, attributes);
- }
- }
-
- public RepositoryReference[] getReferences() {
- return (RepositoryReference[]) references.toArray(new RepositoryReference[references.size()]);
- }
- }
-
- protected class RepositoryReferenceHandler extends AbstractHandler {
-
- private final String[] required = new String[] {TYPE_ATTRIBUTE, OPTIONS_ATTRIBUTE};
-
- public RepositoryReferenceHandler(AbstractHandler parentHandler, Attributes attributes, Set 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 AbstractHandler {
- private ArrayList units;
-
- public InstallableUnitsHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, INSTALLABLE_UNITS_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- units = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
- }
-
- public IInstallableUnit[] getUnits() {
- int size = units.size();
- IInstallableUnit[] result = new IInstallableUnit[size];
- int i = 0;
- for (Iterator it = units.iterator(); it.hasNext(); i++) {
- InstallableUnitDescription desc = (InstallableUnitDescription) it.next();
- 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 units;
-
- public InstallableUnitHandler(AbstractHandler parentHandler, Attributes attributes, List 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 (REQUIRED_CAPABILITIES_ELEMENT.equals(name)) {
- if (requiredCapabilitiesHandler == null) {
- requiredCapabilitiesHandler = new RequiredCapabilitiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (HOST_REQUIRED_CAPABILITIES_ELEMENT.equals(name)) {
- if (hostRequiredCapabilitiesHandler == null) {
- hostRequiredCapabilitiesHandler = new HostRequiredCapabilitiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (META_REQUIRED_CAPABILITIES_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((IRequirementChange[]) 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 (Enumeration e = properties.keys(); e.hasMoreElements();) {
- String key = (String) e.nextElement();
- String value = properties.getProperty(key);
- //Backward compatibility
- if (key.equals("equinox.p2.update.from")) {
- updateFrom = value;
- continue;
- }
- if (key.equals("equinox.p2.update.range")) {
- 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) {
- ILicense license = licensesHandler.getLicense();
- currentUnit.setLicense(license);
- }
-
- if (copyrightHandler != null) {
- ICopyright copyright = copyrightHandler.getCopyright();
- currentUnit.setCopyright(copyright);
- }
-
- IProvidedCapability[] providedCapabilities = (providedCapabilitiesHandler == null ? new IProvidedCapability[0] : providedCapabilitiesHandler.getProvidedCapabilities());
- currentUnit.setCapabilities(providedCapabilities);
- IRequiredCapability[] requiredCapabilities = (requiredCapabilitiesHandler == null ? new IRequiredCapability[0] : requiredCapabilitiesHandler.getRequiredCapabilities());
- currentUnit.setRequiredCapabilities(requiredCapabilities);
- IRequiredCapability[] metaRequiredCapabilities = (metaRequiredCapabilitiesHandler == null ? new IRequiredCapability[0] : metaRequiredCapabilitiesHandler.getMetaRequiredCapabilities());
- currentUnit.setMetaRequiredCapabilities(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 AbstractHandler {
- private List scopes;
-
- public ApplicabilityScopesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, APPLICABILITY_SCOPE);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- scopes = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
- }
-
- public void startElement(String name, Attributes attributes) {
- if (APPLY_ON.equals(name)) {
- new ApplicabilityScopeHandler(this, attributes, scopes);
- } else {
- duplicateElement(this, name, attributes);
- }
- }
-
- public IRequiredCapability[][] getScope() {
- return (IRequiredCapability[][]) scopes.toArray(new IRequiredCapability[scopes.size()][]);
- }
- }
-
- protected class ApplicabilityScopeHandler extends AbstractHandler {
- private RequiredCapabilitiesHandler children;
- private List scopes;
-
- public ApplicabilityScopeHandler(AbstractHandler parentHandler, Attributes attributes, List scopes) {
- super(parentHandler, APPLY_ON);
- this.scopes = scopes;
- }
-
- public void startElement(String name, Attributes attributes) {
- if (REQUIRED_CAPABILITIES_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 AbstractHandler {
- private List requirementChanges;
-
- public RequirementsChangeHandler(InstallableUnitHandler parentHandler, Attributes attributes) {
- super(parentHandler, REQUIREMENT_CHANGES);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- requirementChanges = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(REQUIREMENT_CHANGE)) {
- new RequirementChangeHandler(this, attributes, requirementChanges);
- } else {
- invalidElement(name, attributes);
- }
- }
-
- public List getRequirementChanges() {
- return requirementChanges;
- }
- }
-
- protected class RequirementChangeHandler extends AbstractHandler {
- private List from;
- private List to;
- private List requirementChanges;
-
- public RequirementChangeHandler(AbstractHandler parentHandler, Attributes attributes, List requirementChanges) {
- super(parentHandler, REQUIREMENT_CHANGE);
- from = new ArrayList(1);
- to = new ArrayList(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 : (IRequiredCapability) from.get(0), to.size() == 0 ? null : (IRequiredCapability) to.get(0)));
- }
- }
-
- protected class RequirementChangeEltHandler extends AbstractHandler {
- private List requirement;
-
- public RequirementChangeEltHandler(AbstractHandler parentHandler, String parentId, Attributes attributes, List from) {
- super(parentHandler, parentId);
- requirement = from;
- }
-
- public void startElement(String name, Attributes attributes) {
- if (REQUIRED_CAPABILITY_ELEMENT.equals(name))
- new RequiredCapabilityHandler(this, attributes, requirement);
- else {
- invalidElement(name, attributes);
- }
- }
-
- }
-
- protected class LifeCycleHandler extends AbstractHandler {
- private List lifeCycleRequirement;
-
- public LifeCycleHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, LIFECYCLE);
- lifeCycleRequirement = new ArrayList(1);
- }
-
- public IRequiredCapability getLifeCycleRequirement() {
- if (lifeCycleRequirement.size() == 0)
- return null;
- return (IRequiredCapability) lifeCycleRequirement.get(0);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (REQUIRED_CAPABILITY_ELEMENT.equals(name)) {
- new RequiredCapabilityHandler(this, attributes, lifeCycleRequirement);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class ProvidedCapabilitiesHandler extends AbstractHandler {
- private List providedCapabilities;
-
- public ProvidedCapabilitiesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, PROVIDED_CAPABILITIES_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- providedCapabilities = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
- }
-
- public IProvidedCapability[] getProvidedCapabilities() {
- return (IProvidedCapability[]) 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 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 AbstractHandler {
- private List requiredCapabilities;
-
- public HostRequiredCapabilitiesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, HOST_REQUIRED_CAPABILITIES_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- requiredCapabilities = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
- }
-
- public IRequiredCapability[] getHostRequiredCapabilities() {
- return (IRequiredCapability[]) requiredCapabilities.toArray(new IRequiredCapability[requiredCapabilities.size()]);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(REQUIRED_CAPABILITY_ELEMENT)) {
- new RequiredCapabilityHandler(this, attributes, requiredCapabilities);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class MetaRequiredCapabilitiesHandler extends AbstractHandler {
- private List requiredCapabilities;
-
- public MetaRequiredCapabilitiesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, META_REQUIRED_CAPABILITIES_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- requiredCapabilities = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
- }
-
- public IRequiredCapability[] getMetaRequiredCapabilities() {
- return (IRequiredCapability[]) requiredCapabilities.toArray(new IRequiredCapability[requiredCapabilities.size()]);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(REQUIRED_CAPABILITY_ELEMENT)) {
- new RequiredCapabilityHandler(this, attributes, requiredCapabilities);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class RequiredCapabilitiesHandler extends AbstractHandler {
- private List requiredCapabilities;
-
- public RequiredCapabilitiesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, REQUIRED_CAPABILITIES_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- requiredCapabilities = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
- }
-
- public IRequiredCapability[] getRequiredCapabilities() {
- return (IRequiredCapability[]) requiredCapabilities.toArray(new IRequiredCapability[requiredCapabilities.size()]);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(REQUIRED_CAPABILITY_ELEMENT)) {
- new RequiredCapabilityHandler(this, attributes, requiredCapabilities);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class RequiredCapabilityHandler extends AbstractHandler {
-
- private IRequiredCapability currentCapability = null;
-
- private TextHandler filterHandler = null;
- private CapabilitySelectorsHandler selectorsHandler = null;
-
- public RequiredCapabilityHandler(AbstractHandler parentHandler, Attributes attributes, List capabilities) {
- super(parentHandler, REQUIRED_CAPABILITY_ELEMENT);
- String[] values = parseAttributes(attributes, REQIURED_CAPABILITY_ATTRIBUTES, OPTIONAL_CAPABILITY_ATTRIBUTES);
- VersionRange range = checkVersionRange(REQUIRED_CAPABILITY_ELEMENT, VERSION_RANGE_ATTRIBUTE, values[2]);
- boolean isOptional = checkBoolean(REQUIRED_CAPABILITY_ELEMENT, CAPABILITY_OPTIONAL_ATTRIBUTE, values[3], false).booleanValue();
- boolean isMultiple = checkBoolean(REQUIRED_CAPABILITY_ELEMENT, CAPABILITY_MULTIPLE_ATTRIBUTE, values[4], false).booleanValue();
- boolean isGreedy = checkBoolean(REQUIRED_CAPABILITY_ELEMENT, CAPABILITY_GREED_ATTRIBUTE, values[5], true).booleanValue();
- currentCapability = MetadataFactory.createRequiredCapability(values[0], values[1], range, null, isOptional, isMultiple, isGreedy);
- capabilities.add(currentCapability);
- }
-
- 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(CAPABILITY_SELECTORS_ELEMENT)) {
- selectorsHandler = new CapabilitySelectorsHandler(this, attributes);
- } else {
- invalidElement(name, attributes);
- }
- }
-
- protected void finished() {
- if (isValidXML()) {
- if (currentCapability != null) {
- if (filterHandler != null) {
- currentCapability.setFilter(filterHandler.getText());
- }
- if (selectorsHandler != null) {
- currentCapability.setSelectors(selectorsHandler.getSelectors());
- }
- }
- }
- }
- }
-
- protected class ArtifactsHandler extends AbstractHandler {
-
- private List artifacts;
-
- public ArtifactsHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, ARTIFACT_KEYS_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- artifacts = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
- }
-
- public IArtifactKey[] getArtifactKeys() {
- return (IArtifactKey[]) 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 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 CapabilitySelectorsHandler extends AbstractHandler {
-
- private List selectors;
-
- public CapabilitySelectorsHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, CAPABILITY_SELECTORS_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- selectors = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
- }
-
- public String[] getSelectors() {
- return (String[]) selectors.toArray(new String[selectors.size()]);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(CAPABILITY_SELECTOR_ELEMENT)) {
- new TextHandler(this, CAPABILITY_SELECTOR_ELEMENT, attributes, selectors);
- } else {
- 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 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(new Integer(size).intValue()) : new ArrayList(4));
- }
-
- public ITouchpointData[] getTouchpointData() {
- ITouchpointData[] result = new ITouchpointData[data.size()];
- for (int i = 0; i < result.length; i++)
- result[i] = ((TouchpointInstructionsHandler) 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 instructions = null;
-
- public TouchpointInstructionsHandler(AbstractHandler parentHandler, Attributes attributes, List data) {
- super(parentHandler, TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- instructions = (size != null ? new LinkedHashMap(new Integer(size).intValue()) : new LinkedHashMap(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 instructions = null;
- String key = null;
- String qualifier = null;
-
- public TouchpointInstructionHandler(AbstractHandler parentHandler, Attributes attributes, Map 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[] required = new String[] {ID_ATTRIBUTE, VERSION_RANGE_ATTRIBUTE};
- private final String[] optional = new String[] {UPDATE_DESCRIPTOR_SEVERITY, DESCRIPTION_ATTRIBUTE};
-
- private IUpdateDescriptor descriptor;
-
- public UpdateDescriptorHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, INSTALLABLE_UNIT_ELEMENT);
- String[] values = parseAttributes(attributes, required, optional);
- VersionRange range = checkVersionRange(REQUIRED_CAPABILITY_ELEMENT, VERSION_RANGE_ATTRIBUTE, values[1]);
- int severity = new Integer(values[2]).intValue();
- descriptor = MetadataFactory.createUpdateDescriptor(values[0], range, severity, values[3]);
- }
-
- 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 licenses;
-
- public LicensesHandler(ContentHandler parentHandler, Attributes attributes) {
- super(parentHandler, LICENSES_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- licenses = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(2));
- }
-
- public ILicense getLicense() {
- if (licenses.size() == 0)
- return null;
- return (ILicense) licenses.get(0);
- }
-
- 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 licenses;
-
- public LicenseHandler(AbstractHandler parentHandler, Attributes attributes, List 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;
- }
- }
-}
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 7879ab7b7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java
+++ /dev/null
@@ -1,311 +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.Iterator;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.metadata.repository.Activator;
-import org.eclipse.equinox.internal.p2.persistence.XMLWriter;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-
-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 units, int size) {
- if (size == 0)
- return;
- start(INSTALLABLE_UNITS_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, size);
- while (units.hasNext())
- writeInstallableUnit((IInstallableUnit) 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);
-
- if (iu.isFragment() && iu instanceof IInstallableUnitFragment) {
- IInstallableUnitFragment fragment = (IInstallableUnitFragment) iu;
- writeHostRequiredCapabilities(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());
- writeMetaRequiredCapabilities(iu.getMetaRequiredCapabilities());
- writeProvidedCapabilities(iu.getProvidedCapabilities());
- writeRequiredCapabilities(iu.getRequiredCapabilities());
- writeTrimmedCdata(IU_FILTER_ELEMENT, iu.getFilter());
-
- writeArtifactKeys(iu.getArtifacts());
- writeTouchpointType(iu.getTouchpointType());
- writeTouchpointData(iu.getTouchpointData());
- writeLicenses(iu.getLicense());
- writeCopyright(iu.getCopyright());
-
- end(INSTALLABLE_UNIT_ELEMENT);
- }
-
- protected void writeLifeCycle(IRequiredCapability capability) {
- if (capability == null)
- return;
- start(LIFECYCLE);
- writeRequiredCapability(capability);
- end(LIFECYCLE);
- }
-
- protected void writeHostRequiredCapabilities(IRequiredCapability[] capabilities) {
- if (capabilities != null && capabilities.length > 0) {
- start(HOST_REQUIRED_CAPABILITIES_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, capabilities.length);
- for (int i = 0; i < capabilities.length; i++) {
- writeRequiredCapability(capabilities[i]);
- }
- end(HOST_REQUIRED_CAPABILITIES_ELEMENT);
- }
- }
-
- protected void writeProvidedCapabilities(IProvidedCapability[] capabilities) {
- if (capabilities != null && capabilities.length > 0) {
- start(PROVIDED_CAPABILITIES_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, capabilities.length);
- for (int i = 0; i < capabilities.length; i++) {
- start(PROVIDED_CAPABILITY_ELEMENT);
- attribute(NAMESPACE_ATTRIBUTE, capabilities[i].getNamespace());
- attribute(NAME_ATTRIBUTE, capabilities[i].getName());
- attribute(VERSION_ATTRIBUTE, capabilities[i].getVersion());
- end(PROVIDED_CAPABILITY_ELEMENT);
- }
- end(PROVIDED_CAPABILITIES_ELEMENT);
- }
- }
-
- protected void writeMetaRequiredCapabilities(IRequiredCapability[] capabilities) {
- if (capabilities != null && capabilities.length > 0) {
- start(META_REQUIRED_CAPABILITIES_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, capabilities.length);
- for (int i = 0; i < capabilities.length; i++) {
- writeRequiredCapability(capabilities[i]);
- }
- end(META_REQUIRED_CAPABILITIES_ELEMENT);
- }
- }
-
- protected void writeRequiredCapabilities(IRequiredCapability[] capabilities) {
- if (capabilities != null && capabilities.length > 0) {
- start(REQUIRED_CAPABILITIES_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, capabilities.length);
- for (int i = 0; i < capabilities.length; i++) {
- writeRequiredCapability(capabilities[i]);
- }
- end(REQUIRED_CAPABILITIES_ELEMENT);
- }
- }
-
- protected void writeUpdateDescriptor(IInstallableUnit iu, IUpdateDescriptor descriptor) {
- if (descriptor == null)
- return;
-
- start(UPDATE_DESCRIPTOR_ELEMENT);
- attribute(ID_ATTRIBUTE, descriptor.getId());
- attribute(VERSION_RANGE_ATTRIBUTE, descriptor.getRange());
- attribute(UPDATE_DESCRIPTOR_SEVERITY, descriptor.getSeverity());
- attribute(DESCRIPTION_ATTRIBUTE, descriptor.getDescription());
- end(UPDATE_DESCRIPTOR_ELEMENT);
- }
-
- protected void writeApplicabilityScope(IRequiredCapability[][] capabilities) {
- start(APPLICABILITY_SCOPE);
- for (int i = 0; i < capabilities.length; i++) {
- start(APPLY_ON);
- writeRequiredCapabilities(capabilities[i]);
- end(APPLY_ON);
- }
- end(APPLICABILITY_SCOPE);
- }
-
- protected void writeRequirementsChange(IRequirementChange[] changes) {
- start(REQUIREMENT_CHANGES);
- for (int i = 0; i < changes.length; i++) {
- writeRequirementChange(changes[i]);
- }
- end(REQUIREMENT_CHANGES);
- }
-
- protected void writeRequirementChange(IRequirementChange change) {
- start(REQUIREMENT_CHANGE);
- if (change.applyOn() != null) {
- start(REQUIREMENT_FROM);
- writeRequiredCapability(change.applyOn());
- end(REQUIREMENT_FROM);
- }
- if (change.newValue() != null) {
- start(REQUIREMENT_TO);
- writeRequiredCapability(change.newValue());
- end(REQUIREMENT_TO);
- }
- end(REQUIREMENT_CHANGE);
- }
-
- protected void writeRequiredCapability(IRequiredCapability capability) {
- start(REQUIRED_CAPABILITY_ELEMENT);
- attribute(NAMESPACE_ATTRIBUTE, capability.getNamespace());
- attribute(NAME_ATTRIBUTE, capability.getName());
- attribute(VERSION_RANGE_ATTRIBUTE, capability.getRange());
- attribute(CAPABILITY_OPTIONAL_ATTRIBUTE, capability.isOptional(), false);
- attribute(CAPABILITY_MULTIPLE_ATTRIBUTE, capability.isMultiple(), false);
- attribute(CAPABILITY_GREED_ATTRIBUTE, capability.isGreedy(), true);
- writeTrimmedCdata(CAPABILITY_FILTER_ELEMENT, capability.getFilter());
-
- String[] selectors = capability.getSelectors();
- if (selectors.length > 0) {
- start(CAPABILITY_SELECTORS_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, selectors.length);
- for (int j = 0; j < selectors.length; j++) {
- writeTrimmedCdata(CAPABILITY_SELECTOR_ELEMENT, selectors[j]);
- }
- end(CAPABILITY_SELECTORS_ELEMENT);
- }
-
- end(REQUIRED_CAPABILITY_ELEMENT);
- }
-
- protected void writeArtifactKeys(IArtifactKey[] artifactKeys) {
- if (artifactKeys != null && artifactKeys.length > 0) {
- start(ARTIFACT_KEYS_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, artifactKeys.length);
- for (int i = 0; i < artifactKeys.length; i++) {
- start(ARTIFACT_KEY_ELEMENT);
- attribute(ARTIFACT_KEY_CLASSIFIER_ATTRIBUTE, artifactKeys[i].getClassifier());
- attribute(ID_ATTRIBUTE, artifactKeys[i].getId());
- attribute(VERSION_ATTRIBUTE, artifactKeys[i].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(ITouchpointData[] touchpointData) {
- if (touchpointData != null && touchpointData.length > 0) {
- start(TOUCHPOINT_DATA_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, touchpointData.length);
- for (int i = 0; i < touchpointData.length; i++) {
- ITouchpointData nextData = touchpointData[i];
- Map instructions = nextData.getInstructions();
- if (instructions.size() > 0) {
- start(TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, instructions.size());
- for (Iterator iter = instructions.entrySet().iterator(); iter.hasNext();) {
- Map.Entry entry = (Map.Entry) iter.next();
- start(TOUCHPOINT_DATA_INSTRUCTION_ELEMENT);
- attribute(TOUCHPOINT_DATA_INSTRUCTION_KEY_ATTRIBUTE, entry.getKey());
- ITouchpointInstruction instruction = (ITouchpointInstruction) 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(ILicense license) {
- if (license != null) {
- // 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, 1);
- 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 0c0109f8e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/XMLConstants.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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository.io;
-
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.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 = new Version(0, 0, 1);
- public static final VersionRange XML_TOLERANCE = new VersionRange(CURRENT_VERSION, true, new Version(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 REQUIRED_CAPABILITIES_ELEMENT = "requires"; //$NON-NLS-1$
- public static final String HOST_REQUIRED_CAPABILITIES_ELEMENT = "hostRequirements"; //$NON-NLS-1$
- public static final String META_REQUIRED_CAPABILITIES_ELEMENT = "metaRequirements"; //$NON-NLS-1$
- public static final String REQUIRED_CAPABILITY_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};
-
- // Constants for sub-elements of a required capability element
- public static final String CAPABILITY_FILTER_ELEMENT = "filter"; //$NON-NLS-1$
- public static final String CAPABILITY_SELECTORS_ELEMENT = "selectors"; //$NON-NLS-1$
- public static final String CAPABILITY_SELECTOR_ELEMENT = "selector"; //$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[] OPTIONAL_CAPABILITY_ATTRIBUTES = new String[] {CAPABILITY_OPTIONAL_ATTRIBUTE, CAPABILITY_MULTIPLE_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 4bc4d5e2c..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/messages.properties
+++ /dev/null
@@ -1,24 +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}.
-
-repoMan_internalError=Internal error.
-repoMan_notExists=No repository found at {0}.
-repoMan_invalidLocation={0} is not a valid repository location.
-repoMan_relativeLocation=The provided location is not absolute: {0}
-CacheManager_Neither_0_nor_1_found=Neither {0} nor {1} found.
-CacheManager_AuthenticationFaileFor_0=Authentication failed for {0}.
-CacheManager_FailedCommunicationWithRepo_0=Communication with repository at {0} failed. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/p2/metadata/repository/IMetadataRepository.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/p2/metadata/repository/IMetadataRepository.java
deleted file mode 100644
index 206b61440..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/p2/metadata/repository/IMetadataRepository.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.internal.provisional.p2.metadata.repository;
-
-import java.net.URI;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.AbstractMetadataRepository;
-
-/**
- * A metadata repository stores information about a set of installable units
- * <p>
- * This interface is not intended to be implemented by clients. Metadata repository
- * implementations must subclass {@link AbstractMetadataRepository} rather than
- * implementing this interface directly.
- * </p>
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IMetadataRepository extends IRepository, IQueryable {
-
- /**
- * Add the given installable units to this repository
- * @param installableUnits the installable units to add
- */
- public void addInstallableUnits(IInstallableUnit[] installableUnits);
-
- /**
- * Adds a reference to another repository to this repository. When a repository
- * is loaded by {@link IMetadataRepositoryManager}, its references
- * are automatically added to the repository manager's set of known repositories.
- * <p>
- * Note that this method does not add the <b>contents</b> of the given
- * repository to this repository, but merely adds the location of another
- * repository to the metadata of this repository.
- * <p>
- * The {@link IRepository#ENABLED} option flag controls whether the
- * referenced repository should be marked as enabled when added to the repository
- * manager. If this flag is set, the repository will be marked as enabled when
- * added to the repository manager. If this flag is missing, the repository will
- * be marked as disabled.
- *
- * @param location the location of the repository to add
- * @param nickname The nickname of the repository, or <code>null</code>
- * @param type the repository type (currently either {@link IRepository#TYPE_METADATA}
- * or {@link IRepository#TYPE_ARTIFACT}).
- * @param options bit-wise or of option constants (currently either
- * {@link IRepository#ENABLED} or {@link IRepository#NONE}).
- * @see IMetadataRepositoryManager#setEnabled(URI, boolean)
- */
- public void addReference(URI location, String nickname, int type, int options);
-
- /**
- * Removes all installable units that match the given query from this repository.
- *
- * @param query the installable units to remove
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- * @return <code>true</code> if any units were actually removed, and
- * <code>false</code> otherwise
- */
- public boolean removeInstallableUnits(Query query, IProgressMonitor monitor);
-
- /**
- * Remove all installable units from this repository.
- */
- public void removeAll();
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/p2/metadata/repository/IMetadataRepositoryManager.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/p2/metadata/repository/IMetadataRepositoryManager.java
deleted file mode 100644
index 679e16dff..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/p2/metadata/repository/IMetadataRepositoryManager.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.provisional.p2.metadata.repository;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
-/**
- * A metadata repository manager is used to create, access, and manipulate
- * {@link IMetadataRepository} instances. See {@link IRepositoryManager}
- * for a general description of the characteristics of repository managers.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IMetadataRepositoryManager extends IRepositoryManager, IQueryable {
- /**
- * The name used for obtaining a reference to the metadata repository manager service
- */
- public static final String SERVICE_NAME = IMetadataRepositoryManager.class.getName();
-
- /**
- * Repository type for a simple repository based on a URL or local file system location.
- */
- public static final String TYPE_SIMPLE_REPOSITORY = "org.eclipse.equinox.p2.metadata.repository.simpleRepository"; //$NON-NLS-1$
- public static final String TYPE_COMPOSITE_REPOSITORY = "org.eclipse.equinox.p2.metadata.repository.compositeRepository"; //$NON-NLS-1$
-
- /**
- * Creates and returns a new empty metadata repository of the given type at
- * the given location.
- * <p>
- * The resulting repository is added to the list of repositories tracked by
- * the repository manager. Clients must make a subsequent call to {@link #removeRepository(URI)}
- * if they do not want the repository manager to remember the repository for subsequent
- * load attempts.
- * </p>
- *
- * @param location the absolute location for the new repository
- * @param name the name of the new repository
- * @param type the kind of repository to create
- * @param properties the properties to set on the repository
- * @return the newly created repository
- * @throws ProvisionException if the repository could not be created. Reasons include:
- * <ul>
- * <li>The repository type is unknown.</li>
- * <li>There was an error writing to the given repository location.</li>
- * <li>A repository already exists at that location.</li>
- * </ul>
- */
- public IMetadataRepository createRepository(URI location, String name, String type, Map properties) throws ProvisionException;
-
- /**
- * Loads a repository corresponding to the given URL. If a repository has
- * previously been loaded at the given location, the same cached repository
- * may be returned.
- * <p>
- * The resulting repository is added to the list of repositories tracked by
- * the repository manager. Clients must make a subsequent call to {@link #removeRepository(URI)}
- * if they do not want the repository manager to remember the repository for subsequent
- * load attempts.
- * </p>
- *
- * @param location The absolute location of the repository to load
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- * @return The loaded metadata repository
- * @throws ProvisionException if the repository could not be created. Reasons include:
- * <ul>
- * <li>There is no existing repository at that location.</li>
- * <li>The repository at that location could not be read.</li>
- * </ul>
- */
- public IMetadataRepository loadRepository(URI location, IProgressMonitor monitor) throws ProvisionException;
-
- /**
- * Loads a repository corresponding to the given URL. If a repository has
- * previously been loaded at the given location, the same cached repository
- * may be returned.
- * <p>
- * The resulting repository is added to the list of repositories tracked by
- * the repository manager. Clients must make a subsequent call to {@link #removeRepository(URI)}
- * if they do not want the repository manager to remember the repository for subsequent
- * load attempts.
- * </p>
- * <p>
- * The flags passed in should be taken as a hint for the type of repository to load. If
- * the manager cannot load a repository that satisfies these hints, it can fail fast.
- * </p>
- * @param location The absolute location of the repository to load
- * @param flags - bit-wise or of flags to consider when loading the repository
- * (currently only {@link IRepositoryManager#REPOSITORY_HINT_MODIFIABLE} is supported)
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- * @return The loaded metadata repository
- * @throws ProvisionException if the repository could not be created. Reasons include:
- * <ul>
- * <li>There is no existing repository at that location.</li>
- * <li>The repository at that location could not be read.</li>
- * </ul>
- * @see IRepositoryManager#REPOSITORY_HINT_MODIFIABLE
- */
- public IMetadataRepository loadRepository(URI location, int flags, IProgressMonitor monitor) throws ProvisionException;
-
- /**
- * Refreshes the repository corresponding to the given URL. This method discards
- * any cached state held by the repository manager and reloads the repository
- * contents. The provided repository location must already be known to the repository
- * manager.
- *
- * @param location The absolute location of the repository to refresh
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- * @return The refreshed metadata repository
- * @throws ProvisionException if the repository could not be refreshed. Reasons include:
- * <ul>
- * <li>The location is not known to the repository manager.</li>
- * <li>There is no existing repository at that location.</li>
- * <li>The repository at that location could not be read.</li>
- * </ul>
- */
- public IMetadataRepository refreshRepository(URI location, IProgressMonitor monitor) throws ProvisionException;
-
- /**
- * Validates a given URL and returns a status indicating whether a valid repository is likely
- * to be found at the given URL. Callers must assume that the validity of a
- * repository location cannot be completely determined until an attempt to load
- * the repository is made.
- *
- * @param location The absolute location of the repository to validate
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- * @return A status indicating whether a valid repository is likely located at the
- * location. A status with severity <code>OK</code> indicates that the repository is
- * likely to be loadable, or that as much validation as could be done was successful.
- * Reasons for a non-OK status include:
- * <ul>
- * <li>The specified location is not a valid repository location.</li>
- * <li>There is no existing repository at that location.</li>
- * <li>The repository at that location could not be read.</li>
- * </ul>
- */
- public IStatus validateRepositoryLocation(URI location, IProgressMonitor monitor);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/AbstractMetadataRepository.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/AbstractMetadataRepository.java
deleted file mode 100644
index 4229da335..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/AbstractMetadataRepository.java
+++ /dev/null
@@ -1,72 +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.spi.p2.metadata.repository;
-
-import org.eclipse.equinox.internal.provisional.spi.p2.repository.AbstractRepository;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-
-/**
- * The common base class for all metadata repositories.
- * <p>
- * Clients may subclass this class.
- * <p>
- */
-public abstract class AbstractMetadataRepository extends AbstractRepository implements IMetadataRepository {
-
- //TODO Consider removing from abstract class, this is currently an implementation detail of the simple metadata repo parser
- public static class RepositoryState {
- public String Name;
- public String Type;
- public Version Version;
- public String Provider;
- public String Description;
- public URI Location;
- public Map Properties;
- public IInstallableUnit[] Units;
- public RepositoryReference[] Repositories;
- }
-
- public AbstractMetadataRepository() {
- super("noName", "noType", "noVersion", null, null, null, null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- //TODO Consider removing from abstract class, this is currently an implementation detail of the simple metadata repo parser
- public abstract void initialize(RepositoryState state);
-
- protected AbstractMetadataRepository(String name, String type, String version, URI location, String description, String provider, Map properties) {
- super(name, type, version, location, description, provider, properties);
- }
-
- public void addInstallableUnits(IInstallableUnit[] installableUnit) {
- assertModifiable();
- }
-
- public void addReference(URI repositoryLocation, String nickname, int repositoryType, int options) {
- assertModifiable();
- }
-
- public void removeAll() {
- assertModifiable();
- }
-
- public boolean removeInstallableUnits(Query query, IProgressMonitor monitor) {
- assertModifiable();
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/MetadataRepositoryFactory.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/MetadataRepositoryFactory.java
deleted file mode 100644
index cfd2114d4..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/MetadataRepositoryFactory.java
+++ /dev/null
@@ -1,100 +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.spi.p2.metadata.repository;
-
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-
-/**
- * A metadata repository factory is responsible for creating and loading instances
- * of a particular type of metadata repository. Factories are provided via the
- * <tt>org.eclipse.equinox.p2.metadata.repository.metadataRepositories</tt> extension point.
- */
-public abstract class MetadataRepositoryFactory {
-
- /**
- * Creates and returns a new empty metadata repository of the given type at
- * the given location.
- *
- * @param location the location for the new repository
- * @param name the name of the new repository
- * @param type the kind of repository to create
- * @param properties the properties to set on the repository
- * @return the newly created repository
- * @throws ProvisionException if the repository could not be created. Reasons include:
- * <ul>
- * <li>The repository type is not supported by this factory.</li>
- * <li>There was an error writing to the given repository location.</li>
- * </ul>
- */
- public abstract IMetadataRepository create(URI location, String name, String type, Map properties) throws ProvisionException;
-
- /**
- * Loads a repository corresponding to the given URL.
- * <p>
- * The error code returned in the case of failure is significant. In particular an
- * error code of {@link ProvisionException#REPOSITORY_FAILED_READ} indicates
- * that the location definitely identifies a repository of this type, but an error occurred
- * while loading the repository. The repository manager will not attempt to load
- * a repository from that location using any other factory. An error code of
- * {@link ProvisionException#REPOSITORY_NOT_FOUND} indicates there is no
- * repository of this type at the given location, and the repository manager is free
- * to try again with a different repository factory.
- * </p>
- * <p>
- * The flags passed in should be taken as a hint for the type of repository to load. If
- * the factory knows it will not load a repository that satisfies these hints, it can fail
- * fast and return null.<br>
- * See {@link IRepositoryManager#REPOSITORY_HINT_MODIFIABLE}
- * </p>
- * @param location The location of the repository to load
- * @param flags to consider while loading the repository
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- * @return The loaded metadata repository
- * @throws ProvisionException if the repository could not be created. Reasons include:
- * <ul>
- * <li>There is no existing repository at that location.</li>
- * <li>The repository at that location could not be read.</li>
- * </ul>
- */
- public abstract IMetadataRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException;
-
- /**
- * Validates a candidate repository URL and returns a status indicating the
- * likelihood of a valid repository being located at the location. Implementors
- * should make all attempts to validate the URL that can be made without
- * actually loading the repository. The computation for this method must be
- * significantly faster than loading the repository. Early detectable error
- * conditions, such as the non-existence of the location, or an inability to read
- * the location, should be determined in this method.
- *
- * @param location The location of the repository to validate
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- * @return A status indicating whether a valid repository is likely located at the
- * location. A status with severity <code>OK</code> indicates that the repository is
- * likely to be loadable, or that as much validation as could be done was successful.
- * Reasons for a non-OK status include:
- * <ul>
- * <li>The specified location is not a valid repository location.</li>
- * <li>There is no existing repository at that location.</li>
- * <li>The repository at that location could not be read.</li>
- * </ul>
- */
- public abstract IStatus validate(URI location, IProgressMonitor monitor);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/RepositoryReference.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/RepositoryReference.java
deleted file mode 100644
index 9a7e2d842..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/RepositoryReference.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.provisional.spi.p2.metadata.repository;
-
-import java.net.URI;
-
-/**
- * Serialization helper class for repository references.
- */
-public class RepositoryReference {
- public URI Location;
- public int Type;
- public int Options;
- public String Nickname;
-
- public RepositoryReference(URI location, String nickname, int type, int options) {
- this.Location = location;
- this.Type = type;
- this.Options = options;
- this.Nickname = nickname;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- RepositoryReference other = (RepositoryReference) obj;
- if (Location == null) {
- if (other.Location != null)
- return false;
- } else if (!Location.equals(other.Location))
- return false;
- if (Type != other.Type)
- return false;
- return true;
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((Location == null) ? 0 : Location.hashCode());
- result = prime * result + Type;
- return result;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/SimpleMetadataRepositoryFactory.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/SimpleMetadataRepositoryFactory.java
deleted file mode 100644
index 012c44d1f..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/SimpleMetadataRepositoryFactory.java
+++ /dev/null
@@ -1,161 +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.spi.p2.metadata.repository;
-
-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.metadata.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-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 properties) {
- if (location.getScheme().equals("file")) //$NON-NLS-1$
- return new LocalMetadataRepository(location, name, properties);
- return new URLMetadataRepository(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
- localFile = Activator.getCacheManager().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.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory#validate(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus validate(URI location, IProgressMonitor monitor) {
- try {
- validateAndLoad(location, false, 0, monitor);
- } catch (ProvisionException e) {
- return e.getStatus();
- }
- return Status.OK_STATUS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory#load(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IMetadataRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
- return validateAndLoad(location, true, flags, monitor);
- }
-
- protected IMetadataRepository validateAndLoad(URI location, boolean doLoad, 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);
- if (doLoad) {
- InputStream descriptorStream = jarStream != null ? jarStream : inStream;
- IMetadataRepository result = new MetadataRepositoryIO().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();
- }
- return null;
- }
-
- /**
- * 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_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 a19d18a60..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AddChildTask.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.metadata.repository.ant;
-
-import java.net.URI;
-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.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.repository.Activator;
-import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-
-/**
- * Ant task for adding a child repository to a composite metadata repository.
- */
-public class AddChildTask extends Task {
-
- 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) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
- 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 b6558259f..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/CreateCompositeMetadataRepositoryTask.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.internal.p2.metadata.repository.ant;
-
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.repository.Activator;
-import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-
-/**
- * Ant task for creating a new composite metadata repository.
- */
-public class CreateCompositeMetadataRepositoryTask extends Task {
-
- 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 properties = new HashMap();
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
- 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/MirrorApplicationTask.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/MirrorApplicationTask.java
deleted file mode 100644
index 07ef39edf..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/MirrorApplicationTask.java
+++ /dev/null
@@ -1,128 +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.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.metadata.mirror.MirrorApplication;
-import org.osgi.framework.Bundle;
-
-/**
- * Ant task for running the metadata mirror application.
- */
-public class MirrorApplicationTask extends Task {
-
- private static final String EMPTY_STRING = ""; //$NON-NLS-1$
- private static final String ARG_DESTINATION = "-destination"; //$NON-NLS-1$
- private static final String ARG_DESTINATION_NAME = "-destinationName"; //$NON-NLS-1$
- private static final String ARG_SOURCE = "-source"; //$NON-NLS-1$
- private static final String ARG_WRITE_MODE = "-writeMode"; //$NON-NLS-1$
- URL source;
- URL destination;
- String destinationName;
- String writeMode;
-
- //TODO add transitive and roots attributed when implemented.
-
- /*
- * Run the mirror application with the given arguments.
- */
- private void runMirrorApplication(final String[] args) throws Exception {
- new MirrorApplication().start(new IApplicationContext() {
-
- public void applicationRunning() {
- // nothing to do
- }
-
- public Map getArguments() {
- Map arguments = new HashMap();
- arguments.put(IApplicationContext.APPLICATION_ARGS, args);
- return arguments;
- }
-
- public String getBrandingApplication() {
- return null;
- }
-
- public Bundle getBrandingBundle() {
- return null;
- }
-
- public String getBrandingDescription() {
- return null;
- }
-
- public String getBrandingId() {
- return null;
- }
-
- public String getBrandingName() {
- return null;
- }
-
- public String getBrandingProperty(String key) {
- return null;
- }
- });
- }
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() {
- // create arguments
- String[] args = new String[] { //
- ARG_SOURCE, source.toExternalForm(), //
- ARG_DESTINATION, destination.toExternalForm(), //
- ARG_WRITE_MODE, writeMode == null ? EMPTY_STRING : writeMode, //
- destinationName == null ? EMPTY_STRING : ARG_DESTINATION_NAME, //
- destinationName == null ? EMPTY_STRING : destinationName};
-
- try {
- runMirrorApplication(args);
- } catch (Exception e) {
- throw new BuildException("Error occurred while running metadata mirror application.", e);
- }
- }
-
- /*
- * Set the source location.
- */
- public void setSource(String value) throws MalformedURLException {
- source = new URL(value);
- }
-
- /*
- * Set the destination location.
- */
- public void setDestination(String value) throws MalformedURLException {
- destination = new URL(value);
- }
-
- /*
- * Set the destination name.
- */
- public void setDestinationName(String value) {
- destinationName = value;
- }
-
- /*
- * Set the write mode for the application. (e.g. clean or append)
- */
- public void setWriteMode(String value) {
- writeMode = value;
- }
-} \ No newline at end of file
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 3e12f4716..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/RemoveChildTask.java
+++ /dev/null
@@ -1,77 +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.apache.tools.ant.Task;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.repository.Activator;
-import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-
-/**
- * Ant task to remove a specific child repository (or all the children repositories)
- * from a composite metadata repository.
- */
-public class RemoveChildTask extends Task {
-
- 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) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
- 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 7cdeb7319..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="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.metadata/.project b/bundles/org.eclipse.equinox.p2.metadata/.project
deleted file mode 100644
index f697ae2d8..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/.project
+++ /dev/null
@@ -1,34 +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>
- </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/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index ed5b63b50..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,347 +0,0 @@
-#Mon Nov 05 17:01:21 EST 2007
-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.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=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.unsafeTypeOperation=warning
-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.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 0e200e717..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,86 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.metadata;singleton:=true
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.0.100.qualifier
-Export-Package: org.eclipse.equinox.internal.p2.metadata;
- x-friends:="org.eclipse.equinox.p2.metadata.generator,
- org.eclipse.equinox.p2.metadata.repository,
- org.eclipse.equinox.p2.engine,
- org.eclipse.equinox.p2.artifact.repository,
- org.eclipse.equinox.p2.artifact.optimizers,
- org.eclipse.equinox.p2.artifact.processors,
- org.eclipse.equinox.p2.ui,
- org.eclipse.equinox.p2.publisher",
- org.eclipse.equinox.internal.provisional.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.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.publisher,
- org.eclipse.equinox.p2.reconciler.dropins,
- 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.updatesite,
- org.eclipse.pde.ui,
- org.eclipse.equinox.p2.repository.tools,
- org.eclipse.pde.core",
- org.eclipse.equinox.internal.provisional.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.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.reconciler.dropins,
- 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.equinox.p2.console,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.pde.ui,
- org.eclipse.equinox.p2.repository.tools,
- org.eclipse.pde.core"
-Import-Package: org.osgi.framework;version="1.3.0"
-Bundle-Activator: org.eclipse.equinox.internal.p2.metadata.MetadataActivator
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Require-Bundle: org.eclipse.equinox.common,
- org.eclipse.equinox.p2.core
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 a6b8330d2..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/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.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/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 8b76db440..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ArtifactKey.java
+++ /dev/null
@@ -1,119 +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.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-
-/**
- * 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 {
- private static final String SEPARATOR = ","; //$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 list = new ArrayList();
- 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 (String[]) 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 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();
- }
-
-}
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 b29e5f305..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Copyright.java
+++ /dev/null
@@ -1,65 +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 org.eclipse.equinox.internal.provisional.p2.metadata.ICopyright;
-
-import java.net.URI;
-
-/**
- * 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/InstallableUnit.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java
deleted file mode 100644
index 7fec1191e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java
+++ /dev/null
@@ -1,297 +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.ArrayList;
-import java.util.Map;
-import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-
-public class InstallableUnit implements IInstallableUnit {
-
- private static final OrderedProperties NO_PROPERTIES = new OrderedProperties();
- private static final IProvidedCapability[] NO_PROVIDES = new IProvidedCapability[0];
- private static final IRequiredCapability[] NO_REQUIRES = new IRequiredCapability[0];
- private static final IArtifactKey[] NO_ARTIFACTS = new IArtifactKey[0];
- private static final ITouchpointData[] NO_TOUCHPOINT_DATA = new ITouchpointData[0];
-
- private IArtifactKey[] artifacts = NO_ARTIFACTS;
- private String filter;
-
- private String id;
-
- private OrderedProperties properties;
- private OrderedProperties localizedProperties;
- IProvidedCapability[] providedCapabilities = NO_PROVIDES;
- private IRequiredCapability[] requires = NO_REQUIRES;
- private IRequiredCapability[] metaRequires = NO_REQUIRES;
-
- private boolean singleton;
-
- private ArrayList touchpointData = null;
-
- private ITouchpointType touchpointType;
-
- private Version version;
-
- private IUpdateDescriptor updateInfo;
- private ILicense license;
- private ICopyright copyright;
-
- public InstallableUnit() {
- super();
- }
-
- public void addTouchpointData(ITouchpointData newData) {
- ensureTouchpointDataCapacity(1);
- touchpointData.add(newData);
- }
-
- public int compareTo(Object toCompareTo) {
- if (!(toCompareTo instanceof IInstallableUnit)) {
- return -1;
- }
- IInstallableUnit other = (IInstallableUnit) toCompareTo;
- if (getId().compareTo(other.getId()) == 0)
- return (getVersion().compareTo(other.getVersion()));
- return getId().compareTo(other.getId());
- }
-
- private void ensureTouchpointDataCapacity(int size) {
- if (touchpointData != null) {
- touchpointData.ensureCapacity(size);
- } else {
- touchpointData = new ArrayList(size);
- }
- }
-
- 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 IArtifactKey[] getArtifacts() {
- return artifacts;
- }
-
- public String getFilter() {
- return filter;
- }
-
- public IInstallableUnitFragment[] getFragments() {
- return null;
- }
-
- 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 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 IProvidedCapability[] getProvidedCapabilities() {
- return providedCapabilities;
- }
-
- public IRequiredCapability[] getRequiredCapabilities() {
- return requires;
-
- }
-
- public ITouchpointData[] getTouchpointData() {
- return (touchpointData == null ? NO_TOUCHPOINT_DATA //
- : (ITouchpointData[]) touchpointData.toArray(new ITouchpointData[touchpointData.size()]));
- }
-
- 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 isFragment() {
- return false;
- }
-
- 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(String filter) {
- this.filter = filter;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- /*
- * Helper method to cache localized properties
- */
- public String setLocalizedProperty(String key, String value) {
- if (localizedProperties == null)
- localizedProperties = new OrderedProperties();
- return (String) 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(IRequiredCapability[] capabilities) {
- if (capabilities.length == 0) {
- this.requires = NO_REQUIRES;
- } else {
- //copy array for safety
- this.requires = (IRequiredCapability[]) 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 setLicense(ILicense license) {
- this.license = license;
- }
-
- public ILicense getLicense() {
- return license;
- }
-
- public void setCopyright(ICopyright copyright) {
- this.copyright = copyright;
- }
-
- public ICopyright getCopyright() {
- return copyright;
- }
-
- public boolean satisfies(IRequiredCapability candidate) {
- IProvidedCapability[] provides = getProvidedCapabilities();
- for (int i = 0; i < provides.length; i++)
- if (provides[i].satisfies(candidate))
- return true;
- return false;
- }
-
- public IRequiredCapability[] getMetaRequiredCapabilities() {
- return metaRequires;
- }
-
- public void setMetaRequiredCapabilities(IRequiredCapability[] metaReqs) {
- if (metaReqs.length == 0) {
- this.metaRequires = NO_REQUIRES;
- } else {
- //copy array for safety
- this.metaRequires = (IRequiredCapability[]) metaReqs.clone();
- }
- }
-}
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 7709c9dbc..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitFragment.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.metadata;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnitFragment;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
-
-public class InstallableUnitFragment extends InstallableUnit implements IInstallableUnitFragment {
-
- private IRequiredCapability[] hostRequirements;
-
- public InstallableUnitFragment() {
- super();
- }
-
- public void setHost(IRequiredCapability[] hostRequirements) {
- if (hostRequirements == null)
- return;
- this.hostRequirements = hostRequirements;
- addRequiredCapability(hostRequirements);
- }
-
- private void addRequiredCapability(IRequiredCapability[] toAdd) {
- IRequiredCapability[] current = super.getRequiredCapabilities();
- IRequiredCapability[] result = new IRequiredCapability[current.length + toAdd.length];
- System.arraycopy(current, 0, result, 0, current.length);
- System.arraycopy(toAdd, 0, result, current.length, toAdd.length);
- setRequiredCapabilities(result);
- }
-
- public boolean isFragment() {
- return true;
- }
-
- public IRequiredCapability[] getHost() {
- return hostRequirements;
- }
-}
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 31013548b..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitPatch.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.internal.p2.metadata;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-
-public class InstallableUnitPatch extends InstallableUnit implements IInstallableUnitPatch {
- private IRequirementChange[] changes;
- private IRequiredCapability lifeCycle;
- private IRequiredCapability[][] scope;
-
- private void addRequiredCapability(IRequiredCapability[] toAdd) {
- IRequiredCapability[] current = super.getRequiredCapabilities();
- IRequiredCapability[] result = new IRequiredCapability[current.length + toAdd.length];
- System.arraycopy(current, 0, result, 0, current.length);
- System.arraycopy(toAdd, 0, result, current.length, toAdd.length);
- setRequiredCapabilities(result);
- }
-
- public IRequiredCapability[][] getApplicabilityScope() {
- return scope;
- }
-
- public IRequiredCapability getLifeCycle() {
- return lifeCycle;
- }
-
- public IRequirementChange[] getRequirementsChange() {
- return changes;
- }
-
- public void setApplicabilityScope(IRequiredCapability[][] applyTo) {
- scope = applyTo;
- }
-
- public void setLifeCycle(IRequiredCapability lifeCycle) {
- if (lifeCycle == null)
- return;
- this.lifeCycle = lifeCycle;
- addRequiredCapability(new IRequiredCapability[] {lifeCycle});
- }
-
- public void setRequirementsChange(IRequirementChange[] changes) {
- this.changes = changes;
- }
-}
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 b89285fcf..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/License.java
+++ /dev/null
@@ -1,147 +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 org.eclipse.equinox.internal.provisional.p2.metadata.ILicense;
-
-import java.io.UnsupportedEncodingException;
-import java.math.BigInteger;
-import java.net.URI;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-
-/**
- * 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 BigInteger 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) {
- if (body == null)
- throw new IllegalArgumentException("body cannot be null"); //$NON-NLS-1$
- this.body = body;
- this.location = location;
- }
-
- /**
- * 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 BigInteger getDigest() {
- if (digest == null)
- digest = calculateLicenseDigest();
- 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.getDigest().equals(getDigest()))
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return getDigest().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/MetadataActivator.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/MetadataActivator.java
deleted file mode 100644
index 40881fcc0..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/MetadataActivator.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;
-
-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 BundleContext context;
-
- public static BundleContext getContext() {
- return context;
- }
-
- public void start(BundleContext aContext) throws Exception {
- MetadataActivator.context = aContext;
- }
-
- public void stop(BundleContext aContext) throws Exception {
- MetadataActivator.context = null;
- }
-
-}
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 4c8b307bd..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ProvidedCapability.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.metadata;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IProvidedCapability;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
-
-/**
- * Describes a capability as exposed or required by an installable unit
- */
-public class ProvidedCapability implements IProvidedCapability {
- 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();
- }
-
- /**
- * Returns whether this provided capability satisfies the given required capability.
- * @return <code>true</code> if this capability satisfies the given required
- * capability, and <code>false</code> otherwise.
- */
- public boolean satisfies(IRequiredCapability candidate) {
- if (getName() == null || !getName().equals(candidate.getName()))
- return false;
- if (getNamespace() == null || !getNamespace().equals(candidate.getNamespace()))
- return false;
- return candidate.getRange().isIncluded(version);
- }
-
- public String toString() {
- return namespace + '/' + name + '/' + version;
- }
-
-}
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 a4df5146d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java
+++ /dev/null
@@ -1,185 +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.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
-
-/**
- * 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 {
- private static final String[] NO_SELECTORS = new String[0];
-
- private String filter;
- private final boolean multiple;
- private final String name;//never null
- private final String namespace;//never null
- private boolean optional;
- private boolean greedy = true;
- private final VersionRange range;//never null
- private String[] selectors = NO_SELECTORS;//never null
-
- /**
- * TODO replace booleans with int options flag.
- */
- public RequiredCapability(String namespace, String name, VersionRange range, String filter, boolean optional, boolean multiple) {
- Assert.isNotNull(namespace);
- Assert.isNotNull(name);
- this.namespace = namespace;
- this.name = name;
- this.range = range == null ? VersionRange.emptyRange : range;
- this.optional = optional;
- this.filter = filter;
- this.multiple = multiple;
- }
-
- public RequiredCapability(String namespace, String name, VersionRange range, String filter, boolean optional, boolean multiple, boolean greedy) {
- this(namespace, name, range, filter, optional, multiple);
- this.greedy = greedy;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof IRequiredCapability))
- return false;
- final IRequiredCapability other = (IRequiredCapability) obj;
- if (filter == null) {
- if (other.getFilter() != null)
- return false;
- } else if (!filter.equals(other.getFilter()))
- return false;
- if (multiple != other.isMultiple())
- return false;
- if (!name.equals(other.getName()))
- return false;
- if (!namespace.equals(other.getNamespace()))
- return false;
- if (optional != other.isOptional())
- return false;
- if (!range.equals(other.getRange()))
- return false;
- return true;
- }
-
- public String getFilter() {
- return filter;
- }
-
- public String getName() {
- return name;
- }
-
- public String getNamespace() {
- return namespace;
- }
-
- /**
- * 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 range;
- }
-
- /**
- * Returns the properties to use for evaluating required capability filters
- * downstream from this capability. For example, if the selector "doc"
- * is provided, then a downstream InstallableUnit with a required capability
- * filtered with "doc=true" will be included.
- */
- public String[] getSelectors() {
- return selectors;
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((filter == null) ? 0 : filter.hashCode());
- result = prime * result + (multiple ? 1231 : 1237);
- result = prime * result + name.hashCode();
- result = prime * result + namespace.hashCode();
- result = prime * result + (optional ? 1231 : 1237);
- result = prime * result + range.hashCode();
- return result;
- }
-
- public boolean isMultiple() {
- return multiple;
- }
-
- public boolean isOptional() {
- return optional;
- }
-
- /**
- * TODO This object shouldn't be mutable since it makes equality unstable, and
- * introduces lifecycle issues (how are the changes persisted, etc)
- */
- public void setFilter(String filter) {
- this.filter = filter;
- }
-
- /**
- * TODO This object shouldn't be mutable since it makes equality unstable, and
- * introduces lifecycle issues (how are the changes persisted, etc)
- */
- public void setSelectors(String[] selectors) {
- this.selectors = selectors;
- }
-
- public boolean isGreedy() {
- return greedy;
- }
-
- public String toString() {
- StringBuffer result = new StringBuffer();
-
- 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(' ');
- //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();
- }
-}
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 e1d1fcc1d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequirementChange.java
+++ /dev/null
@@ -1,119 +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.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.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 intersect(toMatch.getRange(), applyOn.getRange()) == null ? false : true;
- }
-
- private VersionRange intersect(VersionRange r1, VersionRange r2) {
- Version resultMin = null;
- boolean resultMinIncluded = false;
- Version resultMax = null;
- boolean resultMaxIncluded = false;
-
- int minCompare = r1.getMinimum().compareTo(r2.getMinimum());
- if (minCompare < 0) {
- resultMin = r2.getMinimum();
- resultMinIncluded = r2.getIncludeMinimum();
- } else if (minCompare > 0) {
- resultMin = r1.getMinimum();
- resultMinIncluded = r1.getIncludeMinimum();
- } else if (minCompare == 0) {
- resultMin = r1.getMinimum();
- resultMinIncluded = r1.getIncludeMinimum() && r2.getIncludeMinimum();
- }
-
- int maxCompare = r1.getMaximum().compareTo(r2.getMaximum());
- if (maxCompare > 0) {
- resultMax = r2.getMaximum();
- resultMaxIncluded = r2.getIncludeMaximum();
- } else if (maxCompare < 0) {
- resultMax = r1.getMaximum();
- resultMaxIncluded = r1.getIncludeMaximum();
- } else if (maxCompare == 0) {
- resultMax = r1.getMaximum();
- resultMaxIncluded = r1.getIncludeMaximum() && r2.getIncludeMaximum();
- }
-
- int resultRangeComparison = resultMin.compareTo(resultMax);
- if (resultRangeComparison < 0)
- return new VersionRange(resultMin, resultMinIncluded, resultMax, resultMaxIncluded);
- else if (resultRangeComparison == 0 && resultMinIncluded == resultMaxIncluded)
- return new VersionRange(resultMin, resultMinIncluded, resultMax, resultMaxIncluded);
- else
- return 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 1e7cd2040..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java
+++ /dev/null
@@ -1,181 +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.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-
-public class ResolvedInstallableUnit implements IInstallableUnit {
- private static IInstallableUnit[] NO_IU = new IInstallableUnit[0];
-
- private IInstallableUnit[] fragments = NO_IU;
- protected IInstallableUnit original;
-
- public ResolvedInstallableUnit(IInstallableUnit resolved) {
- this.original = resolved;
- }
-
- public ResolvedInstallableUnit(IInstallableUnit resolved, IInstallableUnitFragment[] fragments) {
- this.original = resolved;
- this.fragments = fragments;
- }
-
- public IInstallableUnitFragment[] getFragments() {
- ArrayList result = new ArrayList();
- if (fragments != null)
- result.addAll(Arrays.asList(fragments));
- for (int i = 0; i < result.size(); i++) {
- IInstallableUnit fragment = (IInstallableUnit) result.get(i);
- if (fragment.isResolved())
- result.addAll(Arrays.asList(fragment.getFragments()));
- }
- return (IInstallableUnitFragment[]) result.toArray(new IInstallableUnitFragment[result.size()]);
- }
-
- public IArtifactKey[] getArtifacts() {
- return original.getArtifacts();
- }
-
- public String getFilter() {
- return original.getFilter();
- }
-
- public String getId() {
- return original.getId();
- }
-
- public String getProperty(String key) {
- return original.getProperty(key);
- }
-
- public Map getProperties() {
- return original.getProperties();
- }
-
- public IProvidedCapability[] getProvidedCapabilities() {
- ArrayList result = new ArrayList();
- result.addAll(Arrays.asList(original.getProvidedCapabilities()));
- for (int i = 0; i < fragments.length; i++) {
- result.addAll(Arrays.asList(fragments[i].getProvidedCapabilities()));
- }
- return (IProvidedCapability[]) result.toArray(new IProvidedCapability[result.size()]);
- }
-
- public IRequiredCapability[] getRequiredCapabilities() {
- ArrayList result = new ArrayList();
- result.addAll(Arrays.asList(original.getRequiredCapabilities()));
- for (int i = 0; i < fragments.length; i++) {
- result.addAll(Arrays.asList(fragments[i].getRequiredCapabilities()));
- }
- return (IRequiredCapability[]) result.toArray(new IRequiredCapability[result.size()]);
- }
-
- public IRequiredCapability[] getMetaRequiredCapabilities() {
- ArrayList result = new ArrayList();
- result.addAll(Arrays.asList(original.getMetaRequiredCapabilities()));
- for (int i = 0; i < fragments.length; i++) {
- result.addAll(Arrays.asList(fragments[i].getMetaRequiredCapabilities()));
- }
- return (IRequiredCapability[]) result.toArray(new IRequiredCapability[result.size()]);
- }
-
- public ITouchpointData[] getTouchpointData() {
- ArrayList result = new ArrayList();
- result.addAll(Arrays.asList(original.getTouchpointData()));
- for (int i = 0; i < fragments.length; i++) {
- ITouchpointData[] data = fragments[i].getTouchpointData();
- for (int j = 0; j < data.length; j++) {
- result.add(data[j]);
- }
- }
- return (ITouchpointData[]) result.toArray(new ITouchpointData[result.size()]);
- }
-
- public ITouchpointType getTouchpointType() {
- return original.getTouchpointType();
- }
-
- public Version getVersion() {
- return original.getVersion();
- }
-
- public boolean isFragment() {
- return original.isFragment();
- }
-
- 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(Object toCompareTo) {
- if (!(toCompareTo instanceof IInstallableUnit)) {
- return -1;
- }
- IInstallableUnit other = (IInstallableUnit) toCompareTo;
- if (getId().compareTo(other.getId()) == 0)
- return (getVersion().compareTo(other.getVersion()));
- return getId().compareTo(other.getId());
- }
-
- public boolean isResolved() {
- return true;
- }
-
- public IInstallableUnit unresolved() {
- return original.unresolved();
- }
-
- public IUpdateDescriptor getUpdateDescriptor() {
- return original.getUpdateDescriptor();
- }
-
- public ILicense getLicense() {
- return original.getLicense();
- }
-
- public ICopyright getCopyright() {
- return original.getCopyright();
- }
-
- public boolean satisfies(IRequiredCapability candidate) {
- IProvidedCapability[] provides = getProvidedCapabilities();
- for (int i = 0; i < provides.length; i++)
- if (provides[i].satisfies(candidate))
- return true;
- return false;
- }
-
-}
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 9ea83d479..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointData.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.metadata;
-
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-
-/**
- * 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 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 instructions) {
- this.instructions = instructions;
- }
-
- /**
- * Returns the touchpoint instruction corresponding to the given key.
- */
- public ITouchpointInstruction getInstruction(String instructionKey) {
- return (ITouchpointInstruction) 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 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 (Iterator iterator = instructions.entrySet().iterator(); iterator.hasNext();) {
- Entry instruction = (Entry) iterator.next();
- 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 e59e9beea..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointInstruction.java
+++ /dev/null
@@ -1,163 +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 java.util.Iterator;
-import java.util.Map;
-import org.eclipse.equinox.internal.provisional.p2.metadata.ITouchpointInstruction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
-
-/**
- * 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 parameters) {
- StringBuffer result = new StringBuffer(actionName);
- result.append('(');
- for (Iterator it = parameters.entrySet().iterator(); it.hasNext();) {
- Map.Entry entry = (Map.Entry) it.next();
- result.append(entry.getKey());
- result.append(':');
- appendEncoded(result, (String) entry.getValue());
- if (it.hasNext())
- result.append(',');
- }
- 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 7cba96c21..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointType.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.metadata;
-
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.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/UpdateDescriptor.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/UpdateDescriptor.java
deleted file mode 100644
index d8d0a55e8..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/UpdateDescriptor.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.metadata;
-
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IUpdateDescriptor;
-
-public class UpdateDescriptor implements IUpdateDescriptor {
- private String description;
- private String id;
- private VersionRange range;
- private int severity;
-
- public UpdateDescriptor(String id, VersionRange range, int severity, String description) {
- this.id = id;
- this.range = range;
- this.severity = severity;
- this.description = description;
- }
-
- public String getDescription() {
- return description;
- }
-
- public String getId() {
- return id;
- }
-
- public VersionRange getRange() {
- return range;
- }
-
- public int getSeverity() {
- return severity;
- }
-
- public boolean isUpdateOf(IInstallableUnit iu) {
- if (!id.equals(iu.getId()))
- return false;
- if (range.isIncluded(iu.getVersion()))
- return true;
- return false;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IArtifactKey.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IArtifactKey.java
deleted file mode 100644
index ef26c2540..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IArtifactKey.java
+++ /dev/null
@@ -1,50 +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;
-
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-
-/**
- * Provide standardized 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 standardized 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.
- */
-public interface IArtifactKey {
-
- /**
- * 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. The returned value can be empty.
- * @return the classifier 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/internal/provisional/p2/metadata/ICopyright.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ICopyright.java
deleted file mode 100644
index 990b87432..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ICopyright.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2008 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.provisional.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.
- */
-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/internal/provisional/p2/metadata/IInstallableUnit.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnit.java
deleted file mode 100644
index 2e2d2cd1f..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnit.java
+++ /dev/null
@@ -1,283 +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
- * EclipseSource - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata;
-
-import java.util.Map;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-
-/**
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IInstallableUnit extends Comparable {
-
- /**
- * A capability namespace representing a particular profile flavor.
- */
- public static final String NAMESPACE_FLAVOR = "org.eclipse.equinox.p2.flavor"; //$NON-NLS-1$
-
- /**
- * 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.type.profile"</code>) for a
- * boolean property indicating that an installable unit is a profile.
- *
- * @see #getProperty(String)
- */
- public static final String PROP_TYPE_PROFILE = "org.eclipse.equinox.p2.type.profile"; //$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.
- *
- * @see #getProperty(String)
- */
- public static final String PROP_TYPE_CATEGORY = "org.eclipse.equinox.p2.type.category"; //$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.
- *
- * @see #getProperty(String)
- */
- 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.group"</code>) for a
- * boolean property indicating that an installable unit is a group.
- *
- * @see #getProperty(String)
- */
- 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 group.
- *
- * @see #getProperty(String)
- */
- 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.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$
-
- //TODO Move to UI
- public static final String PROP_PROFILE_ROOT_IU = "org.eclipse.equinox.p2.type.root"; //$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$
-
- /**
- * 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. updates.
- * @see #PROP_PROFILE_LOCKED_IU
- */
- public static int LOCK_UPDATE = 1 << 1;
-
- public IArtifactKey[] getArtifacts();
-
- /**
- * Returns the filter on this installable unit. The filter is matched against
- * the selection context of the profile the unit is installed into. An IU will not
- * be installed if it has a filter condition that is not satisfied by the context.
- *
- * See Profile#getSelectionContext.
- */
- public String 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 IInstallableUnitFragment[] getFragments();
-
- public String getId();
-
- /**
- * 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 getProperties();
-
- public String getProperty(String key);
-
- public IProvidedCapability[] getProvidedCapabilities();
-
- public IRequiredCapability[] getRequiredCapabilities();
-
- public IRequiredCapability[] getMetaRequiredCapabilities();
-
- public ITouchpointData[] getTouchpointData();
-
- public ITouchpointType getTouchpointType();
-
- public Version getVersion();
-
- public boolean isFragment();
-
- /**
- * 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();
-
- public boolean isSingleton();
-
- /**
- * Returns whether this unit has a provided capability that satisfies the given
- * required capability.
- * @return <code>true</code> if this unit satisfies the given required
- * capability, and <code>false</code> otherwise.
- */
- public boolean satisfies(IRequiredCapability 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 license that applies to this installable unit.
- * @return the license that applies to this installable unit or <code>null</code>
- */
- public ILicense getLicense();
-
- /**
- * Returns the copyright that applies to this installable unit.
- * @return the copyright that applies to this installable unit or <code>null</code>
- */
- public ICopyright getCopyright();
-
- /**
- * 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/internal/provisional/p2/metadata/IInstallableUnitFragment.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnitFragment.java
deleted file mode 100644
index a803f63a0..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnitFragment.java
+++ /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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata;
-
-/**
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IInstallableUnitFragment extends IInstallableUnit {
- public IRequiredCapability[] getHost();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnitPatch.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnitPatch.java
deleted file mode 100644
index f67c7127d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnitPatch.java
+++ /dev/null
@@ -1,48 +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.metadata;
-
-/**
- * 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.
- */
-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)).
- */
- IRequiredCapability[][] getApplicabilityScope();
-
- /**
- * Returns the requirement changes imposed by the patch.
- * @return The patch requirement changes.
- */
- 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.
- */
- IRequiredCapability getLifeCycle();
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ILicense.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ILicense.java
deleted file mode 100644
index 99916dec8..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ILicense.java
+++ /dev/null
@@ -1,60 +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.internal.provisional.p2.metadata;
-
-import java.math.BigInteger;
-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.
- */
-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.
- *
- * Any SPI must maintain the same semantics as:
- * <code>{@link org.eclipse.equinox.internal.provisional.p2.metadata.ILicense#getDigest()}</code>
- * @return the message digest as a <code>BigInteger</code>, never <code>null</code>
- */
- public BigInteger getDigest();
-
- /**
- * 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/internal/provisional/p2/metadata/IProvidedCapability.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IProvidedCapability.java
deleted file mode 100644
index bc43a9b84..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IProvidedCapability.java
+++ /dev/null
@@ -1,61 +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.internal.provisional.p2.metadata;
-
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-
-/**
- * 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.
- */
-public interface IProvidedCapability {
-
- public String getName();
-
- public String getNamespace();
-
- public Version getVersion();
-
- /**
- * Returns whether this provided capability satisfies the given required capability.
- * @return <code>true</code> if this capability satisfies the given required
- * capability, and <code>false</code> otherwise.
- *
- * This method must maintain the following semantics:
- * <ul>
- * <li> If the provided capability and the candidate have different names,
- * return false
- * <li> If the provided capability and the candidate have different namespaces.
- * return false
- * <li> If the candidate's version range includes the provided capability's
- * version, return true
- * <li> otherwise, return false
- * </ul>
- *
- */
- public boolean satisfies(IRequiredCapability candidate);
-
- /**
- * 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/internal/provisional/p2/metadata/IRequiredCapability.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IRequiredCapability.java
deleted file mode 100644
index 3c38a0bf5..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IRequiredCapability.java
+++ /dev/null
@@ -1,88 +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.provisional.p2.metadata;
-
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-
-/**
- * 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 {
-
- 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();
-
- /**
- * Returns the properties to use for evaluating required capability filters
- * downstream from this capability. For example, if the selector "doc"
- * is provided, then a downstream InstallableUnit with a required capability
- * filtered with "doc=true" will be included.
- */
- public String[] getSelectors();
-
- public boolean isMultiple();
-
- public boolean isOptional();
-
- /**
- * TODO This object shouldn't be mutable since it makes equality unstable, and
- * introduces lifecycle issues (how are the changes persisted, etc)
- */
- public void setFilter(String filter);
-
- /**
- * TODO This object shouldn't be mutable since it makes equality unstable, and
- * introduces lifecycle issues (how are the changes persisted, etc)
- */
- public void setSelectors(String[] selectors);
-
- public boolean isGreedy();
-
- /**
- * Returns whether this required 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 IRequiredCapability
- * <li> The result of <b>getFilter()</b> on both objects are equal
- * <li> The result of <b>isMultiple()</b> on both objects are equal
- * <li> The result of <b>getName()</b> on both objects are equal
- * <li> The result of <b>geNamespace()</b> on both objects are equal
- * <li> The result of <b>isOptional()</b> on both objects are equal
- * <li> The result of <b>getRange()</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/internal/provisional/p2/metadata/IRequirementChange.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IRequirementChange.java
deleted file mode 100644
index 59578f7da..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IRequirementChange.java
+++ /dev/null
@@ -1,35 +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.provisional.p2.metadata;
-
-/**
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IRequirementChange {
-
- public IRequiredCapability applyOn();
-
- public IRequiredCapability newValue();
-
- 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>
- */
- public boolean equals(Object other);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointData.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointData.java
deleted file mode 100644
index c1ea83b1a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointData.java
+++ /dev/null
@@ -1,50 +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.provisional.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.
- */
-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 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/internal/provisional/p2/metadata/ITouchpointInstruction.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointInstruction.java
deleted file mode 100644
index e2322f5e7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointInstruction.java
+++ /dev/null
@@ -1,72 +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.provisional.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.
- */
-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/internal/provisional/p2/metadata/ITouchpointType.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointType.java
deleted file mode 100644
index db36a94d6..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/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.internal.provisional.p2.metadata;
-
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-
-/**
- * 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.
- */
-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/internal/provisional/p2/metadata/IUpdateDescriptor.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IUpdateDescriptor.java
deleted file mode 100644
index 73c0f3b3f..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/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.internal.provisional.p2.metadata;
-
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-
-/**
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IUpdateDescriptor {
- public final int NORMAL = 0;
- public final int HIGH = 1;
-
- /**
- * The identifier of an installable unit that the installable unit containing this object is an update for.
- * @return An installable unit id
- */
- public String getId();
-
- /**
- * The range of the installable unit that the installable unit containing this object is an update for.
- * @return A version range
- */
- public VersionRange getRange();
-
- /**
- * The description of the update. This allows to explain what the update is about.
- * @return A description
- */
- public String getDescription();
-
- /**
- * 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/internal/provisional/p2/metadata/MetadataFactory.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/MetadataFactory.java
deleted file mode 100644
index 67eaded78..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/MetadataFactory.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
- * Genuitec, LLC
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata;
-
-import java.net.URI;
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.internal.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-
-/**
- * A factory class for instantiating various p2 metadata objects.
- */
-public 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 product
- * the resulting immutable unit.
- */
- public static class InstallableUnitDescription {
- protected InstallableUnit unit;
-
- public InstallableUnitDescription() {
- super();
- }
-
- public void addProvidedCapabilities(Collection additional) {
- if (additional == null || additional.size() == 0)
- return;
- IProvidedCapability[] current = unit().getProvidedCapabilities();
- IProvidedCapability[] result = new IProvidedCapability[additional.size() + current.length];
- System.arraycopy(current, 0, result, 0, current.length);
- int j = current.length;
- for (Iterator i = additional.iterator(); i.hasNext();)
- result[j++] = (IProvidedCapability) i.next();
- unit().setCapabilities(result);
- }
-
- public void addRequiredCapabilities(Collection additional) {
- if (additional == null || additional.size() == 0)
- return;
- IRequiredCapability[] current = unit().getRequiredCapabilities();
- IRequiredCapability[] result = new IRequiredCapability[additional.size() + current.length];
- System.arraycopy(current, 0, result, 0, current.length);
- int j = current.length;
- for (Iterator i = additional.iterator(); i.hasNext();)
- result[j++] = (IRequiredCapability) i.next();
- unit().setRequiredCapabilities(result);
- }
-
- public void addTouchpointData(ITouchpointData data) {
- Assert.isNotNull(data);
- unit().addTouchpointData(data);
- }
-
- public String getId() {
- return unit().getId();
- }
-
- public IProvidedCapability[] getProvidedCapabilities() {
- return unit().getProvidedCapabilities();
- }
-
- public IRequiredCapability[] getRequiredCapabilities() {
- return unit().getRequiredCapabilities();
- }
-
- public IRequiredCapability[] getMetaRequiredCapabilities() {
- return unit().getMetaRequiredCapabilities();
- }
-
- /**
- * 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 ITouchpointData[] getTouchpointData() {
- return unit().getTouchpointData();
-
- }
-
- public Version getVersion() {
- return unit().getVersion();
- }
-
- public void setArtifacts(IArtifactKey[] value) {
- unit().setArtifacts(value);
- }
-
- public void setCapabilities(IProvidedCapability[] exportedCapabilities) {
- unit().setCapabilities(exportedCapabilities);
- }
-
- public void setCopyright(ICopyright copyright) {
- unit().setCopyright(copyright);
- }
-
- public void setFilter(String filter) {
- unit().setFilter(filter);
- }
-
- public void setId(String id) {
- unit().setId(id);
- }
-
- public void setLicense(ILicense license) {
- unit().setLicense(license);
- }
-
- public void setProperty(String key, String value) {
- unit().setProperty(key, value);
- }
-
- public void setRequiredCapabilities(IRequiredCapability[] requirements) {
- unit().setRequiredCapabilities(requirements);
- }
-
- public void setMetaRequiredCapabilities(IRequiredCapability[] metaRequirements) {
- unit().setMetaRequiredCapabilities(metaRequirements);
- }
-
- public void setSingleton(boolean singleton) {
- unit().setSingleton(singleton);
- }
-
- public void setTouchpointType(ITouchpointType type) {
- unit().setTouchpointType(type);
- }
-
- public void setUpdateDescriptor(IUpdateDescriptor updateInfo) {
- unit().setUpdateDescriptor(updateInfo);
- }
-
- 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;
- }
- }
-
- /**
- * Description of an installable unit patch. The description will automatically have
- * the {@link IInstallableUnit#PROP_TYPE_FRAGMENT} set to <code>true</code>.
- */
- public static class InstallableUnitFragmentDescription extends InstallableUnitDescription {
- public InstallableUnitFragmentDescription() {
- super();
- setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- }
-
- public void setHost(IRequiredCapability[] hostRequirements) {
- ((InstallableUnitFragment) unit()).setHost(hostRequirements);
- }
-
- InstallableUnit unit() {
- if (unit == null)
- unit = new InstallableUnitFragment();
- return unit;
- }
- }
-
- /**
- * Description of an installable unit patch. The description will automatically have
- * the {@link IInstallableUnit#PROP_TYPE_PATCH} set to <code>true</code>.
- */
- public static class InstallableUnitPatchDescription extends InstallableUnitDescription {
-
- public InstallableUnitPatchDescription() {
- super();
- setProperty(IInstallableUnit.PROP_TYPE_PATCH, Boolean.TRUE.toString());
- }
-
- public void setApplicabilityScope(IRequiredCapability[][] applyTo) {
- if (applyTo == null)
- throw new IllegalArgumentException("A patch scope can not be null"); //$NON-NLS-1$
- ((InstallableUnitPatch) unit()).setApplicabilityScope(applyTo);
- }
-
- public void setLifeCycle(IRequiredCapability lifeCycle) {
- ((InstallableUnitPatch) unit()).setLifeCycle(lifeCycle);
- }
-
- public void setRequirementChanges(IRequirementChange[] changes) {
- ((InstallableUnitPatch) unit()).setRequirementsChange(changes);
- }
-
- InstallableUnit unit() {
- if (unit == null) {
- unit = new InstallableUnitPatch();
- ((InstallableUnitPatch) unit()).setApplicabilityScope(new IRequiredCapability[0][0]);
- }
- return unit;
- }
- }
-
- /**
- * Singleton touchpoint data for a touchpoint with no instructions.
- */
- private static final ITouchpointData EMPTY_TOUCHPOINT_DATA = new TouchpointData(Collections.EMPTY_MAP);
-
- 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 IRequiredCapability} 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 it requires exactly one match
- */
- public static IRequiredCapability createRequiredCapability(String namespace, String name, VersionRange range, String filter, boolean optional, boolean multiple) {
- return new RequiredCapability(namespace, name, range, filter, optional, multiple);
- }
-
- public static IRequiredCapability createRequiredCapability(String namespace, String name, VersionRange range, String filter, boolean optional, boolean multiple, boolean greedy) {
- return new RequiredCapability(namespace, name, range, filter, optional, multiple, greedy);
- }
-
- /**
- * 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(IRequiredCapability applyOn, IRequiredCapability newValue) {
- return new RequirementChange(applyOn, newValue);
- }
-
- /**
- * 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);
- }
-
- /**
- * 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 instructions) {
- Assert.isNotNull(instructions);
- //copy the map to protect against subsequent change by caller
- if (instructions.isEmpty())
- return EMPTY_TOUCHPOINT_DATA;
-
- Map result = new LinkedHashMap(instructions.size());
- for (Iterator iterator = instructions.entrySet().iterator(); iterator.hasNext();) {
- Entry entry = (Entry) iterator.next();
- Object value = entry.getValue();
- if (value == null || value instanceof String)
- value = createTouchpointInstruction((String) value, null);
-
- result.put(entry.getKey(), value);
- }
- return new TouchpointData(result);
- }
-
- 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(String id, VersionRange range, int severity, String description) {
- return new UpdateDescriptor(id, range, severity, description);
- }
-
- 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/internal/provisional/p2/metadata/query/CapabilityQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/CapabilityQuery.java
deleted file mode 100644
index 8a7bf23d2..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/CapabilityQuery.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.provisional.p2.metadata.query;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.query.MatchQuery;
-
-/**
- * A query that searches for {@link IInstallableUnit} instances that provide
- * capabilities that match one or more required capabilities.
- */
-public class CapabilityQuery extends MatchQuery {
- private IRequiredCapability[] required;
-
- /**
- * Creates a new query on the given required capability.
- * @param required The required capability
- */
- public CapabilityQuery(IRequiredCapability required) {
- this.required = new IRequiredCapability[] {required};
- }
-
- /**
- * Creates a new query on the given required capabilities. The installable
- * unit must provide capabilities that match all of the given required capabilities
- * for this query to be satisfied.
- * @param required The required capabilities
- */
- public CapabilityQuery(IRequiredCapability[] required) {
- this.required = required;
- }
-
- /**
- * Returns the required capability that this query is matching against.
- * @return the required capability that this query is matching against.
- */
- public IRequiredCapability[] getRequiredCapabilities() {
- return required;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.query2.Query#isMatch(java.lang.Object)
- */
- public boolean isMatch(Object object) {
- if (!(object instanceof IInstallableUnit))
- return false;
- IInstallableUnit candidate = (IInstallableUnit) object;
- for (int i = 0; i < required.length; i++)
- if (!candidate.satisfies(required[i]))
- return false;
- return true;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/IUPropertyQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/IUPropertyQuery.java
deleted file mode 100644
index aff90377e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/IUPropertyQuery.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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.query;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.MatchQuery;
-
-/**
- * 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.
- */
-public class IUPropertyQuery extends MatchQuery {
- private String propertyName;
- private String propertyValue;
-
- /**
- * Creates a new query on the given property name and value.
- */
- public IUPropertyQuery(String propertyName, String propertyValue) {
- this.propertyName = propertyName;
- this.propertyValue = propertyValue;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.query2.Query#isMatch(java.lang.Object)
- */
- public boolean isMatch(Object object) {
- if (!(object instanceof IInstallableUnit))
- return false;
- IInstallableUnit candidate = (IInstallableUnit) object;
- if (propertyName == null)
- return true;
- String value = getProperty(candidate, propertyName);
- if (value != null && (value.equals(propertyValue) || propertyValue == null))
- return true;
- return false;
- }
-
- protected String getProperty(IInstallableUnit iu, String name) {
- return iu.getProperty(name);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/InstallableUnitQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/InstallableUnitQuery.java
deleted file mode 100644
index 92cfe7674..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/InstallableUnitQuery.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.provisional.p2.metadata.query;
-
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.MatchQuery;
-
-/**
- * A query that matches on the id and version of an {@link IInstallableUnit}.
- */
-public class InstallableUnitQuery extends MatchQuery {
- /**
- * A convenience query that will match any {@link IInstallableUnit}
- * it encounters.
- */
- public static final InstallableUnitQuery ANY = new InstallableUnitQuery(null);
-
- private String id;
- private final VersionRange range;
-
- /**
- * 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
- */
- public InstallableUnitQuery(String id) {
- this.id = id;
- this.range = null;
- }
-
- /**
- * 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
- */
- public InstallableUnitQuery(String id, VersionRange range) {
- this.id = id;
- this.range = range;
- }
-
- /**
- * 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
- */
- public InstallableUnitQuery(String id, Version version) {
- this.id = id;
- this.range = new VersionRange(version, true, version, true);
- }
-
- /**
- * Returns the id that this query will match against.
- * @return The installable unit it
- */
- public String getId() {
- return id;
- }
-
- /**
- * Returns the version range that this query will match against.
- * @return The installable unit version range.
- */
- public VersionRange getRange() {
- return range;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.query2.Query#isMatch(java.lang.Object)
- */
- public boolean isMatch(Object object) {
- if (!(object instanceof IInstallableUnit))
- return false;
- IInstallableUnit candidate = (IInstallableUnit) object;
- if (id != null && !id.equals(candidate.getId()))
- return false;
- if (range != null && !range.isIncluded(candidate.getVersion()))
- return false;
- return true;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/LatestIUVersionQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/LatestIUVersionQuery.java
deleted file mode 100644
index c591a2525..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/LatestIUVersionQuery.java
+++ /dev/null
@@ -1,53 +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.internal.provisional.p2.metadata.query;
-
-import java.util.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.ContextQuery;
-
-/**
- * This query returns the latest version for each unique IU Id.
- * All other elements are discarded.
- */
-public class LatestIUVersionQuery extends ContextQuery {
-
- /**
- * Performs the LatestIUVersionQuery
- */
- public Collector perform(Iterator iterator, Collector result) {
- HashMap greatestIUVersion = new HashMap();
- while (iterator.hasNext()) {
- Object next = iterator.next();
-
- if (!(next instanceof IInstallableUnit))
- // Don't accept things if they are not IUs
- continue;
- IInstallableUnit iu = (IInstallableUnit) next;
- if (greatestIUVersion.containsKey(iu.getId())) {
- IInstallableUnit currentIU = (IInstallableUnit) greatestIUVersion.get(iu.getId());
- if (currentIU.getVersion().compareTo(iu.getVersion()) < 0)
- greatestIUVersion.put(iu.getId(), iu);
- } else
- greatestIUVersion.put(iu.getId(), iu);
- }
-
- Collection values = greatestIUVersion.values();
- Iterator valuesIterator = values.iterator();
- boolean continueGather = true;
-
- while (valuesIterator.hasNext() && continueGather) {
- IInstallableUnit nextIU = (IInstallableUnit) valuesIterator.next();
- continueGather = result.accept(nextIU);
- }
- return result;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/UpdateQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/UpdateQuery.java
deleted file mode 100644
index 5896d82fb..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/UpdateQuery.java
+++ /dev/null
@@ -1,39 +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.metadata.query;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.query.MatchQuery;
-
-public class UpdateQuery extends MatchQuery {
- private IInstallableUnit updateFrom;
-
- public UpdateQuery(IInstallableUnit updateFrom) {
- this.updateFrom = updateFrom;
- }
-
- public boolean isMatch(Object obj) {
- if (!(obj instanceof IInstallableUnit))
- return false;
- if (obj instanceof IInstallableUnitPatch) {
- IInstallableUnitPatch potentialPatch = (IInstallableUnitPatch) obj;
- IRequiredCapability lifeCycle = potentialPatch.getLifeCycle();
- if (lifeCycle == null)
- return false;
- return updateFrom.satisfies(lifeCycle);
- }
- IInstallableUnit candidate = (IInstallableUnit) obj;
- IUpdateDescriptor descriptor = candidate.getUpdateDescriptor();
- if (descriptor != null && descriptor.isUpdateOf(updateFrom) && updateFrom.getVersion().compareTo(candidate.getVersion()) < 0)
- return true;
- return false;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/.classpath b/bundles/org.eclipse.equinox.p2.publisher/.classpath
deleted file mode 100644
index ef379494d..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.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.publisher/.cvsignore b/bundles/org.eclipse.equinox.p2.publisher/.cvsignore
deleted file mode 100644
index b14073c95..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-temp.folder \ No newline at end of file
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 623ba5924..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="${project}"/>
-<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 d1b455045..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,347 +0,0 @@
-#Thu Nov 27 14:50:33 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.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=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.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=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=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.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.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 aef15c188..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" 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/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.app@default:true,org.eclipse.equinox.preferences@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.core.jobs@default:default,org.eclipse.osgi.services@default:default,org.eclipse.equinox.security@default:default,org.eclipse.core.net@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.osgi@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.frameworkadmin.equinox@3:true,org.eclipse.equinox.common@default:default,org.eclipse.equinox.frameworkadmin@3:true,org.eclipse.ecf@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.p2.publisher@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.simpleconfigurator@3:true,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@3:true,org.eclipse.equinox.p2.metadata@default:default"/>
-</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 6b78c2e87..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,55 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.publisher;singleton:=true
-Bundle-Version: 1.1.0.qualifier
-Bundle-Name: %bundleName
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Import-Package: javax.xml.parsers,
- org.eclipse.equinox.app;version="1.0.0";resolution:=optional,
- org.eclipse.equinox.internal.frameworkadmin.equinox,
- org.eclipse.equinox.internal.frameworkadmin.utils,
- org.eclipse.equinox.internal.p2.artifact.repository,
- org.eclipse.equinox.internal.p2.core,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.metadata,
- org.eclipse.equinox.internal.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.frameworkadmin,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator,
- 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.4.0",
- org.osgi.service.packageadmin;version="1.2.0",
- org.xml.sax,
- org.xml.sax.helpers
-Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.equinox.internal.p2.publisher.Activator
-Export-Package: org.eclipse.equinox.internal.p2.publisher;
- x-friends:="org.eclipse.equinox.p2.updatesite,
- org.eclipse.equinox.p2.directorywatcher,
- org.eclipse.equinox.p2.touchpoint.eclipse,
- org.eclipse.equinox.p2.ui.sdk",
- org.eclipse.equinox.internal.p2.publisher.eclipse;x-friends:="org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.p2.directorywatcher,org.eclipse.equinox.p2.extensionlocation",
- 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.spi.p2.publisher;x-friends:="org.eclipse.equinox.p2.updatesite"
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
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 23f024bf9..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/build.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 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
-###############################################################################
-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
-extra.ant_tasks/publisher-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.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 315440ea9..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/plugin.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<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">
- </run>
- </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">
- </run>
- </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">
- </run>
- </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/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 d318b67fc..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 context) throws Exception {
- Activator.context = context;
- }
-
- public void stop(BundleContext context) 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 4fd08471c..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 fileset = new HashSet();
- private final ArrayList permissions = new ArrayList();
- 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 (String[][]) permissions.toArray(new String[permissions.size()][]);
- }
-
- public File[] getFiles() {
- return (File[]) 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 ed027a03f..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Messages.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.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_noPluginConverter;
- public static String exception_errorPublishingArtifacts;
- public static String exception_noArtifactRepo;
- public static String exception_noMetadataRepo;
- public static String exception_errorLoadingProperties;
- public static String exception_noBundlesOrLocations;
- public static String exception_noFeaturesOrLocations;
- public static String exception_invalidSiteReference;
- public static String exception_invalidSiteReferenceInFeature;
-
- public static String message_generatingMetadata;
- public static String message_generationCompleted;
- public static String message_noSimpleconfigurator;
-
- 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 452532749..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 {
- 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 Object nextElement() {
- return nextToken();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/SingleElementCollector.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/SingleElementCollector.java
deleted file mode 100644
index 31cc01630..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/SingleElementCollector.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.publisher;
-
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-
-/**
- * Collect a single element and stop the Query
- */
-public class SingleElementCollector extends Collector {
-
- public boolean accept(Object object) {
- super.accept(object);
- return false;
- }
-
- public Object getElement() {
- if (!isEmpty())
- return iterator().next();
- return null;
- }
-}
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 8381929e1..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java
+++ /dev/null
@@ -1,508 +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();
- if ("linux".equals(os)) //$NON-NLS-1$
- brandLinux();
- if ("solaris".equals(os)) //$NON-NLS-1$
- brandSolaris();
- if ("macosx".equals(os)) //$NON-NLS-1$
- brandMac();
- if ("aix".equals(os)) //$NON-NLS-1$
- brandAIX();
- if ("hpux".equals(os)) //$NON-NLS-1$
- brandHPUX();
- }
-
- 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 target = root + '/' + name + ".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 = new File(initialRoot);
- rootFolder.delete();
- if (rootFolder.exists()) {
- //if the rootFolder still exists, its because there were other files that need to be moved over
- moveContents(rootFolder, new File(target));
- }
- 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, "launcher.exe"); //$NON-NLS-1$
- if (!templateLauncher.exists())
- templateLauncher = new File(root, "eclipse.exe"); //$NON-NLS-1$
- if (brandIcons) {
- String[] args = new String[icons.length + 1];
- args[0] = templateLauncher.getAbsolutePath();
- System.arraycopy(icons, 0, args, 1, icons.length);
- IconExe.main(args);
- }
- 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 = new File(initialRoot + "/MacOS/launcher"); //$NON-NLS-1$
- File eclipseLauncher = new File(initialRoot + "/MacOS/eclipse"); //$NON-NLS-1$
- if (!launcher.exists()) {
- launcher = eclipseLauncher;
- } else if (eclipseLauncher.exists()) {
- //we may actually have both if exporting from the mac
- eclipseLauncher.delete();
- }
- File targetFile = new File(targetLauncher, name);
- try {
- if (targetFile.getCanonicalFile().equals(launcher.getCanonicalFile())) {
- 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 void copyMacIni(String initialRoot, String target, String iconName) {
- File brandedIni = new File(initialRoot, "/MacOS/" + name + ".ini"); //$NON-NLS-1$ //$NON-NLS-2$
-
- File ini = new File(initialRoot, "/MacOS/eclipse.ini"); //$NON-NLS-1$
- if (!ini.exists() && !brandedIni.exists())
- return;
-
- if (brandedIni.exists() && ini.exists()) {
- //take the one that is already branded
- ini.delete();
- ini = brandedIni;
- }
-
- StringBuffer buffer;
- try {
- buffer = readFile(ini);
- ini.delete();
- } 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 {
- File targetFile = new File(target, "/MacOS/" + name + ".ini"); //$NON-NLS-1$//$NON-NLS-2$
- transferStreams(new ByteArrayInputStream(buffer.toString().getBytes()), new FileOutputStream(targetFile));
- } 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 254d93c12..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/DataLoader.java
+++ /dev/null
@@ -1,156 +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.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.internal.provisional.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-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 static final String ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_MANIPULATOR = "org.eclipse.equinox.simpleconfigurator.manipulator"; //$NON-NLS-1$
- private static final String ORG_ECLIPSE_EQUINOX_FRAMEWORKADMIN_EQUINOX = "org.eclipse.equinox.frameworkadmin.equinox"; //$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);
- 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());
- BundleInfo[] bundleInfos = simpleManipulator.loadConfiguration(new URL(value), 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() {
- FrameworkAdmin frameworkAdmin = (FrameworkAdmin) ServiceHelper.getService(Activator.getContext(), FrameworkAdmin.class.getName(), frameworkAdminFillter);
- if (frameworkAdmin == null) {
- startBundle(ORG_ECLIPSE_EQUINOX_FRAMEWORKADMIN_EQUINOX);
- startBundle(ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_MANIPULATOR);
- frameworkAdmin = (FrameworkAdmin) ServiceHelper.getService(Activator.getContext(), FrameworkAdmin.class.getName(), frameworkAdminFillter);
- }
- return frameworkAdmin;
- }
-
- private boolean startBundle(String bundleId) {
- PackageAdmin packageAdmin = (PackageAdmin) ServiceHelper.getService(Activator.getContext(), PackageAdmin.class.getName());
- if (packageAdmin == null)
- return false;
-
- Bundle[] bundles = packageAdmin.getBundles(bundleId, null);
- if (bundles != null && bundles.length > 0) {
- for (int i = 0; i < bundles.length; i++) {
- try {
- if ((bundles[0].getState() & Bundle.RESOLVED) > 0) {
- bundles[0].start();
- return true;
- }
- } catch (BundleException e) {
- // failed, try next bundle
- }
- }
- }
- return false;
- }
-}
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 330779019..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.*;
-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 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);
- }
- // 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");
- }
-
- /**
- * 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]);
- if (!result.exists())
- return null;
- return new ExecutablesDescriptor(config[1], "launcher", result, new File[] {result});
- }
-
- /**
- * 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(11);
- else {
- this.files = new HashSet(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(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 = (File[]) 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 (Iterator i = files.iterator(); i.hasNext();)
- FileUtils.copy(location, tempFile, (File) i.next(), 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 filesCopy = new HashSet(files);
- for (Iterator i = filesCopy.iterator(); i.hasNext();) {
- File file = (File) i.next();
- 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 ae6239b7f..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureManifestParser.java
+++ /dev/null
@@ -1,266 +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 messageKeys = new ArrayList();
-
- 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 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);
- 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 47a802066..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 messageKeys = parser.getMessageKeys();
- String[] keyStrings = (String[]) 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 messageKeys = parser.getMessageKeys();
- 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;
- }
-}
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 b301e4aba..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.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.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 cdb7a70d8..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java
+++ /dev/null
@@ -1,129 +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.Properties;
-
-/**
- * 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 getBundles(boolean includeFragments);
-
- /**
- * Returns a list<VersionedName> of fragments that constitute this product.
- */
- public List getFragments();
-
- /**
- * Returns a List<VersionedName> of features that constitute this product.
- */
- public List 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 Properties 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 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 ab3984e9b..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
+++ /dev/null
@@ -1,749 +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 org.eclipse.equinox.internal.provisional.p2.core.VersionedName;
-
-import java.io.*;
-import java.util.*;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-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$
- private 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$
- private static final String ATTRIBUTE_VERSION = "version"; //$NON-NLS-1$
- private 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 icons = new HashMap(6);
- private String configPath = null;
- private final Map platformSpecificConfigPaths = new HashMap();
- private String configPlatform = null;
- private String platformConfigPath = 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 splashLocation = null;
- private String productName = null;
- private String application = null;
- private String version = null;
- private Properties launcherArgs = new Properties();
- private File location;
- private List bundleInfos;
- private Properties 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 Properties getConfigurationProperties() {
- Properties result = properties != null ? properties : new Properties();
- if (application != null && !result.contains(PROPERTY_ECLIPSE_APPLICATION))
- result.put(PROPERTY_ECLIPSE_APPLICATION, application);
- if (id != null && !result.contains(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 getBundles(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;
- }
-
- /**
- * Returns a List<BundleInfo> for each bundle that has custom configuration data
- * in the product file.
- * @return A List<BundleInfo>
- */
- public List getBundleInfos() {
- return bundleInfos != null ? bundleInfos : Collections.EMPTY_LIST;
- }
-
- /**
- * Returns a list<VersionedName> of fragments that constitute this product.
- */
- public List getFragments() {
- if (fragments == null)
- return Collections.EMPTY_LIST;
- return fragments;
- }
-
- /**
- * Returns a List<VersionedName> of features that constitute this product.
- */
- public List getFeatures() {
- if (features == null)
- return Collections.EMPTY_LIST;
- return features;
- }
-
- public String[] getIcons(String os) {
- Collection result = (Collection) icons.get(os);
- if (result == null)
- return null;
- return (String[]) result.toArray(new String[result.size()]);
- }
-
- public String getConfigIniPath(String os) {
- String specific = (String) 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 Properties();
- 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();
- 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);
- }
-
- private void processPlugin(Attributes attributes) {
- String fragment = attributes.getValue(ATTRIBUTE_FRAGMENT);
- VersionedName name = new VersionedName(attributes.getValue(ATTRIBUTE_ID), attributes.getValue(ATTRIBUTE_VERSION));
- if (fragment != null && new Boolean(fragment).booleanValue()) {
- if (fragments == null)
- fragments = new ArrayList();
- fragments.add(name);
- } else {
- if (plugins == null)
- plugins = new ArrayList();
- plugins.add(name);
- }
- }
-
- private void processFeature(Attributes attributes) {
- VersionedName name = new VersionedName(attributes.getValue(ATTRIBUTE_ID), attributes.getValue(ATTRIBUTE_VERSION));
- if (features == null)
- features = new ArrayList();
- 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;
- Collection list = (Collection) icons.get(os);
- if (list == null) {
- list = new ArrayList(6);
- icons.put(os, list);
- }
- if (!new File(value).isAbsolute())
- value = new File(location.getParentFile(), value).getAbsolutePath();
- list.add(value);
- }
-
- 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 caa619101..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/messages.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
-###############################################################################
-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_errorPublishingArtifacts = An error occurred while publishing artifacts.
-exception_errorLoadingProperties = An error occurred while loading the properties file {0}.
-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}.
-message_generatingMetadata = Generating metadata for {0}.
-message_generationCompleted = Generation completed with success [{0} seconds].
-message_noSimpleconfigurator = Could not find simpleconfigurator bundle.
-
-error_rootIU_generation = Could not generate root IU {0}, {1}, {2}.. \ 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 3efd45525..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 images = new ArrayList();
- 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 = (ImageData[]) 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 0896a311c..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.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.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 413ca9143..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java
+++ /dev/null
@@ -1,551 +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 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.core.helpers.FileUtils.IPathComputer;
-import org.eclipse.equinox.internal.p2.publisher.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.LatestIUVersionQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-import org.eclipse.equinox.p2.publisher.actions.*;
-import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-import org.osgi.framework.Filter;
-import org.osgi.framework.InvalidSyntaxException;
-
-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 result = new ArrayList();
- for (QuotedTokenizer tokens = new QuotedTokenizer(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()]);
- }
-
- /**
- * 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 String 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 "(& " + filterWs + filterOs + filterArch + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- return null;
- }
-
- protected boolean filterMatches(String filter, String configSpec) {
- if (filter == null)
- return true;
-
- Filter ldapFilter = null;
- try {
- ldapFilter = Activator.context.createFilter(filter);
- } catch (InvalidSyntaxException e) {
- // TODO true or false on error?
- return true;
- }
-
- String[] config = parseConfigSpec(configSpec);
- Dictionary environment = new Hashtable(3);
- environment.put("osgi.ws", config[0]); //$NON-NLS-1$
- environment.put("osgi.os", config[1]); //$NON-NLS-1$
- environment.put("osgi.arch", config[2]); //$NON-NLS-1$
- return ldapFilter.match(environment);
- }
-
- /**
- * 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 createIURequirements(Collection children) {
- ArrayList result = new ArrayList(children.size());
- for (Iterator i = children.iterator(); i.hasNext();) {
- Object next = i.next();
- if (next instanceof IInstallableUnit) {
- IInstallableUnit iu = (IInstallableUnit) next;
- VersionRange range = new VersionRange(iu.getVersion(), true, iu.getVersion(), true);
- result.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, iu.getFilter(), false, false));
- } else if (next instanceof VersionedName) {
- VersionedName name = (VersionedName) next;
- Version version = name.getVersion();
- VersionRange range = (version == null || Version.emptyVersion.equals(version)) ? VersionRange.emptyRange : new VersionRange(version, true, version, true);
- String filter = getFilterAdvice(name);
- result.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, name.getId(), range, filter, false, false));
- }
- }
- return result;
- }
-
- private String getFilterAdvice(VersionedName name) {
- if (info == null)
- return null;
- Collection filterAdvice = info.getAdvice(CONFIG_ANY, true, name.getId(), name.getVersion(), IFilterAdvice.class);
- for (Iterator i = filterAdvice.iterator(); i.hasNext();) {
- IFilterAdvice advice = (IFilterAdvice) i.next();
- String 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) {
- final String PACKED_FORMAT = "packed"; //$NON-NLS-1$
- //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()));
- }
- ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
- result.setProcessingSteps(steps);
- result.setProperty(IArtifactDescriptor.FORMAT, PACKED_FORMAT);
- return result;
- }
-
- protected InstallableUnitDescription createParentIU(Collection children, String id, Version version) {
- InstallableUnitDescription root = createIUShell(id, version);
- root.addRequiredCapabilities(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 advice = publisherInfo.getAdvice(null, false, iu.getId(), iu.getVersion(), IAdditionalInstallableUnitAdvice.class);
- if (advice.isEmpty())
- return null;
-
- List ius = new ArrayList();
- for (Iterator iterator = advice.iterator(); iterator.hasNext();) {
- IAdditionalInstallableUnitAdvice entry = (IAdditionalInstallableUnitAdvice) iterator.next();
- InstallableUnitDescription[] others = entry.getAdditionalInstallableUnitDescriptions(iu);
- if (others != null)
- ius.addAll(Arrays.asList(others));
- }
- return (InstallableUnitDescription[]) 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, ArtifactDescriptor descriptor, IPublisherInfo info) {
- Collection advice = info.getAdvice(null, false, iu.getId(), iu.getVersion(), IPropertyAdvice.class);
- for (Iterator i = advice.iterator(); i.hasNext();) {
- IPropertyAdvice entry = (IPropertyAdvice) i.next();
- Properties props = entry.getArtifactProperties(iu, descriptor);
- if (props == null)
- continue;
- for (Iterator j = props.keySet().iterator(); j.hasNext();) {
- String key = (String) j.next();
- descriptor.setRepositoryProperty(key, props.getProperty(key));
- }
- }
- }
-
- /**
- * 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 advice = info.getAdvice(null, false, iu.getId(), iu.getVersion(), IPropertyAdvice.class);
- for (Iterator i = advice.iterator(); i.hasNext();) {
- IPropertyAdvice entry = (IPropertyAdvice) i.next();
- Properties props = entry.getInstallableUnitProperties(iu);
- if (props == null)
- continue;
- for (Iterator j = props.keySet().iterator(); j.hasNext();) {
- String key = (String) j.next();
- iu.setProperty(key, props.getProperty(key));
- }
- }
- }
-
- /**
- * 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 advice = info.getAdvice(null, false, iu.getId(), iu.getVersion(), ICapabilityAdvice.class);
- if (advice.isEmpty())
- return;
-
- for (Iterator i = advice.iterator(); i.hasNext();) {
- ICapabilityAdvice entry = (ICapabilityAdvice) i.next();
-
- //process required capabilities
- IRequiredCapability[] requiredAdvice = entry.getRequiredCapabilities(iu);
- if (requiredAdvice != null) {
- IRequiredCapability[] current = iu.getRequiredCapabilities();
- Set resultRequiredCapabilities = new HashSet(Arrays.asList(current));
-
- // remove current required capabilities that match (same name and namespace) advice.
- for (int j = 0; j < current.length; j++) {
- IRequiredCapability currentRequiredCapability = current[j];
- for (int k = 0; k < requiredAdvice.length; k++) {
- IRequiredCapability requiredCapability = requiredAdvice[k];
- if (requiredCapability.getNamespace().equals(currentRequiredCapability.getNamespace()) && requiredCapability.getName().equals(currentRequiredCapability.getName())) {
- resultRequiredCapabilities.remove(currentRequiredCapability);
- break;
- }
- }
- }
- // add all advice
- resultRequiredCapabilities.addAll(Arrays.asList(requiredAdvice));
- iu.setRequiredCapabilities((IRequiredCapability[]) resultRequiredCapabilities.toArray(new IRequiredCapability[resultRequiredCapabilities.size()]));
- }
-
- //process meta required capabilities
- IRequiredCapability[] metaRequiredAdvice = entry.getMetaRequiredCapabilities(iu);
- if (metaRequiredAdvice != null) {
- IRequiredCapability[] current = iu.getMetaRequiredCapabilities();
- Set resultMetaRequiredCapabilities = new HashSet(Arrays.asList(current));
-
- // remove current meta-required capabilities that match (same name and namespace) advice.
- for (int j = 0; j < current.length; j++) {
- IRequiredCapability currentMetaRequiredCapability = current[j];
- for (int k = 0; k < metaRequiredAdvice.length; k++) {
- IRequiredCapability metaRequiredCapability = metaRequiredAdvice[k];
- if (metaRequiredCapability.getNamespace().equals(currentMetaRequiredCapability.getNamespace()) && metaRequiredCapability.getName().equals(currentMetaRequiredCapability.getName())) {
- resultMetaRequiredCapabilities.remove(currentMetaRequiredCapability);
- break;
- }
- }
- }
-
- // add all advice
- resultMetaRequiredCapabilities.addAll(Arrays.asList(metaRequiredAdvice));
- iu.setMetaRequiredCapabilities((IRequiredCapability[]) resultMetaRequiredCapabilities.toArray(new IRequiredCapability[resultMetaRequiredCapabilities.size()]));
- }
-
- //process provided capabilities
- IProvidedCapability[] providedAdvice = entry.getProvidedCapabilities(iu);
- if (providedAdvice != null) {
- IProvidedCapability[] current = iu.getProvidedCapabilities();
- Set resultProvidedCapabilities = new HashSet(Arrays.asList(current));
- for (int j = 0; j < current.length; j++) {
- IProvidedCapability currentProvidedCapability = current[j];
- 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((IProvidedCapability[]) 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 currentInstructions, IPublisherInfo info) {
- Collection advice = info.getAdvice(null, false, iu.getId(), iu.getVersion(), ITouchpointAdvice.class);
- if (currentInstructions == null) {
- if (advice.isEmpty())
- return;
-
- currentInstructions = Collections.EMPTY_MAP;
- }
-
- ITouchpointData result = MetadataFactory.createTouchpointData(currentInstructions);
- for (Iterator i = advice.iterator(); i.hasNext();) {
- ITouchpointAdvice entry = (ITouchpointAdvice) i.next();
- 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 (destination instanceof IFileArtifactRepository) {
- // TODO need to review this logic to ensure it makes sense.
- // 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 (inclusion.equals(descriptorFile)) {
- destination.addDescriptor(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;
- }
- try {
- if (destination instanceof IFileArtifactRepository) {
- // TODO need to review this logic to ensure it makes sense.
- // 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 (inclusion.equals(descriptorFile)) {
- destination.addDescriptor(descriptor);
- return;
- }
- }
-
- // TODO need to implement the overwrite story in the repos
- // boolean overwrite = (info.getArtifactOptions() & IPublisherInfo.A_OVERWRITE) > 0;
- 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) {
- Query query = null;
- Collector collector = null;
- if (version != null && !Version.emptyVersion.equals(version)) {
- query = new InstallableUnitQuery(iuId, version);
- collector = new SingleElementCollector();
- } else {
- query = new CompositeQuery(new Query[] {new InstallableUnitQuery(iuId), new LatestIUVersionQuery()});
- collector = new Collector();
- }
-
- NullProgressMonitor progress = new NullProgressMonitor();
- if (publisherResult != null)
- collector = publisherResult.query(query, collector, progress);
- if (collector.isEmpty() && info.getMetadataRepository() != null)
- collector = info.getMetadataRepository().query(query, collector, progress);
- if (collector.isEmpty() && info.getContextMetadataRepository() != null)
- collector = info.getContextMetadataRepository().query(query, collector, progress);
-
- if (!collector.isEmpty())
- return (IInstallableUnit) 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 IInstallableUnit[] queryForIUs(IPublisherResult publisherResult, String iuId, VersionRange versionRange) {
- Query query = null;
- Collector collector = new Collector();
- query = new InstallableUnitQuery(iuId, versionRange);
- NullProgressMonitor progress = new NullProgressMonitor();
- if (publisherResult != null)
- collector = publisherResult.query(query, collector, progress);
- if (collector.isEmpty() && info.getMetadataRepository() != null)
- collector = info.getMetadataRepository().query(query, collector, progress);
- if (collector.isEmpty() && info.getContextMetadataRepository() != null)
- collector = info.getContextMetadataRepository().query(query, collector, progress);
-
- if (!collector.isEmpty())
- return (IInstallableUnit[]) collector.toArray(IInstallableUnit.class);
- return new IInstallableUnit[0];
- }
-
- 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 b05b2cdfb..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java
+++ /dev/null
@@ -1,360 +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.p2.publisher;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-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.ArtifactRepositoryManager;
-import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
-import org.eclipse.equinox.internal.p2.core.ProvisioningEventBus;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
-import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.internal.p2.publisher.Messages;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.ServiceRegistration;
-
-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$
-
- private ArtifactRepositoryManager defaultArtifactManager;
- private ServiceRegistration registrationDefaultArtifactManager;
- private MetadataRepositoryManager defaultMetadataManager;
- private ServiceRegistration registrationDefaultMetadataManager;
- private IProvisioningEventBus bus;
- private ServiceRegistration registrationBus;
- 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;
-
- /**
- * 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 info) throws ProvisionException {
- if (inplace) {
- File location = new File(source);
- if (metadataLocation == null)
- metadataLocation = location.toURI();
- if (artifactLocation == null)
- artifactLocation = location.toURI();
- info.setArtifactOptions(info.getArtifactOptions() | IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH);
- }
- initializeRepositories(info);
- }
-
- protected IStatus createConfigurationEror(String message) {
- return new Status(IStatus.ERROR, "org.eclipse.equinox.p2.publisher", message); //$NON-NLS-1$
- }
-
- protected void initializeRepositories(PublisherInfo info) throws ProvisionException {
- if (artifactLocation != null)
- info.setArtifactRepository(Publisher.createArtifactRepository(artifactLocation, artifactRepoName, append, compress, reusePackedFiles));
- 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(metadataLocation, metadataRepoName, append, compress));
-
- if (contextMetadataRepositories != null && contextMetadataRepositories.length > 0) {
- CompositeMetadataRepository contextMetadata = CompositeMetadataRepository.createMemoryComposite();
- if (contextMetadata != null) {
- for (int i = 0; i < contextMetadataRepositories.length; i++)
- contextMetadata.addChild(contextMetadataRepositories[i]);
- if (contextMetadata.getChildren().size() > 0)
- info.setContextMetadataRepository(contextMetadata);
- }
- }
- if (contextArtifactRepositories != null && contextArtifactRepositories.length > 0) {
- CompositeArtifactRepository contextArtifact = CompositeArtifactRepository.createMemoryComposite();
- if (contextArtifact != null) {
- for (int i = 0; i < contextArtifactRepositories.length; i++)
- contextArtifact.addChild(contextArtifactRepositories[i]);
-
- if (contextArtifact.getChildren().size() > 0)
- info.setContextArtifactRepository(contextArtifact);
- }
- }
- }
-
- protected void processCommandLineArguments(String[] args, PublisherInfo info) 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], info);
-
- // 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], info);
- }
- }
-
- protected void processParameter(String arg, String parameter, PublisherInfo info) 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("Repository location (" + parameter + ") must be a URL."); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- 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("Source location (" + parameter + ") must be a valid file-system path.");
- source = parameter;
- }
-
- if (arg.equalsIgnoreCase("-artifactRepositoryName")) //$NON-NLS-1$
- artifactRepoName = parameter;
-
- if (arg.equalsIgnoreCase("-configs")) //$NON-NLS-1$
- info.setConfigurations(AbstractPublisherAction.getArrayFromString(parameter, ",")); //$NON-NLS-1$
-
- if (arg.equalsIgnoreCase("-contextMetadata")) //$NON-NLS-1$
- info.setContextMetadataRepository(processMetadataRepositoryList(parameter));
-
- if (arg.equalsIgnoreCase("-contextArtifacts")) //$NON-NLS-1$
- info.setContextArtifactRepository(processArtifactRepositoryList(parameter));
- }
-
- private IArtifactRepository processArtifactRepositoryList(String parameter) {
- String[] list = AbstractPublisherAction.getArrayFromString(parameter, ","); //$NON-NLS-1$
- if (list == null || list.length == 0)
- return null;
-
- CompositeArtifactRepository result = CompositeArtifactRepository.createMemoryComposite();
- if (result != null) {
- for (int i = 0; i < list.length; i++) {
- try {
- result.addChild(URIUtil.fromString(list[i]));
- } catch (URISyntaxException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
- return result;
- }
-
- private IMetadataRepository processMetadataRepositoryList(String parameter) {
- String[] list = AbstractPublisherAction.getArrayFromString(parameter, ","); //$NON-NLS-1$
- if (list == null || list.length == 0)
- return null;
-
- CompositeMetadataRepository result = CompositeMetadataRepository.createMemoryComposite();
- if (result != null) {
- for (int i = 0; i < list.length; i++) {
- try {
- result.addChild(URIUtil.fromString(list[i]));
- } catch (URISyntaxException e) {
- // TODO Auto-generated catch block
- }
- }
- }
- return result;
- }
-
- protected void processFlag(String arg, PublisherInfo info) {
- if (arg.equalsIgnoreCase("-publishArtifacts") || arg.equalsIgnoreCase("-pa")) //$NON-NLS-1$ //$NON-NLS-2$
- info.setArtifactOptions(info.getArtifactOptions() | IPublisherInfo.A_PUBLISH);
-
- if (arg.equalsIgnoreCase("-publishArtifactRepository") || arg.equalsIgnoreCase("-par")) //$NON-NLS-1$ //$NON-NLS-2$
- info.setArtifactOptions(info.getArtifactOptions() | IPublisherInfo.A_INDEX);
-
- if (arg.equalsIgnoreCase("-overwriteArtifacts")) //$NON-NLS-1$
- info.setArtifactOptions(info.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 registerDefaultArtifactRepoManager() {
- if (ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName()) == null) {
- defaultArtifactManager = new ArtifactRepositoryManager();
- registrationDefaultArtifactManager = Activator.getContext().registerService(IArtifactRepositoryManager.class.getName(), defaultArtifactManager, null);
- }
- }
-
- private void registerDefaultMetadataRepoManager() {
- if (ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName()) == null) {
- defaultMetadataManager = new MetadataRepositoryManager();
- registrationDefaultMetadataManager = Activator.getContext().registerService(IMetadataRepositoryManager.class.getName(), defaultMetadataManager, null);
- }
- }
-
- private void registerEventBus() {
- if (ServiceHelper.getService(Activator.getContext(), IProvisioningEventBus.SERVICE_NAME) == null) {
- bus = new ProvisioningEventBus();
- registrationBus = Activator.getContext().registerService(IProvisioningEventBus.SERVICE_NAME, bus, null);
- }
- }
-
- public Object run(String args[]) throws Exception {
- try {
- info = createPublisherInfo();
- processCommandLineArguments(args, info);
- Object result = run(info);
- if (result != IApplication.EXIT_OK)
- 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 info) throws Exception {
- try {
- registerEventBus();
- registerDefaultMetadataRepoManager();
- registerDefaultArtifactRepoManager();
- initialize(info);
- validateInfo(info);
- System.out.println(NLS.bind(Messages.message_generatingMetadata, info.getSummary()));
-
- long before = System.currentTimeMillis();
- IPublisherAction[] actions = createActions();
- Publisher publisher = createPublisher(info);
- 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;
- }
- System.out.println(result);
- } 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 info) {
- return new Publisher(info);
- }
-
- protected void validateInfo(PublisherInfo info) {
- // if (info.getBaseLocation() == null && info.getProduct() == null) {
- // System.out.println(Messages.exception_baseLocationNotSpecified);
- // return new Integer(-1);
- // }
- }
-
- public Object start(IApplicationContext context) throws Exception {
- return run((String[]) context.getArguments().get("application.args")); //$NON-NLS-1$
- }
-
- public void stop() {
- if (registrationDefaultMetadataManager != null) {
- registrationDefaultMetadataManager.unregister();
- registrationDefaultMetadataManager = null;
- }
- if (registrationDefaultArtifactManager != null) {
- registrationDefaultArtifactManager.unregister();
- registrationDefaultArtifactManager = null;
- }
- if (registrationBus != null) {
- registrationBus.unregister();
- registrationBus = 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 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 94768d1a2..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.internal.provisional.p2.core.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 582c5955c..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherInfo.java
+++ /dev/null
@@ -1,102 +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.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.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;
-
- /**
- * 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 Collection getAdvice(String configSpec, boolean includeDefault, String id, Version version, Class 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 d8b21040f..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.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.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 {
- /**
- * 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 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 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 19467b970..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/Publisher.java
+++ /dev/null
@@ -1,191 +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.net.URI;
-import java.util.Collection;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
-public class Publisher {
- static final public String PUBLISH_PACK_FILES_AS_SIBLINGS = "publishPackFilesAsSiblings"; //$NON-NLS-1$
-
- private IPublisherInfo info;
- private IPublisherResult results;
-
- /**
- * Returns a metadata repository that corresponds to the given settings. If a repo 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 location the URL location of the repo
- * @param name the name of the repo
- * @param append whether or not the repo 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(URI location, String name, boolean append, boolean compress) throws ProvisionException {
- try {
- IMetadataRepository result = loadMetadataRepository(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 = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.context, IMetadataRepositoryManager.class.getName());
- 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 repo
- * @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(URI location, boolean modifiable, boolean removeFromManager) throws ProvisionException {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.context, IMetadataRepositoryManager.class.getName());
- 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 repo 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 location the URL location of the repo
- * @param name the name of the repo
- * @param append whether or not the repo should appended or cleared
- * @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(URI location, String name, boolean append, boolean compress, boolean reusePackedFiles) throws ProvisionException {
- try {
- IArtifactRepository result = loadArtifactRepository(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$
- if (!append)
- result.removeAll();
- return result;
- }
- } catch (ProvisionException e) {
- //fall through and create a new repository
- }
-
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.context, IArtifactRepositoryManager.class.getName());
- 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 repo
- * @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(URI location, boolean modifiable, boolean removeFromManager) throws ProvisionException {
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.context, IArtifactRepositoryManager.class.getName());
- 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();
- }
-
- public Publisher(IPublisherInfo info, IPublisherResult results) {
- this.info = info;
- this.results = results;
- }
-
- 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 {
- // run all the actions
- MultiStatus finalStatus = new MultiStatus("this", 0, "publishing result", null); //$NON-NLS-1$//$NON-NLS-2$
- for (int i = 0; i < actions.length; i++) {
- if (sub.isCanceled())
- return Status.CANCEL_STATUS;
- IStatus status = actions[i].perform(info, results, monitor);
- finalStatus.merge(status);
- sub.worked(1);
- }
- 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 ius = results.getIUs(null, null);
- metadataRepository.addInstallableUnits((IInstallableUnit[]) ius.toArray(new IInstallableUnit[ius.size()]));
- }
- 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 523d6511f..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherInfo.java
+++ /dev/null
@@ -1,94 +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.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.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 adviceList = new ArrayList(11);
-
- public void addAdvice(IPublisherAdvice advice) {
- adviceList.add(advice);
- }
-
- public Collection getAdvice(String configSpec, boolean includeDefault, String id, Version version, Class type) {
- ArrayList result = new ArrayList();
- for (Iterator i = adviceList.iterator(); i.hasNext();) {
- Object object = i.next();
- if (type.isInstance(object) && ((IPublisherAdvice) object).isApplicable(configSpec, includeDefault, id, version))
- result.add(object);
- }
- 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 ".";
- }
-
-}
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 ecd7a474d..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherResult.java
+++ /dev/null
@@ -1,145 +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.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-
-public class PublisherResult implements IPublisherResult {
-
- private static final Collection EMPTY_COLLECTION = new ArrayList(0);
- final Map rootIUs = new HashMap();
- final Map nonRootIUs = new HashMap();
-
- public void addIU(IInstallableUnit iu, String type) {
- if (type == ROOT)
- addIU(rootIUs, iu.getId(), iu);
- if (type == NON_ROOT)
- addIU(nonRootIUs, iu.getId(), iu);
- }
-
- public void addIUs(Collection ius, String type) {
- for (Iterator i = ius.iterator(); i.hasNext();)
- addIU((IInstallableUnit) i.next(), type);
- }
-
- private void addIU(Map map, String id, IInstallableUnit iu) {
- Set ius = (Set) map.get(id);
- if (ius == null) {
- ius = new HashSet(11);
- map.put(id, ius);
- }
- ius.add(iu);
- }
-
- public IInstallableUnit getIU(String id, Version version, String type) {
- if (type == null || type == ROOT) {
- Collection ius = (Collection) rootIUs.get(id);
- for (Iterator i = ius.iterator(); i.hasNext();) {
- IInstallableUnit iu = (IInstallableUnit) i.next();
- if (iu.getVersion().equals(version))
- return iu;
- }
- }
- if (type == null || type == NON_ROOT) {
- Collection ius = (Collection) nonRootIUs.get(id);
- for (Iterator i = ius.iterator(); i.hasNext();) {
- IInstallableUnit iu = (IInstallableUnit) i.next();
- if (iu.getVersion().equals(version))
- return iu;
- }
- }
- 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) {
- Collection ius = (Collection) rootIUs.get(id);
- if (ius != null && ius.size() > 0)
- return (IInstallableUnit) ius.iterator().next();
- }
- if (type == null || type == NON_ROOT) {
- Collection ius = (Collection) nonRootIUs.get(id);
- if (ius != null && ius.size() > 0)
- return (IInstallableUnit) ius.iterator().next();
- }
- return null;
- }
-
- /**
- * Returns the IUs in this result with the given id.
- */
- public Collection getIUs(String id, String type) {
- if (type == null) {
- ArrayList result = new ArrayList();
- result.addAll(id == null ? flatten(rootIUs.values()) : getIUs(rootIUs, id));
- result.addAll(id == null ? flatten(nonRootIUs.values()) : getIUs(nonRootIUs, id));
- return result;
- }
- if (type == ROOT)
- return id == null ? flatten(rootIUs.values()) : (Collection) rootIUs.get(id);
- if (type == NON_ROOT)
- return id == null ? flatten(nonRootIUs.values()) : (Collection) nonRootIUs.get(id);
- return null;
- }
-
- private Collection getIUs(Map ius, String id) {
- Collection result = (Collection) ius.get(id);
- return result == null ? EMPTY_COLLECTION : result;
- }
-
- private List flatten(Collection values) {
- ArrayList result = new ArrayList();
- for (Iterator i = values.iterator(); i.hasNext();)
- for (Iterator j = ((HashSet) i.next()).iterator(); j.hasNext();)
- result.add(j.next());
- return result;
- }
-
- 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);
- }
- }
-
- class QueryableMap implements IQueryable {
- private Map map;
-
- public QueryableMap(Map map) {
- this.map = map;
- }
-
- public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
- return query.perform(flatten(this.map.values()).iterator(), collector);
- }
- }
-
- /**
- * Queries both the root and non root IUs
- */
- public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
- IQueryable nonRootQueryable = new QueryableMap(nonRootIUs);
- IQueryable rootQueryable = new QueryableMap(rootIUs);
- return new CompoundQueryable(new IQueryable[] {nonRootQueryable, rootQueryable}).query(query, collector, monitor);
- }
-}
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 a853d13be..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IAdditionalInstallableUnitAdvice.java
+++ /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
- *******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-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 93c390214..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ICapabilityAdvice.java
+++ /dev/null
@@ -1,26 +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.internal.provisional.p2.metadata.IProvidedCapability;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-public interface ICapabilityAdvice extends IPublisherAdvice {
-
- public IProvidedCapability[] getProvidedCapabilities(InstallableUnitDescription iu);
-
- public IRequiredCapability[] getRequiredCapabilities(InstallableUnitDescription iu);
-
- public IRequiredCapability[] 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 863255d6e..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFeatureRootAdvice.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.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.internal.provisional.p2.core.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 c4e0a0fd2..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFilterAdvice.java
+++ /dev/null
@@ -1,39 +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.internal.provisional.p2.core.Version;
-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 String 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 03868e07f..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ILicenseAdvice.java
+++ /dev/null
@@ -1,21 +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;
-
-/**
- * Provides advice about a license.
- */
-public interface ILicenseAdvice {
-
- 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 86a03671d..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IPropertyAdvice.java
+++ /dev/null
@@ -1,31 +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 java.util.Properties;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-public interface IPropertyAdvice extends IPublisherAdvice {
-
- /**
- * Returns the set of extra properties to be associated with the IU
- */
- public Properties getInstallableUnitProperties(InstallableUnitDescription iu);
-
- /**
- * Returns the set of extra properties to be associated with the artifact descriptor
- * being published
- */
- public Properties 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 2c5cad689..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootIUAdvice.java
+++ /dev/null
@@ -1,26 +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.IPublisherResult;
-
-public interface IRootIUAdvice {
-
- /**
- * 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 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 0a800d976..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.internal.provisional.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/IVersionAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IVersionAdvice.java
deleted file mode 100644
index 13eb3e122..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.internal.provisional.p2.core.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 850deaf12..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/JREAction.java
+++ /dev/null
@@ -1,241 +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.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.p2.publisher.*;
-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 = new Version("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 Properties 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());
- cu.setHost(new IRequiredCapability[] {MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), new VersionRange(iu.getVersion(), true, PublisherHelper.versionMax, true), null, false, false)});
- cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(configId, iu.getVersion())});
- cu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE);
- Map touchpointData = new HashMap();
-
- 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(key, jreLocation);
- }
-
- private IProvidedCapability[] generateJRECapability(String id, Version version) {
- if (profileProperties == null)
- return new IProvidedCapability[0];
-
- try {
- ManifestElement[] jrePackages = ManifestElement.parseHeader(PROFILE_SYSTEM_PACKAGES, (String) 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.getProperty(PROFILE_LOCATION);
-
- String profileName = profileLocation != null ? new Path(profileLocation).lastSegment() : profileProperties.getProperty(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 = new Version(profileName.substring(idx + 1));
- } catch (IllegalArgumentException e) {
- //ignore
- }
- profileName = profileName.substring(0, idx);
- }
- if (version == null) {
- try {
- String targetVersion = profileProperties.getProperty(PROFILE_TARGET_VERSION);
- version = targetVersion != null ? new Version(targetVersion) : null;
- } catch (IllegalArgumentException e) {
- //ignore
- }
- }
-
- if (version == null)
- version = new Version("1.6"); //$NON-NLS-1$
-
- 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 Properties loadProfile(File profileFile) {
- if (profileFile == null || !profileFile.exists())
- return null;
-
- try {
- InputStream stream = new BufferedInputStream(new FileInputStream(profileFile));
- Properties properties = loadProfile(stream);
- if (properties != null)
- properties.put(PROFILE_LOCATION, profileFile.getAbsolutePath());
- return properties;
- } catch (FileNotFoundException e) {
- //null
- }
- return null;
- }
-
- private Properties 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 Properties loadProfile(InputStream stream) {
- if (stream != null) {
- try {
- Properties properties = new Properties();
- properties.load(stream);
- return properties;
- } 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 d49b4f757..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 info, 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(info, 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 aaba1d7b8..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.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
-
-/**
- * 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 queryable;
-
- public QueryableFilterAdvice(IQueryable queryable) {
- this.queryable = queryable;
- }
-
- public String getFilter(String id, Version version, boolean exact) {
- InstallableUnitQuery query = new InstallableUnitQuery(id, version);
- Collector result = queryable.query(query, new Collector(), null);
- if (!result.isEmpty())
- return (((IInstallableUnit) result.iterator().next()).getFilter());
- if (exact)
- return null;
- query = new InstallableUnitQuery(id);
- result = queryable.query(query, new Collector(), null);
- if (!result.isEmpty())
- return (((IInstallableUnit) 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 ffa78057b..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAction.java
+++ /dev/null
@@ -1,161 +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.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-
-// TODO need to merge this functionality with the FeaturesAction work on root files
-public class RootFilesAction extends AbstractPublisherAction {
- private String idBase;
- private Version version;
- private String flavor;
-
- /**
- * 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 IStatus perform(IPublisherInfo info, IPublisherResult results, IProgressMonitor monitor) {
- IPublisherResult innerResult = new PublisherResult();
- // we have N platforms, generate a CU for each
- // TODO try and find common properties across platforms
- String[] configSpecs = info.getConfigurations();
- for (int i = 0; i < configSpecs.length; i++) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- generateRootFileIUs(configSpecs[i], info, 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);
- publishTopLevelRootFilesIU(innerResult.getIUs(null, IPublisherResult.ROOT), results);
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- return Status.OK_STATUS;
- }
-
- private void publishTopLevelRootFilesIU(Collection 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, IPublisherInfo info, 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);
- String 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 IRequiredCapability[] {MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, iuId, new VersionRange(version, true, version, true), null, false, false)});
- cu.setProperty(IInstallableUnit.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 touchpointData = new HashMap();
- 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));
- 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(key, null);
- IRootFilesAdvice advice = getAdvice(configSpec, info);
- 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
- * @param info - the publisher info holding the advice.
- * @return a compilation of <class>IRootfilesAdvice</class> from the <code>info</code>.
- */
- private IRootFilesAdvice getAdvice(String configSpec, IPublisherInfo info) {
- Collection advice = info.getAdvice(configSpec, true, null, null, IRootFilesAdvice.class);
- ArrayList inclusions = new ArrayList();
- ArrayList exclusions = new ArrayList();
- File root = null;
- for (Iterator i = advice.iterator(); i.hasNext();) {
- IRootFilesAdvice entry = (IRootFilesAdvice) i.next();
- // 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 = (File[]) inclusions.toArray(new File[inclusions.size()]);
- File[] excludeList = (File[]) 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 b9ca9985c..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAction.java
+++ /dev/null
@@ -1,190 +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.*;
-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.internal.provisional.p2.core.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.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 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 children = getChildren(result);
- InstallableUnitDescription descriptor = createTopLevelIUDescription(children, null, false);
- 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 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 = (ILicenseAdvice) 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.setLicense(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 getChildren(IPublisherResult result) {
- // get any roots that we have accummulated so far and search for
- // children from the advice.
- HashSet children = new HashSet();
- Collection rootAdvice = info.getAdvice(null, true, null, null, IRootIUAdvice.class);
- if (rootAdvice == null)
- return children;
- for (Iterator i = rootAdvice.iterator(); i.hasNext();) {
- IRootIUAdvice advice = (IRootIUAdvice) i.next();
- Collection list = advice.getChildren(result);
- if (list != null)
- for (Iterator j = list.iterator(); j.hasNext();) {
- Object object = j.next();
- // 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 VersionedName) {
- children.add(object);
- } else if (object instanceof IInstallableUnit)
- children.add(object);
- }
- }
- return children;
- }
-
- private InstallableUnitDescription createTopLevelIUDescription(Collection children, Collection requires, boolean configureLauncherData) {
- InstallableUnitDescription root = new MetadataFactory.InstallableUnitDescription();
- root.setSingleton(true);
- root.setId(id);
- root.setVersion(version);
- root.setProperty(IInstallableUnit.PROP_NAME, name);
-
- Collection requiredCapabilities = createIURequirements(children);
- if (requires != null)
- requiredCapabilities.addAll(requires);
- root.setRequiredCapabilities((IRequiredCapability[]) requiredCapabilities.toArray(new IRequiredCapability[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(IInstallableUnit.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 (Iterator i = versionAdvice.iterator(); i.hasNext();) {
- IVersionAdvice advice = (IVersionAdvice) i.next();
- // 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 85d6051cb..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 children;
-
- public RootIUAdvice(Collection children) {
- this.children = children;
- }
-
- public Collection 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 3d275e395..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUResultFilterAdvice.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.p2.publisher.actions;
-
-import java.util.Collection;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.equinox.p2.publisher.AbstractAdvice;
-import org.eclipse.equinox.p2.publisher.IPublisherResult;
-
-public class RootIUResultFilterAdvice extends AbstractAdvice implements IRootIUAdvice {
- private Query query;
-
- public RootIUResultFilterAdvice(Query query) {
- this.query = query;
- }
-
- public Collection getChildren(IPublisherResult result) {
- Collection value = result.getIUs(null, IPublisherResult.ROOT);
- if (query == null)
- return value;
- return query.perform(value.iterator(), new Collector()).toCollection();
- }
-}
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 ff0f394cb..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/VersionAdvice.java
+++ /dev/null
@@ -1,135 +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.*;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.p2.publisher.AbstractAdvice;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-public class VersionAdvice extends AbstractAdvice implements IVersionAdvice {
-
- Map versions = new HashMap(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) {
- if (namespace == null)
- namespace = "null"; //$NON-NLS-1$
- Properties properties = new 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
- }
- }
- }
- if (properties.size() > 0) {
- Enumeration enumeration = properties.keys();
- while (enumeration.hasMoreElements()) {
- String key = (String) enumeration.nextElement();
- if (idSuffix != null)
- key += idSuffix;
- String value = properties.getProperty(key);
- setVersion(namespace, key, new Version(value));
- }
- }
- }
-
- /**
- * 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 values = (Map) versions.get(namespace);
- // if no one says anything then don't say anything. someone else might have an opinion
- if (values != null) {
- Version result = (Version) values.get(id);
- if (result != null)
- return result;
- }
-
- values = (Map) versions.get("null"); //$NON-NLS-1$
- if (values == null)
- return null;
- return (Version) 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 values = (Map) versions.get(namespace);
- if (values == null) {
- // if we are clearing values then there is nothing to do
- if (version == null)
- return;
- values = new HashMap();
- 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 (Iterator i = source.versions.keySet().iterator(); i.hasNext();) {
- String namespace = (String) i.next();
- Map myValues = (Map) versions.get(namespace);
- Map sourceValues = (Map) 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 merge(Map myValues, Map sourceValues) {
- Map result = new HashMap(myValues);
- for (Iterator i = sourceValues.keySet().iterator(); i.hasNext();) {
- String key = (String) i.next();
- 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 680366201..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 info, IPublisherResult results, IProgressMonitor monitor) {
- storeConfigData(info, configSpec, results);
- return Status.OK_STATUS;
- }
-
- protected void storeConfigData(IPublisherInfo info, String configSpec, IPublisherResult result) {
- ConfigData data = loader.getConfigData();
- if (data == null)
- return;
- info.addAdvice(new ConfigAdvice(data, configSpec));
- LauncherData launcherData = loader.getLauncherData();
- if (launcherData == null)
- return;
- info.addAdvice(new LaunchingAdvice(launcherData, configSpec));
- }
-}
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 9e7b6304f..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileAdvice.java
+++ /dev/null
@@ -1,211 +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.*;
-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.publisher.Activator;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.publisher.AbstractAdvice;
-import org.eclipse.equinox.p2.publisher.actions.*;
-
-/**
- * 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, 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 touchpointInstructions;
- private IProvidedCapability[] providedCapabilities;
- private IRequiredCapability[] requiredCapabilities;
- private IRequiredCapability[] metaRequiredCapabilities;
- private Properties iuProperties;
- private InstallableUnitDescription[] additionalIUs;
- 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 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();
- containsAdvice = true;
- }
-
- public boolean containsAdvice() {
- return containsAdvice;
- }
-
- /**
- * Loads the advice file and returns it in map form.
- */
- private static Map loadAdviceMap(IPath basePath, IPath adviceFilePath) {
- File location = basePath.toFile();
- if (location == null || !location.exists())
- return Collections.EMPTY_MAP;
-
- ZipFile jar = null;
- InputStream stream = null;
- try {
- if (location.isDirectory()) {
- File adviceFile = new File(location, adviceFilePath.toString());
- if (!adviceFile.isFile())
- return Collections.EMPTY_MAP;
- stream = new BufferedInputStream(new FileInputStream(adviceFile));
- } else if (location.isFile()) {
- jar = new ZipFile(location);
- ZipEntry entry = jar.getEntry(adviceFilePath.toString());
- if (entry == null)
- return Collections.EMPTY_MAP;
-
- stream = new BufferedInputStream(jar.getInputStream(entry));
- }
-
- Properties advice = new Properties();
- advice.load(stream);
- return (advice != null ? advice : Collections.EMPTY_MAP);
- } 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 Collections.EMPTY_MAP;
- } 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) {
- if (touchpointInstructions == null)
- return existing;
-
- Map resultInstructions = new HashMap(existing.getInstructions());
- for (Iterator iterator = touchpointInstructions.keySet().iterator(); iterator.hasNext();) {
- String key = (String) iterator.next();
- ITouchpointInstruction instruction = (ITouchpointInstruction) touchpointInstructions.get(key);
- ITouchpointInstruction existingInstruction = (ITouchpointInstruction) 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 = MetadataFactory.createTouchpointInstruction(body, importAttribute);
- }
- resultInstructions.put(key, instruction);
- }
- return MetadataFactory.createTouchpointData(resultInstructions);
- }
-
- public IProvidedCapability[] getProvidedCapabilities(InstallableUnitDescription iu) {
- return providedCapabilities;
- }
-
- public IRequiredCapability[] getRequiredCapabilities(InstallableUnitDescription iu) {
- return requiredCapabilities;
- }
-
- public IRequiredCapability[] getMetaRequiredCapabilities(InstallableUnitDescription iu) {
- return metaRequiredCapabilities;
- }
-
- public InstallableUnitDescription[] getAdditionalInstallableUnitDescriptions(IInstallableUnit iu) {
- return additionalIUs;
- }
-
- public Properties getArtifactProperties(IInstallableUnit iu, IArtifactDescriptor descriptor) {
- return null;
- }
-
- public Properties 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 8760e9cec..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileParser.java
+++ /dev/null
@@ -1,555 +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.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-
-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$
-
- 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 Properties adviceProperties = new Properties();
- private List adviceProvides = new ArrayList();
- private List adviceRequires = new ArrayList();
- private List adviceMetaRequires = new ArrayList();
- private Map adviceInstructions = new HashMap();
- private List adviceOtherIUs = new ArrayList();
-
- private final Map advice;
- private Iterator keysIterator;
- private String current;
- // private String hostId; not currently used
- private Version hostVersion;
-
- public AdviceFileParser(String id, Version version, Map advice) {
- // this.hostId = id; not currently used
- this.hostVersion = version;
- this.advice = advice;
- }
-
- public void parse() {
- String adviceVersion = (String) advice.get(ADVICE_VERSION);
- if (adviceVersion != null)
- checkAdviceVersion(adviceVersion);
-
- List keys = new ArrayList(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(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 = new Version(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 = (String) (keysIterator.hasNext() ? keysIterator.next() : null);
- }
-
- private String currentValue() {
- return ((String) advice.get(current)).trim();
- }
-
- private void parseProperties(String prefix, Map 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 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 void parseProvides(String prefix, List 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 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 = new Version(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 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 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();
- }
- IRequiredCapability capability = MetadataFactory.createRequiredCapability(namespace, name, range, filter, optional, multiple, greedy);
- requires.add(capability);
- }
-
- private void parseInstructions(String prefix, Map 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 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 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 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 unitArtifacts = new ArrayList();
- Properties unitProperties = new Properties();
- List unitHostRequirements = new ArrayList();
- List unitProvides = new ArrayList();
- List unitRequires = new ArrayList();
- List unitMetaRequirements = new ArrayList();
- List unitLicenses = new ArrayList();
- Map unitInstructions = new HashMap();
- // 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 = new Version(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 = new Version(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.setLicense((ILicense) unitLicenses.get(0));
-
- if (!unitArtifacts.isEmpty())
- description.setArtifacts((IArtifactKey[]) unitArtifacts.toArray(new IArtifactKey[unitArtifacts.size()]));
-
- if (!unitHostRequirements.isEmpty())
- ((InstallableUnitFragmentDescription) description).setHost((IRequiredCapability[]) unitHostRequirements.toArray(new IRequiredCapability[unitHostRequirements.size()]));
-
- if (!unitProperties.isEmpty()) {
- for (Iterator iterator = unitProperties.entrySet().iterator(); iterator.hasNext();) {
- Entry entry = (Entry) iterator.next();
- description.setProperty((String) entry.getKey(), (String) entry.getValue());
- }
- }
-
- if (!unitProvides.isEmpty())
- description.setCapabilities((IProvidedCapability[]) unitProvides.toArray(new IProvidedCapability[unitProvides.size()]));
-
- if (!unitRequires.isEmpty())
- description.setRequiredCapabilities((IRequiredCapability[]) unitRequires.toArray(new IRequiredCapability[unitRequires.size()]));
-
- if (!unitMetaRequirements.isEmpty())
- description.setMetaRequiredCapabilities((IRequiredCapability[]) unitMetaRequirements.toArray(new IRequiredCapability[unitMetaRequirements.size()]));
-
- if (!unitInstructions.isEmpty())
- description.addTouchpointData(MetadataFactory.createTouchpointData(unitInstructions));
-
- adviceOtherIUs.add(description);
- }
-
- private void parseLicenses(String prefix, List 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 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 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 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 = new Version(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) {
- String qualifier = 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);
- }
- 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 Properties getProperties() {
- if (adviceProperties.isEmpty())
- return null;
- return adviceProperties;
- }
-
- public IRequiredCapability[] getRequiredCapabilities() {
- if (adviceRequires.isEmpty())
- return null;
-
- return (IRequiredCapability[]) adviceRequires.toArray(new IRequiredCapability[adviceRequires.size()]);
- }
-
- public IProvidedCapability[] getProvidedCapabilities() {
- if (adviceProvides.isEmpty())
- return null;
-
- return (IProvidedCapability[]) adviceProvides.toArray(new IProvidedCapability[adviceProvides.size()]);
- }
-
- public Map getTouchpointInstructions() {
- if (adviceInstructions.isEmpty())
- return null;
-
- return adviceInstructions;
- }
-
- public InstallableUnitDescription[] getAdditionalInstallableUnitDescriptions() {
- if (adviceOtherIUs.isEmpty())
- return null;
-
- return (InstallableUnitDescription[]) adviceOtherIUs.toArray(new InstallableUnitDescription[adviceOtherIUs.size()]);
- }
-
- public IRequiredCapability[] getMetaRequiredCapabilities() {
- if (adviceMetaRequires.isEmpty())
- return null;
-
- return (IRequiredCapability[]) adviceMetaRequires.toArray(new IRequiredCapability[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 eec1adb6c..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 java.io.File;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.ExecutablesDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-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 info, IPublisherResult results, IProgressMonitor monitor) {
- // Create the basic actions and run them putting the IUs in a temporary result
- Collection actions = createActions(info);
- createAdvice(info, results);
- IPublisherResult innerResult = new PublisherResult();
- MultiStatus finalStatus = new MultiStatus(ApplicationLauncherAction.class.getName(), 0, "publishing result", null); //$NON-NLS-1$
- for (Iterator i = actions.iterator(); i.hasNext();) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- finalStatus.merge(((IPublisherAction) i.next()).perform(info, 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 info, IPublisherResult results) {
- createLauncherAdvice(info, 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 info, IPublisherResult results) {
- Collection ius = getIUs(results.getIUs(null, null), EquinoxLauncherCUAction.ORG_ECLIPSE_EQUINOX_LAUNCHER);
- VersionAdvice advice = new VersionAdvice();
- boolean found = false;
- for (Iterator i = ius.iterator(); i.hasNext();) {
- IInstallableUnit iu = (IInstallableUnit) i.next();
- // skip over source bundles and fragments
- // TODO should we use the source property here rather than magic name matching?
- if (iu.getId().endsWith(".source") || iu.isFragment()) //$NON-NLS-1$
- continue;
- advice.setVersion(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), iu.getVersion());
- found = true;
- }
- if (found)
- info.addAdvice(advice);
- }
-
- private Collection getIUs(Collection 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;
- }
-
- private void publishApplicationLauncherIU(Collection 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 createActions(IPublisherInfo info) {
- Collection actions = new ArrayList();
- actions.add(new EquinoxLauncherCUAction(flavor, configSpecs));
- actions.addAll(createExecutablesActions(configSpecs));
- return actions;
- }
-
- protected Collection createExecutablesActions(String[] configSpecs) {
- Collection actions = new ArrayList(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);
- 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 cf1358e72..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.internal.provisional.p2.core.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 72273893b..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java
+++ /dev/null
@@ -1,810 +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.*;
-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.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.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.publisher.actions.*;
-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 IRequiredCapability#getName()
- * @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 IRequiredCapability#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, new Version(1, 0, 0));
- public static final IProvidedCapability SOURCE_BUNDLE_CAPABILITY = MetadataFactory.createProvidedCapability(PublisherHelper.NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_SOURCE, new Version(1, 0, 0));
-
- static final String DEFAULT_BUNDLE_LOCALIZATION = "plugin"; //$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, new Version(version));
- }
-
- public static IInstallableUnit createBundleConfigurationUnit(String hostId, Version cuVersion, boolean isBundleFragment, GeneratorBundleInfo configInfo, String configurationFlavor, String 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());
- cu.setHost(new IRequiredCapability[] { //
- MetadataFactory.createRequiredCapability(CAPABILITY_NS_OSGI_BUNDLE, hostId, new VersionRange(hostVersion, true, PublisherHelper.versionMax, true), null, false, false, true), //
- MetadataFactory.createRequiredCapability(PublisherHelper.NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, new VersionRange(new Version(1, 0, 0), true, new Version(2, 0, 0), false), null, false, false, false)});
-
- //Adds capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(configUnitId, cuVersion), MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_FLAVOR, configurationFlavor, new Version(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);
- }
-
- public static IInstallableUnit createBundleIU(BundleDescription bd, IArtifactKey key, IPublisherInfo info) {
- Map manifest = (Map) bd.getUserObject();
- Map 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(Version.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 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.createRequiredCapability(CAPABILITY_NS_OSGI_BUNDLE, bd.getHost().getName(), VersionRange.fromOSGiVersionRange(bd.getHost().getVersionRange()), null, false, false));
- for (int j = 0; j < requiredBundles.length; j++)
- reqsDeps.add(MetadataFactory.createRequiredCapability(CAPABILITY_NS_OSGI_BUNDLE, requiredBundles[j].getName(), VersionRange.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 = VersionRange.fromOSGiVersionRange(importSpec.getVersionRange());
- //TODO this needs to be refined to take into account all the attribute handled by imports
- reqsDeps.add(MetadataFactory.createRequiredCapability(PublisherHelper.CAPABILITY_NS_JAVA_PACKAGE, importPackageName, versionRange, null, isOptional(importSpec), false));
- }
- iu.setRequiredCapabilities((IRequiredCapability[]) reqsDeps.toArray(new IRequiredCapability[reqsDeps.size()]));
-
- // Create set of provided capabilities
- ArrayList providedCapabilities = new ArrayList();
- providedCapabilities.add(PublisherHelper.createSelfCapability(bd.getSymbolicName(), Version.fromOSGiVersion(bd.getVersion())));
- providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_OSGI_BUNDLE, bd.getSymbolicName(), Version.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(), Version.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(), Version.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(PublisherHelper.makeTranslationCapability(bd.getSymbolicName(), locale));
- }
- }
- iu.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
- 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 = (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();
- 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, Version.fromOSGiVersion(base), false);
- } else {
- updateRange = new VersionRange("0.0.0"); //$NON-NLS-1$
- }
- return updateRange;
- }
-
- private IInstallableUnitFragment createHostLocalizationFragment(IInstallableUnit bundleIU, BundleDescription bd, String hostId, String[] hostBundleManifestValues) {
- Map hostLocalizations = getHostLocalizations(new File(bd.getLocation()), hostBundleManifestValues);
- if (hostLocalizations != null) {
- return createLocalizationFragmentOfHost(bd, hostId, hostBundleManifestValues, hostLocalizations);
- }
- return null;
- }
-
- /*
- * @param hostId
- * @param bd
- * @param locale
- * @param localizedStrings
- * @return installableUnitFragment
- */
- 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(Version.fromOSGiVersion(bd.getVersion())); // TODO: is this a meaningful version?
-
- HostSpecification hostSpec = bd.getHost();
- IRequiredCapability[] hostReqs = new IRequiredCapability[] {MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, hostSpec.getName(), VersionRange.fromOSGiVersionRange(hostSpec.getVersionRange()), null, false, false, false)};
- fragment.setHost(hostReqs);
-
- fragment.setSingleton(true);
- fragment.setProperty(IInstallableUnit.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(PublisherHelper.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 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 = new Version(1, 0, 0);
- cu.setVersion(configUnitVersion);
-
- // Add capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_FLAVOR, configurationFlavor, new Version(1, 0, 0))});
-
- // Create a required capability on bundles
- IRequiredCapability[] reqs = new IRequiredCapability[] {MetadataFactory.createRequiredCapability(PublisherHelper.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);
- }
-
- 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 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(BUNDLE_SHAPE))
- continue;
- result.append(aProperty.getKey()).append(": ").append(aProperty.getValue()).append('\n'); //$NON-NLS-1$
- }
- return 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 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]; // 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 manifest) {
- String[] cachedValues = new String[PublisherHelper.BUNDLE_LOCALIZED_PROPERTIES.length];
- for (int j = 0; j < PublisherHelper.BUNDLE_LOCALIZED_PROPERTIES.length; j++) {
- String value = (String) 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 getHostLocalizations(File bundleLocation, String[] hostBundleManifestValues) {
- Map 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 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 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 manifest = loadManifest(bundleLocation);
- if (manifest == null)
- return null;
- return createBundleDescription(manifest, bundleLocation);
- }
-
- public static Dictionary loadManifest(File bundleLocation) {
- Dictionary 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 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 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) {
- 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;
- } 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);
- 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, 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 info) {
- IArtifactRepository destination = info.getArtifactRepository();
- if (descriptor == null || destination == null)
- return;
-
- // publish the given files
- publishArtifact(descriptor, inclusions, null, info, createRootPrefixComputer(base));
- }
-
- protected void publishArtifact(IArtifactDescriptor descriptor, File jarFile, IPublisherInfo info) {
- // no files to publish so this is done.
- if (jarFile == null || info == null)
- return;
-
- // if the destination already contains the descriptor, there is nothing to do.
- IArtifactRepository destination = info.getArtifactRepository();
- if (destination == null || destination.contains(descriptor))
- return;
-
- super.publishArtifact(descriptor, jarFile, info);
-
- // 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 && (info.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, info);
- }
- }
- }
-
- private File[] expandLocations(File[] list) {
- ArrayList result = new ArrayList();
- expandLocations(list, result);
- return (File[]) result.toArray(new File[result.size()]);
- }
-
- private void expandLocations(File[] list, ArrayList 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);
- }
- }
- }
-
- protected void generateBundleIUs(BundleDescription[] bundleDescriptions, 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(), Version.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(key, location);
- processArtifactPropertiesAdvice(bundleIU, (ArtifactDescriptor) 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 = VersionRange.fromOSGiVersionRange(bd.getHost().getVersionRange());
- IInstallableUnit[] hosts = queryForIUs(result, hostId, hostVersionRange);
-
- for (int j = 0; j < hosts.length; j++) {
- String fragmentId = makeHostLocalizationFragmentId(bd.getSymbolicName());
- fragment = queryForIU(result, fragmentId, Version.fromOSGiVersion(bd.getVersion()));
- if (fragment == null) {
- String[] externalizedStrings = getExternalizedStrings(hosts[j]);
- 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 info) {
- String location = bundleDescription.getLocation();
- if (location == null)
- return;
-
- AdviceFileAdvice advice = new AdviceFileAdvice(bundleDescription.getSymbolicName(), Version.fromOSGiVersion(bundleDescription.getVersion()), new Path(location), AdviceFileAdvice.BUNDLE_ADVICE_FILE);
- if (advice.containsAdvice())
- info.addAdvice(advice);
-
- }
-
- private static boolean isDir(BundleDescription bundle, IPublisherInfo info) {
- Collection advice = info.getAdvice(null, true, bundle.getSymbolicName(), Version.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 = ((IBundleShapeAdvice) 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
- Map manifest = (Map) bundle.getUserObject();
- String format = (String) 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 = (PackageAdmin) ServiceHelper.getService(Activator.getContext(), PackageAdmin.class.getName());
- 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 2e25a1b97..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigAdvice.java
+++ /dev/null
@@ -1,41 +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.Properties;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-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 Properties getProperties() {
- Properties result = new Properties();
- result.putAll(data.getProperties());
- return result;
- }
-
-}
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 a3d55b887..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java
+++ /dev/null
@@ -1,377 +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.internal.p2.publisher.eclipse.GeneratorBundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-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$
- private static Collection PROPERTIES_TO_SKIP;
- private static HashSet 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();
- 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("osgi.launcherPath"); //$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();
- 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;
- }
-
- /**
- * 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 info, IPublisherResult results, IProgressMonitor monitor) {
- IPublisherResult innerResult = new PublisherResult();
- this.outerResults = results;
- this.info = info;
- // we have N platforms, generate a CU for each
- // TODO try and find common properties across platforms
- String[] configSpecs = info.getConfigurations();
- for (int i = 0; i < configSpecs.length; i++) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- String configSpec = configSpecs[i];
- Collection configAdvice = info.getAdvice(configSpec, false, id, version, IConfigAdvice.class);
- BundleInfo[] bundles = fillInBundles(configAdvice, results);
- publishBundleCUs(info, bundles, configSpec, innerResult);
- publishConfigIUs(configAdvice, innerResult, configSpec);
- Collection launchingAdvice = info.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 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 configAdvice, IPublisherResult results) {
- ArrayList result = new ArrayList();
- for (Iterator j = configAdvice.iterator(); j.hasNext();) {
- IConfigAdvice advice = (IConfigAdvice) j.next();
- BundleInfo[] bundles = advice.getBundles();
- for (int i = 0; i < bundles.length; i++) {
- BundleInfo bundleInfo = bundles[i];
- // 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 manifest = BundlesAction.loadManifest(location);
- if (manifest == null)
- continue;
- GeneratorBundleInfo newInfo = new GeneratorBundleInfo(bundleInfo);
- ManifestElement[] element = ManifestElement.parseHeader("dummy-bsn", (String) manifest.get(Constants.BUNDLE_SYMBOLICNAME)); //$NON-NLS-1$
- newInfo.setSymbolicName(element[0].getValue());
- newInfo.setVersion((String) manifest.get(Constants.BUNDLE_VERSION));
- result.add(newInfo);
- } catch (BundleException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
- }
- return (BundleInfo[]) 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 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 touchpointData = new HashMap();
- 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 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 touchpointData = new HashMap();
- 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 id, Version version, String type, String flavor, String configSpec, Map touchpointData) {
- InstallableUnitDescription cu = new InstallableUnitDescription();
- String resultId = createCUIdString(id, type, flavor, configSpec);
- cu.setId(resultId);
- cu.setVersion(version);
- cu.setFilter(createFilterSpec(configSpec));
- cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- IProvidedCapability selfCapability = PublisherHelper.createSelfCapability(resultId, version);
- String namespace = getAbstractCUCapabilityNamespace(id, type, flavor, configSpec);
- String abstractId = getAbstractCUCapabilityId(id, type, flavor, configSpec);
- IProvidedCapability abstractCapability = MetadataFactory.createProvidedCapability(namespace, abstractId, version);
- cu.setCapabilities(new IProvidedCapability[] {selfCapability, abstractCapability});
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- cu.setTouchpointType(PublisherHelper.TOUCHPOINT_OSGI);
- return MetadataFactory.createInstallableUnit(cu);
- }
-
- protected String[] getConfigurationStrings(Collection configAdvice) {
- String configurationData = ""; //$NON-NLS-1$
- String unconfigurationData = ""; //$NON-NLS-1$
- Set properties = new HashSet();
- for (Iterator i = configAdvice.iterator(); i.hasNext();) {
- IConfigAdvice advice = (IConfigAdvice) i.next();
- for (Iterator iterator = advice.getProperties().entrySet().iterator(); iterator.hasNext();) {
- Entry aProperty = (Entry) iterator.next();
- String key = ((String) aProperty.getKey());
- if (shouldPublishProperty(key) && !properties.contains(key)) {
- properties.add(key);
- 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};
- }
-
- 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 launchingAdvice) {
- String configurationData = ""; //$NON-NLS-1$
- String unconfigurationData = ""; //$NON-NLS-1$
-
- Set jvmSet = new HashSet();
- Set programSet = new HashSet();
- for (Iterator j = launchingAdvice.iterator(); j.hasNext();) {
- IExecutableAdvice advice = (IExecutableAdvice) j.next();
- String[] jvmArgs = advice.getVMArguments();
- for (int i = 0; i < jvmArgs.length; i++)
- if (shouldPublishJvmArg(jvmArgs[i]) && !jvmSet.contains(jvmArgs[i])) {
- jvmSet.add(jvmArgs[i]);
- configurationData += "addJvmArg(jvmArg:" + jvmArgs[i] + ");"; //$NON-NLS-1$ //$NON-NLS-2$
- unconfigurationData += "removeJvmArg(jvmArg:" + jvmArgs[i] + ");"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- 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]);
- configurationData += "addProgramArg(programArg:" + programArgs[i] + ");"; //$NON-NLS-1$ //$NON-NLS-2$
- unconfigurationData += "removeProgramArg(programArg:" + programArgs[i] + ");"; //$NON-NLS-1$ //$NON-NLS-2$
- } 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 info, BundleInfo[] bundles, String configSpec, IPublisherResult result) {
- if (bundles == null)
- return;
-
- String cuIdPrefix = ""; //$NON-NLS-1$
- String 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 8f96357e8..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/DefaultCUsAction.java
+++ /dev/null
@@ -1,69 +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 info, IPublisherResult results, IProgressMonitor monitor) {
- 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 ed2be0c4b..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EclipseInstallAction.java
+++ /dev/null
@@ -1,242 +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.p2.core.VersionedName;
-
-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.internal.provisional.p2.core.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 VersionedName[] topLevel;
- protected String[] nonRootFiles;
- protected boolean start = false;
-
- protected EclipseInstallAction() {
- }
-
- public EclipseInstallAction(String source, String id, Version version, String name, String executableName, String flavor, VersionedName[] 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 info, IPublisherResult results, IProgressMonitor monitor) {
- monitor = SubMonitor.convert(monitor);
- this.info = info;
- 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(info, results, monitor));
- }
- if (!finalStatus.isOK())
- return finalStatus;
- return Status.OK_STATUS;
- }
-
- protected IPublisherAction[] createActions() {
- createAdvice();
- ArrayList actions = new ArrayList();
- // create an action that just publishes the raw bundles and features
- IPublisherAction action = new MergeResultsAction(new IPublisherAction[] {createFeaturesAction(), createBundlesAction()}, IPublisherResult.MERGE_ALL_NON_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 (IPublisherAction[]) 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 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 createAccumulateConfigDataActions(String[] configs) {
- Collection result = new ArrayList(configs.length);
- for (int i = 0; i < configs.length; i++) {
- String configSpec = configs[i];
- File configuration = computeConfigurationLocation(configSpec);
- if (!configuration.exists())
- configuration = null;
- 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 createExecutablesActions(String[] configSpecs) {
- Collection result = new ArrayList(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 result = new ArrayList();
- 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 (File[]) 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 File computeConfigurationLocation(String configSpec) {
- return new File(source, "configuration/config.ini"); //$NON-NLS-1$
- }
-
- 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$
- }
-
- //TODO reconsitute these methods
- // 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;
- // }
- //
- // 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$
- // result.setSpecialUnconfigCommands("rmdir(path:${installFolder}/dropins)"); //$NON-NLS-1$
- // return result;
- // }
-
-}
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 1c19ed9ad..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java
+++ /dev/null
@@ -1,249 +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.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.p2.publisher.*;
-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() {
- }
-
- 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 info, IPublisherResult result, IProgressMonitor monitor) {
- ExecutablesDescriptor brandedExecutables = brandExecutables(info, executables);
- try {
- publishExecutableIU(info, brandedExecutables, result);
- publishExecutableCU(info, 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)});
-
- String filter = createFilterSpec(configSpec);
- if (filter.length() > 0)
- iud.setFilter(filter);
- Map touchpointData = new HashMap();
- 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 void publishExecutableIU(IPublisherInfo info, ExecutablesDescriptor execDescriptor, IPublisherResult result) {
- // Create the IU for the executable
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- String id = getExecutableId();
- iu.setId(id);
- iu.setVersion(version);
- String 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
- IArtifactKey key = PublisherHelper.createBinaryArtifactKey(id, version);
- iu.setArtifacts(new IArtifactKey[] {key});
- IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(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
- String[] config = parseConfigSpec(configSpec);
- 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.setRequiredCapabilities(new IRequiredCapability[] {MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, launcherFragment, VersionRange.emptyRange, filter, false, false)});
- result.addIU(MetadataFactory.createInstallableUnit(iu), IPublisherResult.ROOT);
- }
-
- private String getExecutableId() {
- return createCUIdString(idBase, TYPE, "", configSpec);
- }
-
- // Create the CU that installs (e.g., unzips) the executable
- private void publishExecutableCU(IPublisherInfo info, 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 IRequiredCapability[] {MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, executableId, new VersionRange(version, true, version, true), null, false, false)});
- cu.setProperty(IInstallableUnit.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 touchpointData = computeInstallActions(execDescriptor, os);
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- IInstallableUnit unit = MetadataFactory.createInstallableUnit(cu);
- result.addIU(unit, IPublisherResult.ROOT);
- }
-
- private Map computeInstallActions(ExecutablesDescriptor execDescriptor, String os) {
- Map touchpointData = new HashMap();
- 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 info the publisher info that sets the context for this operation
- * @param descriptor the executable descriptor to brand.
- * @return the new descriptor
- */
- protected ExecutablesDescriptor brandExecutables(IPublisherInfo info, ExecutablesDescriptor descriptor) {
- ExecutablesDescriptor result = new ExecutablesDescriptor(descriptor);
- result.makeTemporaryCopy();
- IBrandingAdvice advice = getBrandingAdvice(info);
- if (advice == null)
- partialBrandExecutables(result);
- else
- fullBrandExecutables(result, advice);
- return result;
- }
-
- private IBrandingAdvice getBrandingAdvice(IPublisherInfo info) {
- // there is expected to only be one branding advice for a given configspec so
- // just return the first one we find.
- Collection advice = info.getAdvice(configSpec, true, null, null, IBrandingAdvice.class);
- for (Iterator i = advice.iterator(); i.hasNext();)
- return (IBrandingAdvice) 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 1a090fe9d..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxLauncherCUAction.java
+++ /dev/null
@@ -1,89 +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 java.util.Iterator;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.GeneratorBundleInfo;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.publisher.actions.IVersionAdvice;
-
-/**
- * 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 info, IPublisherResult results, IProgressMonitor monitor) {
- publishCU(ORG_ECLIPSE_EQUINOX_LAUNCHER, null, info, results);
- publishLauncherFragmentCUs(info, 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(IPublisherInfo info, IPublisherResult results) {
- for (int i = 0; i < configSpecs.length; i++) {
- String configSpec = configSpecs[i];
- String id = ORG_ECLIPSE_EQUINOX_LAUNCHER + '.' + configSpec;
- publishCU(id, configSpec, info, 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, IPublisherInfo info, IPublisherResult results) {
- Collection advice = info.getAdvice(configSpec, true, id, null, IVersionAdvice.class);
- for (Iterator j = advice.iterator(); j.hasNext();) {
- IVersionAdvice versionSpec = (IVersionAdvice) j.next();
- 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$
- }
- String 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 844505056..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/Feature.java
+++ /dev/null
@@ -1,327 +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.ArrayList;
-import java.util.Map;
-
-/**
- *
- * 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 discoverySites;
-
- private ArrayList entries;
- private String providerName;
- private String os;
- private String ws;
- private String arch;
- private String nl;
-
- 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 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 (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 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 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 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 2f6da54f1..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java
+++ /dev/null
@@ -1,194 +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.internal.provisional.p2.core.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;
-
- /**
- * 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;
- // 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;
- 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 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;
- }
-
- /**
- * 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 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(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 f1abab84c..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-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.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-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.core.helpers.FileUtils.IPathComputer;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.p2.publisher.*;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.FeatureParser;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.ArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitPatchDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice;
-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.setLicense(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 providedCapabilities = new ArrayList();
- 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 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(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 touchpointData = new HashMap(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 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 = 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.setLicense(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 required = new ArrayList(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.createRequiredCapability(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 = (IInstallableUnit) childIUs.get(i);
- required.add(MetadataFactory.createRequiredCapability(PublisherHelper.IU_NAMESPACE, child.getId(), new VersionRange(child.getVersion(), true, child.getVersion(), true), child.getFilter(), false, false));
- }
- }
- iu.setRequiredCapabilities((IRequiredCapability[]) required.toArray(new IRequiredCapability[required.size()]));
- iu.setTouchpointType(ITouchpointType.NONE);
- iu.setProperty(IInstallableUnit.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());
- String filter = getFilter(entry);
- if (filter != null)
- 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(PublisherHelper.makeTranslationCapability(id, locale));
- }
- }
-
- iu.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
- 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 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.setLicense(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 applicabilityScope = new ArrayList();
- ArrayList patchRequirements = new ArrayList();
- ArrayList requirementChanges = new ArrayList();
- for (int i = 0; i < entries.length; i++) {
- VersionRange range = getVersionRange(entries[i]);
- IRequiredCapability req = MetadataFactory.createRequiredCapability(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);
- continue;
- }
- if (entries[i].isPlugin()) {
- IRequiredCapability from = MetadataFactory.createRequiredCapability(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 = (IInstallableUnit) childIUs.get(i);
- patchRequirements.add(MetadataFactory.createRequiredCapability(PublisherHelper.IU_NAMESPACE, child.getId(), new VersionRange(child.getVersion(), true, child.getVersion(), true), child.getFilter(), false, false));
- }
- }
- iu.setRequiredCapabilities((IRequiredCapability[]) patchRequirements.toArray(new IRequiredCapability[patchRequirements.size()]));
- iu.setApplicabilityScope(new IRequiredCapability[][] {(IRequiredCapability[]) applicabilityScope.toArray(new IRequiredCapability[applicabilityScope.size()])});
- iu.setRequirementChanges((IRequirementChange[]) requirementChanges.toArray(new IRequirementChange[requirementChanges.size()]));
-
- //Generate lifecycle
- IRequiredCapability lifeCycle = null;
- if (applicabilityScope.size() > 0) {
- IRequiredCapability req = (IRequiredCapability) applicabilityScope.get(0);
- lifeCycle = MetadataFactory.createRequiredCapability(req.getNamespace(), req.getName(), req.getRange(), null, false, false, false);
- iu.setLifeCycle(lifeCycle);
- }
-
- iu.setTouchpointType(ITouchpointType.NONE);
- processTouchpointAdvice(iu, null, publisherInfo);
- processInstallableUnitPropertiesAdvice(iu, publisherInfo);
- iu.setProperty(IInstallableUnit.PROP_TYPE_GROUP, Boolean.TRUE.toString());
- iu.setProperty(IInstallableUnit.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(PublisherHelper.makeTranslationCapability(id, locale));
- }
- }
-
- iu.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
- processCapabilityAdvice(iu, publisherInfo);
- return MetadataFactory.createInstallableUnitPatch(iu);
- }
-
- private File[] expandLocations(File[] list) {
- ArrayList result = new ArrayList();
- expandLocations(list, result);
- return (File[]) result.toArray(new File[result.size()]);
- }
-
- private void expandLocations(File[] list, ArrayList 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 childIUs = new ArrayList();
-
- 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 generateRootFileIUs(Feature feature, IPublisherResult result, IPublisherInfo publisherInfo) {
- ArrayList ius = new ArrayList();
-
- Collection collection = publisherInfo.getAdvice(null, false, feature.getId(), Version.parseVersion(feature.getVersion()), IFeatureRootAdvice.class);
- if (collection.size() == 0)
- return ius;
-
- IFeatureRootAdvice advice = (IFeatureRootAdvice) 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()[0];
- 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 metadataRepo The repo into which the references are added
- */
- private void generateSiteReference(String location, String nickname, String featureId, IMetadataRepository metadataRepo) {
- 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);
- metadataRepo.addReference(associateLocation, nickname, IRepository.TYPE_METADATA, IRepository.NONE);
- metadataRepo.addReference(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) {
- //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(), publisherInfo.getMetadataRepository());
- URLEntry[] discoverySites = feature.getDiscoverySites();
- for (int i = 0; i < discoverySites.length; i++)
- generateSiteReference(discoverySites[i].getURL(), discoverySites[i].getAnnotation(), feature.getId(), publisherInfo.getMetadataRepository());
- }
-
- protected Feature[] getFeatures(File[] featureLocations) {
- ArrayList result = new ArrayList(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 (Feature[]) result.toArray(new Feature[result.size()]);
- }
-
- private String 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 result.toString();
- }
-
- private void expandFilter(String filter, String osgiFilterValue, StringBuffer result) {
- if (filter != null) {
- 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(')');
- }
- }
- }
-
- private 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);
- if (match.equals("equivalent")) { //$NON-NLS-1$
- Version upper = Version.createOSGi(version.getMajor(), version.getMinor() + 1, 0);
- return new VersionRange(version, true, upper, false);
- }
- if (match.equals("compatible")) { //$NON-NLS-1$
- Version upper = Version.createOSGi(version.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.
- IArtifactKey[] artifacts = featureIU.getArtifacts();
- for (int j = 0; j < artifacts.length; j++) {
- File file = new File(feature.getLocation());
- ArtifactDescriptor ad = (ArtifactDescriptor) PublisherHelper.createArtifactDescriptor(artifacts[j], 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 touchpointData = new HashMap();
- //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 touchpointData = new HashMap();
- 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 a58f5f0a0..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAndBundlesPublisherApplication.java
+++ /dev/null
@@ -1,64 +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.publisher.*;
-
-/**
- * <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;
-
- 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);
- }
-
- 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 result = new ArrayList();
- 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));
- return (IPublisherAction[]) 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 3e92dc84c..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IBrandingAdvice.java
+++ /dev/null
@@ -1,38 +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;
-
-/**
- * Advice for branding executables and other element while publishing.
- */
-public interface IBrandingAdvice {
-
- /**
- * 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 5e673ea92..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.Properties;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-public interface IConfigAdvice extends IPublisherAdvice {
-
- public BundleInfo[] getBundles();
-
- public Properties 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 71a0813c0..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/InstallPublisherApplication.java
+++ /dev/null
@@ -1,94 +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.p2.core.VersionedName;
-
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.p2.publisher.*;
-
-public class InstallPublisherApplication extends AbstractPublisherApplication {
-
- protected String id;
- protected Version version = new Version("1.0.0"); //$NON-NLS-1$
- protected String name;
- protected String executableName;
- protected String flavor;
- protected VersionedName[] topLevel;
- protected boolean start;
- protected String[] rootExclusions;
-
- public InstallPublisherApplication() {
- }
-
- protected void processFlag(String arg, PublisherInfo info) {
- super.processFlag(arg, info);
-
- if (arg.equalsIgnoreCase("-startAll")) //$NON-NLS-1$
- start = true;
- }
-
- protected void processParameter(String arg, String parameter, PublisherInfo info) throws URISyntaxException {
- super.processParameter(arg, parameter, info);
-
- if (arg.equalsIgnoreCase("-id")) //$NON-NLS-1$
- id = parameter;
-
- if (arg.equalsIgnoreCase("-version")) //$NON-NLS-1$
- version = new Version(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 = createVersionedNameList(parameter);
-
- if (arg.equalsIgnoreCase("-rootExclusions")) //$NON-NLS-1$
- rootExclusions = AbstractPublisherAction.getArrayFromString(parameter, ",");
- }
-
- private VersionedName[] createVersionedNameList(String parameter) {
- String[] list = AbstractPublisherAction.getArrayFromString(parameter, ","); //$NON-NLS-1$
- VersionedName[] result = new VersionedName[list.length];
- for (int i = 0; i < result.length; i++)
- result[i] = VersionedName.parse(list[i]);
- return result;
- }
-
- protected IPublisherAction[] createActions() {
- ArrayList result = new ArrayList();
- result.add(createEclipseInstallAction());
- return (IPublisherAction[]) 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 d202b4705..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java
+++ /dev/null
@@ -1,190 +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.IProductDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionedName;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-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 actions = new ArrayList();
- // 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 (IPublisherAction[]) 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 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 versionElements(Collection elements, String namespace) {
- Collection versionAdvice = info.getAdvice(null, true, null, null, IVersionAdvice.class);
- List result = new ArrayList();
- for (Iterator i = elements.iterator(); i.hasNext();) {
- VersionedName element = (VersionedName) i.next();
- Version elementVersion = element.getVersion();
- if (elementVersion == null || Version.emptyVersion.equals(elementVersion)) {
- Iterator advice = versionAdvice.iterator();
- while (advice.hasNext()) {
- elementVersion = ((IVersionAdvice) 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 VersionedName(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 listElements(List elements, String suffix) {
- if (suffix == null || suffix.length() == 0)
- return elements;
- ArrayList result = new ArrayList(elements.size());
- for (Iterator i = elements.iterator(); i.hasNext();) {
- VersionedName elementName = (VersionedName) i.next();
- result.add(new VersionedName(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 5d476b7d2..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductFileAdvice.java
+++ /dev/null
@@ -1,331 +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.internal.p2.publisher.eclipse.DataLoader;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionedName;
-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 EMPTY_VERSION = "0.0.0"; //$NON-NLS-1$
- 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 Properties getProperties() {
- Properties result = new Properties();
- result.putAll(configData.getProperties());
- 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();
- normalizeBundleVersions(result);
- } 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 normalizeBundleVersions(ConfigData data) {
- BundleInfo[] bundles = data.getBundles();
- for (int i = 0; i < bundles.length; i++) {
- // If the bundle doesn't have a version set it to 0.0.0
- if (bundles[i].getVersion() == null)
- bundles[i].setVersion(EMPTY_VERSION);
- }
- }
-
- private void addProductFileConfigBundles(ConfigData data) {
- Set versionBoundBundles = new HashSet();
- Map unboundedBundles = new HashMap();
-
- 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() == null || bundleInfo.getVersion().equals(EMPTY_VERSION)) {
- bundleInfo.setVersion(EMPTY_VERSION);
- addUnboundedBundle(unboundedBundles, bundleInfo);
- } else {
- versionBoundBundles.add(bundleInfo);
- addUnboundedBundle(unboundedBundles, bundleInfo);
- }
- }
-
- List bundleInfos = product.getBundleInfos();
- for (Iterator i = bundleInfos.iterator(); i.hasNext();) {
- // 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)
- BundleInfo bundleInfo = (BundleInfo) i.next();
-
- 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() == null || bundleInfo.getVersion().equals("0.0.0")) {//$NON-NLS-1$
- // If we don't have a version number, look for all bundles that match by name
- List list = (List) unboundedBundles.get(bundleInfo.getSymbolicName());
- if (list == null)
- data.addBundle(bundleInfo);
- else
- for (Iterator iterator = list.iterator(); iterator.hasNext();) {
- BundleInfo target = (BundleInfo) iterator.next();
- 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 data, BundleInfo bundleInfo) {
- if (!data.containsKey(bundleInfo.getSymbolicName()))
- data.put(bundleInfo.getSymbolicName(), new LinkedList());
- ((LinkedList) data.get(bundleInfo.getSymbolicName())).add(bundleInfo);
- }
-
- private void addProductFileBundles(ConfigData data) {
- List bundles = product.getBundles(true);
- Set set = new HashSet();
- set.addAll(Arrays.asList(data.getBundles()));
-
- for (Iterator i = bundles.iterator(); i.hasNext();) {
- VersionedName name = (VersionedName) i.next();
- BundleInfo bundleInfo = new BundleInfo();
- bundleInfo.setSymbolicName(name.getId());
- bundleInfo.setVersion(name.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 bundles = product.getBundles(true);
- for (Iterator i = bundles.iterator(); i.hasNext();) {
- VersionedName name = (VersionedName) i.next();
- BundleInfo bundleInfo = new BundleInfo();
- bundleInfo.setSymbolicName(name.getId());
- bundleInfo.setVersion(name.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 08aede714..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductPublisherApplication.java
+++ /dev/null
@@ -1,58 +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.eclipse.IProductDescriptor;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile;
-import org.eclipse.equinox.p2.publisher.*;
-
-public class ProductPublisherApplication extends AbstractPublisherApplication {
-
- private String product;
- private String executables;
- private String flavor;
-
- public ProductPublisherApplication() {
- }
-
- protected IPublisherAction[] createActions() {
- ArrayList result = new ArrayList();
- result.add(createProductAction());
- return (IPublisherAction[]) result.toArray(new IPublisherAction[result.size()]);
- }
-
- private IPublisherAction createProductAction() {
- IProductDescriptor productDescriptor = null;
- try {
- productDescriptor = new ProductFile(product);
- } catch (Exception e) {
- if (product == null)
- throw new IllegalArgumentException("unable to load product file"); //$NON-NLS-1$
- }
- File executablesFeature = executables == null ? null : new File(executables);
- return new ProductAction(source, productDescriptor, flavor, executablesFeature);
- }
-
- protected void processParameter(String arg, String parameter, PublisherInfo info) throws URISyntaxException {
- super.processParameter(arg, parameter, info);
-
- 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;
- }
-
-} \ 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 cc47b68bb..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/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.p2.publisher.eclipse;
-
-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.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 4dcf75669..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/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.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;
-
-/**
- * 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.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 d62efd008..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java
+++ /dev/null
@@ -1,229 +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
- * 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 org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.ArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.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.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 IRequiredCapability#getNamespace()
- * @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 a feature
- * @see IRequiredCapability#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 IRequiredCapability#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 IRequiredCapability#getNamespace()
- * @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 Version versionMax = new Version(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE);
-
- public static final ITouchpointType TOUCHPOINT_NATIVE = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.native", new Version(1, 0, 0)); //$NON-NLS-1$
- public static final ITouchpointType TOUCHPOINT_OSGI = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.osgi", new Version(1, 0, 0)); //$NON-NLS-1$
-
- public static final IProvidedCapability FEATURE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_FEATURE, new Version(1, 0, 0));
-
- public static IArtifactDescriptor createArtifactDescriptor(IArtifactKey key, File pathOnDisk) {
- //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()));
- }
- 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
- }
- }
- }
-
- public static IProvidedCapability makeTranslationCapability(String hostId, Locale locale) {
- return MetadataFactory.createProvidedCapability(NAMESPACE_IU_LOCALIZATION, locale.toString(), new Version(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 = new Version(1, 0, 0);
- cu.setVersion(configUnitVersion);
-
- // Add capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_FLAVOR, configurationFlavor, new Version(1, 0, 0))});
-
- // Create a required capability on features
- IRequiredCapability[] reqs = new IRequiredCapability[] {MetadataFactory.createRequiredCapability(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 = new Version(1, 0, 0);
- cu.setVersion(configUnitVersion);
-
- // Add capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_FLAVOR, configurationFlavor, new Version(1, 0, 0))});
-
- // Create a required capability on source providers
- IRequiredCapability[] reqs = new IRequiredCapability[] {MetadataFactory.createRequiredCapability(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);
- }
-
- private static void addExtraProperties(IInstallableUnit iiu, Properties extraProperties) {
- if (iiu instanceof InstallableUnit) {
- InstallableUnit iu = (InstallableUnit) iiu;
-
- for (Enumeration e = extraProperties.propertyNames(); e.hasMoreElements();) {
- String name = (String) e.nextElement();
- iu.setProperty(name, extraProperties.getProperty(name));
- }
- }
- }
-
- public static IInstallableUnit[] createEclipseIU(BundleDescription bd, boolean isFolderPlugin, IArtifactKey key, Properties extraProperties) {
- ArrayList iusCreated = new ArrayList(1);
- IPublisherInfo info = new PublisherInfo();
- String shape = isFolderPlugin ? IBundleShapeAdvice.DIR : IBundleShapeAdvice.JAR;
- info.addAdvice(new BundleShapeAdvice(bd.getSymbolicName(), Version.fromOSGiVersion(bd.getVersion()), shape));
- IInstallableUnit iu = BundlesAction.createBundleIU(bd, key, info);
- addExtraProperties(iu, extraProperties);
- iusCreated.add(iu);
- return (IInstallableUnit[]) (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);
- }
-
-}
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 3da757a52..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java
+++ /dev/null
@@ -1,183 +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.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-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.metadata.repository.CompositeMetadataRepository;
-import org.eclipse.equinox.internal.p2.publisher.Messages;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.publisher.*;
-
-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 URI metadataLocation;
- protected String metadataRepoName;
- protected URI artifactLocation;
- protected String artifactRepoName;
- protected PublisherInfo provider = null;
- protected List contextRepositories = new ArrayList();
-
- protected IStatus createConfigurationEror(String message) {
- return new Status(IStatus.ERROR, "org.eclipse.equinox.p2.publisher", message); //$NON-NLS-1$
- }
-
- protected void initializeRepositories(PublisherInfo info) throws ProvisionException {
- if (artifactLocation != null)
- info.setArtifactRepository(Publisher.createArtifactRepository(artifactLocation, artifactRepoName, append, compress, reusePackedFiles));
- 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(metadataLocation, metadataRepoName, append, compress));
-
- if (contextRepositories.size() > 0) {
- CompositeMetadataRepository contextMetadata = CompositeMetadataRepository.createMemoryComposite();
- CompositeArtifactRepository contextArtifact = CompositeArtifactRepository.createMemoryComposite();
-
- for (Iterator iterator = contextRepositories.iterator(); iterator.hasNext();) {
- RepoEntry entry = (RepoEntry) iterator.next();
- 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 bd276c160..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/FeaturesAndBundlesPublisherTask.java
+++ /dev/null
@@ -1,84 +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.*;
-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.internal.provisional.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 features = new ArrayList();
- private ArrayList bundles = new ArrayList();
-
- 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 actions = new ArrayList();
- 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((IPublisherAction[]) actions.toArray(new IPublisherAction[actions.size()]), new NullProgressMonitor());
- }
-
- private File[] getLocations(List collection) {
- ArrayList results = new ArrayList();
- for (Iterator iterator = collection.iterator(); iterator.hasNext();) {
- Object obj = iterator.next();
- 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 (File[]) 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) {
- 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 ba8cc4817..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/ProductPublisherTask.java
+++ /dev/null
@@ -1,139 +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.*;
-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.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.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 String source;
- private List configurations = new ArrayList(3);
- private List advice = new ArrayList(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 (Iterator iterator = advice.iterator(); iterator.hasNext();) {
- AdviceElement element = (AdviceElement) iterator.next();
- 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) {
- this.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 819deedc8..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java
+++ /dev/null
@@ -1,183 +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 org.eclipse.equinox.internal.provisional.p2.core.VersionedName;
-
-import java.io.File;
-import org.apache.tools.ant.BuildException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.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 String source;
- 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 VersionedName[] 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, new Version(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 location = new File(source);
- if (metadataLocation == null)
- metadataLocation = location.toURI();
- if (artifactLocation == null)
- artifactLocation = location.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) {
- 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.repository.tools/.classpath b/bundles/org.eclipse.equinox.p2.repository.tools/.classpath
deleted file mode 100644
index 75116d75c..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/.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/CDC-1.1%Foundation-1.1"/>
- <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.repository.tools/.cvsignore b/bundles/org.eclipse.equinox.p2.repository.tools/.cvsignore
deleted file mode 100644
index b4b639c38..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-bin
-lib
-bin_ant \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/.externalToolBuilders/Build Repository Tools JARs.launch b/bundles/org.eclipse.equinox.p2.repository.tools/.externalToolBuilders/Build Repository Tools JARs.launch
deleted file mode 100644
index c4246c1f2..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/.externalToolBuilders/Build Repository Tools JARs.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.repository.tools"/>
-</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.repository.tools"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.repository.tools/scripts/buildAntJARs.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.repository.tools}"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/.project b/bundles/org.eclipse.equinox.p2.repository.tools/.project
deleted file mode 100644
index 798ed3fd7..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/.project
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.repository.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.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value>&lt;project&gt;/.externalToolBuilders/Build Repository Tools JARs.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.repository.tools/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.repository.tools/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 323ecbcd2..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,347 +0,0 @@
-#Fri Feb 27 09:31:49 EST 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=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=warning
-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.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.repository.tools/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.repository.tools/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index c4540955a..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/.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.repository.tools/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.repository.tools/META-INF/MANIFEST.MF
deleted file mode 100644
index cc6511e5c..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,35 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-SymbolicName: org.eclipse.equinox.p2.repository.tools;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Bundle-Activator: org.eclipse.equinox.p2.internal.repository.tools.Activator
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Import-Package: org.eclipse.equinox.app;version="1.0.0",
- org.eclipse.equinox.internal.p2.artifact.mirror,
- 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.director,
- org.eclipse.equinox.internal.p2.engine,
- org.eclipse.equinox.internal.p2.metadata.repository,
- org.eclipse.equinox.internal.p2.repository.helpers,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.engine.phases,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.4.0",
- org.osgi.service.packageadmin;version="1.2.0"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.0"
-Export-Package: org.eclipse.equinox.p2.internal.repository.tools;x-internal:=true
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/about.html b/bundles/org.eclipse.equinox.p2.repository.tools/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/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.repository.tools/build.properties b/bundles/org.eclipse.equinox.p2.repository.tools/build.properties
deleted file mode 100644
index a1a83243a..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/build.properties
+++ /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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- lib/*.jar,\
- plugin.properties,\
- about.html
-extra.lib/repository-tools-ant.jar = ../org.apache.ant/ant.jar
-jars.compile.order = ., lib/repository-tools-ant.jar
-source.lib/repository-tools-ant.jar = src_ant/
-output.lib/repository-tools-ant.jar = bin_ant/
-jars.extra.classpath=platform:/plugin/org.apache.ant/lib/ant.jar,\
- platform:/plugin/org.eclipse.equinox.p2.jarprocessor/lib/jarprocessor-ant.jar,\
- platform:/plugin/org.eclipse.equinox.p2.artifact.repository/ant_tasks/artifactRepository-ant.jar
-src.includes = about.html
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/lib/.cvsignore b/bundles/org.eclipse.equinox.p2.repository.tools/lib/.cvsignore
deleted file mode 100644
index 577f03f81..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/lib/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-repository-tools-ant.jar
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/plugin.properties b/bundles/org.eclipse.equinox.p2.repository.tools/plugin.properties
deleted file mode 100644
index 9d171a84d..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/plugin.properties
+++ /dev/null
@@ -1,13 +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
-###############################################################################
-
-providerName = Eclipse.org - Equinox
-bundleName=Equinox p2 repository tools.
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/plugin.xml b/bundles/org.eclipse.equinox.p2.repository.tools/plugin.xml
deleted file mode 100644
index 9cc4dc21d..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/plugin.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
- <extension
- point="org.eclipse.ant.core.antTasks">
- <antTask
- class="org.eclipse.equinox.p2.internal.repository.tools.tasks.Repo2RunnableTask"
- library="lib/repository-tools-ant.jar"
- name="p2.repo2runnable">
- </antTask>
-
- <antTask
- class="org.eclipse.equinox.p2.internal.repository.tools.tasks.MirrorTask"
- library="lib/repository-tools-ant.jar"
- name="p2.mirror">
- </antTask>
-
- <antTask
- class="org.eclipse.equinox.p2.internal.repository.tools.tasks.CompositeRepositoryTask"
- library="lib/repository-tools-ant.jar"
- name="p2.composite.repository">
- </antTask>
-
- <antTask
- library="lib/repository-tools-ant.jar"
- name="p2.process.artifacts"
- class="org.eclipse.equinox.p2.internal.repository.tools.tasks.ProcessRepoTask" >
- </antTask>
-
- <antTask
- library="lib/repository-tools-ant.jar"
- name="p2.remove.iu"
- class="org.eclipse.equinox.p2.internal.repository.tools.tasks.RemoveIUTask" >
- </antTask>
- </extension>
-
- <extension
- id="org.eclipse.equinox.p2.repository.repo2runnable"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run class="org.eclipse.equinox.p2.internal.repository.tools.Repo2Runnable"/>
- </application>
- </extension>
-
- <extension
- point="org.eclipse.equinox.p2.artifact.repository.artifactComparators">
- <artifactComparator
- class="org.eclipse.equinox.p2.internal.repository.comparator.JarComparator"
- id="org.eclipse.equinox.p2.repository.tools.jar.comparator">
- </artifactComparator>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/scripts/buildAntJARs.xml b/bundles/org.eclipse.equinox.p2.repository.tools/scripts/buildAntJARs.xml
deleted file mode 100644
index 86fe8360b..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/scripts/buildAntJARs.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<project name="project" default="default">
- <target name="default" description="Jar up the binaries that were compiled by the jdt builder" >
- <mkdir dir="lib" />
- <delete file="lib/repository-tools-ant.jar" failonerror="false"/>
- <jar destfile="lib/repository-tools-ant.jar" basedir="bin_ant"/>
- </target>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Annotation.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Annotation.java
deleted file mode 100644
index 2771ea6f1..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Annotation.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.p2.internal.repository.comparator;
-
-public class Annotation extends ClassFileStruct {
-
- private static final AnnotationComponent[] NO_ENTRIES = new AnnotationComponent[0];
-
- private int typeIndex;
- private char[] typeName;
- private int componentsNumber;
- private AnnotationComponent[] components;
- private int readOffset;
-
- /**
- * Constructor for Annotation.
- *
- * @param classFileBytes
- * @param constantPool
- * @param offset
- * @throws ClassFormatException
- */
- public Annotation(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
-
- final int index = u2At(classFileBytes, 0, offset);
- this.typeIndex = index;
- if (index != 0) {
- ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.typeName = constantPoolEntry.getUtf8Value();
- } else {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- final int length = u2At(classFileBytes, 2, offset);
- this.componentsNumber = length;
- this.readOffset = 4;
- if (length != 0) {
- this.components = new AnnotationComponent[length];
- for (int i = 0; i < length; i++) {
- AnnotationComponent component = new AnnotationComponent(classFileBytes, constantPool, offset + this.readOffset);
- this.components[i] = component;
- this.readOffset += component.sizeInBytes();
- }
- } else {
- this.components = NO_ENTRIES;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IAnnotation#getTypeIndex()
- */
- public int getTypeIndex() {
- return this.typeIndex;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IAnnotation#getComponentsNumber()
- */
- public int getComponentsNumber() {
- return this.componentsNumber;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IAnnotation#getComponents()
- */
- public AnnotationComponent[] getComponents() {
- return this.components;
- }
-
- int sizeInBytes() {
- return this.readOffset;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IAnnotation#getTypeName()
- */
- public char[] getTypeName() {
- return this.typeName;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationComponent.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationComponent.java
deleted file mode 100644
index ac8374398..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationComponent.java
+++ /dev/null
@@ -1,60 +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.internal.repository.comparator;
-
-public class AnnotationComponent extends ClassFileStruct {
-
- private int componentNameIndex;
- private char[] componentName;
- private AnnotationComponentValue componentValue;
- private int readOffset;
-
- public AnnotationComponent(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
- final int nameIndex = u2At(classFileBytes, 0, offset);
- this.componentNameIndex = nameIndex;
- if (nameIndex != 0) {
- ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(nameIndex);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.componentName = constantPoolEntry.getUtf8Value();
- }
- this.readOffset = 2;
- AnnotationComponentValue value = new AnnotationComponentValue(classFileBytes, constantPool, offset + this.readOffset);
- this.componentValue = value;
- this.readOffset += value.sizeInBytes();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IAnnotationComponent#getComponentNameIndex()
- */
- public int getComponentNameIndex() {
- return this.componentNameIndex;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IAnnotationComponent#getComponentName()
- */
- public char[] getComponentName() {
- return this.componentName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IAnnotationComponent#getComponentValue()
- */
- public AnnotationComponentValue getComponentValue() {
- return this.componentValue;
- }
-
- int sizeInBytes() {
- return this.readOffset;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationComponentValue.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationComponentValue.java
deleted file mode 100644
index 386643914..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationComponentValue.java
+++ /dev/null
@@ -1,277 +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.internal.repository.comparator;
-
-public class AnnotationComponentValue extends ClassFileStruct {
- /**
- * Tag value for a constant of type <code>byte</code>
- * @since 3.1
- */
- public static final int BYTE_TAG = 'B';
- /**
- * Tag value for a constant of type <code>char</code>
- * @since 3.1
- */
- public static final int CHAR_TAG = 'C';
- /**
- * Tag value for a constant of type <code>double</code>
- * @since 3.1
- */
- public static final int DOUBLE_TAG = 'D';
- /**
- * Tag value for a constant of type <code>float</code>
- * @since 3.1
- */
- public static final int FLOAT_TAG = 'F';
- /**
- * Tag value for a constant of type <code>int</code>
- * @since 3.1
- */
- public static final int INTEGER_TAG = 'I';
- /**
- * Tag value for a constant of type <code>long</code>
- * @since 3.1
- */
- public static final int LONG_TAG = 'J';
- /**
- * Tag value for a constant of type <code>short</code>
- * @since 3.1
- */
- public static final int SHORT_TAG = 'S';
- /**
- * Tag value for a constant of type <code>boolean</code>
- * @since 3.1
- */
- public static final int BOOLEAN_TAG = 'Z';
- /**
- * Tag value for a constant of type <code>java.lang.String</code>
- * @since 3.1
- */
- public static final int STRING_TAG = 's';
- /**
- * Tag value for a value that represents an enum constant
- * @since 3.1
- */
- public static final int ENUM_TAG = 'e';
- /**
- * Tag value for a value that represents a class
- * @since 3.1
- */
- public static final int CLASS_TAG = 'c';
- /**
- * Tag value for a value that represents an annotation
- * @since 3.1
- */
- public static final int ANNOTATION_TAG = '@';
- /**
- * Tag value for a value that represents an array
- * @since 3.1
- */
- public static final int ARRAY_TAG = '[';
-
- private static final AnnotationComponentValue[] NO_VALUES = new AnnotationComponentValue[0];
-
- private AnnotationComponentValue[] annotationComponentValues;
- private Annotation annotationValue;
- private ConstantPoolEntry classInfo;
- private int classFileInfoIndex;
- private ConstantPoolEntry constantValue;
- private int constantValueIndex;
- private int enumConstantTypeNameIndex;
- private int enumConstantNameIndex;
- private char[] enumConstantTypeName;
- private char[] enumConstantName;
-
- private int readOffset;
- private int tag;
- private int valuesNumber;
-
- public AnnotationComponentValue(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
- this.classFileInfoIndex = -1;
- this.constantValueIndex = -1;
- this.enumConstantTypeNameIndex = -1;
- this.enumConstantNameIndex = -1;
- final int t = u1At(classFileBytes, 0, offset);
- this.tag = t;
- this.readOffset = 1;
- switch (t) {
- case 'B' :
- case 'C' :
- case 'D' :
- case 'F' :
- case 'I' :
- case 'J' :
- case 'S' :
- case 'Z' :
- case 's' :
- final int constantIndex = u2At(classFileBytes, this.readOffset, offset);
- this.constantValueIndex = constantIndex;
- if (constantIndex != 0) {
- ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(constantIndex);
- switch (constantPoolEntry.getKind()) {
- case ConstantPoolConstant.CONSTANT_Long :
- case ConstantPoolConstant.CONSTANT_Float :
- case ConstantPoolConstant.CONSTANT_Double :
- case ConstantPoolConstant.CONSTANT_Integer :
- case ConstantPoolConstant.CONSTANT_Utf8 :
- break;
- default :
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.constantValue = constantPoolEntry;
- }
- this.readOffset += 2;
- break;
- case 'e' :
- int index = u2At(classFileBytes, this.readOffset, offset);
- this.enumConstantTypeNameIndex = index;
- if (index != 0) {
- ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.enumConstantTypeName = constantPoolEntry.getUtf8Value();
- }
- this.readOffset += 2;
- index = u2At(classFileBytes, this.readOffset, offset);
- this.enumConstantNameIndex = index;
- if (index != 0) {
- ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.enumConstantName = constantPoolEntry.getUtf8Value();
- }
- this.readOffset += 2;
- break;
- case 'c' :
- final int classFileIndex = u2At(classFileBytes, this.readOffset, offset);
- this.classFileInfoIndex = classFileIndex;
- if (classFileIndex != 0) {
- ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(classFileIndex);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.classInfo = constantPoolEntry;
- }
- this.readOffset += 2;
- break;
- case '@' :
- Annotation annotation = new Annotation(classFileBytes, constantPool, this.readOffset + offset);
- this.annotationValue = annotation;
- this.readOffset += annotation.sizeInBytes();
- break;
- case '[' :
- final int numberOfValues = u2At(classFileBytes, this.readOffset, offset);
- this.valuesNumber = numberOfValues;
- this.readOffset += 2;
- if (numberOfValues != 0) {
- this.annotationComponentValues = new AnnotationComponentValue[numberOfValues];
- for (int i = 0; i < numberOfValues; i++) {
- AnnotationComponentValue value = new AnnotationComponentValue(classFileBytes, constantPool, offset + this.readOffset);
- this.annotationComponentValues[i] = value;
- this.readOffset += value.sizeInBytes();
- }
- } else {
- this.annotationComponentValues = NO_VALUES;
- }
- break;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getAnnotationComponentValues()
- */
- public AnnotationComponentValue[] getAnnotationComponentValues() {
- return this.annotationComponentValues;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getAnnotationValue()
- */
- public Annotation getAnnotationValue() {
- return this.annotationValue;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getClassInfo()
- */
- public ConstantPoolEntry getClassInfo() {
- return this.classInfo;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getClassInfoIndex()
- */
- public int getClassInfoIndex() {
- return this.classFileInfoIndex;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getConstantValue()
- */
- public ConstantPoolEntry getConstantValue() {
- return this.constantValue;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getConstantValueIndex()
- */
- public int getConstantValueIndex() {
- return this.constantValueIndex;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getEnumConstantName()
- */
- public char[] getEnumConstantName() {
- return this.enumConstantName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getEnumConstantNameIndex()
- */
- public int getEnumConstantNameIndex() {
- return this.enumConstantNameIndex;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getEnumConstantTypeName()
- */
- public char[] getEnumConstantTypeName() {
- return this.enumConstantTypeName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getEnumConstantTypeNameIndex()
- */
- public int getEnumConstantTypeNameIndex() {
- return this.enumConstantTypeNameIndex;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getTag()
- */
- public int getTag() {
- return this.tag;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getValuesNumber()
- */
- public int getValuesNumber() {
- return this.valuesNumber;
- }
-
- int sizeInBytes() {
- return this.readOffset;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationDefaultAttribute.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationDefaultAttribute.java
deleted file mode 100644
index a52692c20..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationDefaultAttribute.java
+++ /dev/null
@@ -1,35 +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.internal.repository.comparator;
-
-public class AnnotationDefaultAttribute extends ClassFileAttribute {
-
- private AnnotationComponentValue memberValue;
-
- /**
- * Constructor for AnnotationDefaultAttribute.
- * @param classFileBytes
- * @param constantPool
- * @param offset
- * @throws ClassFormatException
- */
- public AnnotationDefaultAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
- super(classFileBytes, constantPool, offset);
- this.memberValue = new AnnotationComponentValue(classFileBytes, constantPool, offset + 6);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IAnnotationDefaultAttribute#getMemberValue()
- */
- public AnnotationComponentValue getMemberValue() {
- return this.memberValue;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AttributeNamesConstants.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AttributeNamesConstants.java
deleted file mode 100644
index 3f55bfce0..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AttributeNamesConstants.java
+++ /dev/null
@@ -1,142 +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.internal.repository.comparator;
-
-public interface AttributeNamesConstants {
- /*
- * "Synthetic" attribute.
- * <p>Note that prior to JDK 1.5, synthetic elements were always marked
- * using an attribute; with 1.5, synthetic elements can also be marked
- * using the {@link IModifierConstants#ACC_SYNTHETIC} flag.
- * </p>
- * @since 2.0
- */
- char[] SYNTHETIC = "Synthetic".toCharArray(); //$NON-NLS-1$
-
- /*
- * "ConstantValue" attribute.
- * @since 2.0
- */
- char[] CONSTANT_VALUE = "ConstantValue".toCharArray(); //$NON-NLS-1$
-
- /*
- * "LineNumberTable" attribute.
- * @since 2.0
- */
- char[] LINE_NUMBER = "LineNumberTable".toCharArray(); //$NON-NLS-1$
-
- /*
- * "LocalVariableTable" attribute.
- * @since 2.0
- */
- char[] LOCAL_VARIABLE = "LocalVariableTable".toCharArray(); //$NON-NLS-1$
-
- /*
- * "InnerClasses" attribute.
- * @since 2.0
- */
- char[] INNER_CLASSES = "InnerClasses".toCharArray(); //$NON-NLS-1$
-
- /*
- * "Code" attribute.
- * @since 2.0
- */
- char[] CODE = "Code".toCharArray(); //$NON-NLS-1$
-
- /*
- * "Exceptions" attribute.
- * @since 2.0
- */
- char[] EXCEPTIONS = "Exceptions".toCharArray(); //$NON-NLS-1$
-
- /*
- * "SourceFile" attribute.
- * @since 2.0
- */
- char[] SOURCE = "SourceFile".toCharArray(); //$NON-NLS-1$
-
- /*
- * "Deprecated" attribute.
- * @since 2.0
- */
- char[] DEPRECATED = "Deprecated".toCharArray(); //$NON-NLS-1$
-
- /*
- * "Signature" attribute (added in J2SE 1.5).
- * Class file readers which support J2SE 1.5 return
- * attributes with this name represented by objects
- * implementing {@link ISignatureAttribute}.
- * @since 3.0
- */
- char[] SIGNATURE = "Signature".toCharArray(); //$NON-NLS-1$
-
- /*
- * "EnclosingMethod" attribute (added in J2SE 1.5).
- * Class file readers which support J2SE 1.5 return
- * attributes with this name represented by objects
- * implementing {@link IEnclosingMethodAttribute}.
- * @since 3.0
- */
- char[] ENCLOSING_METHOD = "EnclosingMethod".toCharArray(); //$NON-NLS-1$
-
- /*
- * "LocalVariableTypeTable" attribute (added in J2SE 1.5).
- * @since 3.0
- */
- char[] LOCAL_VARIABLE_TYPE_TABLE = "LocalVariableTypeTable".toCharArray(); //$NON-NLS-1$
-
- /*
- * "RuntimeVisibleAnnotations" attribute (added in J2SE 1.5).
- * @since 3.0
- */
- char[] RUNTIME_VISIBLE_ANNOTATIONS = "RuntimeVisibleAnnotations".toCharArray(); //$NON-NLS-1$
-
- /*
- * "RuntimeInvisibleAnnotations" attribute (added in J2SE 1.5).
- * @since 3.0
- */
- char[] RUNTIME_INVISIBLE_ANNOTATIONS = "RuntimeInvisibleAnnotations".toCharArray(); //$NON-NLS-1$
-
- /*
- * "RuntimeVisibleParameterAnnotations" attribute (added in J2SE 1.5).
- * @since 3.0
- */
- char[] RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS = "RuntimeVisibleParameterAnnotations".toCharArray(); //$NON-NLS-1$
-
- /*
- * "RuntimeInvisibleParameterAnnotations" attribute (added in J2SE 1.5).
- * @since 3.0
- */
- char[] RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS = "RuntimeInvisibleParameterAnnotations".toCharArray(); //$NON-NLS-1$
-
- /*
- * "AnnotationDefault" attribute (added in J2SE 1.5).
- * @since 3.0
- */
- char[] ANNOTATION_DEFAULT = "AnnotationDefault".toCharArray(); //$NON-NLS-1$
-
- /*
- * "StackMapTable" attribute (added in J2SE 1.6).
- * @since 3.2
- */
- char[] STACK_MAP_TABLE = "StackMapTable".toCharArray(); //$NON-NLS-1$
-
- /*
- * "StackMap" attribute (added in cldc1.0).
- * @since 3.2
- */
- char[] STACK_MAP = "StackMap".toCharArray(); //$NON-NLS-1$
-
- /*
- * "Varargs" attribute (unspecified).
- */
- char[] VAR_ARGS = "Varargs".toCharArray(); //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/CharOperation.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/CharOperation.java
deleted file mode 100644
index 2f1ae4d9b..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/CharOperation.java
+++ /dev/null
@@ -1,602 +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.internal.repository.comparator;
-
-public final class CharOperation {
- public static final char[] This = "this".toCharArray(); //$NON-NLS-1$
-
- public static final char[] JAVA_LANG_ANNOTATION_DOCUMENTED = "Ljava/lang/annotation/Documented;".toCharArray(); //$NON-NLS-1$
- public static final char[] JAVA_LANG_ANNOTATION_ELEMENTTYPE = "Ljava/lang/annotation/ElementType;".toCharArray(); //$NON-NLS-1$
- public static final char[] JAVA_LANG_ANNOTATION_RETENTION = "Ljava/lang/annotation/Retention;".toCharArray(); //$NON-NLS-1$
- public static final char[] JAVA_LANG_ANNOTATION_RETENTIONPOLICY = "Ljava/lang/annotation/RetentionPolicy;".toCharArray(); //$NON-NLS-1$
- public static final char[] JAVA_LANG_ANNOTATION_TARGET = "Ljava/lang/annotation/Target;".toCharArray(); //$NON-NLS-1$
- public static final char[] JAVA_LANG_DEPRECATED = "Ljava/lang/Deprecated;".toCharArray(); //$NON-NLS-1$
- public static final char[] JAVA_LANG_ANNOTATION_INHERITED = "Ljava/lang/annotation/Inherited;".toCharArray(); //$NON-NLS-1$
- /**
- * Constant for an empty char array
- */
- public static final char[] NO_CHAR = new char[0];
-
- /**
- * Constant for an empty char array with two dimensions.
- */
- public static final char[][] NO_CHAR_CHAR = new char[0][];
-
- /**
- * Answers a hashcode for the array
- *
- * @param array the array for which a hashcode is required
- * @return the hashcode
- * @throws NullPointerException if array is null
- */
- public static final int hashCode(char[] array) {
- int length = array.length;
- int hash = length == 0 ? 31 : array[0];
- if (length < 8) {
- for (int i = length; --i > 0;)
- hash = (hash * 31) + array[i];
- } else {
- // 8 characters is enough to compute a decent hash code, don't waste time examining every character
- for (int i = length - 1, last = i > 16 ? i - 16 : 0; i > last; i -= 2)
- hash = (hash * 31) + array[i];
- }
- return hash & 0x7FFFFFFF;
- }
-
- /**
- * Answers the last index in the array for which the corresponding character is
- * equal to toBeFound starting from the end of the array.
- * Answers -1 if no occurrence of this character is found.
- * <br>
- * <br>
- * For example:
- * <ol>
- * <li><pre>
- * toBeFound = 'c'
- * array = { ' a', 'b', 'c', 'd' , 'c', 'e' }
- * result => 4
- * </pre>
- * </li>
- * <li><pre>
- * toBeFound = 'e'
- * array = { ' a', 'b', 'c', 'd' }
- * result => -1
- * </pre>
- * </li>
- * </ol>
- *
- * @param toBeFound the character to search
- * @param array the array to be searched
- * @return the last index in the array for which the corresponding character is
- * equal to toBeFound starting from the end of the array, -1 otherwise
- * @throws NullPointerException if array is null
- */
- public static final int lastIndexOf(char toBeFound, char[] array) {
- for (int i = array.length; --i >= 0;)
- if (toBeFound == array[i])
- return i;
- return -1;
- }
-
- /**
- * Return a new array which is the split of the given array using the given divider.
- * <br>
- * <br>
- * For example:
- * <ol>
- * <li><pre>
- * divider = 'b'
- * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
- * result => { { 'a' }, { }, { 'a' }, { 'a' } }
- * </pre>
- * </li>
- * <li><pre>
- * divider = 'c'
- * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
- * result => { { 'a', 'b', 'b', 'a', 'b', 'a' } }
- * </pre>
- * </li>
- * <li><pre>
- * divider = 'c'
- * array = { ' ', ' ', 'a' , 'b', 'b', 'a', 'b', 'a', ' ' }
- * result => { { ' ', 'a', 'b', 'b', 'a', 'b', 'a', ' ' } }
- * </pre>
- * </li>
- * </ol>
- *
- * @param divider the given divider
- * @param array the given array
- * @return a new array which is the split of the given array using the given divider
- */
- public static final char[][] splitOn(char divider, char[] array) {
- int length = array == null ? 0 : array.length;
- if (length == 0)
- return NO_CHAR_CHAR;
-
- int wordCount = 1;
- for (int i = 0; i < length; i++)
- if (array[i] == divider)
- wordCount++;
- char[][] split = new char[wordCount][];
- int last = 0, currentWord = 0;
- for (int i = 0; i < length; i++) {
- if (array[i] == divider) {
- split[currentWord] = new char[i - last];
- System.arraycopy(array, last, split[currentWord++], 0, i - last);
- last = i + 1;
- }
- }
- split[currentWord] = new char[length - last];
- System.arraycopy(array, last, split[currentWord], 0, length - last);
- return split;
- }
-
- /**
- * Answers the first index in the array for which the corresponding character is
- * equal to toBeFound starting the search at index start.
- * Answers -1 if no occurrence of this character is found.
- * <br>
- * <br>
- * For example:
- * <ol>
- * <li><pre>
- * toBeFound = 'c'
- * array = { ' a', 'b', 'c', 'd' }
- * start = 2
- * result => 2
- * </pre>
- * </li>
- * <li><pre>
- * toBeFound = 'c'
- * array = { ' a', 'b', 'c', 'd' }
- * start = 3
- * result => -1
- * </pre>
- * </li>
- * <li><pre>
- * toBeFound = 'e'
- * array = { ' a', 'b', 'c', 'd' }
- * start = 1
- * result => -1
- * </pre>
- * </li>
- * </ol>
- *
- * @param toBeFound the character to search
- * @param array the array to be searched
- * @param start the starting index
- * @return the first index in the array for which the corresponding character is
- * equal to toBeFound, -1 otherwise
- * @throws NullPointerException if array is null
- * @throws ArrayIndexOutOfBoundsException if start is lower than 0
- */
- public static final int indexOf(char toBeFound, char[] array, int start) {
- for (int i = start; i < array.length; i++)
- if (toBeFound == array[i])
- return i;
- return -1;
- }
-
- /**
- * Answers a new array with prepending the prefix character and appending the suffix
- * character at the end of the array. If array is null, it answers a new array containing the
- * prefix and the suffix characters.
- * <br>
- * <br>
- * For example:<br>
- * <ol>
- * <li><pre>
- * prefix = 'a'
- * array = { 'b' }
- * suffix = 'c'
- * => result = { 'a', 'b' , 'c' }
- * </pre>
- * </li>
- * <li><pre>
- * prefix = 'a'
- * array = null
- * suffix = 'c'
- * => result = { 'a', 'c' }
- * </pre></li>
- * </ol>
- *
- * @param prefix the prefix character
- * @param array the array that is concatenated with the prefix and suffix characters
- * @param suffix the suffix character
- * @return the new array
- */
- public static final char[] concat(char prefix, char[] array, char suffix) {
- if (array == null)
- return new char[] {prefix, suffix};
-
- int length = array.length;
- char[] result = new char[length + 2];
- result[0] = prefix;
- System.arraycopy(array, 0, result, 1, length);
- result[length + 1] = suffix;
- return result;
- }
-
- /**
- * Answers the concatenation of the three arrays. It answers null if the three arrays are null.
- * If first is null, it answers the concatenation of second and third.
- * If second is null, it answers the concatenation of first and third.
- * If third is null, it answers the concatenation of first and second.
- * <br>
- * <br>
- * For example:
- * <ol>
- * <li><pre>
- * first = null
- * second = { 'a' }
- * third = { 'b' }
- * => result = { ' a', 'b' }
- * </pre>
- * </li>
- * <li><pre>
- * first = { 'a' }
- * second = null
- * third = { 'b' }
- * => result = { ' a', 'b' }
- * </pre>
- * </li>
- * <li><pre>
- * first = { 'a' }
- * second = { 'b' }
- * third = null
- * => result = { ' a', 'b' }
- * </pre>
- * </li>
- * <li><pre>
- * first = null
- * second = null
- * third = null
- * => result = null
- * </pre>
- * </li>
- * <li><pre>
- * first = { 'a' }
- * second = { 'b' }
- * third = { 'c' }
- * => result = { 'a', 'b', 'c' }
- * </pre>
- * </li>
- * </ol>
- *
- * @param first the first array to concatenate
- * @param second the second array to concatenate
- * @param third the third array to concatenate
- *
- * @return the concatenation of the three arrays, or null if the three arrays are null.
- */
- public static final char[] concat(char[] first, char[] second, char[] third) {
- if (first == null)
- return concat(second, third);
- if (second == null)
- return concat(first, third);
- if (third == null)
- return concat(first, second);
-
- int length1 = first.length;
- int length2 = second.length;
- int length3 = third.length;
- char[] result = new char[length1 + length2 + length3];
- System.arraycopy(first, 0, result, 0, length1);
- System.arraycopy(second, 0, result, length1, length2);
- System.arraycopy(third, 0, result, length1 + length2, length3);
- return result;
- }
-
- /**
- * Answers the concatenation of the two arrays. It answers null if the two arrays are null.
- * If the first array is null, then the second array is returned.
- * If the second array is null, then the first array is returned.
- * <br>
- * <br>
- * For example:
- * <ol>
- * <li><pre>
- * first = null
- * second = { 'a' }
- * => result = { ' a' }
- * </pre>
- * </li>
- * <li><pre>
- * first = { ' a' }
- * second = null
- * => result = { ' a' }
- * </pre>
- * </li>
- * <li><pre>
- * first = { ' a' }
- * second = { ' b' }
- * => result = { ' a' , ' b' }
- * </pre>
- * </li>
- * </ol>
- *
- * @param first the first array to concatenate
- * @param second the second array to concatenate
- * @return the concatenation of the two arrays, or null if the two arrays are null.
- */
- public static final char[] concat(char[] first, char[] second) {
- if (first == null)
- return second;
- if (second == null)
- return first;
-
- int length1 = first.length;
- int length2 = second.length;
- char[] result = new char[length1 + length2];
- System.arraycopy(first, 0, result, 0, length1);
- System.arraycopy(second, 0, result, length1, length2);
- return result;
- }
-
- /**
- * Replace all occurrence of the character to be replaced with the replacement character in the
- * given array.
- * <br>
- * <br>
- * For example:
- * <ol>
- * <li><pre>
- * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
- * toBeReplaced = 'b'
- * replacementChar = 'a'
- * result => No returned value, but array is now equals to { 'a' , 'a', 'a', 'a', 'a', 'a' }
- * </pre>
- * </li>
- * <li><pre>
- * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
- * toBeReplaced = 'c'
- * replacementChar = 'a'
- * result => No returned value, but array is now equals to { 'a' , 'b', 'b', 'a', 'b', 'a' }
- * </pre>
- * </li>
- * </ol>
- *
- * @param array the given array
- * @param toBeReplaced the character to be replaced
- * @param replacementChar the replacement character
- * @throws NullPointerException if the given array is null
- */
- public static final void replace(char[] array, char toBeReplaced, char replacementChar) {
- if (toBeReplaced != replacementChar) {
- for (int i = 0, max = array.length; i < max; i++) {
- if (array[i] == toBeReplaced)
- array[i] = replacementChar;
- }
- }
- }
-
- /**
- * Replace all occurrence of the character to be replaced with the replacement character
- * in a copy of the given array. Returns the given array if no occurrences of the character
- * to be replaced are found.
- * <br>
- * <br>
- * For example:
- * <ol>
- * <li><pre>
- * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
- * toBeReplaced = 'b'
- * replacementChar = 'a'
- * result => A new array that is equals to { 'a' , 'a', 'a', 'a', 'a', 'a' }
- * </pre>
- * </li>
- * <li><pre>
- * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
- * toBeReplaced = 'c'
- * replacementChar = 'a'
- * result => The original array that remains unchanged.
- * </pre>
- * </li>
- * </ol>
- *
- * @param array the given array
- * @param toBeReplaced the character to be replaced
- * @param replacementChar the replacement character
- * @throws NullPointerException if the given array is null
- * @since 3.1
- */
- public static final char[] replaceOnCopy(char[] array, char toBeReplaced, char replacementChar) {
-
- char[] result = null;
- for (int i = 0, length = array.length; i < length; i++) {
- char c = array[i];
- if (c == toBeReplaced) {
- if (result == null) {
- result = new char[length];
- System.arraycopy(array, 0, result, 0, i);
- }
- result[i] = replacementChar;
- } else if (result != null) {
- result[i] = c;
- }
- }
- if (result == null)
- return array;
- return result;
- }
-
- /**
- * Answers the first index in the array for which the corresponding character is
- * equal to toBeFound. Answers -1 if no occurrence of this character is found.
- * <br>
- * <br>
- * For example:
- * <ol>
- * <li><pre>
- * toBeFound = 'c'
- * array = { ' a', 'b', 'c', 'd' }
- * result => 2
- * </pre>
- * </li>
- * <li><pre>
- * toBeFound = 'e'
- * array = { ' a', 'b', 'c', 'd' }
- * result => -1
- * </pre>
- * </li>
- * </ol>
- *
- * @param toBeFound the character to search
- * @param array the array to be searched
- * @return the first index in the array for which the corresponding character is
- * equal to toBeFound, -1 otherwise
- * @throws NullPointerException if array is null
- */
- public static final int indexOf(char toBeFound, char[] array) {
- return indexOf(toBeFound, array, 0);
- }
-
- /**
- * Answers a new array which is a copy of the given array starting at the given start and
- * ending at the given end. The given start is inclusive and the given end is exclusive.
- * Answers null if start is greater than end, if start is lower than 0 or if end is greater
- * than the length of the given array. If end equals -1, it is converted to the array length.
- * <br>
- * <br>
- * For example:
- * <ol>
- * <li><pre>
- * array = { 'a' , 'b' }
- * start = 0
- * end = 1
- * result => { 'a' }
- * </pre>
- * </li>
- * <li><pre>
- * array = { 'a', 'b' }
- * start = 0
- * end = -1
- * result => { 'a' , 'b' }
- * </pre>
- * </li>
- * </ol>
- *
- * @param array the given array
- * @param start the given starting index
- * @param end the given ending index
- * @return a new array which is a copy of the given array starting at the given start and
- * ending at the given end
- * @throws NullPointerException if the given array is null
- */
- public static final char[] subarray(char[] array, int start, int end) {
- if (end == -1)
- end = array.length;
- if (start > end)
- return null;
- if (start < 0)
- return null;
- if (end > array.length)
- return null;
-
- char[] result = new char[end - start];
- System.arraycopy(array, start, result, 0, end - start);
- return result;
- }
-
- /**
- * Answers a new array which is a copy of the given array starting at the given start and
- * ending at the given end. The given start is inclusive and the given end is exclusive.
- * Answers null if start is greater than end, if start is lower than 0 or if end is greater
- * than the length of the given array. If end equals -1, it is converted to the array length.
- * <br>
- * <br>
- * For example:
- * <ol>
- * <li><pre>
- * array = { { 'a' } , { 'b' } }
- * start = 0
- * end = 1
- * result => { { 'a' } }
- * </pre>
- * </li>
- * <li><pre>
- * array = { { 'a' } , { 'b' } }
- * start = 0
- * end = -1
- * result => { { 'a' }, { 'b' } }
- * </pre>
- * </li>
- * </ol>
- *
- * @param array the given array
- * @param start the given starting index
- * @param end the given ending index
- * @return a new array which is a copy of the given array starting at the given start and
- * ending at the given end
- * @throws NullPointerException if the given array is null
- */
- public static final char[][] subarray(char[][] array, int start, int end) {
- if (end == -1)
- end = array.length;
- if (start > end)
- return null;
- if (start < 0)
- return null;
- if (end > array.length)
- return null;
-
- char[][] result = new char[end - start][];
- System.arraycopy(array, start, result, 0, end - start);
- return result;
- }
-
- /**
- * Return a new array which is the split of the given array using the given divider. The given end
- * is exclusive and the given start is inclusive.
- * <br>
- * <br>
- * For example:
- * <ol>
- * <li><pre>
- * divider = 'b'
- * array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
- * start = 2
- * end = 5
- * result => { { }, { 'a' }, { } }
- * </pre>
- * </li>
- * </ol>
- *
- * @param divider the given divider
- * @param array the given array
- * @param start the given starting index
- * @param end the given ending index
- * @return a new array which is the split of the given array using the given divider
- * @throws ArrayIndexOutOfBoundsException if start is lower than 0 or end is greater than the array length
- */
- public static final char[][] splitOn(char divider, char[] array, int start, int end) {
- int length = array == null ? 0 : array.length;
- if (length == 0 || start > end)
- return NO_CHAR_CHAR;
-
- int wordCount = 1;
- for (int i = start; i < end; i++)
- if (array[i] == divider)
- wordCount++;
- char[][] split = new char[wordCount][];
- int last = start, currentWord = 0;
- for (int i = start; i < end; i++) {
- if (array[i] == divider) {
- split[currentWord] = new char[i - last];
- System.arraycopy(array, last, split[currentWord++], 0, i - last);
- last = i + 1;
- }
- }
- split[currentWord] = new char[end - last];
- System.arraycopy(array, last, split[currentWord], 0, end - last);
- return split;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileAttribute.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileAttribute.java
deleted file mode 100644
index 05225801f..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileAttribute.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.internal.repository.comparator;
-
-public class ClassFileAttribute extends ClassFileStruct {
- public static final ClassFileAttribute[] NO_ATTRIBUTES = new ClassFileAttribute[0];
- private long attributeLength;
- private int attributeNameIndex;
- private char[] attributeName;
-
- public ClassFileAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
- this.attributeNameIndex = u2At(classFileBytes, 0, offset);
- this.attributeLength = u4At(classFileBytes, 2, offset);
- ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(this.attributeNameIndex);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.attributeName = constantPoolEntry.getUtf8Value();
- }
-
- public int getAttributeNameIndex() {
- return this.attributeNameIndex;
- }
-
- /*
- * @see IClassFileAttribute#getAttributeName()
- */
- public char[] getAttributeName() {
- return this.attributeName;
- }
-
- /*
- * @see IClassFileAttribute#getAttributeLength()
- */
- public long getAttributeLength() {
- return this.attributeLength;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileReader.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileReader.java
deleted file mode 100644
index 61765ef09..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileReader.java
+++ /dev/null
@@ -1,468 +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.internal.repository.comparator;
-
-import java.util.Arrays;
-
-public class ClassFileReader extends ClassFileStruct {
- /*
- * This value should be used to read completely each part of a .class file.
- */
- public static final int ALL = 0xFFFF;
-
- /*
- * This value should be used to read only the constant pool entries of a .class file.
- */
- public static final int CONSTANT_POOL = 0x0001;
-
- /*
- * This value should be used to read the constant pool entries and
- * the method infos of a .class file.
- */
- public static final int METHOD_INFOS = 0x0002 + CONSTANT_POOL;
-
- /*
- * This value should be used to read the constant pool entries and
- * the field infos of a .class file.
- */
- public static final int FIELD_INFOS = 0x0004 + CONSTANT_POOL;
-
- /*
- * This value should be used to read the constant pool entries and
- * the super interface names of a .class file.
- */
- public static final int SUPER_INTERFACES = 0x0008 + CONSTANT_POOL;
-
- /*
- * This value should be used to read the constant pool entries and
- * the attributes of a .class file.
- */
- public static final int CLASSFILE_ATTRIBUTES = 0x0010 + CONSTANT_POOL;
-
- /*
- * This value should be used to read the method bodies.
- * It has to be used with METHOD_INFOS.
- */
- public static final int METHOD_BODIES = 0x0020;
-
- /*
- * This value should be used to read the whole contents of the .class file except the
- * method bodies.
- */
- public static final int ALL_BUT_METHOD_BODIES = ALL & ~METHOD_BODIES;
-
- private static final FieldInfo[] NO_FIELD_INFOS = new FieldInfo[0];
- private static final char[][] NO_INTERFACES_NAMES = CharOperation.NO_CHAR_CHAR;
- private static final MethodInfo[] NO_METHOD_INFOS = new MethodInfo[0];
- private int accessFlags;
- private ClassFileAttribute[] attributes;
- private int attributesCount;
- private char[] className;
- private int classNameIndex;
-
- private ConstantPool constantPool;
- private FieldInfo[] fields;
- private int fieldsCount;
- private InnerClassesAttribute innerClassesAttribute;
- private int[] interfaceIndexes;
- private char[][] interfaceNames;
- private int interfacesCount;
- private int magicNumber;
- private int majorVersion;
- private MethodInfo[] methods;
- private int methodsCount;
- private int minorVersion;
- private SourceFileAttribute sourceFileAttribute;
- private char[] superclassName;
- private int superclassNameIndex;
-
- /*
- * Constructor for ClassFileReader.
- *
- * @param classFileBytes the raw bytes of the .class file
- * @param decodingFlags the decoding flags
- *
- * @see IClassFileReader#ALL
- * @see IClassFileReader#CLASSFILE_ATTRIBUTES
- * @see IClassFileReader#CONSTANT_POOL
- * @see IClassFileReader#FIELD_INFOS
- */
- public ClassFileReader(byte[] classFileBytes, int decodingFlags) throws ClassFormatException {
-
- // This method looks ugly but is actually quite simple, the constantPool is constructed
- // in 3 passes. All non-primitive constant pool members that usually refer to other members
- // by index are tweaked to have their value in inst vars, this minor cost at read-time makes
- // all subsequent uses of the constant pool element faster.
- int constantPoolCount;
- int[] constantPoolOffsets;
- try {
- this.magicNumber = (int) u4At(classFileBytes, 0, 0);
- if (this.magicNumber != 0xCAFEBABE) {
- throw new ClassFormatException(ClassFormatException.INVALID_MAGIC_NUMBER);
- }
-
- int readOffset = 10;
- this.minorVersion = u2At(classFileBytes, 4, 0);
- this.majorVersion = u2At(classFileBytes, 6, 0);
-
- if ((decodingFlags & CONSTANT_POOL) == 0) {
- // no need to go further
- return;
- }
-
- constantPoolCount = u2At(classFileBytes, 8, 0);
- // Pass #1 - Fill in all primitive constants
- constantPoolOffsets = new int[constantPoolCount];
- for (int i = 1; i < constantPoolCount; i++) {
- int tag = u1At(classFileBytes, readOffset, 0);
- switch (tag) {
- case ConstantPoolConstant.CONSTANT_Utf8 :
- constantPoolOffsets[i] = readOffset;
- readOffset += u2At(classFileBytes, readOffset + 1, 0);
- readOffset += ConstantPoolConstant.CONSTANT_Utf8_SIZE;
- break;
- case ConstantPoolConstant.CONSTANT_Integer :
- constantPoolOffsets[i] = readOffset;
- readOffset += ConstantPoolConstant.CONSTANT_Integer_SIZE;
- break;
- case ConstantPoolConstant.CONSTANT_Float :
- constantPoolOffsets[i] = readOffset;
- readOffset += ConstantPoolConstant.CONSTANT_Float_SIZE;
- break;
- case ConstantPoolConstant.CONSTANT_Long :
- constantPoolOffsets[i] = readOffset;
- readOffset += ConstantPoolConstant.CONSTANT_Long_SIZE;
- i++;
- break;
- case ConstantPoolConstant.CONSTANT_Double :
- constantPoolOffsets[i] = readOffset;
- readOffset += ConstantPoolConstant.CONSTANT_Double_SIZE;
- i++;
- break;
- case ConstantPoolConstant.CONSTANT_Class :
- constantPoolOffsets[i] = readOffset;
- readOffset += ConstantPoolConstant.CONSTANT_Class_SIZE;
- break;
- case ConstantPoolConstant.CONSTANT_String :
- constantPoolOffsets[i] = readOffset;
- readOffset += ConstantPoolConstant.CONSTANT_String_SIZE;
- break;
- case ConstantPoolConstant.CONSTANT_Fieldref :
- constantPoolOffsets[i] = readOffset;
- readOffset += ConstantPoolConstant.CONSTANT_Fieldref_SIZE;
- break;
- case ConstantPoolConstant.CONSTANT_Methodref :
- constantPoolOffsets[i] = readOffset;
- readOffset += ConstantPoolConstant.CONSTANT_Methodref_SIZE;
- break;
- case ConstantPoolConstant.CONSTANT_InterfaceMethodref :
- constantPoolOffsets[i] = readOffset;
- readOffset += ConstantPoolConstant.CONSTANT_InterfaceMethodref_SIZE;
- break;
- case ConstantPoolConstant.CONSTANT_NameAndType :
- constantPoolOffsets[i] = readOffset;
- readOffset += ConstantPoolConstant.CONSTANT_NameAndType_SIZE;
- break;
- default :
- throw new ClassFormatException(ClassFormatException.INVALID_TAG_CONSTANT);
- }
- }
-
- this.constantPool = new ConstantPool(classFileBytes, constantPoolOffsets);
- // Read and validate access flags
- this.accessFlags = u2At(classFileBytes, readOffset, 0);
- readOffset += 2;
-
- // Read the classname, use exception handlers to catch bad format
- this.classNameIndex = u2At(classFileBytes, readOffset, 0);
- this.className = getConstantClassNameAt(classFileBytes, constantPoolOffsets, this.classNameIndex);
- readOffset += 2;
-
- // Read the superclass name, can be zero for java.lang.Object
- this.superclassNameIndex = u2At(classFileBytes, readOffset, 0);
- readOffset += 2;
- // if superclassNameIndex is equals to 0 there is no need to set a value for the
- // field this.superclassName. null is fine.
- if (this.superclassNameIndex != 0) {
- this.superclassName = getConstantClassNameAt(classFileBytes, constantPoolOffsets, this.superclassNameIndex);
- }
-
- // Read the interfaces, use exception handlers to catch bad format
- this.interfacesCount = u2At(classFileBytes, readOffset, 0);
- readOffset += 2;
- this.interfaceNames = NO_INTERFACES_NAMES;
- this.interfaceIndexes = Utility.EMPTY_INT_ARRAY;
- if (this.interfacesCount != 0) {
- if ((decodingFlags & SUPER_INTERFACES) != CONSTANT_POOL) {
- this.interfaceNames = new char[this.interfacesCount][];
- this.interfaceIndexes = new int[this.interfacesCount];
- for (int i = 0; i < this.interfacesCount; i++) {
- this.interfaceIndexes[i] = u2At(classFileBytes, readOffset, 0);
- this.interfaceNames[i] = getConstantClassNameAt(classFileBytes, constantPoolOffsets, this.interfaceIndexes[i]);
- readOffset += 2;
- }
- } else {
- readOffset += (2 * this.interfacesCount);
- }
- }
- // Read the this.fields, use exception handlers to catch bad format
- this.fieldsCount = u2At(classFileBytes, readOffset, 0);
- readOffset += 2;
- this.fields = NO_FIELD_INFOS;
- if (this.fieldsCount != 0) {
- if ((decodingFlags & FIELD_INFOS) != CONSTANT_POOL) {
- FieldInfo field;
- this.fields = new FieldInfo[this.fieldsCount];
- for (int i = 0; i < this.fieldsCount; i++) {
- field = new FieldInfo(classFileBytes, this.constantPool, readOffset);
- this.fields[i] = field;
- readOffset += field.sizeInBytes();
- }
- } else {
- for (int i = 0; i < this.fieldsCount; i++) {
- int attributeCountForField = u2At(classFileBytes, 6, readOffset);
- readOffset += 8;
- if (attributeCountForField != 0) {
- for (int j = 0; j < attributeCountForField; j++) {
- int attributeLength = (int) u4At(classFileBytes, 2, readOffset);
- readOffset += (6 + attributeLength);
- }
- }
- }
- }
- }
- // Read the this.methods
- this.methodsCount = u2At(classFileBytes, readOffset, 0);
- readOffset += 2;
- this.methods = NO_METHOD_INFOS;
- if (this.methodsCount != 0) {
- if ((decodingFlags & METHOD_INFOS) != CONSTANT_POOL) {
- this.methods = new MethodInfo[this.methodsCount];
- MethodInfo method;
- for (int i = 0; i < this.methodsCount; i++) {
- method = new MethodInfo(classFileBytes, this.constantPool, readOffset, decodingFlags);
- this.methods[i] = method;
- readOffset += method.sizeInBytes();
- }
- } else {
- for (int i = 0; i < this.methodsCount; i++) {
- int attributeCountForMethod = u2At(classFileBytes, 6, readOffset);
- readOffset += 8;
- if (attributeCountForMethod != 0) {
- for (int j = 0; j < attributeCountForMethod; j++) {
- int attributeLength = (int) u4At(classFileBytes, 2, readOffset);
- readOffset += (6 + attributeLength);
- }
- }
- }
- }
- }
-
- // Read the attributes
- this.attributesCount = u2At(classFileBytes, readOffset, 0);
- readOffset += 2;
-
- int attributesIndex = 0;
- this.attributes = ClassFileAttribute.NO_ATTRIBUTES;
- if (this.attributesCount != 0) {
- if ((decodingFlags & CLASSFILE_ATTRIBUTES) != CONSTANT_POOL) {
- this.attributes = new ClassFileAttribute[this.attributesCount];
- for (int i = 0; i < this.attributesCount; i++) {
- int utf8Offset = constantPoolOffsets[u2At(classFileBytes, readOffset, 0)];
- char[] attributeName = utf8At(classFileBytes, utf8Offset + 3, 0, u2At(classFileBytes, utf8Offset + 1, 0));
- if (Arrays.equals(attributeName, AttributeNamesConstants.INNER_CLASSES)) {
- this.innerClassesAttribute = new InnerClassesAttribute(classFileBytes, this.constantPool, readOffset);
- this.attributes[attributesIndex++] = this.innerClassesAttribute;
- } else if (Arrays.equals(attributeName, AttributeNamesConstants.SOURCE)) {
- this.sourceFileAttribute = new SourceFileAttribute(classFileBytes, this.constantPool, readOffset);
- this.attributes[attributesIndex++] = this.sourceFileAttribute;
- } else if (Arrays.equals(attributeName, AttributeNamesConstants.ENCLOSING_METHOD)) {
- this.attributes[attributesIndex++] = new EnclosingMethodAttribute(classFileBytes, this.constantPool, readOffset);
- } else if (Arrays.equals(attributeName, AttributeNamesConstants.SIGNATURE)) {
- this.attributes[attributesIndex++] = new SignatureAttribute(classFileBytes, this.constantPool, readOffset);
- } else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS)) {
- this.attributes[attributesIndex++] = new RuntimeVisibleAnnotationsAttribute(classFileBytes, this.constantPool, readOffset);
- } else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS)) {
- this.attributes[attributesIndex++] = new RuntimeInvisibleAnnotationsAttribute(classFileBytes, this.constantPool, readOffset);
- } else {
- this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, this.constantPool, readOffset);
- }
- readOffset += (6 + u4At(classFileBytes, readOffset + 2, 0));
- }
- } else {
- for (int i = 0; i < this.attributesCount; i++) {
- readOffset += (6 + u4At(classFileBytes, readOffset + 2, 0));
- }
- }
- }
- if (readOffset != classFileBytes.length) {
- throw new ClassFormatException(ClassFormatException.TOO_MANY_BYTES);
- }
- } catch (ClassFormatException e) {
- throw e;
- } catch (Exception e) {
- e.printStackTrace();
- throw new ClassFormatException(ClassFormatException.ERROR_TRUNCATED_INPUT);
- }
- }
-
- /*
- * @see IClassFileReader#getAccessFlags()
- */
- public int getAccessFlags() {
- return this.accessFlags;
- }
-
- /*
- * @see IClassFileReader#getAttributeCount()
- */
- public int getAttributeCount() {
- return this.attributesCount;
- }
-
- /*
- * @see IClassFileReader#getAttributes()
- */
- public ClassFileAttribute[] getAttributes() {
- return this.attributes;
- }
-
- /*
- * @see IClassFileReader#getClassIndex()
- */
- public int getClassIndex() {
- return this.classNameIndex;
- }
-
- /*
- * @see IClassFileReader#getClassName()
- */
- public char[] getClassName() {
- return this.className;
- }
-
- private char[] getConstantClassNameAt(byte[] classFileBytes, int[] constantPoolOffsets, int constantPoolIndex) {
- int utf8Offset = constantPoolOffsets[u2At(classFileBytes, constantPoolOffsets[constantPoolIndex] + 1, 0)];
- return utf8At(classFileBytes, utf8Offset + 3, 0, u2At(classFileBytes, utf8Offset + 1, 0));
- }
-
- /*
- * @see IClassFileReader#getConstantPool()
- */
- public ConstantPool getConstantPool() {
- return this.constantPool;
- }
-
- /*
- * @see IClassFileReader#getFieldInfos()
- */
- public FieldInfo[] getFieldInfos() {
- return this.fields;
- }
-
- /*
- * @see IClassFileReader#getFieldsCount()
- */
- public int getFieldsCount() {
- return this.fieldsCount;
- }
-
- /*
- * @see IClassFileReader#getInnerClassesAttribute()
- */
- public InnerClassesAttribute getInnerClassesAttribute() {
- return this.innerClassesAttribute;
- }
-
- /*
- * @see IClassFileReader#getInterfaceIndexes()
- */
- public int[] getInterfaceIndexes() {
- return this.interfaceIndexes;
- }
-
- /*
- * @see IClassFileReader#getInterfaceNames()
- */
- public char[][] getInterfaceNames() {
- return this.interfaceNames;
- }
-
- /*
- * @see IClassFileReader#getMagic()
- */
- public int getMagic() {
- return this.magicNumber;
- }
-
- /*
- * @see IClassFileReader#getMajorVersion()
- */
- public int getMajorVersion() {
- return this.majorVersion;
- }
-
- /*
- * @see IClassFileReader#getMethodInfos()
- */
- public MethodInfo[] getMethodInfos() {
- return this.methods;
- }
-
- /*
- * @see IClassFileReader#getMethodsCount()
- */
- public int getMethodsCount() {
- return this.methodsCount;
- }
-
- /*
- * @see IClassFileReader#getMinorVersion()
- */
- public int getMinorVersion() {
- return this.minorVersion;
- }
-
- /*
- * @see IClassFileReader#getSourceFileAttribute()
- */
- public SourceFileAttribute getSourceFileAttribute() {
- return this.sourceFileAttribute;
- }
-
- /*
- * @see IClassFileReader#getSuperclassIndex()
- */
- public int getSuperclassIndex() {
- return this.superclassNameIndex;
- }
-
- /*
- * @see IClassFileReader#getSuperclassName()
- */
- public char[] getSuperclassName() {
- return this.superclassName;
- }
-
- /*
- * @see IClassFileReader#isClass()
- */
- public boolean isClass() {
- return !isInterface();
- }
-
- /*
- * @see IClassFileReader#isInterface()
- */
- public boolean isInterface() {
- return (getAccessFlags() & IModifierConstants.ACC_INTERFACE) != 0;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileStruct.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileStruct.java
deleted file mode 100644
index a8c6038e3..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileStruct.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.internal.repository.comparator;
-
-public abstract class ClassFileStruct {
-
- protected double doubleAt(byte[] reference, int relativeOffset, int structOffset) {
- return (Double.longBitsToDouble(i8At(reference, relativeOffset, structOffset)));
- }
-
- protected float floatAt(byte[] reference, int relativeOffset, int structOffset) {
- return (Float.intBitsToFloat(i4At(reference, relativeOffset, structOffset)));
- }
-
- protected int i1At(byte[] reference, int relativeOffset, int structOffset) {
- return reference[relativeOffset + structOffset];
- }
-
- protected int i2At(byte[] reference, int relativeOffset, int structOffset) {
- int position = relativeOffset + structOffset;
- return (reference[position++] << 8) + (reference[position] & 0xFF);
- }
-
- protected int i4At(byte[] reference, int relativeOffset, int structOffset) {
- int position = relativeOffset + structOffset;
- return ((reference[position++] & 0xFF) << 24) + ((reference[position++] & 0xFF) << 16) + ((reference[position++] & 0xFF) << 8) + (reference[position] & 0xFF);
- }
-
- protected long i8At(byte[] reference, int relativeOffset, int structOffset) {
- int position = relativeOffset + structOffset;
- return (((long) (reference[position++] & 0xFF)) << 56) + (((long) (reference[position++] & 0xFF)) << 48) + (((long) (reference[position++] & 0xFF)) << 40) + (((long) (reference[position++] & 0xFF)) << 32) + (((long) (reference[position++] & 0xFF)) << 24) + (((long) (reference[position++] & 0xFF)) << 16) + (((long) (reference[position++] & 0xFF)) << 8) + (reference[position++] & 0xFF);
- }
-
- protected int u1At(byte[] reference, int relativeOffset, int structOffset) {
- return (reference[relativeOffset + structOffset] & 0xFF);
- }
-
- protected int u2At(byte[] reference, int relativeOffset, int structOffset) {
- int position = relativeOffset + structOffset;
- return ((reference[position++] & 0xFF) << 8) + (reference[position] & 0xFF);
- }
-
- protected long u4At(byte[] reference, int relativeOffset, int structOffset) {
- int position = relativeOffset + structOffset;
- return (((reference[position++] & 0xFFL) << 24) + ((reference[position++] & 0xFF) << 16) + ((reference[position++] & 0xFF) << 8) + (reference[position] & 0xFF));
- }
-
- protected char[] utf8At(byte[] reference, int relativeOffset, int structOffset, int bytesAvailable) {
- int length = bytesAvailable;
- char outputBuf[] = new char[bytesAvailable];
- int outputPos = 0;
- int readOffset = structOffset + relativeOffset;
-
- while (length != 0) {
- int x = reference[readOffset++] & 0xFF;
- length--;
- if ((0x80 & x) != 0) {
- if ((x & 0x20) != 0) {
- length -= 2;
- x = ((x & 0xF) << 12) + ((reference[readOffset++] & 0x3F) << 6) + (reference[readOffset++] & 0x3F);
- } else {
- length--;
- x = ((x & 0x1F) << 6) + (reference[readOffset++] & 0x3F);
- }
- }
- outputBuf[outputPos++] = (char) x;
- }
-
- if (outputPos != bytesAvailable) {
- System.arraycopy(outputBuf, 0, (outputBuf = new char[outputPos]), 0, outputPos);
- }
- return outputBuf;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFormatException.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFormatException.java
deleted file mode 100644
index acff39c2c..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFormatException.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.p2.internal.repository.comparator;
-
-public class ClassFormatException extends Exception {
-
- public static final int ERROR_MALFORMED_UTF8 = 1;
- public static final int ERROR_TRUNCATED_INPUT = 2;
- public static final int INVALID_CONSTANT_POOL_ENTRY = 3;
- public static final int TOO_MANY_BYTES = 4;
- public static final int INVALID_ARGUMENTS_FOR_INVOKEINTERFACE = 5;
- public static final int INVALID_BYTECODE = 6;
-
- /**
- * @since 3.0
- */
- public static final int INVALID_TAG_CONSTANT = 7;
-
- /**
- * @since 3.0
- */
- public static final int INVALID_MAGIC_NUMBER = 8;
-
- private static final long serialVersionUID = 6582900558320612988L; // backward compatible
-
- /**
- * Constructor for ClassFormatException.
- * @param errorID the given error ID
- */
- public ClassFormatException(int errorID) {
- // TODO (olivier) what is the errorID?
- }
-
- /**
- * Constructor for ClassFormatException.
- * @param message the message for the exception
- */
- public ClassFormatException(String message) {
- super(message);
- }
-
- /**
- * Constructor for ClassFormatException.
- * @param message the message for the exception
- * @param cause the cause of the exception
- * @since 3.5
- */
- public ClassFormatException(String message, Throwable cause) {
- super(message, cause);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/CodeAttribute.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/CodeAttribute.java
deleted file mode 100644
index 97884685a..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/CodeAttribute.java
+++ /dev/null
@@ -1,1114 +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.internal.repository.comparator;
-
-public class CodeAttribute extends ClassFileAttribute {
- private static final ExceptionTableEntry[] NO_EXCEPTION_TABLE = new ExceptionTableEntry[0];
- private ClassFileAttribute[] attributes;
- private int attributesCount;
- private byte[] bytecodes;
- private byte[] classFileBytes;
- private long codeLength;
- private int codeOffset;
- private ConstantPool constantPool;
- private ExceptionTableEntry[] exceptionTableEntries;
- private int exceptionTableLength;
- private int maxLocals;
- private int maxStack;
-
- CodeAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
- super(classFileBytes, constantPool, offset);
- this.classFileBytes = classFileBytes;
- this.constantPool = constantPool;
- this.maxStack = u2At(classFileBytes, 6, offset);
- this.maxLocals = u2At(classFileBytes, 8, offset);
- this.codeLength = u4At(classFileBytes, 10, offset);
- this.codeOffset = offset + 14;
- int readOffset = (int) (14 + this.codeLength);
- this.exceptionTableLength = u2At(classFileBytes, readOffset, offset);
- readOffset += 2;
- this.exceptionTableEntries = NO_EXCEPTION_TABLE;
- if (this.exceptionTableLength != 0) {
- this.exceptionTableEntries = new ExceptionTableEntry[this.exceptionTableLength];
- for (int i = 0; i < this.exceptionTableLength; i++) {
- this.exceptionTableEntries[i] = new ExceptionTableEntry(classFileBytes, constantPool, offset + readOffset);
- readOffset += 8;
- }
- }
- this.attributesCount = u2At(classFileBytes, readOffset, offset);
- this.attributes = ClassFileAttribute.NO_ATTRIBUTES;
- if (this.attributesCount != 0) {
- this.attributes = new ClassFileAttribute[this.attributesCount];
- }
- readOffset += 2;
- for (int i = 0; i < this.attributesCount; i++) {
- ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(u2At(classFileBytes, readOffset, offset));
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- readOffset += (6 + u4At(classFileBytes, readOffset + 2, offset));
- }
- }
-
- /*
- * @see ICodeAttribute#getAttributes()
- */
- public ClassFileAttribute[] getAttributes() {
- return this.attributes;
- }
-
- /*
- * @see ICodeAttribute#getAttributesCount()
- */
- public int getAttributesCount() {
- return this.attributesCount;
- }
-
- /*
- * @see ICodeAttribute#getBytecodes()
- */
- public byte[] getBytecodes() {
- if (this.bytecodes == null) {
- System.arraycopy(this.classFileBytes, this.codeOffset, (this.bytecodes = new byte[(int) this.codeLength]), 0, (int) this.codeLength);
- }
- return this.bytecodes;
- }
-
- /*
- * @see ICodeAttribute#getCodeLength()
- */
- public long getCodeLength() {
- return this.codeLength;
- }
-
- /*
- * @see ICodeAttribute#getExceptionTable()
- */
- public ExceptionTableEntry[] getExceptionTable() {
- return this.exceptionTableEntries;
- }
-
- /*
- * @see ICodeAttribute#getExceptionTableLength()
- */
- public int getExceptionTableLength() {
- return this.exceptionTableLength;
- }
-
- /*
- * @see ICodeAttribute#getMaxLocals()
- */
- public int getMaxLocals() {
- return this.maxLocals;
- }
-
- /*
- * @see ICodeAttribute#getMaxStack()
- */
- public int getMaxStack() {
- return this.maxStack;
- }
-
- /*
- * @see ICodeAttribute#traverse(IBytecodeVisitor visitor)
- */
- public void traverse(DefaultBytecodeVisitor visitor) throws ClassFormatException {
- int pc = this.codeOffset;
- int opcode, index, _const, branchOffset;
- ConstantPoolEntry constantPoolEntry;
- while (true) {
- opcode = u1At(this.classFileBytes, 0, pc);
- switch (opcode) {
- case IOpcodeMnemonics.NOP :
- visitor._nop(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ACONST_NULL :
- visitor._aconst_null(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ICONST_M1 :
- visitor._iconst_m1(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ICONST_0 :
- visitor._iconst_0(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ICONST_1 :
- visitor._iconst_1(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ICONST_2 :
- visitor._iconst_2(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ICONST_3 :
- visitor._iconst_3(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ICONST_4 :
- visitor._iconst_4(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ICONST_5 :
- visitor._iconst_5(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LCONST_0 :
- visitor._lconst_0(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LCONST_1 :
- visitor._lconst_1(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FCONST_0 :
- visitor._fconst_0(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FCONST_1 :
- visitor._fconst_1(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FCONST_2 :
- visitor._fconst_2(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DCONST_0 :
- visitor._dconst_0(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DCONST_1 :
- visitor._dconst_1(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.BIPUSH :
- visitor._bipush(pc - this.codeOffset, (byte) i1At(this.classFileBytes, 1, pc));
- pc += 2;
- break;
- case IOpcodeMnemonics.SIPUSH :
- visitor._sipush(pc - this.codeOffset, (short) i2At(this.classFileBytes, 1, pc));
- pc += 3;
- break;
- case IOpcodeMnemonics.LDC :
- index = u1At(this.classFileBytes, 1, pc);
- constantPoolEntry = this.constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Float && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Integer && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_String && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- visitor._ldc(pc - this.codeOffset, index, constantPoolEntry);
- pc += 2;
- break;
- case IOpcodeMnemonics.LDC_W :
- index = u2At(this.classFileBytes, 1, pc);
- constantPoolEntry = this.constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Float && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Integer && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_String && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- visitor._ldc_w(pc - this.codeOffset, index, constantPoolEntry);
- pc += 3;
- break;
- case IOpcodeMnemonics.LDC2_W :
- index = u2At(this.classFileBytes, 1, pc);
- constantPoolEntry = this.constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Double && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Long) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- visitor._ldc2_w(pc - this.codeOffset, index, constantPoolEntry);
- pc += 3;
- break;
- case IOpcodeMnemonics.ILOAD :
- index = u1At(this.classFileBytes, 1, pc);
- visitor._iload(pc - this.codeOffset, index);
- pc += 2;
- break;
- case IOpcodeMnemonics.LLOAD :
- index = u1At(this.classFileBytes, 1, pc);
- visitor._lload(pc - this.codeOffset, index);
- pc += 2;
- break;
- case IOpcodeMnemonics.FLOAD :
- index = u1At(this.classFileBytes, 1, pc);
- visitor._fload(pc - this.codeOffset, index);
- pc += 2;
- break;
- case IOpcodeMnemonics.DLOAD :
- index = u1At(this.classFileBytes, 1, pc);
- visitor._dload(pc - this.codeOffset, index);
- pc += 2;
- break;
- case IOpcodeMnemonics.ALOAD :
- index = u1At(this.classFileBytes, 1, pc);
- visitor._aload(pc - this.codeOffset, index);
- pc += 2;
- break;
- case IOpcodeMnemonics.ILOAD_0 :
- visitor._iload_0(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ILOAD_1 :
- visitor._iload_1(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ILOAD_2 :
- visitor._iload_2(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ILOAD_3 :
- visitor._iload_3(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LLOAD_0 :
- visitor._lload_0(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LLOAD_1 :
- visitor._lload_1(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LLOAD_2 :
- visitor._lload_2(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LLOAD_3 :
- visitor._lload_3(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FLOAD_0 :
- visitor._fload_0(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FLOAD_1 :
- visitor._fload_1(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FLOAD_2 :
- visitor._fload_2(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FLOAD_3 :
- visitor._fload_3(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DLOAD_0 :
- visitor._dload_0(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DLOAD_1 :
- visitor._dload_1(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DLOAD_2 :
- visitor._dload_2(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DLOAD_3 :
- visitor._dload_3(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ALOAD_0 :
- visitor._aload_0(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ALOAD_1 :
- visitor._aload_1(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ALOAD_2 :
- visitor._aload_2(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ALOAD_3 :
- visitor._aload_3(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.IALOAD :
- visitor._iaload(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LALOAD :
- visitor._laload(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FALOAD :
- visitor._faload(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DALOAD :
- visitor._daload(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.AALOAD :
- visitor._aaload(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.BALOAD :
- visitor._baload(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.CALOAD :
- visitor._caload(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.SALOAD :
- visitor._saload(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ISTORE :
- index = u1At(this.classFileBytes, 1, pc);
- visitor._istore(pc - this.codeOffset, index);
- pc += 2;
- break;
- case IOpcodeMnemonics.LSTORE :
- index = u1At(this.classFileBytes, 1, pc);
- visitor._lstore(pc - this.codeOffset, index);
- pc += 2;
- break;
- case IOpcodeMnemonics.FSTORE :
- index = u1At(this.classFileBytes, 1, pc);
- visitor._fstore(pc - this.codeOffset, index);
- pc += 2;
- break;
- case IOpcodeMnemonics.DSTORE :
- index = u1At(this.classFileBytes, 1, pc);
- visitor._dstore(pc - this.codeOffset, index);
- pc += 2;
- break;
- case IOpcodeMnemonics.ASTORE :
- index = u1At(this.classFileBytes, 1, pc);
- visitor._astore(pc - this.codeOffset, index);
- pc += 2;
- break;
- case IOpcodeMnemonics.ISTORE_0 :
- visitor._istore_0(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ISTORE_1 :
- visitor._istore_1(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ISTORE_2 :
- visitor._istore_2(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ISTORE_3 :
- visitor._istore_3(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LSTORE_0 :
- visitor._lstore_0(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LSTORE_1 :
- visitor._lstore_1(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LSTORE_2 :
- visitor._lstore_2(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LSTORE_3 :
- visitor._lstore_3(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FSTORE_0 :
- visitor._fstore_0(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FSTORE_1 :
- visitor._fstore_1(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FSTORE_2 :
- visitor._fstore_2(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FSTORE_3 :
- visitor._fstore_3(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DSTORE_0 :
- visitor._dstore_0(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DSTORE_1 :
- visitor._dstore_1(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DSTORE_2 :
- visitor._dstore_2(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DSTORE_3 :
- visitor._dstore_3(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ASTORE_0 :
- visitor._astore_0(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ASTORE_1 :
- visitor._astore_1(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ASTORE_2 :
- visitor._astore_2(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ASTORE_3 :
- visitor._astore_3(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.IASTORE :
- visitor._iastore(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LASTORE :
- visitor._lastore(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FASTORE :
- visitor._fastore(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DASTORE :
- visitor._dastore(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.AASTORE :
- visitor._aastore(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.BASTORE :
- visitor._bastore(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.CASTORE :
- visitor._castore(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.SASTORE :
- visitor._sastore(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.POP :
- visitor._pop(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.POP2 :
- visitor._pop2(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DUP :
- visitor._dup(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DUP_X1 :
- visitor._dup_x1(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DUP_X2 :
- visitor._dup_x2(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DUP2 :
- visitor._dup2(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DUP2_X1 :
- visitor._dup2_x1(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DUP2_X2 :
- visitor._dup2_x2(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.SWAP :
- visitor._swap(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.IADD :
- visitor._iadd(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LADD :
- visitor._ladd(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FADD :
- visitor._fadd(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DADD :
- visitor._dadd(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ISUB :
- visitor._isub(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LSUB :
- visitor._lsub(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FSUB :
- visitor._fsub(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DSUB :
- visitor._dsub(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.IMUL :
- visitor._imul(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LMUL :
- visitor._lmul(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FMUL :
- visitor._fmul(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DMUL :
- visitor._dmul(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.IDIV :
- visitor._idiv(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LDIV :
- visitor._ldiv(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FDIV :
- visitor._fdiv(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DDIV :
- visitor._ddiv(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.IREM :
- visitor._irem(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LREM :
- visitor._lrem(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FREM :
- visitor._frem(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DREM :
- visitor._drem(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.INEG :
- visitor._ineg(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LNEG :
- visitor._lneg(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FNEG :
- visitor._fneg(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DNEG :
- visitor._dneg(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ISHL :
- visitor._ishl(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LSHL :
- visitor._lshl(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ISHR :
- visitor._ishr(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LSHR :
- visitor._lshr(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.IUSHR :
- visitor._iushr(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LUSHR :
- visitor._lushr(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.IAND :
- visitor._iand(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LAND :
- visitor._land(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.IOR :
- visitor._ior(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LOR :
- visitor._lor(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.IXOR :
- visitor._ixor(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LXOR :
- visitor._lxor(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.IINC :
- index = u1At(this.classFileBytes, 1, pc);
- _const = i1At(this.classFileBytes, 2, pc);
- visitor._iinc(pc - this.codeOffset, index, _const);
- pc += 3;
- break;
- case IOpcodeMnemonics.I2L :
- visitor._i2l(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.I2F :
- visitor._i2f(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.I2D :
- visitor._i2d(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.L2I :
- visitor._l2i(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.L2F :
- visitor._l2f(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.L2D :
- visitor._l2d(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.F2I :
- visitor._f2i(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.F2L :
- visitor._f2l(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.F2D :
- visitor._f2d(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.D2I :
- visitor._d2i(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.D2L :
- visitor._d2l(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.D2F :
- visitor._d2f(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.I2B :
- visitor._i2b(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.I2C :
- visitor._i2c(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.I2S :
- visitor._i2s(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LCMP :
- visitor._lcmp(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FCMPL :
- visitor._fcmpl(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FCMPG :
- visitor._fcmpg(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DCMPL :
- visitor._dcmpl(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DCMPG :
- visitor._dcmpg(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.IFEQ :
- branchOffset = i2At(this.classFileBytes, 1, pc);
- visitor._ifeq(pc - this.codeOffset, branchOffset);
- pc += 3;
- break;
- case IOpcodeMnemonics.IFNE :
- branchOffset = i2At(this.classFileBytes, 1, pc);
- visitor._ifne(pc - this.codeOffset, branchOffset);
- pc += 3;
- break;
- case IOpcodeMnemonics.IFLT :
- branchOffset = i2At(this.classFileBytes, 1, pc);
- visitor._iflt(pc - this.codeOffset, branchOffset);
- pc += 3;
- break;
- case IOpcodeMnemonics.IFGE :
- branchOffset = i2At(this.classFileBytes, 1, pc);
- visitor._ifge(pc - this.codeOffset, branchOffset);
- pc += 3;
- break;
- case IOpcodeMnemonics.IFGT :
- branchOffset = i2At(this.classFileBytes, 1, pc);
- visitor._ifgt(pc - this.codeOffset, branchOffset);
- pc += 3;
- break;
- case IOpcodeMnemonics.IFLE :
- branchOffset = i2At(this.classFileBytes, 1, pc);
- visitor._ifle(pc - this.codeOffset, branchOffset);
- pc += 3;
- break;
- case IOpcodeMnemonics.IF_ICMPEQ :
- branchOffset = i2At(this.classFileBytes, 1, pc);
- visitor._if_icmpeq(pc - this.codeOffset, branchOffset);
- pc += 3;
- break;
- case IOpcodeMnemonics.IF_ICMPNE :
- branchOffset = i2At(this.classFileBytes, 1, pc);
- visitor._if_icmpne(pc - this.codeOffset, branchOffset);
- pc += 3;
- break;
- case IOpcodeMnemonics.IF_ICMPLT :
- branchOffset = i2At(this.classFileBytes, 1, pc);
- visitor._if_icmplt(pc - this.codeOffset, branchOffset);
- pc += 3;
- break;
- case IOpcodeMnemonics.IF_ICMPGE :
- branchOffset = i2At(this.classFileBytes, 1, pc);
- visitor._if_icmpge(pc - this.codeOffset, branchOffset);
- pc += 3;
- break;
- case IOpcodeMnemonics.IF_ICMPGT :
- branchOffset = i2At(this.classFileBytes, 1, pc);
- visitor._if_icmpgt(pc - this.codeOffset, branchOffset);
- pc += 3;
- break;
- case IOpcodeMnemonics.IF_ICMPLE :
- branchOffset = i2At(this.classFileBytes, 1, pc);
- visitor._if_icmple(pc - this.codeOffset, branchOffset);
- pc += 3;
- break;
- case IOpcodeMnemonics.IF_ACMPEQ :
- branchOffset = i2At(this.classFileBytes, 1, pc);
- visitor._if_acmpeq(pc - this.codeOffset, branchOffset);
- pc += 3;
- break;
- case IOpcodeMnemonics.IF_ACMPNE :
- branchOffset = i2At(this.classFileBytes, 1, pc);
- visitor._if_acmpne(pc - this.codeOffset, branchOffset);
- pc += 3;
- break;
- case IOpcodeMnemonics.GOTO :
- branchOffset = i2At(this.classFileBytes, 1, pc);
- visitor._goto(pc - this.codeOffset, branchOffset);
- pc += 3;
- break;
- case IOpcodeMnemonics.JSR :
- branchOffset = i2At(this.classFileBytes, 1, pc);
- visitor._jsr(pc - this.codeOffset, branchOffset);
- pc += 3;
- break;
- case IOpcodeMnemonics.RET :
- index = u1At(this.classFileBytes, 1, pc);
- visitor._ret(pc - this.codeOffset, index);
- pc += 2;
- break;
- case IOpcodeMnemonics.TABLESWITCH :
- int startpc = pc;
- pc++;
- while (((pc - this.codeOffset) & 0x03) != 0) { // faster than % 4
- pc++;
- }
- int defaultOffset = i4At(this.classFileBytes, 0, pc);
- pc += 4;
- int low = i4At(this.classFileBytes, 0, pc);
- pc += 4;
- int high = i4At(this.classFileBytes, 0, pc);
- pc += 4;
- int length = high - low + 1;
- int[] jumpOffsets = new int[length];
- for (int i = 0; i < length; i++) {
- jumpOffsets[i] = i4At(this.classFileBytes, 0, pc);
- pc += 4;
- }
- visitor._tableswitch(startpc - this.codeOffset, defaultOffset, low, high, jumpOffsets);
- break;
- case IOpcodeMnemonics.LOOKUPSWITCH :
- startpc = pc;
- pc++;
- while (((pc - this.codeOffset) & 0x03) != 0) {
- pc++;
- }
- defaultOffset = i4At(this.classFileBytes, 0, pc);
- pc += 4;
- int npairs = (int) u4At(this.classFileBytes, 0, pc);
- int[][] offset_pairs = new int[npairs][2];
- pc += 4;
- for (int i = 0; i < npairs; i++) {
- offset_pairs[i][0] = i4At(this.classFileBytes, 0, pc);
- pc += 4;
- offset_pairs[i][1] = i4At(this.classFileBytes, 0, pc);
- pc += 4;
- }
- visitor._lookupswitch(startpc - this.codeOffset, defaultOffset, npairs, offset_pairs);
- break;
- case IOpcodeMnemonics.IRETURN :
- visitor._ireturn(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.LRETURN :
- visitor._lreturn(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.FRETURN :
- visitor._freturn(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.DRETURN :
- visitor._dreturn(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ARETURN :
- visitor._areturn(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.RETURN :
- visitor._return(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.GETSTATIC :
- index = u2At(this.classFileBytes, 1, pc);
- constantPoolEntry = this.constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Fieldref) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- visitor._getstatic(pc - this.codeOffset, index, constantPoolEntry);
- pc += 3;
- break;
- case IOpcodeMnemonics.PUTSTATIC :
- index = u2At(this.classFileBytes, 1, pc);
- constantPoolEntry = this.constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Fieldref) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- visitor._putstatic(pc - this.codeOffset, index, constantPoolEntry);
- pc += 3;
- break;
- case IOpcodeMnemonics.GETFIELD :
- index = u2At(this.classFileBytes, 1, pc);
- constantPoolEntry = this.constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Fieldref) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- visitor._getfield(pc - this.codeOffset, index, constantPoolEntry);
- pc += 3;
- break;
- case IOpcodeMnemonics.PUTFIELD :
- index = u2At(this.classFileBytes, 1, pc);
- constantPoolEntry = this.constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Fieldref) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- visitor._putfield(pc - this.codeOffset, index, constantPoolEntry);
- pc += 3;
- break;
- case IOpcodeMnemonics.INVOKEVIRTUAL :
- index = u2At(this.classFileBytes, 1, pc);
- constantPoolEntry = this.constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Methodref) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- visitor._invokevirtual(pc - this.codeOffset, index, constantPoolEntry);
- pc += 3;
- break;
- case IOpcodeMnemonics.INVOKESPECIAL :
- index = u2At(this.classFileBytes, 1, pc);
- constantPoolEntry = this.constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Methodref) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- visitor._invokespecial(pc - this.codeOffset, index, constantPoolEntry);
- pc += 3;
- break;
- case IOpcodeMnemonics.INVOKESTATIC :
- index = u2At(this.classFileBytes, 1, pc);
- constantPoolEntry = this.constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Methodref) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- visitor._invokestatic(pc - this.codeOffset, index, constantPoolEntry);
- pc += 3;
- break;
- case IOpcodeMnemonics.INVOKEINTERFACE :
- index = u2At(this.classFileBytes, 1, pc);
- constantPoolEntry = this.constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_InterfaceMethodref) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- byte count = (byte) u1At(this.classFileBytes, 3, pc);
- int extraArgs = u1At(this.classFileBytes, 4, pc);
- if (extraArgs != 0) {
- throw new ClassFormatException(ClassFormatException.INVALID_ARGUMENTS_FOR_INVOKEINTERFACE);
- }
- visitor._invokeinterface(pc - this.codeOffset, index, count, constantPoolEntry);
- pc += 5;
- break;
- case IOpcodeMnemonics.NEW :
- index = u2At(this.classFileBytes, 1, pc);
- constantPoolEntry = this.constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- visitor._new(pc - this.codeOffset, index, constantPoolEntry);
- pc += 3;
- break;
- case IOpcodeMnemonics.NEWARRAY :
- int atype = u1At(this.classFileBytes, 1, pc);
- visitor._newarray(pc - this.codeOffset, atype);
- pc += 2;
- break;
- case IOpcodeMnemonics.ANEWARRAY :
- index = u2At(this.classFileBytes, 1, pc);
- constantPoolEntry = this.constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- visitor._anewarray(pc - this.codeOffset, index, constantPoolEntry);
- pc += 3;
- break;
- case IOpcodeMnemonics.ARRAYLENGTH :
- visitor._arraylength(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.ATHROW :
- visitor._athrow(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.CHECKCAST :
- index = u2At(this.classFileBytes, 1, pc);
- constantPoolEntry = this.constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- visitor._checkcast(pc - this.codeOffset, index, constantPoolEntry);
- pc += 3;
- break;
- case IOpcodeMnemonics.INSTANCEOF :
- index = u2At(this.classFileBytes, 1, pc);
- constantPoolEntry = this.constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- visitor._instanceof(pc - this.codeOffset, index, constantPoolEntry);
- pc += 3;
- break;
- case IOpcodeMnemonics.MONITORENTER :
- visitor._monitorenter(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.MONITOREXIT :
- visitor._monitorexit(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.WIDE :
- opcode = u1At(this.classFileBytes, 1, pc);
- if (opcode == IOpcodeMnemonics.IINC) {
- index = u2At(this.classFileBytes, 2, pc);
- _const = i2At(this.classFileBytes, 4, pc);
- visitor._wide(pc - this.codeOffset, opcode, index, _const);
- pc += 6;
- } else {
- index = u2At(this.classFileBytes, 2, pc);
- visitor._wide(pc - this.codeOffset, opcode, index);
- pc += 4;
- }
- break;
- case IOpcodeMnemonics.MULTIANEWARRAY :
- index = u2At(this.classFileBytes, 1, pc);
- constantPoolEntry = this.constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- int dimensions = u1At(this.classFileBytes, 3, pc);
- visitor._multianewarray(pc - this.codeOffset, index, dimensions, constantPoolEntry);
- pc += 4;
- break;
- case IOpcodeMnemonics.IFNULL :
- branchOffset = i2At(this.classFileBytes, 1, pc);
- visitor._ifnull(pc - this.codeOffset, branchOffset);
- pc += 3;
- break;
- case IOpcodeMnemonics.IFNONNULL :
- branchOffset = i2At(this.classFileBytes, 1, pc);
- visitor._ifnonnull(pc - this.codeOffset, branchOffset);
- pc += 3;
- break;
- case IOpcodeMnemonics.GOTO_W :
- branchOffset = i4At(this.classFileBytes, 1, pc);
- visitor._goto_w(pc - this.codeOffset, branchOffset);
- pc += 5;
- break;
- case IOpcodeMnemonics.JSR_W :
- branchOffset = i4At(this.classFileBytes, 1, pc);
- visitor._jsr_w(pc - this.codeOffset, branchOffset);
- pc += 5;
- break;
- case IOpcodeMnemonics.BREAKPOINT :
- visitor._breakpoint(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.IMPDEP1 :
- visitor._impdep1(pc - this.codeOffset);
- pc++;
- break;
- case IOpcodeMnemonics.IMPDEP2 :
- visitor._impdep2(pc - this.codeOffset);
- pc++;
- break;
- default :
- throw new ClassFormatException(ClassFormatException.INVALID_BYTECODE);
- }
- if (pc >= (this.codeLength + this.codeOffset)) {
- break;
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPool.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPool.java
deleted file mode 100644
index 380108600..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPool.java
+++ /dev/null
@@ -1,104 +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.internal.repository.comparator;
-
-public class ConstantPool extends ClassFileStruct {
-
- private int constantPoolCount;
- private int[] constantPoolOffset;
- private byte[] classFileBytes;
-
- ConstantPool(byte[] reference, int[] constantPoolOffset) {
- this.constantPoolCount = constantPoolOffset.length;
- this.constantPoolOffset = constantPoolOffset;
- this.classFileBytes = reference;
- }
-
- /*
- * @see IConstantPool#decodeEntry(int)
- */
- public ConstantPoolEntry decodeEntry(int index) {
- ConstantPoolEntry constantPoolEntry = new ConstantPoolEntry();
- constantPoolEntry.reset();
- int kind = getEntryKind(index);
- constantPoolEntry.setKind(kind);
- switch (kind) {
- case ConstantPoolConstant.CONSTANT_Class :
- constantPoolEntry.setClassInfoNameIndex(u2At(this.classFileBytes, 1, this.constantPoolOffset[index]));
- constantPoolEntry.setClassInfoName(getUtf8ValueAt(constantPoolEntry.getClassInfoNameIndex()));
- break;
- case ConstantPoolConstant.CONSTANT_Double :
- constantPoolEntry.setDoubleValue(doubleAt(this.classFileBytes, 1, this.constantPoolOffset[index]));
- break;
- case ConstantPoolConstant.CONSTANT_Fieldref :
- constantPoolEntry.setClassIndex(u2At(this.classFileBytes, 1, this.constantPoolOffset[index]));
- int declaringClassIndex = u2At(this.classFileBytes, 1, this.constantPoolOffset[constantPoolEntry.getClassIndex()]);
- constantPoolEntry.setClassName(getUtf8ValueAt(declaringClassIndex));
- constantPoolEntry.setNameAndTypeIndex(u2At(this.classFileBytes, 3, this.constantPoolOffset[index]));
- int fieldNameIndex = u2At(this.classFileBytes, 1, this.constantPoolOffset[constantPoolEntry.getNameAndTypeIndex()]);
- int fieldDescriptorIndex = u2At(this.classFileBytes, 3, this.constantPoolOffset[constantPoolEntry.getNameAndTypeIndex()]);
- constantPoolEntry.setFieldName(getUtf8ValueAt(fieldNameIndex));
- constantPoolEntry.setFieldDescriptor(getUtf8ValueAt(fieldDescriptorIndex));
- break;
- case ConstantPoolConstant.CONSTANT_Methodref :
- case ConstantPoolConstant.CONSTANT_InterfaceMethodref :
- constantPoolEntry.setClassIndex(u2At(this.classFileBytes, 1, this.constantPoolOffset[index]));
- declaringClassIndex = u2At(this.classFileBytes, 1, this.constantPoolOffset[constantPoolEntry.getClassIndex()]);
- constantPoolEntry.setClassName(getUtf8ValueAt(declaringClassIndex));
- constantPoolEntry.setNameAndTypeIndex(u2At(this.classFileBytes, 3, this.constantPoolOffset[index]));
- int methodNameIndex = u2At(this.classFileBytes, 1, this.constantPoolOffset[constantPoolEntry.getNameAndTypeIndex()]);
- int methodDescriptorIndex = u2At(this.classFileBytes, 3, this.constantPoolOffset[constantPoolEntry.getNameAndTypeIndex()]);
- constantPoolEntry.setMethodName(getUtf8ValueAt(methodNameIndex));
- constantPoolEntry.setMethodDescriptor(getUtf8ValueAt(methodDescriptorIndex));
- break;
- case ConstantPoolConstant.CONSTANT_Float :
- constantPoolEntry.setFloatValue(floatAt(this.classFileBytes, 1, this.constantPoolOffset[index]));
- break;
- case ConstantPoolConstant.CONSTANT_Integer :
- constantPoolEntry.setIntegerValue(i4At(this.classFileBytes, 1, this.constantPoolOffset[index]));
- break;
- case ConstantPoolConstant.CONSTANT_Long :
- constantPoolEntry.setLongValue(i8At(this.classFileBytes, 1, this.constantPoolOffset[index]));
- break;
- case ConstantPoolConstant.CONSTANT_NameAndType :
- constantPoolEntry.setNameAndTypeNameIndex(u2At(this.classFileBytes, 1, this.constantPoolOffset[index]));
- constantPoolEntry.setNameAndTypeDescriptorIndex(u2At(this.classFileBytes, 3, this.constantPoolOffset[index]));
- break;
- case ConstantPoolConstant.CONSTANT_String :
- constantPoolEntry.setStringIndex(u2At(this.classFileBytes, 1, this.constantPoolOffset[index]));
- constantPoolEntry.setStringValue(getUtf8ValueAt(constantPoolEntry.getStringIndex()));
- break;
- case ConstantPoolConstant.CONSTANT_Utf8 :
- constantPoolEntry.setUtf8Length(u2At(this.classFileBytes, 1, this.constantPoolOffset[index]));
- constantPoolEntry.setUtf8Value(getUtf8ValueAt(index));
- }
- return constantPoolEntry;
- }
-
- /*
- * @see IConstantPool#getConstantPoolCount()
- */
- public int getConstantPoolCount() {
- return this.constantPoolCount;
- }
-
- /*
- * @see IConstantPool#getEntryKind(int)
- */
- public int getEntryKind(int index) {
- return u1At(this.classFileBytes, 0, this.constantPoolOffset[index]);
- }
-
- private char[] getUtf8ValueAt(int utf8Index) {
- int utf8Offset = this.constantPoolOffset[utf8Index];
- return utf8At(this.classFileBytes, 0, utf8Offset + 3, u2At(this.classFileBytes, 0, utf8Offset + 1));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPoolConstant.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPoolConstant.java
deleted file mode 100644
index 7cebf66e1..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPoolConstant.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.internal.repository.comparator;
-
-public interface ConstantPoolConstant {
-
- int CONSTANT_Class = 7;
- int CONSTANT_Fieldref = 9;
- int CONSTANT_Methodref = 10;
- int CONSTANT_InterfaceMethodref = 11;
- int CONSTANT_String = 8;
- int CONSTANT_Integer = 3;
- int CONSTANT_Float = 4;
- int CONSTANT_Long = 5;
- int CONSTANT_Double = 6;
- int CONSTANT_NameAndType = 12;
- int CONSTANT_Utf8 = 1;
-
- int CONSTANT_Methodref_SIZE = 5;
- int CONSTANT_Class_SIZE = 3;
- int CONSTANT_Double_SIZE = 9;
- int CONSTANT_Fieldref_SIZE = 5;
- int CONSTANT_Float_SIZE = 5;
- int CONSTANT_Integer_SIZE = 5;
- int CONSTANT_InterfaceMethodref_SIZE = 5;
- int CONSTANT_Long_SIZE = 9;
- int CONSTANT_String_SIZE = 3;
- int CONSTANT_Utf8_SIZE = 3;
- int CONSTANT_NameAndType_SIZE = 5;
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPoolEntry.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPoolEntry.java
deleted file mode 100644
index cdee2fd49..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPoolEntry.java
+++ /dev/null
@@ -1,396 +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.internal.repository.comparator;
-
-public class ConstantPoolEntry {
-
- private int kind;
- private int classInfoNameIndex;
- private int classIndex;
- private int nameAndTypeIndex;
- private int stringIndex;
- private char[] stringValue;
- private int integerValue;
- private float floatValue;
- private double doubleValue;
- private long longValue;
- private int nameAndTypeDescriptorIndex;
- private int nameAndTypeNameIndex;
- private char[] className;
- private char[] fieldName;
- private char[] methodName;
- private char[] fieldDescriptor;
- private char[] methodDescriptor;
- private char[] utf8Value;
- private int utf8Length;
- private char[] classInfoName;
-
- public ConstantPoolEntry() {
- this.classInfoNameIndex = -1;
- this.classIndex = -1;
- this.nameAndTypeIndex = -1;
- this.stringIndex = -1;
- this.stringValue = null;
- this.integerValue = -1;
- this.floatValue = -0.0f;
- this.doubleValue = -0 - 0;
- this.longValue = -1;
- this.nameAndTypeDescriptorIndex = -1;
- this.nameAndTypeNameIndex = -1;
- this.className = null;
- this.fieldName = null;
- this.methodName = null;
- this.fieldDescriptor = null;
- this.methodDescriptor = null;
- this.utf8Value = null;
- this.utf8Length = -1;
- this.classInfoName = null;
- }
-
- /*
- * @see IConstantPoolEntry#getKind()
- */
- public int getKind() {
- return this.kind;
- }
-
- /*
- * Sets the kind.
- * @param kind The kind to set
- */
- public void setKind(int kind) {
- this.kind = kind;
- }
-
- /*
- * @see IConstantPoolEntry#getClassInfoNameIndex()
- */
- public int getClassInfoNameIndex() {
- return this.classInfoNameIndex;
- }
-
- /*
- * @see IConstantPoolEntry#getClassIndex()
- */
- public int getClassIndex() {
- return this.classIndex;
- }
-
- /*
- * @see IConstantPoolEntry#getNameAndTypeIndex()
- */
- public int getNameAndTypeIndex() {
- return this.nameAndTypeIndex;
- }
-
- /*
- * @see IConstantPoolEntry#getStringIndex()
- */
- public int getStringIndex() {
- return this.stringIndex;
- }
-
- /*
- * @see IConstantPoolEntry#getStringValue()
- */
- public String getStringValue() {
- return new String(this.stringValue);
- }
-
- /*
- * @see IConstantPoolEntry#getIntegerValue()
- */
- public int getIntegerValue() {
- return this.integerValue;
- }
-
- /*
- * @see IConstantPoolEntry#getFloatValue()
- */
- public float getFloatValue() {
- return this.floatValue;
- }
-
- /*
- * @see IConstantPoolEntry#getDoubleValue()
- */
- public double getDoubleValue() {
- return this.doubleValue;
- }
-
- /*
- * @see IConstantPoolEntry#getLongValue()
- */
- public long getLongValue() {
- return this.longValue;
- }
-
- /*
- * @see IConstantPoolEntry#getNameAndTypeInfoDescriptorIndex()
- */
- public int getNameAndTypeInfoDescriptorIndex() {
- return this.nameAndTypeDescriptorIndex;
- }
-
- /*
- * @see IConstantPoolEntry#getNameAndTypeInfoNameIndex()
- */
- public int getNameAndTypeInfoNameIndex() {
- return this.nameAndTypeNameIndex;
- }
-
- /*
- * @see IConstantPoolEntry#getClassName()
- */
- public char[] getClassName() {
- return this.className;
- }
-
- /*
- * @see IConstantPoolEntry#getFieldName()
- */
- public char[] getFieldName() {
- return this.fieldName;
- }
-
- /*
- * @see IConstantPoolEntry#getMethodName()
- */
- public char[] getMethodName() {
- return this.methodName;
- }
-
- /*
- * @see IConstantPoolEntry#getFieldDescriptor()
- */
- public char[] getFieldDescriptor() {
- return this.fieldDescriptor;
- }
-
- /*
- * @see IConstantPoolEntry#getMethodDescriptor()
- */
- public char[] getMethodDescriptor() {
- return this.methodDescriptor;
- }
-
- /*
- * @see IConstantPoolEntry#getUtf8Value()
- */
- public char[] getUtf8Value() {
- return this.utf8Value;
- }
-
- /*
- * @see IConstantPoolEntry#getClassInfoName()
- */
- public char[] getClassInfoName() {
- return this.classInfoName;
- }
-
- /*
- * Sets the classInfoNameIndex.
- * @param classInfoNameIndex The classInfoNameIndex to set
- */
- public void setClassInfoNameIndex(int classInfoNameIndex) {
- this.classInfoNameIndex = classInfoNameIndex;
- }
-
- /*
- * Sets the classIndex.
- * @param classIndex The classIndex to set
- */
- public void setClassIndex(int classIndex) {
- this.classIndex = classIndex;
- }
-
- /*
- * Sets the nameAndTypeIndex.
- * @param nameAndTypeIndex The nameAndTypeIndex to set
- */
- public void setNameAndTypeIndex(int nameAndTypeIndex) {
- this.nameAndTypeIndex = nameAndTypeIndex;
- }
-
- /*
- * Sets the stringIndex.
- * @param stringIndex The stringIndex to set
- */
- public void setStringIndex(int stringIndex) {
- this.stringIndex = stringIndex;
- }
-
- /*
- * Sets the stringValue.
- * @param stringValue The stringValue to set
- */
- public void setStringValue(char[] stringValue) {
- this.stringValue = stringValue;
- }
-
- /*
- * Sets the integerValue.
- * @param integerValue The integerValue to set
- */
- public void setIntegerValue(int integerValue) {
- this.integerValue = integerValue;
- }
-
- /*
- * Sets the floatValue.
- * @param floatValue The floatValue to set
- */
- public void setFloatValue(float floatValue) {
- this.floatValue = floatValue;
- }
-
- /*
- * Sets the doubleValue.
- * @param doubleValue The doubleValue to set
- */
- public void setDoubleValue(double doubleValue) {
- this.doubleValue = doubleValue;
- }
-
- /*
- * Sets the longValue.
- * @param longValue The longValue to set
- */
- public void setLongValue(long longValue) {
- this.longValue = longValue;
- }
-
- /*
- * Gets the nameAndTypeDescriptorIndex.
- * @return Returns a int
- */
- public int getNameAndTypeDescriptorIndex() {
- return this.nameAndTypeDescriptorIndex;
- }
-
- /*
- * Sets the nameAndTypeDescriptorIndex.
- * @param nameAndTypeDescriptorIndex The nameAndTypeDescriptorIndex to set
- */
- public void setNameAndTypeDescriptorIndex(int nameAndTypeDescriptorIndex) {
- this.nameAndTypeDescriptorIndex = nameAndTypeDescriptorIndex;
- }
-
- /*
- * Gets the nameAndTypeNameIndex.
- * @return Returns a int
- */
- public int getNameAndTypeNameIndex() {
- return this.nameAndTypeNameIndex;
- }
-
- /*
- * Sets the nameAndTypeNameIndex.
- * @param nameAndTypeNameIndex The nameAndTypeNameIndex to set
- */
- public void setNameAndTypeNameIndex(int nameAndTypeNameIndex) {
- this.nameAndTypeNameIndex = nameAndTypeNameIndex;
- }
-
- /*
- * Sets the className.
- * @param className The className to set
- */
- public void setClassName(char[] className) {
- this.className = className;
- }
-
- /*
- * Sets the fieldName.
- * @param fieldName The fieldName to set
- */
- public void setFieldName(char[] fieldName) {
- this.fieldName = fieldName;
- }
-
- /*
- * Sets the methodName.
- * @param methodName The methodName to set
- */
- public void setMethodName(char[] methodName) {
- this.methodName = methodName;
- }
-
- /*
- * Sets the fieldDescriptor.
- * @param fieldDescriptor The fieldDescriptor to set
- */
- public void setFieldDescriptor(char[] fieldDescriptor) {
- this.fieldDescriptor = fieldDescriptor;
- }
-
- /*
- * Sets the methodDescriptor.
- * @param methodDescriptor The methodDescriptor to set
- */
- public void setMethodDescriptor(char[] methodDescriptor) {
- this.methodDescriptor = methodDescriptor;
- }
-
- /*
- * Sets the utf8Value.
- * @param utf8Value The utf8Value to set
- */
- public void setUtf8Value(char[] utf8Value) {
- this.utf8Value = utf8Value;
- }
-
- /*
- * Sets the classInfoName.
- * @param classInfoName The classInfoName to set
- */
- public void setClassInfoName(char[] classInfoName) {
- this.classInfoName = classInfoName;
- }
-
- /*
- * @see IConstantPoolEntry#getUtf8Length()
- */
- public int getUtf8Length() {
- return this.utf8Length;
- }
-
- /*
- * Sets the utf8Length.
- * @param utf8Length The utf8Length to set
- */
- public void setUtf8Length(int utf8Length) {
- this.utf8Length = utf8Length;
- }
-
- public void reset() {
- this.kind = 0;
- this.classInfoNameIndex = 0;
- this.classIndex = 0;
- this.nameAndTypeIndex = 0;
- this.stringIndex = 0;
- this.stringValue = null;
- this.integerValue = 0;
- this.floatValue = 0.0f;
- this.doubleValue = 0.0;
- this.longValue = 0L;
- this.nameAndTypeDescriptorIndex = 0;
- this.nameAndTypeNameIndex = 0;
- this.className = null;
- this.fieldName = null;
- this.methodName = null;
- this.fieldDescriptor = null;
- this.methodDescriptor = null;
- this.utf8Value = null;
- this.utf8Length = 0;
- this.classInfoName = null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantValueAttribute.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantValueAttribute.java
deleted file mode 100644
index 75e961e77..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantValueAttribute.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.internal.repository.comparator;
-
-public class ConstantValueAttribute extends ClassFileAttribute {
-
- private int constantValueIndex;
- private ConstantPoolEntry constantPoolEntry;
-
- ConstantValueAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
- super(classFileBytes, constantPool, offset);
- this.constantValueIndex = u2At(classFileBytes, 6, offset);
- this.constantPoolEntry = constantPool.decodeEntry(this.constantValueIndex);
- }
-
- /*
- * @see IConstantValueAttribute#getConstantValue()
- */
- public ConstantPoolEntry getConstantValue() {
- return this.constantPoolEntry;
- }
-
- /*
- * @see IConstantValueAttribute#getConstantValueIndex()
- */
- public int getConstantValueIndex() {
- return this.constantValueIndex;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/DefaultBytecodeVisitor.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/DefaultBytecodeVisitor.java
deleted file mode 100644
index aaeaf264b..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/DefaultBytecodeVisitor.java
+++ /dev/null
@@ -1,2071 +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.internal.repository.comparator;
-
-import org.eclipse.osgi.util.NLS;
-
-public class DefaultBytecodeVisitor {
- private static final String EMPTY_CLASS_NAME = "\"\""; //$NON-NLS-1$
- private static final String EMPTY_LOCAL_NAME = ""; //$NON-NLS-1$
- private static final int T_BOOLEAN = 4;
- private static final int T_CHAR = 5;
- private static final int T_FLOAT = 6;
- private static final int T_DOUBLE = 7;
- private static final int T_BYTE = 8;
- private static final int T_SHORT = 9;
- private static final int T_INT = 10;
- private static final int T_LONG = 11;
-
- private StringBuffer buffer;
- private String lineSeparator;
- private int tabNumber;
- private int digitNumberForPC;
- private int mode;
-
- public DefaultBytecodeVisitor(CodeAttribute codeAttribute, char[] methodDescriptor, boolean isStatic, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
- this.buffer = buffer;
- this.lineSeparator = lineSeparator;
- this.tabNumber = tabNumber + 1;
- long codeLength = codeAttribute.getCodeLength();
- this.digitNumberForPC = Long.toString(codeLength).length();
- this.mode = mode;
- }
-
- /*
- * @see IBytecodeVisitor#_aaload(int)
- */
- public void _aaload(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.AALOAD]);
- writeNewLine();
- }
-
- private void dumpPcNumber(int pc) {
- writeTabs();
- int digitForPC = 1;
- if (pc != 0) {
- digitForPC = Integer.toString(pc).length();
- }
- for (int i = 0, max = this.digitNumberForPC - digitForPC; i < max; i++) {
- this.buffer.append(' ');
- }
- this.buffer.append(pc);
- this.buffer.append(Messages.disassembler_indentation);
- }
-
- /*
- * @see IBytecodeVisitor#_aastore(int)
- */
- public void _aastore(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.AASTORE]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_aconst_null(int)
- */
- public void _aconst_null(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ACONST_NULL]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_aload_0(int)
- */
- public void _aload_0(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ALOAD_0], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_aload_1(int)
- */
- public void _aload_1(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ALOAD_1], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_aload_2(int)
- */
- public void _aload_2(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ALOAD_2], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_aload_3(int)
- */
- public void _aload_3(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ALOAD_3], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_aload(int, int)
- */
- public void _aload(int pc, int index) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ALOAD], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_anewarray(int, int, ConstantPoolEntry)
- */
- public void _anewarray(int pc, int index, ConstantPoolEntry constantClass) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_anewarray, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ANEWARRAY], returnConstantClassName(constantClass)}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_areturn(int)
- */
- public void _areturn(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ARETURN]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_arraylength(int)
- */
- public void _arraylength(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ARRAYLENGTH]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_astore_0(int)
- */
- public void _astore_0(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ASTORE_0], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_astore_1(int)
- */
- public void _astore_1(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ASTORE_1], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_astore_2(int)
- */
- public void _astore_2(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ASTORE_2], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_astore_3(int)
- */
- public void _astore_3(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ASTORE_3], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_astore(int, int)
- */
- public void _astore(int pc, int index) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ASTORE], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_athrow(int)
- */
- public void _athrow(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ATHROW]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_baload(int)
- */
- public void _baload(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.BALOAD]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_bastore(int)
- */
- public void _bastore(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.BASTORE]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_bipush(int, byte)
- */
- public void _bipush(int pc, byte _byte) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.BIPUSH]).append(Messages.disassembler_space).append(_byte);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_caload(int)
- */
- public void _caload(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.CALOAD]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_castore(int)
- */
- public void _castore(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.CASTORE]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_checkcast(int, int, ConstantPoolEntry)
- */
- public void _checkcast(int pc, int index, ConstantPoolEntry constantClass) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_checkcast, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.CHECKCAST], returnConstantClassName(constantClass)}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_d2f(int)
- */
- public void _d2f(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.D2F]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_d2i(int)
- */
- public void _d2i(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.D2I]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_d2l(int)
- */
- public void _d2l(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.D2L]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dadd(int)
- */
- public void _dadd(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DADD]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_daload(int)
- */
- public void _daload(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DALOAD]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dastore(int)
- */
- public void _dastore(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DASTORE]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dcmpg(int)
- */
- public void _dcmpg(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DCMPG]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dcmpl(int)
- */
- public void _dcmpl(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DCMPL]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dconst_0(int)
- */
- public void _dconst_0(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DCONST_0]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dconst_1(int)
- */
- public void _dconst_1(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DCONST_1]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_ddiv(int)
- */
- public void _ddiv(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DDIV]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dload_0(int)
- */
- public void _dload_0(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DLOAD_0], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dload_1(int)
- */
- public void _dload_1(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DLOAD_1], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dload_2(int)
- */
- public void _dload_2(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DLOAD_2], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dload_3(int)
- */
- public void _dload_3(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DLOAD_3], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dload(int, int)
- */
- public void _dload(int pc, int index) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DLOAD], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dmul(int)
- */
- public void _dmul(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DMUL]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dneg(int)
- */
- public void _dneg(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DNEG]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_drem(int)
- */
- public void _drem(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DREM]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dreturn(int)
- */
- public void _dreturn(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DRETURN]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dstore_0(int)
- */
- public void _dstore_0(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSTORE_0], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dstore_1(int)
- */
- public void _dstore_1(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSTORE_1], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dstore_2(int)
- */
- public void _dstore_2(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSTORE_2], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dstore_3(int)
- */
- public void _dstore_3(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSTORE_3], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dstore(int,int)
- */
- public void _dstore(int pc, int index) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSTORE], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dsub(int)
- */
- public void _dsub(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSUB]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dup_x1(int)
- */
- public void _dup_x1(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP_X1]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dup_x2(int)
- */
- public void _dup_x2(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP_X2]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dup(int)
- */
- public void _dup(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dup2_x1(int)
- */
- public void _dup2_x1(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP2_X1]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dup2_x2(int)
- */
- public void _dup2_x2(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP2_X2]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_dup2(int)
- */
- public void _dup2(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP2]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_f2d(int)
- */
- public void _f2d(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.F2D]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_f2i(int)
- */
- public void _f2i(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.F2I]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_f2l(int)
- */
- public void _f2l(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.F2L]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fadd(int)
- */
- public void _fadd(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FADD]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_faload(int)
- */
- public void _faload(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FALOAD]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fastore(int)
- */
- public void _fastore(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FASTORE]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fcmpg(int)
- */
- public void _fcmpg(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FCMPG]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fcmpl(int)
- */
- public void _fcmpl(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FCMPL]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fconst_0(int)
- */
- public void _fconst_0(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FCONST_0]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fconst_1(int)
- */
- public void _fconst_1(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FCONST_1]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fconst_2(int)
- */
- public void _fconst_2(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FCONST_2]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fdiv(int)
- */
- public void _fdiv(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FDIV]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fload_0(int)
- */
- public void _fload_0(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FLOAD_0], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fload_1(int)
- */
- public void _fload_1(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FLOAD_1], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fload_2(int)
- */
- public void _fload_2(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FLOAD_2], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fload_3(int)
- */
- public void _fload_3(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FLOAD_3], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fload(int, int)
- */
- public void _fload(int pc, int index) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FLOAD], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fmul(int)
- */
- public void _fmul(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FMUL]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fneg(int)
- */
- public void _fneg(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FNEG]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_frem(int)
- */
- public void _frem(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FREM]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_freturn(int)
- */
- public void _freturn(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FRETURN]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fstore_0(int)
- */
- public void _fstore_0(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSTORE_0], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fstore_1(int)
- */
- public void _fstore_1(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSTORE_1], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fstore_2(int)
- */
- public void _fstore_2(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSTORE_2], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fstore_3(int)
- */
- public void _fstore_3(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSTORE_3], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fstore(int, int)
- */
- public void _fstore(int pc, int index) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSTORE], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_fsub(int)
- */
- public void _fsub(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSUB]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_getfield(int, int, ConstantPoolEntry)
- */
- public void _getfield(int pc, int index, ConstantPoolEntry constantFieldref) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_getfield, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.GETFIELD], returnDeclaringClassName(constantFieldref), new String(constantFieldref.getFieldName()), returnClassName(Signature.toCharArray(constantFieldref.getFieldDescriptor()))}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_getstatic(int, int, ConstantPoolEntry)
- */
- public void _getstatic(int pc, int index, ConstantPoolEntry constantFieldref) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_getstatic, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.GETSTATIC], returnDeclaringClassName(constantFieldref), new String(constantFieldref.getFieldName()), returnClassName(Signature.toCharArray(constantFieldref.getFieldDescriptor()))}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_goto_w(int, int)
- */
- public void _goto_w(int pc, int branchOffset) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.GOTO_W]).append(Messages.disassembler_space).append(branchOffset + pc);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_goto(int, int)
- */
- public void _goto(int pc, int branchOffset) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.GOTO]).append(Messages.disassembler_space).append(branchOffset + pc);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_i2b(int)
- */
- public void _i2b(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2B]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_i2c(int)
- */
- public void _i2c(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2C]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_i2d(int)
- */
- public void _i2d(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2D]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_i2f(int)
- */
- public void _i2f(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2F]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_i2l(int)
- */
- public void _i2l(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2L]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_i2s(int)
- */
- public void _i2s(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2S]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_iadd(int)
- */
- public void _iadd(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IADD]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_iaload(int)
- */
- public void _iaload(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IALOAD]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_iand(int)
- */
- public void _iand(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IAND]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_iastore(int)
- */
- public void _iastore(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IASTORE]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_if_acmpeq(int, int)
- */
- public void _if_acmpeq(int pc, int branchOffset) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ACMPEQ]).append(Messages.disassembler_space).append(branchOffset + pc);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_if_acmpne(int, int)
- */
- public void _if_acmpne(int pc, int branchOffset) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ACMPNE]).append(Messages.disassembler_space).append(branchOffset + pc);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_if_icmpeq(int, int)
- */
- public void _if_icmpeq(int pc, int branchOffset) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPEQ]).append(Messages.disassembler_space).append(branchOffset + pc);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_if_icmpge(int, int)
- */
- public void _if_icmpge(int pc, int branchOffset) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPGE]).append(Messages.disassembler_space).append(branchOffset + pc);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_if_icmpgt(int, int)
- */
- public void _if_icmpgt(int pc, int branchOffset) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPGT]).append(Messages.disassembler_space).append(branchOffset + pc);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_if_icmple(int, int)
- */
- public void _if_icmple(int pc, int branchOffset) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPLE]).append(Messages.disassembler_space).append(branchOffset + pc);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_if_icmplt(int, int)
- */
- public void _if_icmplt(int pc, int branchOffset) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPLT]).append(Messages.disassembler_space).append(branchOffset + pc);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_if_icmpne(int, int)
- */
- public void _if_icmpne(int pc, int branchOffset) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPNE]).append(Messages.disassembler_space).append(branchOffset + pc);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_iconst_0(int)
- */
- public void _iconst_0(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_0]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_iconst_1(int)
- */
- public void _iconst_1(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_1]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_iconst_2(int)
- */
- public void _iconst_2(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_2]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_iconst_3(int)
- */
- public void _iconst_3(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_3]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_iconst_4(int)
- */
- public void _iconst_4(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_4]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_iconst_5(int)
- */
- public void _iconst_5(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_5]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_iconst_m1(int)
- */
- public void _iconst_m1(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_M1]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_idiv(int)
- */
- public void _idiv(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IDIV]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_ifeq(int, int)
- */
- public void _ifeq(int pc, int branchOffset) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFEQ]).append(Messages.disassembler_space).append(branchOffset + pc);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_ifge(int, int)
- */
- public void _ifge(int pc, int branchOffset) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFGE]).append(Messages.disassembler_space).append(branchOffset + pc);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_ifgt(int, int)
- */
- public void _ifgt(int pc, int branchOffset) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFGT]).append(Messages.disassembler_space).append(branchOffset + pc);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_ifle(int, int)
- */
- public void _ifle(int pc, int branchOffset) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFLE]).append(Messages.disassembler_space).append(branchOffset + pc);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_iflt(int, int)
- */
- public void _iflt(int pc, int branchOffset) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFLT]).append(Messages.disassembler_space).append(branchOffset + pc);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_ifne(int, int)
- */
- public void _ifne(int pc, int branchOffset) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFNE]).append(Messages.disassembler_space).append(branchOffset + pc);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_ifnonnull(int, int)
- */
- public void _ifnonnull(int pc, int branchOffset) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFNONNULL]).append(Messages.disassembler_space).append(branchOffset + pc);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_ifnull(int, int)
- */
- public void _ifnull(int pc, int branchOffset) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFNULL]).append(Messages.disassembler_space).append(branchOffset + pc);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_iinc(int, int, int)
- */
- public void _iinc(int pc, int index, int _const) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_iinc, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IINC], Integer.toString(index), Integer.toString(_const), EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_iload_0(int)
- */
- public void _iload_0(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ILOAD_0], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_iload_1(int)
- */
- public void _iload_1(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ILOAD_1], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_iload_2(int)
- */
- public void _iload_2(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ILOAD_2], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_iload_3(int)
- */
- public void _iload_3(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ILOAD_3], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_iload(int, int)
- */
- public void _iload(int pc, int index) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ILOAD], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_imul(int)
- */
- public void _imul(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IMUL]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_ineg(int)
- */
- public void _ineg(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INEG]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_instanceof(int, int, ConstantPoolEntry)
- */
- public void _instanceof(int pc, int index, ConstantPoolEntry constantClass) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_instanceof, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INSTANCEOF], returnConstantClassName(constantClass)}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_invokeinterface(int, int, byte, ConstantPoolEntry)
- */
- public void _invokeinterface(int pc, int index, byte nargs, ConstantPoolEntry constantInterfaceMethodref) {
-
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_invokeinterface, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INVOKEINTERFACE], Integer.toString(nargs), Utility.toString(constantInterfaceMethodref.getClassName(), constantInterfaceMethodref.getMethodName(), constantInterfaceMethodref.getMethodDescriptor(), true, isCompact())}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_invokespecial(int, int, ConstantPoolEntry)
- */
- public void _invokespecial(int pc, int index, ConstantPoolEntry constantMethodref) {
- dumpPcNumber(pc);
- final String signature = returnMethodSignature(constantMethodref);
- this.buffer.append(NLS.bind(Messages.classformat_invokespecial, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INVOKESPECIAL], signature}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_invokestatic(int, int, ConstantPoolEntry)
- */
- public void _invokestatic(int pc, int index, ConstantPoolEntry constantMethodref) {
- dumpPcNumber(pc);
- final String signature = returnMethodSignature(constantMethodref);
- this.buffer.append(NLS.bind(Messages.classformat_invokestatic, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INVOKESTATIC], signature}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_invokevirtual(int, int, ConstantPoolEntry)
- */
- public void _invokevirtual(int pc, int index, ConstantPoolEntry constantMethodref) {
- dumpPcNumber(pc);
- final String signature = returnMethodSignature(constantMethodref);
- this.buffer.append(NLS.bind(Messages.classformat_invokevirtual, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INVOKEVIRTUAL], signature}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_ior(int)
- */
- public void _ior(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IOR]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_irem(int)
- */
- public void _irem(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IREM]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_ireturn(int)
- */
- public void _ireturn(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IRETURN]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_ishl(int)
- */
- public void _ishl(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISHL]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_ishr(int)
- */
- public void _ishr(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISHR]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_istore_0(int)
- */
- public void _istore_0(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISTORE_0], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_istore_1(int)
- */
- public void _istore_1(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISTORE_1], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_istore_2(int)
- */
- public void _istore_2(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISTORE_2], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_istore_3(int)
- */
- public void _istore_3(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISTORE_3], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_istore(int, int)
- */
- public void _istore(int pc, int index) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISTORE], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_isub(int)
- */
- public void _isub(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISUB]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_iushr(int)
- */
- public void _iushr(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IUSHR]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_ixor(int)
- */
- public void _ixor(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IXOR]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_jsr_w(int, int)
- */
- public void _jsr_w(int pc, int branchOffset) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.JSR_W]).append(Messages.disassembler_space).append(branchOffset + pc);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_jsr(int, int)
- */
- public void _jsr(int pc, int branchOffset) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.JSR]).append(Messages.disassembler_space).append(branchOffset + pc);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_l2d(int)
- */
- public void _l2d(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.L2D]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_l2f(int)
- */
- public void _l2f(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.L2F]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_l2i(int)
- */
- public void _l2i(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.L2I]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_ladd(int)
- */
- public void _ladd(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LADD]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_laload(int)
- */
- public void _laload(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LALOAD]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_land(int)
- */
- public void _land(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LAND]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lastore(int)
- */
- public void _lastore(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LASTORE]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lcmp(int)
- */
- public void _lcmp(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LCMP]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lconst_0(int)
- */
- public void _lconst_0(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LCONST_0]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lconst_1(int)
- */
- public void _lconst_1(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LCONST_1]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_ldc_w(int, int, ConstantPoolEntry)
- */
- public void _ldc_w(int pc, int index, ConstantPoolEntry constantPoolEntry) {
- dumpPcNumber(pc);
- switch (constantPoolEntry.getKind()) {
- case ConstantPoolConstant.CONSTANT_Float :
- this.buffer.append(NLS.bind(Messages.classformat_ldc_w_float, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC_W], Float.toString(constantPoolEntry.getFloatValue())}));
- break;
- case ConstantPoolConstant.CONSTANT_Integer :
- this.buffer.append(NLS.bind(Messages.classformat_ldc_w_integer, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC_W], Integer.toString(constantPoolEntry.getIntegerValue())}));
- break;
- case ConstantPoolConstant.CONSTANT_String :
- this.buffer.append(NLS.bind(Messages.classformat_ldc_w_string, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC_W], Disassembler.escapeString(constantPoolEntry.getStringValue())}));
- break;
- case ConstantPoolConstant.CONSTANT_Class :
- this.buffer.append(NLS.bind(Messages.classformat_ldc_w_class, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC_W], returnConstantClassName(constantPoolEntry)}));
- }
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_ldc(int, int, ConstantPoolEntry)
- */
- public void _ldc(int pc, int index, ConstantPoolEntry constantPoolEntry) {
- dumpPcNumber(pc);
- switch (constantPoolEntry.getKind()) {
- case ConstantPoolConstant.CONSTANT_Float :
- this.buffer.append(NLS.bind(Messages.classformat_ldc_w_float, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC], Float.toString(constantPoolEntry.getFloatValue())}));
- break;
- case ConstantPoolConstant.CONSTANT_Integer :
- this.buffer.append(NLS.bind(Messages.classformat_ldc_w_integer, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC], Integer.toString(constantPoolEntry.getIntegerValue())}));
- break;
- case ConstantPoolConstant.CONSTANT_String :
- this.buffer.append(NLS.bind(Messages.classformat_ldc_w_string, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC], Disassembler.escapeString(constantPoolEntry.getStringValue())}));
- break;
- case ConstantPoolConstant.CONSTANT_Class :
- this.buffer.append(NLS.bind(Messages.classformat_ldc_w_class, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC], returnConstantClassName(constantPoolEntry)}));
- }
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_ldc2_w(int, int, ConstantPoolEntry)
- */
- public void _ldc2_w(int pc, int index, ConstantPoolEntry constantPoolEntry) {
- dumpPcNumber(pc);
- switch (constantPoolEntry.getKind()) {
- case ConstantPoolConstant.CONSTANT_Long :
- this.buffer.append(NLS.bind(Messages.classformat_ldc2_w_long, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC2_W], Long.toString(constantPoolEntry.getLongValue())}));
- break;
- case ConstantPoolConstant.CONSTANT_Double :
- this.buffer.append(NLS.bind(Messages.classformat_ldc2_w_double, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC2_W], Double.toString(constantPoolEntry.getDoubleValue())}));
- }
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_ldiv(int)
- */
- public void _ldiv(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDIV]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lload_0(int)
- */
- public void _lload_0(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LLOAD_0], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lload_1(int)
- */
- public void _lload_1(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LLOAD_1], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lload_2(int)
- */
- public void _lload_2(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LLOAD_2], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lload_3(int)
- */
- public void _lload_3(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LLOAD_3], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lload(int, int)
- */
- public void _lload(int pc, int index) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LLOAD], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lmul(int)
- */
- public void _lmul(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LMUL]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lneg(int)
- */
- public void _lneg(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LNEG]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lookupswitch(int, int, int, int[][])
- */
- public void _lookupswitch(int pc, int defaultoffset, int npairs, int[][] offset_pairs) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LOOKUPSWITCH]).append(" default: ") //$NON-NLS-1$
- .append(defaultoffset + pc);
- writeNewLine();
- for (int i = 0; i < npairs; i++) {
- writeExtraTabs(3);
- this.buffer.append("case ") //$NON-NLS-1$
- .append(offset_pairs[i][0]).append(": ") //$NON-NLS-1$
- .append(offset_pairs[i][1] + pc);
- writeNewLine();
- }
- }
-
- /*
- * @see IBytecodeVisitor#_lor(int)
- */
- public void _lor(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LOR]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lrem(int)
- */
- public void _lrem(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LREM]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lreturn(int)
- */
- public void _lreturn(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LRETURN]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lshl(int)
- */
- public void _lshl(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSHL]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lshr(int)
- */
- public void _lshr(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSHR]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lstore_0(int)
- */
- public void _lstore_0(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSTORE_0], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lstore_1(int)
- */
- public void _lstore_1(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSTORE_1], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lstore_2(int)
- */
- public void _lstore_2(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSTORE_2], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lstore_3(int)
- */
- public void _lstore_3(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSTORE_3], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lstore(int, int)
- */
- public void _lstore(int pc, int index) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSTORE], EMPTY_LOCAL_NAME}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lsub(int)
- */
- public void _lsub(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSUB]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lushr(int)
- */
- public void _lushr(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LUSHR]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_lxor(int)
- */
- public void _lxor(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LXOR]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_monitorenter(int)
- */
- public void _monitorenter(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.MONITORENTER]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_monitorexit(int)
- */
- public void _monitorexit(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.MONITOREXIT]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_multianewarray(int, int, int, ConstantPoolEntry)
- */
- public void _multianewarray(int pc, int index, int dimensions, ConstantPoolEntry constantClass) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_multianewarray, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.MULTIANEWARRAY], returnConstantClassName(constantClass)}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_new(int, int, ConstantPoolEntry)
- */
- public void _new(int pc, int index, ConstantPoolEntry constantClass) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_new, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEW], returnConstantClassName(constantClass)}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_newarray(int, int)
- */
- public void _newarray(int pc, int atype) {
- dumpPcNumber(pc);
- switch (atype) {
- case T_BOOLEAN :
- this.buffer.append(NLS.bind(Messages.classformat_newarray_boolean, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
- break;
- case T_CHAR :
- this.buffer.append(NLS.bind(Messages.classformat_newarray_char, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
- break;
- case T_FLOAT :
- this.buffer.append(NLS.bind(Messages.classformat_newarray_float, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
- break;
- case T_DOUBLE :
- this.buffer.append(NLS.bind(Messages.classformat_newarray_double, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
- break;
- case T_BYTE :
- this.buffer.append(NLS.bind(Messages.classformat_newarray_byte, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
- break;
- case T_SHORT :
- this.buffer.append(NLS.bind(Messages.classformat_newarray_short, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
- break;
- case T_INT :
- this.buffer.append(NLS.bind(Messages.classformat_newarray_int, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
- break;
- case T_LONG :
- this.buffer.append(NLS.bind(Messages.classformat_newarray_long, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
- }
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_nop(int)
- */
- public void _nop(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NOP]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_pop(int)
- */
- public void _pop(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.POP]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_pop2(int)
- */
- public void _pop2(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.POP2]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_putfield(int, int, ConstantPoolEntry)
- */
- public void _putfield(int pc, int index, ConstantPoolEntry constantFieldref) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_putfield, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.PUTFIELD], returnDeclaringClassName(constantFieldref), new String(constantFieldref.getFieldName()), returnClassName(Signature.toCharArray(constantFieldref.getFieldDescriptor()))}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_putstatic(int, int, ConstantPoolEntry)
- */
- public void _putstatic(int pc, int index, ConstantPoolEntry constantFieldref) {
- dumpPcNumber(pc);
- this.buffer.append(NLS.bind(Messages.classformat_putstatic, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.PUTSTATIC], returnDeclaringClassName(constantFieldref), new String(constantFieldref.getFieldName()), returnClassName(Signature.toCharArray(constantFieldref.getFieldDescriptor()))}));
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_ret(int, int)
- */
- public void _ret(int pc, int index) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.RET]).append(Messages.disassembler_space).append(index);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_return(int)
- */
- public void _return(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.RETURN]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_saload(int)
- */
- public void _saload(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.SALOAD]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_sastore(int)
- */
- public void _sastore(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.SASTORE]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_sipush(int, short)
- */
- public void _sipush(int pc, short value) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.SIPUSH]).append(Messages.disassembler_space).append(value);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_swap(int)
- */
- public void _swap(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.SWAP]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_tableswitch(int, int, int, int, int[])
- */
- public void _tableswitch(int pc, int defaultoffset, int low, int high, int[] jump_offsets) {
-
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.TABLESWITCH]).append(" default: ") //$NON-NLS-1$
- .append(defaultoffset + pc);
- writeNewLine();
- for (int i = low; i < high + 1; i++) {
- writeExtraTabs(3);
- this.buffer.append("case ") //$NON-NLS-1$
- .append(i).append(": ") //$NON-NLS-1$
- .append(jump_offsets[i - low] + pc);
- writeNewLine();
- }
- }
-
- /*
- * @see IBytecodeVisitor#_wide(int, int, int)
- */
- public void _wide(int pc, int iincopcode, int index, int _const) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.WIDE]);
- writeNewLine();
- _iinc(pc + 1, index, _const);
- }
-
- /*
- * @see IBytecodeVisitor#_wide(int, int, int)
- */
- public void _wide(int pc, int opcode, int index) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.WIDE]);
- writeNewLine();
- switch (opcode) {
- case IOpcodeMnemonics.ILOAD :
- _iload(pc + 1, index);
- break;
- case IOpcodeMnemonics.FLOAD :
- _fload(pc + 1, index);
- break;
- case IOpcodeMnemonics.ALOAD :
- _aload(pc + 1, index);
- break;
- case IOpcodeMnemonics.LLOAD :
- _lload(pc + 1, index);
- break;
- case IOpcodeMnemonics.DLOAD :
- _dload(pc + 1, index);
- break;
- case IOpcodeMnemonics.ISTORE :
- _istore(pc + 1, index);
- break;
- case IOpcodeMnemonics.FSTORE :
- _fstore(pc + 1, index);
- break;
- case IOpcodeMnemonics.ASTORE :
- _astore(pc + 1, index);
- break;
- case IOpcodeMnemonics.LSTORE :
- _lstore(pc + 1, index);
- break;
- case IOpcodeMnemonics.DSTORE :
- _dstore(pc + 1, index);
- break;
- case IOpcodeMnemonics.RET :
- _ret(pc + 1, index);
- }
- }
-
- /*
- * @see IBytecodeVisitor#_breakpoint(int)
- */
- public void _breakpoint(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.BREAKPOINT]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_impdep1(int)
- */
- public void _impdep1(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IMPDEP1]);
- writeNewLine();
- }
-
- /*
- * @see IBytecodeVisitor#_impdep2(int)
- */
- public void _impdep2(int pc) {
- dumpPcNumber(pc);
- this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IMPDEP2]);
- writeNewLine();
- }
-
- private boolean isCompact() {
- return (this.mode & Disassembler.COMPACT) != 0;
- }
-
- private String returnConstantClassName(ConstantPoolEntry constantClass) {
- char[] className = constantClass.getClassInfoName();
- if (className.length == 0) {
- return EMPTY_CLASS_NAME;
- }
- switch (className[0]) {
- case '[' :
- StringBuffer classNameBuffer = new StringBuffer();
- Utility.appendTypeSignature(className, 0, classNameBuffer, isCompact());
- return classNameBuffer.toString();
- default :
- return returnClassName(className);
- }
- }
-
- private String returnClassName(char[] classInfoName) {
- if (classInfoName.length == 0) {
- return EMPTY_CLASS_NAME;
- } else if (isCompact()) {
- int lastIndexOfSlash = CharOperation.lastIndexOf('/', classInfoName);
- if (lastIndexOfSlash != -1) {
- return new String(classInfoName, lastIndexOfSlash + 1, classInfoName.length - lastIndexOfSlash - 1);
- }
- }
- CharOperation.replace(classInfoName, '/', '.');
- return new String(classInfoName);
- }
-
- private String returnDeclaringClassName(ConstantPoolEntry constantRef) {
- final char[] className = constantRef.getClassName();
- return returnClassName(className);
- }
-
- private String returnMethodSignature(ConstantPoolEntry constantMethodref) {
- final char[] methodDescriptor = constantMethodref.getMethodDescriptor();
- CharOperation.replace(methodDescriptor, '$', '#');
- final char[] signature = Utility.toString(constantMethodref.getClassName(), constantMethodref.getMethodName(), methodDescriptor, true, isCompact()).toCharArray();
- CharOperation.replace(signature, '#', '$');
- return String.valueOf(signature);
- }
-
- private void writeNewLine() {
- this.buffer.append(this.lineSeparator);
- }
-
- private void writeTabs() {
- for (int i = 0, max = this.tabNumber; i < max; i++) {
- this.buffer.append(Messages.disassembler_indentation);
- }
- }
-
- private void writeExtraTabs(int extraTabs) {
- for (int i = 0, max = this.tabNumber + extraTabs; i < max; i++) {
- this.buffer.append(Messages.disassembler_indentation);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Disassembler.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Disassembler.java
deleted file mode 100644
index f96d48823..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Disassembler.java
+++ /dev/null
@@ -1,1149 +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.internal.repository.comparator;
-
-import java.util.Arrays;
-import java.util.Comparator;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Disassembler of .class files. It generates an output in the Writer that looks close to
- * the javap output.
- */
-public class Disassembler {
- /**
- * The mode is the detailed mode to disassemble ClassFileReader. It returns the magic
- * numbers, the version numbers and field and method descriptors.
- */
- public final static int DETAILED = 1;
-
- /**
- * This mode is used to compact the class name to a simple name instead of a qualified name.
- * @since 3.1
- */
- public final static int COMPACT = 8;
-
- private static final char[] ANY_EXCEPTION = Messages.classfileformat_anyexceptionhandler.toCharArray();
- private static final String VERSION_UNKNOWN = Messages.classfileformat_versionUnknown;
-
- private boolean appendModifier(StringBuffer buffer, int accessFlags, int modifierConstant, String modifier, boolean firstModifier) {
- if ((accessFlags & modifierConstant) != 0) {
- if (!firstModifier) {
- buffer.append(Messages.disassembler_space);
- }
- if (firstModifier) {
- firstModifier = false;
- }
- buffer.append(modifier);
- }
- return firstModifier;
- }
-
- private void decodeModifiers(StringBuffer buffer, int accessFlags, int[] checkBits) {
- decodeModifiers(buffer, accessFlags, false, false, checkBits);
- }
-
- private void decodeModifiers(StringBuffer buffer, int accessFlags, boolean printDefault, boolean asBridge, int[] checkBits) {
- if (checkBits == null)
- return;
- boolean firstModifier = true;
- for (int i = 0, max = checkBits.length; i < max; i++) {
- switch (checkBits[i]) {
- case IModifierConstants.ACC_PUBLIC :
- firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_PUBLIC, "public", firstModifier); //$NON-NLS-1$
- break;
- case IModifierConstants.ACC_PROTECTED :
- firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_PROTECTED, "protected", firstModifier); //$NON-NLS-1$
- break;
- case IModifierConstants.ACC_PRIVATE :
- firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_PRIVATE, "private", firstModifier); //$NON-NLS-1$
- break;
- case IModifierConstants.ACC_ABSTRACT :
- firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_ABSTRACT, "abstract", firstModifier); //$NON-NLS-1$
- break;
- case IModifierConstants.ACC_STATIC :
- firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_STATIC, "static", firstModifier); //$NON-NLS-1$
- break;
- case IModifierConstants.ACC_FINAL :
- firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_FINAL, "final", firstModifier); //$NON-NLS-1$
- break;
- case IModifierConstants.ACC_SYNCHRONIZED :
- firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_SYNCHRONIZED, "synchronized", firstModifier); //$NON-NLS-1$
- break;
- case IModifierConstants.ACC_NATIVE :
- firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_NATIVE, "native", firstModifier); //$NON-NLS-1$
- break;
- case IModifierConstants.ACC_STRICT :
- firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_STRICT, "strictfp", firstModifier); //$NON-NLS-1$
- break;
- case IModifierConstants.ACC_TRANSIENT :
- firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_TRANSIENT, "transient", firstModifier); //$NON-NLS-1$
- break;
- case IModifierConstants.ACC_VOLATILE :
- // case IModifierConstants.ACC_BRIDGE :
- if (asBridge) {
- firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_BRIDGE, "bridge", firstModifier); //$NON-NLS-1$
- } else {
- firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_VOLATILE, "volatile", firstModifier); //$NON-NLS-1$
- }
- break;
- case IModifierConstants.ACC_ENUM :
- firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_ENUM, "enum", firstModifier); //$NON-NLS-1$
- break;
- }
- }
- if (!firstModifier) {
- if (!printDefault)
- buffer.append(Messages.disassembler_space);
- } else if (printDefault) {
- // no modifier: package default visibility
- buffer.append("default"); //$NON-NLS-1$
- }
- }
-
- private void decodeModifiersForField(StringBuffer buffer, int accessFlags) {
- decodeModifiers(buffer, accessFlags, new int[] {IModifierConstants.ACC_PUBLIC, IModifierConstants.ACC_PROTECTED, IModifierConstants.ACC_PRIVATE, IModifierConstants.ACC_STATIC, IModifierConstants.ACC_FINAL, IModifierConstants.ACC_TRANSIENT, IModifierConstants.ACC_VOLATILE, IModifierConstants.ACC_ENUM});
- }
-
- private final void decodeModifiersForInnerClasses(StringBuffer buffer, int accessFlags, boolean printDefault) {
- decodeModifiers(buffer, accessFlags, printDefault, false, new int[] {IModifierConstants.ACC_PUBLIC, IModifierConstants.ACC_PROTECTED, IModifierConstants.ACC_PRIVATE, IModifierConstants.ACC_ABSTRACT, IModifierConstants.ACC_STATIC, IModifierConstants.ACC_FINAL,});
- }
-
- private final void decodeModifiersForMethod(StringBuffer buffer, int accessFlags) {
- decodeModifiers(buffer, accessFlags, false, true, new int[] {IModifierConstants.ACC_PUBLIC, IModifierConstants.ACC_PROTECTED, IModifierConstants.ACC_PRIVATE, IModifierConstants.ACC_ABSTRACT, IModifierConstants.ACC_STATIC, IModifierConstants.ACC_FINAL, IModifierConstants.ACC_SYNCHRONIZED, IModifierConstants.ACC_NATIVE, IModifierConstants.ACC_STRICT, IModifierConstants.ACC_BRIDGE,});
- }
-
- private final void decodeModifiersForType(StringBuffer buffer, int accessFlags) {
- decodeModifiers(buffer, accessFlags, new int[] {IModifierConstants.ACC_PUBLIC, IModifierConstants.ACC_ABSTRACT, IModifierConstants.ACC_FINAL,});
- }
-
- public static String escapeString(String s) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0, max = s.length(); i < max; i++) {
- char c = s.charAt(i);
- switch (c) {
- case '\b' :
- buffer.append("\\b"); //$NON-NLS-1$
- break;
- case '\t' :
- buffer.append("\\t"); //$NON-NLS-1$
- break;
- case '\n' :
- buffer.append("\\n"); //$NON-NLS-1$
- break;
- case '\f' :
- buffer.append("\\f"); //$NON-NLS-1$
- break;
- case '\r' :
- buffer.append("\\r"); //$NON-NLS-1$
- break;
- case '\0' :
- buffer.append("\\0"); //$NON-NLS-1$
- break;
- case '\1' :
- buffer.append("\\1"); //$NON-NLS-1$
- break;
- case '\2' :
- buffer.append("\\2"); //$NON-NLS-1$
- break;
- case '\3' :
- buffer.append("\\3"); //$NON-NLS-1$
- break;
- case '\4' :
- buffer.append("\\4"); //$NON-NLS-1$
- break;
- case '\5' :
- buffer.append("\\5"); //$NON-NLS-1$
- break;
- case '\6' :
- buffer.append("\\6"); //$NON-NLS-1$
- break;
- case '\7' :
- buffer.append("\\7"); //$NON-NLS-1$
- break;
- default :
- buffer.append(c);
- }
- }
- return buffer.toString();
- }
-
- static String decodeStringValue(char[] chars) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0, max = chars.length; i < max; i++) {
- char c = chars[i];
- switch (c) {
- case '\b' :
- buffer.append("\\b"); //$NON-NLS-1$
- break;
- case '\t' :
- buffer.append("\\t"); //$NON-NLS-1$
- break;
- case '\n' :
- buffer.append("\\n"); //$NON-NLS-1$
- break;
- case '\f' :
- buffer.append("\\f"); //$NON-NLS-1$
- break;
- case '\r' :
- buffer.append("\\r"); //$NON-NLS-1$
- break;
- case '\0' :
- buffer.append("\\0"); //$NON-NLS-1$
- break;
- case '\1' :
- buffer.append("\\1"); //$NON-NLS-1$
- break;
- case '\2' :
- buffer.append("\\2"); //$NON-NLS-1$
- break;
- case '\3' :
- buffer.append("\\3"); //$NON-NLS-1$
- break;
- case '\4' :
- buffer.append("\\4"); //$NON-NLS-1$
- break;
- case '\5' :
- buffer.append("\\5"); //$NON-NLS-1$
- break;
- case '\6' :
- buffer.append("\\6"); //$NON-NLS-1$
- break;
- case '\7' :
- buffer.append("\\7"); //$NON-NLS-1$
- break;
- default :
- buffer.append(c);
- }
- }
- return buffer.toString();
- }
-
- static String decodeStringValue(String s) {
- return decodeStringValue(s.toCharArray());
- }
-
- /*
- * @see org.eclipse.jdt.core.util.ClassFileBytesDisassembler#disassemble(byte[], java.lang.String, int)
- */
- public String disassemble(byte[] classFileBytes, String lineSeparator, int mode) throws ClassFormatException {
- try {
- return disassemble(new ClassFileReader(classFileBytes, ClassFileReader.ALL), lineSeparator, mode);
- } catch (ArrayIndexOutOfBoundsException e) {
- throw new ClassFormatException(e.getMessage(), e);
- }
- }
-
- private void disassemble(Annotation annotation, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
- writeNewLine(buffer, lineSeparator, tabNumber + 1);
- final char[] typeName = CharOperation.replaceOnCopy(annotation.getTypeName(), '/', '.');
- buffer.append(NLS.bind(Messages.disassembler_annotationentrystart, new String[] {new String(returnClassName(Signature.toCharArray(typeName), '.', mode))}));
- final AnnotationComponent[] components = annotation.getComponents();
- for (int i = 0, max = components.length; i < max; i++) {
- disassemble(components[i], buffer, lineSeparator, tabNumber + 1, mode);
- }
- writeNewLine(buffer, lineSeparator, tabNumber + 1);
- buffer.append(Messages.disassembler_annotationentryend);
- }
-
- private void disassemble(AnnotationComponent annotationComponent, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
- writeNewLine(buffer, lineSeparator, tabNumber + 1);
- buffer.append(NLS.bind(Messages.disassembler_annotationcomponent, new String[] {new String(annotationComponent.getComponentName())}));
- disassemble(annotationComponent.getComponentValue(), buffer, lineSeparator, tabNumber + 1, mode);
- }
-
- private void disassemble(AnnotationComponentValue annotationComponentValue, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
- switch (annotationComponentValue.getTag()) {
- case AnnotationComponentValue.BYTE_TAG :
- case AnnotationComponentValue.CHAR_TAG :
- case AnnotationComponentValue.DOUBLE_TAG :
- case AnnotationComponentValue.FLOAT_TAG :
- case AnnotationComponentValue.INTEGER_TAG :
- case AnnotationComponentValue.LONG_TAG :
- case AnnotationComponentValue.SHORT_TAG :
- case AnnotationComponentValue.BOOLEAN_TAG :
- case AnnotationComponentValue.STRING_TAG :
- ConstantPoolEntry constantPoolEntry = annotationComponentValue.getConstantValue();
- String value = null;
- switch (constantPoolEntry.getKind()) {
- case ConstantPoolConstant.CONSTANT_Long :
- value = constantPoolEntry.getLongValue() + "L"; //$NON-NLS-1$
- break;
- case ConstantPoolConstant.CONSTANT_Float :
- value = constantPoolEntry.getFloatValue() + "f"; //$NON-NLS-1$
- break;
- case ConstantPoolConstant.CONSTANT_Double :
- value = Double.toString(constantPoolEntry.getDoubleValue());
- break;
- case ConstantPoolConstant.CONSTANT_Integer :
- switch (annotationComponentValue.getTag()) {
- case AnnotationComponentValue.CHAR_TAG :
- value = "'" + (char) constantPoolEntry.getIntegerValue() + "'"; //$NON-NLS-1$//$NON-NLS-2$
- break;
- case AnnotationComponentValue.BOOLEAN_TAG :
- value = constantPoolEntry.getIntegerValue() == 1 ? "true" : "false";//$NON-NLS-1$//$NON-NLS-2$
- break;
- case AnnotationComponentValue.BYTE_TAG :
- value = "(byte) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
- break;
- case AnnotationComponentValue.SHORT_TAG :
- value = "(short) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
- break;
- case AnnotationComponentValue.INTEGER_TAG :
- value = "(int) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
- }
- break;
- case ConstantPoolConstant.CONSTANT_Utf8 :
- value = "\"" + decodeStringValue(constantPoolEntry.getUtf8Value()) + "\"";//$NON-NLS-1$//$NON-NLS-2$
- }
- buffer.append(NLS.bind(Messages.disassembler_annotationdefaultvalue, value));
- break;
- case AnnotationComponentValue.ENUM_TAG :
- final char[] typeName = CharOperation.replaceOnCopy(annotationComponentValue.getEnumConstantTypeName(), '/', '.');
- final char[] constantName = annotationComponentValue.getEnumConstantName();
- buffer.append(NLS.bind(Messages.disassembler_annotationenumvalue, new String[] {new String(returnClassName(Signature.toCharArray(typeName), '.', mode)), new String(constantName)}));
- break;
- case AnnotationComponentValue.CLASS_TAG :
- constantPoolEntry = annotationComponentValue.getClassInfo();
- final char[] className = CharOperation.replaceOnCopy(constantPoolEntry.getUtf8Value(), '/', '.');
- buffer.append(NLS.bind(Messages.disassembler_annotationclassvalue, new String[] {new String(returnClassName(Signature.toCharArray(className), '.', mode))}));
- break;
- case AnnotationComponentValue.ANNOTATION_TAG :
- buffer.append(Messages.disassembler_annotationannotationvalue);
- Annotation annotation = annotationComponentValue.getAnnotationValue();
- disassemble(annotation, buffer, lineSeparator, tabNumber + 1, mode);
- break;
- case AnnotationComponentValue.ARRAY_TAG :
- buffer.append(Messages.disassembler_annotationarrayvaluestart);
- final AnnotationComponentValue[] annotationComponentValues = annotationComponentValue.getAnnotationComponentValues();
- for (int i = 0, max = annotationComponentValues.length; i < max; i++) {
- writeNewLine(buffer, lineSeparator, tabNumber + 1);
- disassemble(annotationComponentValues[i], buffer, lineSeparator, tabNumber + 1, mode);
- }
- writeNewLine(buffer, lineSeparator, tabNumber + 1);
- buffer.append(Messages.disassembler_annotationarrayvalueend);
- }
- }
-
- private void disassemble(AnnotationDefaultAttribute annotationDefaultAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
- writeNewLine(buffer, lineSeparator, tabNumber + 1);
- buffer.append(Messages.disassembler_annotationdefaultheader);
- AnnotationComponentValue componentValue = annotationDefaultAttribute.getMemberValue();
- writeNewLine(buffer, lineSeparator, tabNumber + 2);
- disassemble(componentValue, buffer, lineSeparator, tabNumber + 1, mode);
- }
-
- /**
- * Disassemble a method info header
- */
- private void disassemble(ClassFileReader classFileReader, char[] className, MethodInfo methodInfo, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
- writeNewLine(buffer, lineSeparator, tabNumber);
- final CodeAttribute codeAttribute = methodInfo.getCodeAttribute();
- final char[] methodDescriptor = methodInfo.getDescriptor();
- final SignatureAttribute signatureAttribute = (SignatureAttribute) Utility.getAttribute(methodInfo, AttributeNamesConstants.SIGNATURE);
- final ClassFileAttribute runtimeVisibleAnnotationsAttribute = Utility.getAttribute(methodInfo, AttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS);
- final ClassFileAttribute runtimeInvisibleAnnotationsAttribute = Utility.getAttribute(methodInfo, AttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS);
- final ClassFileAttribute runtimeVisibleParameterAnnotationsAttribute = Utility.getAttribute(methodInfo, AttributeNamesConstants.RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS);
- final ClassFileAttribute runtimeInvisibleParameterAnnotationsAttribute = Utility.getAttribute(methodInfo, AttributeNamesConstants.RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS);
- final ClassFileAttribute annotationDefaultAttribute = Utility.getAttribute(methodInfo, AttributeNamesConstants.ANNOTATION_DEFAULT);
- if (checkMode(mode, DETAILED)) {
- buffer.append(NLS.bind(Messages.classfileformat_methoddescriptor, new String[] {new String(methodDescriptor)}));
- if (methodInfo.isDeprecated()) {
- buffer.append(Messages.disassembler_deprecated);
- }
- writeNewLine(buffer, lineSeparator, tabNumber);
- if (signatureAttribute != null) {
- buffer.append(NLS.bind(Messages.disassembler_signatureattributeheader, new String(signatureAttribute.getSignature())));
- writeNewLine(buffer, lineSeparator, tabNumber);
- }
- if (codeAttribute != null) {
- buffer.append(NLS.bind(Messages.classfileformat_stacksAndLocals, new String[] {Integer.toString(codeAttribute.getMaxStack()), Integer.toString(codeAttribute.getMaxLocals())}));
- writeNewLine(buffer, lineSeparator, tabNumber);
- }
- // disassemble compact version of annotations
- if (runtimeInvisibleAnnotationsAttribute != null) {
- disassembleAsModifier((RuntimeInvisibleAnnotationsAttribute) runtimeInvisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
- writeNewLine(buffer, lineSeparator, tabNumber);
- }
- if (runtimeVisibleAnnotationsAttribute != null) {
- disassembleAsModifier((RuntimeVisibleAnnotationsAttribute) runtimeVisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
- writeNewLine(buffer, lineSeparator, tabNumber);
- }
- }
- final int accessFlags = methodInfo.getAccessFlags();
- decodeModifiersForMethod(buffer, accessFlags);
- if (methodInfo.isSynthetic()) {
- buffer.append("synthetic"); //$NON-NLS-1$
- buffer.append(Messages.disassembler_space);
- }
- CharOperation.replace(methodDescriptor, '/', '.');
- final boolean isVarArgs = isVarArgs(methodInfo);
- char[] methodHeader = null;
- if (methodInfo.isConstructor()) {
- methodHeader = Signature.toCharArray(methodDescriptor, returnClassName(className, '.', COMPACT), null, !checkMode(mode, COMPACT), false, isVarArgs);
- } else if (methodInfo.isClinit()) {
- methodHeader = Messages.classfileformat_clinitname.toCharArray();
- } else {
- methodHeader = Signature.toCharArray(methodDescriptor, methodInfo.getName(), null, !checkMode(mode, COMPACT), true, isVarArgs);
- }
- if (checkMode(mode, DETAILED) && (runtimeInvisibleParameterAnnotationsAttribute != null || runtimeVisibleParameterAnnotationsAttribute != null)) {
- ParameterAnnotation[] invisibleParameterAnnotations = null;
- ParameterAnnotation[] visibleParameterAnnotations = null;
- int length = -1;
- if (runtimeInvisibleParameterAnnotationsAttribute != null) {
- RuntimeInvisibleParameterAnnotationsAttribute attribute = (RuntimeInvisibleParameterAnnotationsAttribute) runtimeInvisibleParameterAnnotationsAttribute;
- invisibleParameterAnnotations = attribute.getParameterAnnotations();
- length = invisibleParameterAnnotations.length;
- }
- if (runtimeVisibleParameterAnnotationsAttribute != null) {
- RuntimeVisibleParameterAnnotationsAttribute attribute = (RuntimeVisibleParameterAnnotationsAttribute) runtimeVisibleParameterAnnotationsAttribute;
- visibleParameterAnnotations = attribute.getParameterAnnotations();
- length = visibleParameterAnnotations.length;
- }
- int insertionPosition = CharOperation.indexOf('(', methodHeader) + 1;
- int start = 0;
- StringBuffer stringBuffer = new StringBuffer();
- stringBuffer.append(methodHeader, 0, insertionPosition);
- for (int i = 0; i < length; i++) {
- if (i > 0) {
- stringBuffer.append(' ');
- }
- int stringBufferSize = stringBuffer.length();
- if (runtimeVisibleParameterAnnotationsAttribute != null) {
- disassembleAsModifier((RuntimeVisibleParameterAnnotationsAttribute) runtimeVisibleParameterAnnotationsAttribute, stringBuffer, i, lineSeparator, tabNumber, mode);
- }
- if (runtimeInvisibleParameterAnnotationsAttribute != null) {
- if (stringBuffer.length() != stringBufferSize) {
- stringBuffer.append(' ');
- stringBufferSize = stringBuffer.length();
- }
- disassembleAsModifier((RuntimeInvisibleParameterAnnotationsAttribute) runtimeInvisibleParameterAnnotationsAttribute, stringBuffer, i, lineSeparator, tabNumber, mode);
- }
- if (i == 0 && stringBuffer.length() != stringBufferSize) {
- stringBuffer.append(' ');
- }
- start = insertionPosition;
- insertionPosition = CharOperation.indexOf(',', methodHeader, start + 1) + 1;
- if (insertionPosition == 0) {
- stringBuffer.append(methodHeader, start, methodHeader.length - start);
- } else {
- stringBuffer.append(methodHeader, start, insertionPosition - start);
- }
- }
- buffer.append(stringBuffer);
- } else {
- buffer.append(methodHeader);
- }
- ExceptionAttribute exceptionAttribute = methodInfo.getExceptionAttribute();
- if (exceptionAttribute != null) {
- buffer.append(" throws "); //$NON-NLS-1$
- char[][] exceptionNames = exceptionAttribute.getExceptionNames();
- int length = exceptionNames.length;
- for (int i = 0; i < length; i++) {
- if (i != 0) {
- buffer.append(Messages.disassembler_comma).append(Messages.disassembler_space);
- }
- char[] exceptionName = exceptionNames[i];
- CharOperation.replace(exceptionName, '/', '.');
- buffer.append(returnClassName(exceptionName, '.', mode));
- }
- }
- if (checkMode(mode, DETAILED)) {
- if (annotationDefaultAttribute != null) {
- buffer.append(" default "); //$NON-NLS-1$
- disassembleAsModifier((AnnotationDefaultAttribute) annotationDefaultAttribute, buffer, lineSeparator, tabNumber, mode);
- }
- }
- buffer.append(Messages.disassembler_endofmethodheader);
-
- if (checkMode(mode, DETAILED)) {
- if (codeAttribute != null) {
- disassemble(codeAttribute, methodDescriptor, (accessFlags & IModifierConstants.ACC_STATIC) != 0, buffer, lineSeparator, tabNumber, mode);
- }
- if (annotationDefaultAttribute != null) {
- disassemble((AnnotationDefaultAttribute) annotationDefaultAttribute, buffer, lineSeparator, tabNumber, mode);
- }
- if (runtimeVisibleAnnotationsAttribute != null) {
- disassemble((RuntimeVisibleAnnotationsAttribute) runtimeVisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
- }
- if (runtimeInvisibleAnnotationsAttribute != null) {
- disassemble((RuntimeInvisibleAnnotationsAttribute) runtimeInvisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
- }
- if (runtimeVisibleParameterAnnotationsAttribute != null) {
- disassemble((RuntimeVisibleParameterAnnotationsAttribute) runtimeVisibleParameterAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
- }
- if (runtimeInvisibleParameterAnnotationsAttribute != null) {
- disassemble((RuntimeInvisibleParameterAnnotationsAttribute) runtimeInvisibleParameterAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
- }
- }
- }
-
- /**
- * Answers back the disassembled string of the ClassFileReader according to the
- * mode.
- * This is an output quite similar to the javap tool.
- *
- * @param classFileReader The classFileReader to be disassembled
- * @param lineSeparator the line separator to use.
- * @param mode the mode used to disassemble the ClassFileReader
- *
- * @return the disassembled string of the ClassFileReader according to the mode
- */
- private String disassemble(ClassFileReader classFileReader, String lineSeparator, int mode) {
- if (classFileReader == null)
- return Utility.EMPTY_STRING;
- char[] className = classFileReader.getClassName();
- if (className == null) {
- // incomplete initialization. We cannot go further.
- return Utility.EMPTY_STRING;
- }
- className = CharOperation.replaceOnCopy(className, '/', '.');
- final int accessFlags = classFileReader.getAccessFlags();
- final boolean isEnum = (accessFlags & IModifierConstants.ACC_ENUM) != 0;
-
- StringBuffer buffer = new StringBuffer();
- SourceFileAttribute sourceAttribute = classFileReader.getSourceFileAttribute();
- ClassFileAttribute classFileAttribute = Utility.getAttribute(classFileReader, AttributeNamesConstants.SIGNATURE);
- SignatureAttribute signatureAttribute = (SignatureAttribute) classFileAttribute;
- if (checkMode(mode, DETAILED)) {
- int minorVersion = classFileReader.getMinorVersion();
- int majorVersion = classFileReader.getMajorVersion();
- buffer.append(Messages.disassembler_begincommentline);
- if (sourceAttribute != null) {
- buffer.append(Messages.disassembler_sourceattributeheader);
- buffer.append(sourceAttribute.getSourceFileName());
- }
- String versionNumber = VERSION_UNKNOWN;
- if (minorVersion == 3 && majorVersion == 45) {
- versionNumber = IModifierConstants.VERSION_1_1;
- } else if (minorVersion == 0 && majorVersion == 46) {
- versionNumber = IModifierConstants.VERSION_1_2;
- } else if (minorVersion == 0 && majorVersion == 47) {
- versionNumber = IModifierConstants.VERSION_1_3;
- } else if (minorVersion == 0 && majorVersion == 48) {
- versionNumber = IModifierConstants.VERSION_1_4;
- } else if (minorVersion == 0 && majorVersion == 49) {
- versionNumber = IModifierConstants.VERSION_1_5;
- } else if (minorVersion == 0 && majorVersion == 50) {
- versionNumber = IModifierConstants.VERSION_1_6;
- } else if (minorVersion == 0 && majorVersion == 51) {
- versionNumber = IModifierConstants.VERSION_1_7;
- }
- buffer.append(NLS.bind(Messages.classfileformat_versiondetails, new String[] {versionNumber, Integer.toString(majorVersion), Integer.toString(minorVersion), ((accessFlags & IModifierConstants.ACC_SUPER) != 0 ? Messages.classfileformat_superflagisset : Messages.classfileformat_superflagisnotset) + (isDeprecated(classFileReader) ? ", deprecated" : Utility.EMPTY_STRING)//$NON-NLS-1$
- }));
- writeNewLine(buffer, lineSeparator, 0);
- if (signatureAttribute != null) {
- buffer.append(NLS.bind(Messages.disassembler_signatureattributeheader, new String(signatureAttribute.getSignature())));
- writeNewLine(buffer, lineSeparator, 0);
- }
- }
-
- InnerClassesAttribute innerClassesAttribute = classFileReader.getInnerClassesAttribute();
- ClassFileAttribute runtimeVisibleAnnotationsAttribute = Utility.getAttribute(classFileReader, AttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS);
- ClassFileAttribute runtimeInvisibleAnnotationsAttribute = Utility.getAttribute(classFileReader, AttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS);
-
- if (checkMode(mode, DETAILED)) {
- // disassemble compact version of annotations
- if (runtimeInvisibleAnnotationsAttribute != null) {
- disassembleAsModifier((RuntimeInvisibleAnnotationsAttribute) runtimeInvisibleAnnotationsAttribute, buffer, lineSeparator, 0, mode);
- writeNewLine(buffer, lineSeparator, 0);
- }
- if (runtimeVisibleAnnotationsAttribute != null) {
- disassembleAsModifier((RuntimeVisibleAnnotationsAttribute) runtimeVisibleAnnotationsAttribute, buffer, lineSeparator, 0, mode);
- writeNewLine(buffer, lineSeparator, 0);
- }
- }
- boolean decoded = false;
- if (innerClassesAttribute != null) {
- // search the right entry
- InnerClassesAttributeEntry[] entries = innerClassesAttribute.getInnerClassAttributesEntries();
- for (int i = 0, max = entries.length; i < max; i++) {
- InnerClassesAttributeEntry entry = entries[i];
- char[] innerClassName = entry.getInnerClassName();
- if (innerClassName != null) {
- if (Arrays.equals(classFileReader.getClassName(), innerClassName)) {
- decodeModifiersForInnerClasses(buffer, entry.getAccessFlags(), false);
- decoded = true;
- }
- }
- }
- }
- if (!decoded) {
- decodeModifiersForType(buffer, accessFlags);
- if (isSynthetic(classFileReader)) {
- buffer.append("synthetic"); //$NON-NLS-1$
- buffer.append(Messages.disassembler_space);
- }
- }
-
- final boolean isAnnotation = (accessFlags & IModifierConstants.ACC_ANNOTATION) != 0;
- boolean isInterface = false;
- if (isEnum) {
- buffer.append("enum "); //$NON-NLS-1$
- } else if (classFileReader.isClass()) {
- buffer.append("class "); //$NON-NLS-1$
- } else {
- if (isAnnotation) {
- buffer.append("@"); //$NON-NLS-1$
- }
- buffer.append("interface "); //$NON-NLS-1$
- isInterface = true;
- }
-
- buffer.append(className);
-
- char[] superclassName = classFileReader.getSuperclassName();
- if (superclassName != null) {
- CharOperation.replace(superclassName, '/', '.');
- if (!isJavaLangObject(superclassName) && !isEnum) {
- buffer.append(" extends "); //$NON-NLS-1$
- buffer.append(returnClassName(superclassName, '.', mode));
- }
- }
- if (!isAnnotation) {
- char[][] superclassInterfaces = classFileReader.getInterfaceNames();
- int length = superclassInterfaces.length;
- if (length != 0) {
- if (isInterface) {
- buffer.append(" extends "); //$NON-NLS-1$
- } else {
- buffer.append(" implements "); //$NON-NLS-1$
- }
- for (int i = 0; i < length; i++) {
- if (i != 0) {
- buffer.append(Messages.disassembler_comma).append(Messages.disassembler_space);
- }
- char[] superinterface = superclassInterfaces[i];
- CharOperation.replace(superinterface, '/', '.');
- buffer.append(returnClassName(superinterface, '.', mode));
- }
- }
- }
- buffer.append(Messages.disassembler_opentypedeclaration);
- disassembleTypeMembers(classFileReader, className, buffer, lineSeparator, 1, mode, isEnum);
- if (checkMode(mode, DETAILED)) {
- ClassFileAttribute[] attributes = classFileReader.getAttributes();
- int length = attributes.length;
- EnclosingMethodAttribute enclosingMethodAttribute = getEnclosingMethodAttribute(classFileReader);
- int remainingAttributesLength = length;
- if (innerClassesAttribute != null) {
- remainingAttributesLength--;
- }
- if (enclosingMethodAttribute != null) {
- remainingAttributesLength--;
- }
- if (sourceAttribute != null) {
- remainingAttributesLength--;
- }
- if (signatureAttribute != null) {
- remainingAttributesLength--;
- }
- if (innerClassesAttribute != null || enclosingMethodAttribute != null || remainingAttributesLength != 0) {
- writeNewLine(buffer, lineSeparator, 0);
- }
- if (innerClassesAttribute != null) {
- disassemble(innerClassesAttribute, buffer, lineSeparator, 1);
- }
- if (enclosingMethodAttribute != null) {
- disassemble(enclosingMethodAttribute, buffer, lineSeparator, 0);
- }
- if (runtimeVisibleAnnotationsAttribute != null) {
- disassemble((RuntimeVisibleAnnotationsAttribute) runtimeVisibleAnnotationsAttribute, buffer, lineSeparator, 0, mode);
- }
- if (runtimeInvisibleAnnotationsAttribute != null) {
- disassemble((RuntimeInvisibleAnnotationsAttribute) runtimeInvisibleAnnotationsAttribute, buffer, lineSeparator, 0, mode);
- }
- }
- writeNewLine(buffer, lineSeparator, 0);
- buffer.append(Messages.disassembler_closetypedeclaration);
- return buffer.toString();
- }
-
- private boolean isJavaLangObject(final char[] className) {
- return Arrays.equals(TypeConstants.JAVA_LANG_OBJECT, CharOperation.splitOn('.', className));
- }
-
- private boolean isVarArgs(MethodInfo methodInfo) {
- int accessFlags = methodInfo.getAccessFlags();
- if ((accessFlags & IModifierConstants.ACC_VARARGS) != 0)
- return true;
- // check the presence of the unspecified Varargs attribute
- return Utility.getAttribute(methodInfo, AttributeNamesConstants.VAR_ARGS) != null;
- }
-
- private void disassemble(CodeAttribute codeAttribute, char[] methodDescriptor, boolean isStatic, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
- writeNewLine(buffer, lineSeparator, tabNumber - 1);
- DefaultBytecodeVisitor visitor = new DefaultBytecodeVisitor(codeAttribute, methodDescriptor, isStatic, buffer, lineSeparator, tabNumber, mode);
- try {
- codeAttribute.traverse(visitor);
- } catch (ClassFormatException e) {
- dumpTab(tabNumber + 2, buffer);
- buffer.append(Messages.classformat_classformatexception);
- writeNewLine(buffer, lineSeparator, tabNumber + 1);
- }
- final int exceptionTableLength = codeAttribute.getExceptionTableLength();
- if (exceptionTableLength != 0) {
- final int tabNumberForExceptionAttribute = tabNumber + 2;
- dumpTab(tabNumberForExceptionAttribute, buffer);
- final ExceptionTableEntry[] exceptionTableEntries = codeAttribute.getExceptionTable();
- buffer.append(Messages.disassembler_exceptiontableheader);
- writeNewLine(buffer, lineSeparator, tabNumberForExceptionAttribute + 1);
- for (int i = 0; i < exceptionTableLength; i++) {
- if (i != 0) {
- writeNewLine(buffer, lineSeparator, tabNumberForExceptionAttribute + 1);
- }
- ExceptionTableEntry exceptionTableEntry = exceptionTableEntries[i];
- char[] catchType;
- if (exceptionTableEntry.getCatchTypeIndex() != 0) {
- catchType = exceptionTableEntry.getCatchType();
- CharOperation.replace(catchType, '/', '.');
- catchType = returnClassName(catchType, '.', mode);
- } else {
- catchType = ANY_EXCEPTION;
- }
- buffer.append(NLS.bind(Messages.classfileformat_exceptiontableentry, new String[] {Integer.toString(exceptionTableEntry.getStartPC()), Integer.toString(exceptionTableEntry.getEndPC()), Integer.toString(exceptionTableEntry.getHandlerPC()), new String(catchType),}));
- }
- }
- }
-
- private void disassemble(EnclosingMethodAttribute enclosingMethodAttribute, StringBuffer buffer, String lineSeparator, int tabNumber) {
- writeNewLine(buffer, lineSeparator, tabNumber + 1);
- buffer.append(Messages.disassembler_enclosingmethodheader);
- buffer.append(" ")//$NON-NLS-1$
- .append(enclosingMethodAttribute.getEnclosingClass());
- if (enclosingMethodAttribute.getMethodNameAndTypeIndex() != 0) {
- buffer.append(".")//$NON-NLS-1$
- .append(enclosingMethodAttribute.getMethodName()).append(enclosingMethodAttribute.getMethodDescriptor());
- }
- }
-
- /**
- * Disassemble a field info
- */
- private void disassemble(FieldInfo fieldInfo, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
- writeNewLine(buffer, lineSeparator, tabNumber);
- final char[] fieldDescriptor = fieldInfo.getDescriptor();
- final SignatureAttribute signatureAttribute = (SignatureAttribute) Utility.getAttribute(fieldInfo, AttributeNamesConstants.SIGNATURE);
- if (checkMode(mode, DETAILED)) {
- buffer.append(NLS.bind(Messages.classfileformat_fieldddescriptor, new String[] {new String(fieldDescriptor)}));
- if (fieldInfo.isDeprecated()) {
- buffer.append(Messages.disassembler_deprecated);
- }
- writeNewLine(buffer, lineSeparator, tabNumber);
- if (signatureAttribute != null) {
- buffer.append(NLS.bind(Messages.disassembler_signatureattributeheader, new String(signatureAttribute.getSignature())));
- writeNewLine(buffer, lineSeparator, tabNumber);
- }
- }
- final ClassFileAttribute runtimeVisibleAnnotationsAttribute = Utility.getAttribute(fieldInfo, AttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS);
- final ClassFileAttribute runtimeInvisibleAnnotationsAttribute = Utility.getAttribute(fieldInfo, AttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS);
- if (checkMode(mode, DETAILED)) {
- // disassemble compact version of annotations
- if (runtimeInvisibleAnnotationsAttribute != null) {
- disassembleAsModifier((RuntimeInvisibleAnnotationsAttribute) runtimeInvisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
- writeNewLine(buffer, lineSeparator, tabNumber);
- }
- if (runtimeVisibleAnnotationsAttribute != null) {
- disassembleAsModifier((RuntimeVisibleAnnotationsAttribute) runtimeVisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
- writeNewLine(buffer, lineSeparator, tabNumber);
- }
- }
- decodeModifiersForField(buffer, fieldInfo.getAccessFlags());
- if (fieldInfo.isSynthetic()) {
- buffer.append("synthetic"); //$NON-NLS-1$
- buffer.append(Messages.disassembler_space);
- }
- buffer.append(returnClassName(getSignatureForField(fieldDescriptor), '.', mode));
- buffer.append(' ');
- buffer.append(new String(fieldInfo.getName()));
- ConstantValueAttribute constantValueAttribute = fieldInfo.getConstantValueAttribute();
- if (constantValueAttribute != null) {
- buffer.append(Messages.disassembler_fieldhasconstant);
- ConstantPoolEntry constantPoolEntry = constantValueAttribute.getConstantValue();
- switch (constantPoolEntry.getKind()) {
- case ConstantPoolConstant.CONSTANT_Long :
- buffer.append(constantPoolEntry.getLongValue() + "L"); //$NON-NLS-1$
- break;
- case ConstantPoolConstant.CONSTANT_Float :
- buffer.append(constantPoolEntry.getFloatValue() + "f"); //$NON-NLS-1$
- break;
- case ConstantPoolConstant.CONSTANT_Double :
- buffer.append(constantPoolEntry.getDoubleValue());
- break;
- case ConstantPoolConstant.CONSTANT_Integer :
- switch (fieldDescriptor[0]) {
- case 'C' :
- buffer.append("'" + (char) constantPoolEntry.getIntegerValue() + "'"); //$NON-NLS-1$//$NON-NLS-2$
- break;
- case 'Z' :
- buffer.append(constantPoolEntry.getIntegerValue() == 1 ? "true" : "false");//$NON-NLS-1$//$NON-NLS-2$
- break;
- case 'B' :
- buffer.append(constantPoolEntry.getIntegerValue());
- break;
- case 'S' :
- buffer.append(constantPoolEntry.getIntegerValue());
- break;
- case 'I' :
- buffer.append(constantPoolEntry.getIntegerValue());
- }
- break;
- case ConstantPoolConstant.CONSTANT_String :
- buffer.append("\"" + decodeStringValue(constantPoolEntry.getStringValue()) + "\"");//$NON-NLS-1$//$NON-NLS-2$
- }
- }
- buffer.append(Messages.disassembler_endoffieldheader);
- if (checkMode(mode, DETAILED)) {
- if (runtimeVisibleAnnotationsAttribute != null) {
- disassemble((RuntimeVisibleAnnotationsAttribute) runtimeVisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
- }
- if (runtimeInvisibleAnnotationsAttribute != null) {
- disassemble((RuntimeInvisibleAnnotationsAttribute) runtimeInvisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
- }
- }
- }
-
- private void disassemble(InnerClassesAttribute innerClassesAttribute, StringBuffer buffer, String lineSeparator, int tabNumber) {
- writeNewLine(buffer, lineSeparator, tabNumber);
- buffer.append(Messages.disassembler_innerattributesheader);
- writeNewLine(buffer, lineSeparator, tabNumber + 1);
- InnerClassesAttributeEntry[] innerClassesAttributeEntries = innerClassesAttribute.getInnerClassAttributesEntries();
- int length = innerClassesAttributeEntries.length;
- int innerClassNameIndex, outerClassNameIndex, innerNameIndex, accessFlags;
- InnerClassesAttributeEntry innerClassesAttributeEntry;
- for (int i = 0; i < length; i++) {
- if (i != 0) {
- buffer.append(Messages.disassembler_comma);
- writeNewLine(buffer, lineSeparator, tabNumber + 1);
- }
- innerClassesAttributeEntry = innerClassesAttributeEntries[i];
- innerClassNameIndex = innerClassesAttributeEntry.getInnerClassNameIndex();
- outerClassNameIndex = innerClassesAttributeEntry.getOuterClassNameIndex();
- innerNameIndex = innerClassesAttributeEntry.getInnerNameIndex();
- accessFlags = innerClassesAttributeEntry.getAccessFlags();
- buffer.append(Messages.disassembler_openinnerclassentry).append(Messages.disassembler_inner_class_info_name);
- if (innerClassNameIndex != 0) {
- buffer.append(Messages.disassembler_space).append(innerClassesAttributeEntry.getInnerClassName());
- }
- buffer.append(Messages.disassembler_comma).append(Messages.disassembler_space).append(Messages.disassembler_outer_class_info_name);
- if (outerClassNameIndex != 0) {
- buffer.append(Messages.disassembler_space).append(innerClassesAttributeEntry.getOuterClassName());
- }
- writeNewLine(buffer, lineSeparator, tabNumber);
- dumpTab(tabNumber, buffer);
- buffer.append(Messages.disassembler_space);
- buffer.append(Messages.disassembler_inner_name);
- if (innerNameIndex != 0) {
- buffer.append(Messages.disassembler_space).append(innerClassesAttributeEntry.getInnerName());
- }
- buffer.append(Messages.disassembler_comma).append(Messages.disassembler_space).append(Messages.disassembler_inner_accessflags).append(accessFlags).append(Messages.disassembler_space);
- decodeModifiersForInnerClasses(buffer, accessFlags, true);
- buffer.append(Messages.disassembler_closeinnerclassentry);
- }
- }
-
- private void disassemble(int index, ParameterAnnotation parameterAnnotation, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
- Annotation[] annotations = parameterAnnotation.getAnnotations();
- writeNewLine(buffer, lineSeparator, tabNumber + 1);
- buffer.append(NLS.bind(Messages.disassembler_parameterannotationentrystart, new String[] {Integer.toString(index), Integer.toString(annotations.length)}));
- for (int i = 0, max = annotations.length; i < max; i++) {
- disassemble(annotations[i], buffer, lineSeparator, tabNumber + 1, mode);
- }
- }
-
- private void disassemble(RuntimeInvisibleAnnotationsAttribute runtimeInvisibleAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
- writeNewLine(buffer, lineSeparator, tabNumber + 1);
- buffer.append(Messages.disassembler_runtimeinvisibleannotationsattributeheader);
- Annotation[] annotations = runtimeInvisibleAnnotationsAttribute.getAnnotations();
- for (int i = 0, max = annotations.length; i < max; i++) {
- disassemble(annotations[i], buffer, lineSeparator, tabNumber + 1, mode);
- }
- }
-
- private void disassemble(RuntimeInvisibleParameterAnnotationsAttribute runtimeInvisibleParameterAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
- writeNewLine(buffer, lineSeparator, tabNumber + 1);
- buffer.append(Messages.disassembler_runtimeinvisibleparameterannotationsattributeheader);
- ParameterAnnotation[] parameterAnnotations = runtimeInvisibleParameterAnnotationsAttribute.getParameterAnnotations();
- for (int i = 0, max = parameterAnnotations.length; i < max; i++) {
- disassemble(i, parameterAnnotations[i], buffer, lineSeparator, tabNumber + 1, mode);
- }
- }
-
- private void disassemble(RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
- writeNewLine(buffer, lineSeparator, tabNumber + 1);
- buffer.append(Messages.disassembler_runtimevisibleannotationsattributeheader);
- Annotation[] annotations = runtimeVisibleAnnotationsAttribute.getAnnotations();
- for (int i = 0, max = annotations.length; i < max; i++) {
- disassemble(annotations[i], buffer, lineSeparator, tabNumber + 1, mode);
- }
- }
-
- private void disassemble(RuntimeVisibleParameterAnnotationsAttribute runtimeVisibleParameterAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
- writeNewLine(buffer, lineSeparator, tabNumber + 1);
- buffer.append(Messages.disassembler_runtimevisibleparameterannotationsattributeheader);
- ParameterAnnotation[] parameterAnnotations = runtimeVisibleParameterAnnotationsAttribute.getParameterAnnotations();
- for (int i = 0, max = parameterAnnotations.length; i < max; i++) {
- disassemble(i, parameterAnnotations[i], buffer, lineSeparator, tabNumber + 1, mode);
- }
- }
-
- private void disassembleAsModifier(Annotation annotation, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
- final char[] typeName = CharOperation.replaceOnCopy(annotation.getTypeName(), '/', '.');
- buffer.append('@').append(returnClassName(Signature.toCharArray(typeName), '.', mode));
- final AnnotationComponent[] components = annotation.getComponents();
- final int length = components.length;
- if (length != 0) {
- buffer.append('(');
- for (int i = 0; i < length; i++) {
- if (i > 0) {
- buffer.append(',');
- writeNewLine(buffer, lineSeparator, tabNumber);
- }
- disassembleAsModifier(components[i], buffer, lineSeparator, tabNumber + 1, mode);
- }
- buffer.append(')');
- }
- }
-
- private void disassembleAsModifier(AnnotationComponent annotationComponent, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
- buffer.append(annotationComponent.getComponentName()).append('=');
- disassembleAsModifier(annotationComponent.getComponentValue(), buffer, lineSeparator, tabNumber + 1, mode);
- }
-
- private void disassembleAsModifier(AnnotationComponentValue annotationComponentValue, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
- switch (annotationComponentValue.getTag()) {
- case AnnotationComponentValue.BYTE_TAG :
- case AnnotationComponentValue.CHAR_TAG :
- case AnnotationComponentValue.DOUBLE_TAG :
- case AnnotationComponentValue.FLOAT_TAG :
- case AnnotationComponentValue.INTEGER_TAG :
- case AnnotationComponentValue.LONG_TAG :
- case AnnotationComponentValue.SHORT_TAG :
- case AnnotationComponentValue.BOOLEAN_TAG :
- case AnnotationComponentValue.STRING_TAG :
- ConstantPoolEntry constantPoolEntry = annotationComponentValue.getConstantValue();
- String value = null;
- switch (constantPoolEntry.getKind()) {
- case ConstantPoolConstant.CONSTANT_Long :
- value = constantPoolEntry.getLongValue() + "L"; //$NON-NLS-1$
- break;
- case ConstantPoolConstant.CONSTANT_Float :
- value = constantPoolEntry.getFloatValue() + "f"; //$NON-NLS-1$
- break;
- case ConstantPoolConstant.CONSTANT_Double :
- value = Double.toString(constantPoolEntry.getDoubleValue());
- break;
- case ConstantPoolConstant.CONSTANT_Integer :
- switch (annotationComponentValue.getTag()) {
- case AnnotationComponentValue.CHAR_TAG :
- value = "'" + (char) constantPoolEntry.getIntegerValue() + "'"; //$NON-NLS-1$//$NON-NLS-2$
- break;
- case AnnotationComponentValue.BOOLEAN_TAG :
- value = constantPoolEntry.getIntegerValue() == 1 ? "true" : "false";//$NON-NLS-1$//$NON-NLS-2$
- break;
- case AnnotationComponentValue.BYTE_TAG :
- value = "(byte) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
- break;
- case AnnotationComponentValue.SHORT_TAG :
- value = "(short) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
- break;
- case AnnotationComponentValue.INTEGER_TAG :
- value = "(int) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
- }
- break;
- case ConstantPoolConstant.CONSTANT_Utf8 :
- value = "\"" + decodeStringValue(constantPoolEntry.getUtf8Value()) + "\"";//$NON-NLS-1$//$NON-NLS-2$
- }
- buffer.append(value);
- break;
- case AnnotationComponentValue.ENUM_TAG :
- final char[] typeName = CharOperation.replaceOnCopy(annotationComponentValue.getEnumConstantTypeName(), '/', '.');
- final char[] constantName = annotationComponentValue.getEnumConstantName();
- buffer.append(returnClassName(Signature.toCharArray(typeName), '.', mode)).append('.').append(constantName);
- break;
- case AnnotationComponentValue.CLASS_TAG :
- constantPoolEntry = annotationComponentValue.getClassInfo();
- final char[] className = CharOperation.replaceOnCopy(constantPoolEntry.getUtf8Value(), '/', '.');
- buffer.append(returnClassName(Signature.toCharArray(className), '.', mode));
- break;
- case AnnotationComponentValue.ANNOTATION_TAG :
- Annotation annotation = annotationComponentValue.getAnnotationValue();
- disassembleAsModifier(annotation, buffer, lineSeparator, tabNumber + 1, mode);
- break;
- case AnnotationComponentValue.ARRAY_TAG :
- final AnnotationComponentValue[] annotationComponentValues = annotationComponentValue.getAnnotationComponentValues();
- buffer.append('{');
- for (int i = 0, max = annotationComponentValues.length; i < max; i++) {
- if (i > 0) {
- buffer.append(',');
- }
- disassembleAsModifier(annotationComponentValues[i], buffer, lineSeparator, tabNumber + 1, mode);
- }
- buffer.append('}');
- }
- }
-
- private void disassembleAsModifier(AnnotationDefaultAttribute annotationDefaultAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
- AnnotationComponentValue componentValue = annotationDefaultAttribute.getMemberValue();
- disassembleAsModifier(componentValue, buffer, lineSeparator, tabNumber + 1, mode);
- }
-
- private void disassembleAsModifier(RuntimeInvisibleAnnotationsAttribute runtimeInvisibleAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
- Annotation[] annotations = runtimeInvisibleAnnotationsAttribute.getAnnotations();
- for (int i = 0, max = annotations.length; i < max; i++) {
- disassembleAsModifier(annotations[i], buffer, lineSeparator, tabNumber + 1, mode);
- }
- }
-
- private void disassembleAsModifier(RuntimeInvisibleParameterAnnotationsAttribute runtimeInvisibleParameterAnnotationsAttribute, StringBuffer buffer, int index, String lineSeparator, int tabNumber, int mode) {
- ParameterAnnotation[] parameterAnnotations = runtimeInvisibleParameterAnnotationsAttribute.getParameterAnnotations();
- if (parameterAnnotations.length > index) {
- disassembleAsModifier(parameterAnnotations[index], buffer, lineSeparator, tabNumber + 1, mode);
- }
- }
-
- private void disassembleAsModifier(RuntimeVisibleParameterAnnotationsAttribute runtimeVisibleParameterAnnotationsAttribute, StringBuffer buffer, int index, String lineSeparator, int tabNumber, int mode) {
- ParameterAnnotation[] parameterAnnotations = runtimeVisibleParameterAnnotationsAttribute.getParameterAnnotations();
- if (parameterAnnotations.length > index) {
- disassembleAsModifier(parameterAnnotations[index], buffer, lineSeparator, tabNumber + 1, mode);
- }
- }
-
- private void disassembleAsModifier(ParameterAnnotation parameterAnnotation, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
- Annotation[] annotations = parameterAnnotation.getAnnotations();
- for (int i = 0, max = annotations.length; i < max; i++) {
- if (i > 0) {
- buffer.append(' ');
- }
- disassembleAsModifier(annotations[i], buffer, lineSeparator, tabNumber + 1, mode);
- }
- }
-
- private void disassembleAsModifier(RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
- Annotation[] annotations = runtimeVisibleAnnotationsAttribute.getAnnotations();
- for (int i = 0, max = annotations.length; i < max; i++) {
- if (i > 0) {
- writeNewLine(buffer, lineSeparator, tabNumber);
- }
- disassembleAsModifier(annotations[i], buffer, lineSeparator, tabNumber + 1, mode);
- }
- }
-
- private void disassembleTypeMembers(ClassFileReader classFileReader, char[] className, StringBuffer buffer, String lineSeparator, int tabNumber, int mode, boolean isEnum) {
- FieldInfo[] fields = classFileReader.getFieldInfos();
- // sort fields
- Arrays.sort(fields, new Comparator() {
- public int compare(Object o1, Object o2) {
- FieldInfo fieldInfo1 = (FieldInfo) o1;
- FieldInfo fieldInfo2 = (FieldInfo) o2;
- int compare = new String(fieldInfo1.getName()).compareTo(new String(fieldInfo2.getName()));
- if (compare == 0) {
- return new String(fieldInfo1.getDescriptor()).compareTo(new String(fieldInfo2.getDescriptor()));
- }
- return compare;
- }
- });
- for (int i = 0, max = fields.length; i < max; i++) {
- writeNewLine(buffer, lineSeparator, tabNumber);
- disassemble(fields[i], buffer, lineSeparator, tabNumber, mode);
- }
- MethodInfo[] methods = classFileReader.getMethodInfos();
- // sort methods
- Arrays.sort(methods, new Comparator() {
- public int compare(Object o1, Object o2) {
- MethodInfo methodInfo1 = (MethodInfo) o1;
- MethodInfo methodInfo2 = (MethodInfo) o2;
- int compare = new String(methodInfo1.getName()).compareTo(new String(methodInfo2.getName()));
- if (compare == 0) {
- return new String(methodInfo1.getDescriptor()).compareTo(new String(methodInfo2.getDescriptor()));
- }
- return compare;
- }
- });
- for (int i = 0, max = methods.length; i < max; i++) {
- writeNewLine(buffer, lineSeparator, tabNumber);
- disassemble(classFileReader, className, methods[i], buffer, lineSeparator, tabNumber, mode);
- }
- }
-
- private final void dumpTab(int tabNumber, StringBuffer buffer) {
- for (int i = 0; i < tabNumber; i++) {
- buffer.append(Messages.disassembler_indentation);
- }
- }
-
- private EnclosingMethodAttribute getEnclosingMethodAttribute(ClassFileReader classFileReader) {
- ClassFileAttribute[] attributes = classFileReader.getAttributes();
- for (int i = 0, max = attributes.length; i < max; i++) {
- if (Arrays.equals(attributes[i].getAttributeName(), AttributeNamesConstants.ENCLOSING_METHOD)) {
- return (EnclosingMethodAttribute) attributes[i];
- }
- }
- return null;
- }
-
- private char[] getSignatureForField(char[] fieldDescriptor) {
- char[] newFieldDescriptor = CharOperation.replaceOnCopy(fieldDescriptor, '/', '.');
- newFieldDescriptor = CharOperation.replaceOnCopy(newFieldDescriptor, '$', '%');
- char[] fieldDescriptorSignature = Signature.toCharArray(newFieldDescriptor);
- CharOperation.replace(fieldDescriptorSignature, '%', '$');
- return fieldDescriptorSignature;
- }
-
- private boolean isDeprecated(ClassFileReader classFileReader) {
- ClassFileAttribute[] attributes = classFileReader.getAttributes();
- for (int i = 0, max = attributes.length; i < max; i++) {
- if (Arrays.equals(attributes[i].getAttributeName(), AttributeNamesConstants.DEPRECATED)) {
- return true;
- }
- }
- return false;
- }
-
- private boolean isSynthetic(ClassFileReader classFileReader) {
- int flags = classFileReader.getAccessFlags();
- if ((flags & IModifierConstants.ACC_SYNTHETIC) != 0) {
- return true;
- }
- ClassFileAttribute[] attributes = classFileReader.getAttributes();
- for (int i = 0, max = attributes.length; i < max; i++) {
- if (Arrays.equals(attributes[i].getAttributeName(), AttributeNamesConstants.SYNTHETIC)) {
- return true;
- }
- }
- return false;
- }
-
- private boolean checkMode(int mode, int flag) {
- return (mode & flag) != 0;
- }
-
- private boolean isCompact(int mode) {
- return (mode & Disassembler.COMPACT) != 0;
- }
-
- private char[] returnClassName(char[] classInfoName, char separator, int mode) {
- if (classInfoName.length == 0) {
- return CharOperation.NO_CHAR;
- } else if (isCompact(mode)) {
- int lastIndexOfSlash = CharOperation.lastIndexOf(separator, classInfoName);
- if (lastIndexOfSlash != -1) {
- return CharOperation.subarray(classInfoName, lastIndexOfSlash + 1, classInfoName.length);
- }
- }
- return classInfoName;
- }
-
- private void writeNewLine(StringBuffer buffer, String lineSeparator, int tabNumber) {
- buffer.append(lineSeparator);
- dumpTab(tabNumber, buffer);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/EnclosingMethodAttribute.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/EnclosingMethodAttribute.java
deleted file mode 100644
index f764778fb..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/EnclosingMethodAttribute.java
+++ /dev/null
@@ -1,101 +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.internal.repository.comparator;
-
-public class EnclosingMethodAttribute extends ClassFileAttribute {
-
- private int enclosingClassIndex;
- private char[] enclosingClassName;
- private int methodDescriptorIndex;
- private char[] methodDescriptor;
- private int methodNameIndex;
- private char[] methodName;
- private int methodNameAndTypeIndex;
-
- EnclosingMethodAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
- super(classFileBytes, constantPool, offset);
- int index = u2At(classFileBytes, 6, offset);
- this.enclosingClassIndex = index;
- ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.enclosingClassName = constantPoolEntry.getClassInfoName();
- this.methodNameAndTypeIndex = u2At(classFileBytes, 8, offset);
- if (this.methodNameAndTypeIndex != 0) {
- constantPoolEntry = constantPool.decodeEntry(this.methodNameAndTypeIndex);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_NameAndType) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.methodDescriptorIndex = constantPoolEntry.getNameAndTypeInfoDescriptorIndex();
- this.methodNameIndex = constantPoolEntry.getNameAndTypeInfoNameIndex();
- constantPoolEntry = constantPool.decodeEntry(this.methodDescriptorIndex);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.methodDescriptor = constantPoolEntry.getUtf8Value();
- constantPoolEntry = constantPool.decodeEntry(this.methodNameIndex);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.methodName = constantPoolEntry.getUtf8Value();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getEnclosingClass()
- */
- public char[] getEnclosingClass() {
- return this.enclosingClassName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getMethodDeclaringClassDescriptorIndex()
- */
- public int getEnclosingClassIndex() {
- return this.enclosingClassIndex;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getMethodDescriptor()
- */
- public char[] getMethodDescriptor() {
- return this.methodDescriptor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getMethodDescriptorIndex()
- */
- public int getMethodDescriptorIndex() {
- return this.methodDescriptorIndex;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getMethodName()
- */
- public char[] getMethodName() {
- return this.methodName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getMethodNameIndex()
- */
- public int getMethodNameIndex() {
- return this.methodNameIndex;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getMethodNameAndTypeIndex()
- */
- public int getMethodNameAndTypeIndex() {
- return this.methodNameAndTypeIndex;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ExceptionAttribute.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ExceptionAttribute.java
deleted file mode 100644
index 336aae015..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ExceptionAttribute.java
+++ /dev/null
@@ -1,61 +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.internal.repository.comparator;
-
-public class ExceptionAttribute extends ClassFileAttribute {
- private int exceptionsNumber;
- private char[][] exceptionNames;
- private int[] exceptionIndexes;
-
- ExceptionAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
- super(classFileBytes, constantPool, offset);
- this.exceptionsNumber = u2At(classFileBytes, 6, offset);
- int exceptionLength = this.exceptionsNumber;
- this.exceptionNames = CharOperation.NO_CHAR_CHAR;
- this.exceptionIndexes = Utility.EMPTY_INT_ARRAY;
- if (exceptionLength != 0) {
- this.exceptionNames = new char[exceptionLength][];
- this.exceptionIndexes = new int[exceptionLength];
- }
- int readOffset = 8;
- ConstantPoolEntry constantPoolEntry;
- for (int i = 0; i < exceptionLength; i++) {
- this.exceptionIndexes[i] = u2At(classFileBytes, readOffset, offset);
- constantPoolEntry = constantPool.decodeEntry(this.exceptionIndexes[i]);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.exceptionNames[i] = constantPoolEntry.getClassInfoName();
- readOffset += 2;
- }
- }
-
- /*
- * @see IExceptionAttribute#getExceptionIndexes()
- */
- public int[] getExceptionIndexes() {
- return this.exceptionIndexes;
- }
-
- /*
- * @see IExceptionAttribute#getExceptionNames()
- */
- public char[][] getExceptionNames() {
- return this.exceptionNames;
- }
-
- /*
- * @see IExceptionAttribute#getExceptionsNumber()
- */
- public int getExceptionsNumber() {
- return this.exceptionsNumber;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ExceptionTableEntry.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ExceptionTableEntry.java
deleted file mode 100644
index 6d889cd27..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ExceptionTableEntry.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.p2.internal.repository.comparator;
-
-public class ExceptionTableEntry extends ClassFileStruct {
-
- private int startPC;
- private int endPC;
- private int handlerPC;
- private int catchTypeIndex;
- private char[] catchType;
-
- ExceptionTableEntry(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
- this.startPC = u2At(classFileBytes, 0, offset);
- this.endPC = u2At(classFileBytes, 2, offset);
- this.handlerPC = u2At(classFileBytes, 4, offset);
- this.catchTypeIndex = u2At(classFileBytes, 6, offset);
- if (this.catchTypeIndex != 0) {
- ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(this.catchTypeIndex);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.catchType = constantPoolEntry.getClassInfoName();
- }
- }
-
- /*
- * @see IExceptionTableEntry#getStartPC()
- */
- public int getStartPC() {
- return this.startPC;
- }
-
- /*
- * @see IExceptionTableEntry#getEndPC()
- */
- public int getEndPC() {
- return this.endPC;
- }
-
- /*
- * @see IExceptionTableEntry#getHandlerPC()
- */
- public int getHandlerPC() {
- return this.handlerPC;
- }
-
- /*
- * @see IExceptionTableEntry#getCatchTypeIndex()
- */
- public int getCatchTypeIndex() {
- return this.catchTypeIndex;
- }
-
- /*
- * @see IExceptionTableEntry#getCatchType()
- */
- public char[] getCatchType() {
- return this.catchType;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/FieldInfo.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/FieldInfo.java
deleted file mode 100644
index 9ebd6a86d..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/FieldInfo.java
+++ /dev/null
@@ -1,170 +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.internal.repository.comparator;
-
-import java.util.Arrays;
-
-public class FieldInfo extends ClassFileStruct {
- private int accessFlags;
- private int attributeBytes;
- private ClassFileAttribute[] attributes;
- private int attributesCount;
- private ConstantValueAttribute constantValueAttribute;
- private char[] descriptor;
- private int descriptorIndex;
- private boolean isDeprecated;
- private boolean isSynthetic;
- private char[] name;
- private int nameIndex;
-
- /*
- * @param classFileBytes byte[]
- * @param constantPool IConstantPool
- * @param offset int
- */
- public FieldInfo(byte classFileBytes[], ConstantPool constantPool, int offset) throws ClassFormatException {
- final int flags = u2At(classFileBytes, 0, offset);
- this.accessFlags = flags;
- if ((flags & IModifierConstants.ACC_SYNTHETIC) != 0) {
- this.isSynthetic = true;
- }
- this.nameIndex = u2At(classFileBytes, 2, offset);
- ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(this.nameIndex);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.name = constantPoolEntry.getUtf8Value();
-
- this.descriptorIndex = u2At(classFileBytes, 4, offset);
- constantPoolEntry = constantPool.decodeEntry(this.descriptorIndex);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.descriptor = constantPoolEntry.getUtf8Value();
-
- this.attributesCount = u2At(classFileBytes, 6, offset);
- this.attributes = ClassFileAttribute.NO_ATTRIBUTES;
- int readOffset = 8;
- if (this.attributesCount != 0) {
- this.attributes = new ClassFileAttribute[this.attributesCount];
- }
- int attributesIndex = 0;
- for (int i = 0; i < this.attributesCount; i++) {
- constantPoolEntry = constantPool.decodeEntry(u2At(classFileBytes, readOffset, offset));
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- char[] attributeName = constantPoolEntry.getUtf8Value();
- if (Arrays.equals(attributeName, AttributeNamesConstants.DEPRECATED)) {
- this.isDeprecated = true;
- this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
- } else if (Arrays.equals(attributeName, AttributeNamesConstants.SYNTHETIC)) {
- this.isSynthetic = true;
- this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
- } else if (Arrays.equals(attributeName, AttributeNamesConstants.CONSTANT_VALUE)) {
- this.constantValueAttribute = new ConstantValueAttribute(classFileBytes, constantPool, offset + readOffset);
- this.attributes[attributesIndex++] = this.constantValueAttribute;
- } else if (Arrays.equals(attributeName, AttributeNamesConstants.SIGNATURE)) {
- this.attributes[attributesIndex++] = new SignatureAttribute(classFileBytes, constantPool, offset + readOffset);
- } else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS)) {
- this.attributes[attributesIndex++] = new RuntimeVisibleAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
- } else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS)) {
- this.attributes[attributesIndex++] = new RuntimeInvisibleAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
- } else {
- this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
- }
- readOffset += (6 + u4At(classFileBytes, readOffset + 2, offset));
- }
-
- this.attributeBytes = readOffset;
- }
-
- /*
- * @see IFieldInfo#getAccessFlags()
- */
- public int getAccessFlags() {
- return this.accessFlags;
- }
-
- /*
- * @see IFieldInfo#getAttributeCount()
- */
- public int getAttributeCount() {
- return this.attributesCount;
- }
-
- /*
- * @see IFieldInfo#getAttributes()
- */
- public ClassFileAttribute[] getAttributes() {
- return this.attributes;
- }
-
- /*
- * @see IFieldInfo#getConstantValueAttribute()
- */
- public ConstantValueAttribute getConstantValueAttribute() {
- return this.constantValueAttribute;
- }
-
- /*
- * @see IFieldInfo#getDescriptor()
- */
- public char[] getDescriptor() {
- return this.descriptor;
- }
-
- /*
- * @see IFieldInfo#getDescriptorIndex()
- */
- public int getDescriptorIndex() {
- return this.descriptorIndex;
- }
-
- /*
- * @see IFieldInfo#getName()
- */
- public char[] getName() {
- return this.name;
- }
-
- /*
- * @see IFieldInfo#getNameIndex()
- */
- public int getNameIndex() {
- return this.nameIndex;
- }
-
- /*
- * @see IFieldInfo#hasConstantValueAttribute()
- */
- public boolean hasConstantValueAttribute() {
- return this.constantValueAttribute != null;
- }
-
- /*
- * @see IFieldInfo#isDeprecated()
- */
- public boolean isDeprecated() {
- return this.isDeprecated;
- }
-
- /*
- * @see IFieldInfo#isSynthetic()
- */
- public boolean isSynthetic() {
- return this.isSynthetic;
- }
-
- int sizeInBytes() {
- return this.attributeBytes;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/IModifierConstants.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/IModifierConstants.java
deleted file mode 100644
index 17607b11e..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/IModifierConstants.java
+++ /dev/null
@@ -1,104 +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.internal.repository.comparator;
-
-public interface IModifierConstants {
-
- int ACC_PUBLIC = 0x0001;
- int ACC_PRIVATE = 0x0002;
- int ACC_PROTECTED = 0x0004;
- int ACC_STATIC = 0x0008;
- int ACC_FINAL = 0x0010;
- int ACC_SUPER = 0x0020;
- int ACC_SYNCHRONIZED = 0x0020;
- int ACC_VOLATILE = 0x0040;
-
- /**
- * Indicates a bridge method (added in J2SE 1.5).
- * @since 3.0
- */
- int ACC_BRIDGE = 0x0040;
- int ACC_TRANSIENT = 0x0080;
-
- /**
- * Indicates a variable arity method (added in J2SE 1.5).
- * @since 3.0
- */
- int ACC_VARARGS = 0x0080;
- int ACC_NATIVE = 0x0100;
- int ACC_INTERFACE = 0x0200;
- int ACC_ABSTRACT = 0x0400;
- int ACC_STRICT = 0x0800;
- /**
- * Indicates a synthetic member.
- * @since 3.0
- */
- int ACC_SYNTHETIC = 0x1000;
-
- /**
- * Indicates an annotation (added in J2SE 1.5).
- * @since 3.0
- */
- int ACC_ANNOTATION = 0x2000;
-
- /**
- * Indicates an enum (added in J2SE 1.5).
- * @since 3.0
- */
- int ACC_ENUM = 0x4000;
-
- /**
- * Configurable option value: {@value}.
- * @category OptionValue
- */
- public static final String VERSION_1_1 = "1.1"; //$NON-NLS-1$
- /**
- * Configurable option value: {@value}.
- * @category OptionValue
- */
- public static final String VERSION_1_2 = "1.2"; //$NON-NLS-1$
- /**
- * Configurable option value: {@value}.
- * @since 2.0
- * @category OptionValue
- */
- public static final String VERSION_1_3 = "1.3"; //$NON-NLS-1$
- /**
- * Configurable option value: {@value}.
- * @since 2.0
- * @category OptionValue
- */
- public static final String VERSION_1_4 = "1.4"; //$NON-NLS-1$
- /**
- * Configurable option value: {@value}.
- * @since 3.0
- * @category OptionValue
- */
- public static final String VERSION_1_5 = "1.5"; //$NON-NLS-1$
- /**
- * Configurable option value: {@value}.
- * @since 3.2
- * @category OptionValue
- */
- public static final String VERSION_1_6 = "1.6"; //$NON-NLS-1$
- /**
- * Configurable option value: {@value}.
- * @since 3.3
- * @category OptionValue
- */
- public static final String VERSION_1_7 = "1.7"; //$NON-NLS-1$
- /**
- * Configurable option value: {@value}.
- * @since 3.4
- * @category OptionValue
- */
- public static final String VERSION_CLDC_1_1 = "cldc1.1"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/IOpcodeMnemonics.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/IOpcodeMnemonics.java
deleted file mode 100644
index 720591ed6..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/IOpcodeMnemonics.java
+++ /dev/null
@@ -1,220 +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.internal.repository.comparator;
-
-public interface IOpcodeMnemonics {
-
- int NOP = 0x00;
- int ACONST_NULL = 0x01;
- int ICONST_M1 = 0x02;
- int ICONST_0 = 0x03;
- int ICONST_1 = 0x04;
- int ICONST_2 = 0x05;
- int ICONST_3 = 0x06;
- int ICONST_4 = 0x07;
- int ICONST_5 = 0x08;
- int LCONST_0 = 0x09;
- int LCONST_1 = 0x0A;
- int FCONST_0 = 0x0B;
- int FCONST_1 = 0x0C;
- int FCONST_2 = 0x0D;
- int DCONST_0 = 0x0E;
- int DCONST_1 = 0x0F;
- int BIPUSH = 0x10;
- int SIPUSH = 0x11;
- int LDC = 0x12;
- int LDC_W = 0x13;
- int LDC2_W = 0x14;
- int ILOAD = 0x15;
- int LLOAD = 0x16;
- int FLOAD = 0x17;
- int DLOAD = 0x18;
- int ALOAD = 0x19;
- int ILOAD_0 = 0x1A;
- int ILOAD_1 = 0x1B;
- int ILOAD_2 = 0x1C;
- int ILOAD_3 = 0x1D;
- int LLOAD_0 = 0x1E;
- int LLOAD_1 = 0x1F;
- int LLOAD_2 = 0x20;
- int LLOAD_3 = 0x21;
- int FLOAD_0 = 0x22;
- int FLOAD_1 = 0x23;
- int FLOAD_2 = 0x24;
- int FLOAD_3 = 0x25;
- int DLOAD_0 = 0x26;
- int DLOAD_1 = 0x27;
- int DLOAD_2 = 0x28;
- int DLOAD_3 = 0x29;
- int ALOAD_0 = 0x2A;
- int ALOAD_1 = 0x2B;
- int ALOAD_2 = 0x2C;
- int ALOAD_3 = 0x2D;
- int IALOAD = 0x2E;
- int LALOAD = 0x2F;
- int FALOAD = 0x30;
- int DALOAD = 0x31;
- int AALOAD = 0x32;
- int BALOAD = 0x33;
- int CALOAD = 0x34;
- int SALOAD = 0x35;
- int ISTORE = 0x36;
- int LSTORE = 0x37;
- int FSTORE = 0x38;
- int DSTORE = 0x39;
- int ASTORE = 0x3A;
- int ISTORE_0 = 0x3B;
- int ISTORE_1 = 0x3C;
- int ISTORE_2 = 0x3D;
- int ISTORE_3 = 0x3E;
- int LSTORE_0 = 0x3F;
- int LSTORE_1 = 0x40;
- int LSTORE_2 = 0x41;
- int LSTORE_3 = 0x42;
- int FSTORE_0 = 0x43;
- int FSTORE_1 = 0x44;
- int FSTORE_2 = 0x45;
- int FSTORE_3 = 0x46;
- int DSTORE_0 = 0x47;
- int DSTORE_1 = 0x48;
- int DSTORE_2 = 0x49;
- int DSTORE_3 = 0x4A;
- int ASTORE_0 = 0x4B;
- int ASTORE_1 = 0x4C;
- int ASTORE_2 = 0x4D;
- int ASTORE_3 = 0x4E;
- int IASTORE = 0x4F;
- int LASTORE = 0x50;
- int FASTORE = 0x51;
- int DASTORE = 0x52;
- int AASTORE = 0x53;
- int BASTORE = 0x54;
- int CASTORE = 0x55;
- int SASTORE = 0x56;
- int POP = 0x57;
- int POP2 = 0x58;
- int DUP = 0x59;
- int DUP_X1 = 0x5A;
- int DUP_X2 = 0x5B;
- int DUP2 = 0x5C;
- int DUP2_X1 = 0x5D;
- int DUP2_X2 = 0x5E;
- int SWAP = 0x5F;
- int IADD = 0x60;
- int LADD = 0x61;
- int FADD = 0x62;
- int DADD = 0x63;
- int ISUB = 0x64;
- int LSUB = 0x65;
- int FSUB = 0x66;
- int DSUB = 0x67;
- int IMUL = 0x68;
- int LMUL = 0x69;
- int FMUL = 0x6A;
- int DMUL = 0x6B;
- int IDIV = 0x6C;
- int LDIV = 0x6D;
- int FDIV = 0x6E;
- int DDIV = 0x6F;
- int IREM = 0x70;
- int LREM = 0x71;
- int FREM = 0x72;
- int DREM = 0x73;
- int INEG = 0x74;
- int LNEG = 0x75;
- int FNEG = 0x76;
- int DNEG = 0x77;
- int ISHL = 0x78;
- int LSHL = 0x79;
- int ISHR = 0x7A;
- int LSHR = 0x7B;
- int IUSHR = 0x7C;
- int LUSHR = 0x7D;
- int IAND = 0x7E;
- int LAND = 0x7F;
- int IOR = 0x80;
- int LOR = 0x81;
- int IXOR = 0x82;
- int LXOR = 0x83;
- int IINC = 0x84;
- int I2L = 0x85;
- int I2F = 0x86;
- int I2D = 0x87;
- int L2I = 0x88;
- int L2F = 0x89;
- int L2D = 0x8A;
- int F2I = 0x8B;
- int F2L = 0x8C;
- int F2D = 0x8D;
- int D2I = 0x8E;
- int D2L = 0x8F;
- int D2F = 0x90;
- int I2B = 0x91;
- int I2C = 0x92;
- int I2S = 0x93;
- int LCMP = 0x94;
- int FCMPL = 0x95;
- int FCMPG = 0x96;
- int DCMPL = 0x97;
- int DCMPG = 0x98;
- int IFEQ = 0x99;
- int IFNE = 0x9A;
- int IFLT = 0x9B;
- int IFGE = 0x9C;
- int IFGT = 0x9D;
- int IFLE = 0x9E;
- int IF_ICMPEQ = 0x9F;
- int IF_ICMPNE = 0xA0;
- int IF_ICMPLT = 0xA1;
- int IF_ICMPGE = 0xA2;
- int IF_ICMPGT = 0xA3;
- int IF_ICMPLE = 0xA4;
- int IF_ACMPEQ = 0xA5;
- int IF_ACMPNE = 0xA6;
- int GOTO = 0xA7;
- int JSR = 0xA8;
- int RET = 0xA9;
- int TABLESWITCH = 0xAA;
- int LOOKUPSWITCH = 0xAB;
- int IRETURN = 0xAC;
- int LRETURN = 0xAD;
- int FRETURN = 0xAE;
- int DRETURN = 0xAF;
- int ARETURN = 0xB0;
- int RETURN = 0xB1;
- int GETSTATIC = 0xB2;
- int PUTSTATIC = 0xB3;
- int GETFIELD = 0xB4;
- int PUTFIELD = 0xB5;
- int INVOKEVIRTUAL = 0xB6;
- int INVOKESPECIAL = 0xB7;
- int INVOKESTATIC = 0xB8;
- int INVOKEINTERFACE = 0xB9;
- int NEW = 0xBB;
- int NEWARRAY = 0xBC;
- int ANEWARRAY = 0xBD;
- int ARRAYLENGTH = 0xBE;
- int ATHROW = 0xBF;
- int CHECKCAST = 0xC0;
- int INSTANCEOF = 0xC1;
- int MONITORENTER = 0xC2;
- int MONITOREXIT = 0xC3;
- int WIDE = 0xC4;
- int MULTIANEWARRAY = 0xC5;
- int IFNULL = 0xC6;
- int IFNONNULL = 0xC7;
- int GOTO_W = 0xC8;
- int JSR_W = 0xC9;
-
- int BREAKPOINT = 0xCA;
- int IMPDEP1 = 0xFE;
- int IMPDEP2 = 0xFF;
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/InnerClassesAttribute.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/InnerClassesAttribute.java
deleted file mode 100644
index 4a316098b..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/InnerClassesAttribute.java
+++ /dev/null
@@ -1,56 +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.internal.repository.comparator;
-
-public class InnerClassesAttribute extends ClassFileAttribute {
- private static final InnerClassesAttributeEntry[] NO_ENTRIES = new InnerClassesAttributeEntry[0];
-
- private int numberOfClasses;
- private InnerClassesAttributeEntry[] entries;
-
- /**
- * Constructor for InnerClassesAttribute.
- * @param classFileBytes
- * @param constantPool
- * @param offset
- * @throws ClassFormatException
- */
- public InnerClassesAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
- super(classFileBytes, constantPool, offset);
- this.numberOfClasses = u2At(classFileBytes, 6, offset);
- final int length = this.numberOfClasses;
- if (length != 0) {
- int readOffset = 8;
- this.entries = new InnerClassesAttributeEntry[length];
- for (int i = 0; i < length; i++) {
- this.entries[i] = new InnerClassesAttributeEntry(classFileBytes, constantPool, offset + readOffset);
- readOffset += 8;
- }
- } else {
- this.entries = NO_ENTRIES;
- }
- }
-
- /*
- * @see IInnerClassesAttribute#getInnerClassAttributesEntries()
- */
- public InnerClassesAttributeEntry[] getInnerClassAttributesEntries() {
- return this.entries;
- }
-
- /*
- * @see IInnerClassesAttribute#getNumberOfClasses()
- */
- public int getNumberOfClasses() {
- return this.numberOfClasses;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/InnerClassesAttributeEntry.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/InnerClassesAttributeEntry.java
deleted file mode 100644
index 34b267fb2..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/InnerClassesAttributeEntry.java
+++ /dev/null
@@ -1,100 +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.internal.repository.comparator;
-
-public class InnerClassesAttributeEntry extends ClassFileStruct {
-
- private int innerClassNameIndex;
- private int outerClassNameIndex;
- private int innerNameIndex;
- private char[] innerClassName;
- private char[] outerClassName;
- private char[] innerName;
- private int accessFlags;
-
- public InnerClassesAttributeEntry(byte classFileBytes[], ConstantPool constantPool, int offset) throws ClassFormatException {
- this.innerClassNameIndex = u2At(classFileBytes, 0, offset);
- this.outerClassNameIndex = u2At(classFileBytes, 2, offset);
- this.innerNameIndex = u2At(classFileBytes, 4, offset);
- this.accessFlags = u2At(classFileBytes, 6, offset);
- ConstantPoolEntry constantPoolEntry;
- if (this.innerClassNameIndex != 0) {
- constantPoolEntry = constantPool.decodeEntry(this.innerClassNameIndex);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.innerClassName = constantPoolEntry.getClassInfoName();
- }
- if (this.outerClassNameIndex != 0) {
- constantPoolEntry = constantPool.decodeEntry(this.outerClassNameIndex);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.outerClassName = constantPoolEntry.getClassInfoName();
- }
- if (this.innerNameIndex != 0) {
- constantPoolEntry = constantPool.decodeEntry(this.innerNameIndex);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.innerName = constantPoolEntry.getUtf8Value();
- }
- }
-
- /*
- * @see IInnerClassesAttributeEntry#getAccessFlags()
- */
- public int getAccessFlags() {
- return this.accessFlags;
- }
-
- /*
- * @see IInnerClassesAttributeEntry#getInnerClassName()
- */
- public char[] getInnerClassName() {
- return this.innerClassName;
- }
-
- /*
- * @see IInnerClassesAttributeEntry#getInnerClassNameIndex()
- */
- public int getInnerClassNameIndex() {
- return this.innerClassNameIndex;
- }
-
- /*
- * @see IInnerClassesAttributeEntry#getInnerName()
- */
- public char[] getInnerName() {
- return this.innerName;
- }
-
- /*
- * @see IInnerClassesAttributeEntry#getInnerNameIndex()
- */
- public int getInnerNameIndex() {
- return this.innerNameIndex;
- }
-
- /*
- * @see IInnerClassesAttributeEntry#getOuterClassName()
- */
- public char[] getOuterClassName() {
- return this.outerClassName;
- }
-
- /*
- * @see IInnerClassesAttributeEntry#getOuterClassNameIndex()
- */
- public int getOuterClassNameIndex() {
- return this.outerClassNameIndex;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/JarComparator.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/JarComparator.java
deleted file mode 100644
index 5dbb891bc..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/JarComparator.java
+++ /dev/null
@@ -1,283 +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.internal.repository.comparator;
-
-import java.io.*;
-import java.util.*;
-import java.util.jar.*;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.osgi.util.NLS;
-
-public class JarComparator implements IArtifactComparator {
-
- private static final String LINE_SEPARATOR = "\n"; //$NON-NLS-1$
- private static final String CLASS_EXTENSION = ".class"; //$NON-NLS-1$
- private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
- private static final String PROPERTIES_EXTENSION = ".properties"; //$NON-NLS-1$
- private static final String PLUGIN_ID = "org.eclipse.equinox.p2.repository.tools"; //$NON-NLS-1$
- private static final String DESTINATION_ARTIFACT_PREFIX = "destinationartifact"; //$NON-NLS-1$
- private static final String SUFFIX_JAR = ".jar"; //$NON-NLS-1$
- private static final String SOURCE_ARTIFACT_PREFIX = "sourceartifact"; //$NON-NLS-1$
- private static final String OSGI_BUNDLE_CLASSIFIER = "osgi.bundle"; //$NON-NLS-1$
-
- 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 String sourceLocation, destinationLocation, descriptorString;
-
- public IStatus compare(IArtifactRepository source, IArtifactDescriptor sourceDescriptor, IArtifactRepository destination, IArtifactDescriptor destinationDescriptor) {
- // Cache information for potential error messages
- sourceLocation = URIUtil.toUnencodedString(sourceDescriptor.getRepository().getLocation());
- destinationLocation = URIUtil.toUnencodedString(destinationDescriptor.getRepository().getLocation());
- descriptorString = sourceDescriptor.toString();
-
- String classifier = sourceDescriptor.getArtifactKey().getClassifier();
- if (!OSGI_BUNDLE_CLASSIFIER.equals(classifier)) {
- return Status.OK_STATUS;
- }
- classifier = destinationDescriptor.getArtifactKey().getClassifier();
- if (!OSGI_BUNDLE_CLASSIFIER.equals(classifier)) {
- return Status.OK_STATUS;
- }
-
- File firstTempFile = null;
- File secondTempFile = null;
- try {
- firstTempFile = getLocalJarFile(source, sourceDescriptor, SOURCE_ARTIFACT_PREFIX);
- secondTempFile = getLocalJarFile(destination, destinationDescriptor, DESTINATION_ARTIFACT_PREFIX);
- return compare(firstTempFile, secondTempFile);
- } catch (CoreException e) {
- return e.getStatus();
- } finally {
- if (firstTempFile != null)
- firstTempFile.delete();
- if (secondTempFile != null)
- secondTempFile.delete();
- }
- }
-
- public IStatus compare(File sourceFile, File destinationFile) {
- ZipFile firstFile = null;
- ZipFile secondFile = null;
- try {
- firstFile = new ZipFile(sourceFile);
- secondFile = new ZipFile(destinationFile);
- final int firstFileSize = firstFile.size();
- final int secondFileSize = secondFile.size();
- if (firstFileSize != secondFileSize) {
- return newErrorStatus(NLS.bind(Messages.differentNumberOfEntries, new String[] {descriptorString, sourceLocation, Integer.toString(firstFileSize), destinationLocation, Integer.toString(secondFileSize)}));
- }
- for (Enumeration enumeration = firstFile.entries(); enumeration.hasMoreElements();) {
- ZipEntry entry = (ZipEntry) enumeration.nextElement();
- String entryName = entry.getName();
- final ZipEntry entry2 = secondFile.getEntry(entryName);
- if (!entry.isDirectory() && entry2 != null) {
- String lowerCase = entryName.toLowerCase();
- if (isSigningEntry(lowerCase)) {
- continue;
- }
-
- InputStream firstStream = null;
- InputStream secondStream = null;
- try {
- firstStream = new BufferedInputStream(firstFile.getInputStream(entry));
- secondStream = new BufferedInputStream(secondFile.getInputStream(entry2));
- boolean result = false;
- if (lowerCase.endsWith(CLASS_EXTENSION)) {
- try {
- result = compareClasses(firstStream, entry.getSize(), secondStream, entry2.getSize());
- } catch (ClassFormatException e) {
- return newErrorStatus(NLS.bind(Messages.differentEntry, new String[] {entryName, descriptorString, sourceLocation}), e);
- }
- } else if (lowerCase.endsWith(JAR_EXTENSION)) {
- result = compareNestedJars(firstStream, entry.getSize(), secondStream, entry2.getSize(), entryName);
- } else if (lowerCase.endsWith(PROPERTIES_EXTENSION)) {
- result = compareProperties(firstStream, secondStream);
- } else if (entryName.equalsIgnoreCase(JarFile.MANIFEST_NAME)) {
- result = compareManifest(firstStream, secondStream); //MANIFEST.MF file
- } else {
- result = compareBytes(firstStream, entry.getSize(), secondStream, entry2.getSize());
- }
- if (!result)
- return newErrorStatus(NLS.bind(Messages.differentEntry, new String[] {entryName, descriptorString, sourceLocation}));
- } finally {
- Utility.close(firstStream);
- Utility.close(secondStream);
- }
- } else if (!entry.isDirectory()) {
- // missing entry, entry2 == null
- return newErrorStatus(NLS.bind(Messages.missingEntry, new String[] {entryName, descriptorString, sourceLocation}));
- }
- }
- } catch (CoreException e) {
- return e.getStatus();
- } catch (IOException e) {
- // missing entry
- return newErrorStatus(NLS.bind(Messages.ioexception, new String[] {sourceFile.getAbsolutePath(), destinationFile.getAbsolutePath()}), e);
- } finally {
- Utility.close(firstFile);
- Utility.close(secondFile);
- }
- return Status.OK_STATUS;
- }
-
- private boolean compareManifest(InputStream firstStream, InputStream secondStream) throws IOException {
- Manifest manifest = new Manifest(firstStream);
- Manifest manifest2 = new Manifest(secondStream);
-
- if (manifest == null || manifest2 == null)
- return true;
-
- Attributes attributes = manifest.getMainAttributes();
- Attributes attributes2 = manifest2.getMainAttributes();
- if (attributes.size() != attributes2.size())
- return false;
- for (Iterator iterator = attributes.entrySet().iterator(); iterator.hasNext();) {
- Map.Entry entry = (Map.Entry) iterator.next();
- Object value2 = attributes2.get(entry.getKey());
- if (value2 == null) {
- return false;
- }
- if (!value2.equals(entry.getValue())) {
- return false;
- }
- }
- return true;
- }
-
- private boolean compareClasses(InputStream stream1, long size1, InputStream stream2, long size2) throws ClassFormatException, IOException {
- Disassembler disassembler = new Disassembler();
- byte[] firstEntryClassFileBytes = Utility.getInputStreamAsByteArray(stream1, (int) size1);
- byte[] secondEntryClassFileBytes = Utility.getInputStreamAsByteArray(stream2, (int) size2);
-
- String contentsFile1 = disassembler.disassemble(firstEntryClassFileBytes, LINE_SEPARATOR, Disassembler.DETAILED | Disassembler.COMPACT);
- String contentsFile2 = disassembler.disassemble(secondEntryClassFileBytes, LINE_SEPARATOR, Disassembler.DETAILED | Disassembler.COMPACT);
- return contentsFile1.equals(contentsFile2);
- }
-
- private boolean compareNestedJars(InputStream stream1, long size1, InputStream stream2, long size2, String entry) throws CoreException, IOException {
- File firstTempFile = getLocalJarFile(stream1, entry, size1);
- File secondTempFile = getLocalJarFile(stream2, entry, size2);
-
- try {
- IStatus status = compare(firstTempFile, secondTempFile);
- if (!status.isOK())
- throw new CoreException(status);
- } finally {
- if (firstTempFile != null)
- firstTempFile.delete();
- if (secondTempFile != null)
- secondTempFile.delete();
- }
- return true;
- }
-
- private boolean compareProperties(InputStream stream1, InputStream stream2) {
- Properties props1 = loadProperties(stream1);
- Properties props2 = loadProperties(stream2);
- if (props1.size() != props2.size())
- return false;
-
- props1.keys();
- for (Iterator iterator = props1.keySet().iterator(); iterator.hasNext();) {
- String key = (String) iterator.next();
- if (!props2.containsKey(key))
- return false;
- if (!props1.getProperty(key).equals(props2.getProperty(key)))
- return false;
-
- }
- return true;
- }
-
- private boolean compareBytes(InputStream firstStream, long size1, InputStream secondStream, long size2) throws IOException {
- byte[] firstBytes = Utility.getInputStreamAsByteArray(firstStream, (int) size1);
- byte[] secondBytes = Utility.getInputStreamAsByteArray(secondStream, (int) size2);
- return Arrays.equals(firstBytes, secondBytes);
- }
-
- private Properties loadProperties(InputStream input) {
- Properties result = new Properties();
- try {
- result.load(input);
- } catch (IOException e) {
- //ignore
- }
- return result;
- }
-
- private String normalize(String entryName) {
- StringBuffer buffer = new StringBuffer();
- char[] chars = entryName.toCharArray();
- for (int i = 0, max = chars.length; i < max; i++) {
- char currentChar = chars[i];
- if (!Character.isJavaIdentifierPart(currentChar)) {
- buffer.append('_');
- } else {
- buffer.append(currentChar);
- }
- }
- return String.valueOf(buffer);
- }
-
- private IStatus newErrorStatus(String message, Exception e) {
- return new Status(IStatus.ERROR, PLUGIN_ID, message, e);
- }
-
- private IStatus newErrorStatus(String message) {
- return newErrorStatus(message, null);
- }
-
- private File getLocalJarFile(IArtifactRepository repository, IArtifactDescriptor descriptor, String prefix) throws CoreException {
- File file = null;
- BufferedOutputStream stream = null;
- try {
- file = File.createTempFile(prefix, SUFFIX_JAR);
- stream = new BufferedOutputStream(new FileOutputStream(file));
- IStatus status = repository.getArtifact(descriptor, stream, new NullProgressMonitor());
- if (!status.isOK())
- throw new CoreException(status);
- stream.flush();
- } catch (FileNotFoundException e) {
- throw new CoreException(newErrorStatus("FileNotFoundException", e)); //$NON-NLS-1$
- } catch (IOException e) {
- throw new CoreException(newErrorStatus("IOException", e)); //$NON-NLS-1$
- } finally {
- Utility.close(stream);
- }
- return file;
- }
-
- private File getLocalJarFile(InputStream inputStream, String entry, long size) throws IOException {
- byte[] firstEntryClassFileBytes = Utility.getInputStreamAsByteArray(inputStream, (int) size);
-
- File tempFile = null;
- BufferedOutputStream stream = null;
- try {
- tempFile = File.createTempFile(SOURCE_ARTIFACT_PREFIX + normalize(entry), SUFFIX_JAR);
- stream = new BufferedOutputStream(new FileOutputStream(tempFile));
- stream.write(firstEntryClassFileBytes);
- stream.flush();
- } finally {
- Utility.close(stream);
- }
- return tempFile;
- }
-
- private boolean isSigningEntry(String entry) {
- return (entry.startsWith(META_INF) && (entry.endsWith(SF_EXT) || entry.endsWith(RSA_EXT) || entry.endsWith(DSA_EXT)));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Messages.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Messages.java
deleted file mode 100644
index 3edd78f26..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Messages.java
+++ /dev/null
@@ -1,107 +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.internal.repository.comparator;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.p2.internal.repository.comparator.messages"; //$NON-NLS-1$
- public static String differentNumberOfEntries;
- public static String differentEntry;
- public static String missingEntry;
- public static String ioexception;
- public static String disassembler_opentypedeclaration;
- public static String disassembler_closetypedeclaration;
- public static String disassembler_endofmethodheader;
- public static String disassembler_begincommentline;
- public static String disassembler_fieldhasconstant;
- public static String disassembler_endoffieldheader;
- public static String disassembler_sourceattributeheader;
- public static String disassembler_enclosingmethodheader;
- public static String disassembler_exceptiontableheader;
- public static String disassembler_innerattributesheader;
- public static String disassembler_inner_class_info_name;
- public static String disassembler_outer_class_info_name;
- public static String disassembler_inner_name;
- public static String disassembler_inner_accessflags;
- public static String disassembler_signatureattributeheader;
- public static String disassembler_indentation;
- public static String disassembler_space;
- public static String disassembler_comma;
- public static String disassembler_openinnerclassentry;
- public static String disassembler_closeinnerclassentry;
- public static String disassembler_deprecated;
- public static String disassembler_annotationdefaultheader;
- public static String disassembler_annotationdefaultvalue;
- public static String disassembler_annotationenumvalue;
- public static String disassembler_annotationclassvalue;
- public static String disassembler_annotationannotationvalue;
- public static String disassembler_annotationarrayvaluestart;
- public static String disassembler_annotationarrayvalueend;
- public static String disassembler_annotationentrystart;
- public static String disassembler_annotationentryend;
- public static String disassembler_annotationcomponent;
- public static String disassembler_runtimevisibleannotationsattributeheader;
- public static String disassembler_runtimeinvisibleannotationsattributeheader;
- public static String disassembler_runtimevisibleparameterannotationsattributeheader;
- public static String disassembler_runtimeinvisibleparameterannotationsattributeheader;
- public static String disassembler_parameterannotationentrystart;
- public static String classfileformat_versiondetails;
- public static String classfileformat_methoddescriptor;
- public static String classfileformat_fieldddescriptor;
- public static String classfileformat_stacksAndLocals;
- public static String classfileformat_superflagisnotset;
- public static String classfileformat_superflagisset;
- public static String classfileformat_clinitname;
- public static String classformat_classformatexception;
- public static String classformat_anewarray;
- public static String classformat_checkcast;
- public static String classformat_instanceof;
- public static String classformat_ldc_w_class;
- public static String classformat_ldc_w_float;
- public static String classformat_ldc_w_integer;
- public static String classformat_ldc_w_string;
- public static String classformat_ldc2_w_long;
- public static String classformat_ldc2_w_double;
- public static String classformat_multianewarray;
- public static String classformat_new;
- public static String classformat_iinc;
- public static String classformat_invokespecial;
- public static String classformat_invokeinterface;
- public static String classformat_invokestatic;
- public static String classformat_invokevirtual;
- public static String classformat_getfield;
- public static String classformat_getstatic;
- public static String classformat_putstatic;
- public static String classformat_putfield;
- public static String classformat_newarray_boolean;
- public static String classformat_newarray_char;
- public static String classformat_newarray_float;
- public static String classformat_newarray_double;
- public static String classformat_newarray_byte;
- public static String classformat_newarray_short;
- public static String classformat_newarray_int;
- public static String classformat_newarray_long;
- public static String classformat_store;
- public static String classformat_load;
- public static String classfileformat_anyexceptionhandler;
- public static String classfileformat_exceptiontableentry;
- public static String classfileformat_versionUnknown;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- // prevent instantiation
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/MethodInfo.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/MethodInfo.java
deleted file mode 100644
index c7789475a..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/MethodInfo.java
+++ /dev/null
@@ -1,213 +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.internal.repository.comparator;
-
-import java.util.Arrays;
-
-public class MethodInfo extends ClassFileStruct {
- private int accessFlags;
- private int attributeBytes;
- private ClassFileAttribute[] attributes;
- private int attributesCount;
- private CodeAttribute codeAttribute;
- private char[] descriptor;
- private int descriptorIndex;
- private ExceptionAttribute exceptionAttribute;
- private boolean isDeprecated;
- private boolean isSynthetic;
- private char[] name;
- private int nameIndex;
-
- /*
- * @param classFileBytes byte[]
- * @param constantPool IConstantPool
- * @param offset int
- * @param decodingFlags int
- */
- public MethodInfo(byte classFileBytes[], ConstantPool constantPool, int offset, int decodingFlags) throws ClassFormatException {
-
- boolean no_code_attribute = (decodingFlags & ClassFileReader.METHOD_BODIES) == 0;
- final int flags = u2At(classFileBytes, 0, offset);
- this.accessFlags = flags;
- if ((flags & IModifierConstants.ACC_SYNTHETIC) != 0) {
- this.isSynthetic = true;
- }
-
- this.nameIndex = u2At(classFileBytes, 2, offset);
- ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(this.nameIndex);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.name = constantPoolEntry.getUtf8Value();
-
- this.descriptorIndex = u2At(classFileBytes, 4, offset);
- constantPoolEntry = constantPool.decodeEntry(this.descriptorIndex);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.descriptor = constantPoolEntry.getUtf8Value();
-
- this.attributesCount = u2At(classFileBytes, 6, offset);
- this.attributes = ClassFileAttribute.NO_ATTRIBUTES;
- if (this.attributesCount != 0) {
- if (no_code_attribute && !isAbstract() && !isNative()) {
- if (this.attributesCount != 1) {
- this.attributes = new ClassFileAttribute[this.attributesCount - 1];
- }
- } else {
- this.attributes = new ClassFileAttribute[this.attributesCount];
- }
- }
- int attributesIndex = 0;
- int readOffset = 8;
- for (int i = 0; i < this.attributesCount; i++) {
- constantPoolEntry = constantPool.decodeEntry(u2At(classFileBytes, readOffset, offset));
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- char[] attributeName = constantPoolEntry.getUtf8Value();
- if (Arrays.equals(attributeName, AttributeNamesConstants.DEPRECATED)) {
- this.isDeprecated = true;
- this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
- } else if (Arrays.equals(attributeName, AttributeNamesConstants.SYNTHETIC)) {
- this.isSynthetic = true;
- this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
- } else if (Arrays.equals(attributeName, AttributeNamesConstants.CODE)) {
- if (!no_code_attribute) {
- this.codeAttribute = new CodeAttribute(classFileBytes, constantPool, offset + readOffset);
- this.attributes[attributesIndex++] = this.codeAttribute;
- }
- } else if (Arrays.equals(attributeName, AttributeNamesConstants.EXCEPTIONS)) {
- this.exceptionAttribute = new ExceptionAttribute(classFileBytes, constantPool, offset + readOffset);
- this.attributes[attributesIndex++] = this.exceptionAttribute;
- } else if (Arrays.equals(attributeName, AttributeNamesConstants.SIGNATURE)) {
- this.attributes[attributesIndex++] = new SignatureAttribute(classFileBytes, constantPool, offset + readOffset);
- } else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS)) {
- this.attributes[attributesIndex++] = new RuntimeVisibleAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
- } else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS)) {
- this.attributes[attributesIndex++] = new RuntimeInvisibleAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
- } else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS)) {
- this.attributes[attributesIndex++] = new RuntimeVisibleParameterAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
- } else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS)) {
- this.attributes[attributesIndex++] = new RuntimeInvisibleParameterAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
- } else if (Arrays.equals(attributeName, AttributeNamesConstants.ANNOTATION_DEFAULT)) {
- this.attributes[attributesIndex++] = new AnnotationDefaultAttribute(classFileBytes, constantPool, offset + readOffset);
- } else {
- this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
- }
- readOffset += (6 + u4At(classFileBytes, readOffset + 2, offset));
- }
- this.attributeBytes = readOffset;
- }
-
- /*
- * @see IMethodInfo#getAccessFlags()
- */
- public int getAccessFlags() {
- return this.accessFlags;
- }
-
- /*
- * @see IMethodInfo#getAttributeCount()
- */
- public int getAttributeCount() {
- return this.attributesCount;
- }
-
- /*
- * @see IMethodInfo#getAttributes()
- */
- public ClassFileAttribute[] getAttributes() {
- return this.attributes;
- }
-
- /*
- * @see IMethodInfo#getCodeAttribute()
- */
- public CodeAttribute getCodeAttribute() {
- return this.codeAttribute;
- }
-
- /*
- * @see IMethodInfo#getDescriptor()
- */
- public char[] getDescriptor() {
- return this.descriptor;
- }
-
- /*
- * @see IMethodInfo#getDescriptorIndex()
- */
- public int getDescriptorIndex() {
- return this.descriptorIndex;
- }
-
- /*
- * @see IMethodInfo#getExceptionAttribute()
- */
- public ExceptionAttribute getExceptionAttribute() {
- return this.exceptionAttribute;
- }
-
- /*
- * @see IMethodInfo#getName()
- */
- public char[] getName() {
- return this.name;
- }
-
- /*
- * @see IMethodInfo#getNameIndex()
- */
- public int getNameIndex() {
- return this.nameIndex;
- }
-
- private boolean isAbstract() {
- return (this.accessFlags & IModifierConstants.ACC_ABSTRACT) != 0;
- }
-
- /*
- * @see IMethodInfo#isClinit()
- */
- public boolean isClinit() {
- return this.name[0] == '<' && this.name.length == 8; // Can only match <clinit>
- }
-
- /*
- * @see IMethodInfo#isConstructor()
- */
- public boolean isConstructor() {
- return this.name[0] == '<' && this.name.length == 6; // Can only match <init>
- }
-
- /*
- * @see IMethodInfo#isDeprecated()
- */
- public boolean isDeprecated() {
- return this.isDeprecated;
- }
-
- private boolean isNative() {
- return (this.accessFlags & IModifierConstants.ACC_NATIVE) != 0;
- }
-
- /*
- * @see IMethodInfo#isSynthetic()
- */
- public boolean isSynthetic() {
- return this.isSynthetic;
- }
-
- int sizeInBytes() {
- return this.attributeBytes;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/OpcodeStringValues.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/OpcodeStringValues.java
deleted file mode 100644
index 76f80e9b6..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/OpcodeStringValues.java
+++ /dev/null
@@ -1,222 +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.internal.repository.comparator;
-
-public class OpcodeStringValues implements IOpcodeMnemonics {
-
- public static final String[] BYTECODE_NAMES = new String[256];
- static {
- BYTECODE_NAMES[NOP] = "nop"; //$NON-NLS-1$
- BYTECODE_NAMES[ACONST_NULL] = "aconst_null"; //$NON-NLS-1$
- BYTECODE_NAMES[ICONST_M1] = "iconst_m1"; //$NON-NLS-1$
- BYTECODE_NAMES[ICONST_0] = "iconst_0"; //$NON-NLS-1$
- BYTECODE_NAMES[ICONST_1] = "iconst_1"; //$NON-NLS-1$
- BYTECODE_NAMES[ICONST_2] = "iconst_2"; //$NON-NLS-1$
- BYTECODE_NAMES[ICONST_3] = "iconst_3"; //$NON-NLS-1$
- BYTECODE_NAMES[ICONST_4] = "iconst_4"; //$NON-NLS-1$
- BYTECODE_NAMES[ICONST_5] = "iconst_5"; //$NON-NLS-1$
- BYTECODE_NAMES[LCONST_0] = "lconst_0"; //$NON-NLS-1$
- BYTECODE_NAMES[LCONST_1] = "lconst_1"; //$NON-NLS-1$
- BYTECODE_NAMES[FCONST_0] = "fconst_0"; //$NON-NLS-1$
- BYTECODE_NAMES[FCONST_1] = "fconst_1"; //$NON-NLS-1$
- BYTECODE_NAMES[FCONST_2] = "fconst_2"; //$NON-NLS-1$
- BYTECODE_NAMES[DCONST_0] = "dconst_0"; //$NON-NLS-1$
- BYTECODE_NAMES[DCONST_1] = "dconst_1"; //$NON-NLS-1$
- BYTECODE_NAMES[BIPUSH] = "bipush"; //$NON-NLS-1$
- BYTECODE_NAMES[SIPUSH] = "sipush"; //$NON-NLS-1$
- BYTECODE_NAMES[LDC] = "ldc"; //$NON-NLS-1$
- BYTECODE_NAMES[LDC_W] = "ldc_w"; //$NON-NLS-1$
- BYTECODE_NAMES[LDC2_W] = "ldc2_w"; //$NON-NLS-1$
- BYTECODE_NAMES[ILOAD] = "iload"; //$NON-NLS-1$
- BYTECODE_NAMES[LLOAD] = "lload"; //$NON-NLS-1$
- BYTECODE_NAMES[FLOAD] = "fload"; //$NON-NLS-1$
- BYTECODE_NAMES[DLOAD] = "dload"; //$NON-NLS-1$
- BYTECODE_NAMES[ALOAD] = "aload"; //$NON-NLS-1$
- BYTECODE_NAMES[ILOAD_0] = "iload_0"; //$NON-NLS-1$
- BYTECODE_NAMES[ILOAD_1] = "iload_1"; //$NON-NLS-1$
- BYTECODE_NAMES[ILOAD_2] = "iload_2"; //$NON-NLS-1$
- BYTECODE_NAMES[ILOAD_3] = "iload_3"; //$NON-NLS-1$
- BYTECODE_NAMES[LLOAD_0] = "lload_0"; //$NON-NLS-1$
- BYTECODE_NAMES[LLOAD_1] = "lload_1"; //$NON-NLS-1$
- BYTECODE_NAMES[LLOAD_2] = "lload_2"; //$NON-NLS-1$
- BYTECODE_NAMES[LLOAD_3] = "lload_3"; //$NON-NLS-1$
- BYTECODE_NAMES[FLOAD_0] = "fload_0"; //$NON-NLS-1$
- BYTECODE_NAMES[FLOAD_1] = "fload_1"; //$NON-NLS-1$
- BYTECODE_NAMES[FLOAD_2] = "fload_2"; //$NON-NLS-1$
- BYTECODE_NAMES[FLOAD_3] = "fload_3"; //$NON-NLS-1$
- BYTECODE_NAMES[DLOAD_0] = "dload_0"; //$NON-NLS-1$
- BYTECODE_NAMES[DLOAD_1] = "dload_1"; //$NON-NLS-1$
- BYTECODE_NAMES[DLOAD_2] = "dload_2"; //$NON-NLS-1$
- BYTECODE_NAMES[DLOAD_3] = "dload_3"; //$NON-NLS-1$
- BYTECODE_NAMES[ALOAD_0] = "aload_0"; //$NON-NLS-1$
- BYTECODE_NAMES[ALOAD_1] = "aload_1"; //$NON-NLS-1$
- BYTECODE_NAMES[ALOAD_2] = "aload_2"; //$NON-NLS-1$
- BYTECODE_NAMES[ALOAD_3] = "aload_3"; //$NON-NLS-1$
- BYTECODE_NAMES[IALOAD] = "iaload"; //$NON-NLS-1$
- BYTECODE_NAMES[LALOAD] = "laload"; //$NON-NLS-1$
- BYTECODE_NAMES[FALOAD] = "faload"; //$NON-NLS-1$
- BYTECODE_NAMES[DALOAD] = "daload"; //$NON-NLS-1$
- BYTECODE_NAMES[AALOAD] = "aaload"; //$NON-NLS-1$
- BYTECODE_NAMES[BALOAD] = "baload"; //$NON-NLS-1$
- BYTECODE_NAMES[CALOAD] = "caload"; //$NON-NLS-1$
- BYTECODE_NAMES[SALOAD] = "saload"; //$NON-NLS-1$
- BYTECODE_NAMES[ISTORE] = "istore"; //$NON-NLS-1$
- BYTECODE_NAMES[LSTORE] = "lstore"; //$NON-NLS-1$
- BYTECODE_NAMES[FSTORE] = "fstore"; //$NON-NLS-1$
- BYTECODE_NAMES[DSTORE] = "dstore"; //$NON-NLS-1$
- BYTECODE_NAMES[ASTORE] = "astore"; //$NON-NLS-1$
- BYTECODE_NAMES[ISTORE_0] = "istore_0"; //$NON-NLS-1$
- BYTECODE_NAMES[ISTORE_1] = "istore_1"; //$NON-NLS-1$
- BYTECODE_NAMES[ISTORE_2] = "istore_2"; //$NON-NLS-1$
- BYTECODE_NAMES[ISTORE_3] = "istore_3"; //$NON-NLS-1$
- BYTECODE_NAMES[LSTORE_0] = "lstore_0"; //$NON-NLS-1$
- BYTECODE_NAMES[LSTORE_1] = "lstore_1"; //$NON-NLS-1$
- BYTECODE_NAMES[LSTORE_2] = "lstore_2"; //$NON-NLS-1$
- BYTECODE_NAMES[LSTORE_3] = "lstore_3"; //$NON-NLS-1$
- BYTECODE_NAMES[FSTORE_0] = "fstore_0"; //$NON-NLS-1$
- BYTECODE_NAMES[FSTORE_1] = "fstore_1"; //$NON-NLS-1$
- BYTECODE_NAMES[FSTORE_2] = "fstore_2"; //$NON-NLS-1$
- BYTECODE_NAMES[FSTORE_3] = "fstore_3"; //$NON-NLS-1$
- BYTECODE_NAMES[DSTORE_0] = "dstore_0"; //$NON-NLS-1$
- BYTECODE_NAMES[DSTORE_1] = "dstore_1"; //$NON-NLS-1$
- BYTECODE_NAMES[DSTORE_2] = "dstore_2"; //$NON-NLS-1$
- BYTECODE_NAMES[DSTORE_3] = "dstore_3"; //$NON-NLS-1$
- BYTECODE_NAMES[ASTORE_0] = "astore_0"; //$NON-NLS-1$
- BYTECODE_NAMES[ASTORE_1] = "astore_1"; //$NON-NLS-1$
- BYTECODE_NAMES[ASTORE_2] = "astore_2"; //$NON-NLS-1$
- BYTECODE_NAMES[ASTORE_3] = "astore_3"; //$NON-NLS-1$
- BYTECODE_NAMES[IASTORE] = "iastore"; //$NON-NLS-1$
- BYTECODE_NAMES[LASTORE] = "lastore"; //$NON-NLS-1$
- BYTECODE_NAMES[FASTORE] = "fastore"; //$NON-NLS-1$
- BYTECODE_NAMES[DASTORE] = "dastore"; //$NON-NLS-1$
- BYTECODE_NAMES[AASTORE] = "aastore"; //$NON-NLS-1$
- BYTECODE_NAMES[BASTORE] = "bastore"; //$NON-NLS-1$
- BYTECODE_NAMES[CASTORE] = "castore"; //$NON-NLS-1$
- BYTECODE_NAMES[SASTORE] = "sastore"; //$NON-NLS-1$
- BYTECODE_NAMES[POP] = "pop"; //$NON-NLS-1$
- BYTECODE_NAMES[POP2] = "pop2"; //$NON-NLS-1$
- BYTECODE_NAMES[DUP] = "dup"; //$NON-NLS-1$
- BYTECODE_NAMES[DUP_X1] = "dup_x1"; //$NON-NLS-1$
- BYTECODE_NAMES[DUP_X2] = "dup_x2"; //$NON-NLS-1$
- BYTECODE_NAMES[DUP2] = "dup2"; //$NON-NLS-1$
- BYTECODE_NAMES[DUP2_X1] = "dup2_x1"; //$NON-NLS-1$
- BYTECODE_NAMES[DUP2_X2] = "dup2_x2"; //$NON-NLS-1$
- BYTECODE_NAMES[SWAP] = "swap"; //$NON-NLS-1$
- BYTECODE_NAMES[IADD] = "iadd"; //$NON-NLS-1$
- BYTECODE_NAMES[LADD] = "ladd"; //$NON-NLS-1$
- BYTECODE_NAMES[FADD] = "fadd"; //$NON-NLS-1$
- BYTECODE_NAMES[DADD] = "dadd"; //$NON-NLS-1$
- BYTECODE_NAMES[ISUB] = "isub"; //$NON-NLS-1$
- BYTECODE_NAMES[LSUB] = "lsub"; //$NON-NLS-1$
- BYTECODE_NAMES[FSUB] = "fsub"; //$NON-NLS-1$
- BYTECODE_NAMES[DSUB] = "dsub"; //$NON-NLS-1$
- BYTECODE_NAMES[IMUL] = "imul"; //$NON-NLS-1$
- BYTECODE_NAMES[LMUL] = "lmul"; //$NON-NLS-1$
- BYTECODE_NAMES[FMUL] = "fmul"; //$NON-NLS-1$
- BYTECODE_NAMES[DMUL] = "dmul"; //$NON-NLS-1$
- BYTECODE_NAMES[IDIV] = "idiv"; //$NON-NLS-1$
- BYTECODE_NAMES[LDIV] = "ldiv"; //$NON-NLS-1$
- BYTECODE_NAMES[FDIV] = "fdiv"; //$NON-NLS-1$
- BYTECODE_NAMES[DDIV] = "ddiv"; //$NON-NLS-1$
- BYTECODE_NAMES[IREM] = "irem"; //$NON-NLS-1$
- BYTECODE_NAMES[LREM] = "lrem"; //$NON-NLS-1$
- BYTECODE_NAMES[FREM] = "frem"; //$NON-NLS-1$
- BYTECODE_NAMES[DREM] = "drem"; //$NON-NLS-1$
- BYTECODE_NAMES[INEG] = "ineg"; //$NON-NLS-1$
- BYTECODE_NAMES[LNEG] = "lneg"; //$NON-NLS-1$
- BYTECODE_NAMES[FNEG] = "fneg"; //$NON-NLS-1$
- BYTECODE_NAMES[DNEG] = "dneg"; //$NON-NLS-1$
- BYTECODE_NAMES[ISHL] = "ishl"; //$NON-NLS-1$
- BYTECODE_NAMES[LSHL] = "lshl"; //$NON-NLS-1$
- BYTECODE_NAMES[ISHR] = "ishr"; //$NON-NLS-1$
- BYTECODE_NAMES[LSHR] = "lshr"; //$NON-NLS-1$
- BYTECODE_NAMES[IUSHR] = "iushr"; //$NON-NLS-1$
- BYTECODE_NAMES[LUSHR] = "lushr"; //$NON-NLS-1$
- BYTECODE_NAMES[IAND] = "iand"; //$NON-NLS-1$
- BYTECODE_NAMES[LAND] = "land"; //$NON-NLS-1$
- BYTECODE_NAMES[IOR] = "ior"; //$NON-NLS-1$
- BYTECODE_NAMES[LOR] = "lor"; //$NON-NLS-1$
- BYTECODE_NAMES[IXOR] = "ixor"; //$NON-NLS-1$
- BYTECODE_NAMES[LXOR] = "lxor"; //$NON-NLS-1$
- BYTECODE_NAMES[IINC] = "iinc"; //$NON-NLS-1$
- BYTECODE_NAMES[I2L] = "i2l"; //$NON-NLS-1$
- BYTECODE_NAMES[I2F] = "i2f"; //$NON-NLS-1$
- BYTECODE_NAMES[I2D] = "i2d"; //$NON-NLS-1$
- BYTECODE_NAMES[L2I] = "l2i"; //$NON-NLS-1$
- BYTECODE_NAMES[L2F] = "l2f"; //$NON-NLS-1$
- BYTECODE_NAMES[L2D] = "l2d"; //$NON-NLS-1$
- BYTECODE_NAMES[F2I] = "f2i"; //$NON-NLS-1$
- BYTECODE_NAMES[F2L] = "f2l"; //$NON-NLS-1$
- BYTECODE_NAMES[F2D] = "f2d"; //$NON-NLS-1$
- BYTECODE_NAMES[D2I] = "d2i"; //$NON-NLS-1$
- BYTECODE_NAMES[D2L] = "d2l"; //$NON-NLS-1$
- BYTECODE_NAMES[D2F] = "d2f"; //$NON-NLS-1$
- BYTECODE_NAMES[I2B] = "i2b"; //$NON-NLS-1$
- BYTECODE_NAMES[I2C] = "i2c"; //$NON-NLS-1$
- BYTECODE_NAMES[I2S] = "i2s"; //$NON-NLS-1$
- BYTECODE_NAMES[LCMP] = "lcmp"; //$NON-NLS-1$
- BYTECODE_NAMES[FCMPL] = "fcmpl"; //$NON-NLS-1$
- BYTECODE_NAMES[FCMPG] = "fcmpg"; //$NON-NLS-1$
- BYTECODE_NAMES[DCMPL] = "dcmpl"; //$NON-NLS-1$
- BYTECODE_NAMES[DCMPG] = "dcmpg"; //$NON-NLS-1$
- BYTECODE_NAMES[IFEQ] = "ifeq"; //$NON-NLS-1$
- BYTECODE_NAMES[IFNE] = "ifne"; //$NON-NLS-1$
- BYTECODE_NAMES[IFLT] = "iflt"; //$NON-NLS-1$
- BYTECODE_NAMES[IFGE] = "ifge"; //$NON-NLS-1$
- BYTECODE_NAMES[IFGT] = "ifgt"; //$NON-NLS-1$
- BYTECODE_NAMES[IFLE] = "ifle"; //$NON-NLS-1$
- BYTECODE_NAMES[IF_ICMPEQ] = "if_icmpeq"; //$NON-NLS-1$
- BYTECODE_NAMES[IF_ICMPNE] = "if_icmpne"; //$NON-NLS-1$
- BYTECODE_NAMES[IF_ICMPLT] = "if_icmplt"; //$NON-NLS-1$
- BYTECODE_NAMES[IF_ICMPGE] = "if_icmpge"; //$NON-NLS-1$
- BYTECODE_NAMES[IF_ICMPGT] = "if_icmpgt"; //$NON-NLS-1$
- BYTECODE_NAMES[IF_ICMPLE] = "if_icmple"; //$NON-NLS-1$
- BYTECODE_NAMES[IF_ACMPEQ] = "if_acmpeq"; //$NON-NLS-1$
- BYTECODE_NAMES[IF_ACMPNE] = "if_acmpne"; //$NON-NLS-1$
- BYTECODE_NAMES[GOTO] = "goto"; //$NON-NLS-1$
- BYTECODE_NAMES[JSR] = "jsr"; //$NON-NLS-1$
- BYTECODE_NAMES[RET] = "ret"; //$NON-NLS-1$
- BYTECODE_NAMES[TABLESWITCH] = "tableswitch"; //$NON-NLS-1$
- BYTECODE_NAMES[LOOKUPSWITCH] = "lookupswitch"; //$NON-NLS-1$
- BYTECODE_NAMES[IRETURN] = "ireturn"; //$NON-NLS-1$
- BYTECODE_NAMES[LRETURN] = "lreturn"; //$NON-NLS-1$
- BYTECODE_NAMES[FRETURN] = "freturn"; //$NON-NLS-1$
- BYTECODE_NAMES[DRETURN] = "dreturn"; //$NON-NLS-1$
- BYTECODE_NAMES[ARETURN] = "areturn"; //$NON-NLS-1$
- BYTECODE_NAMES[RETURN] = "return"; //$NON-NLS-1$
- BYTECODE_NAMES[GETSTATIC] = "getstatic"; //$NON-NLS-1$
- BYTECODE_NAMES[PUTSTATIC] = "putstatic"; //$NON-NLS-1$
- BYTECODE_NAMES[GETFIELD] = "getfield"; //$NON-NLS-1$
- BYTECODE_NAMES[PUTFIELD] = "putfield"; //$NON-NLS-1$
- BYTECODE_NAMES[INVOKEVIRTUAL] = "invokevirtual"; //$NON-NLS-1$
- BYTECODE_NAMES[INVOKESPECIAL] = "invokespecial"; //$NON-NLS-1$
- BYTECODE_NAMES[INVOKESTATIC] = "invokestatic"; //$NON-NLS-1$
- BYTECODE_NAMES[INVOKEINTERFACE] = "invokeinterface"; //$NON-NLS-1$
- BYTECODE_NAMES[NEW] = "new"; //$NON-NLS-1$
- BYTECODE_NAMES[NEWARRAY] = "newarray"; //$NON-NLS-1$
- BYTECODE_NAMES[ANEWARRAY] = "anewarray"; //$NON-NLS-1$
- BYTECODE_NAMES[ARRAYLENGTH] = "arraylength"; //$NON-NLS-1$
- BYTECODE_NAMES[ATHROW] = "athrow"; //$NON-NLS-1$
- BYTECODE_NAMES[CHECKCAST] = "checkcast"; //$NON-NLS-1$
- BYTECODE_NAMES[INSTANCEOF] = "instanceof"; //$NON-NLS-1$
- BYTECODE_NAMES[MONITORENTER] = "monitorenter"; //$NON-NLS-1$
- BYTECODE_NAMES[MONITOREXIT] = "monitorexit"; //$NON-NLS-1$
- BYTECODE_NAMES[WIDE] = "wide"; //$NON-NLS-1$
- BYTECODE_NAMES[MULTIANEWARRAY] = "multianewarray"; //$NON-NLS-1$
- BYTECODE_NAMES[IFNULL] = "ifnull"; //$NON-NLS-1$
- BYTECODE_NAMES[IFNONNULL] = "ifnonnull"; //$NON-NLS-1$
- BYTECODE_NAMES[GOTO_W] = "goto_w"; //$NON-NLS-1$
- BYTECODE_NAMES[JSR_W] = "jsr_w"; //$NON-NLS-1$
- BYTECODE_NAMES[BREAKPOINT] = "breakpoint"; //$NON-NLS-1$
- BYTECODE_NAMES[IMPDEP1] = "impdep1"; //$NON-NLS-1$
- BYTECODE_NAMES[IMPDEP2] = "impdep2"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ParameterAnnotation.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ParameterAnnotation.java
deleted file mode 100644
index ad7c6dcac..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ParameterAnnotation.java
+++ /dev/null
@@ -1,63 +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.internal.repository.comparator;
-
-public class ParameterAnnotation extends ClassFileStruct {
-
- private static final Annotation[] NO_ENTRIES = new Annotation[0];
-
- private int annotationsNumber;
- private Annotation[] annotations;
- private int readOffset;
-
- /**
- * Constructor for Annotation.
- *
- * @param classFileBytes
- * @param constantPool
- * @param offset
- * @throws ClassFormatException
- */
- public ParameterAnnotation(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
-
- final int length = u2At(classFileBytes, 0, offset);
- this.readOffset = 2;
- this.annotationsNumber = length;
- if (length != 0) {
- this.annotations = new Annotation[length];
- for (int i = 0; i < length; i++) {
- Annotation annotation = new Annotation(classFileBytes, constantPool, offset + this.readOffset);
- this.annotations[i] = annotation;
- this.readOffset += annotation.sizeInBytes();
- }
- } else {
- this.annotations = NO_ENTRIES;
- }
- }
-
- int sizeInBytes() {
- return this.readOffset;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IParameterAnnotation#getAnnotations()
- */
- public Annotation[] getAnnotations() {
- return this.annotations;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IParameterAnnotation#getAnnotationsNumber()
- */
- public int getAnnotationsNumber() {
- return this.annotationsNumber;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeInvisibleAnnotationsAttribute.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeInvisibleAnnotationsAttribute.java
deleted file mode 100644
index f2e164c79..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeInvisibleAnnotationsAttribute.java
+++ /dev/null
@@ -1,56 +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.internal.repository.comparator;
-
-public class RuntimeInvisibleAnnotationsAttribute extends ClassFileAttribute {
-
- private static final Annotation[] NO_ENTRIES = new Annotation[0];
- private int annotationsNumber;
- private Annotation[] annotations;
-
- /**
- * Constructor for RuntimeInvisibleAnnotations.
- * @param classFileBytes
- * @param constantPool
- * @param offset
- * @throws ClassFormatException
- */
- public RuntimeInvisibleAnnotationsAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
- super(classFileBytes, constantPool, offset);
- final int length = u2At(classFileBytes, 6, offset);
- this.annotationsNumber = length;
- if (length != 0) {
- int readOffset = 8;
- this.annotations = new Annotation[length];
- for (int i = 0; i < length; i++) {
- Annotation annotation = new Annotation(classFileBytes, constantPool, offset + readOffset);
- this.annotations[i] = annotation;
- readOffset += annotation.sizeInBytes();
- }
- } else {
- this.annotations = NO_ENTRIES;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IRuntimeInvisibleAnnotations#getAnnotations()
- */
- public Annotation[] getAnnotations() {
- return this.annotations;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IRuntimeInvisibleAnnotations#getAnnotationsNumber()
- */
- public int getAnnotationsNumber() {
- return this.annotationsNumber;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeInvisibleParameterAnnotationsAttribute.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeInvisibleParameterAnnotationsAttribute.java
deleted file mode 100644
index 3c724dd08..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeInvisibleParameterAnnotationsAttribute.java
+++ /dev/null
@@ -1,56 +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.internal.repository.comparator;
-
-public class RuntimeInvisibleParameterAnnotationsAttribute extends ClassFileAttribute {
-
- private static final ParameterAnnotation[] NO_ENTRIES = new ParameterAnnotation[0];
- private ParameterAnnotation[] parameterAnnotations;
- private int parametersNumber;
-
- /**
- * Constructor for RuntimeVisibleParameterAnnotations.
- * @param classFileBytes
- * @param constantPool
- * @param offset
- * @throws ClassFormatException
- */
- public RuntimeInvisibleParameterAnnotationsAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
- super(classFileBytes, constantPool, offset);
- final int length = u1At(classFileBytes, 6, offset);
- this.parametersNumber = length;
- if (length != 0) {
- int readOffset = 7;
- this.parameterAnnotations = new ParameterAnnotation[length];
- for (int i = 0; i < length; i++) {
- ParameterAnnotation parameterAnnotation = new ParameterAnnotation(classFileBytes, constantPool, offset + readOffset);
- this.parameterAnnotations[i] = parameterAnnotation;
- readOffset += parameterAnnotation.sizeInBytes();
- }
- } else {
- this.parameterAnnotations = NO_ENTRIES;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IRuntimeInvisibleParameterAnnotations#getAnnotations()
- */
- public ParameterAnnotation[] getParameterAnnotations() {
- return this.parameterAnnotations;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IRuntimeInvisibleParameterAnnotations#getParametersNumber()
- */
- public int getParametersNumber() {
- return this.parametersNumber;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeVisibleAnnotationsAttribute.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeVisibleAnnotationsAttribute.java
deleted file mode 100644
index ff738fa3c..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeVisibleAnnotationsAttribute.java
+++ /dev/null
@@ -1,56 +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.internal.repository.comparator;
-
-public class RuntimeVisibleAnnotationsAttribute extends ClassFileAttribute {
-
- private static final Annotation[] NO_ENTRIES = new Annotation[0];
- private int annotationsNumber;
- private Annotation[] annotations;
-
- /**
- * Constructor for RuntimeVisibleAnnotations.
- * @param classFileBytes
- * @param constantPool
- * @param offset
- * @throws ClassFormatException
- */
- public RuntimeVisibleAnnotationsAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
- super(classFileBytes, constantPool, offset);
- final int length = u2At(classFileBytes, 6, offset);
- this.annotationsNumber = length;
- if (length != 0) {
- int readOffset = 8;
- this.annotations = new Annotation[length];
- for (int i = 0; i < length; i++) {
- Annotation annotation = new Annotation(classFileBytes, constantPool, offset + readOffset);
- this.annotations[i] = annotation;
- readOffset += annotation.sizeInBytes();
- }
- } else {
- this.annotations = NO_ENTRIES;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IRuntimeVisibleAnnotations#getAnnotations()
- */
- public Annotation[] getAnnotations() {
- return this.annotations;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IRuntimeVisibleAnnotations#getAnnotationsNumber()
- */
- public int getAnnotationsNumber() {
- return this.annotationsNumber;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeVisibleParameterAnnotationsAttribute.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeVisibleParameterAnnotationsAttribute.java
deleted file mode 100644
index 71700e217..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeVisibleParameterAnnotationsAttribute.java
+++ /dev/null
@@ -1,56 +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.internal.repository.comparator;
-
-public class RuntimeVisibleParameterAnnotationsAttribute extends ClassFileAttribute {
-
- private static final ParameterAnnotation[] NO_ENTRIES = new ParameterAnnotation[0];
- private int parametersNumber;
- private ParameterAnnotation[] parameterAnnotations;
-
- /**
- * Constructor for RuntimeVisibleParameterAnnotations.
- * @param classFileBytes
- * @param constantPool
- * @param offset
- * @throws ClassFormatException
- */
- public RuntimeVisibleParameterAnnotationsAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
- super(classFileBytes, constantPool, offset);
- final int length = u1At(classFileBytes, 6, offset);
- this.parametersNumber = length;
- if (length != 0) {
- int readOffset = 7;
- this.parameterAnnotations = new ParameterAnnotation[length];
- for (int i = 0; i < length; i++) {
- ParameterAnnotation parameterAnnotation = new ParameterAnnotation(classFileBytes, constantPool, offset + readOffset);
- this.parameterAnnotations[i] = parameterAnnotation;
- readOffset += parameterAnnotation.sizeInBytes();
- }
- } else {
- this.parameterAnnotations = NO_ENTRIES;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IRuntimeVisibleParameterAnnotations#getAnnotations()
- */
- public ParameterAnnotation[] getParameterAnnotations() {
- return this.parameterAnnotations;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.IRuntimeVisibleParameterAnnotations#getParametersNumber()
- */
- public int getParametersNumber() {
- return this.parametersNumber;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Signature.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Signature.java
deleted file mode 100644
index e530f1e40..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Signature.java
+++ /dev/null
@@ -1,1163 +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.internal.repository.comparator;
-
-import java.util.ArrayList;
-
-/*
- * Provides methods for encoding and decoding type and method signature strings.
- * <p>
- * Signatures obtained from parsing source files (i.e. files with one of the
- * {@link JavaCore#getJavaLikeExtensions() Java-like extensions}) differ subtly
- * from ones obtained from pre-compiled binary (".class") files in class names are
- * usually left unresolved in the former. For example, the normal resolved form
- * of the type "String" embeds the class's package name ("Ljava.lang.String;"
- * or "Ljava/lang/String;"), whereas the unresolved form contains only what is
- * written "QString;".
- * </p>
- * <p>
- * Generic types introduce to the Java language in J2SE 1.5 add three new
- * facets to signatures: type variables, parameterized types with type arguments,
- * and formal type parameters. <i>Rich</i> signatures containing these facets
- * only occur when dealing with code that makes overt use of the new language
- * features. All other code, and certainly all Java code written or compiled
- * with J2SE 1.4 or earlier, involved only <i>simple</i> signatures.
- * </p>
- * <p>
- * Note that the "Q" and "!" formats are specific to Eclipse; the remainder
- * are specified in the JVM spec.
- * </p>
- * <p>
- * The syntax for a type signature is:
- * <pre>
- * TypeSignature ::=
- * "B" // byte
- * | "C" // char
- * | "D" // double
- * | "F" // float
- * | "I" // int
- * | "J" // long
- * | "S" // short
- * | "V" // void
- * | "Z" // boolean
- * | "T" + Identifier + ";" // type variable
- * | "[" + TypeSignature // array X[]
- * | "!" + TypeSignature // capture-of ?
- * | ResolvedClassTypeSignature
- * | UnresolvedClassTypeSignature
- *
- * ResolvedClassTypeSignature ::= // resolved named type (in compiled code)
- * "L" + Identifier + OptionalTypeArguments
- * ( ( "." | "/" ) + Identifier + OptionalTypeArguments )* + ";"
- * | OptionalTypeParameters + "L" + Identifier +
- * ( ( "." | "/" ) + Identifier )* + ";"
- *
- * UnresolvedClassTypeSignature ::= // unresolved named type (in source code)
- * "Q" + Identifier + OptionalTypeArguments
- * ( ( "." | "/" ) + Identifier + OptionalTypeArguments )* + ";"
- * | OptionalTypeParameters "Q" + Identifier +
- * ( ( "." | "/" ) + Identifier )* + ";"
- *
- * OptionalTypeArguments ::=
- * "&lt;" + TypeArgument+ + "&gt;"
- * |
- *
- * TypeArgument ::=
- * | TypeSignature
- * | "*" // wildcard ?
- * | "+" TypeSignature // wildcard ? extends X
- * | "-" TypeSignature // wildcard ? super X
- *
- * OptionalTypeParameters ::=
- * "&lt;" + FormalTypeParameterSignature+ + "&gt;"
- * |
- * </pre>
- * </p>
- * <p>
- * Examples:
- * <ul>
- * <li><code>"[[I"</code> denotes <code>int[][]</code></li>
- * <li><code>"Ljava.lang.String;"</code> denotes <code>java.lang.String</code> in compiled code</li>
- * <li><code>"QString;"</code> denotes <code>String</code> in source code</li>
- * <li><code>"Qjava.lang.String;"</code> denotes <code>java.lang.String</code> in source code</li>
- * <li><code>"[QString;"</code> denotes <code>String[]</code> in source code</li>
- * <li><code>"QMap&lt;QString;*&gt;;"</code> denotes <code>Map&lt;String,?&gt;</code> in source code</li>
- * <li><code>"Qjava.util.List&ltTV;&gt;;"</code> denotes <code>java.util.List&lt;V&gt;</code> in source code</li>
- * <li><code>"&ltE;&gt;Ljava.util.List;"</code> denotes <code>&lt;E&gt;java.util.List</code> in source code</li>
- * </ul>
- * </p>
- * <p>
- * The syntax for a method signature is:
- * <pre>
- * MethodSignature ::= OptionalTypeParameters + "(" + ParamTypeSignature* + ")" + ReturnTypeSignature
- * ParamTypeSignature ::= TypeSignature
- * ReturnTypeSignature ::= TypeSignature
- * </pre>
- * <p>
- * Examples:
- * <ul>
- * <li><code>"()I"</code> denotes <code>int foo()</code></li>
- * <li><code>"([Ljava.lang.String;)V"</code> denotes <code>void foo(java.lang.String[])</code> in compiled code</li>
- * <li><code>"(QString;)QObject;"</code> denotes <code>Object foo(String)</code> in source code</li>
- * </ul>
- * </p>
- * <p>
- * The syntax for a formal type parameter signature is:
- * <pre>
- * FormalTypeParameterSignature ::=
- * TypeVariableName + OptionalClassBound + InterfaceBound*
- * TypeVariableName ::= Identifier
- * OptionalClassBound ::=
- * ":"
- * | ":" + TypeSignature
- * InterfaceBound ::=
- * ":" + TypeSignature
- * </pre>
- * <p>
- * Examples:
- * <ul>
- * <li><code>"X:"</code> denotes <code>X</code></li>
- * <li><code>"X:QReader;"</code> denotes <code>X extends Reader</code> in source code</li>
- * <li><code>"X:QReader;:QSerializable;"</code> denotes <code>X extends Reader & Serializable</code> in source code</li>
- * </ul>
- * </p>
- * <p>
- * This class provides static methods and constants only.
- * </p>
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public final class Signature {
- /*
- * Character constant indicating the primitive type boolean in a signature.
- * Value is <code>'Z'</code>.
- */
- public static final char C_BOOLEAN = 'Z';
-
- /*
- * Character constant indicating the primitive type byte in a signature.
- * Value is <code>'B'</code>.
- */
- public static final char C_BYTE = 'B';
-
- /*
- * Character constant indicating the primitive type char in a signature.
- * Value is <code>'C'</code>.
- */
- public static final char C_CHAR = 'C';
-
- /*
- * Character constant indicating the primitive type double in a signature.
- * Value is <code>'D'</code>.
- */
- public static final char C_DOUBLE = 'D';
-
- /*
- * Character constant indicating the primitive type float in a signature.
- * Value is <code>'F'</code>.
- */
- public static final char C_FLOAT = 'F';
-
- /*
- * Character constant indicating the primitive type int in a signature.
- * Value is <code>'I'</code>.
- */
- public static final char C_INT = 'I';
-
- /*
- * Character constant indicating the semicolon in a signature.
- * Value is <code>';'</code>.
- */
- public static final char C_SEMICOLON = ';';
-
- /*
- * Character constant indicating the colon in a signature.
- * Value is <code>':'</code>.
- * @since 3.0
- */
- public static final char C_COLON = ':';
-
- /*
- * Character constant indicating the primitive type long in a signature.
- * Value is <code>'J'</code>.
- */
- public static final char C_LONG = 'J';
-
- /*
- * Character constant indicating the primitive type short in a signature.
- * Value is <code>'S'</code>.
- */
- public static final char C_SHORT = 'S';
-
- /*
- * Character constant indicating result type void in a signature.
- * Value is <code>'V'</code>.
- */
- public static final char C_VOID = 'V';
-
- /*
- * Character constant indicating the start of a resolved type variable in a
- * signature. Value is <code>'T'</code>.
- * @since 3.0
- */
- public static final char C_TYPE_VARIABLE = 'T';
-
- /*
- * Character constant indicating an unbound wildcard type argument
- * in a signature.
- * Value is <code>'*'</code>.
- * @since 3.0
- */
- public static final char C_STAR = '*';
-
- /*
- * Character constant indicating an exception in a signature.
- * Value is <code>'^'</code>.
- * @since 3.1
- */
- public static final char C_EXCEPTION_START = '^';
-
- /*
- * Character constant indicating a bound wildcard type argument
- * in a signature with extends clause.
- * Value is <code>'+'</code>.
- * @since 3.1
- */
- public static final char C_EXTENDS = '+';
-
- /*
- * Character constant indicating a bound wildcard type argument
- * in a signature with super clause.
- * Value is <code>'-'</code>.
- * @since 3.1
- */
- public static final char C_SUPER = '-';
-
- /*
- * Character constant indicating the dot in a signature.
- * Value is <code>'.'</code>.
- */
- public static final char C_DOT = '.';
-
- /*
- * Character constant indicating the dollar in a signature.
- * Value is <code>'$'</code>.
- */
- public static final char C_DOLLAR = '$';
-
- /*
- * Character constant indicating an array type in a signature.
- * Value is <code>'['</code>.
- */
- public static final char C_ARRAY = '[';
-
- /*
- * Character constant indicating the start of a resolved, named type in a
- * signature. Value is <code>'L'</code>.
- */
- public static final char C_RESOLVED = 'L';
-
- /*
- * Character constant indicating the start of an unresolved, named type in a
- * signature. Value is <code>'Q'</code>.
- */
- public static final char C_UNRESOLVED = 'Q';
-
- /*
- * Character constant indicating the end of a named type in a signature.
- * Value is <code>';'</code>.
- */
- public static final char C_NAME_END = ';';
-
- /*
- * Character constant indicating the start of a parameter type list in a
- * signature. Value is <code>'('</code>.
- */
- public static final char C_PARAM_START = '(';
-
- /*
- * Character constant indicating the end of a parameter type list in a
- * signature. Value is <code>')'</code>.
- */
- public static final char C_PARAM_END = ')';
-
- /*
- * Character constant indicating the start of a formal type parameter
- * (or type argument) list in a signature. Value is <code>'&lt;'</code>.
- * @since 3.0
- */
- public static final char C_GENERIC_START = '<';
-
- /*
- * Character constant indicating the end of a generic type list in a
- * signature. Value is <code>'&gt;'</code>.
- * @since 3.0
- */
- public static final char C_GENERIC_END = '>';
-
- /*
- * Character constant indicating a capture of a wildcard type in a
- * signature. Value is <code>'!'</code>.
- * @since 3.1
- */
- public static final char C_CAPTURE = '!';
-
- /*
- * String constant for the signature of the primitive type boolean.
- * Value is <code>"Z"</code>.
- */
- public static final String SIG_BOOLEAN = "Z"; //$NON-NLS-1$
-
- /*
- * String constant for the signature of the primitive type byte.
- * Value is <code>"B"</code>.
- */
- public static final String SIG_BYTE = "B"; //$NON-NLS-1$
-
- /*
- * String constant for the signature of the primitive type char.
- * Value is <code>"C"</code>.
- */
- public static final String SIG_CHAR = "C"; //$NON-NLS-1$
-
- /*
- * String constant for the signature of the primitive type double.
- * Value is <code>"D"</code>.
- */
- public static final String SIG_DOUBLE = "D"; //$NON-NLS-1$
-
- /*
- * String constant for the signature of the primitive type float.
- * Value is <code>"F"</code>.
- */
- public static final String SIG_FLOAT = "F"; //$NON-NLS-1$
-
- /*
- * String constant for the signature of the primitive type int.
- * Value is <code>"I"</code>.
- */
- public static final String SIG_INT = "I"; //$NON-NLS-1$
-
- /*
- * String constant for the signature of the primitive type long.
- * Value is <code>"J"</code>.
- */
- public static final String SIG_LONG = "J"; //$NON-NLS-1$
-
- /*
- * String constant for the signature of the primitive type short.
- * Value is <code>"S"</code>.
- */
- public static final String SIG_SHORT = "S"; //$NON-NLS-1$
-
- /* String constant for the signature of result type void.
- * Value is <code>"V"</code>.
- */
- public static final String SIG_VOID = "V"; //$NON-NLS-1$
-
- /*
- * Kind constant for a class type signature.
- * @see #getTypeSignatureKind(String)
- * @since 3.0
- */
- public static final int CLASS_TYPE_SIGNATURE = 1;
-
- /*
- * Kind constant for a base (primitive or void) type signature.
- * @see #getTypeSignatureKind(String)
- * @since 3.0
- */
- public static final int BASE_TYPE_SIGNATURE = 2;
-
- /*
- * Kind constant for a type variable signature.
- * @see #getTypeSignatureKind(String)
- * @since 3.0
- */
- public static final int TYPE_VARIABLE_SIGNATURE = 3;
-
- /*
- * Kind constant for an array type signature.
- * @see #getTypeSignatureKind(String)
- * @since 3.0
- */
- public static final int ARRAY_TYPE_SIGNATURE = 4;
-
- /*
- * Kind constant for a wildcard type signature.
- * @see #getTypeSignatureKind(String)
- * @since 3.1
- */
- public static final int WILDCARD_TYPE_SIGNATURE = 5;
-
- /*
- * Kind constant for the capture of a wildcard type signature.
- * @see #getTypeSignatureKind(String)
- * @since 3.1
- */
- public static final int CAPTURE_TYPE_SIGNATURE = 6;
-
- private static final char[] BOOLEAN = "boolean".toCharArray(); //$NON-NLS-1$
- private static final char[] BYTE = "byte".toCharArray(); //$NON-NLS-1$
- private static final char[] CHAR = "char".toCharArray(); //$NON-NLS-1$
- private static final char[] DOUBLE = "double".toCharArray(); //$NON-NLS-1$
- private static final char[] FLOAT = "float".toCharArray(); //$NON-NLS-1$
- private static final char[] INT = "int".toCharArray(); //$NON-NLS-1$
- private static final char[] LONG = "long".toCharArray(); //$NON-NLS-1$
- private static final char[] SHORT = "short".toCharArray(); //$NON-NLS-1$
- private static final char[] VOID = "void".toCharArray(); //$NON-NLS-1$
- // private static final char[] EXTENDS = "extends".toCharArray(); //$NON-NLS-1$
- // private static final char[] SUPER = "super".toCharArray(); //$NON-NLS-1$
- private static final char[] CAPTURE = "capture-of".toCharArray(); //$NON-NLS-1$
-
- /*
- * Returns the number of parameter types in the given method signature.
- *
- * @param methodSignature the method signature
- * @return the number of parameters
- * @exception IllegalArgumentException if the signature is not syntactically
- * correct
- * @since 2.0
- */
- public static int getParameterCount(char[] methodSignature) throws IllegalArgumentException {
- try {
- int count = 0;
- int i = CharOperation.indexOf(C_PARAM_START, methodSignature);
- if (i < 0) {
- throw new IllegalArgumentException();
- }
- i++;
- for (;;) {
- if (methodSignature[i] == C_PARAM_END) {
- return count;
- }
- int e = Utility.scanTypeSignature(methodSignature, i);
- if (e < 0) {
- throw new IllegalArgumentException();
- }
- i = e + 1;
- count++;
- }
- } catch (ArrayIndexOutOfBoundsException e) {
- throw new IllegalArgumentException();
- }
- }
-
- /*
- * Extracts the parameter type signatures from the given method signature.
- * The method signature is expected to be dot-based.
- *
- * @param methodSignature the method signature
- * @return the list of parameter type signatures
- * @exception IllegalArgumentException if the signature is syntactically
- * incorrect
- *
- * @since 2.0
- */
- public static char[][] getParameterTypes(char[] methodSignature) throws IllegalArgumentException {
- try {
- int count = getParameterCount(methodSignature);
- char[][] result = new char[count][];
- if (count == 0) {
- return result;
- }
- int i = CharOperation.indexOf(C_PARAM_START, methodSignature);
- if (i < 0) {
- throw new IllegalArgumentException();
- }
- i++;
- int t = 0;
- for (;;) {
- if (methodSignature[i] == C_PARAM_END) {
- return result;
- }
- int e = Utility.scanTypeSignature(methodSignature, i);
- if (e < 0) {
- throw new IllegalArgumentException();
- }
- result[t] = CharOperation.subarray(methodSignature, i, e + 1);
- t++;
- i = e + 1;
- }
- } catch (ArrayIndexOutOfBoundsException e) {
- throw new IllegalArgumentException();
- }
- }
-
- /*
- * Extracts the return type from the given method signature. The method signature is
- * expected to be dot-based.
- *
- * @param methodSignature the method signature
- * @return the type signature of the return type
- * @exception IllegalArgumentException if the signature is syntactically
- * incorrect
- *
- * @since 2.0
- */
- public static char[] getReturnType(char[] methodSignature) throws IllegalArgumentException {
- // skip type parameters
- int paren = CharOperation.lastIndexOf(C_PARAM_END, methodSignature);
- if (paren == -1) {
- throw new IllegalArgumentException();
- }
- // there could be thrown exceptions behind, thus scan one type exactly
- int last = Utility.scanTypeSignature(methodSignature, paren + 1);
- return CharOperation.subarray(methodSignature, paren + 1, last + 1);
- }
-
- /*
- * Extracts the class and interface bounds from the given formal type
- * parameter signature. The class bound, if present, is listed before
- * the interface bounds. The signature is expected to be dot-based.
- *
- * @param formalTypeParameterSignature the formal type parameter signature
- * @return the (possibly empty) list of type signatures for the bounds
- * @exception IllegalArgumentException if the signature is syntactically
- * incorrect
- * @since 3.0
- */
- public static char[][] getTypeParameterBounds(char[] formalTypeParameterSignature) throws IllegalArgumentException {
- int p1 = CharOperation.indexOf(C_COLON, formalTypeParameterSignature);
- if (p1 < 0) {
- // no ":" means can't be a formal type parameter signature
- throw new IllegalArgumentException();
- }
- if (p1 == formalTypeParameterSignature.length - 1) {
- // no class or interface bounds
- return CharOperation.NO_CHAR_CHAR;
- }
- int p2 = CharOperation.indexOf(C_COLON, formalTypeParameterSignature, p1 + 1);
- char[] classBound;
- if (p2 < 0) {
- // no interface bounds
- classBound = CharOperation.subarray(formalTypeParameterSignature, p1 + 1, formalTypeParameterSignature.length);
- return new char[][] {classBound};
- }
- if (p2 == p1 + 1) {
- // no class bound, but 1 or more interface bounds
- classBound = null;
- } else {
- classBound = CharOperation.subarray(formalTypeParameterSignature, p1 + 1, p2);
- }
- char[][] interfaceBounds = CharOperation.splitOn(C_COLON, formalTypeParameterSignature, p2 + 1, formalTypeParameterSignature.length);
- if (classBound == null) {
- return interfaceBounds;
- }
- int resultLength = interfaceBounds.length + 1;
- char[][] result = new char[resultLength][];
- result[0] = classBound;
- System.arraycopy(interfaceBounds, 0, result, 1, interfaceBounds.length);
- return result;
- }
-
- /*
- * Extracts the type parameter signatures from the given method or type signature.
- * The method or type signature is expected to be dot-based.
- *
- * @param methodOrTypeSignature the method or type signature
- * @return the list of type parameter signatures
- * @exception IllegalArgumentException if the signature is syntactically
- * incorrect
- *
- * @since 3.1
- */
- public static char[][] getTypeParameters(char[] methodOrTypeSignature) throws IllegalArgumentException {
- try {
- int length = methodOrTypeSignature.length;
- if (length == 0)
- return CharOperation.NO_CHAR_CHAR;
- if (methodOrTypeSignature[0] != C_GENERIC_START)
- return CharOperation.NO_CHAR_CHAR;
-
- ArrayList paramList = new ArrayList(1);
- int paramStart = 1, i = 1; // start after leading '<'
- while (i < length) {
- if (methodOrTypeSignature[i] == C_GENERIC_END) {
- int size = paramList.size();
- if (size == 0)
- throw new IllegalArgumentException();
- char[][] result;
- paramList.toArray(result = new char[size][]);
- return result;
- }
- i = CharOperation.indexOf(C_COLON, methodOrTypeSignature, i);
- if (i < 0 || i >= length)
- throw new IllegalArgumentException();
- // iterate over bounds
- while (methodOrTypeSignature[i] == ':') {
- i++; // skip colon
- switch (methodOrTypeSignature[i]) {
- case ':' :
- // no class bound
- break;
- case C_GENERIC_END :
- break;
- case C_RESOLVED :
- try {
- i = Utility.scanClassTypeSignature(methodOrTypeSignature, i);
- i++; // position at start of next param if any
- } catch (IllegalArgumentException e) {
- // not a class type signature -> it is a new type parameter
- }
- break;
- case C_ARRAY :
- try {
- i = Utility.scanArrayTypeSignature(methodOrTypeSignature, i);
- i++; // position at start of next param if any
- } catch (IllegalArgumentException e) {
- // not an array type signature -> it is a new type parameter
- }
- break;
- case C_TYPE_VARIABLE :
- try {
- i = Utility.scanTypeVariableSignature(methodOrTypeSignature, i);
- i++; // position at start of next param if any
- } catch (IllegalArgumentException e) {
- // not a type variable signature -> it is a new type parameter
- }
- break;
- // default: another type parameter is starting
- }
- }
- paramList.add(CharOperation.subarray(methodOrTypeSignature, paramStart, i));
- paramStart = i; // next param start from here
- }
- } catch (ArrayIndexOutOfBoundsException e) {
- // invalid signature, fall through
- }
- throw new IllegalArgumentException();
- }
-
- /*
- * Converts the given type signature to a readable string. The signature is expected to
- * be dot-based.
- *
- * <p>
- * For example:
- * <pre>
- * <code>
- * toString({'[', 'L', 'j', 'a', 'v', 'a', '.', 'l', 'a', 'n', 'g', '.', 'S', 't', 'r', 'i', 'n', 'g', ';'}) -> {'j', 'a', 'v', 'a', '.', 'l', 'a', 'n', 'g', '.', 'S', 't', 'r', 'i', 'n', 'g', '[', ']'}
- * toString({'I'}) -> {'i', 'n', 't'}
- * toString({'+', 'L', 'O', 'b', 'j', 'e', 'c', 't', ';'}) -> {'?', ' ', 'e', 'x', 't', 'e', 'n', 'd', 's', ' ', 'O', 'b', 'j', 'e', 'c', 't'}
- * </code>
- * </pre>
- * </p>
- * <p>
- * Note: This method assumes that a type signature containing a <code>'$'</code>
- * is an inner type signature. While this is correct in most cases, someone could
- * define a non-inner type name containing a <code>'$'</code>. Handling this
- * correctly in all cases would have required resolving the signature, which
- * generally not feasible.
- * </p>
- *
- * @param signature the type signature
- * @return the string representation of the type
- * @exception IllegalArgumentException if the signature is not syntactically
- * correct
- *
- * @since 2.0
- */
- public static char[] toCharArray(char[] signature) throws IllegalArgumentException {
- int sigLength = signature.length;
- if (sigLength == 0 || signature[0] == C_PARAM_START || signature[0] == C_GENERIC_START) {
- return toCharArray(signature, CharOperation.NO_CHAR, null, true, true);
- }
-
- StringBuffer buffer = new StringBuffer(signature.length + 10);
- appendTypeSignature(signature, 0, true, buffer);
- char[] result = new char[buffer.length()];
- buffer.getChars(0, buffer.length(), result, 0);
- return result;
- }
-
- /*
- * Converts the given method signature to a readable form. The method signature is expected to
- * be dot-based.
- * <p>
- * For example:
- * <pre>
- * <code>
- * toString("([Ljava.lang.String;)V", "main", new String[] {"args"}, false, true) -> "void main(String[] args)"
- * </code>
- * </pre>
- * </p>
- *
- * @param methodSignature the method signature to convert
- * @param methodName the name of the method to insert in the result, or
- * <code>null</code> if no method name is to be included
- * @param parameterNames the parameter names to insert in the result, or
- * <code>null</code> if no parameter names are to be included; if supplied,
- * the number of parameter names must match that of the method signature
- * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
- * qualified, and <code>false</code> to use only simple names
- * @param includeReturnType <code>true</code> if the return type is to be
- * included
- * @param isVargArgs <code>true</code> if the last argument should be displayed as a
- * variable argument, <code>false</code> otherwise.
- * @return the char array representation of the method signature
- *
- * @since 3.1
- */
- public static char[] toCharArray(char[] methodSignature, char[] methodName, char[][] parameterNames, boolean fullyQualifyTypeNames, boolean includeReturnType, boolean isVargArgs) {
- int firstParen = CharOperation.indexOf(C_PARAM_START, methodSignature);
- if (firstParen == -1) {
- throw new IllegalArgumentException();
- }
-
- StringBuffer buffer = new StringBuffer(methodSignature.length + 10);
-
- // return type
- if (includeReturnType) {
- char[] rts = getReturnType(methodSignature);
- appendTypeSignature(rts, 0, fullyQualifyTypeNames, buffer);
- buffer.append(' ');
- }
-
- // selector
- if (methodName != null) {
- buffer.append(methodName);
- }
-
- // parameters
- buffer.append('(');
- char[][] pts = getParameterTypes(methodSignature);
- for (int i = 0, max = pts.length; i < max; i++) {
- if (i == max - 1) {
- appendTypeSignature(pts[i], 0, fullyQualifyTypeNames, buffer, isVargArgs);
- } else {
- appendTypeSignature(pts[i], 0, fullyQualifyTypeNames, buffer);
- }
- if (parameterNames != null) {
- buffer.append(' ');
- buffer.append(parameterNames[i]);
- }
- if (i != pts.length - 1) {
- buffer.append(',');
- buffer.append(' ');
- }
- }
- buffer.append(')');
- char[] result = new char[buffer.length()];
- buffer.getChars(0, buffer.length(), result, 0);
- return result;
- }
-
- /*
- * Scans the given string for a type signature starting at the given
- * index and appends it to the given buffer, and returns the index of the last
- * character.
- *
- * @param string the signature string
- * @param start the 0-based character index of the first character
- * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
- * qualified, and <code>false</code> to use only simple names
- * @param buffer the string buffer to append to
- * @return the 0-based character index of the last character
- * @exception IllegalArgumentException if this is not a type signature
- * @see Utility#scanTypeSignature(char[], int)
- */
- private static int appendTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) {
- return appendTypeSignature(string, start, fullyQualifyTypeNames, buffer, false);
- }
-
- /*
- * Scans the given string for a type signature starting at the given
- * index and appends it to the given buffer, and returns the index of the last
- * character.
- *
- * @param string the signature string
- * @param start the 0-based character index of the first character
- * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
- * qualified, and <code>false</code> to use only simple names
- * @param buffer the string buffer to append to
- * @param isVarArgs <code>true</code> if the type must be displayed as a
- * variable argument, <code>false</code> otherwise. In this case, the type must be an array type
- * @return the 0-based character index of the last character
- * @exception IllegalArgumentException if this is not a type signature, or if isVarArgs is <code>true</code>,
- * and the type is not an array type signature.
- * @see Utility#scanTypeSignature(char[], int)
- */
- private static int appendTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer, boolean isVarArgs) {
- // need a minimum 1 char
- if (start >= string.length) {
- throw new IllegalArgumentException();
- }
- char c = string[start];
- if (isVarArgs) {
- switch (c) {
- case C_ARRAY :
- return appendArrayTypeSignature(string, start, fullyQualifyTypeNames, buffer, true);
- case C_RESOLVED :
- case C_UNRESOLVED :
- case C_TYPE_VARIABLE :
- case C_BOOLEAN :
- case C_BYTE :
- case C_CHAR :
- case C_DOUBLE :
- case C_FLOAT :
- case C_INT :
- case C_LONG :
- case C_SHORT :
- case C_VOID :
- case C_STAR :
- case C_EXTENDS :
- case C_SUPER :
- case C_CAPTURE :
- default :
- throw new IllegalArgumentException(); // a var args is an array type
- }
- }
- switch (c) {
- case C_ARRAY :
- return appendArrayTypeSignature(string, start, fullyQualifyTypeNames, buffer);
- case C_RESOLVED :
- case C_UNRESOLVED :
- return appendClassTypeSignature(string, start, fullyQualifyTypeNames, buffer);
- case C_TYPE_VARIABLE :
- int e = Utility.scanTypeVariableSignature(string, start);
- buffer.append(string, start + 1, e - start - 1);
- return e;
- case C_BOOLEAN :
- buffer.append(BOOLEAN);
- return start;
- case C_BYTE :
- buffer.append(BYTE);
- return start;
- case C_CHAR :
- buffer.append(CHAR);
- return start;
- case C_DOUBLE :
- buffer.append(DOUBLE);
- return start;
- case C_FLOAT :
- buffer.append(FLOAT);
- return start;
- case C_INT :
- buffer.append(INT);
- return start;
- case C_LONG :
- buffer.append(LONG);
- return start;
- case C_SHORT :
- buffer.append(SHORT);
- return start;
- case C_VOID :
- buffer.append(VOID);
- return start;
- case C_CAPTURE :
- return appendCaptureTypeSignature(string, start, fullyQualifyTypeNames, buffer);
- case C_STAR :
- case C_EXTENDS :
- case C_SUPER :
- return appendTypeArgumentSignature(string, start, fullyQualifyTypeNames, buffer);
- default :
- throw new IllegalArgumentException();
- }
- }
-
- /*
- * Scans the given string for an array type signature starting at the given
- * index and appends it to the given buffer, and returns the index of the last
- * character.
- *
- * @param string the signature string
- * @param start the 0-based character index of the first character
- * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
- * qualified, and <code>false</code> to use only simple names
- * @return the 0-based character index of the last character
- * @exception IllegalArgumentException if this is not an array type signature
- * @see Utility#scanArrayTypeSignature(char[], int)
- */
- private static int appendArrayTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) {
- return appendArrayTypeSignature(string, start, fullyQualifyTypeNames, buffer, false);
- }
-
- /*
- * Scans the given string for an array type signature starting at the given
- * index and appends it to the given buffer, and returns the index of the last
- * character.
- *
- * @param string the signature string
- * @param start the 0-based character index of the first character
- * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
- * qualified, and <code>false</code> to use only simple names
- * @return the 0-based character index of the last character
- * @exception IllegalArgumentException if this is not an array type signature
- * @see Utility#scanArrayTypeSignature(char[], int)
- */
- private static int appendCaptureTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) {
- // need a minimum 2 char
- if (start >= string.length - 1) {
- throw new IllegalArgumentException();
- }
- char c = string[start];
- if (c != C_CAPTURE) {
- throw new IllegalArgumentException();
- }
- buffer.append(CAPTURE).append(' ');
- return appendTypeArgumentSignature(string, start + 1, fullyQualifyTypeNames, buffer);
- }
-
- /*
- * Scans the given string for an array type signature starting at the given
- * index and appends it to the given buffer, and returns the index of the last
- * character.
- *
- * @param string the signature string
- * @param start the 0-based character index of the first character
- * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
- * qualified, and <code>false</code> to use only simple names
- * @param isVarArgs <code>true</code> if the array type must be displayed as a
- * variable argument, <code>false</code> otherwise
- * @return the 0-based character index of the last character
- * @exception IllegalArgumentException if this is not an array type signature
- * @see Utility#scanArrayTypeSignature(char[], int)
- */
- private static int appendArrayTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer, boolean isVarArgs) {
- int length = string.length;
- // need a minimum 2 char
- if (start >= length - 1) {
- throw new IllegalArgumentException();
- }
- char c = string[start];
- if (c != C_ARRAY) {
- throw new IllegalArgumentException();
- }
-
- int index = start;
- c = string[++index];
- while (c == C_ARRAY) {
- // need a minimum 2 char
- if (index >= length - 1) {
- throw new IllegalArgumentException();
- }
- c = string[++index];
- }
-
- int e = appendTypeSignature(string, index, fullyQualifyTypeNames, buffer);
-
- for (int i = 1, dims = index - start; i < dims; i++) {
- buffer.append('[').append(']');
- }
-
- if (isVarArgs) {
- buffer.append('.').append('.').append('.');
- } else {
- buffer.append('[').append(']');
- }
- return e;
- }
-
- /*
- * Scans the given string for a class type signature starting at the given
- * index and appends it to the given buffer, and returns the index of the last
- * character.
- *
- * @param string the signature string
- * @param start the 0-based character index of the first character
- * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
- * qualified, and <code>false</code> to use only simple names
- * @param buffer the string buffer to append to
- * @return the 0-based character index of the last character
- * @exception IllegalArgumentException if this is not a class type signature
- * @see Utility#scanClassTypeSignature(char[], int)
- */
- private static int appendClassTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) {
- // need a minimum 3 chars "Lx;"
- if (start >= string.length - 2) {
- throw new IllegalArgumentException();
- }
- // must start in "L" or "Q"
- char c = string[start];
- if (c != C_RESOLVED && c != C_UNRESOLVED) {
- throw new IllegalArgumentException();
- }
- boolean resolved = (c == C_RESOLVED);
- boolean removePackageQualifiers = !fullyQualifyTypeNames;
- if (!resolved) {
- // keep everything in an unresolved name
- removePackageQualifiers = false;
- }
- int p = start + 1;
- int checkpoint = buffer.length();
- int innerTypeStart = -1;
- boolean inAnonymousType = false;
- while (true) {
- if (p >= string.length) {
- throw new IllegalArgumentException();
- }
- c = string[p];
- switch (c) {
- case C_SEMICOLON :
- // all done
- return p;
- case C_GENERIC_START :
- int e = appendTypeArgumentSignatures(string, p, fullyQualifyTypeNames, buffer);
- // once we hit type arguments there are no more package prefixes
- removePackageQualifiers = false;
- p = e;
- break;
- case C_DOT :
- if (removePackageQualifiers) {
- // erase package prefix
- buffer.setLength(checkpoint);
- } else {
- buffer.append('.');
- }
- break;
- case '/' :
- if (removePackageQualifiers) {
- // erase package prefix
- buffer.setLength(checkpoint);
- } else {
- buffer.append('/');
- }
- break;
- case C_DOLLAR :
- innerTypeStart = buffer.length();
- inAnonymousType = false;
- if (resolved) {
- // once we hit "$" there are no more package prefixes
- removePackageQualifiers = false;
- /*
- * Convert '$' in resolved type signatures into '.'.
- * NOTE: This assumes that the type signature is an inner type
- * signature. This is true in most cases, but someone can define a
- * non-inner type name containing a '$'.
- */
- buffer.append('.');
- }
- break;
- default :
- if (innerTypeStart != -1 && !inAnonymousType && Character.isDigit(c)) {
- inAnonymousType = true;
- buffer.setLength(innerTypeStart); // remove '.'
- buffer.insert(checkpoint, "new "); //$NON-NLS-1$
- buffer.append("(){}"); //$NON-NLS-1$
- }
- if (!inAnonymousType)
- buffer.append(c);
- innerTypeStart = -1;
- }
- p++;
- }
- }
-
- /*
- * Scans the given string for a list of type arguments signature starting at the
- * given index and appends it to the given buffer, and returns the index of the
- * last character.
- *
- * @param string the signature string
- * @param start the 0-based character index of the first character
- * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
- * qualified, and <code>false</code> to use only simple names
- * @param buffer the string buffer to append to
- * @return the 0-based character index of the last character
- * @exception IllegalArgumentException if this is not a list of type argument
- * signatures
- * @see Utility#scanTypeArgumentSignatures(char[], int)
- */
- private static int appendTypeArgumentSignatures(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) {
- // need a minimum 2 char "<>"
- if (start >= string.length - 1) {
- throw new IllegalArgumentException();
- }
- char c = string[start];
- if (c != C_GENERIC_START) {
- throw new IllegalArgumentException();
- }
- buffer.append('<');
- int p = start + 1;
- int count = 0;
- while (true) {
- if (p >= string.length) {
- throw new IllegalArgumentException();
- }
- c = string[p];
- if (c == C_GENERIC_END) {
- buffer.append('>');
- return p;
- }
- if (count != 0) {
- buffer.append(',');
- }
- int e = appendTypeArgumentSignature(string, p, fullyQualifyTypeNames, buffer);
- count++;
- p = e + 1;
- }
- }
-
- /*
- * Scans the given string for a type argument signature starting at the given
- * index and appends it to the given buffer, and returns the index of the last
- * character.
- *
- * @param string the signature string
- * @param start the 0-based character index of the first character
- * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
- * qualified, and <code>false</code> to use only simple names
- * @param buffer the string buffer to append to
- * @return the 0-based character index of the last character
- * @exception IllegalArgumentException if this is not a type argument signature
- * @see Utility#scanTypeArgumentSignature(char[], int)
- */
- private static int appendTypeArgumentSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) {
- // need a minimum 1 char
- if (start >= string.length) {
- throw new IllegalArgumentException();
- }
- char c = string[start];
- switch (c) {
- case C_STAR :
- buffer.append('?');
- return start;
- case C_EXTENDS :
- buffer.append("? extends "); //$NON-NLS-1$
- return appendTypeSignature(string, start + 1, fullyQualifyTypeNames, buffer);
- case C_SUPER :
- buffer.append("? super "); //$NON-NLS-1$
- return appendTypeSignature(string, start + 1, fullyQualifyTypeNames, buffer);
- default :
- return appendTypeSignature(string, start, fullyQualifyTypeNames, buffer);
- }
- }
-
- /*
- * Converts the given method signature to a readable form. The method signature is expected to
- * be dot-based.
- * <p>
- * For example:
- * <pre>
- * <code>
- * toString("([Ljava.lang.String;)V", "main", new String[] {"args"}, false, true) -> "void main(String[] args)"
- * </code>
- * </pre>
- * </p>
- *
- * @param methodSignature the method signature to convert
- * @param methodName the name of the method to insert in the result, or
- * <code>null</code> if no method name is to be included
- * @param parameterNames the parameter names to insert in the result, or
- * <code>null</code> if no parameter names are to be included; if supplied,
- * the number of parameter names must match that of the method signature
- * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
- * qualified, and <code>false</code> to use only simple names
- * @param includeReturnType <code>true</code> if the return type is to be
- * included
- * @return the char array representation of the method signature
- *
- * @since 2.0
- */
- public static char[] toCharArray(char[] methodSignature, char[] methodName, char[][] parameterNames, boolean fullyQualifyTypeNames, boolean includeReturnType) {
- return toCharArray(methodSignature, methodName, parameterNames, fullyQualifyTypeNames, includeReturnType, false);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/SignatureAttribute.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/SignatureAttribute.java
deleted file mode 100644
index e6024103a..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/SignatureAttribute.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.p2.internal.repository.comparator;
-
-public class SignatureAttribute extends ClassFileAttribute {
-
- private int signatureIndex;
- private char[] signature;
-
- SignatureAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
- super(classFileBytes, constantPool, offset);
- final int index = u2At(classFileBytes, 6, offset);
- this.signatureIndex = index;
- ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(index);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.signature = constantPoolEntry.getUtf8Value();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.ISignatureAttribute#getSignatureIndex()
- */
- public int getSignatureIndex() {
- return this.signatureIndex;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.util.ISignatureAttribute#getSignature()
- */
- public char[] getSignature() {
- return this.signature;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/SourceFileAttribute.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/SourceFileAttribute.java
deleted file mode 100644
index f468e8433..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/SourceFileAttribute.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.p2.internal.repository.comparator;
-
-public class SourceFileAttribute extends ClassFileAttribute {
-
- private int sourceFileIndex;
- private char[] sourceFileName;
-
- /**
- * Constructor for SourceFileAttribute.
- * @param classFileBytes
- * @param constantPool
- * @param offset
- * @throws ClassFormatException
- */
- public SourceFileAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
- super(classFileBytes, constantPool, offset);
- this.sourceFileIndex = u2At(classFileBytes, 6, offset);
- ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(this.sourceFileIndex);
- if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
- throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
- }
- this.sourceFileName = constantPoolEntry.getUtf8Value();
- }
-
- /*
- * @see ISourceAttribute#getSourceFileIndex()
- */
- public int getSourceFileIndex() {
- return this.sourceFileIndex;
- }
-
- /*
- * @see ISourceAttribute#getSourceFileName()
- */
- public char[] getSourceFileName() {
- return this.sourceFileName;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/TypeConstants.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/TypeConstants.java
deleted file mode 100644
index 1e000fbd9..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/TypeConstants.java
+++ /dev/null
@@ -1,153 +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.internal.repository.comparator;
-
-public interface TypeConstants {
-
- char[] JAVA = "java".toCharArray(); //$NON-NLS-1$
- char[] LANG = "lang".toCharArray(); //$NON-NLS-1$
- char[] IO = "io".toCharArray(); //$NON-NLS-1$
- char[] UTIL = "util".toCharArray(); //$NON-NLS-1$
- char[] ANNOTATION = "annotation".toCharArray(); //$NON-NLS-1$
- char[] REFLECT = "reflect".toCharArray(); //$NON-NLS-1$
- char[] LENGTH = "length".toCharArray(); //$NON-NLS-1$
- char[] CLONE = "clone".toCharArray(); //$NON-NLS-1$
- char[] EQUALS = "equals".toCharArray(); //$NON-NLS-1$
- char[] GETCLASS = "getClass".toCharArray(); //$NON-NLS-1$
- char[] HASHCODE = "hashCode".toCharArray(); //$NON-NLS-1$
- char[] OBJECT = "Object".toCharArray(); //$NON-NLS-1$
- char[] MAIN = "main".toCharArray(); //$NON-NLS-1$
- char[] SERIALVERSIONUID = "serialVersionUID".toCharArray(); //$NON-NLS-1$
- char[] SERIALPERSISTENTFIELDS = "serialPersistentFields".toCharArray(); //$NON-NLS-1$
- char[] READRESOLVE = "readResolve".toCharArray(); //$NON-NLS-1$
- char[] WRITEREPLACE = "writeReplace".toCharArray(); //$NON-NLS-1$
- char[] READOBJECT = "readObject".toCharArray(); //$NON-NLS-1$
- char[] WRITEOBJECT = "writeObject".toCharArray(); //$NON-NLS-1$
- char[] CharArray_JAVA_LANG_OBJECT = "java.lang.Object".toCharArray(); //$NON-NLS-1$
- char[] CharArray_JAVA_LANG_ENUM = "java.lang.Enum".toCharArray(); //$NON-NLS-1$
- char[] CharArray_JAVA_LANG_ANNOTATION_ANNOTATION = "java.lang.annotation.Annotation".toCharArray(); //$NON-NLS-1$
- char[] CharArray_JAVA_IO_OBJECTINPUTSTREAM = "java.io.ObjectInputStream".toCharArray(); //$NON-NLS-1$
- char[] CharArray_JAVA_IO_OBJECTOUTPUTSTREAM = "java.io.ObjectOutputStream".toCharArray(); //$NON-NLS-1$
- char[] CharArray_JAVA_IO_OBJECTSTREAMFIELD = "java.io.ObjectStreamField".toCharArray(); //$NON-NLS-1$
- char[] ANONYM_PREFIX = "new ".toCharArray(); //$NON-NLS-1$
- char[] ANONYM_SUFFIX = "(){}".toCharArray(); //$NON-NLS-1$
- char[] WILDCARD_NAME = {'?'};
- char[] WILDCARD_SUPER = " super ".toCharArray(); //$NON-NLS-1$
- char[] WILDCARD_EXTENDS = " extends ".toCharArray(); //$NON-NLS-1$
- char[] WILDCARD_MINUS = {'-'};
- char[] WILDCARD_STAR = {'*'};
- char[] WILDCARD_PLUS = {'+'};
- char[] WILDCARD_CAPTURE_NAME_PREFIX = "capture#".toCharArray(); //$NON-NLS-1$
- char[] WILDCARD_CAPTURE_NAME_SUFFIX = "-of ".toCharArray(); //$NON-NLS-1$
- char[] WILDCARD_CAPTURE = {'!'};
- char[] BYTE = "byte".toCharArray(); //$NON-NLS-1$
- char[] SHORT = "short".toCharArray(); //$NON-NLS-1$
- char[] INT = "int".toCharArray(); //$NON-NLS-1$
- char[] LONG = "long".toCharArray(); //$NON-NLS-1$
- char[] FLOAT = "float".toCharArray(); //$NON-NLS-1$
- char[] DOUBLE = "double".toCharArray(); //$NON-NLS-1$
- char[] CHAR = "char".toCharArray(); //$NON-NLS-1$
- char[] BOOLEAN = "boolean".toCharArray(); //$NON-NLS-1$
- char[] NULL = "null".toCharArray(); //$NON-NLS-1$
- char[] VOID = "void".toCharArray(); //$NON-NLS-1$
- char[] VALUE = "value".toCharArray(); //$NON-NLS-1$
- char[] VALUES = "values".toCharArray(); //$NON-NLS-1$
- char[] VALUEOF = "valueOf".toCharArray(); //$NON-NLS-1$
- char[] UPPER_SOURCE = "SOURCE".toCharArray(); //$NON-NLS-1$
- char[] UPPER_CLASS = "CLASS".toCharArray(); //$NON-NLS-1$
- char[] UPPER_RUNTIME = "RUNTIME".toCharArray(); //$NON-NLS-1$
- char[] ANNOTATION_PREFIX = "@".toCharArray(); //$NON-NLS-1$
- char[] ANNOTATION_SUFFIX = "()".toCharArray(); //$NON-NLS-1$
- char[] TYPE = "TYPE".toCharArray(); //$NON-NLS-1$
- char[] UPPER_FIELD = "FIELD".toCharArray(); //$NON-NLS-1$
- char[] UPPER_METHOD = "METHOD".toCharArray(); //$NON-NLS-1$
- char[] UPPER_PARAMETER = "PARAMETER".toCharArray(); //$NON-NLS-1$
- char[] UPPER_CONSTRUCTOR = "CONSTRUCTOR".toCharArray(); //$NON-NLS-1$
- char[] UPPER_LOCAL_VARIABLE = "LOCAL_VARIABLE".toCharArray(); //$NON-NLS-1$
- char[] UPPER_ANNOTATION_TYPE = "ANNOTATION_TYPE".toCharArray(); //$NON-NLS-1$
- char[] UPPER_PACKAGE = "PACKAGE".toCharArray(); //$NON-NLS-1$
-
- // Constant compound names
- char[][] JAVA_LANG = {JAVA, LANG};
- char[][] JAVA_IO = {JAVA, IO};
- char[][] JAVA_LANG_ANNOTATION_ANNOTATION = {JAVA, LANG, ANNOTATION, "Annotation".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_ASSERTIONERROR = {JAVA, LANG, "AssertionError".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_CLASS = {JAVA, LANG, "Class".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_CLASSNOTFOUNDEXCEPTION = {JAVA, LANG, "ClassNotFoundException".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_CLONEABLE = {JAVA, LANG, "Cloneable".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_ENUM = {JAVA, LANG, "Enum".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_EXCEPTION = {JAVA, LANG, "Exception".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_ERROR = {JAVA, LANG, "Error".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_ILLEGALARGUMENTEXCEPTION = {JAVA, LANG, "IllegalArgumentException".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_ITERABLE = {JAVA, LANG, "Iterable".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_NOCLASSDEFERROR = {JAVA, LANG, "NoClassDefError".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_OBJECT = {JAVA, LANG, OBJECT};
- char[][] JAVA_LANG_STRING = {JAVA, LANG, "String".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_STRINGBUFFER = {JAVA, LANG, "StringBuffer".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_STRINGBUILDER = {JAVA, LANG, "StringBuilder".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_SYSTEM = {JAVA, LANG, "System".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_RUNTIMEEXCEPTION = {JAVA, LANG, "RuntimeException".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_THROWABLE = {JAVA, LANG, "Throwable".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_REFLECT_CONSTRUCTOR = {JAVA, LANG, REFLECT, "Constructor".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_IO_PRINTSTREAM = {JAVA, IO, "PrintStream".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_IO_SERIALIZABLE = {JAVA, IO, "Serializable".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_BYTE = {JAVA, LANG, "Byte".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_SHORT = {JAVA, LANG, "Short".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_CHARACTER = {JAVA, LANG, "Character".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_INTEGER = {JAVA, LANG, "Integer".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_LONG = {JAVA, LANG, "Long".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_FLOAT = {JAVA, LANG, "Float".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_DOUBLE = {JAVA, LANG, "Double".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_BOOLEAN = {JAVA, LANG, "Boolean".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_VOID = {JAVA, LANG, "Void".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_UTIL_COLLECTION = {JAVA, UTIL, "Collection".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_UTIL_ITERATOR = {JAVA, UTIL, "Iterator".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_DEPRECATED = {JAVA, LANG, "Deprecated".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_ANNOTATION_DOCUMENTED = {JAVA, LANG, ANNOTATION, "Documented".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_ANNOTATION_INHERITED = {JAVA, LANG, ANNOTATION, "Inherited".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_OVERRIDE = {JAVA, LANG, "Override".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_ANNOTATION_RETENTION = {JAVA, LANG, ANNOTATION, "Retention".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_SUPPRESSWARNINGS = {JAVA, LANG, "SuppressWarnings".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_ANNOTATION_TARGET = {JAVA, LANG, ANNOTATION, "Target".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_ANNOTATION_RETENTIONPOLICY = {JAVA, LANG, ANNOTATION, "RetentionPolicy".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_ANNOTATION_ELEMENTTYPE = {JAVA, LANG, ANNOTATION, "ElementType".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_REFLECT_FIELD = new char[][] {JAVA, LANG, REFLECT, "Field".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_LANG_REFLECT_METHOD = new char[][] {JAVA, LANG, REFLECT, "Method".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_IO_OBJECTSTREAMEXCEPTION = new char[][] {JAVA, IO, "ObjectStreamException".toCharArray()};//$NON-NLS-1$
- char[][] JAVA_IO_EXTERNALIZABLE = {JAVA, IO, "Externalizable".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_IO_IOEXCEPTION = new char[][] {JAVA, IO, "IOException".toCharArray()};//$NON-NLS-1$
- char[][] JAVA_IO_OBJECTOUTPUTSTREAM = new char[][] {JAVA, IO, "ObjectOutputStream".toCharArray()}; //$NON-NLS-1$
- char[][] JAVA_IO_OBJECTINPUTSTREAM = new char[][] {JAVA, IO, "ObjectInputStream".toCharArray()}; //$NON-NLS-1$
-
- // Constraints for generic type argument inference
- int CONSTRAINT_EQUAL = 0; // Actual = Formal
- int CONSTRAINT_EXTENDS = 1; // Actual << Formal
- int CONSTRAINT_SUPER = 2; // Actual >> Formal
-
- // Constants used to perform bound checks
- int OK = 0;
- int UNCHECKED = 1;
- int MISMATCH = 2;
-
- // Synthetics
- char[] INIT = "<init>".toCharArray(); //$NON-NLS-1$
- char[] CLINIT = "<clinit>".toCharArray(); //$NON-NLS-1$
- char[] SYNTHETIC_SWITCH_ENUM_TABLE = "$SWITCH_TABLE$".toCharArray(); //$NON-NLS-1$
- char[] SYNTHETIC_ENUM_VALUES = "ENUM$VALUES".toCharArray(); //$NON-NLS-1$
- char[] SYNTHETIC_ASSERT_DISABLED = "$assertionsDisabled".toCharArray(); //$NON-NLS-1$
- char[] SYNTHETIC_CLASS = "class$".toCharArray(); //$NON-NLS-1$
- char[] SYNTHETIC_OUTER_LOCAL_PREFIX = "val$".toCharArray(); //$NON-NLS-1$
- char[] SYNTHETIC_ENCLOSING_INSTANCE_PREFIX = "this$".toCharArray(); //$NON-NLS-1$
- char[] SYNTHETIC_ACCESS_METHOD_PREFIX = "access$".toCharArray(); //$NON-NLS-1$
-
- // synthetic package-info name
- public static final char[] PACKAGE_INFO_NAME = "package-info".toCharArray(); //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Utility.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Utility.java
deleted file mode 100644
index 888ce1654..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Utility.java
+++ /dev/null
@@ -1,689 +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.internal.repository.comparator;
-
-import java.io.*;
-import java.util.Arrays;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-
-public class Utility {
- public static final int[] EMPTY_INT_ARRAY = new int[0];
- public static final String EMPTY_STRING = ""; //$NON-NLS-1$
- private static final int DEFAULT_READING_SIZE = 8192;
- private static final char[] BOOLEAN = "boolean".toCharArray(); //$NON-NLS-1$
- private static final char[] BYTE = "byte".toCharArray(); //$NON-NLS-1$
- private static final char[] CHAR = "char".toCharArray(); //$NON-NLS-1$
- private static final char[] DOUBLE = "double".toCharArray(); //$NON-NLS-1$
- private static final char[] FLOAT = "float".toCharArray(); //$NON-NLS-1$
- private static final char[] INT = "int".toCharArray(); //$NON-NLS-1$
- private static final char[] LONG = "long".toCharArray(); //$NON-NLS-1$
- private static final char[] SHORT = "short".toCharArray(); //$NON-NLS-1$
- private static final char[] VOID = "void".toCharArray(); //$NON-NLS-1$
- private static final char[] INIT = "<init>".toCharArray(); //$NON-NLS-1$
-
- /**
- * Returns the contents of the given zip entry as a byte array.
- * @throws IOException if a problem occured reading the zip entry.
- */
- public static byte[] getZipEntryByteContent(ZipEntry ze, ZipFile zip) throws IOException {
-
- InputStream stream = null;
- try {
- stream = zip.getInputStream(ze);
- if (stream == null)
- throw new IOException("Invalid zip entry name : " + ze.getName()); //$NON-NLS-1$
- return getInputStreamAsByteArray(stream, (int) ze.getSize());
- } finally {
- close(stream);
- }
- }
-
- public static void close(Object object) {
- if (object == null)
- return;
- try {
- if (object instanceof InputStream)
- ((InputStream) object).close();
- else if (object instanceof OutputStream)
- ((OutputStream) object).close();
- else if (object instanceof ZipFile)
- ((ZipFile) object).close();
- } catch (IOException e) {
- //ignore
- }
- }
-
- /**
- * Returns the given input stream's contents as a byte array.
- * If a length is specified (ie. if length != -1), only length bytes
- * are returned. Otherwise all bytes in the stream are returned.
- * Note this doesn't close the stream.
- * @throws IOException if a problem occured reading the stream.
- */
- public static byte[] getInputStreamAsByteArray(InputStream stream, int length) throws IOException {
- byte[] contents;
- if (length == -1) {
- contents = new byte[0];
- int contentsLength = 0;
- int amountRead = -1;
- do {
- int amountRequested = Math.max(stream.available(), DEFAULT_READING_SIZE); // read at least 8K
-
- // resize contents if needed
- if (contentsLength + amountRequested > contents.length) {
- System.arraycopy(contents, 0, contents = new byte[contentsLength + amountRequested], 0, contentsLength);
- }
-
- // read as many bytes as possible
- amountRead = stream.read(contents, contentsLength, amountRequested);
-
- if (amountRead > 0) {
- // remember length of contents
- contentsLength += amountRead;
- }
- } while (amountRead != -1);
-
- // resize contents if necessary
- if (contentsLength < contents.length) {
- System.arraycopy(contents, 0, contents = new byte[contentsLength], 0, contentsLength);
- }
- } else {
- contents = new byte[length];
- int len = 0;
- int readSize = 0;
- while ((readSize != -1) && (len != length)) {
- // See PR 1FMS89U
- // We record first the read size. In this case len is the actual read size.
- len += readSize;
- readSize = stream.read(contents, len, length - len);
- }
- }
-
- return contents;
- }
-
- public static ClassFileAttribute getAttribute(MethodInfo methodInfo, char[] attributeName) {
- ClassFileAttribute[] attributes = methodInfo.getAttributes();
- for (int i = 0, max = attributes.length; i < max; i++) {
- if (Arrays.equals(attributes[i].getAttributeName(), attributeName)) {
- return attributes[i];
- }
- }
- return null;
- }
-
- public static ClassFileAttribute getAttribute(FieldInfo fieldInfo, char[] attributeName) {
- ClassFileAttribute[] attributes = fieldInfo.getAttributes();
- for (int i = 0, max = attributes.length; i < max; i++) {
- if (Arrays.equals(attributes[i].getAttributeName(), attributeName)) {
- return attributes[i];
- }
- }
- return null;
- }
-
- public static ClassFileAttribute getAttribute(ClassFileReader classFileReader, char[] attributeName) {
- ClassFileAttribute[] attributes = classFileReader.getAttributes();
- for (int i = 0, max = attributes.length; i < max; i++) {
- if (Arrays.equals(attributes[i].getAttributeName(), attributeName)) {
- return attributes[i];
- }
- }
- return null;
- }
-
- /**
- * Scans the given string for a type signature starting at the given index
- * and returns the index of the last character.
- * <pre>
- * TypeSignature:
- * | BaseTypeSignature
- * | ArrayTypeSignature
- * | ClassTypeSignature
- * | TypeVariableSignature
- * </pre>
- *
- * @param string the signature string
- * @param start the 0-based character index of the first character
- * @return the 0-based character index of the last character
- * @exception IllegalArgumentException if this is not a type signature
- */
- public static int scanTypeSignature(char[] string, int start) {
- // need a minimum 1 char
- if (start >= string.length) {
- throw new IllegalArgumentException();
- }
- char c = string[start];
- switch (c) {
- case Signature.C_ARRAY :
- return scanArrayTypeSignature(string, start);
- case Signature.C_RESOLVED :
- case Signature.C_UNRESOLVED :
- return scanClassTypeSignature(string, start);
- case Signature.C_TYPE_VARIABLE :
- return scanTypeVariableSignature(string, start);
- case Signature.C_BOOLEAN :
- case Signature.C_BYTE :
- case Signature.C_CHAR :
- case Signature.C_DOUBLE :
- case Signature.C_FLOAT :
- case Signature.C_INT :
- case Signature.C_LONG :
- case Signature.C_SHORT :
- case Signature.C_VOID :
- return scanBaseTypeSignature(string, start);
- case Signature.C_CAPTURE :
- return scanCaptureTypeSignature(string, start);
- case Signature.C_EXTENDS :
- case Signature.C_SUPER :
- case Signature.C_STAR :
- return scanTypeBoundSignature(string, start);
- default :
- throw new IllegalArgumentException();
- }
- }
-
- /**
- * Scans the given string for a base type signature starting at the given index
- * and returns the index of the last character.
- * <pre>
- * BaseTypeSignature:
- * <b>B</b> | <b>C</b> | <b>D</b> | <b>F</b> | <b>I</b>
- * | <b>J</b> | <b>S</b> | <b>V</b> | <b>Z</b>
- * </pre>
- * Note that although the base type "V" is only allowed in method return types,
- * there is no syntactic ambiguity. This method will accept them anywhere
- * without complaint.
- *
- * @param string the signature string
- * @param start the 0-based character index of the first character
- * @return the 0-based character index of the last character
- * @exception IllegalArgumentException if this is not a base type signature
- */
- public static int scanBaseTypeSignature(char[] string, int start) {
- // need a minimum 1 char
- if (start >= string.length) {
- throw new IllegalArgumentException();
- }
- char c = string[start];
- if ("BCDFIJSVZ".indexOf(c) >= 0) { //$NON-NLS-1$
- return start;
- }
- throw new IllegalArgumentException();
- }
-
- /**
- * Scans the given string for an array type signature starting at the given
- * index and returns the index of the last character.
- * <pre>
- * ArrayTypeSignature:
- * <b>[</b> TypeSignature
- * </pre>
- *
- * @param string the signature string
- * @param start the 0-based character index of the first character
- * @return the 0-based character index of the last character
- * @exception IllegalArgumentException if this is not an array type signature
- */
- public static int scanArrayTypeSignature(char[] string, int start) {
- int length = string.length;
- // need a minimum 2 char
- if (start >= length - 1) {
- throw new IllegalArgumentException();
- }
- char c = string[start];
- if (c != Signature.C_ARRAY) {
- throw new IllegalArgumentException();
- }
-
- c = string[++start];
- while (c == Signature.C_ARRAY) {
- // need a minimum 2 char
- if (start >= length - 1) {
- throw new IllegalArgumentException();
- }
- c = string[++start];
- }
- return scanTypeSignature(string, start);
- }
-
- /**
- * Scans the given string for a capture of a wildcard type signature starting at the given
- * index and returns the index of the last character.
- * <pre>
- * CaptureTypeSignature:
- * <b>!</b> TypeBoundSignature
- * </pre>
- *
- * @param string the signature string
- * @param start the 0-based character index of the first character
- * @return the 0-based character index of the last character
- * @exception IllegalArgumentException if this is not a capture type signature
- */
- public static int scanCaptureTypeSignature(char[] string, int start) {
- // need a minimum 2 char
- if (start >= string.length - 1) {
- throw new IllegalArgumentException();
- }
- char c = string[start];
- if (c != Signature.C_CAPTURE) {
- throw new IllegalArgumentException();
- }
- return scanTypeBoundSignature(string, start + 1);
- }
-
- /**
- * Scans the given string for a type variable signature starting at the given
- * index and returns the index of the last character.
- * <pre>
- * TypeVariableSignature:
- * <b>T</b> Identifier <b>;</b>
- * </pre>
- *
- * @param string the signature string
- * @param start the 0-based character index of the first character
- * @return the 0-based character index of the last character
- * @exception IllegalArgumentException if this is not a type variable signature
- */
- public static int scanTypeVariableSignature(char[] string, int start) {
- // need a minimum 3 chars "Tx;"
- if (start >= string.length - 2) {
- throw new IllegalArgumentException();
- }
- // must start in "T"
- char c = string[start];
- if (c != Signature.C_TYPE_VARIABLE) {
- throw new IllegalArgumentException();
- }
- int id = scanIdentifier(string, start + 1);
- c = string[id + 1];
- if (c == Signature.C_SEMICOLON) {
- return id + 1;
- }
- throw new IllegalArgumentException();
- }
-
- /**
- * Scans the given string for an identifier starting at the given
- * index and returns the index of the last character.
- * Stop characters are: ";", ":", "&lt;", "&gt;", "/", ".".
- *
- * @param string the signature string
- * @param start the 0-based character index of the first character
- * @return the 0-based character index of the last character
- * @exception IllegalArgumentException if this is not an identifier
- */
- public static int scanIdentifier(char[] string, int start) {
- // need a minimum 1 char
- if (start >= string.length) {
- throw new IllegalArgumentException();
- }
- int p = start;
- while (true) {
- char c = string[p];
- if (c == '<' || c == '>' || c == ':' || c == ';' || c == '.' || c == '/') {
- return p - 1;
- }
- p++;
- if (p == string.length) {
- return p - 1;
- }
- }
- }
-
- /**
- * Scans the given string for a class type signature starting at the given
- * index and returns the index of the last character.
- * <pre>
- * ClassTypeSignature:
- * { <b>L</b> | <b>Q</b> } Identifier
- * { { <b>/</b> | <b>.</b> Identifier [ <b>&lt;</b> TypeArgumentSignature* <b>&gt;</b> ] }
- * <b>;</b>
- * </pre>
- * Note that although all "/"-identifiers most come before "."-identifiers,
- * there is no syntactic ambiguity. This method will accept them without
- * complaint.
- *
- * @param string the signature string
- * @param start the 0-based character index of the first character
- * @return the 0-based character index of the last character
- * @exception IllegalArgumentException if this is not a class type signature
- */
- public static int scanClassTypeSignature(char[] string, int start) {
- // need a minimum 3 chars "Lx;"
- if (start >= string.length - 2) {
- throw new IllegalArgumentException();
- }
- // must start in "L" or "Q"
- char c = string[start];
- if (c != Signature.C_RESOLVED && c != Signature.C_UNRESOLVED) {
- return -1;
- }
- int p = start + 1;
- while (true) {
- if (p >= string.length) {
- throw new IllegalArgumentException();
- }
- c = string[p];
- if (c == Signature.C_SEMICOLON) {
- // all done
- return p;
- } else if (c == Signature.C_GENERIC_START) {
- int e = scanTypeArgumentSignatures(string, p);
- p = e;
- } else if (c == Signature.C_DOT || c == '/') {
- int id = scanIdentifier(string, p + 1);
- p = id;
- }
- p++;
- }
- }
-
- /**
- * Scans the given string for a type bound signature starting at the given
- * index and returns the index of the last character.
- * <pre>
- * TypeBoundSignature:
- * <b>[-+]</b> TypeSignature <b>;</b>
- * <b>*</b></b>
- * </pre>
- *
- * @param string the signature string
- * @param start the 0-based character index of the first character
- * @return the 0-based character index of the last character
- * @exception IllegalArgumentException if this is not a type variable signature
- */
- public static int scanTypeBoundSignature(char[] string, int start) {
- // need a minimum 1 char for wildcard
- if (start >= string.length) {
- throw new IllegalArgumentException();
- }
- char c = string[start];
- switch (c) {
- case Signature.C_STAR :
- return start;
- case Signature.C_SUPER :
- case Signature.C_EXTENDS :
- // need a minimum 3 chars "+[I"
- if (start >= string.length - 2) {
- throw new IllegalArgumentException();
- }
- break;
- default :
- // must start in "+/-"
- throw new IllegalArgumentException();
-
- }
- c = string[++start];
- switch (c) {
- case Signature.C_CAPTURE :
- return scanCaptureTypeSignature(string, start);
- case Signature.C_SUPER :
- case Signature.C_EXTENDS :
- return scanTypeBoundSignature(string, start);
- case Signature.C_RESOLVED :
- case Signature.C_UNRESOLVED :
- return scanClassTypeSignature(string, start);
- case Signature.C_TYPE_VARIABLE :
- return scanTypeVariableSignature(string, start);
- case Signature.C_ARRAY :
- return scanArrayTypeSignature(string, start);
- case Signature.C_STAR :
- return start;
- default :
- throw new IllegalArgumentException();
- }
- }
-
- /**
- * Scans the given string for a list of type argument signatures starting at
- * the given index and returns the index of the last character.
- * <pre>
- * TypeArgumentSignatures:
- * <b>&lt;</b> TypeArgumentSignature* <b>&gt;</b>
- * </pre>
- * Note that although there is supposed to be at least one type argument, there
- * is no syntactic ambiguity if there are none. This method will accept zero
- * type argument signatures without complaint.
- *
- * @param string the signature string
- * @param start the 0-based character index of the first character
- * @return the 0-based character index of the last character
- * @exception IllegalArgumentException if this is not a list of type arguments
- * signatures
- */
- public static int scanTypeArgumentSignatures(char[] string, int start) {
- // need a minimum 2 char "<>"
- if (start >= string.length - 1) {
- throw new IllegalArgumentException();
- }
- char c = string[start];
- if (c != Signature.C_GENERIC_START) {
- throw new IllegalArgumentException();
- }
- int p = start + 1;
- while (true) {
- if (p >= string.length) {
- throw new IllegalArgumentException();
- }
- c = string[p];
- if (c == Signature.C_GENERIC_END) {
- return p;
- }
- int e = scanTypeArgumentSignature(string, p);
- p = e + 1;
- }
- }
-
- /**
- * Scans the given string for a type argument signature starting at the given
- * index and returns the index of the last character.
- * <pre>
- * TypeArgumentSignature:
- * <b>&#42;</b>
- * | <b>+</b> TypeSignature
- * | <b>-</b> TypeSignature
- * | TypeSignature
- * </pre>
- * Note that although base types are not allowed in type arguments, there is
- * no syntactic ambiguity. This method will accept them without complaint.
- *
- * @param string the signature string
- * @param start the 0-based character index of the first character
- * @return the 0-based character index of the last character
- * @exception IllegalArgumentException if this is not a type argument signature
- */
- public static int scanTypeArgumentSignature(char[] string, int start) {
- // need a minimum 1 char
- if (start >= string.length) {
- throw new IllegalArgumentException();
- }
- char c = string[start];
- switch (c) {
- case Signature.C_STAR :
- return start;
- case Signature.C_EXTENDS :
- case Signature.C_SUPER :
- return scanTypeBoundSignature(string, start);
- default :
- return scanTypeSignature(string, start);
- }
- }
-
- static void appendTypeSignature(char[] string, int start, StringBuffer buffer, boolean compact) {
- char c = string[start];
- switch (c) {
- case Signature.C_ARRAY :
- appendArrayTypeSignature(string, start, buffer, compact);
- break;
- case Signature.C_RESOLVED :
- appendClassTypeSignature(string, start, buffer, compact);
- break;
- case Signature.C_TYPE_VARIABLE :
- int e = scanTypeVariableSignature(string, start);
- buffer.append(string, start + 1, e - start - 1);
- break;
- case Signature.C_BOOLEAN :
- buffer.append(BOOLEAN);
- break;
- case Signature.C_BYTE :
- buffer.append(BYTE);
- break;
- case Signature.C_CHAR :
- buffer.append(CHAR);
- break;
- case Signature.C_DOUBLE :
- buffer.append(DOUBLE);
- break;
- case Signature.C_FLOAT :
- buffer.append(FLOAT);
- break;
- case Signature.C_INT :
- buffer.append(INT);
- break;
- case Signature.C_LONG :
- buffer.append(LONG);
- break;
- case Signature.C_SHORT :
- buffer.append(SHORT);
- break;
- case Signature.C_VOID :
- buffer.append(VOID);
- break;
- }
- }
-
- private static void appendArrayTypeSignature(char[] string, int start, StringBuffer buffer, boolean compact) {
- int length = string.length;
- // need a minimum 2 char
- if (start >= length - 1) {
- throw new IllegalArgumentException();
- }
- char c = string[start];
- if (c != Signature.C_ARRAY) {
- throw new IllegalArgumentException();
- }
-
- int index = start;
- c = string[++index];
- while (c == Signature.C_ARRAY) {
- // need a minimum 2 char
- if (index >= length - 1) {
- throw new IllegalArgumentException();
- }
- c = string[++index];
- }
-
- appendTypeSignature(string, index, buffer, compact);
-
- for (int i = 0, dims = index - start; i < dims; i++) {
- buffer.append('[').append(']');
- }
- }
-
- private static void appendClassTypeSignature(char[] string, int start, StringBuffer buffer, boolean compact) {
- char c = string[start];
- if (c != Signature.C_RESOLVED) {
- return;
- }
- int p = start + 1;
- int checkpoint = buffer.length();
- while (true) {
- c = string[p];
- switch (c) {
- case Signature.C_SEMICOLON :
- // all done
- return;
- case Signature.C_DOT :
- case '/' :
- // erase package prefix
- if (compact) {
- buffer.setLength(checkpoint);
- } else {
- buffer.append('.');
- }
- break;
- case Signature.C_DOLLAR :
- /**
- * Convert '$' in resolved type signatures into '.'.
- * NOTE: This assumes that the type signature is an inner type
- * signature. This is true in most cases, but someone can define a
- * non-inner type name containing a '$'.
- */
- buffer.append('.');
- break;
- default :
- buffer.append(c);
- }
- p++;
- }
- }
-
- public static String toString(char[] declaringClass, char[] methodName, char[] methodSignature, boolean includeReturnType, boolean compact) {
- final boolean isConstructor = Arrays.equals(methodName, INIT);
- int firstParen = CharOperation.indexOf(Signature.C_PARAM_START, methodSignature);
- if (firstParen == -1) {
- return ""; //$NON-NLS-1$
- }
-
- StringBuffer buffer = new StringBuffer(methodSignature.length + 10);
-
- // decode declaring class name
- // it can be either an array signature or a type signature
- if (declaringClass.length > 0) {
- char[] declaringClassSignature = null;
- if (declaringClass[0] == Signature.C_ARRAY) {
- CharOperation.replace(declaringClass, '/', '.');
- declaringClassSignature = Signature.toCharArray(declaringClass);
- } else {
- CharOperation.replace(declaringClass, '/', '.');
- declaringClassSignature = declaringClass;
- }
- int lastIndexOfSlash = CharOperation.lastIndexOf('.', declaringClassSignature);
- if (compact && lastIndexOfSlash != -1) {
- buffer.append(declaringClassSignature, lastIndexOfSlash + 1, declaringClassSignature.length - lastIndexOfSlash - 1);
- } else {
- buffer.append(declaringClassSignature);
- }
- }
-
- // selector
- if (!isConstructor) {
- buffer.append('.');
- if (methodName != null) {
- buffer.append(methodName);
- }
- }
-
- // parameters
- buffer.append('(');
- char[][] pts = Signature.getParameterTypes(methodSignature);
- for (int i = 0, max = pts.length; i < max; i++) {
- appendTypeSignature(pts[i], 0, buffer, compact);
- if (i != pts.length - 1) {
- buffer.append(',');
- buffer.append(' ');
- }
- }
- buffer.append(')');
-
- if (!isConstructor) {
- buffer.append(" : "); //$NON-NLS-1$
- // return type
- if (includeReturnType) {
- char[] rts = Signature.getReturnType(methodSignature);
- appendTypeSignature(rts, 0, buffer, compact);
- }
- }
- return String.valueOf(buffer);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/messages.properties b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/messages.properties
deleted file mode 100644
index e8c395639..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/messages.properties
+++ /dev/null
@@ -1,98 +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
-###############################################################################
-differentNumberOfEntries=Difference in [{0}]: {1} contains {2} files and {3} contains {4} files
-differentEntry=Difference found for {0} within [{1}] from {2}
-missingEntry=Missing {0} within [{1}] from {2}
-ioexception=IOException comparing {0} and {1}
-
-### Disassembler messages
-
-### disassembler
-disassembler_opentypedeclaration =\ '{'
-disassembler_closetypedeclaration = }
-disassembler_endofmethodheader = ;
-disassembler_begincommentline = //\
-disassembler_fieldhasconstant =\ =\
-disassembler_endoffieldheader = ;
-disassembler_sourceattributeheader = Compiled from\
-disassembler_enclosingmethodheader = Enclosing Method:
-disassembler_exceptiontableheader = Exception Table:
-disassembler_innerattributesheader = Inner classes:
-disassembler_inner_class_info_name = inner class info:
-disassembler_outer_class_info_name = outer class info:
-disassembler_inner_name = inner name:
-disassembler_inner_accessflags = accessflags:\
-disassembler_signatureattributeheader = // Signature: {0}
-disassembler_indentation = \
-disassembler_space = \
-disassembler_comma = ,
-disassembler_openinnerclassentry = [
-disassembler_closeinnerclassentry = ]
-disassembler_deprecated =\ (deprecated)
-disassembler_annotationdefaultheader = Annotation Default:\
-disassembler_annotationdefaultvalue= {0} (constant type)
-disassembler_annotationenumvalue = {0}.{1}(enum type)
-disassembler_annotationclassvalue = {0} (class type)
-disassembler_annotationannotationvalue = annotation value =
-disassembler_annotationarrayvaluestart = [
-disassembler_annotationarrayvalueend = ]
-disassembler_annotationentrystart = @{0}(
-disassembler_annotationentryend = )
-disassembler_annotationcomponent = {0}=
-disassembler_runtimevisibleannotationsattributeheader= RuntimeVisibleAnnotations:\
-disassembler_runtimeinvisibleannotationsattributeheader= RuntimeInvisibleAnnotations:\
-disassembler_runtimevisibleparameterannotationsattributeheader= RuntimeVisibleParameterAnnotations:\
-disassembler_runtimeinvisibleparameterannotationsattributeheader= RuntimeInvisibleParameterAnnotations:\
-disassembler_parameterannotationentrystart=Number of annotations for parameter {0}: {1}
-### classfileformat decoding
-classfileformat_versiondetails =\ (version {0} : {1}.{2}, {3})
-classfileformat_methoddescriptor = // Method descriptor {0}
-classfileformat_fieldddescriptor = // Field descriptor {0}
-classfileformat_stacksAndLocals= // Stack: {0}, Locals: {1}
-classfileformat_superflagisnotset = no super bit
-classfileformat_superflagisset = super bit
-classfileformat_clinitname = '{'}
-classformat_classformatexception = Class Format Exception
-classfileformat_versionUnknown = unknown
-
-### string displayed for each opcode
-classformat_anewarray = {0} {1}
-classformat_checkcast = {0} {1}
-classformat_instanceof = {0} {1}
-classformat_ldc_w_class = {0} <Class {1}>
-classformat_ldc_w_float = {0} <Float {1}>
-classformat_ldc_w_integer = {0} <Integer {1}>
-classformat_ldc_w_string = {0} <String "{1}">
-classformat_ldc2_w_long = {0} <Long {1}>
-classformat_ldc2_w_double = {0} <Double {1}>
-classformat_multianewarray = {0} {1}
-classformat_new = {0} {1}
-classformat_iinc = {0} {1} {2}{3}
-classformat_invokespecial ={0} {1}
-classformat_invokeinterface ={0} {2} [nargs: {1}]
-classformat_invokestatic ={0} {1}
-classformat_invokevirtual ={0} {1}
-classformat_getfield ={0} {1}.{2} : {3}
-classformat_getstatic ={0} {1}.{2} : {3}
-classformat_putstatic ={0} {1}.{2} : {3}
-classformat_putfield ={0} {1}.{2} : {3}
-classformat_newarray_boolean = {0} boolean
-classformat_newarray_char = {0} char
-classformat_newarray_float = {0} float
-classformat_newarray_double = {0} double
-classformat_newarray_byte = {0} byte
-classformat_newarray_short = {0} short
-classformat_newarray_int = {0} int
-classformat_newarray_long = {0} long
-classformat_store = {0}{1}
-classformat_load = {0}{1}
-classfileformat_anyexceptionhandler=any
-classfileformat_exceptiontableentry = [pc: {0}, pc: {1}] -> {2} when : {3}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/AbstractApplication.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/AbstractApplication.java
deleted file mode 100644
index dccd26a45..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/AbstractApplication.java
+++ /dev/null
@@ -1,249 +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.internal.repository.tools;
-
-import java.net.*;
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
-import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
-import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.repository.*;
-import org.eclipse.osgi.util.NLS;
-
-public abstract class AbstractApplication {
- protected boolean removeAddedRepositories = true;
-
- protected List sourceRepositories = new ArrayList(); //List of repository descriptors
- protected List artifactReposToRemove = new ArrayList();
- protected List metadataReposToRemove = new ArrayList();
- protected List sourceIUs = new ArrayList();
- private List destinationRepos = new ArrayList();
-
- protected IArtifactRepository destinationArtifactRepository = null;
- protected IMetadataRepository destinationMetadataRepository = null;
-
- private CompositeMetadataRepository compositeMetadataRepository = null;
- private CompositeArtifactRepository compositeArtifactRepository = null;
-
- public void setSourceIUs(List ius) {
- sourceIUs = ius;
- }
-
- protected void finalizeRepositories() throws ProvisionException {
- if (removeAddedRepositories) {
- IArtifactRepositoryManager artifactRepositoryManager = Activator.getArtifactRepositoryManager();
- for (Iterator iter = artifactReposToRemove.iterator(); iter.hasNext();)
- artifactRepositoryManager.removeRepository((URI) iter.next());
- IMetadataRepositoryManager metadataRepositoryManager = Activator.getMetadataRepositoryManager();
- for (Iterator iter = metadataReposToRemove.iterator(); iter.hasNext();)
- metadataRepositoryManager.removeRepository((URI) iter.next());
- }
- }
-
- public void initializeRepos(IProgressMonitor progress) throws ProvisionException {
- IArtifactRepositoryManager artifactRepositoryManager = Activator.getArtifactRepositoryManager();
- IMetadataRepositoryManager metadataRepositoryManager = Activator.getMetadataRepositoryManager();
- URI curLocation = null;
- try {
- for (Iterator iter = sourceRepositories.iterator(); iter.hasNext();) {
- RepositoryDescriptor repo = (RepositoryDescriptor) iter.next();
- curLocation = repo.getRepoLocation();
- if (repo.isBoth()) {
- addRepository(artifactRepositoryManager, curLocation, 0, progress);
- addRepository(metadataRepositoryManager, curLocation, 0, progress);
- } else if (repo.isArtifact())
- addRepository(artifactRepositoryManager, curLocation, 0, progress);
- else if (repo.isMetadata())
- addRepository(metadataRepositoryManager, curLocation, 0, progress);
- else
- throw new ProvisionException(NLS.bind(Messages.unknown_repository_type, repo.getRepoLocation()));
- }
- } catch (ProvisionException e) {
- if (e.getCause() instanceof MalformedURLException) {
- throw new ProvisionException(NLS.bind(Messages.exception_invalidSource, curLocation), e);
- }
- throw e;
- }
- processDestinationRepos(artifactRepositoryManager, metadataRepositoryManager);
- }
-
- //Helper to add a repository. It takes care of adding the repos to the deletion list and loading it
- protected IMetadataRepository addRepository(IMetadataRepositoryManager manager, URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
- if (!manager.contains(location))
- metadataReposToRemove.add(location);
- return manager.loadRepository(location, flags, monitor);
- }
-
- //Helper to add a repository. It takes care of adding the repos to the deletion list and loading it
- protected IArtifactRepository addRepository(IArtifactRepositoryManager manager, URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
- if (!manager.contains(location))
- artifactReposToRemove.add(location);
- return manager.loadRepository(location, flags, monitor);
- }
-
- private void processDestinationRepos(IArtifactRepositoryManager artifactRepositoryManager, IMetadataRepositoryManager metadataRepositoryManager) throws ProvisionException {
- RepositoryDescriptor artifactRepoDescriptor = null;
- RepositoryDescriptor metadataRepoDescriptor = null;
-
- Iterator iter = destinationRepos.iterator();
- while (iter.hasNext() && (artifactRepoDescriptor == null || metadataRepoDescriptor == null)) {
- RepositoryDescriptor repo = (RepositoryDescriptor) iter.next();
- if (repo.isArtifact() && artifactRepoDescriptor == null)
- artifactRepoDescriptor = repo;
- if (repo.isMetadata() && metadataRepoDescriptor == null)
- metadataRepoDescriptor = repo;
- }
-
- if (artifactRepoDescriptor != null)
- destinationArtifactRepository = initializeDestination(artifactRepoDescriptor, artifactRepositoryManager);
- if (metadataRepoDescriptor != null)
- destinationMetadataRepository = initializeDestination(metadataRepoDescriptor, metadataRepositoryManager);
-
- if (destinationMetadataRepository == null && destinationArtifactRepository == null)
- throw new ProvisionException(Messages.AbstractApplication_no_valid_destinations);
- }
-
- public IMetadataRepository getDestinationMetadataRepository() {
- return destinationMetadataRepository;
- }
-
- public IArtifactRepository getDestinationArtifactRepository() {
- return destinationArtifactRepository;
- }
-
- protected IMetadataRepository initializeDestination(RepositoryDescriptor toInit, IMetadataRepositoryManager mgr) throws ProvisionException {
- try {
- IMetadataRepository repository = addRepository(mgr, toInit.getRepoLocation(), IRepositoryManager.REPOSITORY_HINT_MODIFIABLE, null);
- if (initDestinationRepository(repository, toInit))
- return repository;
- } catch (ProvisionException e) {
- //fall through and create a new repository below
- }
-
- IMetadataRepository source = null;
- try {
- if (toInit.getFormat() != null)
- source = mgr.loadRepository(toInit.getFormat(), 0, null);
- } catch (ProvisionException e) {
- //Ignore.
- }
- //This code assumes source has been successfully loaded before this point
- //No existing repository; create a new repository at destinationLocation but with source's attributes.
- try {
- IMetadataRepository result = mgr.createRepository(toInit.getRepoLocation(), toInit.getName() != null ? toInit.getName() : (source != null ? source.getName() : toInit.getRepoLocation().toString()), IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, source != null ? source.getProperties() : null);
- if (toInit.isCompressed() && !result.getProperties().containsKey(IRepository.PROP_COMPRESSED))
- result.setProperty(IRepository.PROP_COMPRESSED, "true"); //$NON-NLS-1$
- return (IMetadataRepository) RepositoryHelper.validDestinationRepository(result);
- } catch (UnsupportedOperationException e) {
- throw new ProvisionException(NLS.bind(Messages.exception_invalidDestination, toInit.getRepoLocation()), e.getCause());
- }
- }
-
- protected IArtifactRepository initializeDestination(RepositoryDescriptor toInit, IArtifactRepositoryManager mgr) throws ProvisionException {
- try {
- IArtifactRepository repository = addRepository(mgr, toInit.getRepoLocation(), IRepositoryManager.REPOSITORY_HINT_MODIFIABLE, null);
- if (initDestinationRepository(repository, toInit))
- return repository;
- } catch (ProvisionException e) {
- //fall through and create a new repository below
- }
- IArtifactRepository source = null;
- try {
- if (toInit.getFormat() != null)
- source = mgr.loadRepository(toInit.getFormat(), 0, null);
- } catch (ProvisionException e) {
- //Ignore.
- }
- //This code assumes source has been successfully loaded before this point
- //No existing repository; create a new repository at destinationLocation but with source's attributes.
- // TODO for now create a Simple repo by default.
- try {
- IArtifactRepository result = mgr.createRepository(toInit.getRepoLocation(), toInit.getName() != null ? toInit.getName() : (source != null ? source.getName() : toInit.getRepoLocation().toString()), IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, source != null ? source.getProperties() : null);
- if (toInit.isCompressed() && !result.getProperties().containsKey(IRepository.PROP_COMPRESSED))
- result.setProperty(IRepository.PROP_COMPRESSED, "true"); //$NON-NLS-1$
- return (IArtifactRepository) RepositoryHelper.validDestinationRepository(result);
- } catch (UnsupportedOperationException e) {
- throw new ProvisionException(NLS.bind(Messages.exception_invalidDestination, toInit.getRepoLocation()), e.getCause());
- }
- }
-
- protected boolean initDestinationRepository(IRepository repository, RepositoryDescriptor descriptor) {
- if (repository != null && repository.isModifiable()) {
- if (descriptor.getName() != null)
- repository.setName(descriptor.getName());
- if (repository instanceof ICompositeRepository && !descriptor.isAppend())
- ((ICompositeRepository) repository).removeAllChildren();
- else if (repository instanceof IMetadataRepository && !descriptor.isAppend())
- ((IMetadataRepository) repository).removeAll();
- else if (repository instanceof IArtifactRepository && !descriptor.isAppend())
- ((IArtifactRepository) repository).removeAll();
- return true;
- }
- return false;
- }
-
- public IMetadataRepository getCompositeMetadataRepository() {
- if (compositeMetadataRepository == null) {
- try {
- compositeMetadataRepository = new CompositeMetadataRepository(new URI("memory:/composite"), "parent metadata repo", null);//$NON-NLS-1$ //$NON-NLS-2$
- } catch (URISyntaxException e) {
- //Can't happen
- }
- for (Iterator iter = sourceRepositories.iterator(); iter.hasNext();) {
- RepositoryDescriptor repo = (RepositoryDescriptor) iter.next();
- if (repo.isMetadata())
- compositeMetadataRepository.addChild(repo.getRepoLocation());
- }
- }
- return compositeMetadataRepository;
- }
-
- public IArtifactRepository getCompositeArtifactRepository() {
- if (compositeArtifactRepository == null) {
- try {
- compositeArtifactRepository = new CompositeArtifactRepository(new URI("memory:/composite"), "parent artifact repo", null);//$NON-NLS-1$ //$NON-NLS-2$
- } catch (URISyntaxException e) {
- //Can't happen
- }
- for (Iterator iter = sourceRepositories.iterator(); iter.hasNext();) {
- RepositoryDescriptor repo = (RepositoryDescriptor) iter.next();
- if (repo.isArtifact())
- compositeArtifactRepository.addChild(repo.getRepoLocation());
- }
- }
- return compositeArtifactRepository;
- }
-
- public boolean hasArtifactSources() {
- return ((ICompositeRepository) getCompositeArtifactRepository()).getChildren().size() > 0;
- }
-
- public boolean hasMetadataSources() {
- return ((ICompositeRepository) getCompositeMetadataRepository()).getChildren().size() > 0;
- }
-
- public abstract IStatus run(IProgressMonitor monitor) throws ProvisionException;
-
- public void addDestination(RepositoryDescriptor descriptor) {
- destinationRepos.add(descriptor);
- }
-
- public void addSource(RepositoryDescriptor repo) {
- sourceRepositories.add(repo);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Activator.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Activator.java
deleted file mode 100644
index 5c101ea89..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Activator.java
+++ /dev/null
@@ -1,120 +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.internal.repository.tools;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-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.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-public class Activator implements BundleActivator {
-
- public static final String ID = "org.eclipse.equinox.p2.transformer"; //$NON-NLS-1$
- private static BundleContext bundleContext;
-
- /*
- * Return the bundle context or <code>null</code>.
- */
- public static BundleContext getBundleContext() {
- return bundleContext;
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- bundleContext = context;
-
- // TODO needed to do this to ensure the profile registry was registered
- Bundle bundle = getBundle("org.eclipse.equinox.p2.exemplarysetup"); //$NON-NLS-1$
- if (bundle == null)
- throw new ProvisionException(Messages.unable_to_start_exemplarysetup);
- bundle.start(Bundle.START_TRANSIENT);
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- bundleContext = null;
- }
-
- /*
- * Construct and return a URI from the given String. Log
- * and return null if there was a problem.
- */
- public static URI getURI(String spec) {
- if (spec == null)
- return null;
- try {
- return URIUtil.fromString(spec);
- } catch (URISyntaxException e) {
- LogHelper.log(new Status(IStatus.WARNING, ID, NLS.bind(Messages.unable_to_process_uri, spec), e));
- }
- return null;
- }
-
- /*
- * Return the artifact repository manager. Throw an exception if it cannot be obtained.
- */
- public static IArtifactRepositoryManager getArtifactRepositoryManager() throws ProvisionException {
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(getBundleContext(), IArtifactRepositoryManager.class.getName());
- if (manager == null)
- throw new ProvisionException(Messages.no_artifactRepo_manager);
- return manager;
- }
-
- /*
- * Return the profile registry. Throw an exception if it cannot be found.
- */
- static IProfileRegistry getProfileRegistry() throws ProvisionException {
- IProfileRegistry registry = (IProfileRegistry) ServiceHelper.getService(getBundleContext(), IProfileRegistry.class.getName());
- if (registry == null)
- throw new ProvisionException(Messages.no_profile_registry);
- return registry;
- }
-
- /*
- * Return the bundle with the given symbolic name, or null if it cannot be found.
- */
- public static synchronized Bundle getBundle(String symbolicName) throws ProvisionException {
- PackageAdmin packageAdmin = (PackageAdmin) ServiceHelper.getService(getBundleContext(), PackageAdmin.class.getName());
- if (packageAdmin == null)
- throw new ProvisionException(Messages.no_package_admin);
- 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;
- }
-
- /*
- * Return the metadata repository manager. Throw an exception if it cannot be obtained.
- */
- public static IMetadataRepositoryManager getMetadataRepositoryManager() throws ProvisionException {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(getBundleContext(), IMetadataRepositoryManager.class.getName());
- if (manager == null)
- throw new ProvisionException(Messages.no_metadataRepo_manager);
- return manager;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/CompositeRepositoryApplication.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/CompositeRepositoryApplication.java
deleted file mode 100644
index 11f73dee6..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/CompositeRepositoryApplication.java
+++ /dev/null
@@ -1,183 +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.internal.repository.tools;
-
-import java.net.MalformedURLException;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
-import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.repository.ICompositeRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.osgi.util.NLS;
-
-public class CompositeRepositoryApplication extends AbstractApplication {
- private List childrenToAdd = new ArrayList();
- private List childrenToRemove = new ArrayList();
- private boolean failOnExists = false;
- private String comparatorID = null;
-
- public IStatus run(IProgressMonitor monitor) throws ProvisionException {
- try {
- initializeRepos(new NullProgressMonitor());
- // load repository
- ICompositeRepository metadataRepo = (ICompositeRepository) destinationMetadataRepository;
- CompositeArtifactRepository artifactRepo = (CompositeArtifactRepository) destinationArtifactRepository;
-
- // Remove children from the Composite Repositories
- for (Iterator iterator = childrenToRemove.iterator(); iterator.hasNext();) {
- RepositoryDescriptor child = (RepositoryDescriptor) iterator.next();
- if (child.isArtifact() && artifactRepo != null)
- artifactRepo.removeChild(child.getOriginalRepoLocation());
- if (child.isMetadata() && metadataRepo != null)
- metadataRepo.removeChild(child.getOriginalRepoLocation());
- }
-
- // Add children to the Composite Repositories
- for (Iterator iterator = childrenToAdd.iterator(); iterator.hasNext();) {
- RepositoryDescriptor child = (RepositoryDescriptor) iterator.next();
- if (child.isArtifact() && artifactRepo != null)
- artifactRepo.addChild(child.getOriginalRepoLocation());
- if (child.isMetadata() && metadataRepo != null)
- metadataRepo.addChild(child.getOriginalRepoLocation());
- }
-
- if (comparatorID != null)
- if (!artifactRepo.validate(comparatorID))
- return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.CompositeRepositoryApplication_failedComparator, comparatorID));
- return Status.OK_STATUS;
- } finally {
- finalizeRepositories();
- }
- }
-
- public void addChild(RepositoryDescriptor child) {
- childrenToAdd.add(child);
- }
-
- public void removeChild(RepositoryDescriptor child) {
- childrenToRemove.add(child);
- }
-
- public void setFailOnExists(boolean value) {
- failOnExists = value;
- }
-
- protected IArtifactRepository initializeDestination(RepositoryDescriptor toInit, IArtifactRepositoryManager mgr) throws ProvisionException {
- // remove the repo first.
- mgr.removeRepository(toInit.getRepoLocation());
-
- // first try and load to see if one already exists at that location.
- try {
- IArtifactRepository repository = mgr.loadRepository(toInit.getRepoLocation(), null);
- if (validRepositoryLocation(repository) && initDestinationRepository(repository, toInit))
- return repository;
- throw new ProvisionException(new Status(IStatus.INFO, Activator.ID, NLS.bind(Messages.CompositeRepository_composite_repository_exists, toInit.getRepoLocation())));
- } catch (ProvisionException e) {
- // re-throw the exception if we got anything other than "repo not found"
- if (e.getStatus().getCode() != ProvisionException.REPOSITORY_NOT_FOUND) {
- if (e.getCause() instanceof MalformedURLException)
- throw new ProvisionException(NLS.bind(Messages.exception_invalidDestination, toInit.getRepoLocation()), e.getCause());
- throw e;
- }
- }
-
- IArtifactRepository source = null;
- try {
- if (toInit.getFormat() != null)
- source = mgr.loadRepository(toInit.getFormat(), 0, null);
- } catch (ProvisionException e) {
- //Ignore.
- }
- //This code assumes source has been successfully loaded before this point
- try {
- //No existing repository; create a new repository at destinationLocation but with source's attributes.
- IArtifactRepository repo = mgr.createRepository(toInit.getRepoLocation(), toInit.getName() != null ? toInit.getName() : (source != null ? source.getName() : Messages.CompositeRepository_default_artifactRepo_name), IArtifactRepositoryManager.TYPE_COMPOSITE_REPOSITORY, source != null ? source.getProperties() : null);
- initRepository(repo, toInit);
- return repo;
- } catch (IllegalStateException e) {
- mgr.removeRepository(toInit.getRepoLocation());
- throw e;
- }
- }
-
- protected IMetadataRepository initializeDestination(RepositoryDescriptor toInit, IMetadataRepositoryManager mgr) throws ProvisionException {
- // remove the repo first.
- mgr.removeRepository(toInit.getRepoLocation());
-
- // first try and load to see if one already exists at that location.
- try {
- IMetadataRepository repository = mgr.loadRepository(toInit.getRepoLocation(), null);
- if (!validRepositoryLocation(repository) && initDestinationRepository(repository, toInit))
- throw new ProvisionException(new Status(IStatus.INFO, Activator.ID, NLS.bind(Messages.CompositeRepository_composite_repository_exists, toInit.getRepoLocation())));
- return repository;
- } catch (ProvisionException e) {
- // re-throw the exception if we got anything other than "repo not found"
- if (e.getStatus().getCode() != ProvisionException.REPOSITORY_NOT_FOUND) {
- if (e.getCause() instanceof MalformedURLException)
- throw new ProvisionException(NLS.bind(Messages.exception_invalidDestination, toInit.getRepoLocation()), e.getCause());
- throw e;
- }
- }
-
- IMetadataRepository source = null;
- try {
- if (toInit.getFormat() != null)
- source = mgr.loadRepository(toInit.getFormat(), 0, null);
- } catch (ProvisionException e) {
- //Ignore
- }
- //This code assumes source has been successfully loaded before this point
- try {
- //No existing repository; create a new repository at destinationLocation but with source's attributes.
- IMetadataRepository repo = mgr.createRepository(toInit.getRepoLocation(), toInit.getName() != null ? toInit.getName() : (source != null ? source.getName() : Messages.CompositeRepository_default_metadataRepo_name), IMetadataRepositoryManager.TYPE_COMPOSITE_REPOSITORY, source != null ? source.getProperties() : null);
- initRepository(repo, toInit);
- return repo;
- } catch (IllegalStateException e) {
- mgr.removeRepository(toInit.getRepoLocation());
- throw e;
- }
- }
-
- /*
- * Determine if the repository is valid for this operation
- */
- private boolean validRepositoryLocation(IRepository repository) throws ProvisionException {
- if (repository instanceof ICompositeRepository) {
- // if we have an already existing repository at that location, then throw an error
- // if the user told us to
- if (failOnExists)
- throw new ProvisionException(NLS.bind(Messages.CompositeRepository_composite_repository_exists, repository.getLocation()));
- RepositoryHelper.validDestinationRepository(repository);
- return true;
- }
- // we have a non-composite repo at this location. that is ok because we can co-exist.
- return true;
- }
-
- /*
- * Initialize a new repository
- */
- private void initRepository(IRepository repository, RepositoryDescriptor desc) {
- RepositoryHelper.validDestinationRepository(repository);
- if (desc.isCompressed() && !repository.getProperties().containsKey(IRepository.PROP_COMPRESSED))
- repository.setProperty(IRepository.PROP_COMPRESSED, String.valueOf(true));
- }
-
- public void setComparator(String value) {
- comparatorID = value;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Messages.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Messages.java
deleted file mode 100644
index 1ec043a93..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Messages.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.p2.internal.repository.tools;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.p2.internal.repository.tools.messages"; //$NON-NLS-1$
- public static String exception_destinationNotModifiable;
- public static String exception_unableToRemoveRepo;
- public static String exception_notLocalFileRepo;
- public static String exception_noEngineService;
- public static String exception_needIUsOrNonEmptyRepo;
- public static String exception_needDestinationRepo;
- public static String exception_onlyOneComparator;
-
- public static String AbstractApplication_no_valid_destinations;
-
- public static String AbstractRepositoryTask_unableToFind;
-
- public static String CompositeRepository_composite_repository_exists;
- public static String CompositeRepository_default_artifactRepo_name;
- public static String CompositeRepository_default_metadataRepo_name;
-
- public static String no_artifactRepo_manager;
- public static String no_metadataRepo_manager;
- public static String no_package_admin;
- public static String no_profile_registry;
- public static String unable_to_process_uri;
- public static String unable_to_start_exemplarysetup;
- public static String unknown_repository_type;
-
- public static String MirrorApplication_artifactDestinationNoSource;
- public static String MirrorApplication_metadataDestinationNoSource;
- public static String MirrorApplication_missingIU;
- public static String MirrorApplication_missingSourceForIUs;
- public static String MirrorApplication_no_IUs;
- public static String MirrorApplication_set_source_repositories;
- public static String MirrorApplication_validateAndMirrorProblems;
-
- public static String ProcessRepo_location_not_url;
- public static String ProcessRepo_must_be_local;
-
- public static String SlicingOption_invalid_platform;
- public static String exception_invalidDestination;
- public static String exception_invalidSource;
- public static String CompositeRepositoryApplication_failedComparator;
- public static String Repo2RunnableTask_errorTransforming;
- public static String SlicingOption_invalidFilterFormat;
-
- static {
- // initialize resource bundles
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- // Do not instantiate
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java
deleted file mode 100644
index eeb958db5..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java
+++ /dev/null
@@ -1,284 +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.internal.repository.tools;
-
-import java.io.File;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Iterator;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.artifact.mirror.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.director.PermissiveSlicer;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.LatestIUVersionQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
-
-public class MirrorApplication extends AbstractApplication {
- private static final String LOG_ROOT = "p2.mirror"; //$NON-NLS-1$
-
- protected SlicingOptions slicingOptions = new SlicingOptions();
-
- private URI baseline;
- private String comparatorID;
- private boolean compare = false;
- private boolean failOnError = true;
- private boolean raw = true;
- private boolean verbose = false;
- private boolean validate = false;
-
- private File mirrorLogFile; // file to log mirror output to (optional)
- private File comparatorLogFile; // file to comparator output to (optional)
- private IArtifactMirrorLog mirrorLog;
- private IArtifactMirrorLog comparatorLog;
-
- public Object start(IApplicationContext context) throws Exception {
- run(null);
- return IApplication.EXIT_OK;
- }
-
- public IStatus run(IProgressMonitor monitor) throws ProvisionException {
- IStatus mirrorStatus = Status.OK_STATUS;
- try {
- initializeRepos(new NullProgressMonitor());
- initializeLogs();
- validate();
- initializeIUs();
- IQueryable slice = slice(new NullProgressMonitor());
- if (destinationArtifactRepository != null) {
- mirrorStatus = mirrorArtifacts(slice, new NullProgressMonitor());
- if (mirrorStatus.getSeverity() == IStatus.ERROR)
- return mirrorStatus;
- }
- if (destinationMetadataRepository != null)
- mirrorMetadata(slice, new NullProgressMonitor());
- } finally {
- finalizeRepositories();
- finalizeLogs();
- }
- if (mirrorStatus.isOK())
- return Status.OK_STATUS;
- return mirrorStatus;
- }
-
- private IStatus mirrorArtifacts(IQueryable slice, IProgressMonitor monitor) throws ProvisionException {
- // Obtain ArtifactKeys from IUs
- Collector ius = slice.query(InstallableUnitQuery.ANY, new Collector(), monitor);
- ArrayList keys = new ArrayList(ius.size());
- for (Iterator iterator = ius.iterator(); iterator.hasNext();) {
- IInstallableUnit iu = (IInstallableUnit) iterator.next();
- IArtifactKey[] iuKeys = iu.getArtifacts();
- for (int i = 0; i < iuKeys.length; i++) {
- keys.add(iuKeys[i]);
- }
- }
- Mirroring mirror = new Mirroring(getCompositeArtifactRepository(), destinationArtifactRepository, raw);
-
- mirror.setCompare(compare);
- mirror.setComparatorId(comparatorID);
- mirror.setBaseline(initializeBaseline());
- mirror.setValidate(validate);
-
- // If IUs have been specified then only they should be mirrored, otherwise mirror everything.
- if (keys.size() > 0)
- mirror.setArtifactKeys((IArtifactKey[]) keys.toArray(new IArtifactKey[keys.size()]));
-
- if (comparatorLog != null)
- mirror.setComparatorLog(comparatorLog);
-
- IStatus result = mirror.run(failOnError, verbose);
-
- if (mirrorLog != null)
- mirrorLog.log(result);
- else
- LogHelper.log(result);
- return result;
- }
-
- private IArtifactRepository initializeBaseline() throws ProvisionException {
- if (baseline == null)
- return null;
- return addRepository(Activator.getArtifactRepositoryManager(), baseline, 0, null);
- }
-
- private void mirrorMetadata(IQueryable slice, IProgressMonitor monitor) {
- Collector allIUs = slice.query(InstallableUnitQuery.ANY, new Collector(), monitor);
- destinationMetadataRepository.addInstallableUnits((IInstallableUnit[]) allIUs.toArray(IInstallableUnit.class));
- }
-
- /*
- * Ensure all mandatory parameters have been set. Throw an exception if there
- * are any missing. We don't require the user to specify the artifact repository here,
- * we will default to the ones already registered in the manager. (callers are free
- * to add more if they wish)
- */
- private void validate() throws ProvisionException {
- if (sourceRepositories.isEmpty())
- throw new ProvisionException(Messages.MirrorApplication_set_source_repositories);
- if (!hasArtifactSources() && destinationArtifactRepository != null)
- throw new ProvisionException(Messages.MirrorApplication_artifactDestinationNoSource);
- if (!hasMetadataSources() && destinationMetadataRepository != null)
- throw new ProvisionException(Messages.MirrorApplication_metadataDestinationNoSource);
- }
-
- /*
- * If no IUs have been specified we want to mirror them all
- */
- private void initializeIUs() throws ProvisionException {
- if (sourceIUs == null || sourceIUs.isEmpty()) {
- sourceIUs = new ArrayList();
- IMetadataRepository metadataRepo = getCompositeMetadataRepository();
- Collector collector = metadataRepo.query(InstallableUnitQuery.ANY, new Collector(), null);
-
- for (Iterator iter = collector.iterator(); iter.hasNext();) {
- IInstallableUnit iu = (IInstallableUnit) iter.next();
- sourceIUs.add(iu);
- }
-
- if (collector.size() == 0 && destinationMetadataRepository != null)
- throw new ProvisionException(Messages.MirrorApplication_no_IUs);
- }
- }
-
- /*
- * Initialize logs, if applicable
- */
- private void initializeLogs() {
- if (compare && comparatorLogFile != null)
- comparatorLog = getLog(comparatorLogFile, comparatorID);
- if (mirrorLog == null && mirrorLogFile != null)
- mirrorLog = getLog(mirrorLogFile, LOG_ROOT);
- }
-
- /*
- * Finalize logs, if applicable
- */
- private void finalizeLogs() {
- if (comparatorLog != null)
- comparatorLog.close();
- if (mirrorLog != null)
- mirrorLog.close();
- }
-
- /*
- * Get the log for a location
- */
- private IArtifactMirrorLog getLog(File location, String root) {
- String absolutePath = location.getAbsolutePath();
- if (absolutePath.toLowerCase().endsWith(".xml")) //$NON-NLS-1$
- return new XMLMirrorLog(absolutePath, 0, root);
- return new FileMirrorLog(absolutePath, 0, root);
- }
-
- private IQueryable slice(IProgressMonitor monitor) throws ProvisionException {
- if (slicingOptions == null)
- slicingOptions = new SlicingOptions();
- PermissiveSlicer slicer = new PermissiveSlicer(getCompositeMetadataRepository(), slicingOptions.getFilter(), slicingOptions.includeOptionalDependencies(), slicingOptions.isEverythingGreedy(), slicingOptions.forceFilterTo(), slicingOptions.considerStrictDependencyOnly(), slicingOptions.followOnlyFilteredRequirements());
- IQueryable slice = slicer.slice((IInstallableUnit[]) sourceIUs.toArray(new IInstallableUnit[sourceIUs.size()]), monitor);
-
- if (slice != null && slicingOptions.latestVersionOnly()) {
- Collector collector = new Collector();
- collector = slice.query(new LatestIUVersionQuery(), collector, monitor);
- slice = collector;
- }
- if (slicer.getStatus().getSeverity() != IStatus.OK && mirrorLog != null) {
- mirrorLog.log(slicer.getStatus());
- }
- if (slice == null) {
- throw new ProvisionException(slicer.getStatus());
- }
- return slice;
- }
-
- public void setSlicingOptions(SlicingOptions options) {
- slicingOptions = options;
- }
-
- /*
- * Set the location of the baseline repository. (used in comparison)
- */
- public void setBaseline(URI baseline) {
- this.baseline = baseline;
- compare = true;
- }
-
- /*
- * Set the identifier of the comparator to use.
- */
- public void setComparatorID(String value) {
- comparatorID = value;
- compare = true;
- }
-
- /*
- * Set whether or not the application should be calling a comparator when mirroring.
- */
- public void setCompare(boolean value) {
- compare = value;
- }
-
- /*
- * Set whether or not we should ignore errors when running the mirror application.
- */
- public void setIgnoreErrors(boolean value) {
- failOnError = !value;
- }
-
- /*
- * Set whether or not the the artifacts are raw.
- */
- public void setRaw(boolean value) {
- raw = value;
- }
-
- /*
- * Set whether or not the mirror application should be run in verbose mode.
- */
- public void setVerbose(boolean value) {
- verbose = value;
- }
-
- /*
- * Set the location of the log for comparator output
- */
- public void setComparatorLog(File comparatorLog) {
- this.comparatorLogFile = comparatorLog;
- }
-
- /*
- * Set the location of the log for mirroring.
- */
- public void setLog(File mirrorLog) {
- this.mirrorLogFile = mirrorLog;
- }
-
- /*
- * Set the ArtifactMirror log
- */
- public void setLog(IArtifactMirrorLog log) {
- mirrorLog = log;
- }
-
- /*
- * Set if the artifact mirror should be validated
- */
- public void setValidate(boolean value) {
- validate = value;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java
deleted file mode 100644
index cfa96c47a..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java
+++ /dev/null
@@ -1,152 +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.internal.repository.tools;
-
-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.artifact.repository.simple.SimpleArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.osgi.util.NLS;
-
-public class RecreateRepositoryApplication {
- static final private String PUBLISH_PACK_FILES_AS_SIBLINGS = "publishPackFilesAsSiblings"; //$NON-NLS-1$
- private RepositoryDescriptor descriptor;
- private String repoName = null;
- boolean removeArtifactRepo = true;
- private Map repoProperties = null;
- private Map repoMap = null;
-
- public IStatus run(IProgressMonitor monitor) throws ProvisionException, IOException {
-
- try {
- IArtifactRepository repository = initialize(monitor);
- removeRepository(repository, monitor);
- recreateRepository(monitor);
- } finally {
- if (removeArtifactRepo) {
- IArtifactRepositoryManager repositoryManager = Activator.getArtifactRepositoryManager();
- repositoryManager.removeRepository(descriptor.getRepoLocation());
- }
- }
-
- return Status.OK_STATUS;
- }
-
- public void setArtifactRepository(RepositoryDescriptor descriptor) {
- this.descriptor = descriptor;
- }
-
- private IArtifactRepository initialize(IProgressMonitor monitor) throws ProvisionException {
- IArtifactRepositoryManager repositoryManager = Activator.getArtifactRepositoryManager();
- removeArtifactRepo = !repositoryManager.contains(descriptor.getRepoLocation());
-
- IArtifactRepository repository = repositoryManager.loadRepository(descriptor.getRepoLocation(), IRepositoryManager.REPOSITORY_HINT_MODIFIABLE, monitor);
-
- if (repository == null || !repository.isModifiable())
- throw new ProvisionException(NLS.bind(Messages.exception_destinationNotModifiable, repository.getLocation()));
- if (!(repository instanceof IFileArtifactRepository))
- throw new ProvisionException(NLS.bind(Messages.exception_notLocalFileRepo, repository.getLocation()));
-
- repoName = repository.getName();
- repoProperties = repository.getProperties();
-
- repoMap = new HashMap();
- IArtifactKey[] keys = repository.getArtifactKeys();
- for (int i = 0; i < keys.length; i++) {
- IArtifactDescriptor[] descriptors = repository.getArtifactDescriptors(keys[i]);
- repoMap.put(keys[i], descriptors);
- }
-
- return repository;
- }
-
- private void removeRepository(IArtifactRepository repository, IProgressMonitor monitor) throws ProvisionException, IOException {
- IArtifactRepositoryManager manager = Activator.getArtifactRepositoryManager();
- manager.removeRepository(repository.getLocation());
-
- boolean compressed = Boolean.valueOf((String) repoProperties.get(IRepository.PROP_COMPRESSED)).booleanValue();
- URI realLocation = SimpleArtifactRepository.getActualLocation(repository.getLocation(), compressed);
- File realFile = URIUtil.toFile(realLocation);
-
- if (!realFile.exists() || !realFile.delete())
- throw new ProvisionException(NLS.bind(Messages.exception_unableToRemoveRepo, realFile.toString()));
- }
-
- private void recreateRepository(IProgressMonitor monitor) throws ProvisionException {
- IArtifactRepositoryManager manager = Activator.getArtifactRepositoryManager();
-
- //add pack200 mappings, the existing repoProperties is not modifiable
- Map newProperties = new HashMap(repoProperties);
- newProperties.put(PUBLISH_PACK_FILES_AS_SIBLINGS, "true"); //$NON-NLS-1$
- IArtifactRepository repository = manager.createRepository(descriptor.getRepoLocation(), repoName, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, newProperties);
- if (!(repository instanceof IFileArtifactRepository))
- throw new ProvisionException(NLS.bind(Messages.exception_notLocalFileRepo, repository.getLocation()));
-
- IFileArtifactRepository simple = (IFileArtifactRepository) repository;
- for (Iterator iterator = repoMap.keySet().iterator(); iterator.hasNext();) {
- IArtifactKey key = (IArtifactKey) iterator.next();
- IArtifactDescriptor[] descriptors = (IArtifactDescriptor[]) repoMap.get(key);
-
- String unpackedSize = null;
- File packFile = null;
- Set files = new HashSet();
- for (int i = 0; i < descriptors.length; i++) {
- File artifactFile = simple.getArtifactFile(descriptors[i]);
- files.add(artifactFile);
-
- String size = Long.toString(artifactFile.length());
-
- ArtifactDescriptor newDescriptor = new ArtifactDescriptor(descriptors[i]);
- newDescriptor.setProperty(IArtifactDescriptor.ARTIFACT_SIZE, size);
- newDescriptor.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, size);
- //only set an MD5 if there was one to start with
- if (newDescriptor.getProperties().containsKey(IArtifactDescriptor.DOWNLOAD_MD5))
- newDescriptor.setProperty(IArtifactDescriptor.DOWNLOAD_MD5, RepositoryUtilities.computeMD5(artifactFile));
-
- File temp = new File(artifactFile.getParentFile(), artifactFile.getName() + ".pack.gz"); //$NON-NLS-1$
- if (temp.exists()) {
- packFile = temp;
- unpackedSize = size;
- }
-
- repository.addDescriptor(newDescriptor);
- }
- if (packFile != null && !files.contains(packFile) && packFile.length() > 0) {
- ArtifactDescriptor packDescriptor = createPack200ArtifactDescriptor(key, packFile, unpackedSize);
- repository.addDescriptor(packDescriptor);
- }
- }
- }
-
- private ArtifactDescriptor createPack200ArtifactDescriptor(IArtifactKey key, File packFile, String installSize) {
- final String PACKED_FORMAT = "packed"; //$NON-NLS-1$
-
- if (packFile != null && packFile.exists()) {
- ArtifactDescriptor result = new ArtifactDescriptor(key);
- result.setProperty(IArtifactDescriptor.ARTIFACT_SIZE, installSize);
- result.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, Long.toString(packFile.length()));
- ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
- result.setProcessingSteps(steps);
- result.setProperty(IArtifactDescriptor.FORMAT, PACKED_FORMAT);
- return result;
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
deleted file mode 100644
index 69e6ba59e..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
+++ /dev/null
@@ -1,277 +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.internal.repository.tools;
-
-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.ServiceHelper;
-import org.eclipse.equinox.internal.p2.engine.DownloadManager;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRequest;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.phases.Collect;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-
-/**
- * The transformer takes an existing p2 repository (local or remote), iterates over
- * its list of IUs, and fetches all of the corresponding artifacts to a user-specified location.
- * Once fetched, the artifacts will be in "runnable" form... that is directory-based bundles will be
- * extracted into folders and packed JAR files will be un-packed.
- *
- * @since 1.0
- */
-public class Repo2Runnable extends AbstractApplication implements IApplication {
- private static final String NATIVE_ARTIFACTS = "nativeArtifacts"; //$NON-NLS-1$
- private static final String NATIVE_TYPE = "org.eclipse.equinox.p2.native"; //$NON-NLS-1$
- private static final String PARM_OPERAND = "operand"; //$NON-NLS-1$
-
- protected class CollectNativesAction extends ProvisioningAction {
- public IStatus execute(Map parameters) {
- InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
- IInstallableUnit installableUnit = operand.second();
-
- IArtifactRepositoryManager manager = null;
- try {
- manager = Activator.getArtifactRepositoryManager();
- } catch (ProvisionException e) {
- return e.getStatus();
- }
-
- IArtifactKey[] toDownload = installableUnit.getArtifacts();
- if (toDownload == null)
- return Status.OK_STATUS;
-
- List artifactRequests = (List) parameters.get(NATIVE_ARTIFACTS);
-
- for (int i = 0; i < toDownload.length; i++) {
- IArtifactRequest request = manager.createMirrorRequest(toDownload[i], destinationArtifactRepository, null, null);
- artifactRequests.add(request);
- }
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map parameters) {
- // nothing to do for now
- return Status.OK_STATUS;
- }
- }
-
- protected class CollectNativesPhase extends InstallableUnitPhase {
- public CollectNativesPhase(int weight) {
- super(NATIVE_ARTIFACTS, weight);
- }
-
- protected ProvisioningAction[] getActions(InstallableUnitOperand operand) {
- IInstallableUnit unit = operand.second();
- if (unit.getTouchpointType().getId().equals(NATIVE_TYPE)) {
- return new ProvisioningAction[] {new CollectNativesAction()};
- }
- return null;
- }
-
- protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map parameters) {
- parameters.put(NATIVE_ARTIFACTS, new ArrayList());
- return null;
- }
-
- protected IStatus completePhase(IProgressMonitor monitor, IProfile profile, Map parameters) {
- List artifactRequests = (List) parameters.get(NATIVE_ARTIFACTS);
- ProvisioningContext context = (ProvisioningContext) parameters.get(PARM_CONTEXT);
-
- DownloadManager dm = new DownloadManager(context);
- for (Iterator it = artifactRequests.iterator(); it.hasNext();) {
- dm.add((IArtifactRequest) it.next());
- }
- return dm.start(monitor);
- }
- }
-
- // the list of IUs that we actually transformed... could have come from the repo
- // or have been user-specified.
- private Collection processedIUs = new ArrayList();
-
- /*
- * Perform the transformation.
- */
- public IStatus run(IProgressMonitor monitor) throws ProvisionException {
- SubMonitor progress = SubMonitor.convert(monitor, 5);
-
- initializeRepos(progress);
-
- // ensure all the right parameters are set
- validate();
-
- // figure out which IUs we need to process
- collectIUs(progress.newChild(1));
-
- // create the operands from the list of IUs
- InstallableUnitOperand[] operands = new InstallableUnitOperand[processedIUs.size()];
- int i = 0;
- for (Iterator iter = processedIUs.iterator(); iter.hasNext();)
- operands[i++] = new InstallableUnitOperand(null, (IInstallableUnit) iter.next());
-
- // call the engine with only the "collect" phase so all we do is download
- IProfile profile = createProfile();
- try {
- ProvisioningContext context = new ProvisioningContext();
- Engine engine = (Engine) ServiceHelper.getService(Activator.getBundleContext(), IEngine.SERVICE_NAME);
- if (engine == null)
- throw new ProvisionException(Messages.exception_noEngineService);
-
- IStatus result = engine.perform(profile, getPhaseSet(), operands, context, progress.newChild(1));
- engine.perform(profile, getNativePhase(), operands, context, progress.newChild(1));
-
- // publish the metadata to a destination - if requested
- publishMetadata(progress.newChild(1));
-
- // return the resulting status
- return result;
- } finally {
- // cleanup by removing the temporary profile and unloading the repos which were new
- removeProfile(profile);
- finalizeRepositories();
- }
- }
-
- protected PhaseSet getPhaseSet() {
- return new PhaseSet(new Phase[] {new Collect(100)}) { /* nothing to override */};
- }
-
- protected PhaseSet getNativePhase() {
- return new PhaseSet(new Phase[] {new CollectNativesPhase(100)}) { /*nothing to override */};
- }
-
- /*
- * Figure out exactly which IUs we have to process.
- */
- private void collectIUs(IProgressMonitor monitor) throws ProvisionException {
- // if the user told us exactly which IUs to process, then just set it and return.
- if (sourceIUs != null && !sourceIUs.isEmpty()) {
- processedIUs = sourceIUs;
- return;
- }
- // get all IUs from the repos
- if (!hasMetadataSources())
- throw new ProvisionException(Messages.exception_needIUsOrNonEmptyRepo);
-
- processedIUs.addAll(getAllIUs(getCompositeMetadataRepository(), monitor).toCollection());
-
- if (processedIUs.isEmpty())
- throw new ProvisionException(Messages.exception_needIUsOrNonEmptyRepo);
- }
-
- /*
- * If there is a destination metadata repository set, then add all our transformed
- * IUs to it.
- */
- private void publishMetadata(IProgressMonitor monitor) {
- // publishing the metadata is optional
- if (destinationMetadataRepository == null)
- return;
- destinationMetadataRepository.addInstallableUnits((IInstallableUnit[]) processedIUs.toArray(new IInstallableUnit[processedIUs.size()]));
- }
-
- /*
- * Return a collector over all the IUs contained in the given repository.
- */
- private Collector getAllIUs(IMetadataRepository repository, IProgressMonitor monitor) {
- SubMonitor progress = SubMonitor.convert(monitor, 2);
- try {
- return repository.query(InstallableUnitQuery.ANY, new Collector(), progress.newChild(1));
- } finally {
- progress.done();
- }
- }
-
- /*
- * Remove the given profile from the profile registry.
- */
- private void removeProfile(IProfile profile) throws ProvisionException {
- IProfileRegistry registry = Activator.getProfileRegistry();
- registry.removeProfile(profile.getProfileId());
- }
-
- /*
- * Create and return a new profile.
- */
- private IProfile createProfile() throws ProvisionException {
- Map properties = new Properties();
- properties.put(IProfile.PROP_CACHE, URIUtil.toFile(destinationArtifactRepository.getLocation()).getAbsolutePath());
- properties.put(IProfile.PROP_INSTALL_FOLDER, URIUtil.toFile(destinationArtifactRepository.getLocation()).getAbsolutePath());
- IProfileRegistry registry = Activator.getProfileRegistry();
- return registry.addProfile(System.currentTimeMillis() + "-" + Math.random(), properties); //$NON-NLS-1$
- }
-
- /* (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);
- processCommandLineArgs(args);
- // perform the transformation
- run(null);
- return IApplication.EXIT_OK;
- }
-
- /*
- * Iterate over the command-line arguments and prepare the transformer for processing.
- */
- private void processCommandLineArgs(String[] args) throws URISyntaxException {
- if (args == null)
- return;
- for (int i = 0; i < args.length; i++) {
- String option = args[i];
- if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
- continue;
- String arg = args[++i];
-
- if (option.equalsIgnoreCase("-source")) { //$NON-NLS-1$
- RepositoryDescriptor source = new RepositoryDescriptor();
- source.setLocation(URIUtil.fromString(arg));
- addSource(source);
- }
-
- if (option.equalsIgnoreCase("-destination")) { //$NON-NLS-1$
- RepositoryDescriptor destination = new RepositoryDescriptor();
- destination.setLocation(URIUtil.fromString(arg));
- addDestination(destination);
- }
- }
- }
-
- /*
- * Ensure all mandatory parameters have been set. Throw an exception if there
- * are any missing. We don't require the user to specify the artifact repository here,
- * we will default to the ones already registered in the manager. (callers are free
- * to add more if they wish)
- */
- private void validate() throws ProvisionException {
- if (!hasMetadataSources() && sourceIUs == null)
- throw new ProvisionException(Messages.exception_needIUsOrNonEmptyRepo);
- if (destinationArtifactRepository == null)
- throw new ProvisionException(Messages.exception_needDestinationRepo);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
- public void stop() {
- // nothing to do
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RepositoryDescriptor.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RepositoryDescriptor.java
deleted file mode 100644
index 478f7fe10..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RepositoryDescriptor.java
+++ /dev/null
@@ -1,115 +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.internal.repository.tools;
-
-import java.net.URI;
-import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.osgi.util.NLS;
-
-public class RepositoryDescriptor {
-
- public static final int TYPE_BOTH = -1;
- public static final String KIND_ARTIFACT = "A"; //$NON-NLS-1$
- public static final String KIND_METADATA = "M"; //$NON-NLS-1$
-
- private boolean compressed = true;
- private boolean append = true;
- private String name = null;
- private URI location = null;
- private URI format = null;
- private int kind = TYPE_BOTH;
- private URI originalLocation = null;
-
- public void setCompressed(boolean compress) {
- compressed = compress;
- }
-
- public void setName(String repoName) {
- name = repoName;
- }
-
- public void setLocation(URI repoLocation) {
- originalLocation = repoLocation;
- location = RepositoryHelper.localRepoURIHelper(repoLocation);
- }
-
- public void setFormat(URI format) {
- this.format = RepositoryHelper.localRepoURIHelper(format);
- }
-
- public void setAppend(boolean appendMode) {
- append = appendMode;
- }
-
- public boolean isCompressed() {
- return compressed;
- }
-
- public boolean isAppend() {
- return append;
- }
-
- public String getName() {
- return name;
- }
-
- public URI getRepoLocation() {
- return location;
- }
-
- public URI getOriginalRepoLocation() {
- return originalLocation;
- }
-
- public URI getFormat() {
- return format;
- }
-
- public int getKind() {
- return kind;
- }
-
- public boolean isBoth() {
- return kind == TYPE_BOTH;
- }
-
- public boolean isArtifact() {
- return kind == TYPE_BOTH || kind == IRepository.TYPE_ARTIFACT;
- }
-
- public boolean isMetadata() {
- return kind == TYPE_BOTH || kind == IRepository.TYPE_METADATA;
- }
-
- public void setKind(String repoKind) {
- kind = determineKind(repoKind);
- }
-
- /*
- * Determine the repository type
- */
- public static int determineKind(String repoKind) {
- if (kindMatches(repoKind, KIND_METADATA))
- return IRepository.TYPE_METADATA;
- else if (kindMatches(repoKind, KIND_ARTIFACT))
- return IRepository.TYPE_ARTIFACT;
-
- throw new IllegalArgumentException(NLS.bind(Messages.unknown_repository_type, repoKind));
- }
-
- /*
- * Determine if the repository kind matches the identifier kind
- */
- public static boolean kindMatches(String repoKind, String kindIdentifier) {
- return repoKind.startsWith(kindIdentifier) || repoKind.startsWith(kindIdentifier.toLowerCase());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RepositoryUtilities.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RepositoryUtilities.java
deleted file mode 100644
index 11e3e32c6..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RepositoryUtilities.java
+++ /dev/null
@@ -1,57 +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.internal.repository.tools;
-
-import java.io.*;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-
-public class RepositoryUtilities {
-
- public 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
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/SlicingOptions.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/SlicingOptions.java
deleted file mode 100644
index 6531d3696..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/SlicingOptions.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.internal.repository.tools;
-
-import java.util.Dictionary;
-import java.util.Properties;
-
-public class SlicingOptions {
- private boolean includeOptionalDependencies = true;
- private boolean everythingGreedy = true;
- private boolean forceFilterTo = true;
- private boolean considerStrictDependencyOnly = false;
- private boolean followOnlyFilteredRequirements = false;
- private boolean latestVersion = false;
- private Dictionary filter = null;
-
- public boolean includeOptionalDependencies() {
- return includeOptionalDependencies;
- }
-
- public void includeOptionalDependencies(boolean optional) {
- this.includeOptionalDependencies = optional;
- }
-
- public boolean isEverythingGreedy() {
- return everythingGreedy;
- }
-
- public void everythingGreedy(boolean greedy) {
- this.everythingGreedy = greedy;
- }
-
- public boolean forceFilterTo() {
- return forceFilterTo;
- }
-
- public void forceFilterTo(boolean forcedTo) {
- this.forceFilterTo = forcedTo;
- }
-
- public boolean considerStrictDependencyOnly() {
- return considerStrictDependencyOnly;
- }
-
- public void considerStrictDependencyOnly(boolean strict) {
- this.considerStrictDependencyOnly = strict;
- }
-
- public Dictionary getFilter() {
- if (filter == null)
- filter = new Properties();
- return filter;
- }
-
- public void setFilter(Dictionary filter) {
- this.filter = filter;
- }
-
- public void followOnlyFilteredRequirements(boolean onlyFiltered) {
- this.followOnlyFilteredRequirements = onlyFiltered;
- }
-
- public boolean followOnlyFilteredRequirements() {
- return followOnlyFilteredRequirements;
- }
-
- public boolean latestVersionOnly() {
- return latestVersion;
- }
-
- public void latestVersionOnly(boolean latest) {
- this.latestVersion = latest;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/messages.properties b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/messages.properties
deleted file mode 100644
index 0363e9ce9..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/messages.properties
+++ /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
-###############################################################################
-AbstractApplication_no_valid_destinations=Unable to locate a valid destination repository.
-AbstractRepositoryTask_unableToFind=Unable to find: {0}
-
-CompositeRepository_composite_repository_exists=Composite repository already exists at location: {0}
-CompositeRepository_default_artifactRepo_name=Composite Artifact Repository
-CompositeRepository_default_metadataRepo_name=Composite Artifact Repository
-CompositeRepositoryApplication_failedComparator=Artifact repository failed test with comparator: {0}
-
-no_artifactRepo_manager=Unable to acquire artifact repository manager service.
-no_metadataRepo_manager=Unable to acquire metadata repository manager service.
-no_package_admin=Unable to acquire package admin service.
-no_profile_registry=Unable to acquire profile registry service.
-unable_to_process_uri=Unable to process as URI: {0}
-unable_to_start_exemplarysetup=Unable to start exemplarysetup bundle.
-unknown_repository_type=Repository is of an unknown type: {0}
-
-MirrorApplication_artifactDestinationNoSource=Destination artifact repository specified without a corresponding source artifact repository.
-MirrorApplication_metadataDestinationNoSource=Destination metadata repository specified without a corresponding source metadata repository.
-MirrorApplication_missingIU=Missing: {0}
-MirrorApplication_missingSourceForIUs=Unable to locate source repository for IUs
-MirrorApplication_no_IUs=No IUs specified and no IUs obtained from metadata repositories.
-MirrorApplication_set_source_repositories=Need to set the source repository location(s).
-MirrorApplication_validateAndMirrorProblems=Problems occurred during validation and mirroring
-ProcessRepo_location_not_url=Repository location {0} must be a URL.
-ProcessRepo_must_be_local=Repository must be local: {0}
-
-SlicingOption_invalid_platform=Invalid platform filter format: {0}.
-SlicingOption_invalidFilterFormat=Invalid filter format: {0}
-exception_destinationNotModifiable = The destination repository must be modifiable: {0}.
-exception_invalidDestination=Invalid destination repository location: {0}.
-exception_invalidSource=Invalid source repository location: {0}.
-exception_unableToRemoveRepo=Unable to remove artifact repository file: {0}.
-exception_notLocalFileRepo= {0} is not a local file based repository.
-exception_noEngineService=Unable to acquire engine service.
-exception_needIUsOrNonEmptyRepo=Need to specify either a non-empty source metadata repository or a valid list of IUs.
-exception_needDestinationRepo=Need to set the destination artifact repository location.
-exception_onlyOneComparator=Only one comparator should be defined.
-Repo2RunnableTask_errorTransforming=Error occurred while transforming repository. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/AbstractRepositoryTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/AbstractRepositoryTask.java
deleted file mode 100644
index 59f8a2f46..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/AbstractRepositoryTask.java
+++ /dev/null
@@ -1,188 +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.internal.repository.tools.tasks;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.apache.tools.ant.*;
-import org.apache.tools.ant.types.FileSet;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.artifact.repository.ant.AntMirrorLog;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.equinox.p2.internal.repository.tools.*;
-import org.eclipse.osgi.util.NLS;
-
-public abstract class AbstractRepositoryTask extends Task {
- protected static final String ANT_PREFIX = "${"; //$NON-NLS-1$
- protected AbstractApplication application;
- protected List iuTasks = new ArrayList();
- protected List sourceRepos = new ArrayList();
- protected List destinations = new ArrayList();
-
- protected void addMetadataSourceRepository(URI repoLocation) {
- RepositoryDescriptor source = new RepositoryDescriptor();
- source.setLocation(repoLocation);
- source.setKind(RepositoryDescriptor.KIND_METADATA);
- application.addSource(source);
- }
-
- protected void addArtifactSourceRepository(URI repoLocation) {
- RepositoryDescriptor source = new RepositoryDescriptor();
- source.setLocation(repoLocation);
- source.setKind(RepositoryDescriptor.KIND_ARTIFACT);
- application.addSource(source);
- }
-
- /*
- * Create an object to hold IU information since the user specified an "iu" sub-element.
- */
- public Object createIu() {
- IUDescription iu = new IUDescription();
- iuTasks.add(iu);
- return iu;
- }
-
- /*
- * If the repositories are co-located then the user just has to set one
- * argument to specify both the artifact and metadata repositories.
- */
- public void setSource(String location) {
- RepositoryDescriptor source = new RepositoryDescriptor();
- try {
- source.setLocation(URIUtil.fromString(location));
- application.addSource(source);
- } catch (URISyntaxException e) {
- throw new BuildException(e);
- }
- }
-
- /*
- * If the repositories are co-located then the user just has to set one
- * argument to specify both the artifact and metadata repositories.
- */
- public void setDestination(String location) {
- // TODO depreciate
- DestinationRepository dest = new DestinationRepository();
- dest.setLocation(location);
- destinations.add(dest);
- application.addDestination(dest.getDescriptor());
- }
-
- public DestinationRepository createDestination() {
- // TODO depreciate
- DestinationRepository destination = new DestinationRepository();
- destinations.add(destination);
- application.addDestination(destination.getDescriptor());
- return destination;
- }
-
- /*
- * Add a repository to mirror into
- */
- public DestinationRepository createRepository() {
- DestinationRepository destination = new DestinationRepository();
- destinations.add(destination);
- application.addDestination(destination.getDescriptor());
- return destination;
- }
-
- /*
- * Add source repositories to mirror from
- */
- public void addConfiguredSource(RepositoryList sourceList) {
- for (Iterator iter = sourceList.getRepositoryList().iterator(); iter.hasNext();) {
- DestinationRepository repo = (DestinationRepository) iter.next();
- application.addSource(repo.getDescriptor());
- }
-
- for (Iterator iter = sourceList.getFileSetList().iterator(); iter.hasNext();) {
- FileSet fileSet = (FileSet) iter.next();
- sourceRepos.add(fileSet);
- // Added to the application later through prepareSourceRepos
- }
- }
-
- /*
- * If the user specified some source repositories via sub-elements
- * then add them to the transformer for consideration.
- */
- protected void prepareSourceRepos() {
- if (sourceRepos == null || sourceRepos.isEmpty())
- return;
- for (Iterator iter = sourceRepos.iterator(); iter.hasNext();) {
- RepositoryFileSet fileset = (RepositoryFileSet) iter.next();
-
- if (fileset.getRepoLocation() != null) {
- //TODO depreciate
- if (!fileset.getRepoLocation().startsWith(ANT_PREFIX)) {
- addArtifactSourceRepository(fileset.getRepoLocationURI());
- addMetadataSourceRepository(fileset.getRepoLocationURI());
- }
- } else if (fileset.getDir() != null) {
- DirectoryScanner scanner = fileset.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++) {
- File file = new File(fileset.getDir(), elements[i][j]);
- URI uri = file.toURI();
-
- if (file.isFile() && file.getName().endsWith(".zip")) { //$NON-NLS-1$
- uri = URIUtil.toJarURI(uri, null);
- }
- if (fileset.isBoth()) {
- addArtifactSourceRepository(uri);
- addMetadataSourceRepository(uri);
- } else if (fileset.isArtifact())
- addArtifactSourceRepository(uri);
- else if (fileset.isMetadata())
- addMetadataSourceRepository(uri);
- else
- throw new BuildException(NLS.bind(Messages.unknown_repository_type, uri));
- }
- }
- }
- }
- sourceRepos.clear();
- }
-
- protected List prepareIUs() {
- if (iuTasks == null || iuTasks.isEmpty())
- return null;
-
- IMetadataRepository repository = application.getCompositeMetadataRepository();
- List result = new ArrayList();
- for (Iterator iter = iuTasks.iterator(); iter.hasNext();) {
- IUDescription iu = (IUDescription) iter.next();
- Query iuQuery = iu.createQuery();
- Collector collector = new Collector();
-
- repository.query(iuQuery, collector, null);
-
- if (iu.isRequired() && collector.isEmpty())
- throw new BuildException(NLS.bind(Messages.AbstractRepositoryTask_unableToFind, iu.toString()));
- result.addAll(collector.toCollection());
- }
- return result;
- }
-
- protected void log(IStatus status) {
- try {
- new AntMirrorLog(this).log(status);
- } catch (NoSuchMethodException e) {
- // Shouldn't occur
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ComparatorDescription.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ComparatorDescription.java
deleted file mode 100644
index 9ec3fc38b..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ComparatorDescription.java
+++ /dev/null
@@ -1,54 +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.internal.repository.tools.tasks;
-
-import java.io.File;
-import org.apache.tools.ant.types.DataType;
-
-public class ComparatorDescription extends DataType {
-
- DestinationRepository baseline;
- String comparatorId;
- File comparatorLog;
-
- /*
- * Set the baseline repository to compare to
- */
- public void addRepository(DestinationRepository value) {
- this.baseline = value;
- }
-
- /*
- * Set the comparator to use
- */
- public void setComparator(String value) {
- comparatorId = value;
- }
-
- /*
- * Set the log location for the comparator
- */
- public void setComparatorLog(File value) {
- comparatorLog = value;
- }
-
- public DestinationRepository getBaseline() {
- return baseline;
- }
-
- public String getComparator() {
- return comparatorId;
- }
-
- public File getComparatorLog() {
- return comparatorLog;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java
deleted file mode 100644
index f1e8e9e9c..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.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.p2.internal.repository.tools.tasks;
-
-import java.util.Iterator;
-import org.apache.tools.ant.BuildException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.internal.repository.tools.CompositeRepositoryApplication;
-
-public class CompositeRepositoryTask extends AbstractRepositoryTask {
-
- public CompositeRepositoryTask() {
- application = new CompositeRepositoryApplication();
- }
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() throws BuildException {
- try {
- IStatus result = application.run(null);
- if (result.matches(IStatus.ERROR)) {
- throw new BuildException(TaskHelper.statusToString(result, null).toString());
- }
- } catch (ProvisionException e) {
- throw new BuildException(e);
- }
- }
-
- /*
- * Add the listed repositories to the composite repository
- */
- public void addConfiguredAdd(RepositoryList list) {
- for (Iterator iter = list.getRepositoryList().iterator(); iter.hasNext();) {
- DestinationRepository repo = (DestinationRepository) iter.next();
- ((CompositeRepositoryApplication) application).addChild(repo.getDescriptor());
- }
- }
-
- /*
- * Remove the listed repositories from the composite repository
- */
- public void addConfiguredRemove(RepositoryList list) {
- for (Iterator iter = list.getRepositoryList().iterator(); iter.hasNext();) {
- DestinationRepository repo = (DestinationRepository) iter.next();
- ((CompositeRepositoryApplication) application).removeChild(repo.getDescriptor());
- }
- }
-
- /*
- * Set whether the task should fail if the repository already exists
- */
- public void setFailOnExists(boolean value) {
- ((CompositeRepositoryApplication) application).setFailOnExists(value);
- }
-
- public void setValidate(String value) {
- ((CompositeRepositoryApplication) application).setComparator(value);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/DestinationRepository.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/DestinationRepository.java
deleted file mode 100644
index 71602d595..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/DestinationRepository.java
+++ /dev/null
@@ -1,58 +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.internal.repository.tools.tasks;
-
-import java.net.URISyntaxException;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.types.DataType;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.p2.internal.repository.tools.RepositoryDescriptor;
-
-public class DestinationRepository extends DataType {
-
- private RepositoryDescriptor descriptor = new RepositoryDescriptor();
-
- public void setCompressed(boolean compress) {
- descriptor.setCompressed(compress);
- }
-
- public void setName(String repoName) {
- descriptor.setName(repoName);
- }
-
- public void setLocation(String repoLocation) throws BuildException {
- try {
- descriptor.setLocation(URIUtil.fromString(repoLocation));
- } catch (URISyntaxException e) {
- throw new BuildException(e);
- }
- }
-
- public void setFormat(String formatLocation) {
- try {
- descriptor.setFormat(URIUtil.fromString(formatLocation));
- } catch (URISyntaxException e) {
- throw new BuildException(e);
- }
- }
-
- public void setAppend(boolean appendMode) {
- descriptor.setAppend(appendMode);
- }
-
- public void setKind(String repoKind) {
- descriptor.setKind(repoKind);
- }
-
- RepositoryDescriptor getDescriptor() {
- return descriptor;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/IUDescription.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/IUDescription.java
deleted file mode 100644
index 8be3de90d..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/IUDescription.java
+++ /dev/null
@@ -1,153 +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.internal.repository.tools.tasks;
-
-import java.util.*;
-import org.apache.tools.ant.types.DataType;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.*;
-import org.eclipse.equinox.internal.provisional.p2.query.CompositeQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-
-/**
- * @since 1.0
- */
-public class IUDescription extends DataType {
- static private final String QUERY_PROPERTY = "property"; //$NON-NLS-1$
- static private final String QUERY_NAME = "name"; //$NON-NLS-1$
- static private final String QUERY_VALUE = "value"; //$NON-NLS-1$
- static private final String ANT_PREFIX = "${"; //$NON-NLS-1$
- private String id;
- private String version;
- private String queryString;
- private boolean required = true;
-
- public IUDescription() {
- super();
- }
-
- public void setId(String value) {
- if (value != null && !value.startsWith(ANT_PREFIX))
- this.id = value;
- }
-
- public void setVersion(String value) {
- if (value != null && !value.startsWith(ANT_PREFIX))
- this.version = value;
- }
-
- public void setQuery(String query) {
- if (query != null && !query.startsWith(ANT_PREFIX))
- this.queryString = query;
- }
-
- public void setRequired(boolean required) {
- this.required = required;
- }
-
- public boolean isRequired() {
- return required;
- }
-
- public String getQueryString() {
- return queryString;
- }
-
- public String getId() {
- return id;
- }
-
- public String getVersion() {
- return version;
- }
-
- public String toString() {
- StringBuffer buffer = new StringBuffer("Installable Unit ["); //$NON-NLS-1$
- if (id != null) {
- buffer.append(" id="); //$NON-NLS-1$
- buffer.append(id);
- }
- if (version != null) {
- buffer.append(" version="); //$NON-NLS-1$
- buffer.append(version);
- }
- if (queryString != null) {
- buffer.append(" query="); //$NON-NLS-1$
- buffer.append(queryString);
- }
- buffer.append(" ]"); //$NON-NLS-1$
- return buffer.toString();
- }
-
- public Query createQuery() {
- List queries = new ArrayList();
- if (id != null) {
- if (version == null || version.length() == 0) {
- // Get the latest version of the iu
- queries.add(new InstallableUnitQuery(id));
- queries.add(new LatestIUVersionQuery());
- } else {
- Version iuVersion = Version.parseVersion(version);
- queries.add(new InstallableUnitQuery(id, iuVersion));
- }
- }
-
- Query iuQuery = processQueryString();
- if (iuQuery != null)
- queries.add(iuQuery);
-
- if (queries.size() == 1)
- return (Query) queries.get(0);
- return new CompositeQuery((Query[]) queries.toArray(new Query[queries.size()]));
- }
-
- private Query processQueryString() {
- if (queryString == null)
- return null;
- int startIdx = queryString.indexOf('[');
- int endIdx = queryString.lastIndexOf(']');
- if (startIdx == -1 || endIdx == -1 || endIdx < startIdx)
- return null;
- String element = queryString.substring(0, startIdx);
- Map attributes = processQueryAttributes(queryString.substring(startIdx + 1, endIdx));
- if (element.equals(QUERY_PROPERTY)) {
- String name = (String) attributes.get(QUERY_NAME);
- String value = (String) attributes.get(QUERY_VALUE);
- if (name == null)
- return null;
- return new IUPropertyQuery(name, value);
- }
-
- return null;
- }
-
- private Map processQueryAttributes(String attributes) {
- if (attributes == null || attributes.length() == 0)
- return Collections.EMPTY_MAP;
-
- Map result = new HashMap();
- int start = 0;
- int idx = 0;
- while ((idx = attributes.indexOf('@', start)) > -1) {
- int equals = attributes.indexOf('=', idx);
- int startQuote = attributes.indexOf('\'', equals);
- int endQuote = attributes.indexOf('\'', startQuote + 1);
- if (equals == -1 || startQuote <= equals || endQuote <= startQuote)
- break;
- String key = attributes.substring(idx + 1, equals).trim();
- String value = attributes.substring(startQuote + 1, endQuote);
- result.put(key, value);
-
- start = endQuote + 1;
- }
- return result;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorTask.java
deleted file mode 100644
index fceaaf32a..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorTask.java
+++ /dev/null
@@ -1,114 +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.internal.repository.tools.tasks;
-
-import java.io.File;
-import java.util.List;
-import org.apache.tools.ant.BuildException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.artifact.repository.ant.AntMirrorLog;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.internal.repository.tools.Messages;
-import org.eclipse.equinox.p2.internal.repository.tools.MirrorApplication;
-
-public class MirrorTask extends AbstractRepositoryTask {
-
- private File mirrorLog; // file to log mirror output to (optional)
- private ComparatorDescription comparator;
-
- public MirrorTask() {
- application = new MirrorApplication();
- }
-
- public void execute() throws BuildException {
- try {
- if (mirrorLog != null)
- ((MirrorApplication) application).setLog(mirrorLog);
- else
- ((MirrorApplication) application).setLog(new AntMirrorLog(this));
-
- if (comparator != null) {
- // Enable comparison
- ((MirrorApplication) application).setCompare(true);
- // Set baseline location
- if (comparator.getBaseline() != null)
- ((MirrorApplication) application).setBaseline(comparator.getBaseline().getDescriptor().getRepoLocation());
- // Set comparator to use
- if (comparator.getComparator() != null)
- ((MirrorApplication) application).setComparatorID(comparator.getComparator());
- // Set comparator log
- if (comparator.getComparatorLog() != null)
- ((MirrorApplication) application).setComparatorLog(comparator.getComparatorLog());
- }
-
- prepareSourceRepos();
- application.initializeRepos(null);
- List ius = prepareIUs();
- application.setSourceIUs(ius);
- IStatus result = application.run(null);
- if (result.matches(IStatus.ERROR))
- throw new BuildException(TaskHelper.statusToString(result, null).toString());
- } catch (ProvisionException e) {
- throw new BuildException(e);
- } catch (NoSuchMethodException e) {
- // Should not occur
- throw new BuildException(e);
- }
- }
-
- public SlicingOption createSlicingOptions() {
- SlicingOption options = new SlicingOption();
- ((MirrorApplication) application).setSlicingOptions(options.getOptions());
- return options;
- }
-
- /*
- * Set the comparison information
- */
- public ComparatorDescription createComparator() {
- if (comparator != null)
- throw new BuildException(Messages.exception_onlyOneComparator);
- comparator = new ComparatorDescription();
- return comparator;
- }
-
- /*
- * Set the location of the mirror log
- */
- public void setLog(String value) {
- mirrorLog = new File(value);
- }
-
- /*
- * Set whether or not we should ignore errors when running the mirror application.
- */
- public void setIgnoreErrors(boolean value) {
- ((MirrorApplication) application).setIgnoreErrors(value);
- }
-
- /*
- * Set whether or not the the artifacts are raw.
- */
- public void setRaw(boolean value) {
- ((MirrorApplication) application).setRaw(value);
- }
-
- /*
- * Set whether or not the mirror application should be run in verbose mode.
- */
- public void setVerbose(boolean value) {
- ((MirrorApplication) application).setVerbose(value);
- }
-
- public void setValidate(boolean value) {
- ((MirrorApplication) application).setValidate(value);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ProcessRepoTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ProcessRepoTask.java
deleted file mode 100644
index 9e8947335..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ProcessRepoTask.java
+++ /dev/null
@@ -1,161 +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.internal.repository.tools.tasks;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.jarprocessor.ant.JarProcessorTask;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.internal.repository.tools.*;
-import org.eclipse.osgi.util.NLS;
-
-public class ProcessRepoTask extends Task {
-
- public static class SigningOptions {
- public String alias;
- public String keystore;
- public String storepass;
- public String keypass;
- public boolean unsign;
-
- public void setAlias(String alias) {
- this.alias = alias;
- }
-
- public void setKeystore(String keystore) {
- this.keystore = keystore;
- }
-
- public void setKeypass(String keypass) {
- this.keypass = keypass;
- }
-
- public void setStorepass(String storepass) {
- this.storepass = storepass;
- }
-
- public void setUnsign(String unsign) {
- this.unsign = Boolean.valueOf(unsign).booleanValue();
- }
- }
-
- private URI repository = null;
-
- private boolean pack = false;
- private boolean repack = false;
- private SigningOptions signing = null;
- private JarProcessorTask jarProcessor = null;
-
- public void execute() throws BuildException {
- File file = URIUtil.toFile(repository);
- if (file == null || !file.exists()) {
- throw new BuildException(NLS.bind(Messages.ProcessRepo_must_be_local, repository.toString()));
- }
- if (pack | repack | signing != null) {
- if (jarProcessor == null)
- jarProcessor = new JarProcessorTask();
- if (signing != null) {
- jarProcessor.setAlias(signing.alias);
- jarProcessor.setKeypass(signing.keypass);
- jarProcessor.setKeystore(signing.keystore);
- jarProcessor.setStorepass(signing.storepass);
- jarProcessor.setUnsign(signing.unsign);
-
- if (signing.alias != null && signing.alias.length() > 0 && !signing.alias.startsWith("${")) //$NON-NLS-1$
- jarProcessor.setSign(true);
- }
- jarProcessor.setPack(pack);
- jarProcessor.setNormalize(repack);
- jarProcessor.setInputFolder(new File(repository));
- jarProcessor.setProject(getProject());
- jarProcessor.execute();
- }
-
- recreateRepository();
- }
-
- private void recreateRepository() {
- RepositoryDescriptor descriptor = new RepositoryDescriptor();
- descriptor.setAppend(true);
- descriptor.setFormat(null);
- descriptor.setKind("artifact"); //$NON-NLS-1$
- descriptor.setLocation(repository);
-
- RecreateRepositoryApplication application = new RecreateRepositoryApplication();
- application.setArtifactRepository(descriptor);
- try {
- application.run(new NullProgressMonitor());
- } catch (ProvisionException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- public void setRepositoryPath(String repository) {
- try {
- this.repository = URIUtil.fromString(repository);
- } catch (URISyntaxException e) {
- throw new IllegalArgumentException(NLS.bind(Messages.ProcessRepo_location_not_url, repository));
- }
- }
-
- public void setPack(boolean pack) {
- this.pack = pack;
- }
-
- public void setNormalize(boolean normalize) {
- this.repack = normalize;
- }
-
- public void addConfiguredSign(SigningOptions options) {
- this.signing = options;
- }
-
- public void addConfiguredPlugin(IUDescription iu) {
- if (jarProcessor == null)
- jarProcessor = new JarProcessorTask();
-
- String path = "plugins/" + iu.getId() + '_' + iu.getVersion(); //$NON-NLS-1$
- File repo = new File(repository);
- File plugin = new File(repo, path);
- if (!plugin.exists())
- plugin = new File(repo, path + ".jar"); //$NON-NLS-1$
-
- if (plugin.exists()) {
- jarProcessor.addInputFile(plugin);
- }
- }
-
- public void addConfiguredFeature(IUDescription iu) {
- if (jarProcessor == null)
- jarProcessor = new JarProcessorTask();
-
- String path = "features/" + iu.getId() + '_' + iu.getVersion(); //$NON-NLS-1$
- File repo = new File(repository);
- File feature = new File(repo, path);
- if (!feature.exists())
- feature = new File(repo, path + ".jar"); //$NON-NLS-1$
-
- if (feature.exists()) {
- jarProcessor.addInputFile(feature);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java
deleted file mode 100644
index ed4749ad2..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java
+++ /dev/null
@@ -1,86 +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.internal.repository.tools.tasks;
-
-import java.util.Iterator;
-import org.apache.tools.ant.BuildException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.equinox.p2.internal.repository.tools.AbstractApplication;
-import org.eclipse.equinox.p2.internal.repository.tools.Messages;
-import org.eclipse.osgi.util.NLS;
-
-public class RemoveIUTask extends AbstractRepositoryTask {
-
- protected static class RemoveIUApplication extends AbstractApplication {
- //Only need the application to reuse super's repo management.
- public IStatus run(IProgressMonitor monitor) {
- return null;
- }
-
- public void finalizeRepos() throws ProvisionException {
- super.finalizeRepositories();
- }
- }
-
- public RemoveIUTask() {
- this.application = new RemoveIUApplication();
- }
-
- public void execute() throws BuildException {
- try {
- if (iuTasks == null || iuTasks.isEmpty())
- return; //nothing to do
-
- application.initializeRepos(null);
- if (application.getCompositeMetadataRepository() == null)
- throw new BuildException(Messages.AbstractApplication_no_valid_destinations); //need a repo
-
- IMetadataRepository repository = application.getDestinationMetadataRepository();
- IArtifactRepository artifacts = application.getDestinationArtifactRepository();
-
- for (Iterator iter = iuTasks.iterator(); iter.hasNext();) {
- IUDescription iu = (IUDescription) iter.next();
- Query iuQuery = iu.createQuery();
-
- Collector collector = new Collector();
- repository.query(iuQuery, collector, null);
-
- if (collector.isEmpty())
- getProject().log(NLS.bind(Messages.AbstractRepositoryTask_unableToFind, iu.toString()));
- else if (repository.removeInstallableUnits(iuQuery, null) && artifacts != null) {
- for (Iterator iterator = collector.iterator(); iterator.hasNext();) {
- IInstallableUnit unit = (IInstallableUnit) iterator.next();
- IArtifactKey[] keys = unit.getArtifacts();
- for (int i = 0; i < keys.length; i++) {
- artifacts.removeDescriptor(keys[i]);
- }
- }
- }
- }
- } catch (ProvisionException e) {
- throw new BuildException(e);
- } finally {
- try {
- ((RemoveIUApplication) application).finalizeRepos();
- } catch (ProvisionException e) {
- throw new BuildException(e);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/Repo2RunnableTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/Repo2RunnableTask.java
deleted file mode 100644
index 8763492a5..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/Repo2RunnableTask.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.p2.internal.repository.tools.tasks;
-
-import java.util.List;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.internal.repository.tools.Messages;
-import org.eclipse.equinox.p2.internal.repository.tools.Repo2Runnable;
-
-/**
- * Ant task which calls the "repo to runnable" application. This application takes an
- * existing p2 repository (local or remote), iterates over its list of IUs, and fetches
- * all of the corresponding artifacts to a user-specified location. Once fetched, the
- * artifacts will be in "runnable" form... that is directory-based bundles will be
- * extracted into folders and packed JAR files will be un-packed.
- *
- * @since 1.0
- */
-public class Repo2RunnableTask extends AbstractRepositoryTask {
-
- private boolean failOnError = true;
-
- /*
- * Constructor for the class. Create a new instance of the application
- * so we can populate it with attributes.
- */
- public Repo2RunnableTask() {
- super();
- this.application = new Repo2Runnable();
- }
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() throws BuildException {
- try {
- prepareSourceRepos();
- application.initializeRepos(null);
- List ius = prepareIUs();
- if ((ius == null || ius.size() == 0) && !(application.hasArtifactSources() || application.hasMetadataSources()))
- throw new BuildException(Messages.exception_needIUsOrNonEmptyRepo);
- application.setSourceIUs(ius);
- IStatus result = application.run(null);
- if (failOnError && result.matches(IStatus.ERROR))
- throw new ProvisionException(result);
- } catch (ProvisionException e) {
- if (failOnError)
- throw new BuildException(Messages.Repo2RunnableTask_errorTransforming, e);
- /* else */
- getProject().log(Messages.Repo2RunnableTask_errorTransforming, Project.MSG_WARN);
- getProject().log(e.getMessage(), Project.MSG_WARN);
- }
- }
-
- public void setFailOnError(boolean fail) {
- this.failOnError = fail;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RepositoryFileSet.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RepositoryFileSet.java
deleted file mode 100644
index c7e88ddf4..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RepositoryFileSet.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.internal.repository.tools.tasks;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.types.FileSet;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.p2.internal.repository.tools.RepositoryDescriptor;
-
-public class RepositoryFileSet extends FileSet {
- public final static int TYPE_ARTIFACT = IRepository.TYPE_ARTIFACT;
- public final static int TYPE_METADATA = IRepository.TYPE_METADATA;
-
- private int kind = RepositoryDescriptor.TYPE_BOTH;
- protected String myLocation = null;
-
- public void setKind(String repoKind) {
- kind = RepositoryDescriptor.determineKind(repoKind);
- }
-
- public int getKind() {
- return kind;
- }
-
- public boolean isBoth() {
- return kind == RepositoryDescriptor.TYPE_BOTH;
- }
-
- public boolean isArtifact() {
- return kind == RepositoryDescriptor.TYPE_BOTH || kind == IRepository.TYPE_ARTIFACT;
- }
-
- public boolean isMetadata() {
- return kind == RepositoryDescriptor.TYPE_BOTH || kind == IRepository.TYPE_METADATA;
- }
-
- public void setLocation(String value) {
- // TODO depreciate
- myLocation = value;
- }
-
- public String getRepoLocation() {
- // TODO depreciate
- return myLocation;
- }
-
- public URI getRepoLocationURI() {
- // TODO depreciate
- try {
- return RepositoryHelper.localRepoURIHelper(URIUtil.fromString(getRepoLocation()));
- } catch (URISyntaxException e) {
- throw new BuildException(e);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RepositoryList.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RepositoryList.java
deleted file mode 100644
index a76d3218d..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RepositoryList.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.p2.internal.repository.tools.tasks;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class RepositoryList extends RepositoryFileSet {
- // TODO this class should extend DataType, currently RepoFileSet to support <source location="xxx" />
- List repositories = new ArrayList();
- List sourceFileSets = new ArrayList();
-
- public DestinationRepository createRepository() {
- DestinationRepository repo = new DestinationRepository();
- repositories.add(repo);
- return repo;
- }
-
- public RepositoryFileSet createFileSet() {
- RepositoryFileSet fileSet = new RepositoryFileSet();
- sourceFileSets.add(fileSet);
- return fileSet;
- }
-
- public List getRepositoryList() {
- return repositories;
- }
-
- public List getFileSetList() {
- //TODO this should eventually be removed
- sourceFileSets.add(this);
- return sourceFileSets;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/SlicingOption.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/SlicingOption.java
deleted file mode 100644
index fcd8a6b37..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/SlicingOption.java
+++ /dev/null
@@ -1,110 +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.internal.repository.tools.tasks;
-
-import java.util.Dictionary;
-import java.util.StringTokenizer;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.eclipse.equinox.p2.internal.repository.tools.Messages;
-import org.eclipse.equinox.p2.internal.repository.tools.SlicingOptions;
-import org.eclipse.osgi.util.NLS;
-
-public class SlicingOption extends Task {
-
- SlicingOptions options = null;
-
- public SlicingOption() {
- options = new SlicingOptions();
- options.forceFilterTo(true);
- options.considerStrictDependencyOnly(false);
- options.everythingGreedy(true);
- options.includeOptionalDependencies(true);
- options.followOnlyFilteredRequirements(false);
- setIncludeFeatures(true);
- }
-
- /**
- * Setting this to true will cause the optional dependencies to be considered.
- */
- public void setIncludeOptional(boolean optional) {
- options.includeOptionalDependencies(optional);
- }
-
- /**
- *
- */
- public void setPlatformFilter(String platformFilter) {
- if (platformFilter == null || platformFilter.trim().equals("")) //$NON-NLS-1$
- return;
- if (platformFilter.equalsIgnoreCase("true")) { //$NON-NLS-1$
- options.forceFilterTo(true);
- return;
- }
- if (platformFilter.equalsIgnoreCase("false")) { //$NON-NLS-1$
- options.forceFilterTo(false);
- return;
- }
- StringTokenizer tok = new StringTokenizer(platformFilter, ","); //$NON-NLS-1$
- if (tok.countTokens() != 3)
- throw new BuildException(NLS.bind(Messages.SlicingOption_invalid_platform, platformFilter));
- Dictionary filter = options.getFilter();
- filter.put("osgi.os", tok.nextToken().trim()); //$NON-NLS-1$
- filter.put("osgi.ws", tok.nextToken().trim()); //$NON-NLS-1$
- filter.put("osgi.arch", tok.nextToken().trim()); //$NON-NLS-1$
- options.setFilter(filter);
- }
-
- public void setIncludeNonGreedy(boolean greed) {
- options.everythingGreedy(greed);
- }
-
- public void setIncludeFeatures(boolean includeFeatures) {
- Dictionary filter = options.getFilter();
- filter.put("org.eclipse.update.install.features", String.valueOf(includeFeatures)); //$NON-NLS-1$
- options.setFilter(filter);
- }
-
- public void setFilter(String filterString) {
- if (filterString == null || filterString.trim().equals("")) //$NON-NLS-1$
- return;
- Dictionary filter = options.getFilter();
- StringTokenizer tok = new StringTokenizer(filterString, ","); //$NON-NLS-1$
- while (tok.hasMoreTokens()) {
- String rule = tok.nextToken().trim();
- int eqIndex = rule.indexOf('=');
- if (eqIndex == -1)
- throw new BuildException(NLS.bind(Messages.SlicingOption_invalidFilterFormat, rule));
- filter.put(rule.substring(0, eqIndex), rule.substring(eqIndex + 1));
- }
- options.setFilter(filter);
- }
-
- /**
- * Set this property to true if only strict dependencies must be followed. A strict dependency is defined by a version range only including one version (e.g. [1.0.0.v2009, 1.0.0.v2009])
- * The default value is false.
- */
- public void setFollowStrict(boolean strict) {
- options.considerStrictDependencyOnly(strict);
- }
-
- public void setFollowOnlyFilteredRequirements(boolean onlyFiltered) {
- options.followOnlyFilteredRequirements(onlyFiltered);
- }
-
- public void setLatestVersionOnly(boolean latest) {
- options.latestVersionOnly(latest);
- }
-
- public SlicingOptions getOptions() {
- return options;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/TaskHelper.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/TaskHelper.java
deleted file mode 100644
index 8eeab462e..000000000
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/TaskHelper.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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.tools.tasks;
-
-import org.eclipse.core.runtime.IStatus;
-
-public class TaskHelper {
- public static StringBuffer statusToString(IStatus status, StringBuffer b) {
- IStatus[] nestedStatus = status.getChildren();
- if (b == null)
- b = new StringBuffer();
- b.append(status.getMessage());
- for (int i = 0; i < nestedStatus.length; i++) {
- b.append('\n');
- b.append(statusToString(nestedStatus[i], b));
- }
- return b;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/.classpath b/bundles/org.eclipse.equinox.p2.repository/.classpath
deleted file mode 100644
index 2fbb7a23e..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/.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.repository/.project b/bundles/org.eclipse.equinox.p2.repository/.project
deleted file mode 100644
index 120c0420d..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.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>
- </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.repository/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.repository/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index fe9a0e76d..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,351 +0,0 @@
-#Mon May 04 16:59:04 EDT 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=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=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=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.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_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not 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.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=true
-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.repository/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.repository/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 6de3a7104..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,60 +0,0 @@
-#Mon May 04 16:59:04 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_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.repository/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.repository/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 979e4e8b4..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=true
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF
deleted file mode 100644
index 2da8cce2e..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,43 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.equinox.p2.repository;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.repository.Activator
-Require-Bundle: org.eclipse.equinox.common,
- org.eclipse.ecf.filetransfer,
- org.eclipse.ecf,
- org.eclipse.equinox.p2.core,
- org.eclipse.equinox.registry;bundle-version="3.4.100",
- org.eclipse.ecf.provider.filetransfer;bundle-version="3.0.1"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-Vendor: %providerName
-Import-Package: javax.xml.parsers,
- org.eclipse.core.runtime.jobs,
- org.eclipse.core.runtime.preferences;version="3.2.0",
- org.eclipse.equinox.internal.p2.repository.helpers,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.security.storage,
- org.eclipse.osgi.service.debug,
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.4.0",
- org.osgi.service.packageadmin;version="1.2.0",
- org.osgi.service.prefs;version="1.1.1",
- org.osgi.util.tracker;version="1.3.0",
- org.xml.sax,
- org.xml.sax.helpers
-Export-Package: org.eclipse.equinox.internal.p2.persistence;x-friends:="org.eclipse.equinox.p2.artifact.repository,org.eclipse.equinox.p2.engine,org.eclipse.equinox.p2.metadata.repository",
- org.eclipse.equinox.internal.p2.repository;x-friends:="org.eclipse.equinox.p2.artifact.repository,org.eclipse.equinox.p2.metadata.repository,org.eclipse.equinox.p2.updatesite",
- org.eclipse.equinox.internal.p2.repository.helpers;
- x-friends:="org.eclipse.equinox.p2.artifact.repository,
- org.eclipse.equinox.p2.exemplarysetup,
- org.eclipse.equinox.p2.metadata.repository,
- org.eclipse.equinox.p2.updatesite,
- org.eclipse.equinox.p2.repository.tools,
- org.eclipse.equinox.p2.ui,
- org.eclipse.equinox.p2.metadata.generator",
- org.eclipse.equinox.internal.provisional.p2.repository;uses:="org.osgi.framework,org.eclipse.core.runtime",
- org.eclipse.equinox.internal.provisional.spi.p2.repository
diff --git a/bundles/org.eclipse.equinox.p2.repository/about.html b/bundles/org.eclipse.equinox.p2.repository/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.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.repository/build.properties b/bundles/org.eclipse.equinox.p2.repository/build.properties
deleted file mode 100644
index 42c5dd351..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/build.properties
+++ /dev/null
@@ -1,17 +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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
-src.includes = about.html
diff --git a/bundles/org.eclipse.equinox.p2.repository/plugin.properties b/bundles/org.eclipse.equinox.p2.repository/plugin.properties
deleted file mode 100644
index 952b84da2..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/plugin.properties
+++ /dev/null
@@ -1,12 +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
-###############################################################################
-pluginName = Equinox Provisioning Repository
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java
deleted file mode 100644
index 0d654e3f5..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java
+++ /dev/null
@@ -1,214 +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.persistence;
-
-import java.io.*;
-import java.net.URI;
-import java.util.*;
-import javax.xml.parsers.ParserConfigurationException;
-import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-import org.xml.sax.*;
-
-/*
- * Class used to read a composite repository.
- */
-public class CompositeParser extends XMLParser implements XMLConstants {
-
- private static final Version CURRENT_VERSION = new Version(1, 0, 0);
- static final VersionRange XML_TOLERANCE = new VersionRange(CURRENT_VERSION, true, new Version(2, 0, 0), false);
- private static final String REQUIRED_CAPABILITY_ELEMENT = "required"; //$NON-NLS-1$
- private static final String REPOSITORY_ELEMENT = "repository"; //$NON-NLS-1$
- String repositoryType;
- private CompositeRepositoryState theState;
-
- protected class ChildrenHandler extends AbstractHandler {
- private ArrayList children;
-
- public ChildrenHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, CHILDREN_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- children = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
- }
-
- public URI[] getChildren() {
- int size = children.size();
- URI[] result = new URI[size];
- int i = 0;
- for (Iterator it = children.iterator(); it.hasNext(); i++) {
- result[i] = (URI) it.next();
- }
- return result;
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(CHILD_ELEMENT)) {
- new ChildHandler(this, attributes, children);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class ChildHandler extends AbstractHandler {
- private final String[] required = new String[] {LOCATION_ELEMENT};
- private final String[] optional = new String[] {};
-
- URI currentRepo = null;
-
- private List repos;
-
- public ChildHandler(AbstractHandler parentHandler, Attributes attributes, List repos) {
- super(parentHandler, CHILD_ELEMENT);
- String[] values = parseAttributes(attributes, required, optional);
- this.repos = repos;
- //skip entire subrepository if the location is missing
- if (values[0] == null)
- return;
- currentRepo = checkURI(REQUIRED_CAPABILITY_ELEMENT, URI_ATTRIBUTE, values[0]);
-
- }
-
- public void startElement(String name, Attributes attributes) {
- checkCancel();
- }
-
- protected void finished() {
- if (currentRepo != null)
- repos.add(currentRepo);
- }
- }
-
- 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 (repositoryType.equals(target)) {
- Version repositoryVersion = extractPIVersion(target, data);
- if (!XML_TOLERANCE.isIncluded(repositoryVersion)) {
- throw new SAXException(NLS.bind(Messages.io_IncompatibleVersion, repositoryVersion, XML_TOLERANCE));
- }
- }
- }
- }
-
- /*
- * Handler for the "repository" attribute.
- */
- 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 PropertiesHandler propertiesHandler = null;
- private ChildrenHandler childrenHandler = null;
- private CompositeRepositoryState state;
- private String[] attrValues = new String[required.length + optional.length];
-
- public RepositoryHandler() {
- super();
- }
-
- public CompositeRepositoryState getRepository() {
- return state;
- }
-
- protected void handleRootAttributes(Attributes attributes) {
- attrValues = parseAttributes(attributes, required, optional);
- attrValues[2] = checkVersion(REPOSITORY_ELEMENT, VERSION_ATTRIBUTE, attrValues[2]).toString();
- }
-
- 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 (CHILDREN_ELEMENT.equals(name)) {
- if (childrenHandler == null) {
- childrenHandler = new ChildrenHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else {
- invalidElement(name, attributes);
- }
- }
-
- /*
- * If we parsed valid XML then fill in our repository state object with the parsed data.
- */
- protected void finished() {
- if (isValidXML()) {
- state = new CompositeRepositoryState();
- state.setName(attrValues[0]);
- state.setType(attrValues[1]);
- state.setVersion(attrValues[2]);
- state.setDescription(attrValues[3]);
- state.setProvider(attrValues[4]);
- state.setProperties((propertiesHandler == null ? new OrderedProperties(0) //
- : propertiesHandler.getProperties()));
- state.setChildren((childrenHandler == null ? new URI[0] //
- : childrenHandler.getChildren()));
- }
- }
- }
-
- public CompositeParser(BundleContext context, String bundleId, String type) {
- super(context, bundleId);
- this.repositoryType = type;
- }
-
- public void parse(File file) throws IOException {
- parse(new FileInputStream(file));
- }
-
- 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();
- RepositoryHandler repositoryHandler = new RepositoryHandler();
- xmlReader.setContentHandler(new RepositoryDocHandler(REPOSITORY_ELEMENT, repositoryHandler));
- xmlReader.parse(new InputSource(stream));
- if (isValidXML()) {
- theState = repositoryHandler.getRepository();
- }
- } catch (SAXException e) {
- throw new IOException(e.getMessage());
- } catch (ParserConfigurationException e) {
- throw new IOException(e.getMessage());
- } finally {
- stream.close();
- }
- }
-
- public CompositeRepositoryState getRepositoryState() {
- return theState;
- }
-
- //TODO what?
- protected Object getRootObject() {
- return null;
- }
-
- protected String getErrorMessage() {
- return Messages.io_parseError;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeRepositoryIO.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeRepositoryIO.java
deleted file mode 100644
index 02319fb52..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeRepositoryIO.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.p2.persistence;
-
-import java.io.*;
-import java.net.URL;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.Activator;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * This class reads and writes repository metadata (e.g. table of contents files)
- * for composite artifact and metadata repositories.
- * <p>
- * Note: This class is not used for reading or writing the actual composite repositories.
- */
-public class CompositeRepositoryIO {
-
- /**
- * Writes the given repository to the stream.
- * This method performs buffering, and closes the stream when finished.
- */
- public void write(CompositeRepositoryState repository, OutputStream output, String type) {
- OutputStream bufferedOutput = null;
- try {
- try {
- bufferedOutput = new BufferedOutputStream(output);
- CompositeWriter repositoryWriter = new CompositeWriter(bufferedOutput, type);
- repositoryWriter.write(repository);
- } finally {
- if (bufferedOutput != null) {
- bufferedOutput.close();
- }
- }
- } catch (IOException ioe) {
- // TODO shouldn't this throw a core exception?
- ioe.printStackTrace();
- }
- }
-
- /**
- * Reads the composite repository from the given stream,
- * and returns the contained array of abstract composite repositories.
- *
- * This method performs buffering, and closes the stream when finished.
- */
- public CompositeRepositoryState read(URL location, InputStream input, String type, IProgressMonitor monitor) throws ProvisionException {
- BufferedInputStream bufferedInput = null;
- try {
- try {
- bufferedInput = new BufferedInputStream(input);
- CompositeParser repositoryParser = new CompositeParser(Activator.getContext(), Activator.ID, type);
- repositoryParser.parse(input);
- 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);
- }
- CompositeRepositoryState repositoryState = repositoryParser.getRepositoryState();
- if (repositoryState == null)
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, Messages.io_parseError, null));
- return repositoryState;
- } 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));
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeRepositoryState.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeRepositoryState.java
deleted file mode 100644
index 83f7795a6..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeRepositoryState.java
+++ /dev/null
@@ -1,93 +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.persistence;
-
-import java.net.URI;
-import java.util.Map;
-
-/*
- * Instances of this class represent a composite repository (either metadata
- * or artifact) and are used in persisting or retrieving the repository to/from disk.
- */
-public class CompositeRepositoryState {
- private String name;
- private String type;
- private String version;
- private String provider;
- private String description;
- private URI location;
- private Map properties;
- private URI[] children;
-
- public void setName(String value) {
- name = value;
- }
-
- public String getName() {
- return name;
- }
-
- public void setType(String value) {
- type = value;
- }
-
- public String getType() {
- return type;
- }
-
- public void setVersion(String value) {
- version = value;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setProvider(String value) {
- provider = value;
- }
-
- public String getProvider() {
- return provider;
- }
-
- public void setDescription(String value) {
- description = value;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setLocation(URI value) {
- location = value;
- }
-
- public URI getLocation() {
- return location;
- }
-
- public void setProperties(Map value) {
- properties = value;
- }
-
- public Map getProperties() {
- return properties;
- }
-
- public void setChildren(URI[] value) {
- children = value;
- }
-
- public URI[] getChildren() {
- return children;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeWriter.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeWriter.java
deleted file mode 100644
index 26dd6707f..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeWriter.java
+++ /dev/null
@@ -1,68 +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.persistence;
-
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.URI;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-
-/*
- * Class used to persist a composite repository.
- */
-public class CompositeWriter extends XMLWriter implements XMLConstants {
-
- private static final String REPOSITORY_ELEMENT = "repository"; //$NON-NLS-1$
- private static final Version CURRENT_VERSION = new Version(1, 0, 0);
-
- public CompositeWriter(OutputStream output, String type) throws UnsupportedEncodingException {
- super(output, new XMLWriter.ProcessingInstruction[] {XMLWriter.ProcessingInstruction.makeTargetVersionInstruction(type, CURRENT_VERSION)});
- // TODO: add a processing instruction for the metadata version
- }
-
- /**
- * Writes a list of URIs referring to sub repositories
- */
- protected void writeChildren(URI[] children) {
- if (children == null || children.length == 0)
- return;
- start(CHILDREN_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, children.length);
- for (int i = 0; i < children.length; i++)
- writeChild(children[i]);
- end(CHILDREN_ELEMENT);
- }
-
- protected void writeChild(URI encodedURI) {
- String unencodedString = URIUtil.toUnencodedString(encodedURI);
- start(CHILD_ELEMENT);
- attribute(LOCATION_ELEMENT, unencodedString);
- end(CHILD_ELEMENT);
- }
-
- /**
- * Write the given composite repository to the output stream.
- */
- public void write(CompositeRepositoryState 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());
- writeChildren(repository.getChildren());
- end(REPOSITORY_ELEMENT);
- flush();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/Messages.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/Messages.java
deleted file mode 100644
index d3032499c..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/Messages.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 Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.persistence;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.persistence.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 XMLParser_No_SAX_Parser;
- public static String XMLParser_Error_At_Line;
- public static String XMLParser_Error_At_Line_Column;
- public static String XMLParser_Error_At_Name_Line;
- public static String XMLParser_Error_At_Name_Line_Column;
- public static String XMLParser_Missing_Required_Attribute;
- public static String XMLParser_Illegal_Value_For_Attribute;
- public static String XMLParser_Duplicate_Element;
-
- public static String io_failedRead;
- public static String io_IncompatibleVersion;
- public static String io_parseError;
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLConstants.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLConstants.java
deleted file mode 100644
index b7427152a..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLConstants.java
+++ /dev/null
@@ -1,64 +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.persistence;
-
-public interface XMLConstants {
-
- // Constants used in defining a default processing instruction
- // including a class name and a version of the associated XML
- // for some category of objects.
- // e.g. <?category class='a.b.c.SomeClass' version='1.2.3'?>
- //
- public static final String PI_CLASS_ATTRIBUTE = "class"; //$NON-NLS-1$
- public static final String PI_VERSION_ATTRIBUTE = "version"; //$NON-NLS-1$
-
- // Element and attribute names for a standard property collection.
- // e.g. <properties size='1'>
- // <property name='some_name' value='some_value'/>
- // </properties>
- public static final String PROPERTIES_ELEMENT = "properties"; //$NON-NLS-1$
- public static final String PROPERTY_ELEMENT = "property"; //$NON-NLS-1$
- public static final String PROPERTY_NAME_ATTRIBUTE = "name"; //$NON-NLS-1$
- public static final String PROPERTY_VALUE_ATTRIBUTE = "value"; //$NON-NLS-1$
- public static final String[] PROPERTY_ATTRIBUTES = new String[] {PROPERTY_NAME_ATTRIBUTE, PROPERTY_VALUE_ATTRIBUTE};
-
- // Constants for the names of common general attributes
- public static final String ID_ATTRIBUTE = "id"; //$NON-NLS-1$
- public static final String PARENT_ID_ATTRIBUTE = "parentId"; //$NON-NLS-1$
- public static final String TYPE_ATTRIBUTE = "type"; //$NON-NLS-1$
- public static final String NAME_ATTRIBUTE = "name"; //$NON-NLS-1$
- public static final String VERSION_ATTRIBUTE = "version"; //$NON-NLS-1$
- public static final String VERSION_RANGE_ATTRIBUTE = "range"; //$NON-NLS-1$
- public static final String NAMESPACE_ATTRIBUTE = "namespace"; //$NON-NLS-1$
- public static final String CLASSIFIER_ATTRIBUTE = "classifier"; //$NON-NLS-1$
- public static final String DESCRIPTION_ATTRIBUTE = "description"; //$NON-NLS-1$
- public static final String PROVIDER_ATTRIBUTE = "provider"; //$NON-NLS-1$
- public static final String URL_ATTRIBUTE = "url"; //$NON-NLS-1$
- public static final String URI_ATTRIBUTE = "uri"; //$NON-NLS-1$
-
- // Constants for the license and copyright elements
- public static final String LICENSES_ELEMENT = "licenses"; //$NON-NLS-1$
- public static final String LICENSE_ELEMENT = "license"; //$NON-NLS-1$
- public static final String COPYRIGHT_ELEMENT = "copyright"; //$NON-NLS-1$
-
- // A constant for the name of an attribute of a collection or array element
- // specifying the size or length
- public static final String COLLECTION_SIZE_ATTRIBUTE = "size"; //$NON-NLS-1$
-
- // A constant for an empty array of attribute names
- public static String[] noAttributes = new String[0];
-
- //Constants for attributes of a composite repository
- public static final String CHILDREN_ELEMENT = "children"; //$NON-NLS-1$
- public static final String CHILD_ELEMENT = "child"; //$NON-NLS-1$
- public static final String LOCATION_ELEMENT = "location"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java
deleted file mode 100644
index 11fc7feff..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java
+++ /dev/null
@@ -1,753 +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.persistence;
-
-import java.net.*;
-import java.util.List;
-import java.util.StringTokenizer;
-import javax.xml.parsers.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.Activator;
-import org.eclipse.equinox.internal.p2.core.StringPool;
-import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-import org.osgi.util.tracker.ServiceTracker;
-import org.xml.sax.*;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.helpers.DefaultHandler;
-
-public abstract class XMLParser extends DefaultHandler implements XMLConstants {
-
- // Get the root object that is being parsed.
- protected abstract Object getRootObject();
-
- // Get a generic parser error message for inclusion in an error status
- protected abstract String getErrorMessage();
-
- protected BundleContext context; // parser class bundle context
- protected String bundleId; // parser class bundle id
-
- protected XMLReader xmlReader; // the XML reader for the parser
-
- protected MultiStatus status = null; // accumulation of non-fatal errors
- protected Locator locator = null; // document locator, if supported by the parser
-
- protected StringPool stringPool = new StringPool();//used to eliminate string duplication
- private IProgressMonitor monitor;
-
- private static ServiceTracker xmlTracker = null;
-
- public XMLParser(BundleContext context, String pluginId) {
- super();
- this.context = context;
- this.bundleId = pluginId;
- }
-
- /**
- * Non-fatal errors accumulated during parsing.
- */
- public IStatus getStatus() {
- return (status != null ? status : Status.OK_STATUS);
- }
-
- /**
- * Returns the canonical form of a string. Used to eliminate duplicate equal
- * strings.
- */
- protected String canonicalize(String string) {
- return stringPool == null ? string : stringPool.add(string);
- }
-
- public boolean isValidXML() {
- return (status == null || !status.matches(IStatus.ERROR | IStatus.CANCEL));
- }
-
- private synchronized static SAXParserFactory acquireXMLParsing(BundleContext context) {
- if (xmlTracker == null) {
- xmlTracker = new ServiceTracker(context, SAXParserFactory.class.getName(), null);
- xmlTracker.open();
- }
- return (SAXParserFactory) xmlTracker.getService();
- }
-
- protected synchronized static void releaseXMLParsing() {
- if (xmlTracker != null) {
- xmlTracker.close();
- xmlTracker = null;
- }
- }
-
- protected SAXParser getParser() throws ParserConfigurationException, SAXException {
- SAXParserFactory factory = acquireXMLParsing(this.context);
- if (factory == null) {
- throw new SAXException(Messages.XMLParser_No_SAX_Parser);
- }
- factory.setNamespaceAware(true);
- factory.setValidating(false);
- try {
- factory.setFeature("http://xml.org/sax/features/string-interning", true); //$NON-NLS-1$
- } catch (SAXException se) {
- // some parsers may not support string interning
- }
- SAXParser theParser = factory.newSAXParser();
- if (theParser == null) {
- throw new SAXException(Messages.XMLParser_No_SAX_Parser);
- }
- xmlReader = theParser.getXMLReader();
- return theParser;
- }
-
- public static String makeSimpleName(String localName, String qualifiedName) {
- if (localName != null && localName.length() > 0) {
- return localName;
- }
- int nameSpaceIndex = qualifiedName.indexOf(":"); //$NON-NLS-1$
- return (nameSpaceIndex == -1 ? qualifiedName : qualifiedName.substring(nameSpaceIndex + 1));
- }
-
- /**
- * Set the document locator for the parser
- *
- * @see org.xml.sax.ContentHandler#setDocumentLocator
- */
- public void setDocumentLocator(Locator docLocator) {
- locator = docLocator;
- }
-
- /**
- * Sets the progress monitor for the parser
- */
- protected void setProgressMonitor(IProgressMonitor monitor) {
- this.monitor = monitor;
- }
-
- /**
- * Abstract base class for content handlers
- */
- protected abstract class AbstractHandler extends DefaultHandler {
-
- protected ContentHandler parentHandler = null;
- protected String elementHandled = null;
-
- protected StringBuffer characters = null; // character data inside an element
-
- public AbstractHandler() {
- // Empty constructor for a root handler
- }
-
- public AbstractHandler(ContentHandler parentHandler) {
- this.parentHandler = parentHandler;
- xmlReader.setContentHandler(this);
- }
-
- public AbstractHandler(ContentHandler parentHandler, String elementHandled) {
- this.parentHandler = parentHandler;
- xmlReader.setContentHandler(this);
- this.elementHandled = elementHandled;
- }
-
- /**
- * Set the document locator for the parser
- *
- * @see org.xml.sax.ContentHandler#setDocumentLocator
- */
- public void setDocumentLocator(Locator docLocator) {
- locator = docLocator;
- }
-
- public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
- finishCharacters();
- String name = makeSimpleName(localName, qName);
- trace(name, attributes);
- startElement(name, attributes);
- }
-
- public abstract void startElement(String name, Attributes attributes) throws SAXException;
-
- public void invalidElement(String name, Attributes attributes) {
- unexpectedElement(this, name, attributes);
- new IgnoringHandler(this);
- }
-
- public void endElement(String namespaceURI, String localName, String qName) {
- // TODO: throw a bad state error if makeSimpleName(localName, qName) != elementHandled
- finishCharacters();
- finished();
- // Restore the parent content handler
- xmlReader.setContentHandler(parentHandler);
- }
-
- /**
- * An implementation for startElement when there are no sub-elements
- */
- protected void noSubElements(String name, Attributes attributes) {
- unexpectedElement(this, name, attributes);
- // Create a new handler to ignore subsequent nested elements
- new IgnoringHandler(this);
- }
-
- /*
- * Save up character data until endElement or nested startElement
- *
- * @see org.xml.sax.ContentHandler#characters
- */
- public void characters(char[] chars, int start, int length) {
- if (this.characters == null) {
- this.characters = new StringBuffer();
- }
- this.characters.append(chars, start, length);
- }
-
- // Consume the characters accumulated in this.characters.
- // Called before startElement or endElement
- private String finishCharacters() {
- // common case -- no characters or only whitespace
- if (this.characters == null || this.characters.length() == 0) {
- return null;
- }
- if (allWhiteSpace(this.characters)) {
- this.characters.setLength(0);
- return null;
- }
-
- // process the characters
- try {
- String trimmedChars = this.characters.toString().trim();
- if (trimmedChars.length() == 0) {
- // this shouldn't happen due to the test for allWhiteSpace above
- System.err.println("Unexpected non-whitespace characters: " //$NON-NLS-1$
- + trimmedChars);
- return null;
- }
- processCharacters(trimmedChars);
- return trimmedChars;
- } finally {
- this.characters.setLength(0);
- }
- }
-
- // Method to override in the handler of an element with CDATA.
- protected void processCharacters(String data) {
- if (data.length() > 0) {
- unexpectedCharacterData(this, data);
- }
- }
-
- private boolean allWhiteSpace(StringBuffer sb) {
- int length = sb.length();
- for (int i = 0; i < length; i += 1) {
- if (!Character.isWhitespace(sb.charAt(i))) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Called when this element and all elements nested into it have been
- * handled.
- */
- protected void finished() {
- // Do nothing by default
- }
-
- /*
- * A name used to identify the handler.
- */
- public String getName() {
- return (elementHandled != null ? elementHandled : "NoName"); //$NON-NLS-1$
- }
-
- /**
- * In p2 1.0 we stored URLs, in 1.1 and later we store URIs. This method will
- * first check for a URI, and then resort to looking for a URL attribute for
- * backwards compatibility.
- * @param attributes The attributes to parse
- * @param required If true, an exception is thrown if no URI or URL attribute is present
- */
- protected URI parseURIAttribute(Attributes attributes, boolean required) {
- String location = parseOptionalAttribute(attributes, URI_ATTRIBUTE);
- try {
- if (location != null)
- return new URI(location);
- if (required)
- location = parseRequiredAttributes(attributes, new String[] {URL_ATTRIBUTE})[0];
- else
- location = parseOptionalAttribute(attributes, URL_ATTRIBUTE);
- if (location == null)
- return null;
- return URIUtil.toURI(new URL(location));
- } catch (MalformedURLException e) {
- invalidAttributeValue(elementHandled, URL_ATTRIBUTE, location, e);
- } catch (URISyntaxException e) {
- invalidAttributeValue(elementHandled, URL_ATTRIBUTE, location, e);
- }
- return null;
- }
-
- /**
- * Parse the attributes of an element with only required attributes.
- */
- protected String[] parseRequiredAttributes(Attributes attributes, String[] required) {
- return parseAttributes(attributes, required, noAttributes);
- }
-
- /**
- * Parse the attributes of an element with a single optional attribute.
- */
- protected String parseOptionalAttribute(Attributes attributes, String name) {
- return parseAttributes(attributes, noAttributes, new String[] {name})[0];
- }
-
- /**
- * Parse the attributes of an element, given the list of required and optional ones.
- * Return values in same order, null for those not present.
- * Log warnings for extra attributes or missing required attributes.
- */
- protected String[] parseAttributes(Attributes attributes, String[] required, String[] optional) {
- String[] result = new String[required.length + optional.length];
- for (int i = 0; i < attributes.getLength(); i += 1) {
- String name = attributes.getLocalName(i);
- String value = canonicalize(attributes.getValue(i).trim());
- int j;
- if ((j = indexOf(required, name)) >= 0) {
- result[j] = value;
- } else if ((j = indexOf(optional, name)) >= 0) {
- result[required.length + j] = value;
- } else {
- unexpectedAttribute(elementHandled, name, value);
- }
- }
- for (int i = 0; i < required.length; i += 1) {
- checkRequiredAttribute(elementHandled, required[i], result[i]);
- }
- return result;
- }
-
- }
-
- /**
- * Handler for an XML document.
- *
- * Using the inelegant name 'DocHandler' to clearly distinguish
- * this class from the deprecated org.xml.sax.DocumentHandler.
- */
- protected class DocHandler extends AbstractHandler {
-
- RootHandler rootHandler;
-
- public DocHandler(String rootName, RootHandler rootHandler) {
- super(null, rootName);
- this.rootHandler = rootHandler;
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(elementHandled)) {
- rootHandler.initialize(this, name, attributes);
- xmlReader.setContentHandler(rootHandler);
- } else {
- this.noSubElements(name, attributes);
- }
- }
-
- }
-
- /**
- * Abstract handler for the root element.
- */
- protected abstract class RootHandler extends AbstractHandler {
-
- public RootHandler() {
- super();
- }
-
- public void initialize(DocHandler document, String rootName, Attributes attributes) {
- this.parentHandler = document;
- this.elementHandled = rootName;
- handleRootAttributes(attributes);
- }
-
- protected abstract void handleRootAttributes(Attributes attributes);
-
- }
-
- /**
- * Handler for an ordered properties collection.
- */
- protected class PropertiesHandler extends AbstractHandler {
-
- private OrderedProperties properties;
-
- public PropertiesHandler(ContentHandler parentHandler, Attributes attributes) {
- super(parentHandler, PROPERTIES_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- properties = (size != null ? new OrderedProperties(Integer.parseInt(size)) : new OrderedProperties());
- }
-
- public OrderedProperties getProperties() {
- return properties;
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(PROPERTY_ELEMENT)) {
- new PropertyHandler(this, attributes, properties);
- } else {
- invalidElement(name, attributes);
- }
- }
-
- }
-
- /**
- * Handler for a property in an ordered properties collection.
- */
- protected class PropertyHandler extends AbstractHandler {
-
- public PropertyHandler(ContentHandler parentHandler, Attributes attributes, OrderedProperties properties) {
- super(parentHandler, PROPERTY_ELEMENT);
- String[] property = parseProperty(attributes);
- if (isValidProperty(property)) {
- properties.setProperty(property[0], property[1]);
- }
- }
-
- public void startElement(String name, Attributes attributes) {
- invalidElement(name, attributes);
- }
-
- private String[] parseProperty(Attributes attributes) {
- return parseRequiredAttributes(attributes, PROPERTY_ATTRIBUTES);
- }
-
- private boolean isValidProperty(String[] property) {
- return (property.length == 2 && property[0] != null && property[1] != null);
- }
- }
-
- /**
- * Handler for an element with only cdata and no sub-elements.
- */
- protected class TextHandler extends AbstractHandler {
-
- private String text = null;
-
- // Constructor for a subclass that processes the attributes
- public TextHandler(AbstractHandler parent, String elementName) {
- super(parent, elementName);
- }
-
- // Constructor for a subclass with no attributes
- public TextHandler(AbstractHandler parent, String elementName, Attributes attributes) {
- super(parent, elementName);
- parseAttributes(attributes, noAttributes, noAttributes);
- }
-
- public TextHandler(AbstractHandler parent, String elementName, Attributes attributes, List texts) {
- super(parent, elementName);
- parseAttributes(attributes, noAttributes, noAttributes);
- }
-
- public String getText() {
- return (text != null ? text : ""); //$NON-NLS-1$
- }
-
- public void startElement(String name, Attributes attributes) {
- invalidElement(name, attributes);
- }
-
- protected void processCharacters(String data) {
- this.text = canonicalize(data);
- }
-
- }
-
- /**
- * Handler for ignoring content.
- */
- protected class IgnoringHandler extends AbstractHandler {
-
- public IgnoringHandler(AbstractHandler parent) {
- super(parent);
- this.elementHandled = "IgnoringAll"; //$NON-NLS-1$
- }
-
- public void startElement(String name, Attributes attributes) {
- noSubElements(name, attributes);
- }
-
- }
-
- // Helper for processing instructions that include a Version.
- public Version extractPIVersion(String target, String data) {
- return checkVersion(target, PI_VERSION_ATTRIBUTE, extractPIAttribute(data, PI_VERSION_ATTRIBUTE));
- }
-
- private String extractPIAttribute(String data, String key) {
- StringTokenizer piTokenizer = new StringTokenizer(data, " \'\""); //$NON-NLS-1$
- String[] tokens = new String[piTokenizer.countTokens()];
- int index = 0;
- int valueIndex = -1;
- while (piTokenizer.hasMoreTokens() && index < tokens.length) {
- tokens[index] = piTokenizer.nextToken();
- if (tokens[index].equals(key + '=') && index < tokens.length) {
- valueIndex = index + 1;
- }
- index++;
- }
- return (valueIndex >= 0 ? tokens[valueIndex] : ""); //$NON-NLS-1$
- }
-
- public void error(SAXParseException ex) {
- addError(IStatus.WARNING, ex.getMessage(), ex);
- }
-
- public void fatalError(SAXParseException ex) {
- addError(IStatus.ERROR, ex.getMessage(), ex);
- }
-
- protected String getErrorPrefix() {
- return null;
- }
-
- protected String getErrorSuffix() {
- return null;
- }
-
- /**
- * Collects an error or warning that occurred during parsing.
- */
- public final void addError(int severity, String msg, Throwable exception) {
- int line = 0;
- int column = 0;
- String key = msg;
- Object[] args = new Object[] {};
- String root = (getRootObject() == null ? "" //$NON-NLS-1$
- : " (" + getRootObject() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
- if (this.locator != null) {
- String name = this.locator.getSystemId();
- line = this.locator.getLineNumber();
- column = this.locator.getColumnNumber();
- if (line > 0) {
- args = new Object[] {msg, root, name, new Integer(line), new Integer(column)};
- if (column > 0) {
- key = (name != null ? Messages.XMLParser_Error_At_Name_Line_Column //
- : Messages.XMLParser_Error_At_Line_Column);
- } else {
- key = (name != null ? Messages.XMLParser_Error_At_Name_Line //
- : Messages.XMLParser_Error_At_Line);
- }
- }
- }
- String errMsg = NLS.bind(key, args);
- String prefix = getErrorPrefix();
- String suffix = getErrorSuffix();
- if (prefix != null) {
- errMsg = prefix + errMsg;
- }
- if (suffix != null) {
- errMsg = errMsg + suffix;
- }
- IStatus currStatus = new Status(severity, Activator.ID, errMsg, exception);
- if (this.status == null) {
- this.status = new MultiStatus(bundleId, IStatus.OK, new IStatus[] {currStatus}, getErrorMessage(), null);
- } else {
- this.status.add(currStatus);
- }
- }
-
- public void trace(String element, Attributes attributes) {
- // TODO: support logging
- // if (!getLogger().isDebugLoggable()) {
- // return;
- // }
- // int indentSize = (this.stateStack != null ? this.stateStack.size() - 1 : 1);
- // if (attributes == null) {
- // indentSize -= 1;
- // }
- // char[] indent = new char[2 * indentSize];
- // Arrays.fill(indent, ' ');
- // StringBuffer sb = new StringBuffer();
- // sb.append(indent);
- // sb.append('<');
- // if (attributes != null) {
- // sb.append(element);
- // toString(sb, attributes);
- // } else {
- // sb.append('/').append(element);
- // }
- // sb.append('>');
- // getLogger().debug(sb.toString());
- }
-
- private static String toString(Attributes attributes) {
- StringBuffer result = new StringBuffer();
- toString(result, attributes);
- return result.toString();
- }
-
- private static void toString(StringBuffer sb, Attributes attributes) {
- for (int i = 0; i < attributes.getLength(); i += 1) {
- String name = attributes.getLocalName(i);
- String value = attributes.getValue(i).trim();
- sb.append(' ').append(name);
- sb.append('=').append('"');
- sb.append(value);
- sb.append('"');
- }
- }
-
- public void checkRequiredAttribute(String element, String name, Object value) {
- if (value == null) {
- addError(IStatus.WARNING, NLS.bind(Messages.XMLParser_Missing_Required_Attribute, element, name), null);
- }
- }
-
- // Check the format of a required boolean attribute
- public Boolean checkBoolean(String element, String attribute, String value) {
- try {
- return Boolean.valueOf(value);
- } catch (IllegalArgumentException iae) {
- invalidAttributeValue(element, attribute, value);
- } catch (NullPointerException npe) {
- invalidAttributeValue(element, attribute, null);
- }
- return Boolean.FALSE;
- }
-
- // Check the format of an optional boolean attribute
- public Boolean checkBoolean(String element, String attribute, String value, boolean defaultValue) {
- Boolean result = (defaultValue ? Boolean.TRUE : Boolean.FALSE);
- if (value != null) {
- try {
- return Boolean.valueOf(value);
- } catch (IllegalArgumentException iae) {
- invalidAttributeValue(element, attribute, value);
- }
- }
- return result;
- }
-
- // Check the format of a required integer attribute
- public int checkInteger(String element, String attribute, String value) {
- try {
- return Integer.parseInt(value);
- } catch (IllegalArgumentException iae) {
- invalidAttributeValue(element, attribute, value);
- }
- return 0;
- }
-
- // Check the format of a required URI attribute
- public URI checkURI(String element, String attribute, String value) {
- try {
- return URIUtil.fromString(value);
- } catch (URISyntaxException e) {
- invalidAttributeValue(element, attribute, value);
- }
- //TODO ok to return null?
- return null;
- }
-
- public void checkCancel() {
- if (monitor != null && monitor.isCanceled())
- throw new OperationCanceledException();
- }
-
- /**
- * Converts a version string to a Version object. Returns the version object,
- * or {@link Version#emptyVersion} if the value was not a valid version.
- */
- public Version checkVersion(String element, String attribute, String value) {
- try {
- return Version.parseVersion(value);
- } catch (IllegalArgumentException iae) {
- invalidAttributeValue(element, attribute, value);
- } catch (NullPointerException npe) {
- invalidAttributeValue(element, attribute, null);
- }
- return Version.emptyVersion;
- }
-
- public VersionRange checkVersionRange(String element, String attribute, String value) {
- try {
- if (value != null && !value.equals("0.0.0")) //$NON-NLS-1$
- return new VersionRange(value);
- } catch (IllegalArgumentException iae) {
- invalidAttributeValue(element, attribute, value);
- } catch (NullPointerException npe) {
- invalidAttributeValue(element, attribute, null);
- }
- return VersionRange.emptyRange;
- }
-
- public void unexpectedAttribute(String element, String attribute, String value) {
- if (Tracing.DEBUG_PARSE_PROBLEMS)
- Tracing.debug("Unexpected attribute for element " + element + ": " + attribute + '=' + value); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void invalidAttributeValue(String element, String attribute, String value) {
- invalidAttributeValue(element, attribute, value, null);
- }
-
- public void invalidAttributeValue(String element, String attribute, String value, Throwable exception) {
- addError(IStatus.WARNING, NLS.bind(Messages.XMLParser_Illegal_Value_For_Attribute, new Object[] {attribute, element, value}), exception);
- }
-
- public void unexpectedElement(AbstractHandler handler, String element, Attributes attributes) {
- if (Tracing.DEBUG_PARSE_PROBLEMS)
- Tracing.debug("Unexpected element in element " + handler.getName() + ": <" + element + toString(attributes) + '>'); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void duplicateElement(AbstractHandler handler, String element, Attributes attributes) {
- addError(IStatus.WARNING, NLS.bind(Messages.XMLParser_Duplicate_Element, new Object[] {handler.getName(), element, toString(attributes)}), null);
- //ignore the duplicate element entirely because we have already logged it
- new IgnoringHandler(handler);
- }
-
- public void unexpectedCharacterData(AbstractHandler handler, String cdata) {
- if (Tracing.DEBUG_PARSE_PROBLEMS)
- Tracing.debug("Unexpected character data in element " + handler.getName() + ": " + cdata.trim()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Find the index of the first occurrence of object in array, or -1.
- * Use Arrays.binarySearch if array is big and sorted.
- */
- protected static int indexOf(String[] array, String value) {
- for (int i = 0; i < array.length; i += 1) {
- if (value == null ? array[i] == null : value.equals(array[i])) {
- return i;
- }
- }
- return -1;
- }
-
- // public class BadStateError extends AssertionError {
- // private static final long serialVersionUID = 1L; // not serialized
- //
- // public BadStateError() {
- // super("unexpected state" + //$NON-NLS-1$
- // (XMLParser.this.stateStack != null ? ": " + XMLParser.this.stateStack //$NON-NLS-1$
- // : "")); //$NON-NLS-1$
- // }
- //
- // public BadStateError(String element) {
- // super("unexpected state for " + element + //$NON-NLS-1$
- // (XMLParser.this.stateStack != null ? ": " + XMLParser.this.stateStack //$NON-NLS-1$
- // : "")); //$NON-NLS-1$
- // }
- // }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java
deleted file mode 100644
index 8df1dd8b8..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java
+++ /dev/null
@@ -1,307 +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.persistence;
-
-import java.io.*;
-import java.util.*;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-
-public class XMLWriter implements XMLConstants {
-
- public static class ProcessingInstruction {
-
- private String target;
- private String[] data;
-
- // The standard UTF-8 processing instruction
- public static final String XML_UTF8 = "<?xml version='1.0' encoding='UTF-8'?>"; //$NON-NLS-1$
-
- public ProcessingInstruction(String target, String[] attrs, String[] values) {
- // Lengths of attributes and values must be the same
- this.target = target;
- this.data = new String[attrs.length];
- for (int i = 0; i < attrs.length; i++) {
- data[i] = attributeImage(attrs[i], values[i]);
- }
- }
-
- public static ProcessingInstruction makeTargetVersionInstruction(String target, Version version) {
- return new ProcessingInstruction(target, new String[] {PI_VERSION_ATTRIBUTE}, new String[] {version.toString()});
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer("<?"); //$NON-NLS-1$
- sb.append(this.target).append(' ');
- for (int i = 0; i < data.length; i++) {
- sb.append(this.data[i]);
- if (i < data.length - 1) {
- sb.append(' ');
- }
- }
- sb.append("?>"); //$NON-NLS-1$
- return sb.toString();
- }
- }
-
- private Stack elements; // XML elements that have not yet been closed
- private boolean open; // Can attributes be added to the current element?
- private String indent; // used for each level of indentation
-
- private PrintWriter pw;
-
- public XMLWriter(OutputStream output, ProcessingInstruction[] piElements) throws UnsupportedEncodingException {
- this.pw = new PrintWriter(new OutputStreamWriter(output, "UTF8"), false); //$NON-NLS-1$
- println(ProcessingInstruction.XML_UTF8);
- this.elements = new Stack();
- this.open = false;
- this.indent = " "; //$NON-NLS-1$
- if (piElements != null) {
- for (int i = 0; i < piElements.length; i++) {
- println(piElements[i].toString());
- }
- }
- }
-
- // start a new element
- public void start(String name) {
- if (this.open) {
- println('>');
- }
- indent();
- print('<');
- print(name);
- this.elements.push(name);
- this.open = true;
- }
-
- // end the most recent element with this name
- public void end(String name) {
- if (this.elements.empty()) {
- throw new EndWithoutStartError();
- }
- int index = this.elements.search(name);
- if (index == -1) {
- throw new EndWithoutStartError(name);
- }
- for (int i = 0; i < index; i += 1) {
- end();
- }
- }
-
- // end the current element
- public void end() {
- if (this.elements.empty()) {
- throw new EndWithoutStartError();
- }
- String name = (String) this.elements.pop();
- if (this.open) {
- println("/>"); //$NON-NLS-1$
- } else {
- printlnIndented("</" + name + '>', false); //$NON-NLS-1$
- }
- this.open = false;
- }
-
- public static String escape(String txt) {
- StringBuffer buffer = null;
- for (int i = 0; i < txt.length(); ++i) {
- String replace;
- char c = txt.charAt(i);
- switch (c) {
- case '<' :
- replace = "&lt;"; //$NON-NLS-1$
- break;
- case '>' :
- replace = "&gt;"; //$NON-NLS-1$
- break;
- case '"' :
- replace = "&quot;"; //$NON-NLS-1$
- break;
- case '\'' :
- replace = "&apos;"; //$NON-NLS-1$
- break;
- case '&' :
- replace = "&amp;"; //$NON-NLS-1$
- break;
- case '\t' :
- replace = "&#x9;"; //$NON-NLS-1$
- break;
- case '\n' :
- replace = "&#xA;"; //$NON-NLS-1$
- break;
- case '\r' :
- replace = "&#xD;"; //$NON-NLS-1$
- break;
- default :
- // this is the set of legal xml scharacters in unicode excluding high surrogates since they cannot be represented with a char
- // see http://www.w3.org/TR/REC-xml/#charsets
- if ((c >= '\u0020' && c <= '\uD7FF') || (c >= '\uE000' && c <= '\uFFFD')) {
- if (buffer != null)
- buffer.append(c);
- continue;
- }
- replace = Character.isWhitespace(c) ? " " : null; //$NON-NLS-1$
- }
- if (buffer == null) {
- buffer = new StringBuffer(txt.length() + 16);
- buffer.append(txt.substring(0, i));
- }
- if (replace != null)
- buffer.append(replace);
- }
-
- if (buffer == null)
- return txt;
-
- return buffer.toString();
- }
-
- // write a boolean attribute if it doesn't have the default value
- public void attribute(String name, boolean value, boolean defaultValue) {
- if (value != defaultValue) {
- attribute(name, value);
- }
- }
-
- public void attribute(String name, boolean value) {
- attribute(name, Boolean.toString(value));
- }
-
- public void attribute(String name, int value) {
- attribute(name, Integer.toString(value));
- }
-
- public void attributeOptional(String name, String value) {
- if (value != null && value.length() > 0) {
- attribute(name, value);
- }
- }
-
- public void attribute(String name, Object value) {
- if (!this.open) {
- throw new AttributeAfterNestedContentError();
- }
- if (value == null) {
- return; // optional attribute with no value
- }
- print(' ');
- print(name);
- print("='"); //$NON-NLS-1$
- print(escape(value.toString()));
- print('\'');
- }
-
- public void cdata(String data) {
- cdata(data, true);
- }
-
- public void cdata(String data, boolean escape) {
- if (this.open) {
- println('>');
- this.open = false;
- }
- if (data != null) {
- printlnIndented(data, escape);
- }
- }
-
- public void flush() {
- this.pw.flush();
- }
-
- public void writeProperties(Map properties) {
- writeProperties(PROPERTIES_ELEMENT, properties);
- }
-
- public void writeProperties(String propertiesElement, Map properties) {
- if (properties != null && properties.size() > 0) {
- start(propertiesElement);
- attribute(COLLECTION_SIZE_ATTRIBUTE, properties.size());
- for (Iterator iter = properties.keySet().iterator(); iter.hasNext();) {
- String name = (String) iter.next();
- writeProperty(name, (String) properties.get(name));
- }
- end(propertiesElement);
- }
- }
-
- public void writeProperty(String name, String value) {
- start(PROPERTY_ELEMENT);
- attribute(PROPERTY_NAME_ATTRIBUTE, name);
- attribute(PROPERTY_VALUE_ATTRIBUTE, value);
- end();
- }
-
- protected static String attributeImage(String name, String value) {
- if (value == null) {
- return ""; // optional attribute with no value //$NON-NLS-1$
- }
- return name + "='" + escape(value) + '\''; //$NON-NLS-1$
- }
-
- private void println(char c) {
- this.pw.println(c);
- }
-
- private void println(String s) {
- this.pw.println(s);
- }
-
- private void println() {
- this.pw.println();
- }
-
- private void print(char c) {
- this.pw.print(c);
- }
-
- private void print(String s) {
- this.pw.print(s);
- }
-
- private void printlnIndented(String s, boolean escape) {
- if (s.length() == 0) {
- println();
- } else {
- indent();
- println(escape ? escape(s) : s);
- }
- }
-
- private void indent() {
- for (int i = this.elements.size(); i > 0; i -= 1) {
- print(this.indent);
- }
- }
-
- public static class AttributeAfterNestedContentError extends Error {
- private static final long serialVersionUID = 1L; // not serialized
- }
-
- public static class EndWithoutStartError extends Error {
- private static final long serialVersionUID = 1L; // not serialized
- private String name;
-
- public EndWithoutStartError() {
- super();
- }
-
- public EndWithoutStartError(String name) {
- super();
- this.name = name;
- }
-
- public String getName() {
- return this.name;
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/messages.properties b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/messages.properties
deleted file mode 100644
index b19ad2f91..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/messages.properties
+++ /dev/null
@@ -1,27 +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
-###############################################################################
-
-# All these errors are bound to 5 args: 0-msg, 1-root, 2-name, 3-line, 4-column
-XMLParser_Error_At_Line=Error at line {3}{1}: {0}
-XMLParser_Error_At_Line_Column=Error at line {3}, column {4}{1}: {0}
-XMLParser_Error_At_Name_Line=Error in {2} at line {3}: {0}
-XMLParser_Error_At_Name_Line_Column=Error in {2} at line {3}, column {4}: {0}
-
-XMLParser_No_SAX_Parser=Unable to acquire a SAX parser service.
-XMLParser_Missing_Required_Attribute=Missing required attribute in "{0}": {1}
-XMLParser_Illegal_Value_For_Attribute=Illegal value for attribute "{0}" of element "{1}": {2}
-XMLParser_Duplicate_Element=Duplicate singleton element in element "{0}": <{1}{2}>
-
-io_failedRead=Unable to read repository at {0}
-io_IncompatibleVersion=\
-Metadata repository has incompatible version {0}; expected {1}
-io_parseError=\
-Error parsing composite repository \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Activator.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Activator.java
deleted file mode 100644
index 34d943870..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Activator.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc.
- * 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.
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.repository;
-
-import org.eclipse.ecf.filetransfer.service.IRetrieveFileTransferFactory;
-import org.eclipse.ecf.provider.filetransfer.IFileTransferProtocolToFactoryMapper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * The activator class controls the plug-in life cycle.
- * This activator has helper methods to get file transfer service tracker, and
- * for making sure required ECF bundles are started.
- */
-public class Activator implements BundleActivator {
-
- public static final String ID = "org.eclipse.equinox.p2.repository"; //$NON-NLS-1$
- private static final String HTTP = "http"; //$NON-NLS-1$
- private static final String HTTPS = "https"; //$NON-NLS-1$
-
- private static BundleContext context;
- // tracker for ECF service
- private ServiceTracker retrievalFactoryTracker;
-
- // tracker for protocolToFactoryMapperTracker
- private ServiceTracker protocolToFactoryMapperTracker = null;
-
- // The shared instance
- private static Activator plugin;
-
- public void start(BundleContext aContext) throws Exception {
- Activator.context = aContext;
- Activator.plugin = this;
- }
-
- public void stop(BundleContext aContext) throws Exception {
- Activator.context = null;
- Activator.plugin = null;
- if (retrievalFactoryTracker != null) {
- retrievalFactoryTracker.close();
- retrievalFactoryTracker = null;
- }
- if (protocolToFactoryMapperTracker != null) {
- protocolToFactoryMapperTracker.close();
- protocolToFactoryMapperTracker = null;
- }
-
- }
-
- public static BundleContext getContext() {
- return Activator.context;
- }
-
- /**
- * Get singleton instance.
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns a {@link IRetrieveFileTransferFactory} using a {@link ServiceTracker} after having attempted
- * to start the bundle "org.eclipse.ecf.provider.filetransfer". If something is wrong with the configuration
- * this method returns null.
- * @return a factory, or null, if configuration is incorrect
- */
- public IRetrieveFileTransferFactory getRetrieveFileTransferFactory() {
- return (IRetrieveFileTransferFactory) getFileTransferServiceTracker().getService();
- }
-
- public synchronized void useJREHttpClient() {
- IFileTransferProtocolToFactoryMapper mapper = getProtocolToFactoryMapper();
- if (mapper != null) {
- // remove http
- // Remove browse provider
- String providerId = mapper.getBrowseFileTransferFactoryId(HTTP);
- if (providerId != null) {
- mapper.removeBrowseFileTransferFactory(providerId);
- }
- // Remove retrieve provider
- providerId = mapper.getRetrieveFileTransferFactoryId(HTTP);
- if (providerId != null) {
- mapper.removeRetrieveFileTransferFactory(providerId);
- }
- // Remove send provider
- providerId = mapper.getSendFileTransferFactoryId(HTTP);
- if (providerId != null) {
- mapper.removeSendFileTransferFactory(providerId);
- }
- // remove https
- // Remove browse provider
- providerId = mapper.getBrowseFileTransferFactoryId(HTTPS);
- if (providerId != null) {
- mapper.removeBrowseFileTransferFactory(providerId);
- }
- // Remove retrieve provider
- providerId = mapper.getRetrieveFileTransferFactoryId(HTTPS);
- if (providerId != null) {
- mapper.removeRetrieveFileTransferFactory(providerId);
- }
- // Remove send provider
- providerId = mapper.getSendFileTransferFactoryId(HTTPS);
- if (providerId != null) {
- mapper.removeSendFileTransferFactory(providerId);
- }
- }
- }
-
- /**
- * Gets the singleton ServiceTracker for the IRetrieveFileTransferFactory and starts the bundles
- * "org.eclipse.ecf" and
- * "org.eclipse.ecf.provider.filetransfer" on first call.
- * @return ServiceTracker
- */
- private synchronized ServiceTracker getFileTransferServiceTracker() {
- if (retrievalFactoryTracker == null) {
- retrievalFactoryTracker = new ServiceTracker(Activator.getContext(), IRetrieveFileTransferFactory.class.getName(), null);
- retrievalFactoryTracker.open();
- startBundle("org.eclipse.ecf"); //$NON-NLS-1$
- startBundle("org.eclipse.ecf.provider.filetransfer"); //$NON-NLS-1$
- }
- return retrievalFactoryTracker;
- }
-
- private IFileTransferProtocolToFactoryMapper getProtocolToFactoryMapper() {
- if (protocolToFactoryMapperTracker == null) {
- protocolToFactoryMapperTracker = new ServiceTracker(context, IFileTransferProtocolToFactoryMapper.class.getName(), null);
- protocolToFactoryMapperTracker.open();
- }
- return (IFileTransferProtocolToFactoryMapper) protocolToFactoryMapperTracker.getService();
- }
-
- private boolean startBundle(String bundleId) {
- PackageAdmin packageAdmin = (PackageAdmin) ServiceHelper.getService(Activator.getContext(), PackageAdmin.class.getName());
- if (packageAdmin == null)
- return false;
-
- Bundle[] bundles = packageAdmin.getBundles(bundleId, null);
- if (bundles != null && bundles.length > 0) {
- for (int i = 0; i < bundles.length; i++) {
- try {
- if ((bundles[i].getState() & Bundle.INSTALLED) == 0) {
- bundles[i].start();
- return true;
- }
- } catch (BundleException e) {
- // failed, try next bundle
- }
- }
- }
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/AuthenticationFailedException.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/AuthenticationFailedException.java
deleted file mode 100644
index a98c52d5f..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/AuthenticationFailedException.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc.
- * 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.
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.repository;
-
-import java.net.ProtocolException;
-
-/**
- * Exception signaling that authentication failed.
- */
-public class AuthenticationFailedException extends ProtocolException {
-
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java
deleted file mode 100644
index 1d4f074ef..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java
+++ /dev/null
@@ -1,420 +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 - additional implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URL;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ecf.filetransfer.UserCancelledException;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.p2.repository.*;
-import org.eclipse.equinox.internal.p2.repository.Activator;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.SynchronousProvisioningListener;
-import org.eclipse.equinox.internal.provisional.p2.core.location.AgentLocation;
-import org.eclipse.equinox.internal.provisional.p2.repository.*;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * A class to manage metadata cache files. Creating the cache files will place
- * the file in the AgentData location in a cache directory.
- *
- * Using the bus listeners will allow the manager to listen for repository
- * events. When a repository is removed, it will remove the cache file if one
- * was created for the repository.
- */
-public class CacheManager {
- /**
- * IStateful implementation of BufferedOutputStream. Class is used to get the status from
- * a download operation.
- */
- private static class StatefulStream extends BufferedOutputStream implements IStateful {
- private IStatus status;
-
- public StatefulStream(OutputStream stream) {
- super(stream);
- }
-
- public IStatus getStatus() {
-
- return status;
- }
-
- public void setStatus(IStatus aStatus) {
- status = aStatus;
- }
-
- }
-
- private static SynchronousProvisioningListener busListener;
- private static final String DOWNLOADING = "downloading"; //$NON-NLS-1$
- private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
- private static final String PROP_RESUMABLE = "org.eclipse.equinox.p2.metadata.repository.resumable"; //$NON-NLS-1$
- private static final String RESUME_DEFAULT = "true"; //$NON-NLS-1$
- private static final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
-
- private final HashSet knownPrefixes = new HashSet(5);
-
- /**
- * Returns a hash of the repository location.
- */
- private int computeHash(URI repositoryLocation) {
- return repositoryLocation.hashCode();
- }
-
- /**
- * Returns a local cache file with the contents of the given remote location,
- * or <code>null</code> if a local cache could not be created.
- *
- * @param repositoryLocation The remote location to be cached
- * @param prefix The prefix to use when creating the cache file
- * @param monitor a progress monitor
- * @return A {@link File} object pointing to the cache file or <code>null</code>
- * if the location is not a repository.
- * @throws FileNotFoundException if neither jar nor xml index file exists at given location
- * @throws AuthenticationFailedException if jar not available and xml causes authentication fail
- * @throws IOException on general IO errors
- * @throws ProvisionException on any error (e.g. user cancellation, unknown host, malformed address, connection refused, etc.)
- * @throws OperationCanceledException - if user canceled
- */
- public File createCache(URI repositoryLocation, String prefix, IProgressMonitor monitor) throws IOException, ProvisionException {
-
- SubMonitor submonitor = SubMonitor.convert(monitor, 1000);
- try {
- knownPrefixes.add(prefix);
- File cacheFile = getCache(repositoryLocation, prefix);
- URI jarLocation = URIUtil.append(repositoryLocation, prefix + JAR_EXTENSION);
- URI xmlLocation = URIUtil.append(repositoryLocation, prefix + XML_EXTENSION);
- int hashCode = computeHash(repositoryLocation);
-
- // Knowing if cache is stale is complicated by the fact that a jar could have been
- // produced after an xml index (and vice versa), and by the need to capture any
- // errors, as these needs to be reported to the user as something meaningful - instead of
- // just a general "can't read repository".
- // (Previous impl of stale checking ignored errors, and caused multiple round-trips)
- boolean stale = true;
- long lastModified = 0L;
- String name = null;
- String useExtension = JAR_EXTENSION;
- URI remoteFile = jarLocation;
-
- if (cacheFile != null) {
- lastModified = cacheFile.lastModified();
- name = cacheFile.getName();
- }
- // get last modified on jar
- long lastModifiedRemote = 0L;
- // bug 269588 - server may return 0 when file exists, so extra flag is needed
- boolean useJar = true;
- try {
- lastModifiedRemote = getTransport().getLastModified(jarLocation, submonitor.newChild(1));
- if (lastModifiedRemote <= 0)
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Server returned lastModified <= 0 for " + jarLocation)); //$NON-NLS-1$
- } catch (AuthenticationFailedException e) {
- // it is not meaningful to continue - the credentials are for the server
- // do not pass the exception - it gives no additional meaningful user information
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_AUTHENTICATION, NLS.bind(Messages.CacheManager_AuthenticationFaileFor_0, repositoryLocation), null));
- } catch (CoreException e) {
- useJar = false;
- // give up on a timeout - if we did not get a 404 on the jar, we will just prolong the pain
- // by (almost certainly) also timing out on the xml.
- if (e.getStatus() != null && e.getStatus().getException() != null) {
- Throwable ex = e.getStatus().getException();
- if (ex.getClass() == java.net.SocketTimeoutException.class)
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, NLS.bind(Messages.CacheManager_FailedCommunicationWithRepo_0, repositoryLocation), ex));
- }
- } catch (OperationCanceledException e) {
- // must pass this on
- throw e;
- } catch (Exception e) {
- // not ideal, just skip the jar on error, and try the xml instead - report errors for
- // the xml.
- useJar = false;
- }
- if (submonitor.isCanceled())
- throw new OperationCanceledException();
-
- if (useJar) {
- // There is a jar, and it should be used - cache is stale if it is xml based or
- // if older (irrespective of jar or xml).
- // Bug 269588 - also stale if remote reports 0
- stale = lastModifiedRemote > lastModified || (name != null && name.endsWith(XML_EXTENSION) || lastModifiedRemote <= 0);
- } else {
- // Also need to check remote XML file, and handle cancel, and errors
- // (Status is reported based on finding the XML file as giving up on certain errors
- // when checking for the jar may not be correct).
- try {
- lastModifiedRemote = getTransport().getLastModified(xmlLocation, submonitor.newChild(1));
- // if lastModifiedRemote is 0 - something is wrong in the communication stack, as
- // a FileNotFound exception should have been thrown.
- // bug 269588 - server may return 0 when file exists - site is not correctly configured
- if (lastModifiedRemote <= 0)
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Server returned lastModified <= 0 for " + xmlLocation)); //$NON-NLS-1$
-
- } catch (UserCancelledException e) {
- throw new OperationCanceledException();
- } catch (FileNotFoundException e) {
- throw new FileNotFoundException(NLS.bind(Messages.CacheManager_Neither_0_nor_1_found, jarLocation, xmlLocation));
- } catch (AuthenticationFailedException e) {
- // do not pass the exception, it provides no additional meaningful user information
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_AUTHENTICATION, NLS.bind(Messages.CacheManager_AuthenticationFaileFor_0, repositoryLocation), null));
- } catch (CoreException e) {
- IStatus status = e.getStatus();
- if (status == null)
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, NLS.bind(Messages.CacheManager_FailedCommunicationWithRepo_0, repositoryLocation), e));
- else if (status.getException() instanceof FileNotFoundException)
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, status.getMessage(), null));
- throw new ProvisionException(status);
-
- }
- // There is an xml, and it should be used - cache is stale if it is jar based or
- // if older (irrespective of jar or xml).
- // bug 269588 - server may return 0 when file exists - assume it is stale
- stale = lastModifiedRemote > lastModified || (name != null && name.endsWith(JAR_EXTENSION) || lastModifiedRemote <= 0);
- useExtension = XML_EXTENSION;
- remoteFile = xmlLocation;
- }
-
- if (!stale)
- return cacheFile;
-
- // The cache is stale or missing, so we need to update it from the remote location
- cacheFile = new File(getCacheDirectory(), prefix + hashCode + useExtension);
- updateCache(cacheFile, remoteFile, lastModifiedRemote, submonitor);
- return cacheFile;
- } finally {
- submonitor.done();
- }
- }
-
- /**
- * Deletes the local cache file(s) for the given repository
- * @param repositoryLocation
- */
- void deleteCache(URI repositoryLocation) {
- for (Iterator it = knownPrefixes.iterator(); it.hasNext();) {
- String prefix = (String) it.next();
- File[] cacheFiles = getCacheFiles(repositoryLocation, prefix);
- for (int i = 0; i < cacheFiles.length; i++) {
- // delete the cache file if it exists
- safeDelete(cacheFiles[i]);
- // delete a resumable download if it exists
- safeDelete(new File(new File(cacheFiles[i].getParentFile(), DOWNLOADING), cacheFiles[i].getName()));
- }
- }
- }
-
- /**
- * Determines the local file path of the repository's cache file.
- * @param repositoryLocation The location to compute the cache for
- * @param prefix The prefix to use for this location
- * @return A {@link File} pointing to the cache file or <code>null</code> if
- * the cache file does not exist.
- */
- private File getCache(URI repositoryLocation, String prefix) {
- File[] files = getCacheFiles(repositoryLocation, prefix);
- if (files[0].exists())
- return files[0];
- return files[1].exists() ? files[1] : null;
- }
-
- /**
- * Returns the file corresponding to the data area to be used by the cache manager.
- */
- private File getCacheDirectory() {
- AgentLocation agentLocation = (AgentLocation) ServiceHelper.getService(Activator.getContext(), AgentLocation.class.getName());
- URL dataArea = agentLocation.getDataArea(Activator.ID + "/cache/"); //$NON-NLS-1$
- return URLUtil.toFile(dataArea);
- }
-
- /**
- * Determines the local file paths of the repository's potential cache files.
- * @param repositoryLocation The location to compute the cache for
- * @param prefix The prefix to use for this location
- * @return A {@link File} array with the cache files for JAR and XML extensions.
- */
- private File[] getCacheFiles(URI repositoryLocation, String prefix) {
- File[] files = new File[2];
- File dataAreaFile = getCacheDirectory();
- int hashCode = computeHash(repositoryLocation);
- files[0] = new File(dataAreaFile, prefix + hashCode + JAR_EXTENSION);
- files[1] = new File(dataAreaFile, prefix + hashCode + XML_EXTENSION);
- return files;
- }
-
- private RepositoryTransport getTransport() {
- return RepositoryTransport.getInstance();
- }
-
- public boolean isResumeEnabled() {
- String resumeProp = System.getProperty(PROP_RESUMABLE, RESUME_DEFAULT);
- return Boolean.valueOf(resumeProp).booleanValue();
- }
-
- /**
- * Make cacheFile resumable and return true if it was possible.
- * @param cacheFile - the partially downloaded file to make resumeable
- * @param remoteFile The remote file being cached
- * @param status - the download status reported for the partial download
- * @return true if the file was made resumable, false otherwise
- */
- private boolean makeResumeable(File cacheFile, URI remoteFile, IStatus status) {
- if (status == null || status.isOK() || cacheFile == null || !(status instanceof DownloadStatus))
- return false;
- // check if resume feature is turned off
- if (!isResumeEnabled())
- return false;
- DownloadStatus downloadStatus = (DownloadStatus) status;
- long currentLength = cacheFile.length();
- // if cache file does not exist, or nothing was written to it, there is nothing to resume
- if (currentLength == 0L)
- return false;
-
- long reportedSize = downloadStatus.getFileSize();
- long reportedModified = downloadStatus.getLastModified();
-
- if (reportedSize == DownloadStatus.UNKNOWN_SIZE || reportedSize == 0L) {
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, NLS.bind("Download of {0} not resumable because filesize not reported.", remoteFile))); //$NON-NLS-1$
- return false;
- }
- if (reportedModified <= 0) {
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, NLS.bind("Download of {0} not resumable because last-modified not reported.", remoteFile))); //$NON-NLS-1$
- return false;
- }
-
- // if more than what was reported has been written something odd is going on, and we can't
- // trust the reported size.
- // There is a small chance that user canceled in the time window after the full download is seen, and the result is returned. In this
- // case the reported and current lengths will be equal.
- if (reportedSize < currentLength) {
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, NLS.bind("Download of {0} not resumable because more was read then reported size.", remoteFile))); //$NON-NLS-1$
- return false;
- }
- File resumeDir = new File(cacheFile.getParentFile(), DOWNLOADING);
- if (!resumeDir.mkdir()) {
- if (!(resumeDir.exists() && resumeDir.isDirectory())) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind("Could not create directory {0} for resumable download of {1}", resumeDir, remoteFile))); //$NON-NLS-1$
- return false;
- }
- }
- // move partial cache file to "downloading" directory
- File resumeFile = new File(resumeDir, cacheFile.getName());
- if (!cacheFile.renameTo(resumeFile)) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind("Could not move {0} to {1} for resumed download", cacheFile, resumeFile))); //$NON-NLS-1$
- return false;
- }
- // touch the file with remote modified time
- if (!resumeFile.setLastModified(reportedModified)) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind("Could not set last modified time on {0} for resumed download", resumeFile))); //$NON-NLS-1$
- return false;
- }
- return true;
- }
-
- /**
- * Adds a {@link SynchronousProvisioningListener} to the event bus for
- * deleting cache files when the corresponding repository is deleted.
- */
- public void registerRepoEventListener() {
- IProvisioningEventBus eventBus = (IProvisioningEventBus) ServiceHelper.getService(Activator.getContext(), IProvisioningEventBus.SERVICE_NAME);
- if (eventBus == null) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "ProvisioningEventBus could not be obtained. Metadata caches may not be cleaned up properly.")); //$NON-NLS-1$
- return;
- }
- if (busListener == null) {
- busListener = new SynchronousProvisioningListener() {
- public void notify(EventObject o) {
- if (o instanceof RepositoryEvent) {
- RepositoryEvent event = (RepositoryEvent) o;
- if (RepositoryEvent.REMOVED == event.getKind() && IRepository.TYPE_METADATA == event.getRepositoryType()) {
- deleteCache(event.getRepositoryLocation());
- }
- }
- }
- };
- }
- // the bus could have disappeared and is now back again - so do this every time
- eventBus.addListener(busListener);
- }
-
- private boolean safeDelete(File file) {
- if (file.exists()) {
- if (!file.delete()) {
- file.deleteOnExit();
- return true;
- }
- }
- return false;
- }
-
- /**
- * Removes the {@link SynchronousProvisioningListener} that cleans up the
- * cache file from the event bus.
- */
- public void unregisterRepoEventListener() {
- IProvisioningEventBus eventBus = (IProvisioningEventBus) ServiceHelper.getService(Activator.getContext(), IProvisioningEventBus.SERVICE_NAME);
- if (eventBus != null && busListener != null) {
- eventBus.removeListener(busListener);
- busListener = null;
- }
- }
-
- private void updateCache(File cacheFile, URI remoteFile, long lastModifiedRemote, SubMonitor submonitor) throws FileNotFoundException, IOException, ProvisionException {
- cacheFile.getParentFile().mkdirs();
- File resumeFile = new File(new File(cacheFile.getParentFile(), DOWNLOADING), cacheFile.getName());
- // if append should be performed or not
- boolean append = false;
- if (resumeFile.exists()) {
- // the resume file can be too old
- if (lastModifiedRemote != resumeFile.lastModified() || lastModifiedRemote <= 0)
- safeDelete(resumeFile);
- else {
- if (resumeFile.renameTo(cacheFile))
- append = true;
- else
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind("Could not move resumable file {0} into cache", resumeFile))); //$NON-NLS-1$
- }
- }
-
- StatefulStream metadata = new StatefulStream(new FileOutputStream(cacheFile, append));
- IStatus result = null;
- try {
- submonitor.setWorkRemaining(1000);
- // resume from cache file's length if in append mode
- result = getTransport().download(remoteFile, metadata, append ? cacheFile.length() : -1, submonitor.newChild(1000));
- } catch (OperationCanceledException e) {
- // need to pick up the status - a new operation canceled exception is thrown at the end
- // as status will be CANCEL.
- result = metadata.getStatus();
- } finally {
- metadata.close();
- // result is null if a runtime error (other than OperationCanceledException)
- // occurred, just delete the cache file (or a later attempt could fail
- // with "premature end of file").
- if (result == null)
- cacheFile.delete();
- }
- if (result.isOK())
- return;
-
- // if possible, keep a partial download to be resumed.
- if (!makeResumeable(cacheFile, remoteFile, result))
- cacheFile.delete();
-
- if (result.getSeverity() == IStatus.CANCEL || submonitor.isCanceled())
- throw new OperationCanceledException();
- throw new ProvisionException(result);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Credentials.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Credentials.java
deleted file mode 100644
index 0ff55aac9..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Credentials.java
+++ /dev/null
@@ -1,482 +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 API and implementation
- * Cloudsmith Inc - Implementation
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.repository;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URI;
-import java.net.URLEncoder;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ecf.filetransfer.UserCancelledException;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.repository.helpers.DebugHelper;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI.AuthenticationInfo;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.security.storage.*;
-
-/**
- * Credentials handles AuthenticationInfo that can be used to established an
- * ECF connection context. An AuthenticationInfo is obtained for a URI buy looking
- * in a store, if none is provided the user is optionally prompted for the information.
- */
-public class Credentials {
- public static class LoginCanceledException extends Exception {
- private static final long serialVersionUID = 1L;
-
- }
-
- /**
- * Cache of auth information that is not persisted, and modified auth info.
- */
- private static final Map savedAuthInfo = Collections.synchronizedMap(new HashMap());
-
- /**
- * Information about retry counts, and prompts canceled by user. The SoftReference is
- * a Map if not null. The keys are also used as serialization per host.
- */
- private static Map remembered;
-
- /**
- * Serializes pop up of login/password prompt
- */
- private static final Object promptLock = new Object();
-
- /**
- * Returns the AuthenticationInfo for the given URI. This may prompt the
- * user for user name and password as required.
- *
- * If the URI is opaque, the entire URI is used as the key. For non opaque URIs,
- * the key is based on the host name, using a host name of "localhost" if host name is
- * missing.
- *
- * @param location - the file location requiring login details
- * @param prompt - use <code>true</code> to prompt the user instead of
- * looking at the secure preference store for login, use <code>false</code>
- * to only try the secure preference store
- * @throws UserCancelledException when the user cancels the login prompt
- * @throws CoreException if the password cannot be read or saved
- * @return The authentication info.
- */
- public static AuthenticationInfo forLocation(URI location, boolean prompt) throws LoginCanceledException, CoreException {
- return forLocation(location, prompt, null);
- }
-
- /**
- * Returns the AuthenticationInfo for the given URI. This may prompt the
- * user for user name and password as required.
- *
- * If the URI is opaque, the entire URI is used as the key. For non opaque URIs,
- * the key is based on the host name, using a host name of "localhost" if host name is
- * missing.
- *
- * This method allows passing a previously used AuthenticationInfo. If set, the user interface
- * may present the information "on file" to the user for editing.
- *
- * @param location - the location for which to obtain authentication information
- * @param prompt - if true, user will be prompted for information
- * @param lastUsed - optional information used in an previous attempt to login
- * @return AuthenticationInfo, or null if there was no information available
- * @throws UserCancelledException - user canceled the prompt for name/password
- * @throws CoreException if there is an error
- */
- public static AuthenticationInfo forLocation(URI location, boolean prompt, AuthenticationInfo lastUsed) throws LoginCanceledException, CoreException {
- String host = uriToHost(location);
- String nodeKey;
- try {
- nodeKey = URLEncoder.encode(host, "UTF-8"); //$NON-NLS-1$
- } catch (UnsupportedEncodingException e2) {
- // fall back to default platform encoding
- try {
- // Uses getProperty "file.encoding" instead of using deprecated URLEncoder.encode(String location)
- // which does the same, but throws NPE on missing property.
- String enc = System.getProperty("file.encoding");//$NON-NLS-1$
- if (enc == null)
- throw new UnsupportedEncodingException("No UTF-8 encoding and missing system property: file.encoding"); //$NON-NLS-1$
- nodeKey = URLEncoder.encode(host, enc);
- } catch (UnsupportedEncodingException e) {
- throw RepositoryStatusHelper.internalError(e);
- }
- }
- if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
- DebugHelper.debug("Credentials", "forLocation:ENTER", // //$NON-NLS-1$ //$NON-NLS-2$
- new Object[] {"host", location, "prompt", Boolean.toString(prompt)}); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- // Must serialize getting stored permissions per host as the location may
- // be prompted right now
- // Start by getting a key to lock on
- HostEntry hostLock = null;
- synchronized (Credentials.class) {
- Map r = getRemembered();
- hostLock = (HostEntry) r.get(host);
- if (hostLock == null) {
- hostLock = new HostEntry(0);
- r.put(host, hostLock);
- }
- }
- AuthenticationInfo loginDetails = null;
- ISecurePreferences securePreferences = null;
- // synchronize getting secure store with prompting user, as it may prompt.
- synchronized (promptLock) {
- securePreferences = SecurePreferencesFactory.getDefault();
- }
-
- // serialize the prompting per host
- synchronized (hostLock) {
- try {
- if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
- DebugHelper.debug("Credentials", "forLocation:HOSTLOCK OBTAINED", // //$NON-NLS-1$ //$NON-NLS-2$
- new Object[] {"host", location, "prompt", Boolean.toString(prompt)}); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- String nodeName = IRepository.PREFERENCE_NODE + '/' + nodeKey;
- ISecurePreferences prefNode = null;
- try {
- if (securePreferences.nodeExists(nodeName))
- prefNode = securePreferences.node(nodeName);
- } catch (IllegalArgumentException e) {
- // if the node name is illegal/malformed (should not happen).
- throw RepositoryStatusHelper.internalError(e);
- } catch (IllegalStateException e) {
- // thrown if preference store has been tampered with
- throw RepositoryStatusHelper.internalError(e);
- }
- if (!prompt) {
- try {
- if (prefNode != null) {
- String username = prefNode.get(IRepository.PROP_USERNAME, null);
- String password = prefNode.get(IRepository.PROP_PASSWORD, null);
- if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
- if (username != null && password != null) {
- DebugHelper.debug("Credentials", "forLocation:PREFNODE FOUND - USING STORED INFO", // //$NON-NLS-1$ //$NON-NLS-2$
- new Object[] {"host", location, "prompt", Boolean.toString(prompt)}); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- // if we don't have stored connection data just return a null auth info
- if (username != null && password != null)
- return new IServiceUI.AuthenticationInfo(username, password, true);
- }
- if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
- DebugHelper.debug("Credentials", "forLocation:PREFNODE NOT FOUND - RETURN FROM MEMORY", // //$NON-NLS-1$ //$NON-NLS-2$
- new Object[] {"host", location, "prompt", Boolean.toString(prompt)}); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return restoreFromMemory(nodeName);
- } catch (StorageException e) {
- throw RepositoryStatusHelper.internalError(e);
- }
- }
- // need to prompt user for user name and password
- // first check (throw exception) if having a remembered cancel
- checkRememberedCancel(host);
-
- // check if another thread has modified the credentials since last attempt
- // made by current thread - if so, try with latest without prompting
- if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
- AuthenticationInfo latest = restoreFromMemory(nodeName);
- boolean useLatest = false;
- if (latest != null && lastUsed != null)
- if (!(latest.getUserName().equals(lastUsed.getUserName()) && latest.getPassword().equals(lastUsed.getPassword())))
- useLatest = true;
- if (useLatest)
- DebugHelper.debug("Credentials", "forLocation:LATER INFO AVAILABLE - RETURNING IT", // //$NON-NLS-1$ //$NON-NLS-2$
- new Object[] {"host", location, "prompt", Boolean.toString(prompt)}); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- AuthenticationInfo latest = restoreFromMemory(nodeName);
- if (latest != null && lastUsed != null)
- if (!(latest.getUserName().equals(lastUsed.getUserName()) && latest.getPassword().equals(lastUsed.getPassword())))
- return latest;
-
- // check if number of prompts have been exceeded for the host - if so
- // do a synthetic Login canceled by user
- // (The alternative is to return "latest" until retry login gives up with
- // authentication failed - but that would waste time).
- if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
- if (getPromptCount(host) >= RepositoryPreferences.getLoginRetryCount()) {
- if (lastUsed == null && latest == null)
- DebugHelper.debug("Credentials", "forLocation:NO INFO - SYNTHETIC CANCEL", // //$NON-NLS-1$ //$NON-NLS-2$
- new Object[] {"host", location}); //$NON-NLS-1$
- return latest == null ? lastUsed : latest; // keep client failing on the latest known
- }
- DebugHelper.debug("Credentials", "forLocation:LATER INFO AVAILABLE - RETURNING IT", // //$NON-NLS-1$ //$NON-NLS-2$
- new Object[] {"host", location, "prompt", Boolean.toString(prompt)}); //$NON-NLS-1$ //$NON-NLS-2$
-
- }
- if (getPromptCount(host) >= RepositoryPreferences.getLoginRetryCount()) {
- if (lastUsed == null && latest == null)
- throw new LoginCanceledException();
- return latest == null ? lastUsed : latest; // keep client failing on the latest known
- }
- IServiceUI adminUIService = (IServiceUI) ServiceHelper.getService(Activator.getContext(), IServiceUI.class.getName());
- if (adminUIService != null)
- synchronized (promptLock) {
- try {
- if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
- DebugHelper.debug("Credentials", "forLocation:PROMPTLOCK OBTAINED", // //$NON-NLS-1$ //$NON-NLS-2$
- new Object[] {"host", location}); //$NON-NLS-1$
- }
-
- // serialize the popping of the dialog itself
- loginDetails = lastUsed != null ? adminUIService.getUsernamePassword(host, lastUsed) : adminUIService.getUsernamePassword(host);
- //null result means user canceled password dialog
- if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
- if (loginDetails == null)
- DebugHelper.debug("Credentials", "forLocation:PROMPTED - USER CANCELED (PROMPT LOCK RELEASED)", // //$NON-NLS-1$ //$NON-NLS-2$
- new Object[] {"host", location}); //$NON-NLS-1$
- }
- if (loginDetails == null) {
- rememberCancel(host);
- throw new LoginCanceledException();
- }
- //save user name and password if requested by user
- if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
- if (loginDetails.saveResult())
- DebugHelper.debug("Credentials", "forLocation:SAVING RESULT", // //$NON-NLS-1$ //$NON-NLS-2$
- new Object[] {"host", location}); //$NON-NLS-1$
- }
-
- if (loginDetails.saveResult()) {
- if (prefNode == null)
- prefNode = securePreferences.node(nodeName);
- try {
- prefNode.put(IRepository.PROP_USERNAME, loginDetails.getUserName(), true);
- prefNode.put(IRepository.PROP_PASSWORD, loginDetails.getPassword(), true);
- prefNode.flush();
- } catch (StorageException e1) {
- throw RepositoryStatusHelper.internalError(e1);
- } catch (IOException e) {
- throw RepositoryStatusHelper.internalError(e);
- }
- } else {
- // if persisted earlier - the preference should be removed
- if (securePreferences.nodeExists(nodeName)) {
- if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
- DebugHelper.debug("Credentials", "forLocation:REMOVING PREVIOUSLY SAVED INFO", // //$NON-NLS-1$ //$NON-NLS-2$
- new Object[] {"host", location}); //$NON-NLS-1$
- }
-
- prefNode = securePreferences.node(nodeName);
- prefNode.removeNode();
- try {
- prefNode.flush();
- } catch (IOException e) {
- throw RepositoryStatusHelper.internalError(e);
- }
- }
- }
- saveInMemory(nodeName, loginDetails);
- } finally {
- if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
- DebugHelper.debug("Credentials", "forLocation:PROMPTLOCK RELEASED", // //$NON-NLS-1$ //$NON-NLS-2$
- new Object[] {"host", location}); //$NON-NLS-1$
- }
- }
- }
- incrementPromptCount(host);
- } finally {
- if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
- DebugHelper.debug("Credentials", "forLocation:HOSTLOCK RELEASED", // //$NON-NLS-1$ //$NON-NLS-2$
- new Object[] {"host", location}); //$NON-NLS-1$
- }
- }
-
- }
-
- return loginDetails;
- }
-
- private static String uriToHost(URI location) {
- // if URI is not opaque, just getting the host may be enough
- String host = location.getHost();
- if (host == null) {
- String scheme = location.getScheme();
- if (URIUtil.isFileURI(location) || scheme == null)
- // If the URI references a file, a password could possibly be needed for the directory
- // (it could be a protected zip file representing a compressed directory) - in this
- // case the key is the path without the last segment.
- // Using "Path" this way may result in an empty string - which later will result in
- // an invalid key.
- host = new Path(location.toString()).removeLastSegments(1).toString();
- else
- // it is an opaque URI - details are unknown - can only use entire string.
- host = location.toString();
- }
- return host;
- }
-
- /**
- * Returns authentication details stored in memory for the given node name,
- * or <code>null</code> if no information is stored.
- */
- private static AuthenticationInfo restoreFromMemory(String nodeName) {
- return (AuthenticationInfo) savedAuthInfo.get(nodeName);
- }
-
- /**
- * Saves authentication details in memory so user is only prompted once per (SDK) session
- */
- private static void saveInMemory(String nodeName, AuthenticationInfo loginDetails) {
- savedAuthInfo.put(nodeName, loginDetails);
- }
-
- /**
- * Remember the fact that the host was canceled.
- * @param host
- */
- private static void rememberCancel(String host) {
- Map r = getRemembered();
- if (r != null)
- r.put(host, new HostEntry(-1));
- }
-
- /**
- * Throws LoginCancledException if the host was previously canceled, and the information
- * is not stale.
- * @param host
- * @throws LoginCanceledException
- */
- private static void checkRememberedCancel(String host) throws LoginCanceledException {
- Map r = getRemembered();
- if (r != null) {
- Object x = r.get(host);
- if (x != null && x instanceof HostEntry)
- if (((HostEntry) x).isCanceled()) {
- if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
- DebugHelper.debug("Credentials", "checkRememberCancel:PREVIOUSLY CANCELED", // //$NON-NLS-1$ //$NON-NLS-2$
- new Object[] {"host", host}); //$NON-NLS-1$
- }
-
- throw new LoginCanceledException();
- }
- }
-
- }
-
- /**
- * Increments the prompt count for host. If information is stale, the count is restarted
- * at 1.
- * @param host
- */
- private static void incrementPromptCount(String host) {
- Map r = getRemembered();
- if (r != null) {
- HostEntry value = (HostEntry) r.get(host);
- if (value == null)
- r.put(host, value = new HostEntry(1));
- else {
- if (value.isStale())
- value.reset();
- value.increment();
- }
- }
- }
-
- /**
- * Returns prompt count for host, except if information is stale in which case 0 is returned.
- * @param host
- * @return number of time prompt has been performed for a host (or 0 if information is stale)
- */
- private static int getPromptCount(String host) {
- Map r = getRemembered();
- if (r != null) {
- HostEntry value = (HostEntry) r.get(host);
- if (value != null && !value.isStale())
- return value.getCount();
- }
- return 0;
-
- }
-
- /**
- * Clears the cached information about prompts for all login/password and
- * canceled logins.
- */
- public static synchronized void clearPromptCache() {
- if (remembered == null)
- return;
- Map r = remembered;
- if (r == null || r.isEmpty())
- return;
- // reset entries rather than creating a new empty map since the entries
- // are also used as locks
- Iterator itor = r.entrySet().iterator();
- while (itor.hasNext())
- ((HostEntry) itor.next()).reset();
- }
-
- /**
- * Clears the cached information for location about prompts for login/password and
- * canceled logins.
- * @param location the repository location
- */
- public static synchronized void clearPromptCache(URI location) {
- clearPromptCache(uriToHost(location));
- }
-
- /**
- * Clears the cached information for host about prompts for login/password and
- * canceled logins.
- * @param host a host as returned from uriToHost for a location
- */
- public static synchronized void clearPromptCache(String host) {
- if (remembered == null)
- return;
- Map r = remembered;
- if (r == null)
- return;
- HostEntry value = (HostEntry) r.get(host);
- if (value != null)
- value.reset();
- }
-
- private static synchronized Map getRemembered() {
- if (remembered == null)
- remembered = Collections.synchronizedMap(new HashMap());
- return remembered;
- }
-
- private static class HostEntry {
- long timestamp;
- int count;
-
- public HostEntry(int count) {
- this.count = count;
- this.timestamp = System.currentTimeMillis();
- }
-
- public boolean isCanceled() {
- return count == -1 && !isStale();
- }
-
- public boolean isStale() {
- // a record is stale if older than 3 minutes
- return System.currentTimeMillis() - timestamp > 1000 * 60 * 3;
- }
-
- public int getCount() {
- return count;
- }
-
- public void increment() {
- if (count != -1)
- count++;
- }
-
- public void reset() {
- count = 0;
- timestamp = System.currentTimeMillis();
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/DownloadStatus.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/DownloadStatus.java
deleted file mode 100644
index de0597da7..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/DownloadStatus.java
+++ /dev/null
@@ -1,77 +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.repository;
-
-import org.eclipse.core.runtime.Status;
-
-/**
- * A status object that optionally reports additional information about the
- * result of a download.
- */
-public class DownloadStatus extends Status {
- public static final long UNKNOWN_RATE = -1;
- public static final long UNKNOWN_SIZE = -1;
-
- private long speed = UNKNOWN_RATE;
- private long fileSize = UNKNOWN_SIZE;
- private long lastModified = 0;
-
- /**
- * Constructs a new DownloadStatus with the given attributes.
- */
- public DownloadStatus(int severity, String pluginId, String message) {
- super(severity, pluginId, message);
- }
-
- /**
- * Constructs a new DownloadStatus with the given attributes.
- */
- public DownloadStatus(int severity, String pluginId, String message, Throwable exception) {
- super(severity, pluginId, message, exception);
- }
-
- public DownloadStatus(int severity, String pluginId, int code, String message, Throwable exception) {
- super(severity, pluginId, code, message, exception);
- }
-
- /**
- * Returns the download rate in bytes per second. If the rate is unknown,
- * @{link {@link #UNKNOWN_RATE}} is returned.
- * @return the download rate in bytes per second
- */
- public long getTransferRate() {
- return speed;
- }
-
- /**
- * Sets the download rate of the transfer in bytes per second.
- * @param rate The download rate in bytes per second
- */
- public void setTransferRate(long rate) {
- this.speed = rate;
- }
-
- public void setFileSize(long aFileSize) {
- fileSize = aFileSize;
- }
-
- public long getFileSize() {
- return fileSize;
- }
-
- public void setLastModified(long timestamp) {
- lastModified = timestamp;
- }
-
- public long getLastModified() {
- return lastModified;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/FileInfo.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/FileInfo.java
deleted file mode 100644
index b4af75e37..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/FileInfo.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc.
- * 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 or
- * such license is available at www.eclipse.org.
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.repository;
-
-import java.util.Properties;
-
-/**
- * Carries information about a file transfer.
- *
- */
-public class FileInfo {
- public static final String PROPERTY_CONTENT_TYPE = "contentType"; //$NON-NLS-1$
-
- public static final String PROPERTY_LAST_MODIFIED = "lastModified"; //$NON-NLS-1$
-
- public static final String PROPERTY_NAME = "name"; //$NON-NLS-1$
-
- public static final String PROPERTY_SIZE = "size"; //$NON-NLS-1$
-
- public static final String PROPERTY_SPEED = "speed"; //$NON-NLS-1$
-
- public static final long UNKNOWN_RATE = -1L;
-
- private String contentType;
-
- private long lastModified = 0L;
-
- private String name;
-
- private long size = -1L;
-
- private long averageSpeed = UNKNOWN_RATE;
-
- public FileInfo() {
- contentType = ""; //$NON-NLS-1$
- name = ""; //$NON-NLS-1$
- }
-
- public FileInfo(FileInfo fileInfo) {
- initFrom(fileInfo);
- }
-
- /*
- * (non java doc)
- * properties based method for possible use with resumable download
- */
- public FileInfo(Properties properties) {
- name = properties.getProperty(PROPERTY_NAME);
- contentType = properties.getProperty(PROPERTY_CONTENT_TYPE);
-
- String v = properties.getProperty(PROPERTY_LAST_MODIFIED);
- if (v != null)
- lastModified = Long.parseLong(v);
-
- v = properties.getProperty(PROPERTY_SIZE);
- if (v != null)
- size = Long.parseLong(v);
- v = properties.getProperty(PROPERTY_SPEED);
- if (v != null)
- averageSpeed = Long.parseLong(v);
- }
-
- /*
- * (non java doc)
- * properties based method for possible use with resumable download
- */
- public void addProperties(Properties properties) {
- if (contentType != null)
- properties.setProperty(PROPERTY_CONTENT_TYPE, contentType);
- if (lastModified != 0L)
- properties.setProperty(PROPERTY_LAST_MODIFIED, Long.toString(lastModified));
- if (name != null)
- properties.setProperty(PROPERTY_NAME, name);
- if (size != -1L)
- properties.setProperty(PROPERTY_SIZE, Long.toString(size));
- if (averageSpeed != UNKNOWN_RATE)
- properties.setProperty(PROPERTY_SPEED, Long.toString(averageSpeed));
-
- }
-
- public final String getContentType() {
- return contentType;
- }
-
- public long getLastModified() {
- return lastModified;
- }
-
- public final String getRemoteName() {
- return name;
- }
-
- public final long getSize() {
- return size;
- }
-
- public void initFrom(FileInfo info) {
- setName(info.getRemoteName());
- setContentType(info.getContentType());
- setSize(info.getSize());
- setLastModified(info.getLastModified());
- }
-
- public void reset() {
- name = null;
- contentType = null;
- size = -1;
- lastModified = 0;
- }
-
- public final void setContentType(String contentType) {
- this.contentType = contentType;
- }
-
- public void setLastModified(long timestamp) {
- lastModified = timestamp;
- }
-
- public final void setName(String name) {
- this.name = name;
- }
-
- public final void setSize(long size) {
- this.size = size;
- }
-
- /**
- * Set the average transfer rate measured in bytes/second
- * @param averageSpeed rate in bytes/second, or {@link #UNKNOWN_RATE}
- */
- public void setAverageSpeed(long averageSpeed) {
- this.averageSpeed = averageSpeed;
- }
-
- /**
- * Returns the average transfer rate measured in bytes/second.
- * @return transfer rate in bytes/second or {@link #UNKNOWN_RATE}
- */
- public long getAverageSpeed() {
- return averageSpeed;
- }
-}
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 753110431..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/FileReader.java
+++ /dev/null
@@ -1,496 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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
- ******************************************************************************/
-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 {
- 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/JREHttpClientRequiredException.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/JREHttpClientRequiredException.java
deleted file mode 100644
index b6474e307..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/JREHttpClientRequiredException.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc.
- * 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.
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.repository;
-
-import java.net.ProtocolException;
-
-/**
- * Exception signaling that the JRE Http Client is required to handle the request.
- */
-public class JREHttpClientRequiredException extends ProtocolException {
-
- private static final long serialVersionUID = 1550518207489119010L;
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java
deleted file mode 100644
index 2ed09a9d3..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java
+++ /dev/null
@@ -1,86 +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 messages
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.repository;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.repository.messages"; //$NON-NLS-1$
-
- public static String artifact_not_found;
- public static String io_failedRead;
- public static String ecf_configuration_error;
- public static String repoMan_internalError;
- public static String repo_loading;
-
- public static String exception_malformedRepoURI;
- public static String TransportErrorTranslator_400;
- public static String TransportErrorTranslator_401;
- public static String TransportErrorTranslator_402;
- public static String TransportErrorTranslator_403;
- public static String TransportErrorTranslator_404;
- public static String TransportErrorTranslator_405;
- public static String TransportErrorTranslator_406;
- public static String TransportErrorTranslator_407;
- public static String TransportErrorTranslator_408;
- public static String TransportErrorTranslator_409;
- public static String TransportErrorTranslator_410;
- public static String TransportErrorTranslator_411;
- public static String TransportErrorTranslator_412;
- public static String TransportErrorTranslator_413;
- public static String TransportErrorTranslator_414;
- public static String TransportErrorTranslator_415;
- public static String TransportErrorTranslator_416;
- public static String TransportErrorTranslator_417;
- public static String TransportErrorTranslator_418;
- public static String TransportErrorTranslator_422;
- public static String TransportErrorTranslator_423;
- public static String TransportErrorTranslator_424;
- public static String TransportErrorTranslator_425;
- public static String TransportErrorTranslator_426;
- public static String TransportErrorTranslator_449;
- public static String TransportErrorTranslator_450;
- public static String TransportErrorTranslator_500;
- public static String TransportErrorTranslator_501;
- public static String TransportErrorTranslator_502;
- public static String TransportErrorTranslator_503;
- public static String TransportErrorTranslator_504;
- public static String TransportErrorTranslator_505;
- public static String TransportErrorTranslator_506;
- public static String TransportErrorTranslator_507;
- public static String TransportErrorTranslator_508;
- public static String TransportErrorTranslator_510;
- public static String TransportErrorTranslator_MalformedRemoteFileReference;
- public static String TransportErrorTranslator_UnableToConnectToRepository_0;
-
- public static String TransportErrorTranslator_UnknownErrorCode;
- public static String TransportErrorTranslator_UnknownHost;
-
- public static String fetching_0_from_1_2_at_3;
- public static String fetching_0_from_1_2_of_3_at_4;
- public static String connection_to_0_failed_on_1_retry_attempt_2;
-
- public static String FileTransport_reader;
- public static String FileTransport_cancelCheck;
-
- public static String UnableToRead_0_TooManyAttempts;
- public static String UnableToRead_0_UserCanceled;
- static {
- // initialize resource bundles
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- // Do not instantiate
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java
deleted file mode 100644
index ec9d2985a..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006-2009, Cloudsmith Inc.
- * 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 or
- * such license is available at www.eclipse.org.
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.repository;
-
-import java.net.URI;
-import java.text.NumberFormat;
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Converts progress of file download to average download speed and keeps track of
- * when it is suitable to update a progress monitor. A suitably scaled and formatted string for use
- * in progress monitoring is provided.
- */
-public class ProgressStatistics {
- private static final int DEFAULT_REPORT_INTERVAL = 1000;
-
- private static final int SPEED_INTERVAL = 5000;
-
- private static final int SPEED_RESOLUTION = 1000;
-
- private static String convert(long amount) {
- NumberFormat fmt = NumberFormat.getInstance();
- if (amount < 1024)
- return fmt.format(amount) + "B"; //$NON-NLS-1$
-
- fmt.setMaximumFractionDigits(2);
- if (amount < 1024 * 1024)
- return fmt.format(((double) amount) / 1024) + "kB"; //$NON-NLS-1$
-
- return fmt.format(((double) amount) / (1024 * 1024)) + "MB"; //$NON-NLS-1$
- }
-
- private final String m_fileName;
-
- private final long m_total;
-
- private final long m_startTime;
-
- private long m_current;
-
- private long m_lastReportTime;
-
- private int m_reportInterval;
-
- private SortedMap m_recentSpeedMap;
-
- private long m_recentSpeedMapKey;
-
- private URI m_uri;
-
- public ProgressStatistics(URI uri, String fileName, long total) {
- m_startTime = System.currentTimeMillis();
- m_fileName = fileName;
-
- m_total = total;
-
- m_current = 0;
- m_lastReportTime = 0;
- m_reportInterval = DEFAULT_REPORT_INTERVAL;
- m_recentSpeedMap = new TreeMap();
- m_recentSpeedMapKey = 0L;
- m_uri = uri;
- }
-
- public long getAverageSpeed() {
- long dur = getDuration();
-
- if (dur >= 1000)
- return m_current / (dur / 1000);
-
- return 0L;
- }
-
- public long getDuration() {
- return System.currentTimeMillis() - m_startTime;
- }
-
- public double getPercentage() {
- if (m_total > 0)
- return ((double) m_current) / ((double) m_total);
-
- return 0.0;
- }
-
- synchronized public long getRecentSpeed() {
- removeObsoleteRecentSpeedData(getDuration() / SPEED_RESOLUTION);
- long dur = 0L;
- long amount = 0L;
- SortedMap relevantData = m_recentSpeedMap.headMap(new Long(m_recentSpeedMapKey));
-
- Iterator itor = relevantData.entrySet().iterator();
- while (itor.hasNext()) {
- Entry entry = (Entry) itor.next();
- dur += SPEED_RESOLUTION;
- amount += ((Long) entry.getValue()).longValue();
- }
-
- if (dur >= 1000)
- return amount / (dur / 1000);
-
- return 0L;
- }
-
- public int getReportInterval() {
- return m_reportInterval;
- }
-
- public long getTotal() {
- return m_total;
- }
-
- public void increase(long inc) {
- registerRecentSpeed(getDuration() / SPEED_RESOLUTION, inc);
- m_current += inc;
- }
-
- public synchronized String report() {
- return m_total != -1 ? NLS.bind(Messages.fetching_0_from_1_2_of_3_at_4, new String[] {m_fileName, m_uri.toString(), convert(m_current), convert(m_total), convert(getRecentSpeed())}) : NLS.bind(Messages.fetching_0_from_1_2_at_3, new String[] {m_fileName, m_uri.toString(), convert(m_current), convert(getRecentSpeed())});
- }
-
- public void setReportInterval(int reportInterval) {
- m_reportInterval = reportInterval;
- }
-
- public boolean shouldReport() {
- long currentTime = System.currentTimeMillis();
- if (m_lastReportTime == 0 || currentTime - m_lastReportTime >= m_reportInterval) {
- m_lastReportTime = currentTime;
- return true;
- }
- return false;
- }
-
- public String toString() {
- return report();
- }
-
- synchronized private void registerRecentSpeed(long key, long inc) {
- Long keyL = new Long(key);
- Long currentValueL = (Long) m_recentSpeedMap.get(keyL);
- long currentValue = 0L;
- if (currentValueL != null)
- currentValue = currentValueL.longValue();
-
- m_recentSpeedMap.put(keyL, new Long(inc + currentValue));
-
- if (m_recentSpeedMapKey != key) {
- m_recentSpeedMapKey = key;
- removeObsoleteRecentSpeedData(key);
- }
- }
-
- synchronized private void removeObsoleteRecentSpeedData(long lastKey) {
- long threshold = lastKey - SPEED_INTERVAL / SPEED_RESOLUTION;
- m_recentSpeedMap.headMap(new Long(threshold)).clear();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryPreferences.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryPreferences.java
deleted file mode 100644
index a126e80b6..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryPreferences.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006-2009, Cloudsmith Inc.
- * 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 or
- * such license is available at www.eclipse.org.
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.repository;
-
-/**
- * Holds various preferences for repository.
- * TODO: if values should be configurable, they need to be persisted and read back.
- *
- */
-public class RepositoryPreferences {
-
- /**
- * Number of attempts to connect (with same credentials) before giving up.
- * Note that newer ECF using apache HTTPclient has retry by default.
- * TODO - make this configurable via a property.
- * TODO - consider removing this option
- * @return the value 1
- */
- public static int getConnectionRetryCount() {
- return 1;
- }
-
- /**
- * Reconnect delay after failure to connect (with same credentials)- in milliseconds.
- * Current implementation returns 200ms.
- * TODO - make this configurable via a property
- * @return the value 200
- */
- public static long getConnectionMsRetryDelay() {
- return 200;
- }
-
- /**
- * Number of attempts to connect (with different credentials) before giving up.
- * The returned value should be the number of prompts to the user + 1 (for the initial
- * attempt with either no, or stored/cached credentials).
- * TODO - make this configurable via a property.
- * @return the value 4 - resulting in 3 prompts to user
- */
- public static int getLoginRetryCount() {
- return 4;
- }
-}
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 67fbb9cd0..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatus.java
+++ /dev/null
@@ -1,153 +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 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.equinox.internal.provisional.p2.core.ProvisionException;
-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 601a2da4d..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatusHelper.java
+++ /dev/null
@@ -1,322 +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 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.equinox.internal.provisional.p2.core.ProvisionException;
-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 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/RepositoryTracing.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTracing.java
deleted file mode 100644
index 203a75aed..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTracing.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006-2009, Cloudsmith Inc.
- * 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 or
- * such license is available at www.eclipse.org.
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.repository;
-
-/**
- * TODO: Placeholder class - should have link to p2 tracing for repository debug
- *
- */
-public class RepositoryTracing {
-
- public static void debug(String string, Object arg) {
- // TODO Fix logging if debug is turned on
- // NLS.bind(string, new Object[] {arg});
- }
-
-}
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 02d7027b3..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTransport.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006-2009, 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.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI.AuthenticationInfo;
-import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
-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.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.repository/src/org/eclipse/equinox/internal/p2/repository/Transport.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Transport.java
deleted file mode 100644
index 6eba11a7e..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Transport.java
+++ /dev/null
@@ -1,27 +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.repository;
-
-import java.io.OutputStream;
-import java.net.URI;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-
-public abstract class Transport {
-
- /**
- * @param toDownload
- * @param target
- * @param pm
- * @return IStatus describing outcome of the download
- */
- public abstract IStatus download(URI toDownload, OutputStream target, IProgressMonitor pm);
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java
deleted file mode 100644
index 8670f223e..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java
+++ /dev/null
@@ -1,1029 +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.repository.helpers;
-
-import java.lang.ref.SoftReference;
-import java.net.*;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.preferences.IPreferencesService;
-import org.eclipse.equinox.internal.p2.core.Activator;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-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.repository.*;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * Common code shared between artifact and metadata repository managers.
- */
-public abstract class AbstractRepositoryManager implements IRepositoryManager, ProvisioningListener {
- protected static class RepositoryInfo {
- public String description;
- public boolean isEnabled = true;
- public boolean isSystem = false;
- public URI location;
- public String name;
- public String nickname;
- public SoftReference repository;
- public String suffix;
-
- public RepositoryInfo() {
- super();
- }
- }
-
- public static final String ATTR_SUFFIX = "suffix"; //$NON-NLS-1$
- public static final String EL_FACTORY = "factory"; //$NON-NLS-1$
- public static final String EL_FILTER = "filter"; //$NON-NLS-1$
- public static final String KEY_DESCRIPTION = "description"; //$NON-NLS-1$
- public static final String KEY_ENABLED = "enabled"; //$NON-NLS-1$
- public static final String KEY_NAME = "name"; //$NON-NLS-1$
- public static final String KEY_NICKNAME = "nickname"; //$NON-NLS-1$
- public static final String KEY_PROVIDER = "provider"; //$NON-NLS-1$
- public static final String KEY_SUFFIX = "suffix"; //$NON-NLS-1$
- public static final String KEY_SYSTEM = "isSystem"; //$NON-NLS-1$
- public static final String KEY_TYPE = "type"; //$NON-NLS-1$
- public static final String KEY_URI = "uri"; //$NON-NLS-1$
- public static final String KEY_URL = "url"; //$NON-NLS-1$
- public static final String KEY_VERSION = "version"; //$NON-NLS-1$
-
- public static final String NODE_REPOSITORIES = "repositories"; //$NON-NLS-1$
-
- /**
- * Map of String->RepositoryInfo, where String is the repository key
- * obtained via getKey(URI).
- */
- protected Map repositories = null;
-
- //lock object to be held when referring to the repositories field
- protected final Object repositoryLock = new Object();
-
- /**
- * Cache List of repositories that are not reachable. Maintain cache
- * for short duration because repository may become available at any time.
- */
- protected SoftReference unavailableRepositories;
-
- /**
- * Set used to manage exclusive load locks on repository locations.
- */
- private Map loadLocks = new HashMap();
- protected IProvisioningEventBus eventBus;
-
- protected AbstractRepositoryManager() {
- super();
- }
-
- /**
- * Adds a repository to the list of known repositories
- * @param repository the repository object to add
- * @param signalAdd whether a repository change event should be fired
- * @param suffix the suffix used to load the repository, or <code>null</code> if unknown
- */
- protected void addRepository(IRepository repository, boolean signalAdd, String suffix) {
- boolean added = false;
- synchronized (repositoryLock) {
- if (repositories == null)
- restoreRepositories();
- String key = getKey(repository.getLocation());
- RepositoryInfo info = (RepositoryInfo) repositories.get(key);
- if (info == null) {
- info = new RepositoryInfo();
- added = true;
- repositories.put(key, info);
- }
- info.repository = new SoftReference(repository);
- info.name = repository.getName();
- info.description = repository.getDescription();
- info.location = repository.getLocation();
- String value = (String) repository.getProperties().get(IRepository.PROP_SYSTEM);
- if (value != null)
- info.isSystem = Boolean.valueOf(value).booleanValue();
- info.suffix = suffix;
- }
- // save the given repository in the preferences.
- remember(repository, suffix);
- if (added && signalAdd)
- broadcastChangeEvent(repository.getLocation(), IRepository.TYPE_METADATA, RepositoryEvent.ADDED, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.core.repository.IRepositoryManager#addRepository(java.net.URI)
- */
- public void addRepository(URI location) {
- checkValidLocation(location);
- //add the repository, or enable it if already known
- if (!addRepository(location, true, true))
- setEnabled(location, true);
- }
-
- /**
- * Adds the repository to the list of known repositories.
- * @param location The repository location
- * @param isEnabled Whether the repository should be enabled
- * @param signalAdd Whether a repository add event should be broadcast
- * @return <code>true</code> if the repository was actually added, and
- * <code>false</code> otherwise.
- */
- private boolean addRepository(URI location, boolean isEnabled, boolean signalAdd) {
- RepositoryInfo info = new RepositoryInfo();
- info.location = location;
- info.isEnabled = isEnabled;
- boolean added = true;
- synchronized (repositoryLock) {
- if (repositories == null)
- restoreRepositories();
- if (contains(location))
- return false;
- added = repositories.put(getKey(location), info) == null;
- // save the given repository in the preferences.
- remember(info, true);
- }
- if (added && signalAdd)
- broadcastChangeEvent(location, getRepositoryType(), RepositoryEvent.ADDED, isEnabled);
- return added;
- }
-
- protected IRepository basicGetRepository(URI location) {
- checkValidLocation(location);
- synchronized (repositoryLock) {
- if (repositories == null)
- restoreRepositories();
- RepositoryInfo info = (RepositoryInfo) repositories.get(getKey(location));
- if (info == null || info.repository == null)
- return null;
- IRepository repo = (IRepository) info.repository.get();
- //update our repository info because the repository may have changed
- if (repo != null)
- addRepository(repo, false, null);
- return repo;
- }
- }
-
- public IRepository basicRefreshRepository(URI location, IProgressMonitor monitor) throws ProvisionException {
- checkValidLocation(location);
- clearNotFound(location);
- boolean wasEnabled = isEnabled(location);
- String nick = getRepositoryProperty(location, IRepository.PROP_NICKNAME);
- //remove the repository so event is broadcast and repositories can clear their caches
- if (!removeRepository(location))
- fail(location, ProvisionException.REPOSITORY_NOT_FOUND);
- boolean loaded = false;
- try {
- IRepository result = loadRepository(location, monitor, null, 0);
- loaded = true;
- setEnabled(location, wasEnabled);
- return result;
- } finally {
- //if we failed to load, make sure the repository is not lost
- if (!loaded)
- addRepository(location, wasEnabled, true);
- if (nick != null)
- setRepositoryProperty(location, IRepository.PROP_NICKNAME, nick);
- }
- }
-
- private void broadcastChangeEvent(URI location, int repositoryType, int kind, boolean isEnabled) {
- if (eventBus != null)
- eventBus.publishEvent(new RepositoryEvent(location, repositoryType, kind, isEnabled));
- }
-
- /**
- * Check if we recently attempted to load the given location and failed
- * to find anything. Returns <code>true</code> if the repository was not
- * found, and <code>false</code> otherwise.
- */
- private boolean checkNotFound(URI location) {
- if (unavailableRepositories == null)
- return false;
- List badRepos = (List) unavailableRepositories.get();
- if (badRepos == null)
- return false;
- return badRepos.contains(location);
- }
-
- /**
- * Clear the fact that we tried to load a repository at this location and did not find anything.
- */
- private void clearNotFound(URI location) {
- List badRepos;
- if (unavailableRepositories != null) {
- badRepos = (List) unavailableRepositories.get();
- if (badRepos != null) {
- badRepos.remove(location);
- return;
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.core.repository.IRepositoryManager#contains(java.net.URI)
- */
- public boolean contains(URI location) {
- checkValidLocation(location);
- synchronized (repositoryLock) {
- if (repositories == null)
- restoreRepositories();
- return repositories.containsKey(getKey(location));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager#createRepository(java.net.URL, java.lang.String, java.lang.String, java.util.Map)
- */
- protected IRepository doCreateRepository(URI location, String name, String type, Map properties) throws ProvisionException {
- checkValidLocation(location);
- Assert.isNotNull(name);
- Assert.isNotNull(type);
- IRepository result = null;
- try {
- enterLoad(location, new NullProgressMonitor());
- boolean loaded = false;
- try {
- //repository should not already exist
- loadRepository(location, (IProgressMonitor) null, type, 0);
- loaded = true;
- } catch (ProvisionException e) {
- //expected - fall through and create the new repository
- }
- if (loaded)
- fail(location, ProvisionException.REPOSITORY_EXISTS);
-
- IExtension extension = RegistryFactory.getRegistry().getExtension(getRepositoryProviderExtensionPointId(), type);
- if (extension == null)
- fail(location, ProvisionException.REPOSITORY_UNKNOWN_TYPE);
- // MetadataRepositoryFactory factory = (MetadataRepositoryFactory) createExecutableExtension(extension, EL_FACTORY);
- // if (factory == null)
- // fail(location, ProvisionException.REPOSITORY_FAILED_READ);
- result = factoryCreate(location, name, type, properties, extension);
- if (result == null)
- fail(location, ProvisionException.REPOSITORY_FAILED_READ);
- clearNotFound(location);
- addRepository(result, false, null);
- } finally {
- exitLoad(location);
- }
- //fire event after releasing load lock
- broadcastChangeEvent(location, getRepositoryType(), RepositoryEvent.ADDED, true);
- return result;
- }
-
- /**
- * Returns the executable extension, or <code>null</code> if there
- * was no corresponding extension, or an error occurred loading it
- */
- protected Object createExecutableExtension(IExtension extension, String element) {
- IConfigurationElement[] elements = extension.getConfigurationElements();
- CoreException failure = null;
- for (int i = 0; i < elements.length; i++) {
- if (elements[i].getName().equals(element)) {
- try {
- return elements[i].createExecutableExtension("class"); //$NON-NLS-1$
- } catch (CoreException e) {
- log("Error loading repository extension: " + extension.getUniqueIdentifier(), failure); //$NON-NLS-1$
- return null;
- }
- }
- }
- log("Malformed repository extension: " + extension.getUniqueIdentifier(), null); //$NON-NLS-1$
- return null;
- }
-
- /**
- * Obtains an exclusive right to load a repository at the given location. Blocks
- * if another thread is currently loading at that location. Invocation of this
- * method must be followed by a subsequent call to {@link #exitLoad(URI)}.
- *
- * To avoid deadlock between the loadLock and repositoryLock, this method
- * must not be called when repositoryLock is held.
- *
- * @param location The location to lock
- */
- private void enterLoad(URI location, IProgressMonitor monitor) {
- Thread current = Thread.currentThread();
- synchronized (loadLocks) {
- while (true) {
- Thread owner = (Thread) loadLocks.get(location);
- if (owner == null || current.equals(owner))
- break;
- if (monitor.isCanceled())
- throw new OperationCanceledException();
- try {
- loadLocks.wait(1000);
- } catch (InterruptedException e) {
- //keep trying
- }
- }
- loadLocks.put(location, current);
- }
- }
-
- /**
- * Relinquishes the exclusive right to load a repository at the given location. Unblocks
- * other threads waiting to load at that location.
- * @param location The location to unlock
- */
- private void exitLoad(URI location) {
- synchronized (loadLocks) {
- loadLocks.remove(location);
- loadLocks.notifyAll();
- }
- }
-
- /**
- * Creates and returns a repository using the given repository factory extension. Returns
- * null if no factory could be found associated with that extension.
- */
- protected abstract IRepository factoryCreate(URI location, String name, String type, Map properties, IExtension extension) throws ProvisionException;
-
- /**
- * Loads and returns a repository using the given repository factory extension. Returns
- * null if no factory could be found associated with that extension.
- */
- protected abstract IRepository factoryLoad(URI location, IExtension extension, int flags, SubMonitor monitor) throws ProvisionException;
-
- private void fail(URI location, int code) throws ProvisionException {
- String msg = null;
- switch (code) {
- case ProvisionException.REPOSITORY_EXISTS :
- msg = NLS.bind(Messages.repoMan_exists, location);
- break;
- case ProvisionException.REPOSITORY_UNKNOWN_TYPE :
- msg = NLS.bind(Messages.repoMan_unknownType, location);
- break;
- case ProvisionException.REPOSITORY_FAILED_READ :
- msg = NLS.bind(Messages.repoMan_failedRead, location);
- break;
- case ProvisionException.REPOSITORY_NOT_FOUND :
- msg = NLS.bind(Messages.repoMan_notExists, location);
- break;
- case ProvisionException.REPOSITORY_FAILED_AUTHENTICATION :
- msg = NLS.bind(Messages.repoManAuthenticationFailedFor_0, location);
- break;
- }
- if (msg == null)
- msg = Messages.repoMan_internalError;
- throw new ProvisionException(new Status(IStatus.ERROR, getBundleId(), code, msg, null));
- }
-
- protected IExtension[] findMatchingRepositoryExtensions(String suffix, String type) {
- IConfigurationElement[] elt = null;
- if (type != null && type.length() > 0) {
- IExtension ext = RegistryFactory.getRegistry().getExtension(getRepositoryProviderExtensionPointId(), type);
- elt = (ext != null) ? ext.getConfigurationElements() : new IConfigurationElement[0];
- } else {
- elt = RegistryFactory.getRegistry().getConfigurationElementsFor(getRepositoryProviderExtensionPointId());
- }
- int count = 0;
- for (int i = 0; i < elt.length; i++) {
- if (EL_FILTER.equals(elt[i].getName())) {
- if (!suffix.equals(elt[i].getAttribute(ATTR_SUFFIX))) {
- elt[i] = null;
- } else {
- count++;
- }
- } else {
- elt[i] = null;
- }
- }
- IExtension[] results = new IExtension[count];
- for (int i = 0; i < elt.length; i++) {
- if (elt[i] != null)
- results[--count] = elt[i].getDeclaringExtension();
- }
- return results;
- }
-
- protected String[] getAllSuffixes() {
- IConfigurationElement[] elements = RegistryFactory.getRegistry().getConfigurationElementsFor(getRepositoryProviderExtensionPointId());
- ArrayList result = new ArrayList(elements.length);
- result.add(getDefaultSuffix());
- for (int i = 0; i < elements.length; i++) {
- if (elements[i].getName().equals(EL_FILTER)) {
- String suffix = elements[i].getAttribute(ATTR_SUFFIX);
- if (!result.contains(suffix))
- result.add(suffix);
- }
- }
- return (String[]) result.toArray(new String[result.size()]);
- }
-
- /**
- * Returns the bundle id of the bundle that provides the concrete repository manager
- * @return a symbolic bundle id
- */
- protected abstract String getBundleId();
-
- /**
- * Returns the default repository suffix. This is used to ensure a particular
- * repository type is preferred over all others.
- */
- protected abstract String getDefaultSuffix();
-
- /*
- * Return a string key based on the given repository location which
- * is suitable for use as a preference node name.
- * TODO: convert local file system URI to canonical form
- */
- 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;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.core.repository.IRepositoryManager#getKnownRepositories(int)
- */
- public URI[] getKnownRepositories(int flags) {
- synchronized (repositoryLock) {
- if (repositories == null)
- restoreRepositories();
- ArrayList result = new ArrayList();
- int i = 0;
- for (Iterator it = repositories.values().iterator(); it.hasNext(); i++) {
- RepositoryInfo info = (RepositoryInfo) it.next();
- if (matchesFlags(info, flags))
- result.add(info.location);
- }
- return (URI[]) result.toArray(new URI[result.size()]);
- }
- }
-
- /**
- * Return the preference node which is the root for where we store the repository information.
- */
- Preferences getPreferences() {
- IPreferencesService prefService = (IPreferencesService) ServiceHelper.getService(Activator.getContext(), IPreferencesService.class.getName());
-
- try {
- return prefService.getRootNode().node("/profile/_SELF_/" + getBundleId() + "/" + NODE_REPOSITORIES); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (IllegalArgumentException e) {
- return null;
- }
- }
-
- /**
- * Restores a repository location from the preferences.
- */
- private URI getRepositoryLocation(Preferences node) {
- //prefer the location stored in URI form
- String locationString = node.get(KEY_URI, null);
- try {
- if (locationString != null) {
- URI result = new URI(locationString);
- if (result.isAbsolute())
- return result;
- log("Invalid repository URI: " + locationString, new RuntimeException()); //$NON-NLS-1$
- }
- } catch (URISyntaxException e) {
- log("Error while restoring repository: " + locationString, e); //$NON-NLS-1$
- }
- //we used to store the repository as a URL, so try old key for backwards compatibility
- locationString = node.get(KEY_URL, null);
- try {
- if (locationString != null) {
- URI result = URIUtil.toURI(new URL(locationString));
- if (result.isAbsolute())
- return result;
- log("Invalid repository URL: " + locationString, new RuntimeException()); //$NON-NLS-1$
- }
- } catch (MalformedURLException e) {
- log("Error while restoring repository: " + locationString, e); //$NON-NLS-1$
- } catch (URISyntaxException e) {
- log("Error while restoring repository: " + locationString, e); //$NON-NLS-1$
- }
- return null;
- }
-
- /*(non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.core.repository.IRepositoryManager#getRepositoryProperty(java.net.URI, java.lang.String)
- */
- public String getRepositoryProperty(URI location, String key) {
- checkValidLocation(location);
- synchronized (repositoryLock) {
- if (repositories == null)
- restoreRepositories();
- RepositoryInfo info = (RepositoryInfo) repositories.get(getKey(location));
- if (info == null)
- return null;// Repository not found
- if (IRepository.PROP_DESCRIPTION.equals(key))
- return info.description;
- else if (IRepository.PROP_NAME.equals(key))
- return info.name;
- else if (IRepository.PROP_SYSTEM.equals(key))
- return Boolean.toString(info.isSystem);
- else if (IRepository.PROP_NICKNAME.equals(key))
- return info.nickname;
- // Key not known, return null
- return null;
- }
- }
-
- /*(non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.core.repository.IRepositoryManager#getRepositoryProperty(java.net.URI, java.lang.String)
- */
- public void setRepositoryProperty(URI location, String key, String value) {
- checkValidLocation(location);
- synchronized (repositoryLock) {
- if (repositories == null)
- restoreRepositories();
- RepositoryInfo info = (RepositoryInfo) repositories.get(getKey(location));
- if (info == null)
- return;// Repository not found
- if (IRepository.PROP_DESCRIPTION.equals(key))
- info.description = value;
- else if (IRepository.PROP_NAME.equals(key))
- info.name = value;
- else if (IRepository.PROP_NICKNAME.equals(key))
- info.nickname = value;
- else if (IRepository.PROP_SYSTEM.equals(key))
- //only true if value.equals("true") which is OK because a repository is only system if it's explicitly set to system.
- info.isSystem = Boolean.valueOf(value).booleanValue();
- remember(info, true);
- }
- }
-
- /**
- * Returns the fully qualified id of the repository provider extension point.
- */
- protected abstract String getRepositoryProviderExtensionPointId();
-
- /**
- * Returns the system property used to specify additional repositories to be
- * automatically added to the list of known repositories.
- */
- protected abstract String getRepositorySystemProperty();
-
- /**
- * Returns the repository type stored in this manager.
- */
- protected abstract int getRepositoryType();
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.core.repository.IRepositoryManager#isEnabled(java.net.URI)
- */
- public boolean isEnabled(URI location) {
- synchronized (repositoryLock) {
- if (repositories == null)
- restoreRepositories();
- RepositoryInfo info = (RepositoryInfo) repositories.get(getKey(location));
- if (info != null)
- return info.isEnabled;
- // Repository not found, return false
- return false;
- }
- }
-
- protected IRepository loadRepository(URI location, IProgressMonitor monitor, String type, int flags) throws ProvisionException {
- checkValidLocation(location);
- if (monitor == null)
- monitor = new NullProgressMonitor();
- boolean added = false;
- IRepository result = null;
-
- try {
- enterLoad(location, monitor);
- result = basicGetRepository(location);
- if (result != null)
- return result;
- if (checkNotFound(location))
- fail(location, ProvisionException.REPOSITORY_NOT_FOUND);
- //add the repository first so that it will be enabled, but don't send add event until after the load
- added = addRepository(location, true, false);
- String[] suffixes = sortSuffixes(getAllSuffixes(), location);
- SubMonitor sub = SubMonitor.convert(monitor, NLS.bind(Messages.repoMan_adding, location), suffixes.length * 100);
- ProvisionException failure = null;
- try {
- for (int i = 0; i < suffixes.length; i++) {
- if (sub.isCanceled())
- throw new OperationCanceledException();
- try {
- result = loadRepository(location, suffixes[i], type, flags, sub.newChild(100));
- } catch (ProvisionException e) {
- failure = e;
- break;
- }
- if (result != null) {
- addRepository(result, false, suffixes[i]);
- break;
- }
- }
- } finally {
- sub.done();
- }
- if (result == null) {
- //if we just added the repository, remove it because it cannot be loaded
- if (added)
- removeRepository(location, false);
- //eagerly cleanup missing system repositories
- if (Boolean.valueOf(getRepositoryProperty(location, IRepository.PROP_SYSTEM)).booleanValue())
- removeRepository(location);
- else if (failure == null || failure.getStatus().getCode() != ProvisionException.REPOSITORY_FAILED_AUTHENTICATION)
- rememberNotFound(location);
- if (failure != null)
- throw failure;
- fail(location, ProvisionException.REPOSITORY_NOT_FOUND);
- }
- } finally {
- exitLoad(location);
- }
- //broadcast the add event after releasing lock
- if (added)
- broadcastChangeEvent(location, IRepository.TYPE_METADATA, RepositoryEvent.ADDED, true);
- return result;
- }
-
- /**
- * Basic sanity checking on location argument
- */
- private URI checkValidLocation(URI location) {
- if (location == null)
- throw new IllegalArgumentException("Location cannot be null"); //$NON-NLS-1$
- if (!location.isAbsolute())
- throw new IllegalArgumentException("Location must be absolute: " + location); //$NON-NLS-1$
- return location;
- }
-
- private IRepository loadRepository(URI location, String suffix, String type, int flags, SubMonitor monitor) throws ProvisionException {
- IExtension[] providers = findMatchingRepositoryExtensions(suffix, type);
- // Loop over the candidates and return the first one that successfully loads
- monitor.beginTask("", providers.length * 10); //$NON-NLS-1$
- for (int i = 0; i < providers.length; i++)
- try {
- IRepository repo = factoryLoad(location, providers[i], flags, monitor);
- if (repo != null)
- return repo;
- } catch (ProvisionException e) {
- if (e.getStatus().getCode() != ProvisionException.REPOSITORY_NOT_FOUND)
- throw e;
- } catch (OperationCanceledException e) {
- //always propagate cancelation
- throw e;
- } catch (Exception e) {
- //catch and log unexpected errors and move onto the next factory
- log("Unexpected error loading extension: " + providers[i].getUniqueIdentifier(), e); //$NON-NLS-1$
- } catch (LinkageError e) {
- //catch and log unexpected errors and move onto the next factory
- log("Unexpected error loading extension: " + providers[i].getUniqueIdentifier(), e); //$NON-NLS-1$
- }
- return null;
- }
-
- protected void log(String message, Throwable t) {
- LogHelper.log(new Status(IStatus.ERROR, getBundleId(), message, t));
- }
-
- private boolean matchesFlags(RepositoryInfo info, int flags) {
- if ((flags & REPOSITORIES_SYSTEM) == REPOSITORIES_SYSTEM)
- if (!info.isSystem)
- return false;
- if ((flags & REPOSITORIES_NON_SYSTEM) == REPOSITORIES_NON_SYSTEM)
- if (info.isSystem)
- return false;
- if ((flags & REPOSITORIES_DISABLED) == REPOSITORIES_DISABLED) {
- if (info.isEnabled)
- return false;
- } else {
- //ignore disabled repositories for all other flag types
- if (!info.isEnabled)
- return false;
- }
- if ((flags & REPOSITORIES_LOCAL) == REPOSITORIES_LOCAL)
- return "file".equals(info.location.getScheme()) || info.location.toString().startsWith("jar:file"); //$NON-NLS-1$ //$NON-NLS-2$
- return true;
- }
-
- /*(non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.core.eventbus.ProvisioningListener#notify(java.util.EventObject)
- */
- public void notify(EventObject o) {
- if (o instanceof RepositoryEvent) {
- RepositoryEvent event = (RepositoryEvent) o;
- if (event.getKind() == RepositoryEvent.DISCOVERED && event.getRepositoryType() == getRepositoryType())
- addRepository(event.getRepositoryLocation(), event.isRepositoryEnabled(), true);
- }
- }
-
- /**
- * Sets a preference and returns <code>true</code> if the preference
- * was actually changed.
- */
- protected boolean putValue(Preferences node, String key, String newValue) {
- String oldValue = node.get(key, null);
- if (oldValue == newValue || (oldValue != null && oldValue.equals(newValue)))
- return false;
- if (newValue == null)
- node.remove(key);
- else
- node.put(key, newValue);
- return true;
- }
-
- /*
- * Add the given repository object to the preferences and save.
- */
- private void remember(IRepository repository, String suffix) {
- boolean changed = false;
- Preferences node = getPreferences();
- // Ensure we retrieved preferences
- if (node == null)
- return;
- node = node.node(getKey(repository.getLocation()));
-
- try {
- changed |= putValue(node, KEY_URI, repository.getLocation().toString());
- changed |= putValue(node, KEY_URL, null);
- changed |= putValue(node, KEY_DESCRIPTION, repository.getDescription());
- changed |= putValue(node, KEY_NAME, repository.getName());
- changed |= putValue(node, KEY_PROVIDER, repository.getProvider());
- changed |= putValue(node, KEY_TYPE, repository.getType());
- changed |= putValue(node, KEY_VERSION, repository.getVersion());
- //allow repository manager to define system property if it is undefined in the repository itself
- String value = (String) repository.getProperties().get(IRepository.PROP_SYSTEM);
- if (value != null)
- changed |= putValue(node, KEY_SYSTEM, value);
- changed |= putValue(node, KEY_SUFFIX, suffix);
- if (changed)
- saveToPreferences();
- } catch (IllegalStateException e) {
- //the repository was removed concurrently, so we don't need to save it
- }
- }
-
- /**
- * Writes the state of the repository information into the appropriate preference node.
- *
- * @param info The info to write to the preference node
- * @param flush <code>true</code> if the preference node should be flushed to
- * disk, and <code>false</code> otherwise
- */
- private boolean remember(RepositoryInfo info, boolean flush) {
- boolean changed = false;
- Preferences node = getPreferences();
- // Ensure we retrieved preferences
- if (node == null)
- return changed;
- node = node.node(getKey(info.location));
- try {
- changed |= putValue(node, KEY_URI, info.location.toString());
- changed |= putValue(node, KEY_URL, null);
- changed |= putValue(node, KEY_SYSTEM, Boolean.toString(info.isSystem));
- changed |= putValue(node, KEY_DESCRIPTION, info.description);
- changed |= putValue(node, KEY_NAME, info.name);
- changed |= putValue(node, KEY_NICKNAME, info.nickname);
- changed |= putValue(node, KEY_SUFFIX, info.suffix);
- changed |= putValue(node, KEY_ENABLED, Boolean.toString(info.isEnabled));
- if (changed && flush)
- saveToPreferences();
- return changed;
- } catch (IllegalStateException e) {
- //the repository was removed concurrently, so we don't need to save it
- return false;
- }
- }
-
- /**
- * Cache the fact that we tried to load a repository at this location and did not find anything.
- */
- private void rememberNotFound(URI location) {
- List badRepos;
- if (unavailableRepositories != null) {
- badRepos = (List) unavailableRepositories.get();
- if (badRepos != null) {
- badRepos.add(location);
- return;
- }
- }
- badRepos = new ArrayList();
- badRepos.add(location);
- unavailableRepositories = new SoftReference(badRepos);
- }
-
- public boolean removeRepository(URI toRemove) {
- return removeRepository(checkValidLocation(toRemove), true);
- }
-
- private boolean removeRepository(URI toRemove, boolean signalRemove) {
- Assert.isNotNull(toRemove);
- final String repoKey = getKey(toRemove);
- synchronized (repositoryLock) {
- if (repositories == null)
- restoreRepositories();
- if (repositories.remove(repoKey) == null)
- return false;
- }
- // remove the repository from the preference store
- try {
- if (Tracing.DEBUG_REMOVE_REPO) {
- String msg = "Removing repository: " + toRemove; //$NON-NLS-1$
- Tracing.debug(msg);
- new Exception(msg).printStackTrace();
- }
- Preferences node = getPreferences();
- if (node != null) {
- getPreferences().node(repoKey).removeNode();
- saveToPreferences();
- }
- clearNotFound(toRemove);
- } catch (BackingStoreException e) {
- log("Error saving preferences", e); //$NON-NLS-1$
- }
- //TODO: compute and pass appropriate isEnabled flag
- if (signalRemove)
- broadcastChangeEvent(toRemove, getRepositoryType(), RepositoryEvent.REMOVED, true);
- return true;
- }
-
- /*
- * Load the list of repositories from the preferences.
- */
- private void restoreFromPreferences() {
- // restore the list of repositories from the preference store
- Preferences node = getPreferences();
- if (node == null)
- return;
- String[] children;
- try {
- children = node.childrenNames();
- } catch (BackingStoreException e) {
- log("Error restoring repositories from preferences", e); //$NON-NLS-1$
- return;
- }
- for (int i = 0; i < children.length; i++) {
- Preferences child = node.node(children[i]);
- URI location = getRepositoryLocation(child);
- if (location == null) {
- try {
- child.removeNode();
- continue;
- } catch (BackingStoreException e) {
- log("Error removing invalid repository", e); //$NON-NLS-1$
- }
- }
- RepositoryInfo info = new RepositoryInfo();
- info.location = location;
- info.name = child.get(KEY_NAME, null);
- info.nickname = child.get(KEY_NICKNAME, null);
- info.description = child.get(KEY_DESCRIPTION, null);
- info.isSystem = child.getBoolean(KEY_SYSTEM, false);
- info.isEnabled = child.getBoolean(KEY_ENABLED, true);
- info.suffix = child.get(KEY_SUFFIX, null);
- repositories.put(getKey(info.location), info);
- }
- // now that we have loaded everything, remember them
- saveToPreferences();
- }
-
- private void restoreFromSystemProperty() {
- String locationString = Activator.getContext().getProperty(getRepositorySystemProperty());
- if (locationString != null) {
- StringTokenizer tokenizer = new StringTokenizer(locationString, ","); //$NON-NLS-1$
- while (tokenizer.hasMoreTokens()) {
- try {
- addRepository(new URI(tokenizer.nextToken()), true, true);
- } catch (URISyntaxException e) {
- log("Error while restoring repository " + locationString, e); //$NON-NLS-1$
- }
- }
- }
- }
-
- /**
- * Restores the repository list.
- */
- private void restoreRepositories() {
- synchronized (repositoryLock) {
- repositories = new HashMap();
- restoreSpecialRepositories();
- restoreFromSystemProperty();
- restoreFromPreferences();
- }
- }
-
- /**
- * Hook method to restore special additional repositories.
- */
- protected void restoreSpecialRepositories() {
- //by default no special repositories
- }
-
- /*
- * Save the list of repositories to the file-system.
- */
- private void saveToPreferences() {
- try {
- Preferences node = getPreferences();
- if (node != null)
- node.flush();
- } catch (BackingStoreException e) {
- log("Error while saving repositories in preferences", e); //$NON-NLS-1$
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.core.repository.IRepositoryManager#setEnabled(java.net.URI, boolean)
- */
- public void setEnabled(URI location, boolean enablement) {
- checkValidLocation(location);
- synchronized (repositoryLock) {
- if (repositories == null)
- restoreRepositories();
- RepositoryInfo info = (RepositoryInfo) repositories.get(getKey(location));
- if (info == null || info.isEnabled == enablement)
- return;
- info.isEnabled = enablement;
- remember(info, true);
- }
- broadcastChangeEvent(location, getRepositoryType(), RepositoryEvent.ENABLEMENT, enablement);
- }
-
- /**
- * Injects the event bus service to be used by this repository manager.
- * @param bus The event bus being added
- */
- public void setEventBus(IProvisioningEventBus bus) {
- if (eventBus == bus)
- return;
- if (eventBus != null)
- unsetEventBus(eventBus);
- this.eventBus = bus;
- eventBus.addListener(this);
- }
-
- /**
- * Removes the event bus service used by this repository manager
- * @param bus The bus being removed
- */
- public void unsetEventBus(IProvisioningEventBus bus) {
- if (bus == eventBus) {
- eventBus.removeListener(this);
- eventBus = null;
- }
- }
-
- /**
- * Shuts down the repository manager.
- */
- public void shutdown() {
- if (eventBus != null) {
- eventBus.removeListener(this);
- eventBus = null;
- }
- //ensure all repository state in memory is written to disk
- boolean changed = false;
- synchronized (repositoryLock) {
- if (repositories != null) {
- for (Iterator it = repositories.values().iterator(); it.hasNext();) {
- RepositoryInfo info = (RepositoryInfo) it.next();
- changed |= remember(info, false);
- }
- }
- }
- if (changed) {
- if (Tracing.DEBUG)
- Tracing.debug("Unsaved preferences when shutting down " + getClass().getName()); //$NON-NLS-1$
- saveToPreferences();
- }
- repositories = null;
- unavailableRepositories = null;
- }
-
- /**
- * Optimize the order in which repository suffixes are searched by trying
- * the last successfully loaded suffix first.
- */
- private String[] sortSuffixes(String[] suffixes, URI location) {
- synchronized (repositoryLock) {
- if (repositories == null)
- restoreRepositories();
- RepositoryInfo info = (RepositoryInfo) repositories.get(getKey(location));
- if (info == null || info.suffix == null)
- return suffixes;
- //move lastSuffix to the front of the list but preserve order of remaining entries
- String lastSuffix = info.suffix;
- for (int i = 0; i < suffixes.length; i++) {
- if (lastSuffix.equals(suffixes[i])) {
- System.arraycopy(suffixes, 0, suffixes, 1, i);
- suffixes[0] = lastSuffix;
- return suffixes;
- }
- }
- }
- return suffixes;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/DebugHelper.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/DebugHelper.java
deleted file mode 100644
index f230f47c5..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/DebugHelper.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.repository.helpers;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.repository.Activator;
-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_REPOSITORY_CREDENTIALS;
- public static final boolean DEBUG_REPOSITORY_TRANSPORT;
-
- static {
- DebugOptions options = (DebugOptions) ServiceHelper.getService(Activator.getContext(), DebugOptions.class.getName());
- if (options != null) {
- DEBUG_REPOSITORY_CREDENTIALS = options.getBooleanOption(Activator.ID + "/credentials/debug", false); //$NON-NLS-1$
- DEBUG_REPOSITORY_TRANSPORT = options.getBooleanOption(Activator.ID + "/transport/debug", false); //$NON-NLS-1$
- } else {
- DEBUG_REPOSITORY_CREDENTIALS = false;
- DEBUG_REPOSITORY_TRANSPORT = false;
- }
- }
-
- public static void debug(String name, String message) {
- StringBuffer buffer = new StringBuffer();
- buffer.append("["); //$NON-NLS-1$
- buffer.append(Activator.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 void debug(String name, String message, Object[] keyValueArray) {
- if (keyValueArray == null || keyValueArray.length == 0)
- debug(name, message);
- else {
- Map params = new LinkedHashMap(keyValueArray.length / 2);
- for (int i = 0; i < keyValueArray.length; i += 2)
- params.put(keyValueArray[i], keyValueArray[i + 1]);
- StringBuffer buffer = new StringBuffer();
- buffer.append(message);
- buffer.append(formatMap(params, true, true));
- debug(name, buffer.toString());
- }
-
- StringBuffer buffer = new StringBuffer();
- buffer.append("["); //$NON-NLS-1$
- buffer.append(Activator.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(Object[] array, boolean toString, boolean newLines) {
- if (array == null || array.length == 0)
- return "[]"; //$NON-NLS-1$
-
- StringBuffer buffer = new StringBuffer();
- buffer.append('[');
- int i = 0;
- for (;;) {
- if (toString)
- buffer.append(array[i].toString());
- else
- buffer.append(array[i].getClass().getName());
- i++;
- if (i == array.length)
- break;
- buffer.append(',');
- if (newLines)
- buffer.append(DebugHelper.LINE_SEPARATOR);
- else
- buffer.append(' ');
- }
- buffer.append(']');
- return buffer.toString();
- }
-
- public static String formatMap(Map map, boolean toString, boolean newLines) {
- if (map == null || map.size() == 0)
- return "[]"; //$NON-NLS-1$
-
- StringBuffer buffer = new StringBuffer();
- buffer.append('[');
- Iterator itor = map.entrySet().iterator();
- while (itor.hasNext()) {
- Map.Entry e = (Map.Entry) itor.next();
- buffer.append(e.getKey());
- buffer.append('=');
- if (toString)
- buffer.append(e.getValue().toString());
- else
- buffer.append(e.getValue().getClass().getName());
-
- buffer.append(',');
- if (newLines) {
- buffer.append(DebugHelper.LINE_SEPARATOR);
- buffer.append(" "); //$NON-NLS-1$
- } else
- buffer.append(' ');
- }
- buffer.append(']');
- return buffer.toString();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/Messages.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/Messages.java
deleted file mode 100644
index e85bc4501..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/Messages.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.repository.helpers;
-
-import org.eclipse.osgi.util.NLS;
-
-class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.repository.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 repoMan_adding;
- public static String repoMan_exists;
- public static String repoMan_failedRead;
- public static String repoMan_internalError;
- public static String repoMan_notExists;
- public static String repoMan_unknownType;
- public static String repoManAuthenticationFailedFor_0;
- public static String DestinationNotModifiable;
- public static String locationMustBeAbsolute;
- public static String schemeNotSupported;
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/RepositoryHelper.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/RepositoryHelper.java
deleted file mode 100644
index 693231562..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/RepositoryHelper.java
+++ /dev/null
@@ -1,81 +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
- * Cloudsmith Inc - ongoing implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.repository.helpers;
-
-import java.io.File;
-import java.net.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.repository.Activator;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.osgi.util.NLS;
-
-public class RepositoryHelper {
- protected static final String FILE_SCHEME = "file"; //$NON-NLS-1$
-
- /**
- * If the provided URI can be interpreted as representing a local address (no schema, or one letter schema)
- * but is missing the file schema, a new URI is created which represents the local file.
- *
- * @param location the URI to convert
- * @return the converted URI, or the original
- */
- public static URI localRepoURIHelper(URI location) {
- if (location == null)
- return null;
- if (location.getScheme() == null)
- // Probably a local path: /home/user/repo
- location = (new File(location.getPath())).getAbsoluteFile().toURI();
- else if (location.getScheme().length() == 1)
- // Probably a windows path: C:\repo
- location = (new File(URIUtil.toUnencodedString(location))).toURI();
- else if (!FILE_SCHEME.equalsIgnoreCase(location.getScheme()))
- // This else must occur last!
- return location;
-
- // Zipped repository?
- String lowerCase = location.toString().toLowerCase();
- if (lowerCase.endsWith(".jar") || lowerCase.endsWith(".zip")) //$NON-NLS-1$//$NON-NLS-2$
- return URIUtil.toJarURI(location, null);
- return location;
- }
-
- /**
- * Determine if the repository could be used as a valid destination (eg, it is modifiable)
- * @param repository the repository to test
- * @return the repository
- */
- public static IRepository validDestinationRepository(IRepository repository) {
- if (!repository.isModifiable())
- throw new IllegalStateException(NLS.bind(Messages.DestinationNotModifiable, repository.getLocation()));
- return repository;
- }
-
- /**
- * Determine if the location is a syntactically correct repository location. Intended to be used
- * from the UI when checking validity of user input.
- *
- * @throws IllegalArgumentException if location is null
- */
- public static IStatus checkRepositoryLocationSyntax(URI location) {
- if (location == null)
- throw new IllegalArgumentException("Location cannot be null"); //$NON-NLS-1$
- if (!location.isAbsolute())
- return new Status(IStatus.ERROR, Activator.ID, Messages.locationMustBeAbsolute);
- try {
- new URL(location.getScheme(), "dummy.com", -1, "dummy.txt"); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (MalformedURLException e) {
- return new Status(IStatus.ERROR, Activator.ID, Messages.schemeNotSupported);
-
- }
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/messages.properties b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/messages.properties
deleted file mode 100644
index 906ee5511..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/messages.properties
+++ /dev/null
@@ -1,21 +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
-###############################################################################
-
-repoMan_adding = Adding repository {0}
-repoMan_exists=Repository already exists at {0}.
-repoMan_failedRead=The repository could not be read: {0}.
-repoMan_internalError=Internal error.
-repoMan_notExists=No repository found at {0}.
-repoMan_unknownType=Unknown repository type at {0}.
-repoManAuthenticationFailedFor_0=Authentication failed for {0}
-DestinationNotModifiable=Destination repository is not modifiable: {0}
-locationMustBeAbsolute=Location must be absolute
-schemeNotSupported=Scheme not supported
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties
deleted file mode 100644
index 15728fe56..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties
+++ /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
-# Cloudsmith Inc - additional messages
-###############################################################################
-artifact_not_found=Artifact not found: {0}.
-
-io_failedRead=Unable to read repository at {0}.
-ecf_configuration_error=Transport initialization error.
-
-
-repoMan_internalError=Internal error.
-repo_loading = Loading the repository {0}
-
-
-
-
-
-exception_malformedRepoURI = The repository location ({0}) must be a URI.
-
-TransportErrorTranslator_400=Bad HTTP Request: {0}
-TransportErrorTranslator_401=Authentication Failed - Unauthorized: {0}
-TransportErrorTranslator_402=HTTP Payment Required: {0}
-TransportErrorTranslator_403=HTTP Access Forbidden: {0}
-TransportErrorTranslator_404=HTTP Remote File Not Found: {0}
-TransportErrorTranslator_405=HTTP Method Not Allowed: {0}
-TransportErrorTranslator_406=HTTP Request Not Acceptable: {0}
-TransportErrorTranslator_407=HTTP Proxy Authentication Required: {0}
-TransportErrorTranslator_408=HTTP Request Timeout: {0}
-TransportErrorTranslator_409=HTTP Conflict In Request: {0}
-TransportErrorTranslator_410=HTTP Remote File Permanently Removed: {0}
-TransportErrorTranslator_411=HTTP Length Required: {0}
-TransportErrorTranslator_412=HTTP Precondition Failed: {0}
-TransportErrorTranslator_413=HTTP Requested Entity Too Large: {0}
-TransportErrorTranslator_414=HTTP Request URI Too Long: {0}
-TransportErrorTranslator_415=HTTP Unsupported Media Type: {0}
-TransportErrorTranslator_416=HTTP Requested Range Not Satisfiable: {0}
-TransportErrorTranslator_417=HTTP Expectation Failed: {0}
-TransportErrorTranslator_418=HTTP Cannot provision coffee from a tea pot: {0}
-TransportErrorTranslator_422=HTTP (WebDav) Unprocessable Entity: {0}
-TransportErrorTranslator_423=HTTP (WebDAV) Locked: {0}
-TransportErrorTranslator_424=HTTP (WebDAV) Failed Dependency: {0}
-TransportErrorTranslator_425=HTTP Unordered Collection: {0}
-TransportErrorTranslator_426=HTTP Upgrade Required: {0}
-TransportErrorTranslator_449=HTTP Retry With Response: {0}
-TransportErrorTranslator_450=HTTP Blocked By Parental Control: {0}
-TransportErrorTranslator_500=HTTP Server ''Internal Error'': {0}
-TransportErrorTranslator_501=HTTP Server ''Not Implemented'': {0}
-TransportErrorTranslator_502=HTTP Server ''Bad Gateway'' : {0}
-TransportErrorTranslator_503=HTTP Server ''Service Unavailable'': {0}
-TransportErrorTranslator_504=HTTP Server ''Gateway Timeout'': {0}
-TransportErrorTranslator_505=HTTP Server ''HTTP Version Not Supported'': {0}
-TransportErrorTranslator_506=HTTP Server ''Variant Also Negotiates'': {0}
-TransportErrorTranslator_507=HTTP (WebDAV) ''Insufficient Storage'': {0}
-TransportErrorTranslator_508=HTTP Server ''Bandwidth Limit Exceeded'': {0}
-TransportErrorTranslator_510=HTTP Server ''Not Extended'': {0}
-TransportErrorTranslator_MalformedRemoteFileReference=Malformed reference to remote file: {0}
-TransportErrorTranslator_UnableToConnectToRepository_0=Unable to connect to repository {0}
-TransportErrorTranslator_UnknownErrorCode=HTTP Server Unknown HTTP Response Code ({0}):{1}
-TransportErrorTranslator_UnknownHost=Unknown Host: {0}
-fetching_0_from_1_2_at_3=Fetching {0} ({2} at {3}/s) from {1}
-fetching_0_from_1_2_of_3_at_4=Fetching {0} ({2} of {3} at {4}/s) from {1}
-FileTransport_reader=File Transport Reader
-FileTransport_cancelCheck=File Transport Cancel Handler
-connection_to_0_failed_on_1_retry_attempt_2=Connection to {0} failed on {1}. Retry attempt {2} started
-UnableToRead_0_TooManyAttempts=Unable to read repository at: {0}. Too many failed login attempts.
-UnableToRead_0_UserCanceled=Unable to read repository at: {0}. Login canceled by user.
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/ICompositeRepository.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/ICompositeRepository.java
deleted file mode 100644
index c18060524..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/ICompositeRepository.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.provisional.p2.repository;
-
-import java.net.URI;
-import java.util.List;
-
-public interface ICompositeRepository extends IRepository {
- /**
- *
- * @return a list of URIs containing the locations of the children repositories
- */
- public abstract List getChildren();
-
- /**
- * Removes all child repositories
- */
- public abstract void removeAllChildren();
-
- /**
- * Removes specified URI from list of child repositories.
- * Does nothing if specified URI is not a child repository
- * @param child
- */
- public abstract void removeChild(URI child);
-
- /**
- * Adds a specified URI to list of child repositories.
- * Does nothing if URI is a duplicate of an existing child repository.
- * @param child
- */
- public abstract void addChild(URI child);
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IRepository.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IRepository.java
deleted file mode 100644
index c472b66d1..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IRepository.java
+++ /dev/null
@@ -1,188 +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.repository;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.IAdaptable;
-
-/**
- * Base interface that defines common properties that may be provided by
- * various kinds of repositories.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IRepository extends IAdaptable {
- /**
- * The key for a boolean property indicating that the repository
- * is a system repository. System repositories are implementation details
- * that are not subject to general access, hidden from the typical user, etc.
- */
- public static final String PROP_SYSTEM = "p2.system"; //$NON-NLS-1$
-
- /**
- * The key for a boolean property indicating that repository metadata is
- * stored in compressed form. A compressed repository will have lower
- * bandwidth cost to read when remote, but higher processing cost to
- * uncompress when reading.
- */
- public static final String PROP_COMPRESSED = "p2.compressed"; //$NON-NLS-1$
-
- /**
- * The key for a string property providing a human-readable name for the repository.
- */
- public static final String PROP_NAME = "name"; //$NON-NLS-1$
-
- /**
- * The key for a string property providing a user-defined name for the repository.
- * This property is never stored in the repository itself, but is instead tracked and managed
- * by an {@link IRepositoryManager}.
- */
- public static final String PROP_NICKNAME = "p2.nickname"; //$NON-NLS-1$
-
- /**
- * The key for a string property providing a human-readable description for the repository.
- */
- public static final String PROP_DESCRIPTION = "description"; //$NON-NLS-1$
-
- /**
- * The key for a string property providing the common base URL that should
- * be replaced with the mirror URL.
- */
- public static final String PROP_MIRRORS_BASE_URL = "p2.mirrorsBaseURL"; //$NON-NLS-1$
-
- /**
- * The key for a string property providing a URL that can return mirrors of this
- * repository.
- */
- public static final String PROP_MIRRORS_URL = "p2.mirrorsURL"; //$NON-NLS-1$
-
- /**
- * The key for a string property containing the time when the repository was last modified.
- */
- public static final String PROP_TIMESTAMP = "p2.timestamp"; //$NON-NLS-1$
-
- /**
- * The key for a string property providing the user name to an authenticated
- * URL. This key is used in the secure preference store for repository data.
- * @see #PREFERENCE_NODE
- */
- public static final String PROP_USERNAME = "username"; //$NON-NLS-1$
-
- /**
- * The key for a string property providing the password to an authenticated
- * URL. This key is used in the secure preference store for repository data.
- * @see #PREFERENCE_NODE
- */
- public static final String PROP_PASSWORD = "password"; //$NON-NLS-1$
-
- /**
- * The node identifier for repository secure preference store.
- */
- public static final String PREFERENCE_NODE = "org.eclipse.equinox.p2.repository"; //$NON-NLS-1$
-
- /**
- * A repository type constant (value 0) representing a metadata repository.
- */
- public static final int TYPE_METADATA = 0;
-
- /**
- * A repository type constant (value 1) representing an artifact repository.
- */
- public static final int TYPE_ARTIFACT = 1;
-
- /**
- * General purpose zero-valued bit mask constant. Useful whenever you need to
- * supply a bit mask with no bits set.
- */
- public static final int NONE = 0;
-
- /**
- * An option flag constant (value 1) indicating an enabled repository.
- */
- public static final int ENABLED = 1;
-
- /**
- * Returns the URL of the repository.
- * TODO: Should we use URL or URI? URL requires a protocol handler
- * to be installed in Java. Can the URL have any protocol?
- * @return the URL of the repository.
- */
- public URI getLocation();
-
- /**
- * Returns the name of the repository.
- * @return the name of the repository.
- */
- public String getName();
-
- /**
- * Returns a string representing the type of the repository.
- * @return the type of the repository.
- */
- public String getType();
-
- /**
- * Returns a string representing the version for the repository type.
- * @return the version of the type of the repository.
- */
- public String getVersion();
-
- /**
- * Returns a brief description of the repository.
- * @return the description of the repository.
- */
- public String getDescription();
-
- /**
- * Returns the name of the provider of the repository.
- * @return the provider of this repository.
- */
- public String getProvider();
-
- /**
- * Returns a read-only collection of the properties of the repository.
- * @return the properties of this repository.
- */
- public Map getProperties();
-
- /**
- * Returns <code>true</code> if this repository can be modified.
- * @return whether or not this repository can be modified
- */
- public boolean isModifiable();
-
- /**
- * Set the name of the repository.
- */
- public void setName(String name);
-
- /**
- * Sets the description of the repository.
- */
- public void setDescription(String description);
-
- /**
- * Sets the value of the property with the given key. Returns the old property
- * associated with that key, if any. Setting a value of <code>null</code> will
- * remove the corresponding key from the properties of this repository.
- *
- * @param key The property key
- * @param value The new property value, or <code>null</code> to remove the key
- * @return The old property value, or <code>null</code> if there was no old value
- */
- public String setProperty(String key, String value);
-
- /**
- * Sets the name of the provider of the repository.
- */
- public void setProvider(String provider);
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IRepositoryManager.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IRepositoryManager.java
deleted file mode 100644
index 6506ded9e..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IRepositoryManager.java
+++ /dev/null
@@ -1,211 +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.repository;
-
-import java.net.URI;
-
-/**
- * The common base class for metadata and artifact repository managers.
- * <p>
- * A repository manager keeps track of a set of known repositories, and provides
- * caching of these known repositories to avoid unnecessary loading of repositories
- * from the disk or network. The manager fires {@link RepositoryEvent}s when the
- * set of known repositories changes.
- * </p>
- * <p>
- * All {@link URI} instances provided to a repository manager must be absolute.
- * </p>
- *
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IRepositoryManager {
- /**
- * Constant used to indicate that all enabled repositories are of interest.
- */
- public static final int REPOSITORIES_ALL = 0;
-
- /**
- * Constant used to indicate that disabled repositories are of interest.
- * @see #getKnownRepositories(int)
- */
- public static final int REPOSITORIES_DISABLED = 1 << 3;
-
- /**
- * Constant used to indicate that local repositories are of interest.
- * @see #getKnownRepositories(int)
- */
- public static final int REPOSITORIES_LOCAL = 1 << 2;
-
- /**
- * Constant used to indicate that non-system repositories are of interest.
- * @see IRepository#PROP_SYSTEM
- * @see #getKnownRepositories(int)
- */
- public static final int REPOSITORIES_NON_SYSTEM = 1 << 1;
-
- /**
- * Constant used to indicate that system repositories are of interest.
- * @see IRepository#PROP_SYSTEM
- * @see #getKnownRepositories(int)
- */
- public static final int REPOSITORIES_SYSTEM = 1 << 0;
-
- /**
- * Constant used to indicate that a repository manager should only load the
- * repository if the repository is modifiable.
- * @see IRepository#isModifiable()
- */
- public static final int REPOSITORY_HINT_MODIFIABLE = 1 << 0;
-
- /**
- * Adds the repository at the given location to the list of repositories tracked by
- * this repository manager.
- * <p>
- * If there is a known disabled repository at the given location, it will become
- * enabled as a result of this method. Thus the caller can be guaranteed that
- * there is a known, enabled repository at the given location when this method returns.
- *
- * @param location The absolute location of the repository to add
- * @see #isEnabled(URI)
- */
- public void addRepository(URI location);
-
- /**
- * Returns whether a repository at the given location is in the list of repositories
- * tracked by this repository manager.
- *
- * @param location The absolute location of the repository to look for
- * @return <code>true</code> if the repository is known to this manager,
- * and <code>false</code> otherwise
- */
- public boolean contains(URI location);
-
- /**
- * Returns the artifact repository locations known to the repository manager.
- * <p>
- * Note that the repository manager does not guarantee that a valid repository
- * exists at any of the returned locations at any particular moment in time.
- * A subsequent attempt to load a repository at any of the given locations may
- * or may not succeed.
- *
- * @param flags an integer bit-mask indicating which repositories should be
- * returned. <code>REPOSITORIES_ALL</code> can be used as the mask when
- * all enabled repositories should be returned.
- * @return the locations of the repositories managed by this repository manager.
- *
- * @see #REPOSITORIES_ALL
- * @see #REPOSITORIES_SYSTEM
- * @see #REPOSITORIES_NON_SYSTEM
- * @see #REPOSITORIES_LOCAL
- * @see #REPOSITORIES_DISABLED
- */
- public URI[] getKnownRepositories(int flags);
-
- /**
- * Returns the property associated with the repository at the given URI,
- * without loading the repository.
- * <p>
- * Note that some properties for a repository can only be
- * determined when that repository is loaded. This method will return <code>null</code>
- * for such properties. Only values for the properties that are already
- * known by a repository manager will be returned.
- * <p>
- * If a client wishes to retrieve a property value from a repository
- * regardless of the cost of retrieving it, the client should load the
- * repository and then retrieve the property from the repository itself.
- *
- * @param location the absolute URI of the repository in question
- * @param key the String key of the property desired
- * @return the value of the property, or <code>null</code> if the repository
- * does not exist, the value does not exist, or the property value
- * could not be determined without loading the repository.
- *
- * @see IRepository#getProperties()
- * @see #setRepositoryProperty(URI, String, String)
- */
- public String getRepositoryProperty(URI location, String key);
-
- /**
- * Sets the property associated with the repository at the given URI,
- * without loading the repository.
- * <p>
- * This method stores properties in a cache in the repository manager and does
- * not write the property to the backing repository. This is useful for making
- * repository properties available without incurring the cost of loading the repository.
- * When the repository is loaded, it will overwrite any conflicting properties that
- * have been set using this method.
- * </p>
- * <p>
- * To persistently set a property on a repository, clients must load
- * the repository and call {@link IRepository#setProperty(String, String)}.
- * </p>
- *
- * @param location the absolute URI of the repository in question
- * @param key the String key of the property desired
- * @param value the value to set the property to
- * @see #getRepositoryProperty(URI, String)
- * @see IRepository#setProperty(String, String)
- */
- public void setRepositoryProperty(URI location, String key, String value);
-
- /**
- * Returns the enablement value of a repository. Disabled repositories are known
- * to the repository manager, but are never used in the context of provisioning
- * operations. Disabled repositories are useful as a form of bookmark to indicate that a
- * repository location is of interest, but not currently used.
- * <p>
- * Note that enablement is a property of the repository manager and not a property
- * of the affected repository. The enablement of the repository is discarded when
- * a repository is removed from the repository manager.
- *
- * @param location The absolute location of the repository whose enablement is requested
- * @return <code>true</code> if the repository is enabled, and
- * <code>false</code> if it is not enabled, or if the repository location
- * is not known to the repository manager.
- * @see #REPOSITORIES_DISABLED
- * @see #setEnabled(URI, boolean)
- */
- public boolean isEnabled(URI location);
-
- /**
- * Removes the repository at the given location from the list of
- * repositories known to this repository manager. The underlying
- * repository is not deleted. This method has no effect if the given
- * repository is not already known to this repository manager.
- *
- * @param location The absolute location of the repository to remove
- * @return <code>true</code> if a repository was removed, and
- * <code>false</code> otherwise.
- */
- public boolean removeRepository(URI location);
-
- /**
- * Sets the enablement of a repository. Disabled repositories are known
- * to the repository manager, but are never used in the context of provisioning
- * operation. Disabled repositories are useful as a form of bookmark to indicate that a
- * repository location is of interest, but not currently used.
- * <p>
- * Note that enablement is a property of the repository manager and not a property
- * of the affected repository. The enablement of the repository is discarded when
- * a repository is removed from the repository manager.
- * <p>
- * This method has no effect if the given repository location is not known to the
- * repository manager.
- *
- * @param location The absolute location of the repository to enable or disable
- * @param enablement <code>true</code>to enable the repository, and
- * <code>false</code> to disable the repository
- * @see #REPOSITORIES_DISABLED
- * @see #isEnabled(URI)
- */
- public void setEnabled(URI location, boolean enablement);
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IStateful.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IStateful.java
deleted file mode 100644
index daa7d9621..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IStateful.java
+++ /dev/null
@@ -1,33 +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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.repository;
-
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * Implementing <code>IStateful</code> adds the ability to store status information.
- */
-public interface IStateful {
-
- /**
- * Set the status.
- *
- * @param status if status equals null => getStatus().isOK
- */
- void setStatus(IStatus status);
-
- /**
- * Get status.
- * @return status
- */
- public IStatus getStatus();
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryCreationException.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryCreationException.java
deleted file mode 100644
index 0a6899ad8..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryCreationException.java
+++ /dev/null
@@ -1,21 +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.repository;
-
-public class RepositoryCreationException extends Exception {
-
- private static final long serialVersionUID = -5648382121963317100L;
-
- public RepositoryCreationException(Throwable e) {
- super(e);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java
deleted file mode 100644
index 1768f9c91..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java
+++ /dev/null
@@ -1,149 +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.repository;
-
-import java.net.URI;
-import java.util.EventObject;
-
-/**
- * An event indicating a repository was added, removed, changed,
- * or discovered.
- *
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class RepositoryEvent extends EventObject {
- private static final long serialVersionUID = 3082402920617281765L;
-
- /**
- * A change kind constant (value 0), indicating a repository was added to the
- * list of repositories known to a repository manager.
- */
- public static final int ADDED = 0;
-
- /**
- * A change kind constant (value 1), indicating a repository was removed from
- * the list of repositories known to a repository manager.
- */
- public static final int REMOVED = 1;
-
- /**
- * A change kind constant (value 2), indicating a repository known to a
- * repository manager was modified.
- */
- public static final int CHANGED = 2;
-
- /**
- * A change kind constant (value 4), indicating a new repository was discovered.
- * This event is a way to notify repository managers in a generic way about
- * a newly discovered repository. The repository manager will typically receive
- * this event, add the repository to its list of known repositories, and issue
- * a subsequent {@link #ADDED} event. Other clients should not typically
- * listen for this kind of event.
- */
- public static final int DISCOVERED = 4;
-
- /**
- * A change kind constant (value 8), indicating the repository's enablement
- * was changed. The {{@link #isRepositoryEnabled()} method can be used
- * to find out the new enablement state of the repository, and to deduce
- * the previous enablement state.
- */
- public static final int ENABLEMENT = 8;
-
- private final int kind, type;
- private boolean isEnabled;
- private String nickname;
-
- /**
- * Creates and returns a new repository discovery event.
- * @param location the location of the repository that changed.
- * @param nickname the repository nickname
- * @param repositoryType the type of repository that was changed
- * @param enabled whether the repository is enabled
- * @return A new repository discovery event
- * @see IRepository#PROP_NICKNAME
- */
- public static RepositoryEvent newDiscoveryEvent(URI location, String nickname, int repositoryType, boolean enabled) {
- RepositoryEvent event = new RepositoryEvent(location, repositoryType, DISCOVERED, enabled);
- event.nickname = nickname;
- return event;
- }
-
- /**
- * Creates a new repository event.
- *
- * @param location the location of the repository that changed.
- * @param repositoryType the type of repository that was changed
- * @param kind the kind of change that occurred.
- * @param enabled whether the repository is enabled
- */
- public RepositoryEvent(URI location, int repositoryType, int kind, boolean enabled) {
- super(location);
- this.kind = kind;
- this.type = repositoryType;
- isEnabled = enabled;
- }
-
- /**
- * Returns the kind of change that occurred.
- *
- * @return the kind of change that occurred.
- * @see #ADDED
- * @see #REMOVED
- * @see #CHANGED
- * @see #DISCOVERED
- * @see #ENABLEMENT
- */
- public int getKind() {
- return kind;
- }
-
- /**
- * Returns the nickname of the repository. This method is only applicable
- * for the {@link #DISCOVERED} event type. For other event types this
- * method returns <code>null</code>.
- */
- public String getRepositoryNickname() {
- return nickname;
- }
-
- /**
- * Returns the location of the repository associated with this event.
- *
- * @return the location of the repository associated with this event.
- */
- public URI getRepositoryLocation() {
- return (URI) getSource();
- }
-
- /**
- * Returns the type of repository associated with this event. Clients
- * should not assume that the set of possible repository types is closed;
- * clients should ignore events from repository types they don't know about.
- *
- * @return the type of repository associated with this event.
- * ({@link IRepository#TYPE_METADATA} or {@link IRepository#TYPE_ARTIFACT}).
- */
- public int getRepositoryType() {
- return type;
- }
-
- /**
- * Returns whether the affected repository is enabled.
- *
- * @return <code>true</code> if the repository is enabled,
- * and <code>false</code> otherwise.
- */
- public boolean isRepositoryEnabled() {
- return isEnabled;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/repository/AbstractRepository.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/repository/AbstractRepository.java
deleted file mode 100644
index dac525c1f..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/repository/AbstractRepository.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.internal.provisional.spi.p2.repository;
-
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
-
-/**
-* AbstractRepository defines common properties that may be provided by various kinds
-* of repositories.
-* <p>
-* Clients may extend this class.
-* </p>
-*/
-public abstract class AbstractRepository extends PlatformObject implements IRepository {
- protected String description;
- protected transient URI location;
- protected String name;
- protected Map properties = new OrderedProperties();
- protected String provider;
- protected String type;
- protected String version;
-
- protected AbstractRepository(String name, String type, String version, URI location, String description, String provider, Map properties) {
- this.name = name;
- this.type = type;
- this.version = version;
- this.location = location;
- this.description = description == null ? "" : description; //$NON-NLS-1$
- this.provider = provider == null ? "" : provider; //$NON-NLS-1$
- if (properties != null)
- this.properties.putAll(properties);
- }
-
- /**
- * Asserts that this repository is modifiable, throwing a runtime exception if
- * it is not. This is suitable for use by subclasses when an attempt is made
- * to write to a repository.
- */
- protected void assertModifiable() {
- if (!isModifiable())
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- /**
- * Returns a brief description of the repository.
- * @return the description of the repository.
- */
- public synchronized String getDescription() {
- return description;
- }
-
- /**
- * Returns the location of this repository.
- * TODO: Should we use URL or URI? URL requires a protocol handler
- * to be installed in Java. Can the URL have any protocol?
- * @return the URL of the repository.
- */
- public synchronized URI getLocation() {
- return location;
- }
-
- /**
- * Returns the name of the repository.
- * @return the name of the repository.
- */
- public synchronized String getName() {
- return name;
- }
-
- /**
- * Returns a read-only collection of the properties of the repository.
- * @return the properties of this repository.
- */
- public synchronized Map getProperties() {
- return OrderedProperties.unmodifiableProperties(properties);
- }
-
- /**
- * Returns the name of the provider of the repository.
- * @return the provider of this repository.
- */
- public synchronized String getProvider() {
- return provider;
- }
-
- /**
- * Returns a string representing the type of the repository.
- * @return the type of the repository.
- */
- public synchronized String getType() {
- return type;
- }
-
- /**
- * Returns a string representing the version for the repository type.
- * @return the version of the type of the repository.
- */
- public synchronized String getVersion() {
- return version;
- }
-
- public boolean isModifiable() {
- return false;
- }
-
- public synchronized void setDescription(String description) {
- this.description = description;
- }
-
- public synchronized void setName(String value) {
- this.name = value;
- }
-
- public synchronized String setProperty(String key, String value) {
- assertModifiable();
- return (String) (value == null ? properties.remove(key) : properties.put(key, value));
- }
-
- public synchronized void setProvider(String provider) {
- this.provider = provider;
- }
-}
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/.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/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.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 b453b2380..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +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-RequiredExecutionEnvironment: J2SE-1.4
-Require-Bundle: org.eclipse.equinox.common;bundle-version="3.4.0",
- org.junit;bundle-version="3.8.2"
-Export-Package: org.eclipse.equinox.p2.tests.artifact.optimizers,
- org.eclipse.equinox.p2.tests.artifact.processors,
- org.eclipse.equinox.p2.tests.sar
-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,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.osgi.framework;version="1.4.0"
-Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.equinox.p2.tests.optimizers.TestActivator
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/plugin.xml b/bundles/org.eclipse.equinox.p2.tests.optimizers/plugin.xml
deleted file mode 100644
index 40a35562f..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/plugin.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-</plugin>
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 fcff20fb5..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 junit.framework.TestCase;
-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.internal.provisional.p2.artifact.repository.ArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.tests.artifact.processors.ArtifactRepositoryMock;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-
-/**
- * Test the <code>JBDiffStepTest</code> processing step.
- */
-public class JBDiffStepTest extends TestCase {
-
- // 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);
- ProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0", true);
- IArtifactKey key = new ArtifactKey("cl", "id1", new Version("1.1"));
- ArtifactDescriptor descriptor = new ArtifactDescriptor(key);
- differ.initialize(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 0dc49e78b..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 junit.framework.TestCase;
-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.internal.provisional.p2.artifact.repository.ArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.tests.artifact.processors.ArtifactRepositoryMock;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-
-/**
- * Test the <code>JBDiffZipTest</code> processing step.
- */
-public class JBDiffZipStepTest extends TestCase {
-
- /**
- * 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);
- ProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0", true);
- IArtifactKey key = new ArtifactKey("cl", "id1", new Version("1.1"));
- ArtifactDescriptor descriptor = new ArtifactDescriptor(key);
- differ.initialize(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 6690da83b..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 junit.framework.TestCase;
-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.ArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.tests.artifact.processors.ArtifactRepositoryMock;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-
-/**
- * Test the <code>JarDelta</code> processing step.
- */
-public class JarDeltaOptimizerTest extends TestCase {
-
- // 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", new Version("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);
- ProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0.0.1", true);
- IArtifactKey key = new ArtifactKey("cl", "id1", new Version("1.0.0.2"));
- ArtifactDescriptor descriptor = new ArtifactDescriptor(key);
- step.initialize(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/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 fe1a13df9..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.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.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 1f7d2da11..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchStepTest.java
+++ /dev/null
@@ -1,63 +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 junit.framework.TestCase;
-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.ArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-
-/**
- * Test the <code>JBPatchStep</code>
- *
- */
-public class JBPatchStepTest extends TestCase {
-
- public void testPatchEclipseExe32to33() throws IOException {
- IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/eclipse-3.2.exe");
- ProcessingStep patcher = new MockableJBPatchStep(repoMock);
- ProcessingStepDescriptor descriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0", true);
- IArtifactKey key = new ArtifactKey("cl", "id1", new Version("1.1"));
- ArtifactDescriptor context = new ArtifactDescriptor(key);
- patcher.initialize(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 24a96f1c5..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchZipStepTest.java
+++ /dev/null
@@ -1,82 +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 junit.framework.TestCase;
-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.ArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-
-/**
- * Test the <code>JBPatchZipStep</code> processing step.
- */
-public class JBPatchZipStepTest extends TestCase {
-
- // /**
- // * 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);
- ProcessingStepDescriptor descriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0", true);
- IArtifactKey key = new ArtifactKey("cl", "id1", new Version("1.1"));
- ArtifactDescriptor context = new ArtifactDescriptor(key);
- patcher.initialize(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 2633a4ab3..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JarDeltaProcessorTest.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
- * compeople AG (Stefan Liebig)
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.processors;
-
-import java.io.*;
-import java.util.zip.ZipInputStream;
-import junit.framework.TestCase;
-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.ArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-
-public class JarDeltaProcessorTest extends TestCase {
-
- 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);
- ProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0.0.1", true);
- IArtifactKey key = new ArtifactKey("cl", "id1", new Version("1.0.0.2"));
- ArtifactDescriptor descriptor = new ArtifactDescriptor(key);
- step.initialize(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.verifier/.classpath b/bundles/org.eclipse.equinox.p2.tests.verifier/.classpath
deleted file mode 100644
index 2fbb7a23e..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.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.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 016a2a221..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,69 +0,0 @@
-#Thu Sep 10 14:51:49 EDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-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=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=warning
-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.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.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=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
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 a7619a631..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,13 +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.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.tests.verifier.Activator
-Require-Bundle: org.eclipse.core.runtime
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.query
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
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 e9863e281..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/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.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/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 b86d0dd40..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java
+++ /dev/null
@@ -1,295 +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 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.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-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 Properties properties = 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);
- }
-
- /*
- * Return the bundle with the given symbolic name, or <code>null</code> if it does not exist.
- */
- public static Bundle getBundle(String symbolicName) {
- PackageAdmin packageAdmin = (PackageAdmin) ServiceHelper.getService(Activator.getBundleContext(), PackageAdmin.class.getName());
- 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.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext context) throws Exception {
- // start this bundle to registry a bunch of things we need
- getBundle("org.eclipse.equinox.p2.exemplarysetup").start(Bundle.START_TRANSIENT); //$NON-NLS-1$
- String[] args = (String[]) context.getArguments().get(IApplicationContext.APPLICATION_ARGS);
- processArguments(args);
- IStatus result = verify();
- if (!result.isOK())
- 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
- }
-
- 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) {
- int rootIndex = 0;
- for (Iterator iter = missing.keySet().iterator(); iter.hasNext(); rootIndex++) {
- 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) ServiceHelper.getService(Activator.getBundleContext(), IProfileRegistry.class.getName());
- 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$
- Collector results = profile.query(new InstallableUnitQuery(Activator.PLUGIN_ID), new Collector(), 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.tests/All p2 Tests.launch b/bundles/org.eclipse.equinox.p2.tests/All p2 Tests.launch
index a5eef6fa7..460767ec4 100644
--- a/bundles/org.eclipse.equinox.p2.tests/All p2 Tests.launch
+++ b/bundles/org.eclipse.equinox.p2.tests/All p2 Tests.launch
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<?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"/>
@@ -57,7 +56,7 @@
<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.PROJECT_ATTR" value="org.eclipse.equinox.p2.tests"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dorg.eclipse.equinox.p2.reconciler.tests.platform.archive=c:/eclipse-platform-3.6-win32.zip&#13;&#10;-Dorg.eclipse.equinox.p2.reconciler.tests.35.platform.archive=c:/eclipse-platform-3.5-win32.zip&#13;&#10;-Xmx512m"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dorg.eclipse.equinox.p2.reconciler.tests.platform.archive=c:/dev/Platform/zips/eclipse-platform-I20090825-1032-win32.zip&#13;&#10;-Xmx512m"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
<booleanAttribute key="run_in_ui_thread" value="true"/>
@@ -67,4 +66,4 @@
<booleanAttribute key="useDefaultConfig" value="true"/>
<booleanAttribute key="useDefaultConfigArea" value="false"/>
<booleanAttribute key="useProduct" value="false"/>
-</launchConfiguration>
+</launchConfiguration> \ No newline at end of file
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/.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 415da60d8..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +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
-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/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 af7142dd0..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecureAction.java
+++ /dev/null
@@ -1,92 +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.*;
-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/.classpath b/bundles/org.eclipse.equinox.p2.tools/.classpath
deleted file mode 100644
index 6f3b481ac..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/.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.p2.tools/.cvsignore b/bundles/org.eclipse.equinox.p2.tools/.cvsignore
deleted file mode 100644
index c5e82d745..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
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/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.tools/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 46aa81780..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,343 +0,0 @@
-#Fri Feb 22 11:11:17 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.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=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=disabled
-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.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.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.tools/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.tools/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 8d299d8a0..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:58:57 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.tools/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.tools/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7dc047795..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Mon Jul 30 14:52:29 EDT 2007
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.tools/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tools/META-INF/MANIFEST.MF
deleted file mode 100644
index 39ae31485..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,31 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.tools;singleton:=true
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.0.0.qualifier
-Import-Package: javax.servlet.http;version="2.4.0",
- org.eclipse.core.runtime;version="3.4.0",
- org.eclipse.equinox.app;version="1.0.0",
- 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.metadata.repository,
- org.eclipse.equinox.internal.p2.repository.helpers,
- org.eclipse.equinox.internal.p2.updatechecker,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.p2.updatechecker,
- org.osgi.framework;version="1.4.0",
- org.osgi.service.http;version="1.2.0"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Export-Package: org.eclipse.equinox.internal.p2.tools;x-internal:=true
-Bundle-Activator: org.eclipse.equinox.internal.p2.tools.Activator
-Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.equinox.p2.tools/about.html b/bundles/org.eclipse.equinox.p2.tools/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/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.tools/build.properties b/bundles/org.eclipse.equinox.p2.tools/build.properties
deleted file mode 100644
index 4bbd9bd55..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/build.properties
+++ /dev/null
@@ -1,18 +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
diff --git a/bundles/org.eclipse.equinox.p2.tools/p2 tools - compare metadata.launch b/bundles/org.eclipse.equinox.p2.tools/p2 tools - compare metadata.launch
deleted file mode 100644
index eb179dbf3..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/p2 tools - compare metadata.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/p2 tools - compare metadata"/>
-<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.JAVA_COMMAND" value="java"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog -application org.eclipse.equinox.p2.tools.metadataCompareApplication&#13;&#10;-source http://download.eclipse.org/eclipse/updates/3.4milestones/&#13;&#10;-target file:/users/bensonwong/tmp/eclipse.3.4.mirror/&#10;-compare"/>
-<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.common@default:default,org.eclipse.equinox.security@default:default,org.eclipse.equinox.app@default:true,org.eclipse.osgi@:,org.eclipse.equinox.registry@default:default,org.eclipse.core.jobs@default:default,org.eclipse.equinox.launcher@default:default,org.eclipse.core.runtime@default:default,org.eclipse.core.contenttype@default:default,javax.servlet@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.osgi.services@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.console@default:default,org.eclipse.ecf@default:default,org.eclipse.equinox.p2.tools@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.simpleconfigurator@default:true,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.ecf.filetransfer@default:default,org.sat4j.core@default:default,org.sat4j.pb@default:default,org.eclipse.equinox.p2.metadata.repository@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.tools/p2 tools - file server.launch b/bundles/org.eclipse.equinox.p2.tools/p2 tools - file server.launch
deleted file mode 100644
index 27ecbf1fd..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/p2 tools - file server.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="c:\prov\p2\ProvAdminUI"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<stringAttribute key="execEnvironment" value="J2SE-1.5"/>
-<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.tools.fileserverApplication&#13;&#10;-resource /artifact file:c:/prov/p2/servers"/>
-<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.p2.data.area=c:/prov/p2/agentData/&#13;&#10;-Dosgi.noShutdown=true"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="target_bundles" value="javax.servlet@default:default,org.apache.commons.logging@default:default,org.eclipse.core.jobs@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@default:default,org.eclipse.equinox.http.jetty@default:true,org.eclipse.equinox.http.registry@default:true,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.osgi@:,org.eclipse.osgi.services@default:default,org.mortbay.jetty@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useNamedJRE" value="false"/>
-<stringAttribute key="workspace_bundles" value="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:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.console@default:true,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.download@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.exemplarysetup@default:true,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.tools@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.simpleconfigurator@default:true,org.eclipse.equinox.simpleconfigurator.manipulator@default:default"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.tools/p2 tools - mirror.launch b/bundles/org.eclipse.equinox.p2.tools/p2 tools - mirror.launch
deleted file mode 100644
index eced27a1f..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/p2 tools - mirror.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/p2 tools - mirror"/>
-<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.JAVA_COMMAND" value="java"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog -application org.eclipse.equinox.p2.tools.MirrorApplication&#13;&#10;-source file:z:/tmp/cdt/&#13;&#10;-destination file:/tmp/cdt.mirror.win/&#13;&#10;-ius all&#13;&#10;-artifacts all"/>
-<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.equinox.launcher@default:default,org.eclipse.equinox.common@default:default,org.eclipse.osgi@:,org.eclipse.core.jobs@default:default,org.eclipse.core.contenttype@default:default,org.sat4j.core@default:default,javax.servlet@default:default,org.eclipse.core.runtime@default:default,org.eclipse.equinox.security@default:default,org.eclipse.equinox.app@default:true,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.sat4j.pb@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.repository@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.p2.tools@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.ecf@default:default,org.eclipse.equinox.simpleconfigurator@default:true,org.eclipse.equinox.p2.updatechecker@default:default"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.tools/plugin.properties b/bundles/org.eclipse.equinox.p2.tools/plugin.properties
deleted file mode 100644
index 872e0f2e9..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/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 Tools (Incubation)
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.tools/plugin.xml b/bundles/org.eclipse.equinox.p2.tools/plugin.xml
deleted file mode 100644
index e3dd0409a..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/plugin.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<plugin>
- <extension id="fileserverApplication" point="org.eclipse.core.runtime.applications">
- <application cardinality="1" thread="main" visible="true">
- <run class="org.eclipse.equinox.internal.p2.tools.FileServerApplication"/>
- </application>
- </extension>
- <extension id="application" point="org.eclipse.core.runtime.applications">
- <application>
- <run class="org.eclipse.equinox.internal.p2.tools.UpdateCheckerApplication"/>
- </application>
- </extension>
- <extension id="metadataCompareApplication" point="org.eclipse.core.runtime.applications">
- <application>
- <run class="org.eclipse.equinox.internal.p2.tools.MetadataCompareApplication"/>
- </application>
- </extension>
- <extension id="MirrorApplication" point="org.eclipse.core.runtime.applications">
- <application>
- <run class="org.eclipse.equinox.internal.p2.tools.mirror.MirrorApplication"/>
- </application>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/Activator.java b/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/Activator.java
deleted file mode 100644
index 5423e6892..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/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.tools;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
- 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.tools/src/org/eclipse/equinox/internal/p2/tools/FileServerApplication.java b/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/FileServerApplication.java
deleted file mode 100644
index 264727f8e..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/FileServerApplication.java
+++ /dev/null
@@ -1,94 +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.tools;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.*;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.osgi.service.http.*;
-
-public class FileServerApplication implements IApplication {
- private Map resources = new HashMap(10);
-
- private static class FileSystemContext implements HttpContext {
- private String base;
-
- public FileSystemContext(String base) {
- this.base = base;
- }
-
- public String getMimeType(String name) {
- return null;
- }
-
- public URL getResource(String name) {
- try {
- return new URL(base + name);
- } catch (MalformedURLException e) {
- return null;
- }
- }
-
- public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) throws IOException {
- return true;
- }
- }
-
- public Object start(IApplicationContext context) throws Exception {
- Map args = context.getArguments();
- initializeFromArguments((String[]) args.get("application.args")); //$NON-NLS-1$
- registerResources(resources);
- return null;
- }
-
- private void registerResources(Map list) {
- HttpService http = (HttpService) ServiceHelper.getService(Activator.getContext(), HttpService.class.getName());
- for (Iterator i = resources.keySet().iterator(); i.hasNext();) {
- String key = (String) i.next();
- String value = (String) resources.get(key);
- try {
- http.registerResources(key, "/", new FileSystemContext(value)); //$NON-NLS-1$
- } catch (NamespaceException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
-
- public void stop() {
- }
-
- 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("-raw"))
- // raw = 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("-resource")) //$NON-NLS-1$
- resources.put(arg, args[++i]);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/MetadataCompareApplication.java b/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/MetadataCompareApplication.java
deleted file mode 100644
index 0d003ee71..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/MetadataCompareApplication.java
+++ /dev/null
@@ -1,238 +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.tools;
-
-import java.net.URI;
-import java.util.Arrays;
-import java.util.Comparator;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-
-public class MetadataCompareApplication implements IApplication {
-
- private MetadataRepositoryManager repoManager = new MetadataRepositoryManager();
- private IMetadataRepository sourceRepo = null;
- private IMetadataRepository targetRepo = null;
-
- private static Comparator iuIdComparator = new Comparator() {
- public int compare(Object source, Object target) {
- IInstallableUnit sourceIU = (IInstallableUnit) source;
- IInstallableUnit targetIU = (IInstallableUnit) target;
- int id = sourceIU.getId().compareTo(targetIU.getId());
- if (id != 0)
- return id;
- return sourceIU.getVersion().compareTo(targetIU.getVersion());
- }
- };
-
- private URI sourceLocation;
- private URI targetLocation;
- private boolean compare = false;
- private boolean list = false;
-
- public Object start(IApplicationContext context) throws Exception {
- initializeFromArguments((String[]) context.getArguments().get("application.args")); //$NON-NLS-1$
- initRepositories();
-
- if (compare) {
- compareMetadataRepositories();
- } else if (list) {
- list(sourceLocation);
- list(targetLocation);
- }
- return IApplication.EXIT_OK;
- }
-
- private void list(URI location) throws ProvisionException {
- if (location == null)
- return;
- IMetadataRepository locationRepo = repoManager.getRepository(location);
- if (locationRepo == null)
- return;
- Collector sourceRoots = locationRepo.query(InstallableUnitQuery.ANY, new Collector(), new NullProgressMonitor());
- IInstallableUnit[] sourceIUs = (IInstallableUnit[]) sourceRoots.toArray(IInstallableUnit.class);
-
- sourceIUs = sort(sourceIUs, true);
- for (int i = 0; i < sourceIUs.length; i++) {
- System.out.print(sourceIUs[i]);
- System.out.println(sourceIUs[i].isFragment() ? " (fragment)" : ""); //$NON-NLS-1$ //$NON-NLS-2$
- }
- System.out.println("Total: " + sourceIUs.length); //$NON-NLS-1$
- }
-
- private void compareMetadataRepositories() throws ProvisionException {
- System.out.println("\n" + sourceLocation + " -> " + targetLocation); //$NON-NLS-1$ //$NON-NLS-2$
- compare(sourceRepo, targetRepo);
- }
-
- private void initRepositories() throws ProvisionException {
- if (targetLocation == null || sourceLocation == null)
- throw new IllegalStateException("Must specify a source and target"); //$NON-NLS-1$
- sourceRepo = repoManager.loadRepository(sourceLocation, null);
- targetRepo = initializeTarget();
- }
-
- private IMetadataRepository initializeTarget() throws ProvisionException {
- try {
- IMetadataRepository repository = repoManager.loadRepository(targetLocation, null);
- if (!repository.isModifiable())
- throw new IllegalArgumentException("Metadata repository not modifiable: " + targetLocation); //$NON-NLS-1$
- return repository;
- } catch (ProvisionException e) {
- //fall through and create repo
- }
- String repositoryName = targetLocation + " - metadata"; //$NON-NLS-1$
- return repoManager.createRepository(targetLocation, repositoryName, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
- }
-
- private void compare(IMetadataRepository sourceRepo, IMetadataRepository targetRepo) {
- Collector sourceRoots = sourceRepo.query(InstallableUnitQuery.ANY, new Collector(), new NullProgressMonitor());
- Collector targetRoots = targetRepo.query(InstallableUnitQuery.ANY, new Collector(), new NullProgressMonitor());
- IInstallableUnit[] sourceIUs = (IInstallableUnit[]) sourceRoots.toArray(IInstallableUnit.class);
- sourceIUs = sort(sourceIUs, true);
- IInstallableUnit[] targetIUs = (IInstallableUnit[]) targetRoots.toArray(IInstallableUnit.class);
- targetIUs = sort(targetIUs, true);
-
- int targetIndex = 0;
- for (int i = 0; i < sourceIUs.length; i++)
- targetIndex = compareUsingTargets(sourceIUs[i], targetIUs, targetIndex);
- }
-
- private int compareUsingTargets(IInstallableUnit sourceIU, IInstallableUnit[] targetIUs, int targetIndex) {
- while (targetIndex < targetIUs.length) {
- int difference = iuIdComparator.compare(sourceIU, targetIUs[targetIndex]);
- if (difference < 0) {
- System.out.println(sourceIU + " is not found in target repository"); //$NON-NLS-1$
- return targetIndex;
- } else if (difference == 0) {
- String comparison = compare(sourceIU, targetIUs[targetIndex]);
- if (comparison.length() > 0)
- System.out.println(sourceIU + comparison);
- return targetIndex + 1;
- } else {
- System.out.println(targetIUs[targetIndex++] + " is not found in source repository"); //$NON-NLS-1$
- }
- }
- System.out.println(sourceIU + " is not found in target repository"); //$NON-NLS-1$
- return targetIndex;
- }
-
- private boolean compare(Object a, Object b) {
- if (a == null)
- return b == null;
- return a.equals(b);
- }
-
- private boolean compare(Object[] a, Object b[]) {
- if (a == null)
- return b == null;
- return Arrays.equals(a, b);
- }
-
- private String compare(IInstallableUnit iu, IInstallableUnit next) {
- if (next == null)
- return " iu artifactLocators providedCapabilities requiredCapabilities touchpointType"; //$NON-NLS-1$
- String result = ""; //$NON-NLS-1$
- if (!iu.equals(next))
- result += " iu"; //$NON-NLS-1$
- // if (!compare(iu.getApplicabilityFilter(), next.getApplicabilityFilter()))
- // result += " applicabilityFilter";
- if (!compare(iu.getArtifacts(), next.getArtifacts()))
- result += " artifactLocators"; //$NON-NLS-1$
- if (!compare(iu.getProvidedCapabilities(), next.getProvidedCapabilities()))
- result += " providedCapabilities"; //$NON-NLS-1$
- if (!compareRequires(iu.getRequiredCapabilities(), next.getRequiredCapabilities()))
- result += " requiredCapabilities"; //$NON-NLS-1$
- if (!compare(iu.getTouchpointType(), next.getTouchpointType()))
- result += " touchpointType"; //$NON-NLS-1$
-
- if (iu.isFragment()) {
- // if (((InstallableUnitFragment) iu).getHost() == null || ((InstallableUnitFragment) iu).getVersion() == null)
- // return result;
- // if (!((InstallableUnitFragment) iu).getHost().equals(((InstallableUnitFragment) next).getHost()))
- // result += " hostid";
- // if (!((InstallableUnitFragment) iu).getVersion().equals(((InstallableUnitFragment) next).getVersion()))
- // result += " hostversionRange";
- }
- return result;
- }
-
- private boolean compareRequires(IRequiredCapability[] a, IRequiredCapability[] b) {
- if (a == null)
- return b == null;
- if (a.length != b.length)
- return false;
- if (a == b)
- return true;
- for (int i = 0; i < a.length; i++)
- if (findCapability(a[i], b) == null)
- return false;
- return true;
- }
-
- private IRequiredCapability findCapability(IRequiredCapability target, IRequiredCapability[] b) {
- for (int i = 0; i < b.length; i++) {
- IRequiredCapability capability = b[i];
- if (target.equals(capability))
- return capability;
- }
- return null;
- }
-
- private IInstallableUnit[] sort(IInstallableUnit[] ius, boolean clone) {
- IInstallableUnit[] result = ius;
- if (clone) {
- result = new InstallableUnit[ius.length];
- System.arraycopy(ius, 0, result, 0, ius.length);
- }
- Arrays.sort(result, iuIdComparator);
- return result;
- }
-
- public void initializeFromArguments(String[] args) throws Exception {
- if (args == null)
- return;
- for (int i = 0; i < args.length; i++) {
- if (args[i].equalsIgnoreCase("-compare")) //$NON-NLS-1$
- compare = true;
- if (args[i].equalsIgnoreCase("-list")) //$NON-NLS-1$
- list = 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$
- sourceLocation = new URI(arg);
- if (args[i - 1].equalsIgnoreCase("-target")) //$NON-NLS-1$
- targetLocation = new URI(arg);
- }
- }
-
- public void stop() {
- //do nothing
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/UpdateCheckerApplication.java b/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/UpdateCheckerApplication.java
deleted file mode 100644
index 17fa88c58..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/UpdateCheckerApplication.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.p2.tools;
-
-import java.util.Map;
-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.updatechecker.UpdateChecker;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.updatechecker.*;
-
-/**
- * A little app that demonstrates how to register for automatic update checks on
- * a profile.
- *
- * -profile profileID (specifies the profile id to check for updates)
- * -delay long (specifies a long which is the initial delay before beginning polling)
- * -poll long (specifies a long which is the frequency of the update poll)
- * -debug, -trace can be used to show you what's going on.
- *
- * This checker simply writes to system.out when updates are available and lists the
- * IU's that have updates available.
- */
-public class UpdateCheckerApplication implements IApplication {
-
- private static String ARG_PROFILE = "-profile"; //$NON-NLS-1$
- private static String ARG_POLL = "-poll"; //$NON-NLS-1$
- private static String ARG_DELAY = "-delay"; //$NON-NLS-1$
- private static String ARG_DEBUG = "-debug"; //$NON-NLS-1$
- private static String ARG_TRACE = "-trace"; //$NON-NLS-1$
- String profileId;
- long delay = IUpdateChecker.ONE_TIME_CHECK;
- long poll = IUpdateChecker.ONE_TIME_CHECK;
- IUpdateChecker checker;
- IUpdateListener listener = new IUpdateListener() {
-
- public void updatesAvailable(UpdateEvent event) {
- System.out.println("Updates available for " + profileId); //$NON-NLS-1$
- IInstallableUnit[] ius = event.getIUs();
- for (int i = 0; i < ius.length; i++)
- System.out.println(ius[i].toString());
- }
-
- };
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext context) throws Exception {
- checker = (IUpdateChecker) ServiceHelper.getService(Activator.getContext(), IUpdateChecker.SERVICE_NAME);
- if (checker == null)
- throw new RuntimeException("Update checker could not be loaded."); //$NON-NLS-1$
-
- Map args = context.getArguments();
- initializeFromArguments((String[]) args.get("application.args")); //$NON-NLS-1$
- if (profileId == null) {
- System.out.println("Must specify a profile id using -profile arg"); //$NON-NLS-1$
- } else {
- checker.addUpdateCheck(profileId, InstallableUnitQuery.ANY, delay, poll, listener);
- }
-
- return null;
- }
-
- public void stop() {
- checker.removeUpdateCheck(listener);
- }
-
- public void initializeFromArguments(String[] args) throws Exception {
- if (args == null)
- return;
- for (int i = 0; i < args.length; i++) {
- if (args[i].equals(ARG_DEBUG))
- UpdateChecker.DEBUG = true;
- else if (args[i].equals(ARG_TRACE))
- UpdateChecker.TRACE = true;
-
- // The remaining args have parameters. If we are at the
- // last argument, or if the next one starts with a '-',
- // then there won't be a parm, so skip this one.
- if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
- continue;
-
- String arg = args[++i];
-
- if (args[i - 1].equalsIgnoreCase(ARG_PROFILE))
- profileId = arg;
- else if (args[i - 1].equalsIgnoreCase(ARG_POLL))
- poll = getLong(ARG_POLL, arg, IUpdateChecker.ONE_TIME_CHECK);
- else if (args[i - 1].equalsIgnoreCase(ARG_DELAY))
- delay = getLong(ARG_DELAY, arg, IUpdateChecker.ONE_TIME_CHECK);
-
- }
- }
-
- long getLong(String argName, String value, long defaultValue) {
- if (value != null)
- try {
- return Long.parseLong(value);
- } catch (Exception e) {
- System.out.println("The value for " + argName + "(" + value + ") is not a long."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- return defaultValue;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/MirrorApplication.java b/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/MirrorApplication.java
deleted file mode 100644
index 184c11dc2..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/MirrorApplication.java
+++ /dev/null
@@ -1,150 +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 Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.tools.mirror;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-
-/**
- * An application that performs mirroring of artifacts between repositories.
- */
-public class MirrorApplication implements IApplication {
-
- private static final String EMPTY_STRING = ""; //$NON-NLS-1$
- private static final String COMMA_SEPARATOR = ","; //$NON-NLS-1$
- private String[] iuSpecs;
- private String[] artifactSpecs;
- private URI metadataSourceLocation;
- private URI metadataDestinationLocation;
- private URI artifactSourceLocation;
- private URI artifactDestinationLocation;
- private boolean referencedIUs = false;
- private boolean raw = false;
- private boolean overwrite = false;
- private boolean verbose = false;
- private boolean compressed = false;
-
- /**
- * Convert a list of tokens into an array. The list separator has to be
- * specified.
- */
- public static String[] getArrayArgsFromString(String list, String separator) {
- if (list == null || list.trim().equals(EMPTY_STRING))
- 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(EMPTY_STRING)) {
- if ((token.indexOf('[') >= 0 || token.indexOf('(') >= 0) && tokens.hasMoreTokens())
- result.add(token + separator + tokens.nextToken());
- else
- result.add(token);
- }
- }
- return (String[]) result.toArray(new String[result.size()]);
- }
-
- private static String[] getArrayArgsFromString(String list, String delimiterStart, String delimiterEnd, String separator) {
- if (list == null || list.trim().equals(EMPTY_STRING))
- return new String[0];
- List result = new ArrayList();
- for (StringTokenizer tokens = new StringTokenizer(list, delimiterStart); tokens.hasMoreTokens();) {
- String token = tokens.nextToken().trim();
- if (token.endsWith(delimiterEnd))
- token = token.substring(0, token.length() - delimiterEnd.length());
- if (token.endsWith(delimiterEnd + separator))
- token = token.substring(0, token.length() - delimiterEnd.length() - separator.length());
- if (!token.equals(EMPTY_STRING))
- result.add(token);
- }
- return (String[]) result.toArray(new String[result.size()]);
- }
-
- public Object start(IApplicationContext context) throws Exception {
- long time = -System.currentTimeMillis();
- initializeFromArguments((String[]) context.getArguments().get("application.args")); //$NON-NLS-1$
- RepositoryMirroring operation = new RepositoryMirroring(metadataSourceLocation, metadataDestinationLocation, artifactSourceLocation, artifactDestinationLocation, overwrite, compressed);
- operation.setReferencedIUs(referencedIUs);
- operation.setRaw(raw);
- operation.setVerbose(verbose);
- operation.mirror(iuSpecs, artifactSpecs);
- time += System.currentTimeMillis();
- if (verbose)
- System.out.println("Operation completed in " + new Long(time) + " ms."); //$NON-NLS-1$//$NON-NLS-2$
- return IApplication.EXIT_OK;
- }
-
- public void stop() {
- //do nothing
- }
-
- 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].equalsIgnoreCase("-referencedIUs")) //$NON-NLS-1$
- referencedIUs = true;
- if (args[i].equalsIgnoreCase("-raw")) //$NON-NLS-1$
- raw = true;
- if (args[i].equalsIgnoreCase("-overwrite")) //$NON-NLS-1$
- overwrite = true;
- if (args[i].equalsIgnoreCase("-verbose")) //$NON-NLS-1$
- verbose = true;
- if (args[i].equalsIgnoreCase("-compressed")) //$NON-NLS-1$
- compressed = 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];
-
- try {
- if (args[i - 1].equalsIgnoreCase("-source")) { //$NON-NLS-1$
- metadataSourceLocation = URIUtil.fromString(arg);
- artifactSourceLocation = URIUtil.fromString(arg);
- }
- if (args[i - 1].equalsIgnoreCase("-destination")) { //$NON-NLS-1$
- metadataDestinationLocation = URIUtil.fromString(arg);
- artifactDestinationLocation = URIUtil.fromString(arg);
- }
- if (args[i - 1].equalsIgnoreCase("-metadatadestination")) //$NON-NLS-1$
- metadataDestinationLocation = URIUtil.fromString(arg);
- if (args[i - 1].equalsIgnoreCase("-metadatasource")) //$NON-NLS-1$
- metadataSourceLocation = URIUtil.fromString(arg);
- if (args[i - 1].equalsIgnoreCase("-artifactdestination")) //$NON-NLS-1$
- artifactDestinationLocation = URIUtil.fromString(arg);
- if (args[i - 1].equalsIgnoreCase("-artifactsource")) //$NON-NLS-1$
- artifactSourceLocation = 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("-ius")) //$NON-NLS-1$
- if (arg.equalsIgnoreCase("all")) //$NON-NLS-1$
- iuSpecs = new String[0];
- else
- iuSpecs = getArrayArgsFromString(arg, COMMA_SEPARATOR);
- if (args[i - 1].equalsIgnoreCase("-artifacts")) //$NON-NLS-1$
- if (arg.equalsIgnoreCase("all")) //$NON-NLS-1$
- artifactSpecs = new String[0];
- else
- artifactSpecs = getArrayArgsFromString(arg, "{", "}", COMMA_SEPARATOR); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/RangeQuery.java b/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/RangeQuery.java
deleted file mode 100644
index 9b0ff8648..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/RangeQuery.java
+++ /dev/null
@@ -1,49 +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.internal.p2.tools.mirror;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.MatchQuery;
-
-/**
- * A convenience query that will match any {@link IInstallableUnit}
- * it encounters.
- */
-public class RangeQuery extends MatchQuery {
- private VersionRangedName[] targets;
-
- /**
- * Creates a query that will match any {@link IInstallableUnit} with the given
- * VerionRangedName.
- *
- * @param targets The installable unit names with versions to match, or <code>null</code> to match any id
- */
- public RangeQuery(VersionRangedName[] targets) {
- this.targets = targets;
- }
-
- /**
- * Returns true if the <code>IInstallableUnit</code> object is contained in the <code>VerionRangedName</code>'s or targets is null.
- */
- public boolean isMatch(Object object) {
- if (!(object instanceof IInstallableUnit))
- return false;
- if (targets == null)
- return true;
- IInstallableUnit candidate = (IInstallableUnit) object;
- for (int i = 0; i < targets.length; i++) {
- VersionRangedName entry = targets[i];
- if (entry.getId().equalsIgnoreCase(candidate.getId()) && entry.getVersionRange().isIncluded(candidate.getVersion()))
- return true;
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/RepositoryMirroring.java b/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/RepositoryMirroring.java
deleted file mode 100644
index 4f673f8b3..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/RepositoryMirroring.java
+++ /dev/null
@@ -1,254 +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.tools.mirror;
-
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
-import org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-
-/**
- * A utility class that performs mirroring of metadata and artifacts between repositories.
- */
-public class RepositoryMirroring {
-
- private IMetadataRepository metadataSourceRepository;
- private IMetadataRepository metadataDestinationRepository;
- private IArtifactRepository artifactSourceRepository;
- private IArtifactRepository artifactDestinationRepository;
- private boolean referencedIUs = false;
- private boolean validArtifactRepos = false;
- private boolean validMetadataRepos = false;
- private boolean mirrorArtifactsWithMetadata = false;
- private boolean raw = false;
- private boolean overwrite = false;
- private boolean verbose = false;
- private boolean compressed = false;
-
- public RepositoryMirroring(URI metadataSourceLocation, URI metadataDestinationLocation, URI artifactSourceLocation, URI artifactDestinationLocation, boolean overwrite, boolean compressed) throws ProvisionException {
- this.overwrite = overwrite;
- this.compressed = compressed;
- if (metadataSourceLocation != null && metadataDestinationLocation != null) {
- MetadataRepositoryManager metadataRepoManager = new MetadataRepositoryManager();
- metadataSourceRepository = metadataRepoManager.loadRepository(metadataSourceLocation, null);
- metadataRepoManager.removeRepository(metadataSourceLocation);
- metadataDestinationRepository = initializeMetadataDestination(metadataRepoManager, metadataDestinationLocation);
- validMetadataRepos = validateMetadataRepositories();
- }
- if (artifactSourceLocation != null && artifactDestinationLocation != null) {
- ArtifactRepositoryManager artifactRepoManager = new ArtifactRepositoryManager();
- artifactSourceRepository = artifactRepoManager.loadRepository(artifactSourceLocation, null);
- artifactRepoManager.removeRepository(artifactSourceLocation);
- artifactDestinationRepository = initializeArtifactDestination(artifactRepoManager, artifactDestinationLocation);
- validArtifactRepos = validateArtifactRepositories();
- }
- }
-
- public void mirror(String[] iuSpecs, String[] artifactSpecs) throws ProvisionException {
- mirrorArtifactsWithMetadata = validArtifactRepos && artifactSpecs != null && artifactSpecs.length == 0 && iuSpecs != null;
- if (validMetadataRepos && iuSpecs != null)
- mirrorMetadata(iuSpecs);
- if (validArtifactRepos && !mirrorArtifactsWithMetadata && artifactSpecs != null)
- mirrorArtifacts(artifactSpecs, raw);
- }
-
- public void mirrorMetadata(String[] iuSpecs) throws ProvisionException {
- if (iuSpecs.length == 0)
- mirrorMetadata(InstallableUnitQuery.ANY);
- else {
- VersionRangedName[] iuRanges = new VersionRangedName[iuSpecs.length];
- for (int i = 0; i < iuSpecs.length; i++)
- iuRanges[i] = VersionRangedName.parse(iuSpecs[i]);
- mirrorMetadata(new RangeQuery(iuRanges));
- }
- }
-
- public void mirrorMetadata(Query query) throws ProvisionException {
- Collector result = metadataSourceRepository.query(query, new Collector(), null);
- mirrorMetadata((IInstallableUnit[]) result.toArray(IInstallableUnit.class));
- }
-
- private void mirrorMetadata(IInstallableUnit[] ius) throws ProvisionException {
- if (referencedIUs)
- ius = addTransitiveIUs(metadataSourceRepository, ius);
- for (int i = 0; i < ius.length; i++) {
- IInstallableUnit iu = ius[i];
- if (verbose)
- System.out.println("Mirroring IU: " + iu);
- if (mirrorArtifactsWithMetadata)
- mirrorArtifacts(iu.getArtifacts(), raw);
- }
- metadataDestinationRepository.addInstallableUnits(ius);
- }
-
- private void mirrorArtifact(IArtifactDescriptor descriptor) throws ProvisionException {
- IArtifactDescriptor newDescriptor = raw ? descriptor : new ArtifactDescriptor(descriptor);
- if (artifactDestinationRepository.contains(descriptor))
- return;
- OutputStream repositoryStream = null;
- try {
- repositoryStream = artifactDestinationRepository.getOutputStream(newDescriptor);
- if (repositoryStream == null)
- return;
- if (verbose)
- System.out.println("Mirroring artifact: " + descriptor);
- // TODO Is that ok to ignore the result?
- artifactSourceRepository.getRawArtifact(descriptor, repositoryStream, new NullProgressMonitor());
- } finally {
- if (repositoryStream != null)
- try {
- repositoryStream.close();
- } catch (IOException e) {
- // TODO Is that ok to ignore the exception
- e.printStackTrace();
- }
- }
- }
-
- private void mirrorArtifacts(IArtifactKey[] keys, boolean raw) throws ProvisionException {
- for (int i = 0; i < keys.length; i++) {
- IArtifactKey key = keys[i];
- IArtifactDescriptor[] descriptors = artifactSourceRepository.getArtifactDescriptors(key);
- for (int j = 0; j < descriptors.length; j++)
- mirrorArtifact(descriptors[j]);
- }
- }
-
- private void mirrorArtifacts(String[] artifactSpecs, boolean raw) throws ProvisionException {
- IArtifactKey[] keys;
- if (artifactSpecs == null)
- return;
- if (artifactSpecs.length == 0)
- keys = artifactSourceRepository.getArtifactKeys();
- else {
- keys = new ArtifactKey[artifactSpecs.length];
- for (int i = 0; i < artifactSpecs.length; i++) {
- keys[i] = ArtifactKey.parse(artifactSpecs[i]);
- }
- }
- mirrorArtifacts(keys, raw);
- }
-
- protected IInstallableUnit[] addTransitiveIUs(IMetadataRepository source, IInstallableUnit[] ius) {
- // TODO Here we should create a profile from the source repo and discover all the
- // IUs that are needed to support the given ius. For now just assume that the
- // given ius are enough.
- return ius;
- }
-
- private boolean validateMetadataRepositories() {
- if (metadataSourceRepository == null)
- throw new IllegalStateException("Source metadata repository is null."); //$NON-NLS-1$
- if (metadataDestinationRepository == null)
- throw new IllegalStateException("Destination metadata repository is null."); //$NON-NLS-1$
- if (!metadataDestinationRepository.isModifiable())
- throw new IllegalStateException("Destination metadata repository must be modifiable: " + metadataDestinationRepository.getLocation()); //$NON-NLS-1$
- return true;
- }
-
- private boolean validateArtifactRepositories() {
- if (artifactSourceRepository == null)
- throw new IllegalStateException("Source artifact repository is null."); //$NON-NLS-1$
- if (artifactDestinationRepository == null)
- throw new IllegalStateException("Destination artifact repository is null."); //$NON-NLS-1$
- if (!artifactDestinationRepository.isModifiable())
- throw new IllegalStateException("Destination artifact repository must be modifiable: " + artifactDestinationRepository.getLocation()); //$NON-NLS-1$
- return true;
- }
-
- private IMetadataRepository initializeMetadataDestination(MetadataRepositoryManager manager, URI destinationLocation) throws ProvisionException {
- IMetadataRepository repository;
- try {
- String repositoryName = destinationLocation + " - metadata"; //$NON-NLS-1$
- Map properties = null;
- if (compressed) {
- properties = new HashMap(1);
- properties.put(IRepository.PROP_COMPRESSED, String.valueOf(compressed));
- }
- repository = manager.createRepository(destinationLocation, repositoryName, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
- manager.removeRepository(destinationLocation);
- if (!repository.isModifiable())
- throw new IllegalArgumentException("Metadata repository not modifiable: " + destinationLocation); //$NON-NLS-1$
- return repository;
- } catch (ProvisionException e) {
- //fall through and create repo
- }
- repository = manager.loadRepository(destinationLocation, null);
- if (repository != null)
- manager.removeRepository(destinationLocation);
- if (!repository.isModifiable())
- throw new IllegalArgumentException("Metadata repository not modifiable: " + destinationLocation); //$NON-NLS-1$
- return repository;
- }
-
- private IArtifactRepository initializeArtifactDestination(ArtifactRepositoryManager repoManager, URI destinationLocation) throws ProvisionException {
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
- IArtifactRepository repository;
- try {
- String repositoryName = destinationLocation + " - artifacts"; //$NON-NLS-1$
- Map properties = null;
- if (compressed) {
- properties = new HashMap(1);
- properties.put(IRepository.PROP_COMPRESSED, String.valueOf(compressed));
- }
- repository = manager.createRepository(destinationLocation, repositoryName, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
- if (repository != null)
- manager.removeRepository(destinationLocation);
-
- if (!repository.isModifiable())
- throw new IllegalArgumentException("Artifact repository not modifiable: " + destinationLocation); //$NON-NLS-1$
- if (overwrite)
- repository.removeAll();
- return repository;
- } catch (ProvisionException e) {
- //fall through and create a new repository below
- }
- // the given repo location is not an existing repo so we have to create something
- repository = manager.loadRepository(destinationLocation, null);
- manager.removeRepository(destinationLocation);
- return repository;
- }
-
- public void setVerbose(boolean value) {
- verbose = value;
- }
-
- public void setReferencedIUs(boolean value) {
- referencedIUs = value;
- }
-
- public void setRaw(boolean value) {
- raw = value;
- }
-
- public void setCompressed(boolean value) {
- compressed = value;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/VersionRangedName.java b/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/VersionRangedName.java
deleted file mode 100644
index c1c795138..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/VersionRangedName.java
+++ /dev/null
@@ -1,51 +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.tools.mirror;
-
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-
-public class VersionRangedName {
- private String id;
- private VersionRange range;
-
- /**
- * Creates and returns a new version ranged id from the given spec. The spec should be
- * id/version range.
- * @param spec the spec for the version ranged id to create
- * @return the parsed versioned id
- */
- public static VersionRangedName parse(String spec) {
- String[] segments = MirrorApplication.getArrayArgsFromString(spec, "/"); //$NON-NLS-1$
- return new VersionRangedName(segments[0], segments.length == 1 ? null : segments[1]);
- }
-
- public VersionRangedName(String id, String rangeSpec) {
- this.id = id;
- this.range = new VersionRange(rangeSpec);
- }
-
- public VersionRangedName(String id, VersionRange range) {
- this.id = id;
- this.range = range;
- }
-
- public String getId() {
- return id;
- }
-
- public VersionRange getVersionRange() {
- return range;
- }
-
- public String toString() {
- return id + "/" + (range == null ? "0.0.0" : range.toString()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tools/updatechecker app.launch b/bundles/org.eclipse.equinox.p2.tools/updatechecker app.launch
deleted file mode 100644
index 5058fea88..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/updatechecker 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/updatechecker 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.updatechecker.app.application&#13;&#10;-metadataRepository file:c:/prov/p2/servers/metadataRepository/ &#13;&#10;-artifactRepository file:c:/prov/p2/servers/artifactRepository/ &#13;&#10;-profile Test&#13;&#10;-delay 5000&#13;&#10;-poll 10000&#13;&#10;-trace"/>
-<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.p2.data.area=c:/prov/p2/agentData"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="target_bundles" value="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.equinox.app@default:true,org.eclipse.equinox.common@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.osgi@:,org.eclipse.osgi.services@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="vminstall" value="jre1.5.0_11"/>
-<stringAttribute key="workspace_bundles" value="com.thoughtworks.xstream@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.repository@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.download@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.exemplarysetup@default:true,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.updatechecker@5:true,org.eclipse.equinox.p2.updatechecker.app@default:default,org.eclipse.equinox.simpleconfigurator@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:true"/>
-</launchConfiguration>
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 2fbb7a23e..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.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.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 2daa5df61..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,330 +0,0 @@
-#Fri Feb 22 11:24:21 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.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 d3a0b16a5..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,44 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.touchpoint.eclipse;singleton:=true
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.0.200.qualifier
-Import-Package: javax.xml.parsers,
- org.eclipse.core.runtime.preferences;version="3.2.0",
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.engine,
- org.eclipse.equinox.internal.p2.garbagecollector,
- org.eclipse.equinox.internal.provisional.frameworkadmin,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.core.location,
- org.eclipse.equinox.internal.provisional.p2.director;resolution:=optional,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository,
- org.eclipse.equinox.internal.simpleconfigurator.manipulator,
- org.eclipse.equinox.p2.publisher;resolution:=optional,
- org.eclipse.equinox.p2.publisher.eclipse;resolution:=optional,
- 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.3.0",
- org.w3c.dom,
- org.xml.sax
-Export-Package: org.eclipse.equinox.internal.p2.touchpoint.eclipse;x-friends:="org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.p2.extensionlocation",
- org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;x-internal:=true,
- org.eclipse.equinox.internal.p2.update;x-friends:="org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.p2.extensionlocation,org.eclipse.equinox.p2.directorywatcher"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.equinox.internal.p2.touchpoint.eclipse.Activator
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
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 4bbd9bd55..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/build.properties
+++ /dev/null
@@ -1,18 +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
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 01940251a..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.xml
+++ /dev/null
@@ -1,234 +0,0 @@
-<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/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 bdcd73ebc..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.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.AbstractArtifactRepository;
-
-public class AggregatedBundleRepository extends AbstractArtifactRepository implements IFileArtifactRepository {
-
- private static final String REPOSITORY_TYPE = AggregatedBundleRepository.class.getName();
- private final Collection bundleRepositories;
-
- public AggregatedBundleRepository(Collection bundleRepositories) {
- super(REPOSITORY_TYPE, REPOSITORY_TYPE, "1.0", null, null, null, null); //$NON-NLS-1$
- this.bundleRepositories = bundleRepositories;
- }
-
- public File getArtifactFile(IArtifactKey key) {
- for (Iterator it = bundleRepositories.iterator(); it.hasNext();) {
- IFileArtifactRepository repository = (IFileArtifactRepository) it.next();
- File artifactFile = repository.getArtifactFile(key);
- if (artifactFile != null)
- return artifactFile;
- }
- return null;
- }
-
- public File getArtifactFile(IArtifactDescriptor descriptor) {
- for (Iterator it = bundleRepositories.iterator(); it.hasNext();) {
- IFileArtifactRepository repository = (IFileArtifactRepository) it.next();
- File artifactFile = repository.getArtifactFile(descriptor);
- if (artifactFile != null)
- return artifactFile;
- }
- return null;
- }
-
- public boolean contains(IArtifactDescriptor descriptor) {
- for (Iterator it = bundleRepositories.iterator(); it.hasNext();) {
- IFileArtifactRepository repository = (IFileArtifactRepository) it.next();
- if (repository.contains(descriptor))
- return true;
- }
- return false;
- }
-
- public boolean contains(IArtifactKey key) {
- for (Iterator it = bundleRepositories.iterator(); it.hasNext();) {
- IFileArtifactRepository repository = (IFileArtifactRepository) it.next();
- if (repository.contains(key))
- return true;
- }
- return false;
- }
-
- public IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key) {
- Set artifactDescriptors = new HashSet();
- for (Iterator it = bundleRepositories.iterator(); it.hasNext();) {
- IFileArtifactRepository repository = (IFileArtifactRepository) it.next();
- IArtifactDescriptor[] descriptors = repository.getArtifactDescriptors(key);
- if (descriptors != null)
- artifactDescriptors.addAll(Arrays.asList(descriptors));
- }
- return (IArtifactDescriptor[]) artifactDescriptors.toArray(new IArtifactDescriptor[artifactDescriptors.size()]);
- }
-
- public IArtifactKey[] getArtifactKeys() {
- Set artifactKeys = new HashSet();
- for (Iterator it = bundleRepositories.iterator(); it.hasNext();) {
- IFileArtifactRepository repository = (IFileArtifactRepository) it.next();
- IArtifactKey[] keys = repository.getArtifactKeys();
- if (keys != null)
- artifactKeys.addAll(Arrays.asList(keys));
- }
- return (IArtifactKey[]) artifactKeys.toArray(new IArtifactKey[artifactKeys.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 testGetBundleRepositories() {
- return bundleRepositories;
- }
-}
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 1f280e541..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/DirectorUtil.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.touchpoint.eclipse;
-
-import java.net.URI;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
-
-public class DirectorUtil {
-
- public static IStatus validateProfile(IProfile profile) {
- ProfileChangeRequest pcr = new ProfileChangeRequest(profile);
- ProvisioningContext ctx = new ProvisioningContext(new URI[0]);
- IPlanner planner = (IPlanner) ServiceHelper.getService(Activator.getContext(), IPlanner.class.getName());
- 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 f30126e85..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java
+++ /dev/null
@@ -1,137 +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.eclipse;
-
-import java.io.File;
-import java.util.*;
-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.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.osgi.framework.ServiceReference;
-
-/**
- * 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 artifactKeyList = null;
-
- public MarkSet[] getMarkSets(IProfile inProfile) {
- artifactKeyList = new HashSet();
- IArtifactRepository repositoryToGC = Util.getBundlePoolRepository(inProfile);
- if (repositoryToGC == null)
- return new MarkSet[0];
- addArtifactKeys(inProfile);
- IProfile currentProfile = getCurrentProfile();
- if (currentProfile != null && inProfile.getProfileId().equals(currentProfile.getProfileId())) {
- addRunningBundles(repositoryToGC);
- addRunningFeatures(inProfile, repositoryToGC);
- }
- return new MarkSet[] {new MarkSet((IArtifactKey[]) artifactKeyList.toArray(new IArtifactKey[0]), repositoryToGC)};
- }
-
- private void addRunningFeatures(IProfile profile, IArtifactRepository repositoryToGC) {
- try {
- List allFeatures = getAllFeatures(Configuration.load(new File(Util.getConfigurationFolder(profile), "org.eclipse.update/platform.xml"), null)); //$NON-NLS-1$
- for (Iterator iterator = allFeatures.iterator(); iterator.hasNext();) {
- Feature f = (Feature) iterator.next();
- IArtifactKey match = searchArtifact(f.getId(), new Version(f.getVersion()), ARTIFACT_CLASSIFIER_FEATURE, repositoryToGC);
- if (match != null)
- artifactKeyList.add(match);
- }
- } catch (ProvisionException e) {
- //Ignore the exception
- }
- }
-
- private List getAllFeatures(Configuration cfg) {
- if (cfg == null)
- return Collections.EMPTY_LIST;
- List sites = cfg.getSites();
- ArrayList result = new ArrayList();
- for (Iterator iterator = sites.iterator(); iterator.hasNext();) {
- Site object = (Site) iterator.next();
- Feature[] features = object.getFeatures();
- for (int i = 0; i < features.length; i++) {
- result.add(features[i]);
- }
- }
- return result;
- }
-
- private IProfile getCurrentProfile() {
- ServiceReference sr = Activator.getContext().getServiceReference(IProfileRegistry.class.getName());
- if (sr == null)
- return null;
- IProfileRegistry pr = (IProfileRegistry) Activator.getContext().getService(sr);
- if (pr == null)
- return null;
- Activator.getContext().ungetService(sr);
- return pr.getProfile(IProfileRegistry.SELF);
- }
-
- private void addArtifactKeys(IProfile aProfile) {
- Iterator installableUnits = aProfile.query(InstallableUnitQuery.ANY, new Collector(), null).iterator();
- while (installableUnits.hasNext()) {
- IArtifactKey[] keys = ((IInstallableUnit) installableUnits.next()).getArtifacts();
- if (keys == null)
- continue;
- for (int i = 0; i < keys.length; i++) {
- artifactKeyList.add(keys[i]);
- }
- }
- }
-
- public IArtifactRepository getRepository(IProfile aProfile) {
- return Util.getBundlePoolRepository(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)
- IArtifactKey[] keys = repo.getArtifactKeys();
- for (int i = 0; i < keys.length; i++) {
- if (keys[i].getClassifier().equals(classifier)) {
- String id = keys[i].getId();
- Version v = keys[i].getVersion();
- if (id != null && id.equals(searchedId) && v != null && v.equals(searchedVersion))
- return keys[i];
- }
- }
- return null;
- }
-
- //Find for each bundle info a corresponding artifact in repo
- private ArrayList findCorrespondinArtifacts(BundleInfo[] bis, IArtifactRepository repo) {
- ArrayList toRetain = new ArrayList();
- for (int i = 0; i < bis.length; i++) {
- IArtifactKey match = searchArtifact(bis[i].getSymbolicName(), new Version(bis[i].getVersion()), 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 e280bc927..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java
+++ /dev/null
@@ -1,246 +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.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.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$
-
- private static final String NATIVE_TOUCHPOINT_ID = "org.eclipse.equinox.p2.touchpoint.natives"; //$NON-NLS-1$
- private static List 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 manipulators = new WeakHashMap();
- private static Map wrappers = new WeakHashMap();
- private static Map sourceManipulators = new WeakHashMap();
- private static Map preparedIUs = new WeakHashMap();
-
- private static synchronized LazyManipulator getManipulator(IProfile profile) {
- LazyManipulator manipulator = (LazyManipulator) manipulators.get(profile);
- if (manipulator == null) {
- manipulator = new LazyManipulator(profile);
- manipulators.put(profile, manipulator);
- }
- return manipulator;
- }
-
- private static synchronized void saveManipulator(IProfile profile) throws FrameworkAdminRuntimeException, IOException {
- LazyManipulator manipulator = (LazyManipulator) manipulators.remove(profile);
- if (manipulator != null)
- manipulator.save(false);
- }
-
- private static synchronized PlatformConfigurationWrapper getPlatformConfigurationWrapper(IProfile profile, LazyManipulator manipulator) {
- PlatformConfigurationWrapper wrapper = (PlatformConfigurationWrapper) wrappers.get(profile);
- if (wrapper == null) {
- File configLocation = Util.getConfigurationFolder(profile);
- URI poolURI = Util.getBundlePoolLocation(profile);
- wrapper = new PlatformConfigurationWrapper(configLocation, poolURI, manipulator);
- wrappers.put(profile, wrapper);
- }
- return wrapper;
- }
-
- private static synchronized void savePlatformConfigurationWrapper(IProfile profile) throws ProvisionException {
- PlatformConfigurationWrapper wrapper = (PlatformConfigurationWrapper) wrappers.remove(profile);
- if (wrapper != null)
- wrapper.save();
- }
-
- private static synchronized SourceManipulator getSourceManipulator(IProfile profile) {
- SourceManipulator 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 = (SourceManipulator) sourceManipulators.remove(profile);
- if (sourceManipulator != null)
- sourceManipulator.save();
- }
-
- private static synchronized IInstallableUnit getPreparedIU(IProfile profile, IInstallableUnit iu) {
- Map preparedProfileIUs = (Map) preparedIUs.get(profile);
- if (preparedProfileIUs == null)
- return null;
-
- return (IInstallableUnit) preparedProfileIUs.get(iu);
- }
-
- private static synchronized void savePreparedIU(IProfile profile, IInstallableUnit iu) {
- Map preparedProfileIUs = (Map) preparedIUs.get(profile);
- if (preparedProfileIUs == null) {
- preparedProfileIUs = new HashMap();
- 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 touchpointParameters) {
- LazyManipulator manipulator = getManipulator(profile);
- touchpointParameters.put(PARM_MANIPULATOR, manipulator);
- touchpointParameters.put(PARM_SOURCE_BUNDLES, getSourceManipulator(profile));
- touchpointParameters.put(PARM_PLATFORM_CONFIGURATION, getPlatformConfigurationWrapper(profile, manipulator));
- return null;
- }
-
- public IStatus initializeOperand(IProfile profile, Operand operand, Map parameters) {
- IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
- if (iu != null && Boolean.valueOf(iu.getProperty(IInstallableUnit.PROP_PARTIAL_IU)).booleanValue()) {
- IInstallableUnit preparedIU = prepareIU(iu, profile);
- if (preparedIU == null)
- return Util.createError(NLS.bind(Messages.failed_prepareIU, iu));
-
- parameters.put(PARM_IU, preparedIU);
- }
- return Status.OK_STATUS;
- }
-
- public IInstallableUnit prepareIU(IInstallableUnit iu, IProfile profile) {
- 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) {
- IArtifactKey[] artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.length == 0)
- return iu;
-
- IArtifactKey artifactKey = artifacts[0];
- if (artifactKey == null)
- return iu;
-
- File bundleFile = Util.getArtifactFile(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.internal.provisional.p2.director.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 d432a4e6d..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/LazyManipulator.java
+++ /dev/null
@@ -1,146 +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.eclipse;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.equinox.internal.provisional.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;
-
- public LazyManipulator(IProfile profile) {
- this.profile = profile;
- }
-
- 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));
-
- 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$
- try {
- manipulator.getConfigData().setProperty("eclipse.p2.data.area", URIUtil.toURI(Util.getAgentLocation().getURL()).toString()); //$NON-NLS-1$
- } catch (URISyntaxException e) {
- LogHelper.log(Util.createError(Messages.error_loading_manipulator, e));
- throw new IllegalStateException(Messages.error_loading_manipulator);
- }
- }
-
- public static FrameworkAdmin getFrameworkAdmin() {
- ServiceTracker fwAdminTracker = null;
- try {
- Filter filter = Activator.getContext().createFilter(filterFwAdmin);
- fwAdminTracker = new ServiceTracker(Activator.getContext(), filter, null);
- fwAdminTracker.open();
- FrameworkAdmin fwAdmin = (FrameworkAdmin) 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 686719b49..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Messages.java
+++ /dev/null
@@ -1,40 +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 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 5dcf1ab92..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java
+++ /dev/null
@@ -1,256 +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.net.*;
-import java.util.Iterator;
-import java.util.List;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.URLUtil;
-import org.eclipse.equinox.internal.p2.update.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.internal.provisional.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 (Iterator iter = configuration.getSites().iterator(); iter.hasNext();) {
- Site site = (Site) iter.next();
- 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();
- try {
- result.setUrl(URIUtil.toURL(location).toExternalForm());
- } catch (MalformedURLException e) {
- // TODO
- 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 sites = configuration.getSites();
- File file = URIUtil.toFile(url);
- for (Iterator iter = sites.iterator(); iter.hasNext();) {
- Site nextSite = (Site) iter.next();
- try {
- File nextFile = URLUtil.toFile(new URL(nextSite.getUrl()));
- if (nextFile == null)
- continue;
- if (nextFile.equals(file))
- return nextSite;
- } catch (MalformedURLException 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 sites = configuration.getSites();
- for (Iterator iter = sites.iterator(); iter.hasNext();) {
- Site site = (Site) iter.next();
- 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 921109533..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PublisherUtil.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
- * 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.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-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 = new Version(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 ec86ad246..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/SourceManipulator.java
+++ /dev/null
@@ -1,78 +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 java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.simpleconfigurator.manipulator.SimpleConfiguratorManipulatorImpl;
-
-//This class deals with source bundles and how their addition to the source.info
-public class SourceManipulator {
- private List 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 (BundleInfo[]) 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((BundleInfo[]) sourceBundles.toArray(new BundleInfo[sourceBundles.size()]), getFileLocation(), getLauncherLocation());
- }
-
- private void load() throws MalformedURLException, IOException {
- if (getFileLocation().exists())
- sourceBundles = new ArrayList(Arrays.asList(manipulator.loadConfiguration(getFileLocation().toURL(), getLauncherLocation())));
- else
- sourceBundles = new ArrayList();
- }
-
- private File getFileLocation() {
- return new File(Util.getConfigurationFolder(profile), "org.eclipse.equinox.source/source.info"); //$NON-NLS-1$
- }
-
- 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 15fa59ce5..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java
+++ /dev/null
@@ -1,329 +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
- * Red Hat Incorporated - fix for bug 225145
- * Code 9 - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.location.AgentLocation;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.osgi.service.datalocation.Location;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-import org.eclipse.osgi.util.ManifestElement;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.Constants;
-
-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 AgentLocation getAgentLocation() {
- return (AgentLocation) ServiceHelper.getService(Activator.getContext(), AgentLocation.class.getName());
- }
-
- public static IArtifactRepositoryManager getArtifactRepositoryManager() {
- return (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
- }
-
- public static URI getBundlePoolLocation(IProfile profile) {
- String path = profile.getProperty(IProfile.PROP_CACHE);
- if (path != null)
- return new File(path).toURI();
- AgentLocation location = getAgentLocation();
- if (location == null)
- return null;
- try {
- return URIUtil.toURI(location.getDataArea(Activator.ID));
- } catch (URISyntaxException e) {
- // unexpected, URLs should be pre-checked
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e));
- throw new RuntimeException(e);
- }
- }
-
- public static synchronized IFileArtifactRepository getBundlePoolRepository(IProfile profile) {
- URI location = getBundlePoolLocation(profile);
- if (location == null)
- return null;
- IArtifactRepositoryManager manager = getArtifactRepositoryManager();
- 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 properties = new HashMap(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(IProfile profile) {
- return getAggregatedBundleRepository(profile, AGGREGATE_CACHE | AGGREGATE_SHARED_CACHE | AGGREGATE_CACHE_EXTENSIONS);
- }
-
- public static IFileArtifactRepository getAggregatedBundleRepository(IProfile profile, int repoFilter) {
- List bundleRepositories = new ArrayList();
-
- // 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();
- 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(repository);
- } catch (ProvisionException e) {
- //skip repository if it could not be read
- }
- }
- }
-
- if ((repoFilter & AGGREGATE_CACHE) != 0) {
- IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(profile);
- if (bundlePool != null)
- bundleRepositories.add(bundlePool);
- }
-
- if ((repoFilter & AGGREGATE_CACHE_EXTENSIONS) != 0) {
- List repos = getListProfileProperty(profile, CACHE_EXTENSIONS);
- for (Iterator iterator = repos.iterator(); iterator.hasNext();) {
- try {
- String repo = (String) iterator.next();
- 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(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(bundleRepositories);
- }
-
- private static List getListProfileProperty(IProfile profile, String key) {
- List listProperty = new ArrayList();
- 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, String manifest) {
- BundleInfo bundleInfo = new BundleInfo();
- if (bundleFile != null)
- bundleInfo.setLocation(bundleFile.toURI());
-
- bundleInfo.setManifest(manifest);
- try {
- Map headers = ManifestElement.parseBundleManifest(new ByteArrayInputStream(manifest.getBytes("UTF-8")), new HashMap()); //$NON-NLS-1$
- ManifestElement[] element = ManifestElement.parseHeader("bsn", (String) headers.get(Constants.BUNDLE_SYMBOLICNAME)); //$NON-NLS-1$
- if (element == null || element.length == 0)
- return null;
- bundleInfo.setSymbolicName(element[0].getValue());
-
- String version = (String) headers.get(Constants.BUNDLE_VERSION);
- if (version == null)
- return null;
- // convert to a Version object first to ensure we are consistent with our version number w.r.t.
- // padding zeros at the end
- bundleInfo.setVersion(Version.parseVersion(version).toString());
-
- String fragmentHost = (String) headers.get(Constants.FRAGMENT_HOST);
- if (fragmentHost != null)
- bundleInfo.setFragmentHost(fragmentHost.trim());
-
- } catch (BundleException e) {
- // unexpected
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e));
- return null;
- } catch (IOException e) {
- // unexpected
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e));
- return null;
- }
- return bundleInfo;
- }
-
- public static File getArtifactFile(IArtifactKey artifactKey, IProfile profile) {
- IFileArtifactRepository aggregatedView = getAggregatedBundleRepository(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$
- return new File(getInstallFolder(profile), getLauncherName(name, getOSFromProfile(profile)));
- }
-
- /**
- * Returns the name of the Eclipse application launcher.
- */
- private static String getLauncherName(String name, String os) {
- if (os == null) {
- EnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName());
- if (info != 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 ("app".equals(path.getFileExtension())) //$NON-NLS-1$
- return name;
- StringBuffer buffer = new StringBuffer();
- buffer.append(name.substring(0, 1).toUpperCase());
- buffer.append(name.substring(1));
- buffer.append(".app/Contents/MacOS/"); //$NON-NLS-1$
- buffer.append(name.toLowerCase());
- 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 String getManifest(ITouchpointData[] data) {
- for (int i = 0; i < data.length; i++) {
- ITouchpointInstruction manifestInstruction = data[i].getInstruction("manifest"); //$NON-NLS-1$
- if (manifestInstruction == null)
- return null;
- String manifest = manifestInstruction.getBody();
- if (manifest != null && manifest.length() > 0)
- return manifest;
- }
- 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);
- }
-}
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 1b9aa8e23..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/WhatIsRunning.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.touchpoint.eclipse;
-
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-
-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 ab9e86968..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ActionConstants.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.eclipse.actions;
-
-public class ActionConstants {
-
- public static final String PARM_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_JVM_ARG = "jvmArg"; //$NON-NLS-1$
- public static final String PARM_OPERAND = "operand"; //$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 816b41879..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java
+++ /dev/null
@@ -1,287 +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.internal.provisional.p2.engine.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 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 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 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 list = new ArrayList();
- 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);
- String[] argList = new String[list.size()];
- list.toArray(argList);
-
- return argList;
- }
-
- // 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 efaa3b30a..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramArgumentAction.java
+++ /dev/null
@@ -1,90 +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.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.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class AddProgramArgumentAction extends ProvisioningAction {
- public static final String ID = "addProgramArg"; //$NON-NLS-1$
-
- public IStatus execute(Map 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_ARTIFACT)) {
- try {
- programArg = resolveArtifactParam(parameters);
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
- manipulator.getLauncherData().addProgramArg(programArg);
-
- if (programArgValue != null) {
- if (programArgValue.equals(ActionConstants.PARM_ARTIFACT)) {
- try {
- programArgValue = resolveArtifactParam(parameters);
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
- manipulator.getLauncherData().addProgramArg(programArgValue);
- }
-
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map 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;
- }
-
- private static String resolveArtifactParam(Map parameters) throws CoreException {
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- IArtifactKey[] artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.length == 0)
- throw new CoreException(Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu)));
-
- IArtifactKey artifactKey = artifacts[0];
-
- File fileLocation = Util.getArtifactFile(artifactKey, profile);
- if (fileLocation == null || !fileLocation.exists())
- throw new CoreException(Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey)));
- return fileLocation.getAbsolutePath();
- }
-} \ 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 71bc26fed..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddRepositoryAction.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.touchpoint.eclipse.actions;
-
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.engine.Profile;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-
-/**
- * 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 parameters) {
- try {
- final RepositoryEvent event = createEvent(parameters);
- Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
- if (profile != null)
- addRepositoryToProfile(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(profile))
- addToSelf(event);
- return Status.OK_STATUS;
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
-
- protected String getId() {
- return ID;
- }
-
- public IStatus undo(Map parameters) {
- try {
- final RepositoryEvent event = createEvent(parameters);
- Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
- if (profile != null)
- removeRepositoryFromProfile(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(profile))
- removeFromSelf(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 2f90c6aaa..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddSourceBundleAction.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.internal.p2.touchpoint.eclipse.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.eclipse.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.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 parameters) {
- return AddSourceBundleAction.addSourceBundle(parameters);
- }
-
- public IStatus undo(Map parameters) {
- return RemoveSourceBundleAction.removeSourceBundle(parameters);
- }
-
- public static IStatus addSourceBundle(Map parameters) {
- 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));
-
- IArtifactKey[] artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.length == 0)
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = null;
- for (int i = 0; i < artifacts.length; i++) {
- if (artifacts[i].toString().equals(bundleId)) {
- artifactKey = artifacts[i];
- break;
- }
- }
- if (artifactKey == null)
- throw new IllegalArgumentException(NLS.bind(Messages.no_matching_artifact, bundleId));
-
- File bundleFile = Util.getArtifactFile(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 14baeae6c..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java
+++ /dev/null
@@ -1,64 +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.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.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-
-/**
- * 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 parameters) {
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- if (iu == null)
- return null;
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- //if the IU is already in the profile there is nothing to do
- if (!profile.available(new InstallableUnitQuery(iu.getId(), iu.getVersion()), new Collector(), null).isEmpty())
- return null;
- Collection bundleFiles = (Collection) parameters.get(ActionConstants.PARM_ARTIFACT_FILES);
- IArtifactKey[] artifacts = iu.getArtifacts();
- if (artifacts == null)
- return null;
- for (int i = 0; i < artifacts.length; i++) {
- File bundleFile = Util.getArtifactFile(artifacts[i], 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 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 f5557b5c0..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ChmodAction.java
+++ /dev/null
@@ -1,150 +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.EclipseTouchpoint;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-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$
-
- public IStatus execute(Map 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_ARTIFACT)) {
- try {
- targetDir = 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 collect = new ArrayList();
- 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 parameters) {
- //TODO: implement undo ??
- return Status.OK_STATUS;
- }
-
- public void chmod(String targetDir, String targetFile, String perms, String[] options) {
- 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
- }
- }
- }
-
- private static String resolveArtifactParam(Map parameters) throws CoreException {
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- IArtifactKey[] artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.length == 0)
- throw new CoreException(Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu)));
-
- IArtifactKey artifactKey = artifacts[0];
-
- File fileLocation = Util.getArtifactFile(artifactKey, profile);
- if (fileLocation == null || !fileLocation.exists())
- throw new CoreException(Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey)));
- return fileLocation.getAbsolutePath();
- }
-} \ 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 f1932a576..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CollectAction.java
+++ /dev/null
@@ -1,90 +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.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-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 parameters) {
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(ActionConstants.PARM_OPERAND);
- IArtifactRequest[] requests;
- try {
- requests = CollectAction.collect(operand.second(), profile);
- } catch (ProvisionException e) {
- return e.getStatus();
- }
-
- Collection artifactRequests = (Collection) parameters.get(ActionConstants.PARM_ARTIFACT_REQUESTS);
- artifactRequests.add(requests);
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map parameters) {
- // nothing to do for now
- return Status.OK_STATUS;
- }
-
- public static boolean isZipped(ITouchpointData[] data) {
- if (data == null || data.length == 0)
- return false;
- for (int i = 0; i < data.length; i++) {
- if (data[i].getInstruction("zipped") != null) //$NON-NLS-1$
- return true;
- }
- return false;
- }
-
- public static Properties createArtifactDescriptorProperties(IInstallableUnit installableUnit) {
- Properties descriptorProperties = null;
- if (CollectAction.isZipped(installableUnit.getTouchpointData())) {
- descriptorProperties = new Properties();
- descriptorProperties.setProperty(CollectAction.ARTIFACT_FOLDER, Boolean.TRUE.toString());
- }
- return descriptorProperties;
- }
-
- // TODO: Here we may want to consult multiple caches
- public static IArtifactRequest[] collect(IInstallableUnit installableUnit, IProfile profile) throws ProvisionException {
- IArtifactKey[] toDownload = installableUnit.getArtifacts();
- if (toDownload == null || toDownload.length == 0)
- return IArtifactRepositoryManager.NO_ARTIFACT_REQUEST;
-
- IArtifactRepository aggregatedRepositoryView = Util.getAggregatedBundleRepository(profile);
- IArtifactRepository bundlePool = Util.getBundlePoolRepository(profile);
- if (bundlePool == null)
- throw new ProvisionException(Util.createError(NLS.bind(Messages.no_bundle_pool, profile.getProfileId())));
-
- List requests = new ArrayList();
- for (int i = 0; i < toDownload.length; i++) {
- IArtifactKey key = toDownload[i];
- if (!aggregatedRepositoryView.contains(key)) {
- Properties repositoryProperties = CollectAction.createArtifactDescriptorProperties(installableUnit);
- requests.add(Util.getArtifactRepositoryManager().createMirrorRequest(key, bundlePool, null, repositoryProperties));
- }
- }
-
- if (requests.isEmpty())
- return IArtifactRepositoryManager.NO_ARTIFACT_REQUEST;
-
- IArtifactRequest[] result = (IArtifactRequest[]) 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 ebfc1240f..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java
+++ /dev/null
@@ -1,80 +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.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.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class InstallBundleAction extends ProvisioningAction {
- public static final String ID = "installBundle"; //$NON-NLS-1$
-
- public IStatus execute(Map parameters) {
- return InstallBundleAction.installBundle(parameters);
- }
-
- public IStatus undo(Map parameters) {
- return UninstallBundleAction.uninstallBundle(parameters);
- }
-
- public static IStatus installBundle(Map parameters) {
- 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 (iu.isFragment()) {
- System.out.println("What is a fragment doing here!!! -- " + iu); //$NON-NLS-1$
- return Status.OK_STATUS;
- }
-
- IArtifactKey[] artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.length == 0)
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = null;
- for (int i = 0; i < artifacts.length; i++) {
- if (artifacts[i].toString().equals(bundleId)) {
- artifactKey = artifacts[i];
- break;
- }
- }
- if (artifactKey == null)
- throw new IllegalArgumentException(NLS.bind(Messages.no_matching_artifact, bundleId));
-
- File bundleFile = Util.getArtifactFile(artifactKey, profile);
- if (bundleFile == null || !bundleFile.exists())
- return Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey));
-
- //By now we always have the manifest in the touchpoint data
- String manifest = Util.getManifest(iu.getTouchpointData());
- if (manifest == null)
- return Util.createError(NLS.bind(Messages.missing_manifest, iu));
-
- BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, manifest);
- 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 f0575ebe1..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallFeatureAction.java
+++ /dev/null
@@ -1,79 +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.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.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.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 parameters) {
- return InstallFeatureAction.installFeature(parameters);
- }
-
- public IStatus undo(Map parameters) {
- return UninstallFeatureAction.uninstallFeature(parameters);
- }
-
- public static IStatus installFeature(Map 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);
-
- IArtifactKey[] artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.length == 0)
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = null;
- for (int i = 0; i < artifacts.length; i++) {
- if (artifacts[i].toString().equals(feature)) {
- artifactKey = artifacts[i];
- 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();
- }
-
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- File file = Util.getArtifactFile(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 e18ef9b9b..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java
+++ /dev/null
@@ -1,122 +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.EclipseTouchpoint;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-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$
-
- public IStatus execute(Map 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_ARTIFACT)) {
- try {
- targetDir = 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 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) {
-
- 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
- }
- }
- }
-
- private static String resolveArtifactParam(Map parameters) throws CoreException {
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- IArtifactKey[] artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.length == 0)
- throw new CoreException(Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu)));
-
- IArtifactKey artifactKey = artifacts[0];
-
- File fileLocation = Util.getArtifactFile(artifactKey, profile);
- if (fileLocation == null || !fileLocation.exists())
- throw new CoreException(Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey)));
- return fileLocation.getAbsolutePath();
- }
-}
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 744b266bb..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java
+++ /dev/null
@@ -1,103 +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.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.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.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 parameters) {
- 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));
-
- IArtifactKey[] artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.length == 0)
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = artifacts[0];
-
- // the bundleFile might be null here, that's OK.
- File bundleFile = Util.getArtifactFile(artifactKey, profile);
-
- String manifest = Util.getManifest(iu.getTouchpointData());
- if (manifest == null)
- return Util.createError(NLS.bind(Messages.missing_manifest, iu));
-
- BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, manifest);
- 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 parameters) {
- 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);
-
- IArtifactKey[] artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.length == 0)
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = artifacts[0];
- // the bundleFile might be null here, that's OK.
- File bundleFile = Util.getArtifactFile(artifactKey, profile);
-
- String manifest = Util.getManifest(iu.getTouchpointData());
- if (manifest == null)
- return Util.createError(NLS.bind(Messages.missing_manifest, iu));
-
- BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, manifest);
- 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 3560e8acd..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.internal.provisional.p2.engine.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 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 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 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 5cc2277ae..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.internal.provisional.p2.engine.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 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 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 = (String) 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 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 4f4fd25ba..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveRepositoryAction.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.touchpoint.eclipse.actions;
-
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.engine.Profile;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-
-/**
- * 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 parameters) {
- try {
- RepositoryEvent event = createEvent(parameters);
- Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
- if (profile != null)
- removeRepositoryFromProfile(profile, event.getRepositoryLocation(), event.getRepositoryType());
- //if we are provisioning into the self profile, update the current set of repositories in this configuration
- if (isSelfProfile(profile))
- removeFromSelf(event);
- } catch (CoreException e) {
- return e.getStatus();
- }
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map parameters) {
- try {
- RepositoryEvent event = createEvent(parameters);
- Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
- if (profile != null)
- addRepositoryToProfile(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(profile))
- addToSelf(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 21b1a1490..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveSourceBundleAction.java
+++ /dev/null
@@ -1,66 +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.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.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.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 parameters) {
- return RemoveSourceBundleAction.removeSourceBundle(parameters);
- }
-
- public IStatus undo(Map parameters) {
- return AddSourceBundleAction.addSourceBundle(parameters);
- }
-
- public static IStatus removeSourceBundle(Map parameters) {
- 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));
-
- IArtifactKey[] artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.length == 0)
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = null;
- for (int i = 0; i < artifacts.length; i++) {
- if (artifacts[i].toString().equals(bundleId)) {
- artifactKey = artifacts[i];
- 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(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 b3bbf9fe1..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java
+++ /dev/null
@@ -1,255 +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.net.URI;
-import java.net.URISyntaxException;
-import java.util.Map;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.preferences.IPreferencesService;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.engine.Profile;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Activator;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.repository.*;
-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(int type) {
- if (type == IRepository.TYPE_METADATA) {
- return (IRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.SERVICE_NAME);
- } else if (type == IRepository.TYPE_ARTIFACT) {
- return (IRepositoryManager) ServiceHelper.getService(Activator.getContext(), 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(Profile profile, URI location, String nickname, int type, boolean enabled) {
- Preferences node = getRepositoryPreferenceNode(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(RepositoryEvent event) {
- IRepositoryManager manager = getRepositoryManager(event.getRepositoryType());
- final URI location = event.getRepositoryLocation();
- Preferences node = getRepositoryPreferenceNode(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 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(Profile profile) {
- //if we can't determine the current profile, assume we are running on self
- if (profile == null)
- return true;
- IProfileRegistry registry = (IProfileRegistry) ServiceHelper.getService(Activator.getContext(), IProfileRegistry.class.getName());
- 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(RepositoryEvent event) {
- IRepositoryManager manager = getRepositoryManager(event.getRepositoryType());
- Preferences node = getRepositoryPreferenceNode(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(Profile profile, URI location, int type) {
- Preferences node = getRepositoryPreferenceNode(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(Profile profile, URI location, int type) {
- String key = type == IRepository.TYPE_METADATA ? METADATA_REPOSITORY : ARTIFACT_REPOSITORY;
- IPreferencesService prefService = (IPreferencesService) ServiceHelper.getService(Activator.getContext(), IPreferencesService.class.getName());
-
- if (profile != null)
- return prefService.getRootNode().node("/profile/" + profile.getProfileId() + "/" + key + "/" + NODE_REPOSITORIES + "/" + getKey(location)); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
- return prefService.getRootNode().node("/profile/_SELF_/" + key + "/" + NODE_REPOSITORIES + "/" + getKey(location)); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
- }
-
- /*
- * 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;
- }
-}
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 040c44de8..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetLauncherNameAction.java
+++ /dev/null
@@ -1,47 +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.internal.provisional.p2.engine.ProvisioningAction;
-
-public class SetLauncherNameAction extends ProvisioningAction {
- public static final String ID = "setLauncherName"; //$NON-NLS-1$
-
- public IStatus execute(Map parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- Profile profile = (Profile) 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 parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- Profile profile = (Profile) 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, Profile 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();
- profile.setProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME, launcherName);
- 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 cdc72ce39..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetProgramPropertyAction.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.io.File;
-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.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class SetProgramPropertyAction extends ProvisioningAction {
- public static final String ID = "setProgramProperty"; //$NON-NLS-1$
-
- public IStatus execute(Map 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_ARTIFACT)) {
- try {
- propValue = 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 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;
- }
-
- private static String resolveArtifactParam(Map parameters) throws CoreException {
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- IArtifactKey[] artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.length == 0)
- throw new CoreException(Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu)));
-
- IArtifactKey artifactKey = artifacts[0];
-
- File fileLocation = Util.getArtifactFile(artifactKey, profile);
- if (fileLocation == null || !fileLocation.exists())
- throw new CoreException(Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey)));
- return fileLocation.getAbsolutePath();
- }
-} \ 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 55c7314e8..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.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.File;
-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.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.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 parameters) {
- 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));
-
- IArtifactKey[] artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.length == 0)
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = artifacts[0];
- // the bundleFile might be null here, that's OK.
- File bundleFile = Util.getArtifactFile(artifactKey, profile);
-
- String manifest = Util.getManifest(iu.getTouchpointData());
- if (manifest == null)
- return Util.createError(NLS.bind(Messages.missing_manifest, iu));
-
- BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, manifest);
- 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 parameters) {
- 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);
-
- IArtifactKey[] artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.length == 0)
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = artifacts[0];
- // the bundleFile might be null here, that's OK.
- File bundleFile = Util.getArtifactFile(artifactKey, profile);
-
- String manifest = Util.getManifest(iu.getTouchpointData());
- if (manifest == null)
- return Util.createError(NLS.bind(Messages.missing_manifest, iu));
-
- BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, manifest);
- 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 daf1ec901..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 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and 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.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.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class UninstallBundleAction extends ProvisioningAction {
- public static final String ID = "uninstallBundle"; //$NON-NLS-1$
-
- public IStatus execute(Map parameters) {
- return UninstallBundleAction.uninstallBundle(parameters);
- }
-
- public IStatus undo(Map parameters) {
- return InstallBundleAction.installBundle(parameters);
- }
-
- public static IStatus uninstallBundle(Map parameters) {
- 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 (iu.isFragment()) {
- System.out.println("What is a fragment doing here!!! -- " + iu); //$NON-NLS-1$
- return Status.OK_STATUS;
- }
-
- IArtifactKey[] artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.length == 0)
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = null;
- for (int i = 0; i < artifacts.length; i++) {
- if (artifacts[i].toString().equals(bundleId)) {
- artifactKey = artifacts[i];
- 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(artifactKey, profile);
-
- String manifest = Util.getManifest(iu.getTouchpointData());
- if (manifest == null)
- return Util.createError(NLS.bind(Messages.missing_manifest, iu));
-
- BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, manifest);
- 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 95ea30f15..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallFeatureAction.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.touchpoint.eclipse.actions;
-
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.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 parameters) {
- return UninstallFeatureAction.uninstallFeature(parameters);
- }
-
- public IStatus undo(Map parameters) {
- return InstallFeatureAction.installFeature(parameters);
- }
-
- public static IStatus uninstallFeature(Map 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);
-
- IArtifactKey[] artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.length == 0)
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = null;
- for (int i = 0; i < artifacts.length; i++) {
- if (artifacts[i].toString().equals(feature)) {
- artifactKey = artifacts[i];
- 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 36436a3ef..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/messages.properties
+++ /dev/null
@@ -1,29 +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}.
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 c3285ce7a..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.internal.provisional.p2.core.ProvisionException;
-
-/**
- * @since 1.0
- */
-public class Configuration {
-
- private List sites = new ArrayList();
- String date;
- boolean transientProperty;
- String version;
- String shared_ur;
-
- public static Configuration load(File location, URL osgiInstallArea) throws ProvisionException {
- return ConfigurationParser.parse(location, osgiInstallArea);
- }
-
- public Configuration() {
- super();
- }
-
- public void save(File location, URL osgiInstallArea) throws ProvisionException {
- ConfigurationWriter.save(this, location, osgiInstallArea);
- }
-
- public String getSharedUR() {
- return shared_ur;
- }
-
- public void setSharedUR(String value) {
- shared_ur = value;
- }
-
- public List getSites() {
- return internalGetSites(true);
- }
-
- List internalGetSites(boolean includeParent) {
- if (!includeParent)
- return sites;
- String shared = getSharedUR();
- if (shared == null)
- return sites;
- List result = new ArrayList(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/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/ConfigurationParser.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java
deleted file mode 100644
index c2e5d7de3..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java
+++ /dev/null
@@ -1,260 +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.update;
-
-import java.io.*;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.StringTokenizer;
-import javax.xml.parsers.*;
-import org.eclipse.equinox.internal.provisional.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.
- */
- public 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 rootList = new ArrayList();
- while (tokenizer.hasMoreTokens()) {
- try {
- URL rootEntry = new URL(tokenizer.nextToken().trim());
- rootList.add(rootEntry);
- } catch (MalformedURLException e) {
- // skip bad entries ...
- }
- }
- URL[] roots = (URL[]) 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)
- result.setUrl(getLocation(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 String getLocation(String urlString) {
- if (osgiInstallArea == null)
- return urlString;
- if (PLATFORM_BASE.equals(urlString))
- return osgiInstallArea.toExternalForm();
- return PathUtil.makeAbsolute(urlString, osgiInstallArea);
- }
-
- /*
- * 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())
- return null;
- try {
- InputStream input = new BufferedInputStream(new FileInputStream(file));
- Document document = load(input);
- return process(document);
- } 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 98d0890be..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java
+++ /dev/null
@@ -1,180 +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.net.MalformedURLException;
-import java.net.URL;
-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.internal.p2.core.helpers.URLUtil;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Activator;
-import org.eclipse.equinox.internal.provisional.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.
- */
- public 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 args = new HashMap();
-
- String value = configuration.getDate();
- if (value != null)
- args.put(ATTRIBUTE_DATE, value);
-
- 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 (Iterator iter = configuration.internalGetSites(false).iterator(); iter.hasNext();) {
- Site site = (Site) iter.next();
- 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();
- }
- }
- }
-
- /*
- * Write out the given site.
- */
- private static void write(XMLWriter writer, Site site, URL osgiInstallArea) {
- Map args = new HashMap();
-
- 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)
- 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 args = new HashMap();
- 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 1a98b007c..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/PathUtil.java
+++ /dev/null
@@ -1,124 +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.URL;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-
-/**
- *
- * @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.
- *
- * Method similar to one from SimpleConfigurationManipulatorImpl.
- */
- private static String makeRelative(IPath toRel, IPath base) {
- 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$
- 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 c4404f16e..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java
+++ /dev/null
@@ -1,176 +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.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 features = new HashSet();
- private List list = new ArrayList();
-
- public void addFeature(Feature feature) {
- this.features.add(feature);
- }
-
- public void addPlugin(String plugin) {
- this.list.add(plugin);
- }
-
- public Feature[] getFeatures() {
- return (Feature[]) 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 (Iterator iter = features.iterator(); iter.hasNext();) {
- Feature feature = (Feature) iter.next();
- if (id.equals(feature.getId())) {
- if (version == null || version.equals(feature.getVersion()))
- return feature;
- }
- }
- return null;
- }
-
- public Feature removeFeature(String featureURL) {
- for (Iterator iter = features.iterator(); iter.hasNext();) {
- Feature feature = (Feature) iter.next();
- 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 (String[]) list.toArray(new String[list.size()]);
- }
-
- public String getPolicy() {
- return policy;
- }
-
- 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;
- }
-
- 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 9b86646c1..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java
+++ /dev/null
@@ -1,122 +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.Iterator;
-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 parameters) {
- printTag(name, parameters, true, true);
- }
-
- public void printTag(String name, Map parameters, boolean shouldTab, boolean newLine) {
- StringBuffer sb = new StringBuffer();
- sb.append("<"); //$NON-NLS-1$
- sb.append(name);
- if (parameters != null)
- for (Iterator it = parameters.keySet().iterator(); it.hasNext();) {
- sb.append(" "); //$NON-NLS-1$
- String key = (String) it.next();
- 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 parameters) {
- startTag(name, parameters, true);
- }
-
- public void startTag(String name, Map 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.natives/.classpath b/bundles/org.eclipse.equinox.p2.touchpoint.natives/.classpath
deleted file mode 100644
index 7cdeb7319..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="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.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 78523cd05..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,331 +0,0 @@
-#Thu Aug 16 11:00:59 EDT 2007
-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=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.unsafeTypeOperation=warning
-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_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.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 edb4e9e6d..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,24 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.touchpoint.natives;singleton:=true
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.0.200.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.touchpoint.natives.Activator
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.core.location,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.osgi.util;version="1.0.0",
- org.osgi.framework;version="1.3.0"
-Bundle-ActivationPolicy: lazy
-Require-Bundle: org.eclipse.equinox.common
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Export-Package: org.eclipse.equinox.internal.p2.touchpoint.natives;x-internal:=true,
- org.eclipse.equinox.internal.p2.touchpoint.natives.actions;x-internal:=true
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 4bbd9bd55..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/build.properties
+++ /dev/null
@@ -1,18 +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
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 690324f2e..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.xml
+++ /dev/null
@@ -1,111 +0,0 @@
-<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/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 29fdbfdd1..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 unrestorable = new HashSet();
- 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 unrestorable) {
- // if there are unrestorable units log them
- //
- if (unrestorable != null && unrestorable.size() > 0) {
- for (Iterator itor = unrestorable.iterator(); itor.hasNext();)
- logError(NLS.bind(Messages.BackupStore_manual_restore_needed, ((File) itor.next()).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 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 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 33db8ff09..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java
+++ /dev/null
@@ -1,113 +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.IOException;
-import java.util.Map;
-import java.util.WeakHashMap;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.Touchpoint;
-import org.eclipse.osgi.util.NLS;
-
-public class NativeTouchpoint extends Touchpoint {
-
- public static final String PARM_BACKUP = "backup"; //$NON-NLS-1$
-
- private static Map backups = new WeakHashMap();
-
- public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map 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();
- 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 = (IBackupStore) 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 b9f79725f..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.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.location.AgentLocation;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-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 AgentLocation getAgentLocation() {
- return (AgentLocation) ServiceHelper.getService(Activator.getContext(), AgentLocation.class.getName());
- }
-
- public static IArtifactRepositoryManager getArtifactRepositoryManager() {
- return (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
- }
-
- public static IFileArtifactRepository getDownloadCacheRepo() throws ProvisionException {
- URI location = getDownloadCacheLocation();
- if (location == null)
- throw new IllegalStateException(Messages.could_not_obtain_download_cache);
- IArtifactRepositoryManager manager = getArtifactRepositoryManager();
- 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 properties = new HashMap(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() {
- AgentLocation location = getAgentLocation();
- return (location != null ? location.getArtifactRepositoryURI() : null);
- }
-
- /**
- * 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 unzippedFiles = new ArrayList();
- 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 (File[]) 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 146aa6ec1..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_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_ARTIFACT = "@artifact"; //$NON-NLS-1$
- public static final String PARM_ARTIFACT_REQUESTS = "artifactRequests"; //$NON-NLS-1$
- public static final String PARM_OPERAND = "operand"; //$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 c08a76180..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ChmodAction.java
+++ /dev/null
@@ -1,117 +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.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class ChmodAction extends ProvisioningAction {
- private static final String ACTION_CHMOD = "chmod"; //$NON-NLS-1$
-
- public IStatus execute(Map 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 collect = new ArrayList();
- 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 parameters) {
- //TODO: implement undo ??
- return Status.OK_STATUS;
- }
-
- public void chmod(String targetDir, String targetFile, String perms, String[] options) {
- 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 862c52963..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupcopyAction.java
+++ /dev/null
@@ -1,104 +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.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.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 parameters) {
- return cleanupcopy(parameters, true);
- }
-
- public IStatus undo(Map 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 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 directories = new ArrayList();
- 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 (Iterator it = directories.iterator(); it.hasNext();) {
- File directory = (File) it.next();
- 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 c5938e749..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupzipAction.java
+++ /dev/null
@@ -1,131 +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.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.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 parameters) {
- return cleanupzip(parameters, true);
- }
-
- public IStatus undo(Map parameters) {
- return UnzipAction.unzip(parameters, false);
- }
-
- public static IStatus cleanupzip(Map 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 iuProperties = profile.getInstallableUnitProperties(iu);
- String sourcePrefix = UNZIPPED + ActionConstants.PIPE + source + ActionConstants.PIPE;
- for (Iterator iterator = iuProperties.keySet().iterator(); iterator.hasNext();) {
- String key = (String) iterator.next();
- if (key.startsWith(sourcePrefix)) {
- if (unzipped == null) {
- iuPropertyKey = key;
- String storedTarget = key.substring(sourcePrefix.length());
- unzipped = substituteTarget(storedTarget, target, (String) 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 directories = new ArrayList();
- 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();
- }
- }
- // TODO: this will most likely leave garbage behind as directories must
- // be empty to be deleted - there is not guarantee that this structure has
- // the leafs first in the list of directories.
- // Since backup will deny backup of non empty directory a check must be made
- //
- for (Iterator it = directories.iterator(); it.hasNext();) {
- File directory = (File) it.next();
- if (store != null) {
- File[] children = directory.listFiles();
- 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 6fbf20b84..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CollectAction.java
+++ /dev/null
@@ -1,65 +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.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRequest;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-
-public class CollectAction extends ProvisioningAction {
-
- public static final String ACTION_COLLECT = "collect"; //$NON-NLS-1$
-
- public IStatus execute(Map parameters) {
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(ActionConstants.PARM_OPERAND);
- try {
- IArtifactRequest[] requests = collect(operand.second(), profile);
- Collection artifactRequests = (Collection) parameters.get(ActionConstants.PARM_ARTIFACT_REQUESTS);
- artifactRequests.add(requests);
- } catch (ProvisionException e) {
- return e.getStatus();
- }
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map parameters) {
- // nothing to do for now
- return Status.OK_STATUS;
- }
-
- IArtifactRequest[] collect(IInstallableUnit installableUnit, IProfile profile) throws ProvisionException {
- IArtifactKey[] toDownload = installableUnit.getArtifacts();
- if (toDownload == null)
- return new IArtifactRequest[0];
- IArtifactRepository destination = Util.getDownloadCacheRepo();
- IArtifactRequest[] requests = new IArtifactRequest[toDownload.length];
- int count = 0;
- for (int i = 0; i < toDownload.length; i++) {
- //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().createMirrorRequest(toDownload[i], 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 c94c66853..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CopyAction.java
+++ /dev/null
@@ -1,164 +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.*;
-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.internal.provisional.p2.artifact.repository.IFileArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.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 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 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_ARTIFACT)) {
- //TODO: fix wherever this occurs -- investigate as this is probably not desired
- if (iu.getArtifacts() == null || iu.getArtifacts().length == 0)
- return Status.OK_STATUS;
-
- IArtifactKey artifactKey = iu.getArtifacts()[0];
-
- IFileArtifactRepository downloadCache;
- try {
- downloadCache = Util.getDownloadCacheRepo();
- } catch (ProvisionException e) {
- return e.getStatus();
- }
- File fileLocation = downloadCache.getArtifactFile(artifactKey);
- if ((fileLocation == null) || !fileLocation.exists())
- return Util.createError(NLS.bind(Messages.artifact_not_available, artifactKey));
- source = fileLocation.getAbsolutePath();
- }
-
- 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 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 copiedFiles = new ArrayList();
- xcopy(copiedFiles, source, target, overwrite, backupStore);
- return (File[]) 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 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 b34903c42..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/LinkAction.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.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.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class LinkAction extends ProvisioningAction {
- public static final String ID = "ln"; //$NON-NLS-1$
-
- public IStatus execute(Map 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 parameters) {
- 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 {
- // 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 ce60b52ca..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.internal.provisional.p2.engine.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 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 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 ab442c416..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RemoveAction.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.touchpoint.natives.actions;
-
-import org.eclipse.equinox.internal.p2.touchpoint.natives.IBackupStore;
-
-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.internal.provisional.p2.engine.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 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 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 26ea0464d..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.internal.provisional.p2.engine.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 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 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 f255bf49c..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/UnzipAction.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.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.internal.provisional.p2.artifact.repository.IFileArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.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 parameters) {
- return unzip(parameters, true);
- }
-
- public IStatus undo(Map 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 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_ARTIFACT)) {
- //TODO: fix wherever this occurs -- investigate as this is probably not desired
- if (iu.getArtifacts() == null || iu.getArtifacts().length == 0)
- return Status.OK_STATUS;
-
- IArtifactKey artifactKey = iu.getArtifacts()[0];
-
- IFileArtifactRepository downloadCache;
- try {
- downloadCache = Util.getDownloadCacheRepo();
- } catch (ProvisionException e) {
- return e.getStatus();
- }
- File fileLocation = downloadCache.getArtifactFile(artifactKey);
- if ((fileLocation == null) || !fileLocation.exists())
- return Util.createError(NLS.bind(Messages.artifact_not_available, artifactKey));
- source = fileLocation.getAbsolutePath();
- }
- 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.rcp/.classpath b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.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/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.cvsignore b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.cvsignore
deleted file mode 100644
index c5e82d745..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.project b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.project
deleted file mode 100644
index 473c3a187..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.ui.admin.rcp</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.rcp/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 78523cd05..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,331 +0,0 @@
-#Thu Aug 16 11:00:59 EDT 2007
-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=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.unsafeTypeOperation=warning
-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_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.ui.admin.rcp/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index b85a3687d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:59:25 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.rcp/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 0d1ef4bc1..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Thu Jul 26 19:13:12 EDT 2007
-eclipse.preferences.version=1
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/META-INF/MANIFEST.MF
deleted file mode 100644
index 59c799b4d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.equinox.p2.ui.admin.rcp; singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.ui.admin.rcp.Activator
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.equinox.internal.p2.ui.admin.rcp;x-internal:=true
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/ProvAdminUI.launch b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/ProvAdminUI.launch
deleted file mode 100644
index e334798f2..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/ProvAdminUI.launch
+++ /dev/null
@@ -1,306 +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="org.eclipse.equinox.p2.core"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/ProvAdminUI"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<stringAttribute key="execEnvironment" value="CDC-1.0/Foundation-1.0"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -console -consolelog -product org.eclipse.equinox.p2.ui.admin.rcp.product"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="restart" value="false"/>
-<stringAttribute key="selectedPlugin" value="org.eclipse.equinox.p2.core"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.ant.core@default:default,org.eclipse.help@default:default,org.eclipse.osgi.services@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net@default:default,com.ibm.icu@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.equinox.security@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.core.runtime@default:true,org.eclipse.swt.cocoa.macosx@default:false,org.eclipse.core.contenttype@default:default,org.eclipse.jface@default:default,org.eclipse.core.variables@default:default,org.eclipse.equinox.common@2:true,org.eclipse.osgi@:,org.eclipse.swt@default:default,org.eclipse.core.databinding@default:default,org.eclipse.equinox.security.macosx@default:false,org.eclipse.jface.databinding@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.ui@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.expressions@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.core.commands@default:default"/>
-<booleanAttribute key="tracing" value="true"/>
-<mapAttribute key="tracingOptions">
-<mapEntry key="org.eclipse.team.cvs.core/syncchangeevents" value="false"/>
-<mapEntry key="org.eclipse.equinox.registry/debug" value="false"/>
-<mapEntry key="org.eclipse.ecf/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/listeners" value="500"/>
-<mapEntry key="org.eclipse.debug.ui/debug/contextlaunching" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/needbuild" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/viewer" value="false"/>
-<mapEntry key="org.eclipse.update.configurator/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/monitor/activation" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/content_assist/extensions" value="1000"/>
-<mapEntry key="org.eclipse.ui.ide/debug/gc" value="false"/>
-<mapEntry key="org.eclipse.core.resources/contenttype/cache" value="false"/>
-<mapEntry key="org.eclipse.ecf.filetransfer/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/shutdown" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/updateSequence" value="false"/>
-<mapEntry key="org.eclipse.osgi/monitor/classes" value="false"/>
-<mapEntry key="org.eclipse.equinox.preferences/get" value="false"/>
-<mapEntry key="org.eclipse.jdt.apt.core/debug/generatedFileMaps" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/debug/context" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/locks" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/swtdebug" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.core/core/parseproblems" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javamodel" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/uses" value="false"/>
-<mapEntry key="org.eclipse.ui.intro.universal/trace/logInfo" value="true"/>
-<mapEntry key="org.eclipse.ecf/debug" value="true"/>
-<mapEntry key="org.eclipse.debug.core/debug/events" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/trace/printHTML" value="false"/>
-<mapEntry key="org.eclipse.equinox.registry/debug/events" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javadelta/verbose" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug" value="true"/>
-<mapEntry key="org.eclipse.pde.core/validation" value="false"/>
-<mapEntry key="org.eclipse.core.expressions/tracePropertyResolving" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore" value="false"/>
-<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/checkConditions" value="300"/>
-<mapEntry key="org.eclipse.ui/perf/perspective.listeners" value="200"/>
-<mapEntry key="org.eclipse.ecf/debug/filter" value="*"/>
-<mapEntry key="org.eclipse.jdt.core/perf/containerinitializer" value="5000"/>
-<mapEntry key="org.eclipse.osgi/trace/filename" value="runtime.traces"/>
-<mapEntry key="org.eclipse.update.core/debug/web" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/activation" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/perspective.switch" value="800"/>
-<mapEntry key="org.eclipse.ui/perf/part.input" value="200"/>
-<mapEntry key="org.eclipse.ecf/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.jface.text/debug/AnnotationPainter" value="false"/>
-<mapEntry key="org.eclipse.ecf.filetransfer/debug/filter" value="*"/>
-<mapEntry key="org.eclipse.osgi/resolver/imports" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/filters" value="trace.properties"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin/resolver" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/infopop" value="false"/>
-<mapEntry key="org.eclipse.equinox.preferences/general" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/debug" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/threading" value="false"/>
-<mapEntry key="org.eclipse.jdt.apt.pluggable.core/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/search/participants" value="300"/>
-<mapEntry key="org.eclipse.ui/perf/part.listeners" value="200"/>
-<mapEntry key="org.eclipse.osgi/resolver/debug" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/install" value="false"/>
-<mapEntry key="org.eclipse.core.resources/debug" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser/inprocess" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.control" value="800"/>
-<mapEntry key="org.eclipse.osgi/profile/impl" value="org.eclipse.osgi.internal.profile.DefaultProfileLogger"/>
-<mapEntry key="org.eclipse.osgi/profile/benchmark" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/cpresolution/advanced" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/cvsprotocol" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/postaction" value="false"/>
-<mapEntry key="org.eclipse.ecf/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/manifest" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/selection" value="300"/>
-<mapEntry key="org.eclipse.help/debug/context" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/content_assist_sorters/extensions" value=""/>
-<mapEntry key="org.eclipse.jdt.core/debug/builder" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/requires" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ssh/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.verbose" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/startlevel" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/installhandler" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javadelta" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/tree" value="false"/>
-<mapEntry key="org.eclipse.core.resources/preferences" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/flags/noBrowser" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/save.participants" value="500"/>
-<mapEntry key="org.eclipse.core.resources/natures" value="false"/>
-<mapEntry key="org.eclipse.help.base/debug/search" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.core/metadata/parsing" value="true"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/buffersize" value="256"/>
-<mapEntry key="org.eclipse.osgi/resolver/cycles" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/variableinitializer" value="5000"/>
-<mapEntry key="org.eclipse.ui/trace/keyBindings.verbose" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/model" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/perf/success" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/contexts.performance" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/compatibility/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/declaredImages" value="false"/>
-<mapEntry key="org.eclipse.pde.build/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/location" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/contexts.verbose" value="false"/>
-<mapEntry key="org.eclipse.help.base/debug" value="true"/>
-<mapEntry key="org.eclipse.ui/debug/showAllJobs" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.core/artifacts/mirrors" value="true"/>
-<mapEntry key="org.eclipse.core.jobs/jobs" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/perspective.create" value="800"/>
-<mapEntry key="org.eclipse.ui/trace/sources" value="false"/>
-<mapEntry key="org.eclipse.debug.core/debug/commands" value="false"/>
-<mapEntry key="org.eclipse.core.resources/strings" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPartReference" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug/undomonitor" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/metainfo" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.activate" value="200"/>
-<mapEntry key="org.eclipse.ui.intro.universal/debug" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/perf" value="false"/>
-<mapEntry key="org.eclipse.core.resources/contenttype" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/contributions" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/job.stale" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/workbench.start" value="45000"/>
-<mapEntry key="org.eclipse.jdt.core/debug/completion" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/indexmanager" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPerspectiveListener" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/loader" value="false"/>
-<mapEntry key="org.eclipse.ui.workbench/debug" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/launchhistory" value="false"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/logsynchronously" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/classLoading" value="false"/>
-<mapEntry key="org.eclipse.jface.text/debug/FastPartitioner/PositionCache" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.performance" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/debug" value="false"/>
-<mapEntry key="org.eclipse.ecf.filetransfer/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.verbose.commandId" value=""/>
-<mapEntry key="org.eclipse.osgi/debug/filter" value="false"/>
-<mapEntry key="org.eclipse.jdt.apt.core/debug/compilationEnv" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/ASTProvider" value="false"/>
-<mapEntry key="org.eclipse.help.webapp/debug/workingsets" value="false"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/logfilename" value=""/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/connect" value="false"/>
-<mapEntry key="org.eclipse.jface.text/debug/ContentAssistSubjectAdapters" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/markers" value="false"/>
-<mapEntry key="org.eclipse.ecf.filetransfer/debug" value="true"/>
-<mapEntry key="org.eclipse.ui/trace/graphics" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/resolution" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ssh/ssh_protocol" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/snapshot" value="1000"/>
-<mapEntry key="org.eclipse.help/debug/search" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/needbuildstack" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.init" value="800"/>
-<mapEntry key="org.eclipse.ecf.identity/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/trace/logPerformance" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/converter/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.create" value="800"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser" value="false"/>
-<mapEntry key="org.eclipse.equinox.preferences/set" value="false"/>
-<mapEntry key="org.eclipse.team.core/streams" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/stacktrace" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/keyBindings" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/TypeConstraints" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/beginend" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/interrupt" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/showHeapStatus" value="true"/>
-<mapEntry key="org.eclipse.ui/perf/contentTypes" value="200"/>
-<mapEntry key="org.eclipse.ui/trace/commands" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/delta" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/search" value="false"/>
-<mapEntry key="org.eclipse.jdt.apt.core/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/completion" value="300"/>
-<mapEntry key="org.eclipse.jdt.core/debug/compiler" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.garbagecollector/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javamodel/cache" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/configuration" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/messageBundles" value="false"/>
-<mapEntry key="org.eclipse.jdt.core.manipulation/debug" value="true"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener2" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener2" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/reconcile" value="1000"/>
-<mapEntry key="org.eclipse.jdt.core/debug/hierarchy" value="false"/>
-<mapEntry key="org.eclipse.help.webapp/debug" value="true"/>
-<mapEntry key="org.eclipse.ui/debug/workingSets" value="false"/>
-<mapEntry key="org.eclipse.core.resources/refresh" value="false"/>
-<mapEntry key="org.eclipse.team.core/backgroundevents" value="false"/>
-<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/createChanges" value="300"/>
-<mapEntry key="org.eclipse.jdt.core/debug/cpresolution" value="false"/>
-<mapEntry key="org.eclipse.ecf/debug/flag" value="true"/>
-<mapEntry key="org.eclipse.update.core/debug/warning" value="false"/>
-<mapEntry key="org.eclipse.ecf.filetransfer/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/parsing" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/explorer/makeActions" value="1000"/>
-<mapEntry key="org.eclipse.core.resources/restore/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/contentProvider" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPageListener" value="false"/>
-<mapEntry key="org.eclipse.team.core/threading" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachelookup" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.core/engine/installregistry" value="true"/>
-<mapEntry key="org.eclipse.update.core/debug/reconciler" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/security" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.osgi/profile/startup" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/services" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.core/generator/parsing" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/markers" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/preferences/plugin" value="false"/>
-<mapEntry key="org.eclipse.osgi/monitor/resources" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/timing" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/selection" value="false"/>
-<mapEntry key="org.eclipse.ecf.identity/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/ResultCollector" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/snapshots" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/explorer/createPartControl" value="1300"/>
-<mapEntry key="org.eclipse.team.cvs.core/dirtycaching" value="false"/>
-<mapEntry key="org.eclipse.jdt.apt.core/debug/generatedFiles" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/zipaccess" value="false"/>
-<mapEntry key="org.eclipse.pde.core/cache" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachecopy" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/bundleTime" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/operations.verbose" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/metafiles" value="false"/>
-<mapEntry key="org.eclipse.team.core/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/workbench.restore" value="30000"/>
-<mapEntry key="org.eclipse.osgi/debug/events" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/errorondeadlock" value="false"/>
-<mapEntry key="org.eclipse.ecf.filetransfer/debug/flag" value="true"/>
-<mapEntry key="org.eclipse.ui/debug/swtdebugglobal" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug/internalerror/openDialog" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.core/debug" value="true"/>
-<mapEntry key="org.eclipse.ui.intro.universal/trace/logPerformance" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug/markers" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/uijob" value="200"/>
-<mapEntry key="org.eclipse.jdt.core/debug/sourcemapper" value="false"/>
-<mapEntry key="org.eclipse.ecf.identity/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.ecf.identity/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.ecf.identity/debug" value="true"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/deltas" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/generics" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/wiring" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/javadeltalistener" value="500"/>
-<mapEntry key="org.eclipse.osgi/profile/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/contexts" value="false"/>
-<mapEntry key="org.eclipse.core.contenttype/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/multipageeditor" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/invoking" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/operations" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/builders" value="10000"/>
-<mapEntry key="org.eclipse.update.core/debug/type" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/page.listeners" value="200"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/explorer/RefactorActionGroup" value="150"/>
-<mapEntry key="org.eclipse.core.resources/history" value="false"/>
-<mapEntry key="org.eclipse.team.core/refreshjob" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/debug" value="true"/>
-<mapEntry key="org.eclipse.jface.text/debug/AbstractInformationControlManager" value="false"/>
-<mapEntry key="org.eclipse.debug.core/debug" value="false"/>
-<mapEntry key="org.eclipse.help/debug" value="true"/>
-<mapEntry key="org.eclipse.jface.text.source/debug/RevisionRulerColumn" value="false"/>
-<mapEntry key="org.eclipse.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/packageadmin" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/failure" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPropertyChangeListener" value="false"/>
-<mapEntry key="org.eclipse.ecf.filetransfer/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.ui.browser/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/tree" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.core.resources/restore/metainfo" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/mastertable" value="false"/>
-<mapEntry key="org.eclipse.pde.core/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/buffermanager" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug" value="false"/>
-<mapEntry key="org.eclipse.ecf/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/trace/logInfo" value="true"/>
-<mapEntry key="org.eclipse.core.resources/restore/mastertable" value="false"/>
-<mapEntry key="org.eclipse.ui/experimental/menus" value="false"/>
-<mapEntry key="org.eclipse.pde.core/classpath" value="false"/>
-</mapAttribute>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="false"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.simpleconfigurator.manipulator@3:true,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.ecf@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.frameworkadmin.equinox@2:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.apache.commons.logging@default:default,org.eclipse.equinox.p2.ui.admin.rcp@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.frameworkadmin@2:true,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.exemplarysetup@default:default,org.eclipse.equinox.p2.ui.admin@default:default,org.eclipse.ecf.ssl@default:false,org.apache.commons.httpclient@default:default,org.sat4j.pb@default:default,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.apache.commons.codec@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.p2.engine@default:default,org.sat4j.core@default:default"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/about.html b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/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.rcp/build.properties b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/build.properties
deleted file mode 100644
index 35011865d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/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/,\
- .,\
- plugin.xml,\
- about.html,\
- META-INF/
-src.includes = about.html
-source.. = src/
-
-
-
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/config.ini b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/config.ini
deleted file mode 100644
index a709bafa6..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/config.ini
+++ /dev/null
@@ -1,50 +0,0 @@
-osgi.bundles=\
- com.ibm.icu,\
- org.eclipse.core.commands,\
- org.eclipse.core.contenttype,\
- org.eclipse.core.databinding,\
- org.eclipse.core.expressions,\
- org.eclipse.core.jobs,\
- org.eclipse.core.runtime,\
- 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.launcher,\
- org.eclipse.equinox.launcher.win32.win32.x86,\
- org.eclipse.equinox.preferences,\
- org.eclipse.equinox.p2.jarprocessor,\
- 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.download,\
- org.eclipse.equinox.p2.engine,\
- org.eclipse.equinox.p2.exemplarysetup@start,\
- org.eclipse.equinox.p2.metadata,\
- org.eclipse.equinox.p2.metadata.repository,\
- 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.registry,\
- org.eclipse.equinox.simpleconfigurator@1:start,\
- org.eclipse.equinox.simpleconfigurator.manipulator@start,\
- org.eclipse.help,\
- org.eclipse.jface,\
- org.eclipse.jface.databinding,\
- org.eclipse.osgi.services,\
- org.eclipse.swt,\
- org.eclipse.swt.win32.win32.x86,\
- org.eclipse.ui,\
- org.eclipse.ui.workbench,\
- org.sat4j.core,\
- org.sat4j.pb
-eclipse.product=org.eclipse.equinox.p2.ui.admin.rcp.product
-org.eclipse.equinox.simpleconfigurator.useReference=true
-org.eclipse.update.reconcile=false \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/icons/provision.gif b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/icons/provision.gif
deleted file mode 100644
index c984fba70..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/icons/provision.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/icons/pview.gif b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/icons/pview.gif
deleted file mode 100644
index 4aa54a69d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/icons/pview.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/plugin.properties b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/plugin.properties
deleted file mode 100644
index f90be3c48..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/plugin.properties
+++ /dev/null
@@ -1,21 +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 RCP app
-#
-providerName = Eclipse.org - Equinox
-bundleName=Provisioning Admin UI RCP (Incubation)
-productName=Eclipse Provisioning
-appName=Eclipse Provisioning Admin UI
-perspectiveName=Eclipse Provisioning
-Views.Progress=Progress View
-aboutText= Eclipse Provisioning Admin UI \n\n\
-(c) Copyright Eclipse contributors and others 2007-2009. All rights reserved.\n
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/plugin.xml b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/plugin.xml
deleted file mode 100644
index aa8349e1d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/plugin.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-
- <extension
- id="org.eclipse.equinox.p2.ui.admin.rcp.application"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run
- class="org.eclipse.equinox.internal.p2.ui.admin.rcp.Application">
- </run>
- </application>
- </extension>
- <extension
- point="org.eclipse.core.runtime.products"
- id="product">
- <product
- name="%productName"
- application="org.eclipse.equinox.p2.ui.admin.rcp.application">
- <property
- name="appName"
- value="%productName"/>
- <property
- name="aboutText"
- value="%aboutText"/>
- <property
- name="windowImages"
- value="platform:/plugin/org.eclipse.equinox.p2.ui.admin/icons/provision.gif"/>
-
- </product>
- </extension>
-
- <extension
- point="org.eclipse.ui.views">
- <view
- name="%Views.Progress"
- icon="$nl$/icons/pview.gif"
- category="org.eclipse.ui"
- class="org.eclipse.ui.internal.progress.ProgressView"
- id="org.eclipse.ui.views.ProgressView">
- </view>
- </extension>
-
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="%perspectiveName"
- class="org.eclipse.equinox.internal.p2.ui.admin.rcp.ProvisioningRCPPerspective"
- id="org.eclipse.equinox.p2.ui.admin.rcp.ProvisioningRCPPerspective">
- </perspective>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/plugin_customization.ini b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/plugin_customization.ini
deleted file mode 100644
index 939a62ec9..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/plugin_customization.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-org.eclipse.ui/DOCK_PERSPECTIVE_BAR=topRight
-org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = false
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/rcp.product b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/rcp.product
deleted file mode 100644
index 866949a28..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/rcp.product
+++ /dev/null
@@ -1,200 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="%productName" id="org.eclipse.equinox.p2.ui.admin.rcp.product" application="org.eclipse.equinox.p2.ui.admin.rcp.application" version="1.0.100.@qualifier@" useFeatures="false" includeLaunchers="true">
-
- <aboutInfo>
- <text>
- %aboutText
- </text>
- </aboutInfo>
-
- <configIni use="default">
- <linux>/org.eclipse.equinox.p2.ui.admin.rcp/config.ini</linux>
- <macosx>/org.eclipse.equinox.p2.ui.admin.rcp/config.ini</macosx>
- <solaris>/org.eclipse.equinox.p2.ui.admin.rcp/config.ini</solaris>
- <win32>/org.eclipse.equinox.p2.ui.admin.rcp/config.ini</win32>
- </configIni>
-
- <launcherArgs>
- <vmArgs>-Xms40m
--Xmx256m</vmArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -Xms40m -Xmx256m</vmArgsMac>
- </launcherArgs>
-
- <windowImages i16="/org.eclipse.equinox.p2.ui.admin/icons/provision.gif"/>
-
- <launcher name="eclipse">
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <license>
- <url>http://www.opensource.org/licenses/eclipse-1.0.txt</url>
- <text>
- ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT
-March 17, 2005
-
-Usage Of Content
-
-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.
-
-Applicable Licenses
-
-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 http://www.eclipse.org/legal/epl-v10.html.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.
-
-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;).
-
- - 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;).
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)
- in a directory named &quot;plugins&quot;.
- - 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.
- - 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.
-
-Features may also include other Features (&quot;Included Features&quot;). Files named
-&quot;feature.xml&quot; may contain a list of the names and version numbers of
-Included Features.
-
-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:
-
- - The top-level (root) directory
- - Plug-in and Fragment directories
- - Inside Plug-ins and Fragments packaged as JARs
- - Sub-directories of the directory named &quot;src&quot; of certain Plug-ins
- - Feature directories
-
-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;. 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.
-
-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):
-
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)
-
-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.
-
-Cryptography
-
-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&apos;s laws,
-regulations and policies concerning the import, possession, or use,
-and re-export of encryption software, to see if this is permitted.
-
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
- </text>
- </license>
-
- <plugins>
- <plugin id="com.ibm.icu"/>
- <plugin id="org.apache.commons.httpclient"/>
- <plugin id="org.eclipse.core.commands"/>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.databinding"/>
- <plugin id="org.eclipse.core.expressions"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.net"/>
- <plugin id="org.eclipse.core.runtime"/>
- <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.launcher"/>
- <plugin id="org.eclipse.equinox.launcher.cocoa.macosx" fragment="true"/>
- <plugin id="org.eclipse.equinox.launcher.gtk.linux.x86" fragment="true"/>
- <plugin id="org.eclipse.equinox.launcher.win32.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
- <plugin id="org.eclipse.equinox.p2.console"/>
- <plugin id="org.eclipse.equinox.p2.core"/>
- <plugin id="org.eclipse.equinox.p2.director"/>
- <plugin id="org.eclipse.equinox.p2.engine"/>
- <plugin id="org.eclipse.equinox.p2.exemplarysetup"/>
- <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.touchpoint.eclipse"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.natives"/>
- <plugin id="org.eclipse.equinox.p2.ui"/>
- <plugin id="org.eclipse.equinox.p2.ui.admin" fragment=""/>
- <plugin id="org.eclipse.equinox.p2.ui.admin.rcp"/>
- <plugin id="org.eclipse.equinox.preferences"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <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.cocoa.macosx" fragment="true"/>
- <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.net"/>
- <plugin id="org.eclipse.ui.workbench"/>
- <plugin id="org.sat4j.core"/>
- <plugin id="org.sat4j.pb"/>
- </plugins>
-
-
-</product>
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/splash.bmp b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/splash.bmp
deleted file mode 100644
index 4aed637e9..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/splash.bmp
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/Activator.java b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/Activator.java
deleted file mode 100644
index 05fb82d29..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/Activator.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.internal.p2.ui.admin.rcp;
-
-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.ui.admin.rcp"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- public Activator() {
- // contstructor
- }
-
- /*
- * (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;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext bundleContext) throws Exception {
- plugin = null;
- super.stop(bundleContext);
- }
-
- /**
- * 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/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/Application.java b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/Application.java
deleted file mode 100644
index 901a884df..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/Application.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.rcp;
-
-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) throws Exception {
- 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/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationActionBarAdvisor.java b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationActionBarAdvisor.java
deleted file mode 100644
index 2612358e1..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationActionBarAdvisor.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.rcp;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-
-public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
-
- IAction prefsAction, aboutAction, quitAction;
-
- public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
- super(configurer);
- }
-
- protected void makeActions(IWorkbenchWindow window) {
- quitAction = ActionFactory.QUIT.create(window);
- prefsAction = ActionFactory.PREFERENCES.create(window);
- aboutAction = ActionFactory.ABOUT.create(window);
- }
-
- protected void fillMenuBar(IMenuManager menuBar) {
- IMenuManager fileMenu = new MenuManager(ProvAdminUIMessages.ApplicationActionBarAdvisor_FileMenuName, "file"); //$NON-NLS-1$
- menuBar.add(fileMenu);
- fileMenu.add(quitAction);
-
- IMenuManager windowMenu = new MenuManager(ProvAdminUIMessages.ApplicationActionBarAdvisor_WindowMenuName, "window"); //$NON-NLS-1$
- menuBar.add(windowMenu);
- windowMenu.add(prefsAction);
-
- IMenuManager helpMenu = new MenuManager(ProvAdminUIMessages.ApplicationActionBarAdvisor_HelpMenuName, "help"); //$NON-NLS-1$
- menuBar.add(helpMenu);
- helpMenu.add(aboutAction);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchAdvisor.java b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchAdvisor.java
deleted file mode 100644
index 5955baa8a..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchAdvisor.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.p2.ui.admin.rcp;
-
-import org.eclipse.ui.application.*;
-
-public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
-
- public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- return new ApplicationWorkbenchWindowAdvisor(configurer);
- }
-
- public String getInitialWindowPerspectiveId() {
- return "org.eclipse.equinox.p2.ui.admin.rcp.ProvisioningRCPPerspective"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchWindowAdvisor.java b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchWindowAdvisor.java
deleted file mode 100644
index 14d223631..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchWindowAdvisor.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.rcp;
-
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.application.*;
-
-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();
- // The workbench progress manager won't get initialized until I refer to it.
- // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=208963
- PlatformUI.getWorkbench().getProgressService();
- configurer.setInitialSize(new Point(800, 600));
- configurer.setShowCoolBar(false);
- configurer.setShowStatusLine(true);
- configurer.setShowProgressIndicator(true);
- configurer.setTitle(ProvAdminUIMessages.ApplicationWindowTitle);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ProvAdminUIMessages.java b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ProvAdminUIMessages.java
deleted file mode 100644
index c64438c04..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ProvAdminUIMessages.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.ui.admin.rcp;
-
-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.rcp.messages"; //$NON-NLS-1$
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ProvAdminUIMessages.class);
- }
- public static String ApplicationActionBarAdvisor_FileMenuName;
- public static String ApplicationActionBarAdvisor_HelpMenuName;
- public static String ApplicationActionBarAdvisor_WindowMenuName;
- public static String ApplicationWindowTitle;
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ProvisioningRCPPerspective.java b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ProvisioningRCPPerspective.java
deleted file mode 100644
index 0a2e0cbb0..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ProvisioningRCPPerspective.java
+++ /dev/null
@@ -1,48 +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.rcp;
-
-import org.eclipse.ui.*;
-
-/**
- * Perspective which makes the standard provisioning views available.
- *
- * @since 3.4
- *
- */
-public class ProvisioningRCPPerspective implements IPerspectiveFactory {
-
- private IPageLayout factory;
- private static final String METADATA_REPOSITORIES = "org.eclipse.p2.ui.admin.MetadataRepositoriesView"; //$NON-NLS-1$
- private static final String ARTIFACT_REPOSITORIES = "org.eclipse.p2.ui.admin.ArtifactRepositoriesView"; //$NON-NLS-1$
- private static final String PROFILES = "org.eclipse.p2.ui.admin.ProfilesView"; //$NON-NLS-1$
-
- public ProvisioningRCPPerspective() {
- super();
- }
-
- public void createInitialLayout(IPageLayout layout) {
- this.factory = layout;
- addViews();
- }
-
- private void addViews() {
- IFolderLayout top = factory.createFolder("top", //$NON-NLS-1$
- IPageLayout.TOP, 0.5f, factory.getEditorArea());
- top.addView(METADATA_REPOSITORIES);
- factory.getViewLayout(METADATA_REPOSITORIES).setCloseable(false);
- top.addView(ARTIFACT_REPOSITORIES);
- factory.getViewLayout(ARTIFACT_REPOSITORIES).setCloseable(false);
- factory.addView(PROFILES, IPageLayout.BOTTOM, 0.65f, "top"); //$NON-NLS-1$
- factory.getViewLayout(PROFILES).setCloseable(false);
- factory.setEditorAreaVisible(false);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/messages.properties b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/messages.properties
deleted file mode 100644
index e5decd174..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/messages.properties
+++ /dev/null
@@ -1,15 +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
-###############################################################################
-
-ApplicationWindowTitle=Eclipse Provisioning
-ApplicationActionBarAdvisor_FileMenuName=&File
-ApplicationActionBarAdvisor_WindowMenuName=&Window
-ApplicationActionBarAdvisor_HelpMenuName=&Help
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 ce7393340..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="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <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 c5e82d745..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
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 78523cd05..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,331 +0,0 @@
-#Thu Aug 16 11:00:59 EDT 2007
-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=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.unsafeTypeOperation=warning
-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_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.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 ded400b23..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,40 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.equinox.p2.ui.admin;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIActivator
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.ui.model,
- org.eclipse.equinox.internal.p2.ui.query,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.ui,
- org.eclipse.equinox.internal.provisional.p2.ui.actions,
- org.eclipse.equinox.internal.provisional.p2.ui.dialogs,
- org.eclipse.equinox.internal.provisional.p2.ui.model,
- org.eclipse.equinox.internal.provisional.p2.ui.operations,
- org.eclipse.equinox.internal.provisional.p2.ui.policy,
- org.eclipse.equinox.internal.provisional.p2.ui.viewers,
- org.eclipse.equinox.internal.provisional.p2.updatechecker,
- org.eclipse.osgi.service.environment;version="1.0.0",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0"
-Export-Package: org.eclipse.equinox.internal.p2.ui.admin;x-internal:=true,
- 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-ActivationPolicy: lazy
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 35011865d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/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/,\
- .,\
- plugin.xml,\
- about.html,\
- META-INF/
-src.includes = about.html
-source.. = src/
-
-
-
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 d866395a7..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.internal.provisional.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.internal.provisional.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.provisional.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.internal.provisional.p2.repository.IRepository"/>
- </enabledWhen>
- </page>
-
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddArtifactRepositoryOperation.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddArtifactRepositoryOperation.java
deleted file mode 100644
index 7882bf660..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddArtifactRepositoryOperation.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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.AddRepositoryOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-
-/**
- * Operation which adds an artifact repository given its URI.
- *
- * @since 3.4
- */
-public class AddArtifactRepositoryOperation extends AddRepositoryOperation {
-
- public AddArtifactRepositoryOperation(String label, URI location) {
- super(label, new URI[] {location});
- }
-
- protected IStatus doBatchedExecute(IProgressMonitor monitor) throws ProvisionException {
- SubMonitor mon = SubMonitor.convert(monitor, locations.length);
- for (int i = 0; i < locations.length; i++) {
- ProvisioningUtil.addArtifactRepository(locations[i], notify);
- mon.worked(1);
- }
- return okStatus();
- }
-
- protected void setNickname(URI location, String nickname) throws ProvisionException {
- for (int i = 0; i < locations.length; i++) {
- ProvisioningUtil.setArtifactRepositoryProperty(location, IRepository.PROP_NICKNAME, nickname);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddMetadataRepositoryOperation.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddMetadataRepositoryOperation.java
deleted file mode 100644
index 4d1baa1b2..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddMetadataRepositoryOperation.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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.AddRepositoryOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-
-/**
- * Operation that adds a metadata repository given its URL.
- *
- * @since 3.4
- */
-public class AddMetadataRepositoryOperation extends AddRepositoryOperation {
-
- public AddMetadataRepositoryOperation(String label, URI location) {
- super(label, new URI[] {location});
- }
-
- protected IStatus doBatchedExecute(IProgressMonitor monitor) throws ProvisionException {
- SubMonitor mon = SubMonitor.convert(monitor, locations.length);
- for (int i = 0; i < locations.length; i++) {
- ProvisioningUtil.addMetadataRepository(locations[i], notify);
- mon.worked(1);
- }
- return okStatus();
- }
-
- protected void setNickname(URI location, String nickname) throws ProvisionException {
- for (int i = 0; i < locations.length; i++) {
- ProvisioningUtil.setMetadataRepositoryProperty(location, IRepository.PROP_NICKNAME, nickname);
- }
- }
-}
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 376bad13a..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java
+++ /dev/null
@@ -1,83 +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.net.URI;
-import java.util.ArrayList;
-import org.eclipse.equinox.internal.p2.ui.admin.dialogs.AddArtifactRepositoryDialog;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvisioningOperationRunner;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.ArtifactRepositories;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.RemoveRepositoryOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.StructuredViewerProvisioningListener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * This view allows users to interact with artifact repositories
- *
- * @since 3.4
- */
-public class ArtifactRepositoriesView extends RepositoriesView {
-
- /**
- *
- */
- public ArtifactRepositoriesView() {
- // constructor
- }
-
- protected Object getInput() {
- return new ArtifactRepositories(ProvAdminUIActivator.getDefault().getPolicy());
- }
-
- 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, ProvAdminUIActivator.getDefault().getPolicy()).open();
- }
-
- protected RemoveRepositoryOperation getRemoveOperation(Object[] elements) {
- ArrayList locations = new ArrayList();
- for (int i = 0; i < elements.length; i++) {
- if (elements[i] instanceof IRepositoryElement)
- locations.add(((IRepositoryElement) elements[i]).getLocation());
- }
- return new RemoveArtifactRepositoryOperation(ProvAdminUIMessages.ArtifactRepositoriesView_RemoveRepositoryOperationLabel, (URI[]) locations.toArray(new URI[locations.size()]));
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getListenerEventTypes()
- */
- protected int getListenerEventTypes() {
- return StructuredViewerProvisioningListener.PROV_EVENT_ARTIFACT_REPOSITORY;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.admin.ProvView#refreshUnderlyingModel()
- */
- protected void refreshUnderlyingModel() {
- ProvisioningOperationRunner.schedule(new RefreshArtifactRepositoriesOperation(ProvAdminUIMessages.ProvView_RefreshCommandLabel, ProvAdminUIActivator.getDefault().getPolicy().getQueryContext().getArtifactRepositoryFlags()), StatusManager.SHOW | StatusManager.LOG);
- }
-
-}
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 172726c5e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java
+++ /dev/null
@@ -1,129 +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 org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-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.provisional.p2.ui.ProvisioningOperationRunner;
-import org.eclipse.equinox.internal.provisional.p2.ui.actions.InstallAction;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.MetadataRepositories;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.RemoveRepositoryOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.IUDragAdapter;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.StructuredViewerProvisioningListener;
-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;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * This view allows users to interact with metadata repositories
- *
- * @since 3.4
- */
-public class MetadataRepositoriesView extends RepositoriesView {
-
- private InstallAction installAction;
-
- /**
- * The constructor.
- */
- public MetadataRepositoriesView() {
- // constructor
- }
-
- protected Object getInput() {
- return new MetadataRepositories(ProvAdminUIActivator.getDefault().getPolicy());
- }
-
- 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, ProvAdminUIActivator.getDefault().getPolicy()).open();
- }
-
- protected RemoveRepositoryOperation getRemoveOperation(Object[] elements) {
- ArrayList locations = new ArrayList();
- for (int i = 0; i < elements.length; i++) {
- if (elements[i] instanceof IRepositoryElement)
- locations.add(((IRepositoryElement) elements[i]).getLocation());
- }
- return new RemoveMetadataRepositoryOperation(ProvAdminUIMessages.ArtifactRepositoriesView_RemoveRepositoryOperationLabel, (URI[]) locations.toArray(new URI[locations.size()]));
- }
-
- protected void makeActions() {
- super.makeActions();
- installAction = new InstallAction(ProvAdminUIActivator.getDefault().getPolicy(), viewer, null);
- }
-
- 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 StructuredViewerProvisioningListener.PROV_EVENT_METADATA_REPOSITORY;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.admin.ProvView#refreshUnderlyingModel()
- */
- protected void refreshUnderlyingModel() {
- ProvisioningOperationRunner.schedule(new RefreshMetadataRepositoriesOperation(ProvAdminUIMessages.ProvView_RefreshCommandLabel, getRepoFlags()), StatusManager.SHOW | StatusManager.LOG);
- }
-
- protected List getVisualProperties() {
- List list = super.getVisualProperties();
- list.add(PreferenceConstants.PREF_USE_CATEGORIES);
- list.add(PreferenceConstants.PREF_COLLAPSE_IU_VERSIONS);
- return list;
- }
-}
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 43cb8b357..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.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
- * 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.admin.dialogs.AddProfileDialog;
-import org.eclipse.equinox.internal.p2.ui.admin.preferences.PreferenceConstants;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.actions.UninstallAction;
-import org.eclipse.equinox.internal.provisional.p2.ui.actions.UpdateAction;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.RemoveProfilesOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.IProfileChooser;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.*;
-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.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.statushandlers.StatusManager;
-
-/**
- * This view allows users to interact with installed profiles.
- *
- * @since 3.4
- */
-public class ProfilesView extends ProvView {
- private 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 profilesOnly = new ArrayList();
- for (int i = 0; i < selections.length; i++) {
- if (selections[i] instanceof ProfileElement)
- profilesOnly.add(((ProfileElement) selections[i]).getProfileId());
- }
- RemoveProfilesOperation op = new RemoveProfilesOperation(ProvAdminUIMessages.Ops_RemoveProfileOperationLabel, (String[]) profilesOnly.toArray(new String[profilesOnly.size()]));
- ProvisioningOperationRunner.run(op, StatusManager.SHOW | StatusManager.LOG);
- }
- }
-
- 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(viewer, StructuredViewerProvisioningListener.PROV_EVENT_IU | StructuredViewerProvisioningListener.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(ProvAdminUIActivator.getDefault().getPolicy(), 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(ProvAdminUIActivator.getDefault().getPolicy(), viewer, null);
- propertiesAction = new PropertyDialogAction(this.getSite(), viewer);
- updateAction = new UpdateAction(ProvAdminUIActivator.getDefault().getPolicy(), 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 = (IProfile) 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(ProvAdminUIActivator.getDefault().getPolicy());
- }
-
- IProfileChooser getProfileChooser() {
- return new IProfileChooser() {
- public String getProfileId(Shell shell) {
- Object firstElement = getSelection().getFirstElement();
- if (firstElement instanceof InstalledIUElement) {
- return ((InstalledIUElement) firstElement).getProfileId();
- }
- IProfile profile = (IProfile) ProvUI.getAdapter(firstElement, IProfile.class);
- if (profile != null)
- return profile.getProfileId();
- return null;
- }
- };
- }
-
- protected List getVisualProperties() {
- List list = super.getVisualProperties();
- list.add(PreferenceConstants.PREF_SHOW_INSTALL_ROOTS_ONLY);
- return list;
- }
-
- String[] getKnownProfileIds() {
- try {
- IProfile[] allProfiles = ProvisioningUtil.getProfiles();
- String[] ids = new String[allProfiles.length];
- for (int i = 0; i < allProfiles.length; i++)
- ids[i] = allProfiles[i].getProfileId();
- return ids;
- } catch (ProvisionException e) {
- ProvUI.handleException(e, ProvAdminUIMessages.ProfilesView_ErrorRetrievingProfiles, StatusManager.LOG);
- return new String[0];
- }
-
- }
-}
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 04daad34e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java
+++ /dev/null
@@ -1,183 +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.provisional.p2.repository.IRepositoryManager;
-
-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.provisional.p2.core.IServiceUI;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.ValidationDialogServiceUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.Profiles;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.ProvElementContentProvider;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.ProvElementLabelProvider;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.ListDialog;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-
-/**
- * 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 ServiceRegistration certificateUIRegistration;
- 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();
- certificateUIRegistration = context.registerService(IServiceUI.class.getName(), new ValidationDialogServiceUI(), null);
- getPreferenceStore().addPropertyChangeListener(getPreferenceListener());
- }
-
- public void stop(BundleContext bundleContext) throws Exception {
- plugin = null;
- certificateUIRegistration.unregister();
- getPreferenceStore().removePropertyChangeListener(preferenceListener);
- super.stop(bundleContext);
- policy = null;
- }
-
- private IPropertyChangeListener getPreferenceListener() {
- if (preferenceListener == null) {
- preferenceListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- updateForPreferences(getPolicy().getQueryContext());
- }
- };
- }
- return preferenceListener;
- }
-
- void updateForPreferences(IUViewQueryContext queryContext) {
- if (getPreferenceStore().getBoolean(PreferenceConstants.PREF_SHOW_GROUPS_ONLY))
- queryContext.setVisibleAvailableIUProperty(IInstallableUnit.PROP_TYPE_GROUP);
- else
- queryContext.setVisibleAvailableIUProperty(null);
- if (getPreferenceStore().getBoolean(PreferenceConstants.PREF_SHOW_INSTALL_ROOTS_ONLY))
- queryContext.setVisibleInstalledIUProperty(IInstallableUnit.PROP_PROFILE_ROOT_IU);
- else
- queryContext.setVisibleInstalledIUProperty(null);
-
- if (getPreferenceStore().getBoolean(PreferenceConstants.PREF_HIDE_SYSTEM_REPOS)) {
- queryContext.setArtifactRepositoryFlags(IRepositoryManager.REPOSITORIES_NON_SYSTEM);
- queryContext.setMetadataRepositoryFlags(IRepositoryManager.REPOSITORIES_NON_SYSTEM);
- } else {
- queryContext.setArtifactRepositoryFlags(IRepositoryManager.REPOSITORIES_ALL);
- queryContext.setMetadataRepositoryFlags(IRepositoryManager.REPOSITORIES_ALL);
- }
- queryContext.setShowLatestVersionsOnly(getPreferenceStore().getBoolean(PreferenceConstants.PREF_COLLAPSE_IU_VERSIONS));
- queryContext.setUseCategories(getPreferenceStore().getBoolean(PreferenceConstants.PREF_USE_CATEGORIES));
- }
-
- void initializePolicy() {
- policy = new Policy();
- // Manipulate the default query context according to our preferences
- IUViewQueryContext queryContext = new IUViewQueryContext(IUViewQueryContext.AVAILABLE_VIEW_BY_REPO);
- policy.setQueryContext(queryContext);
- updateForPreferences(queryContext);
- policy.setPlanValidator(new PlanValidator() {
- public boolean continueWorkingWithPlan(ProvisioningPlan plan, Shell shell) {
- if (plan == null)
- return false;
- return true;
- }
- });
- policy.setProfileChooser(new IProfileChooser() {
- public String getProfileId(Shell shell) {
- // TODO would be nice if the profile chooser dialog let you
- // create a new profile
- ProvElementContentProvider provider = new ProvElementContentProvider();
- if (provider.getElements(new Profiles(getPolicy())).length == 0) {
- AddProfileDialog dialog = new AddProfileDialog(shell, new String[0]);
- if (dialog.open() == Window.OK) {
- return dialog.getAddedProfileId();
- }
- return null;
- }
-
- ListDialog dialog = new ListDialog(shell);
- dialog.setTitle(ProvAdminUIMessages.MetadataRepositoriesView_ChooseProfileDialogTitle);
- dialog.setLabelProvider(new ProvElementLabelProvider());
- dialog.setInput(new Profiles(getPolicy()));
- dialog.setContentProvider(provider);
- dialog.open();
- Object[] result = dialog.getResult();
- if (result != null && result.length > 0) {
- IProfile profile = (IProfile) ProvUI.getAdapter(result[0], IProfile.class);
- if (profile != null)
- return profile.getProfileId();
- }
- return null;
- }
- });
- policy.setRepositoryManipulator(new ColocatedRepositoryManipulator(policy, null));
- }
-
- public Policy getPolicy() {
- return 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 750c738a3..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIMessages.java
+++ /dev/null
@@ -1,102 +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 AddArtifactRepositoryDialog_DuplicateURL;
- public static String AddArtifactRepositoryDialog_ManipulateRepositoryInstruction;
- public static String AddArtifactRepositoryDialog_OperationLabel;
- public static String AddProfileDialog_Title;
- public static String AddMetadataRepositoryDialog_OperationLabel;
- public static String MetadataRepositoriesView_AddRepositoryTooltip;
- public static String MetadataRepositoriesView_AddRepositoryLabel;
- public static String MetadataRepositoriesView_ChooseProfileDialogTitle;
- public static String MetadataRepositoriesView_RemoveRepositoryTooltip;
- public static String ArtifactRepositoriesView_AddRepositoryTooltip;
- public static String ArtifactRepositoriesView_AddRepositoryLabel;
- public static String ArtifactRepositoriesView_RemoveRepositoryTooltip;
- public static String ArtifactRepositoriesView_RemoveRepositoryOperationLabel;
- public static String ProfilesView_ErrorRetrievingProfiles;
- 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_RefreshCommandLabel;
- 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 IUProfilePropertiesGroup_InvalidProfileID;
-
- 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_Flavor;
- 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 fb68eba51..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java
+++ /dev/null
@@ -1,227 +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.equinox.internal.p2.ui.admin.preferences.PreferenceConstants;
-import org.eclipse.equinox.internal.provisional.p2.ui.actions.RefreshAction;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.*;
-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;
-
-/**
- * This class supports the common characteristics for views that manipulate
- * provisioning models.
- *
- * @since 3.4
- */
-abstract class ProvView extends ViewPart {
- TreeViewer viewer;
- RefreshAction refreshAction;
- private IPropertyChangeListener preferenceListener;
- protected Display display;
-
- /**
- * 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(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())) {
- ProvAdminUIActivator.getDefault().initializePolicy();
- ProvView.this.refreshAll(false);
- }
- }
-
- };
- store.addPropertyChangeListener(preferenceListener);
- }
-
- 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();
- }
-
- IStructuredSelection getSelection() {
- return (IStructuredSelection) viewer.getSelection();
- }
-
- 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() {
- // Default is to do nothing
- }
-
- protected List getVisualProperties() {
- ArrayList list = new ArrayList(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());
- }
-}
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/RefreshArtifactRepositoriesOperation.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RefreshArtifactRepositoriesOperation.java
deleted file mode 100644
index a7754a95e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RefreshArtifactRepositoriesOperation.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.ui.admin;
-
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.RepositoryOperation;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * @since 3.4
- *
- */
-public class RefreshArtifactRepositoriesOperation extends RepositoryOperation {
-
- /**
- * @param label
- * @param locations
- */
- public RefreshArtifactRepositoriesOperation(String label, URI[] locations) {
- super(label, locations);
- }
-
- public RefreshArtifactRepositoriesOperation(String label, int flags) {
- super(label, new URI[0]);
- try {
- this.locations = ProvisioningUtil.getArtifactRepositories(flags);
- } catch (ProvisionException e) {
- ProvUI.handleException(e, null, StatusManager.LOG);
- }
- }
-
- protected IStatus doBatchedExecute(IProgressMonitor monitor) throws ProvisionException {
- ProvisioningUtil.refreshArtifactRepositories(locations, monitor);
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RefreshMetadataRepositoriesOperation.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RefreshMetadataRepositoriesOperation.java
deleted file mode 100644
index 44b086d09..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RefreshMetadataRepositoriesOperation.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.ui.admin;
-
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.RepositoryOperation;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * @since 3.4
- *
- */
-public class RefreshMetadataRepositoriesOperation extends RepositoryOperation {
-
- /**
- * @param label
- * @param locations
- */
- public RefreshMetadataRepositoriesOperation(String label, URI[] locations) {
- super(label, locations);
- }
-
- public RefreshMetadataRepositoriesOperation(String label, int flags) {
- super(label, new URI[0]);
- try {
- this.locations = ProvisioningUtil.getMetadataRepositories(flags);
- } catch (ProvisionException e) {
- ProvUI.handleException(e, null, StatusManager.LOG);
- }
- }
-
- protected IStatus doBatchedExecute(IProgressMonitor monitor) throws ProvisionException {
- // Clear the not found cache so that repos not found are reported again.
- ProvUI.clearRepositoriesNotFound();
- ProvisioningUtil.refreshMetadataRepositories(locations, monitor);
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveArtifactRepositoryOperation.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveArtifactRepositoryOperation.java
deleted file mode 100644
index c5dda16d4..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveArtifactRepositoryOperation.java
+++ /dev/null
@@ -1,38 +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.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.RemoveRepositoryOperation;
-
-/**
- * Operation which removes the artifact repository with the given URL.
- *
- * @since 3.4
- */
-public class RemoveArtifactRepositoryOperation extends RemoveRepositoryOperation {
-
- public RemoveArtifactRepositoryOperation(String label, URI[] repoLocations) {
- super(label, repoLocations);
- }
-
- protected IStatus doBatchedExecute(IProgressMonitor monitor) throws ProvisionException {
- SubMonitor mon = SubMonitor.convert(monitor, locations.length);
- for (int i = 0; i < locations.length; i++) {
- ProvisioningUtil.removeArtifactRepository(locations[i]);
- mon.worked(1);
- }
- return okStatus();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveMetadataRepositoryOperation.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveMetadataRepositoryOperation.java
deleted file mode 100644
index 7f99b5d3e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveMetadataRepositoryOperation.java
+++ /dev/null
@@ -1,38 +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.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.RemoveRepositoryOperation;
-
-/**
- * Operation that removes the metadata repository with the given location.
- *
- * @since 3.4
- */
-public class RemoveMetadataRepositoryOperation extends RemoveRepositoryOperation {
-
- public RemoveMetadataRepositoryOperation(String label, URI[] repoLocations) {
- super(label, repoLocations);
- }
-
- protected IStatus doBatchedExecute(IProgressMonitor monitor) throws ProvisionException {
- SubMonitor mon = SubMonitor.convert(monitor, locations.length);
- for (int i = 0; i < locations.length; i++) {
- ProvisioningUtil.removeMetadataRepository(locations[i]);
- mon.worked(1);
- }
- return okStatus();
- }
-}
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 fecff8b3e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java
+++ /dev/null
@@ -1,192 +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.util.ArrayList;
-import java.util.List;
-import org.eclipse.equinox.internal.p2.ui.admin.preferences.PreferenceConstants;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.RemoveRepositoryOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.RepositoryContentProvider;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.StructuredViewerProvisioningListener;
-import org.eclipse.jface.action.*;
-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.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() {
- ProvisioningOperationRunner.run(getRemoveOperation(getSelection().toArray()), StatusManager.SHOW | StatusManager.LOG);
- }
- }
-
- 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 urls = new ArrayList();
- 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(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 int openAddRepositoryDialog(Shell shell);
-
- protected abstract RemoveRepositoryOperation getRemoveOperation(Object[] elements);
-
- 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 getVisualProperties() {
- List list = super.getVisualProperties();
- list.add(PreferenceConstants.PREF_HIDE_SYSTEM_REPOS);
- return list;
- }
-}
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 8d4f2655d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.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.p2.ui.admin.dialogs;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.admin.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.AddRepositoryDialog;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.*;
-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 {
-
- class ArtifactRepositoryManipulator extends RepositoryManipulator {
- RepositoryLocationValidator validator;
-
- public AddRepositoryOperation getAddOperation(URI location) {
- return new AddArtifactRepositoryOperation(ProvAdminUIMessages.AddArtifactRepositoryDialog_OperationLabel, location);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getAddOperationLabel()
- */
- public String getAddOperationLabel() {
- return ProvAdminUIMessages.AddArtifactRepositoryDialog_OperationLabel;
- }
-
- public String getManipulatorButtonLabel() {
- // Not used in this dialog
- return null;
- }
-
- public String getManipulatorLinkLabel() {
- // Not used in this dialog
- return null;
- }
-
- public RemoveRepositoryOperation getRemoveOperation(URI[] repoLocations) {
- return new RemoveArtifactRepositoryOperation(ProvAdminUIMessages.ArtifactRepositoriesView_RemoveRepositoryOperationLabel, repoLocations);
- }
-
- public String getRemoveOperationLabel() {
- return ProvAdminUIMessages.ArtifactRepositoriesView_RemoveRepositoryOperationLabel;
- }
-
- public RepositoryLocationValidator getRepositoryLocationValidator(Shell shell) {
- if (validator == null) {
- validator = new RepositoryLocationValidator() {
- public IStatus validateRepositoryLocation(URI location, boolean contactRepositories, IProgressMonitor monitor) {
- IStatus duplicateStatus = Status.OK_STATUS;
- URI[] knownRepositories = getKnownRepositories();
- for (int i = 0; i < knownRepositories.length; i++) {
- if (knownRepositories[i].equals(location)) {
- duplicateStatus = new Status(IStatus.ERROR, ProvAdminUIActivator.PLUGIN_ID, LOCAL_VALIDATION_ERROR, ProvAdminUIMessages.AddArtifactRepositoryDialog_DuplicateURL, null);
- break;
- }
- }
- return duplicateStatus;
- }
- };
- }
- return validator;
- }
-
- public boolean manipulateRepositories(Shell shell) {
- // Not used in this dialog
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getKnownRepositories()
- */
- public URI[] getKnownRepositories() {
- try {
- return ProvisioningUtil.getArtifactRepositories(ProvAdminUIActivator.getDefault().getPolicy().getQueryContext().getArtifactRepositoryFlags());
- } catch (ProvisionException e) {
- return new URI[0];
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getManipulatorInstructionString()
- */
- public String getManipulatorInstructionString() {
- // We don't have a manipulator
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getSiteNotFoundCorrectionString()
- */
- public String getRepositoryNotFoundInstructionString() {
- return ProvAdminUIMessages.AddArtifactRepositoryDialog_ManipulateRepositoryInstruction;
- }
-
- }
-
- RepositoryManipulator manipulator;
-
- public AddArtifactRepositoryDialog(Shell parentShell, Policy policy) {
- super(parentShell, policy);
- }
-
- protected RepositoryManipulator getRepositoryManipulator() {
- if (manipulator == null) {
- manipulator = new ArtifactRepositoryManipulator();
- }
- return manipulator;
- }
-
-}
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 bbf0d8b0e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java
+++ /dev/null
@@ -1,36 +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.net.URI;
-import org.eclipse.equinox.internal.p2.ui.admin.AddMetadataRepositoryOperation;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.AddRepositoryDialog;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.AddRepositoryOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-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 {
-
- public AddMetadataRepositoryDialog(Shell parentShell, Policy policy) {
- super(parentShell, policy);
- }
-
- protected AddRepositoryOperation getOperation(URI location) {
- return new AddMetadataRepositoryOperation(ProvAdminUIMessages.AddMetadataRepositoryDialog_OperationLabel, location);
- }
-}
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 5b215dea5..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java
+++ /dev/null
@@ -1,136 +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.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.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvisioningOperationRunner;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.AddProfileOperation;
-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.*;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * 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 profileProperties = profileGroup.getProfileProperties();
- ProvisioningOperationRunner.run(new AddProfileOperation(ProvAdminUIMessages.AddProfileDialog_OperationLabel, addedProfileId, profileProperties), StatusManager.SHOW | StatusManager.LOG);
- }
-
- 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 61d125416..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.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-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 (IInstallableUnit) 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 4d2ab6d7f..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java
+++ /dev/null
@@ -1,240 +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.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.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-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());
- }
- ITouchpointData[] data = iu.getTouchpointData();
- String[] items = new String[data.length];
- for (int i = 0; i < data.length; i++) {
- items[i] = data[i].toString();
- }
- touchpointData.setItems(items);
-
- IRequiredCapability[] req = iu.getRequiredCapabilities();
- items = new String[req.length];
- for (int i = 0; i < req.length; i++) {
- items[i] = req[i].toString();
- }
- requiredCapabilities.setItems(items);
- IProvidedCapability[] prov = iu.getProvidedCapabilities();
- items = new String[prov.length];
- for (int i = 0; i < prov.length; i++) {
- items[i] = prov[i].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(new Version(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(), new Version("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 8a679d479..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.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-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 = (IInstallableUnit) 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 e71fd366e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java
+++ /dev/null
@@ -1,90 +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.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.InstalledIUElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.osgi.util.NLS;
-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.*;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * 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[] {IInstallableUnit.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) {
- try {
- return ProvisioningUtil.getProfile(element.getProfileId());
- } catch (ProvisionException e) {
- ProvUI.handleException(e, NLS.bind(ProvAdminUIMessages.IUProfilePropertiesGroup_InvalidProfileID, element.getProfileId()), StatusManager.LOG);
- return null;
- }
- }
-}
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 6c766444b..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.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
- * 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.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.IUPropertyUtils;
-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 = IUPropertyUtils.getIUProperty(getIU(), propNames[i]);
- 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 f9aa001be..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.provisional.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 b67f72f14..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java
+++ /dev/null
@@ -1,273 +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.ProvAdminUIActivator;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProfileFactory;
-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 flavor;
- 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_Flavor);
- flavor = new Text(composite, SWT.BORDER);
- flavor.setLayoutData(gd);
- setEditable(flavor, 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());
- flavor.setText(ProfileFactory.getDefaultFlavor());
- } 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_FLAVOR);
- flavor.setText(value != null ? value : ProfileFactory.getDefaultFlavor());
-
- 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 getProfileProperties() {
- if (profile == null) {
- Map profileProperties = new HashMap();
-
- 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 = flavor.getText().trim();
- if (value.length() > 0) {
- profileProperties.put(IProfile.PROP_FLAVOR, 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 374a7f01b..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.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-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 = (IProfile) 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 8cd83d6a1..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java
+++ /dev/null
@@ -1,148 +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.provisional.p2.repository.IRepository;
-
-import java.util.Map;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement;
-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 repoProperties = getRepositoryElement().getRepository(null).getProperties();
- if (repoProperties != null) {
- String[] propNames = (String[]) 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 = (IRepositoryElement) 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 b5f968204..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/messages.properties
+++ /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
-###############################################################################
-
-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
-AddMetadataRepositoryDialog_OperationLabel=Add Metadata Repository
-AddArtifactRepositoryDialog_DuplicateURL=Duplicate URL
-AddArtifactRepositoryDialog_ManipulateRepositoryInstruction=You can add and remove artifact repositories in the Artifact Repositories view.
-AddArtifactRepositoryDialog_OperationLabel=Add Artifact Repository
-MetadataRepositoriesView_AddRepositoryLabel=Add repository...
-MetadataRepositoriesView_AddRepositoryTooltip=Add a new metadata repository
-RepositoriesView_RemoveCommandLabel=Remove
-MetadataRepositoriesView_RemoveRepositoryTooltip=Remove the selected metadata repositories
-MetadataRepositoriesView_ChooseProfileDialogTitle=Choose Profile
-ArtifactRepositoriesView_RemoveRepositoryOperationLabel=Remove Artifact Repositories
-ArtifactRepositoriesView_AddRepositoryLabel=Add repository...
-ArtifactRepositoriesView_AddRepositoryTooltip=Add a new artifact repository
-ArtifactRepositoriesView_RemoveRepositoryTooltip=Remove the selected artifact repositories
-ProfilesView_ErrorRetrievingProfiles=Error retrieving profiles
-ProfilesView_AddProfileTooltip=Add a new profile
-ProvView_RefreshCommandTooltip=Refresh the items in the view.
-ProfilesView_AddProfileLabel=Add profile...
-ProvView_RefreshCommandLabel=Refresh
-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
-IUProfilePropertiesGroup_InvalidProfileID=Profile id {0} not valid.
-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_Flavor=&Flavor:
-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.sdk.scheduler/.classpath b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.classpath
deleted file mode 100644
index ce7393340..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="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <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 c5e82d745..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
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 a4650cde7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,330 +0,0 @@
-#Tue Sep 18 21:25:49 EDT 2007
-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=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_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.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 a9e6cf321..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-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.equinox.p2.ui.sdk.scheduler;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.ui.sdk.scheduler.AutomaticUpdatePlugin
-Import-Package: com.ibm.icu.util;version="4.0.1",
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.ui.query,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.p2.ui,
- org.eclipse.equinox.internal.provisional.p2.ui.actions,
- org.eclipse.equinox.internal.provisional.p2.ui.model,
- org.eclipse.equinox.internal.provisional.p2.ui.operations,
- org.eclipse.equinox.internal.provisional.p2.ui.policy,
- org.eclipse.equinox.internal.provisional.p2.updatechecker,
- org.eclipse.osgi.service.resolver;version="1.1.0",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.service.packageadmin;version="1.2.0"
-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-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
- CDC-1.1/Foundation-1.1
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 84a2da1e9..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/build.properties
+++ /dev/null
@@ -1,17 +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,\
- .,\
- about.html,\
- META-INF/,\
- plugin.xml
-src.includes = about.html
-source.. = src/
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/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateAction.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateAction.java
deleted file mode 100644
index 82e31f760..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateAction.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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIProvisioningListener;
-import org.eclipse.equinox.internal.provisional.p2.ui.actions.UpdateAction;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.PlanValidator;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Overridden to hide the resolution from the user and optionally suppress
- * the wizard if we are resolving for reasons other than user request.
- *
- * @since 3.5
- *
- */
-final class AutomaticUpdateAction extends UpdateAction {
-
- /**
- *
- */
- final AutomaticUpdater automaticUpdater;
- private boolean suppressWizard = false;
- private PlannerResolutionOperation resolvedOperation;
- private ProvUIProvisioningListener profileListener;
- private boolean alreadyOpen = false;
-
- AutomaticUpdateAction(AutomaticUpdater automaticUpdater,
- ISelectionProvider selectionProvider, String profileId,
- PlannerResolutionOperation op, IUElementListRoot root,
- ArrayList initialSelections) {
- super(new Policy(), selectionProvider, profileId, false);
- ProvUI.addProvisioningListener(createProfileListener());
- this.resolvedOperation = op;
- this.automaticUpdater = automaticUpdater;
- this.root = root;
- this.initialSelections = initialSelections;
- }
-
- private ProvUIProvisioningListener createProfileListener() {
- profileListener = new ProvUIProvisioningListener(
- ProvUIProvisioningListener.PROV_EVENT_PROFILE) {
- protected void profileChanged(final String profileId) {
- String id = getProfileId(false);
- if (id == IProfileRegistry.SELF) {
- try {
- IProfile profile = ProvisioningUtil.getProfile(IProfileRegistry.SELF);
- id = profile.getProfileId();
- } catch (ProvisionException e) {
- id = null;
- }
- }
- if (profileId.equals(id)) {
- resolvedOperation = null;
- automaticUpdater.validateUpdates();
- }
- }
- };
- return profileListener;
- }
-
- protected void run(final IInstallableUnit[] ius, final String id) {
- // Do we have a plan??
- if (resolvedOperation != null
- && resolvedOperation.getProvisioningPlan() != null) {
- if (PlatformUI.isWorkbenchRunning()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(
- new Runnable() {
- public void run() {
- if (validatePlan(resolvedOperation
- .getProvisioningPlan())) {
- performAction(ius, id, resolvedOperation);
- }
- }
- });
- }
- } else
- super.run(ius, id);
- }
-
- void suppressWizard(boolean suppress) {
- suppressWizard = suppress;
- }
-
- protected int performAction(IInstallableUnit[] ius, String targetProfileId,
- PlannerResolutionOperation resolution) {
- if (suppressWizard) {
- automaticUpdater.setUpdateAffordanceState(resolution != null
- && resolution.getResolutionResult().getSummaryStatus()
- .isOK());
- return Window.OK;
- }
- if (alreadyOpen)
- return Window.CANCEL;
- alreadyOpen = true;
- int retCode = super.performAction(ius, targetProfileId, resolution);
- alreadyOpen = false;
- return retCode;
- }
-
- protected PlanValidator getPlanValidator() {
- return new PlanValidator() {
- public boolean continueWorkingWithPlan(ProvisioningPlan plan,
- Shell shell) {
- if (automaticUpdater.alreadyValidated)
- return true;
- // In all other cases we return false, because clicking the
- // popup will actually run the action.
- // We are just determining whether to show the popup or not.
- if (plan != null) {
- // If the user cancelled the operation, don't continue
- if (plan.getStatus().getSeverity() == IStatus.CANCEL)
- return false;
- boolean noError = plan.getStatus().getSeverity() != IStatus.ERROR;
- // Show the affordance regardless of the status since
- // updates were found.
- if (automaticUpdater.updateAffordance == null)
- automaticUpdater.createUpdateAffordance();
- automaticUpdater.setUpdateAffordanceState(noError);
- if (noError && automaticUpdater.popup == null)
- automaticUpdater.createUpdatePopup();
- }
- return false;
- }
- };
- }
-
- public void dispose() {
- if (profileListener != null)
- ProvUI.removeProvisioningListener(profileListener);
- profileListener = null;
- }
-} \ No newline at end of file
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 34a9496b9..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateMessages.java
+++ /dev/null
@@ -1,88 +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.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 AutomaticUpdater_ErrorCheckingUpdates;
- public static String AutomaticUpdater_ResolutionOperationLabel;
- 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_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 96b2874b0..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java
+++ /dev/null
@@ -1,168 +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.sdk.scheduler;
-
-import java.io.IOException;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProfileScope;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.ui.preferences.ScopedPreferenceStore;
-import org.eclipse.ui.statushandlers.StatusManager;
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-/**
- * Activator class for the automatic updates plugin
- */
-public class AutomaticUpdatePlugin extends AbstractUIPlugin {
-
- private static AutomaticUpdatePlugin plugin;
- private static BundleContext context;
- private static PackageAdmin packageAdmin = null;
- private static ServiceReference packageAdminRef = null;
-
- private AutomaticUpdateScheduler scheduler;
- private AutomaticUpdater updater;
- private ScopedPreferenceStore preferenceStore;
-
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.ui.sdk.scheduler"; //$NON-NLS-1$
-
- public static BundleContext getContext() {
- return context;
- }
-
- 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;
- }
-
- /**
- * 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;
- packageAdminRef = bundleContext.getServiceReference(PackageAdmin.class.getName());
- packageAdmin = (PackageAdmin) bundleContext.getService(packageAdminRef);
-
- // TODO for now we need to manually start up the provisioning
- // infrastructure and the update checker, because the Eclipse
- // Application launch config won't let me specify bundles to start.
- // TODO how should we react if we are unable to start one of these bundles?
- startEarly("org.eclipse.equinox.p2.exemplarysetup"); //$NON-NLS-1$
- startEarly("org.eclipse.equinox.frameworkadmin.equinox"); //$NON-NLS-1$
- startEarly("org.eclipse.equinox.simpleconfigurator.manipulator"); //$NON-NLS-1$
- startEarly("org.eclipse.equinox.p2.updatechecker"); //$NON-NLS-1$
-
- PreferenceInitializer.migratePreferences();
- }
-
- private boolean startEarly(String bundleName) throws BundleException {
- Bundle bundle = getBundle(bundleName);
- if (bundle == null)
- return false;
- bundle.start(Bundle.START_TRANSIENT);
- return true;
- }
-
- public void stop(BundleContext bundleContext) throws Exception {
- if (scheduler != null) {
- scheduler.shutdown();
- scheduler = null;
- }
- if (updater != null) {
- updater.shutdown();
- updater = null;
- }
- packageAdmin = null;
- packageAdminRef = 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) {
- preferenceStore = new ScopedPreferenceStore(new ProfileScope(IProfileRegistry.SELF), PLUGIN_ID);
- }
- return preferenceStore;
- }
-
- public void savePreferences() {
- if (preferenceStore != null)
- try {
- preferenceStore.save();
- } catch (IOException e) {
- ProvUI.handleException(e, AutomaticUpdateMessages.ErrorSavingPreferences, StatusManager.LOG | StatusManager.SHOW);
- }
- }
-}
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 bcf6bcf96..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.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.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.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.IUPropertyQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.equinox.internal.provisional.p2.updatechecker.*;
-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];
- }
- }
-
- /**
- * A query that searches for {@link IInstallableUnit} instances that have
- * a property associated with the specified profile, whose value matches the provided value.
- * Uses the profile id instead of the profile to reference the profile.
- * The profile instance is cached only during the duration of the query.
- * This query is used instead of IUProfilePropertyQuery because we pass
- * this query to the automatic update checker and it will be referenced during
- * the life of the platform.
- */
- private class IUProfilePropertyByIdQuery extends IUPropertyQuery {
- private IProfile cachedProfile;
-
- /**
- * Creates a new query on the given property name and value.
- */
- public IUProfilePropertyByIdQuery(String propertyName, String propertyValue) {
- super(propertyName, propertyValue);
- }
-
- protected String getProperty(IInstallableUnit iu, String name) {
- IProfile profile = getProfile();
- if (profile == null)
- return null;
- return profile.getInstallableUnitProperty(iu, name);
- }
-
- private IProfile getProfile() {
- if (cachedProfile == null) {
- IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(AutomaticUpdatePlugin.getContext(), IProfileRegistry.class.getName());
- if (profileRegistry != null)
- cachedProfile = profileRegistry.getProfile(profileId);
- }
- return cachedProfile;
- }
-
- // overridden to release profile cache
- public void postPerform() {
- cachedProfile = null;
- }
- }
-
- /**
- * The constructor.
- */
- public AutomaticUpdateScheduler() {
- AutomaticUpdatePlugin.getDefault().setScheduler(this);
- checker = (IUpdateChecker) ServiceHelper.getService(AutomaticUpdatePlugin.getContext(), 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 Query getProfileQuery() {
- // We specifically avoid going through the default policy's query provider or
- // through the sdk ui bundle, so that we don't load all the p2 UI classes in doing so.
- return new IUProfilePropertyByIdQuery(IInstallableUnit.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
- }
-
- 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 72f167b38..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
+++ /dev/null
@@ -1,510 +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.sdk.scheduler;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.IJobChangeListener;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvisioningOperationRunner;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.UpdateWizard;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.DownloadPhaseSet;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProfileModificationOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateListener;
-import org.eclipse.equinox.internal.provisional.p2.updatechecker.UpdateEvent;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPartSite;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * @since 3.5
- */
-public class AutomaticUpdater implements IUpdateListener {
-
- StatusLineCLabelContribution updateAffordance;
- AutomaticUpdateAction updateAction;
- IStatusLineManager statusLineManager;
- IInstallableUnit[] iusWithUpdates;
- String profileId;
- AutomaticUpdatesPopup popup;
- IJobChangeListener provisioningJobListener;
- boolean alreadyValidated = false;
- boolean alreadyDownloaded = false;
- private static final String AUTO_UPDATE_STATUS_ITEM = "AutoUpdatesStatus"; //$NON-NLS-1$
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateListener
- * #
- * updatesAvailable(org.eclipse.equinox.internal.provisional.p2.updatechecker
- * .UpdateEvent)
- */
- public void updatesAvailable(final UpdateEvent event) {
- final boolean download = getPreferenceStore().getBoolean(
- PreferenceConstants.PREF_DOWNLOAD_ONLY);
- profileId = event.getProfileId();
- iusWithUpdates = event.getIUs();
- validateUpdates(null, true);
- alreadyDownloaded = false;
-
- if (iusWithUpdates.length <= 0) {
- clearUpdatesAvailable();
- return;
- }
- registerProvisioningJobListener();
-
- // Always get a profile change request and provisioning plan.
- // A side-effect of making the change request is producing the model
- // elements necessary for a wizard, so initialize the data structures
- // for getting these.
- final ArrayList initialSelections = new ArrayList();
- final IUElementListRoot root = new IUElementListRoot();
- try {
- ProfileChangeRequest request = UpdateWizard
- .createProfileChangeRequest(event.getIUs(), event
- .getProfileId(), root, initialSelections, null);
- if (request == null) {
- clearUpdatesAvailable();
- return;
- }
- final PlannerResolutionOperation operation = new PlannerResolutionOperation(
- AutomaticUpdateMessages.AutomaticUpdater_ResolutionOperationLabel,
- event.getProfileId(), request, null, new MultiStatus(
- AutomaticUpdatePlugin.PLUGIN_ID, 0, null, null),
- false);
- if ((operation.execute(new NullProgressMonitor())).isOK()) {
- // Download the items before notifying user if the
- // preference dictates.
-
- if (download) {
- Job job = ProvisioningOperationRunner
- .schedule(
- new ProfileModificationOperation(
- AutomaticUpdateMessages.AutomaticUpdater_AutomaticDownloadOperationName,
- event.getProfileId(), operation
- .getProvisioningPlan(),
- new ProvisioningContext(),
- new DownloadPhaseSet(), false),
- StatusManager.LOG);
- job.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent jobEvent) {
- alreadyDownloaded = true;
- IStatus status = jobEvent.getResult();
- if (status.isOK()) {
- createUpdateAction(operation, root,
- initialSelections);
- PlatformUI.getWorkbench().getDisplay()
- .asyncExec(new Runnable() {
- public void run() {
- updateAction
- .suppressWizard(true);
- updateAction.run();
- }
- });
- } else if (status.getSeverity() != IStatus.CANCEL) {
- ProvUI.reportStatus(status, StatusManager.LOG);
- }
- }
- });
- } else {
- createUpdateAction(operation, root, initialSelections);
- PlatformUI.getWorkbench().getDisplay().asyncExec(
- new Runnable() {
- public void run() {
- updateAction.suppressWizard(true);
- updateAction.run();
- }
- });
- }
- }
- } catch (ProvisionException e) {
- ProvUI
- .handleException(
- e,
- AutomaticUpdateMessages.AutomaticUpdater_ErrorCheckingUpdates,
- StatusManager.LOG);
- }
-
- }
-
- /*
- * Validate that iusToBeUpdated is valid, and reset the cache. If
- * isKnownToBeAvailable is false, then recheck that the update is available.
- * isKnownToBeAvailable should be false when the update list might be stale
- * (Reminding the user of updates may happen long after the update check.
- * This reduces the risk of notifying the user of updates and then not
- * finding them .)
- */
-
- void validateUpdates(IProgressMonitor monitor, boolean isKnownToBeAvailable) {
- ArrayList list = new ArrayList();
- for (int i = 0; i < iusWithUpdates.length; i++) {
- try {
- if (isKnownToBeAvailable
- || ProvisioningUtil.getPlanner().updatesFor(
- iusWithUpdates[i], new ProvisioningContext(),
- monitor).length > 0) {
- if (validToUpdate(iusWithUpdates[i]))
- list.add(iusWithUpdates[i]);
- }
- } catch (ProvisionException e) {
- ProvUI
- .handleException(
- e,
- AutomaticUpdateMessages.AutomaticUpdater_ErrorCheckingUpdates,
- StatusManager.LOG);
- continue;
- } catch (OperationCanceledException e) {
- // Nothing to report
- }
- }
- iusWithUpdates = (IInstallableUnit[]) list
- .toArray(new IInstallableUnit[list.size()]);
- }
-
- // 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(IInstallableUnit iu) {
- int lock = IInstallableUnit.LOCK_NONE;
- boolean isRoot = false;
- try {
- IProfile profile = ProvisioningUtil.getProfile(profileId);
- String value = profile.getInstallableUnitProperty(iu,
- IInstallableUnit.PROP_PROFILE_LOCKED_IU);
- if (value != null)
- lock = Integer.parseInt(value);
- value = profile.getInstallableUnitProperty(iu,
- IInstallableUnit.PROP_PROFILE_ROOT_IU);
- isRoot = value == null ? false : Boolean.valueOf(value)
- .booleanValue();
- } catch (ProvisionException e) {
- // ignore
- } catch (NumberFormatException e) {
- // ignore and assume no lock
- }
- return isRoot && (lock & IInstallableUnit.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 setUpdateAffordanceState(boolean isValid) {
- if (updateAffordance == null)
- return;
- if (isValid) {
- updateAffordance
- .setTooltip(AutomaticUpdateMessages.AutomaticUpdater_ClickToReviewUpdates);
- updateAffordance.setImage(ProvUIImages
- .getImage(ProvUIImages.IMG_TOOL_UPDATE));
- } else {
- updateAffordance
- .setTooltip(AutomaticUpdateMessages.AutomaticUpdater_ClickToReviewUpdatesWithProblems);
- updateAffordance.setImage(ProvUIImages
- .getImage(ProvUIImages.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 = !ProvisioningOperationRunner
- .hasScheduledOperations();
- if (updateAffordance.isVisible() != shouldBeVisible) {
- IStatusLineManager manager = getStatusLineManager();
- if (manager != null) {
- updateAffordance.setVisible(shouldBeVisible);
- manager.update(true);
- }
- }
- }
-
- void createUpdatePopup() {
- popup = new AutomaticUpdatesPopup(getWorkbenchWindowShell(),
- alreadyDownloaded, getPreferenceStore());
- popup.open();
-
- }
-
- void createUpdateAction(PlannerResolutionOperation operation,
- IUElementListRoot root, ArrayList initialSelections) {
- if (updateAction != null) {
- updateAction.dispose();
- }
- updateAction = new AutomaticUpdateAction(this, getSelectionProvider(),
- profileId, operation, root, initialSelections);
- }
-
- void clearUpdatesAvailable() {
- 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;
- }
- alreadyValidated = false;
- }
-
- ISelectionProvider getSelectionProvider() {
- return new ISelectionProvider() {
-
- /*
- * (non-Javadoc)
- *
- * @seeorg.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(iusWithUpdates);
- }
-
- /*
- * (non-Javadoc)
- *
- * @seeorg.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$
- }
- };
- }
-
- public void launchUpdate() {
- alreadyValidated = true;
- updateAction.suppressWizard(false);
- updateAction.run();
- }
-
- private void registerProvisioningJobListener() {
- if (provisioningJobListener == null) {
- provisioningJobListener = new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench == null || workbench.isClosing())
- return;
- if (workbench.getDisplay() == null)
- return;
- workbench.getDisplay().asyncExec(new Runnable() {
- public void run() {
- checkUpdateAffordanceEnablement();
- }
- });
- }
-
- public void scheduled(final IJobChangeEvent event) {
- IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench == null || workbench.isClosing())
- return;
- if (workbench.getDisplay() == null)
- return;
- workbench.getDisplay().asyncExec(new Runnable() {
- public void run() {
- checkUpdateAffordanceEnablement();
- }
- });
- }
- };
- ProvisioningOperationRunner
- .addJobChangeListener(provisioningJobListener);
- }
- }
-
- /*
- * 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 validateUpdates() {
- Job validateJob = new Job("Update validate job") { //$NON-NLS-1$
- public IStatus run(IProgressMonitor monitor) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- validateUpdates(monitor, false);
- // If there are no more updates, clear the indicators
- if (iusWithUpdates.length == 0) {
- if (PlatformUI.isWorkbenchRunning())
- PlatformUI.getWorkbench().getDisplay().asyncExec(
- new Runnable() {
- public void run() {
- clearUpdatesAvailable();
- }
- });
- } else {
- // Run through the same update notification logic as before,
- // which will cause a new plan to be created against the
- // changed profile.
- updatesAvailable(new UpdateEvent(profileId, iusWithUpdates));
- }
- return Status.OK_STATUS;
- }
- };
- validateJob.setSystem(true);
- validateJob.setPriority(Job.LONG);
- validateJob.schedule();
- }
-
- public void shutdown() {
- if (updateAction != null)
- updateAction.dispose();
- if (provisioningJobListener != null) {
- ProvisioningOperationRunner
- .removeJobChangeListener(provisioningJobListener);
- provisioningJobListener = null;
- }
- statusLineManager = null;
- updateAction = null;
- }
-
- 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 b28826409..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java
+++ /dev/null
@@ -1,295 +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.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages;
-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 = {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[] {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.length; d++)
- if (ELAPSED[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(ProvUIImages.getImage(ProvUIImages.IMG_TOOL_CLOSE));
- closeButton.setHotImage(ProvUIImages.getImage(ProvUIImages.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;
- }
-}
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 c7febd33b..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPreferencePage.java
+++ /dev/null
@@ -1,353 +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.sdk.scheduler;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-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.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * 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);
- onStartupRadio
- .setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_findOnStart);
- 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);
-
- 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(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(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,
- remindElapseCombo.getText());
- } 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 0a9e74c75..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceConstants.java
+++ /dev/null
@@ -1,27 +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.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_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 1cdbb9da2..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java
+++ /dev/null
@@ -1,139 +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.sdk.scheduler;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.preferences.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProfileScope;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-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
- Preferences pref = new ProfileScope(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) {
- ProvUI.handleException(e, AutomaticUpdateMessages.ErrorLoadingPreferenceKeys, StatusManager.LOG);
- }
-
- // 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 (node34.get("enabled", null) == null) { //$NON-NLS-1$
- pref.putBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED, node34.getBoolean("enabled", false)); //$NON-NLS-1$
- }
- if (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 (node34.get("download", null) == null) { //$NON-NLS-1$
- pref.putBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY, node34.getBoolean("download", false)); //$NON-NLS-1$
- }
- if (node34.get("remindOnSchedule", null) == null) { //$NON-NLS-1$
- pref.putBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE, node34.getBoolean("remindOnSchedule", false)); //$NON-NLS-1$
- }
- if (node34.get("remindElapsedTime", null) == null) { //$NON-NLS-1$
-
- pref.put(PreferenceConstants.PREF_REMIND_ELAPSED, node34.get("remindElapsedTime", //$NON-NLS-1$
- AutomaticUpdateMessages.AutomaticUpdateScheduler_30Minutes));
- }
- }
- // mark the pref that says we've migrated
- pref.putBoolean(PreferenceConstants.PREF_MIGRATED_34, true);
- try {
- pref.flush();
- } catch (BackingStoreException e) {
- ProvUI.handleException(e, AutomaticUpdateMessages.ErrorSavingPreferences, StatusManager.LOG);
- }
- }
- // 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) {
- 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) {
- ProvUI.handleException(e, AutomaticUpdateMessages.ErrorSavingClassicPreferences, 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, AutomaticUpdateMessages.AutomaticUpdateScheduler_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 ebec0c283..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/messages.properties
+++ /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
-###############################################################################
-
-
-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.
-AutomaticUpdater_ErrorCheckingUpdates=Unexpected error while checking the validity of updates.
-AutomaticUpdater_ResolutionOperationLabel=Computing Automatic Updates
-AutomaticUpdatesPreferencePage_UpdateSchedule=&Update schedule
-AutomaticUpdatesPreferencePage_findOnStart=Look for updates each time &platform 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_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.updatechecker/.classpath b/bundles/org.eclipse.equinox.p2.updatechecker/.classpath
deleted file mode 100644
index 6f3b481ac..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/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.p2.updatechecker/.cvsignore b/bundles/org.eclipse.equinox.p2.updatechecker/.cvsignore
deleted file mode 100644
index c5e82d745..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/.project b/bundles/org.eclipse.equinox.p2.updatechecker/.project
deleted file mode 100644
index 2ad31f02c..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/.project
+++ /dev/null
@@ -1,34 +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>
- </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 5247d61b0..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,329 +0,0 @@
-#Thu Oct 09 08:15:31 EDT 2008
-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=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.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.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.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.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.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.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=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.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.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.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.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-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.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_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.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.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
-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.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 6f888e88b..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-SymbolicName: org.eclipse.equinox.p2.updatechecker;singleton:=true
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.1.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.updatechecker.Activator
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.osgi.framework;version="1.4.0"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-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)"
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 dc77b9c16..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/build.properties
+++ /dev/null
@@ -1,17 +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
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/src/org/eclipse/equinox/internal/p2/updatechecker/Activator.java b/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/Activator.java
deleted file mode 100644
index d6a6e1fe4..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/Activator.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.updatechecker;
-
-import org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateChecker;
-import org.osgi.framework.*;
-
-/**
- * Activator class that registers the update checker service.
- */
-public class Activator implements BundleActivator {
- public static final String ID = "org.eclipse.equinox.p2.updatechecker"; //$NON-NLS-1$
- private static BundleContext context;
- private ServiceRegistration registrationChecker;
-
- public static BundleContext getContext() {
- return context;
- }
-
- public void start(BundleContext bundleContext) throws Exception {
- Activator.context = bundleContext;
- registrationChecker = context.registerService(IUpdateChecker.SERVICE_NAME, new UpdateChecker(), null);
- }
-
- public void stop(BundleContext bundleContext) throws Exception {
- registrationChecker.unregister();
- }
-}
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 e152841ba..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java
+++ /dev/null
@@ -1,184 +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.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.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.updatechecker.*;
-
-/**
- * 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 checkers = new HashMap();
-
- IProfileRegistry profileRegistry;
- IPlanner planner;
-
- private class UpdateCheckThread extends Thread {
- boolean done = false;
- long poll, delay;
- IUpdateListener listener;
- String profileId;
- Query query;
-
- UpdateCheckThread(String profileId, Query 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$
- IInstallableUnit[] iusWithUpdates = checkForUpdates(profileId, query);
- if (iusWithUpdates.length > 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, Activator.ID, "Exception in update check thread", e)); //$NON-NLS-1$
- }
- }
- }
-
- /* (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, Query 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.
- */
- IInstallableUnit[] checkForUpdates(String profileId, Query query) {
- IProfile profile = getProfileRegistry().getProfile(profileId);
- ArrayList iusWithUpdates = new ArrayList();
- if (profile == null)
- return new IInstallableUnit[0];
- ProvisioningContext context = new ProvisioningContext(getAvailableRepositories());
- if (query == null)
- query = InstallableUnitQuery.ANY;
- Iterator iter = profile.query(query, new Collector(), null).iterator();
- while (iter.hasNext()) {
- IInstallableUnit iu = (IInstallableUnit) iter.next();
- IInstallableUnit[] replacements = getPlanner().updatesFor(iu, context, null);
- if (replacements.length > 0)
- iusWithUpdates.add(iu);
- }
- return (IInstallableUnit[]) iusWithUpdates.toArray(new IInstallableUnit[iusWithUpdates.size()]);
- }
-
- /**
- * Returns the list of metadata repositories that are currently available.
- */
- private URI[] getAvailableRepositories() {
- IMetadataRepositoryManager repoMgr = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
- URI[] repositories = repoMgr.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
- ArrayList available = new ArrayList();
- 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 (URI[]) 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) ServiceHelper.getService(Activator.getContext(), IPlanner.class.getName());
- if (planner == null) {
- throw new IllegalStateException("Provisioning system has not been initialized"); //$NON-NLS-1$
- }
- }
- return planner;
- }
-
- IProfileRegistry getProfileRegistry() {
- if (profileRegistry == null) {
- profileRegistry = (IProfileRegistry) ServiceHelper.getService(Activator.getContext(), IProfileRegistry.class.getName());
- 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/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 98bf64c35..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateChecker.java
+++ /dev/null
@@ -1,57 +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.internal.provisional.p2.query.Query;
-
-/**
- * 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, Query 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, Query, 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 187b32cbf..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/UpdateEvent.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.provisional.p2.updatechecker;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-
-/**
- * An UpdateEvent describes what IU's have updates for a given profile.
- */
-public class UpdateEvent {
-
- String profileId;
- IInstallableUnit[] iusWithUpdates;
-
- public UpdateEvent(String profileId, IInstallableUnit[] iusWithUpdates) {
- this.profileId = profileId;
- this.iusWithUpdates = iusWithUpdates;
- }
-
- public IInstallableUnit[] getIUs() {
- return iusWithUpdates;
- }
-
- public String getProfileId() {
- return profileId;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/.classpath b/bundles/org.eclipse.equinox.p2.updatesite/.classpath
deleted file mode 100644
index 2fbb7a23e..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/.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.updatesite/.cvsignore b/bundles/org.eclipse.equinox.p2.updatesite/.cvsignore
deleted file mode 100644
index c5e82d745..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/.project b/bundles/org.eclipse.equinox.p2.updatesite/.project
deleted file mode 100644
index 8f375c490..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.updatesite</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.updatesite/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f9e494258..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,351 +0,0 @@
-#Tue Mar 31 14:49:21 EDT 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=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=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.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.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.updatesite/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 38d7fa95e..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/.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.updatesite/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/.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.updatesite/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.updatesite/META-INF/MANIFEST.MF
deleted file mode 100644
index 0bbe30807..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,51 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-SymbolicName: org.eclipse.equinox.p2.updatesite;singleton:=true
-Bundle-Localization: plugin
-Bundle-Version: 1.0.100.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.updatesite.Activator
-Bundle-ActivationPolicy: lazy
-Bundle-ActivationPolicy: lazy
-Import-Package: javax.xml.parsers,
- org.eclipse.equinox.app;version="1.0.0";resolution:=optional,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.publisher.eclipse,
- org.eclipse.equinox.internal.p2.repository,
- org.eclipse.equinox.internal.p2.repository.helpers,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.repository,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.publisher.actions,
- org.eclipse.equinox.p2.publisher.eclipse,
- org.eclipse.equinox.security.storage,
- org.eclipse.equinox.spi.p2.publisher,
- org.eclipse.osgi.service.resolver;version="1.2.0",
- org.eclipse.osgi.signedcontent;version="1.0.0",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.util.tracker;version="1.3.0",
- org.xml.sax,
- org.xml.sax.helpers,
- org.w3c.dom
-Require-Bundle: org.eclipse.ecf.filetransfer,
- org.eclipse.ecf,
- org.eclipse.equinox.common;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.equinox.p2.metadata.repository;bundle-version="0.1.0",
- org.eclipse.equinox.p2.artifact.repository;bundle-version="0.1.0",
- org.eclipse.core.jobs;bundle-version="[3.2.0,4.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Export-Package: org.eclipse.equinox.internal.p2.updatesite;x-friends:="org.eclipse.pde.build",
- org.eclipse.equinox.internal.p2.updatesite.artifact;x-internal:=true,
- org.eclipse.equinox.internal.p2.updatesite.metadata;x-internal:=true
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/UpdateSite Publisher.launch b/bundles/org.eclipse.equinox.p2.updatesite/UpdateSite Publisher.launch
deleted file mode 100644
index 03ec10cfe..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/UpdateSite 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/UpdateSite 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.updatesite.UpdatesitePublisher&#13;&#10;-metadataRepository file:c:/temp/repos&#13;&#10;-source C:\build.ecf\v20080507-1345\3.3.2\updateSite&#13;&#10;-artifactRepository file:c:/temp/repos&#13;&#10;-configs win32.win32.x86&#13;&#10;-id ecf&#13;&#10;-version 2.0.0&#13;&#10;-flavor tooling&#13;&#10;-top org.eclipse.ecf.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="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.equinox.app@default:true,org.eclipse.equinox.preferences@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.core.jobs@default:default,org.eclipse.osgi.services@default:default,org.eclipse.equinox.security@default:default,org.eclipse.core.net@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.osgi@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.frameworkadmin.equinox@3:true,org.eclipse.equinox.common@default:default,org.eclipse.equinox.frameworkadmin@3:true,org.eclipse.ecf@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.p2.publisher@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.simpleconfigurator@3:true,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@3:true,org.eclipse.equinox.p2.updatesite@3:true,org.eclipse.equinox.p2.metadata@default:default"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/about.html b/bundles/org.eclipse.equinox.p2.updatesite/about.html
deleted file mode 100644
index d62785d75..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/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.updatesite/build.properties b/bundles/org.eclipse.equinox.p2.updatesite/build.properties
deleted file mode 100644
index f6b01e53f..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/build.properties
+++ /dev/null
@@ -1,18 +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
-src.includes = about.html
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/plugin.properties b/bundles/org.eclipse.equinox.p2.updatesite/plugin.properties
deleted file mode 100644
index 1c5d9c06e..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/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 = Update site repository adapter bundle (Incubation)
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/plugin.xml b/bundles/org.eclipse.equinox.p2.updatesite/plugin.xml
deleted file mode 100644
index 11492b733..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/plugin.xml
+++ /dev/null
@@ -1,56 +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.updatesite.metadata.UpdateSiteMetadataRepositoryFactory">
- </factory>
- <filter
- suffix="site.xml">
- </filter>
- </extension>
- <extension
- id="artifactRepository"
- point="org.eclipse.equinox.p2.artifact.repository.artifactRepositories">
- <factory
- class="org.eclipse.equinox.internal.p2.updatesite.artifact.UpdateSiteArtifactRepositoryFactory">
- </factory>
- <filter
- suffix="site.xml">
- </filter>
- </extension>
- <extension id="UpdateSitePublisher" point="org.eclipse.core.runtime.applications">
- <application
- cardinality="1"
- thread="any"
- visible="true">
- <run
- class="org.eclipse.equinox.internal.p2.updatesite.UpdateSitePublisherApplication">
- </run>
- </application>
- </extension>
- <extension id="org.eclipse.equinox.p2.publisher.UpdateSitePublisher" point="org.eclipse.core.runtime.applications">
- <application
- cardinality="1"
- thread="any"
- visible="true">
- <run
- class="org.eclipse.equinox.internal.p2.updatesite.UpdateSitePublisherApplication">
- </run>
- </application>
- </extension>
- <extension
- id="org.eclipse.equinox.p2.publisher.CategoryPublisher"
- point="org.eclipse.core.runtime.applications">
- <application
- cardinality="1"
- thread="any"
- visible="true">
- <run
- class="org.eclipse.equinox.internal.p2.updatesite.CategoryPublisherApplication">
- </run>
- </application>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/Activator.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/Activator.java
deleted file mode 100644
index 79f37a3fc..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/Activator.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.internal.p2.updatesite;
-
-import java.io.File;
-import java.net.URL;
-import org.eclipse.equinox.internal.p2.core.helpers.URLUtil;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
- public static String ID = "org.eclipse.equinox.p2.updatesite"; //$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 {
- setBundleContext(context);
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- setBundleContext(null);
- }
-
- public synchronized static void setBundleContext(BundleContext bundleContext) {
- Activator.bundleContext = bundleContext;
- }
-
- public synchronized static BundleContext getBundleContext() {
- return bundleContext;
- }
-
- /**
- * Returns a reasonable human-readable repository name for the given location.
- */
- public static String getRepositoryName(URL location) {
- File file = URLUtil.toFile(location);
- return file == null ? location.toExternalForm() : file.getAbsolutePath();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryPublisherApplication.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryPublisherApplication.java
deleted file mode 100644
index bac177222..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryPublisherApplication.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.internal.p2.updatesite;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.p2.publisher.*;
-
-/**
- * <p>
- * This application categorizes the elements in a repo based on a category definition file. The category definition
- * file is specified with <source>-categoryDefinition</source>
- * </p>
- */
-public class CategoryPublisherApplication extends AbstractPublisherApplication {
-
- private String categoryQualifier = null;
- private URI categoryDefinition = null;
-
- public CategoryPublisherApplication() {
- // nothing todo
- }
-
- protected void processParameter(String arg, String parameter, PublisherInfo pinfo) throws URISyntaxException {
- super.processParameter(arg, parameter, pinfo);
-
- this.append = true; // Always append, otherwise we will end up with nothing
-
- if (arg.equalsIgnoreCase("-categoryQualifier")) //$NON-NLS-1$
- categoryQualifier = parameter;
-
- if (arg.equalsIgnoreCase("-categoryDefinition")) //$NON-NLS-1$
- categoryDefinition = URIUtil.fromString(parameter);
-
- }
-
- protected IPublisherAction[] createActions() {
- return new IPublisherAction[] {new CategoryXMLAction(categoryDefinition, categoryQualifier)};
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryXMLAction.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryXMLAction.java
deleted file mode 100644
index 5321d13da..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryXMLAction.java
+++ /dev/null
@@ -1,38 +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.internal.p2.updatesite;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.publisher.IPublisherInfo;
-import org.eclipse.equinox.p2.publisher.IPublisherResult;
-
-/**
- * This action parses a category file and publishes all the categories whose
- * elements are contained in the publisher results.
- */
-public class CategoryXMLAction extends SiteXMLAction {
-
- public CategoryXMLAction(URI location, String categoryQualifier) {
- super(location, categoryQualifier);
- }
-
- public IStatus perform(IPublisherInfo info, IPublisherResult results, IProgressMonitor monitor) {
- try {
- updateSite = UpdateSite.loadCategoryFile(location, monitor);
- } catch (ProvisionException e) {
- return new Status(IStatus.ERROR, Activator.ID, "Error generating category xml action.", e);
- }
- if (updateSite == null)
- return new Status(IStatus.ERROR, Activator.ID, "Error generating category xml action.");
- return super.perform(info, results, monitor);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java
deleted file mode 100644
index ac5e456ab..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java
+++ /dev/null
@@ -1,819 +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.updatesite;
-
-import java.io.*;
-import java.net.URI;
-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.p2.publisher.eclipse.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 final URI siteLocation;
-
- /*
- *
- */
- 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(URI siteLocation) {
- super();
- this.siteLocation = siteLocation;
- 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 {
- checkTranslated(info.getAnnotation());
- 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);
-
- String type = attributes.getValue("type"); //$NON-NLS-1$
- feature.setType(type);
-
- // 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);
- }
-
- // get label if it exists
- String label = attributes.getValue("label"); //$NON-NLS-1$
- if (label != null) {
- if ("".equals(label.trim())) //$NON-NLS-1$
- label = null;
- checkTranslated(label);
- }
- feature.setLabel(label);
-
- // OS
- String os = attributes.getValue("os"); //$NON-NLS-1$
- feature.setOS(os);
-
- // WS
- String ws = attributes.getValue("ws"); //$NON-NLS-1$
- feature.setWS(ws);
-
- // NL
- String nl = attributes.getValue("nl"); //$NON-NLS-1$
- feature.setNL(nl);
-
- // arch
- String arch = attributes.getValue("arch"); //$NON-NLS-1$
- feature.setArch(arch);
-
- //patch
- String patch = attributes.getValue("patch"); //$NON-NLS-1$
- feature.setPatch(patch);
-
- SiteModel site = (SiteModel) objectStack.peek();
- site.addFeature(feature);
- feature.setSiteModel(site);
-
- objectStack.push(feature);
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End Processing DefaultFeature Tag: url:" + urlInfo + " type:" + type); //$NON-NLS-1$ //$NON-NLS-2$
-
- }
-
- /*
- * 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();
-
- // if URL is specified, it replaces the URL of the site
- // used to calculate the location of features and archives
- String siteURL = attributes.getValue("url"); //$NON-NLS-1$
- if (siteURL != null && !("".equals(siteURL.trim()))) { //$NON-NLS-1$
- if (!siteURL.endsWith("/") && !siteURL.endsWith(File.separator)) { //$NON-NLS-1$
- siteURL += "/"; //$NON-NLS-1$
- }
- site.setLocationURIString(siteURL);
- }
-
- // 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);
-
- // verify we can parse the site ...if the site has
- // a different type throw an exception to force reparsing
- // with the matching parser
- String type = attributes.getValue("type"); //$NON-NLS-1$
- site.setType(type);
-
- // get mirrors, if any
- String mirrorsURL = attributes.getValue("mirrorsURL"); //$NON-NLS-1$
- if (mirrorsURL != null && mirrorsURL.trim().length() > 0) {
- // URLEntry[] mirrors = getMirrors(mirrorsURL);
- // if (mirrors != null)
- // site.setMirrors(mirrors);
- // else
-
- //Since we are parsing the site at p2 generation time and the
- //mirrors may change, there is no point doing the mirror expansion now
- site.setMirrorsURIString(mirrorsURL);
- }
-
- String pack200 = attributes.getValue("pack200"); //$NON-NLS-1$
- if (pack200 != null && new Boolean(pack200).booleanValue()) {
- site.setSupportsPack200(true);
- }
-
- String digestURL = attributes.getValue("digestURL"); //$NON-NLS-1$
- if (digestURL != null)
- site.setDigestURIString(digestURL);
-
- // TODO: Digest locales
- // if ((attributes.getValue("availableLocales") != null) && (!attributes.getValue("availableLocales").trim().equals(""))) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- // StringTokenizer locals = new StringTokenizer(attributes.getValue("availableLocales"), ","); //$NON-NLS-1$//$NON-NLS-2$
- // String[] availableLocals = new String[locals.countTokens()];
- // int i = 0;
- // while (locals.hasMoreTokens()) {
- // availableLocals[i++] = locals.nextToken();
- // }
- // extendedSite.setAvailableLocals(availableLocals);
- // }
- // }
- //
- final String associateURL = attributes.getValue(ASSOCIATE_SITES_URL);
- if (associateURL != null) {
- //resolve the URI relative to the site location
- URI resolvedLocation = siteLocation.resolve(associateURL);
- site.setAssociateSites(getAssociateSites(resolvedLocation.toString()));
- }
-
- objectStack.push(site);
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End process Site tag: siteURL:" + siteURL + " type:" + type);//$NON-NLS-1$ //$NON-NLS-2$
-
- }
-
- /**
- * 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.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DigestParser.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DigestParser.java
deleted file mode 100644
index af0e3ba73..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DigestParser.java
+++ /dev/null
@@ -1,114 +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.updatesite;
-
-import java.io.*;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-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.publisher.eclipse.FeatureManifestParser;
-import org.eclipse.equinox.p2.publisher.eclipse.Feature;
-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 DigestParser extends DefaultHandler {
-
- private final static SAXParserFactory parserFactory = SAXParserFactory.newInstance();
- private SAXParser parser;
- private final List features = new ArrayList();
- private final FeatureManifestParser featureHandler = new FeatureManifestParser(false);
-
- public DigestParser() {
- super();
- 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 {
- featureHandler.characters(ch, start, length);
- }
-
- public void endElement(String uri, String localName, String qName) throws SAXException {
- if ("digest".equals(localName)) { //$NON-NLS-1$
- return;
- }
- if ("feature".equals(localName)) { //$NON-NLS-1$
- Feature feature = featureHandler.getResult();
- features.add(feature);
- } else
- featureHandler.endElement(uri, localName, qName);
- }
-
- public Feature[] parse(File localFile, URI location) {
- if (!localFile.exists())
- return null;
-
- if (location == null)
- location = localFile.toURI();
-
- JarFile jar = null;
- InputStream is = null;
- try {
- jar = new JarFile(localFile);
- JarEntry entry = jar.getJarEntry("digest.xml"); //$NON-NLS-1$
- if (entry == null)
- return null;
- is = new BufferedInputStream(jar.getInputStream(entry));
- parser.parse(new InputSource(is), this);
- return (Feature[]) features.toArray(new Feature[features.size()]);
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.ErrorReadingDigest, location), e));
- } catch (SAXException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.ErrorReadingDigest, location), e));
- } finally {
- try {
- if (is != null)
- is.close();
- } catch (IOException e1) {
- //
- }
- try {
- if (jar != null)
- jar.close();
- } catch (IOException e) {
- //
- }
- }
- return null;
- }
-
- public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
- if ("digest".equals(localName)) { //$NON-NLS-1$
- return;
- }
- featureHandler.startElement(uri, localName, qName, attributes);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/LocalUpdateSiteAction.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/LocalUpdateSiteAction.java
deleted file mode 100644
index 6fd9d0e0b..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/LocalUpdateSiteAction.java
+++ /dev/null
@@ -1,104 +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.p2.updatesite;
-
-import java.io.File;
-import java.util.ArrayList;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.publisher.actions.MergeResultsAction;
-import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
-import org.eclipse.equinox.p2.publisher.eclipse.FeaturesAction;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * A publishing action that processes a local (File-based) update site and generates
- * metadata and artifacts for the features, bundles and site index (categories etc).
- */
-public class LocalUpdateSiteAction implements IPublisherAction {
- protected String source;
- private UpdateSite updateSite;
- private String categoryQualifier;
-
- protected LocalUpdateSiteAction() {
- // empty
- }
-
- /**
- * Creates a local updatesite publisher action from a source location
- * @param source The location of the directory that contains the site.xml file
- * @param categoryQualifier The qualifier to prepend to categories. This qualifier is used
- * to ensure that the category IDs are unique between update sites. If <b>null</b> a default
- * qualifier will be generated
- */
- public LocalUpdateSiteAction(String source, String categoryQualifier) {
- this.source = source;
- this.categoryQualifier = categoryQualifier;
- }
-
- /**
- * Creates a local updatesite publisher action from an UpdateSite
- * @param updateSite The updatesite to use
- * @param categoryQualifier The qualifier to prepend to categories. This qualifier is used
- * to ensure that the category IDs are unique between update sites. If <b>null</b> a default
- * qualifier will be generated
- */
- public LocalUpdateSiteAction(UpdateSite updateSite, String categoryQualifier) {
- this.updateSite = updateSite;
- this.categoryQualifier = categoryQualifier;
- }
-
- public IStatus perform(IPublisherInfo info, IPublisherResult results, IProgressMonitor monitor) {
- IPublisherAction[] actions = createActions();
- MultiStatus finalStatus = new MultiStatus(LocalUpdateSiteAction.class.getName(), 0, NLS.bind(Messages.Error_Generation, source != null ? source : (updateSite != null ? updateSite.getLocation().toString() : "Unknown")), null); //$NON-NLS-1$
- for (int i = 0; i < actions.length; i++) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- finalStatus.merge(actions[i].perform(info, results, monitor));
- }
- if (!finalStatus.isOK())
- return finalStatus;
- return Status.OK_STATUS;
- }
-
- protected IPublisherAction[] createActions() {
- createAdvice();
- ArrayList result = new ArrayList();
- // create an action that just publishes the raw bundles and features
- IPublisherAction action = new MergeResultsAction(new IPublisherAction[] {createFeaturesAction(), createBundlesAction()}, IPublisherResult.MERGE_ALL_NON_ROOT);
- result.add(action);
- result.add(createSiteXMLAction());
- return (IPublisherAction[]) result.toArray(new IPublisherAction[result.size()]);
- }
-
- private IPublisherAction createSiteXMLAction() {
- if (updateSite != null)
- return new SiteXMLAction(updateSite, categoryQualifier);
- if (source != null) {
- SiteXMLAction siteXmlAction = new SiteXMLAction(new File(source, "site.xml").toURI(), categoryQualifier); //$NON-NLS-1$
- return siteXmlAction;
- }
- return null;
- }
-
- private void createAdvice() {
- // empty
- }
-
- protected IPublisherAction createFeaturesAction() {
- return new FeaturesAction(new File[] {new File(source, "features")}); //$NON-NLS-1$
- }
-
- protected IPublisherAction createBundlesAction() {
- return new BundlesAction(new File[] {new File(source, "plugins")}); //$NON-NLS-1$
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/Messages.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/Messages.java
deleted file mode 100644
index 8b5417042..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/Messages.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.updatesite;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @since 1.0
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.updatesite.messages"; //$NON-NLS-1$
-
- public static String ErrorReadingDigest;
- public static String ErrorReadingFeature;
- public static String ErrorReadingSite;
- public static String Error_Generation;
-
- 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 {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- // prevent instantiation
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteFeaturesAction.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteFeaturesAction.java
deleted file mode 100644
index 64e568e61..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteFeaturesAction.java
+++ /dev/null
@@ -1,80 +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.p2.updatesite;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.publisher.eclipse.*;
-import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-import org.eclipse.osgi.util.NLS;
-
-public class RemoteFeaturesAction extends FeaturesAction {
- private UpdateSite updateSite;
-
- public RemoteFeaturesAction(UpdateSite updateSite) {
- super((Feature[]) null);
- this.updateSite = updateSite;
- }
-
- public RemoteFeaturesAction(Feature[] features) {
- super(features);
- throw new IllegalArgumentException();
- }
-
- public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- try {
- this.info = publisherInfo;
- features = updateSite.loadFeatures(monitor);
- return super.perform(publisherInfo, results, monitor);
- } catch (ProvisionException e) {
- return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Error_Generation, updateSite), e);
- } catch (OperationCanceledException e) {
- return Status.CANCEL_STATUS;
- }
-
- }
-
- protected void generateFeatureIUs(Feature[] featureList, IPublisherResult result) {
- Properties extraProperties = new Properties();
- extraProperties.put(IInstallableUnit.PROP_PARTIAL_IU, Boolean.TRUE.toString());
- for (int i = 0; i < featureList.length; i++) {
- Feature feature = featureList[i];
- FeatureEntry[] featureEntries = feature.getEntries();
- for (int j = 0; j < featureEntries.length; j++) {
- FeatureEntry entry = featureEntries[j];
- if (entry.isPlugin() && !entry.isRequires()) {
- Dictionary mockManifest = new Properties();
- mockManifest.put("Manifest-Version", "1.0"); //$NON-NLS-1$ //$NON-NLS-2$
- mockManifest.put("Bundle-ManifestVersion", "2"); //$NON-NLS-1$ //$NON-NLS-2$
- mockManifest.put("Bundle-SymbolicName", entry.getId()); //$NON-NLS-1$
- mockManifest.put("Bundle-Version", entry.getVersion()); //$NON-NLS-1$
- BundleDescription bundleDescription = BundlesAction.createBundleDescription(mockManifest, null);
- IArtifactKey key = BundlesAction.createBundleArtifactKey(entry.getId(), entry.getVersion());
- IInstallableUnit[] bundleIUs = PublisherHelper.createEclipseIU(bundleDescription, entry.isUnpack(), key, extraProperties);
- for (int n = 0; n < bundleIUs.length; n++)
- result.addIU(bundleIUs[n], IPublisherResult.ROOT);
- }
- }
- IInstallableUnit featureIU = createFeatureJarIU(feature, new PublisherInfo());
- List childIUs = new ArrayList();
- childIUs.add(featureIU);
- IInstallableUnit groupIU = createGroupIU(feature, childIUs, new PublisherInfo());
- result.addIU(featureIU, IPublisherResult.ROOT);
- result.addIU(groupIU, IPublisherResult.ROOT);
- generateSiteReferences(feature, result, info);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteUpdateSiteAction.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteUpdateSiteAction.java
deleted file mode 100644
index 428c06122..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteUpdateSiteAction.java
+++ /dev/null
@@ -1,67 +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.p2.updatesite;
-
-import java.util.ArrayList;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * A publishing action that processes a remote (URL-based) update site and generates
- * metadata and artifacts for the features, bundles and site index (categories etc). The
- * IUs generated for the bundles are "partial" as the bundles themselves are not downloaded.
- */
-public class RemoteUpdateSiteAction implements IPublisherAction {
- private UpdateSite updateSite;
- private final String categoryQualifier;
-
- /**
- * Creates a local remote updatesite publisher action from an UpdateSite
- * @param updateSite The UpdateSite to use
- * @param categoryQualifier The qualifier to prepend to categories. This qualifier is used
- * to ensure that the category IDs are unique between update sites. If <b>null</b> a default
- * qualifier will be generated
- */
- public RemoteUpdateSiteAction(UpdateSite updateSite, String categoryQualifier) {
- this.updateSite = updateSite;
- this.categoryQualifier = categoryQualifier;
- }
-
- public IStatus perform(IPublisherInfo info, IPublisherResult results, IProgressMonitor monitor) {
- if (Tracing.DEBUG_PUBLISHING)
- Tracing.debug("Generating metadata for update site: " + updateSite.getLocation()); //$NON-NLS-1$
- IPublisherAction[] actions = createActions();
- MultiStatus finalStatus = new MultiStatus(this.getClass().getName(), 0, NLS.bind(Messages.Error_Generation, updateSite != null ? updateSite.getLocation().toString() : "Unknown"), null); //$NON-NLS-1$
- for (int i = 0; i < actions.length; i++) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- finalStatus.merge(actions[i].perform(info, results, monitor));
- }
- if (Tracing.DEBUG_PUBLISHING)
- Tracing.debug("Generation for update site complete: " + updateSite.getLocation()); //$NON-NLS-1$
- if (!finalStatus.isOK())
- return finalStatus;
- return Status.OK_STATUS;
- }
-
- protected IPublisherAction[] createActions() {
- ArrayList result = new ArrayList();
- result.add(new RemoteFeaturesAction(updateSite));
- result.add(createSiteXMLAction());
- return (IPublisherAction[]) result.toArray(new IPublisherAction[result.size()]);
- }
-
- private IPublisherAction createSiteXMLAction() {
- return new SiteXMLAction(updateSite, categoryQualifier);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteCategory.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteCategory.java
deleted file mode 100644
index 131016e6e..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteCategory.java
+++ /dev/null
@@ -1,199 +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.updatesite;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Comparator;
-import java.util.Map;
-
-/**
- * A category in an update site.
- *
- * Based on org.eclipse.update.core.model.CategoryModel.
- */
-public class SiteCategory {
-
- private static Comparator comp;
- private String description;
- private String label;
- private String name;
- private Map localizations;
-
- /**
- * Returns a comparator for category models.
- *
- * @return comparator
- * @since 2.0
- */
- public static Comparator getComparator() {
- if (comp == null) {
- comp = new Comparator() {
- /*
- * @see Comparator#compare(Object,Object)
- * Returns 0 if versions are equal.
- * Returns -1 if object1 is after than object2.
- * Returns +1 if object1 is before than object2.
- */
- public int compare(Object o1, Object o2) {
-
- SiteCategory cat1 = (SiteCategory) o1;
- SiteCategory cat2 = (SiteCategory) o2;
-
- if (cat1.equals(cat2))
- return 0;
- return cat1.getName().compareTo(cat2.getName());
- }
- };
- }
- return comp;
- }
-
- /**
- * 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();
- }
-
- /**
- * Resolve the model object.
- * Any URL strings in the model are resolved relative to the
- * base URL argument. Any translatable strings in the model that are
- * specified as translation keys are localized using the supplied
- * resource bundle.
- *
- * @param base URL
- * @param bundleURL resource bundle URL
- * @exception MalformedURLException
- * @since 2.0
- */
- public void resolve(URL base, URL bundleURL) throws MalformedURLException {
- // resolve local elements
- // localizedLabel = resolveNLString(bundleURL, label);
-
- // delegate to references
- // resolveReference(getDescriptionModel(), base, bundleURL);
- }
-
- /**
- * 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.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java
deleted file mode 100644
index 3ad51042a..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java
+++ /dev/null
@@ -1,451 +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
- * James D Miles (IBM Corp.) - bug 191783, NullPointerException in FeatureDownloader
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.updatesite;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.*;
-
-/**
- * A reference to a feature in an update site.xml file.
- *
- * Based on org.eclipse.update.core.model.FeatureReferenceModel.
- */
-public class SiteFeature {
-
- private String arch;
- // performance
- private URL base;
- private List /* of String*/categoryNames;
- private String featureId;
- private String featureVersion;
- private String label;
- private String nl;
-
- private String os;
- private String patch;
- private final boolean resolved = false;
- private SiteModel site;
- private String type;
- private URL url;
- private String urlString;
- private String ws;
-
- /*
- * Compares two URL for equality
- */
- 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;
- if (this.label == null) {
- if (that.label != null)
- return false;
- } else if (!this.label.equals(that.label))
- 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;
- }
-
- /**
- * Retrieve the displayable label for the feature reference. If the model
- * object has been resolved, the label is localized.
- *
- * @return displayable label, or <code>null</code>.
- */
- public String getLabel() {
- return label;
- }
-
- /**
- * Retrieve the non-localized displayable label for the feature reference.
- *
- * @return non-localized displayable label, or <code>null</code>.
- */
- public String getLabelNonLocalized() {
- return label;
- }
-
- /**
- * Get optional locale specification as a comma-separated string.
- *
- * @return the locale specification string, or <code>null</code>.
- */
- public String getNL() {
- return nl;
- }
-
- /**
- * Get optional operating system specification as a comma-separated string.
- *
- * @return the operating system specification string, or <code>null</code>.
- */
- public String getOS() {
- return os;
- }
-
- /**
- * Get optional system architecture specification as a comma-separated string.
- *
- * @return the system architecture specification string, or <code>null</code>.
- */
- public String getOSArch() {
- return arch;
- }
-
- /**
- * Returns the patch mode.
- */
- public String getPatch() {
- return patch;
- }
-
- /**
- * Returns the site model for the reference.
- *
- * @return site model
- * @since 2.0
- */
- public SiteModel getSiteModel() {
- return site;
- }
-
- /**
- * Returns the referenced feature type.
- *
- * @return feature type, or <code>null</code> representing the default
- * feature type for the site
- */
- public String getType() {
- return type;
- }
-
- /**
- * Returns the resolved URL for the feature reference.
- *
- * @return url string
- */
- public URL getURL() {
- delayedResolve();
- return url;
- }
-
- /**
- * Returns the unresolved URL string for the reference.
- *
- * @return url string
- */
- public String getURLString() {
- return urlString;
- }
-
- /**
- * Get optional windowing system specification as a comma-separated string.
- *
- * @return the windowing system specification string, or <code>null</code>.
- */
- public String getWS() {
- return ws;
- }
-
- /**
- * Resolve the model object.
- * Any URL strings in the model are resolved relative to the
- * base URL argument. Any translatable strings in the model that are
- * specified as translation keys are localized using the supplied
- * resource bundle.
- *
- * @param resolveBase URL
- * @param bundleURL resource bundle URL
- * @exception MalformedURLException
- */
- public void resolve(URL resolveBase, URL bundleURL) throws MalformedURLException {
- this.base = resolveBase;
- }
-
- /**
- * Sets the system architecture specification.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param arch system architecture specification as a comma-separated list
- */
- public void setArch(String arch) {
- this.arch = arch;
- }
-
- /**
- * Sets the names of categories this feature belongs to.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param categoryNames an array of category names
- */
- public void setCategoryNames(String[] categoryNames) {
- if (categoryNames == null)
- this.categoryNames = null;
- else
- this.categoryNames = new ArrayList(Arrays.asList(categoryNames));
- }
-
- /**
- * 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 label.
- * @param label The label to set
- */
- public void setLabel(String label) {
- this.label = label;
- }
-
- /**
- * Sets the locale specification.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param nl locale specification as a comma-separated list
- */
- public void setNL(String nl) {
- this.nl = nl;
- }
-
- /**
- * Sets the operating system specification.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param os operating system specification as a comma-separated list
- */
- public void setOS(String os) {
- this.os = os;
- }
-
- /**
- * Sets the patch mode.
- */
- public void setPatch(String patch) {
- this.patch = patch;
- }
-
- /**
- * Sets the site for the referenced.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param site site for the reference
- */
- public void setSiteModel(SiteModel site) {
- this.site = site;
- }
-
- /**
- * Sets the referenced feature type.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param type referenced feature type
- */
- public void setType(String type) {
- this.type = type;
- }
-
- /**
- * 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;
- }
-
- /**
- * Sets the windowing system specification.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param ws windowing system specification as a comma-separated list
- */
- public void setWS(String ws) {
- this.ws = ws;
- }
-
- /**
- * @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.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteModel.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteModel.java
deleted file mode 100644
index d0bd69475..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteModel.java
+++ /dev/null
@@ -1,314 +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.updatesite;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.equinox.p2.publisher.eclipse.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 URI locationURI;
- private String locationURIString;
- private String mirrorsURIString;
- private boolean supportsPack200;
- private String type;
- private URLEntry[] associateSites;
- private String digestURIString;
- 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);
- }
-
- /**
- * Returns an array of plug-in and non-plug-in archive reference models
- * on this site
- *
- * @return an array of archive reference models, or an empty array if there are
- * no archives known to this site.
- * @since 2.0
- */
- public URLEntry[] getArchives() {
- if (archiveReferences == null || archiveReferences.size() == 0)
- return new URLEntry[0];
-
- return (URLEntry[]) archiveReferences.toArray(new URLEntry[0]);
- }
-
- public URLEntry[] getAssociatedSites() {
- return associateSites;
- }
-
- /**
- * Returns an array of category models for this site.
- *
- * @return array of site category models, or an empty array.
- * @since 2.0
- */
- public SiteCategory[] getCategories() {
- if (categories == null || categories.size() == 0)
- return new SiteCategory[0];
- return (SiteCategory[]) categories.values().toArray(new SiteCategory[0]);
- }
-
- /**
- * 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]);
- }
-
- /**
- * 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;
- }
-
- /**
- * Returns the resolved URI for the site.
- *
- * @return url, or <code>null</code>
- */
- public URI getLocationURI() {
- if (locationURI == null && locationURIString != null) {
- try {
- locationURI = new URI(locationURIString);
- } catch (URISyntaxException e) {
- //ignore and return null
- }
- }
- return locationURI;
- }
-
- /**
- * Returns the unresolved URI string for the site.
- *
- * @return url string, or <code>null</code>
- */
- public String getLocationURIString() {
- return locationURIString;
- }
-
- /**
- * 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 URI from which the list of mirrors of this site can be retrieved.
- *
- * @since org.eclipse.equinox.p2.metadata.generator 1.0
- */
- public String getMirrorsURI() {
- return mirrorsURIString;
- }
-
- /**
- * Returns the site type.
- *
- * @return site type, or <code>null</code>.
- * @since 2.0
- */
- public String getType() {
- return type;
- }
-
- public boolean isPack200Supported() {
- return supportsPack200;
- }
-
- /**
- * 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 the unresolved URI for the site.
- *
- * @param locationURIString url for the site (as a string)
- * @since 2.0
- */
- public void setLocationURIString(String locationURIString) {
- this.locationURIString = locationURIString;
- }
-
- /**
- * 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 mirrorsURI additional update site mirrors
- * @since 3.1
- */
- public void setMirrorsURIString(String mirrorsURI) {
- this.mirrorsURIString = mirrorsURI;
- }
-
- public void setSupportsPack200(boolean value) {
- this.supportsPack200 = value;
- }
-
- /**
- * Sets the site type.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param type site type
- * @since 2.0
- */
- public void setType(String type) {
- this.type = type;
- }
-
- /**
- * Sets the associated sites for this update site.
- *
- * @param associateSites the associated sites
- */
- public void setAssociateSites(URLEntry[] associateSites) {
- this.associateSites = associateSites;
- }
-
- public void setDigestURIString(String digestURIString) {
- this.digestURIString = digestURIString;
- }
-
- public String getDigestURIString() {
- return digestURIString;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteXMLAction.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteXMLAction.java
deleted file mode 100644
index 27df91676..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteXMLAction.java
+++ /dev/null
@@ -1,357 +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.p2.updatesite;
-
-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.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.LatestIUVersionQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.publisher.eclipse.URLEntry;
-import org.eclipse.equinox.spi.p2.publisher.LocalizationHelper;
-import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-
-/**
- * Action which processes a site.xml and generates categories. The categorization process
- * relies on IUs for the various features to have already been generated.
- */
-public class SiteXMLAction extends AbstractPublisherAction {
- static final private String QUALIFIER = "qualifier"; //$NON-NLS-1$
- protected UpdateSite updateSite;
- private SiteCategory defaultCategory;
- private HashSet defaultCategorySet;
- protected URI location;
- private String categoryQualifier = null;
-
- /**
- * Creates a SiteXMLAction from a Location (URI) with an optional qualifier to use for category names
- * @param location The location of the update site
- * @param categoryQualifier The qualifier to prepend to categories. This qualifier is used
- * to ensure that the category IDs are unique between update sites. If <b>null</b> a default
- * qualifier will be generated
- */
- public SiteXMLAction(URI location, String categoryQualifier) {
- this.location = location;
- this.categoryQualifier = categoryQualifier;
- }
-
- /**
- * Creates a SiteXMLAction from an Update site with an optional qualifier to use for category names
- * @param updateSite The update site
- * @param categoryQualifier The qualifier to prepend to categories. This qualifier is used
- * to ensure that the category IDs are unique between update sites. If <b>null</b> a default
- * qualifier will be generated
- */
- public SiteXMLAction(UpdateSite updateSite, String categoryQualifier) {
- this.updateSite = updateSite;
- this.categoryQualifier = categoryQualifier;
- }
-
- private void initialize() {
- if (defaultCategory != null)
- return;
- defaultCategory = new SiteCategory();
- defaultCategory.setDescription("Default category for otherwise uncategorized features"); //$NON-NLS-1$
- defaultCategory.setLabel("Uncategorized"); //$NON-NLS-1$
- defaultCategory.setName("Default"); //$NON-NLS-1$
- defaultCategorySet = new HashSet(1);
- defaultCategorySet.add(defaultCategory);
- }
-
- public IStatus perform(IPublisherInfo info, IPublisherResult results, IProgressMonitor monitor) {
- if (updateSite == null) {
- try {
- updateSite = UpdateSite.load(location, monitor);
- } catch (ProvisionException e) {
- return new Status(IStatus.ERROR, Activator.ID, "Error generating site xml action.", e);
- } catch (OperationCanceledException e) {
- return Status.CANCEL_STATUS;
- }
- }
- initialize();
- return generateCategories(info, results, monitor);
- }
-
- private IStatus generateCategories(IPublisherInfo info, IPublisherResult results, IProgressMonitor monitor) {
- Map categoriesToFeatureIUs = new HashMap();
- Map featuresToCategories = getFeatureToCategoryMappings(info);
- for (Iterator i = featuresToCategories.keySet().iterator(); i.hasNext();) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- SiteFeature feature = (SiteFeature) i.next();
- IInstallableUnit iu = getFeatureIU(feature, info, results);
- if (iu == null)
- continue;
- Set categories = (Set) featuresToCategories.get(feature);
- // if there are no categories for this feature then add it to the default category.
- if (categories == null || categories.isEmpty())
- categories = defaultCategorySet;
- 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(iu);
- }
- }
- generateCategoryIUs(categoriesToFeatureIUs, results);
- return Status.OK_STATUS;
- }
-
- private IInstallableUnit getFeatureIU(SiteFeature feature, IPublisherInfo publisherInfo, IPublisherResult results) {
- String id = feature.getFeatureIdentifier() + ".feature.group"; //$NON-NLS-1$
- String versionString = feature.getFeatureVersion();
- Version version = versionString != null && versionString.length() > 0 ? new Version(versionString) : Version.emptyVersion;
- Query query = null;
- Collector collector = null;
- if (version.equals(Version.emptyVersion)) {
- query = new CompositeQuery(new Query[] {new InstallableUnitQuery(id), new LatestIUVersionQuery()});
- collector = new Collector();
- } else if (version.getQualifier() != null && version.getQualifier().endsWith(QUALIFIER)) {
- final String v = versionString.substring(0, versionString.indexOf(QUALIFIER));
- Query qualifierQuery = new InstallableUnitQuery(id) {
- private String qualifierVersion = v.endsWith(".") ? v.substring(0, v.length() - 1) : v; //$NON-NLS-1$
-
- public boolean isMatch(Object object) {
- if (super.isMatch(object)) {
- IInstallableUnit candidate = (IInstallableUnit) object;
- return candidate.getVersion().toString().startsWith(qualifierVersion);
- }
- return false;
- }
- };
- query = new CompositeQuery(new Query[] {qualifierQuery, new LatestIUVersionQuery()});
- collector = new Collector();
- } else {
- query = new InstallableUnitQuery(id, version);
- collector = new Collector() {
- public boolean accept(Object object) {
- super.accept(object);
- return false; //stop searching once we've found one
- }
- };
- }
-
- collector = results.query(query, collector, null);
- if (collector.size() == 0)
- collector = publisherInfo.getMetadataRepository().query(query, collector, null);
- if (collector.size() == 0 && publisherInfo.getContextMetadataRepository() != null)
- collector = publisherInfo.getContextMetadataRepository().query(query, collector, null);
-
- if (collector.size() == 1)
- return (IInstallableUnit) collector.iterator().next();
- return null;
- }
-
- /**
- * 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(IPublisherInfo info) {
- HashMap mappings = new HashMap();
- if (updateSite == null)
- return mappings;
- SiteModel site = updateSite.getSite();
- if (site == null)
- return mappings;
-
- //copy mirror information from update site to p2 repositories
- String mirrors = site.getMirrorsURI();
- 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);
- // there does not really need to be an artifact repo but if there is, setup its mirrors.
- if (info.getArtifactRepository() != null)
- 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, info.getMetadataRepository());
-
- File siteFile = URIUtil.toFile(updateSite.getLocation());
- if (siteFile != null && 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();
- Set categories = new HashSet();
- mappings.put(features[i], categories);
- for (int j = 0; j < categoryNames.length; j++) {
- SiteCategory category = site.getCategory(categoryNames[j]);
- if (category != null)
- categories.add(category);
- }
- }
- return mappings;
- }
-
- /**
- * Generates and publishes a reference to an update site location
- * @param location The update site location
- * @param label The update site label
- * @param featureId the identifier of the feature where the error occurred, or null
- * @param metadataRepo The repository into which the references are added
- */
- private void generateSiteReference(String location, String label, String featureId, IMetadataRepository metadataRepo) {
- if (metadataRepo == null)
- return;
- try {
- URI associateLocation = new URI(location);
- metadataRepo.addReference(associateLocation, label, IRepository.TYPE_METADATA, IRepository.ENABLED);
- metadataRepo.addReference(associateLocation, label, IRepository.TYPE_ARTIFACT, IRepository.ENABLED);
- } 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));
- }
- }
-
- /**
- * 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
- */
- protected void generateCategoryIUs(Map categoriesToFeatures, IPublisherResult result) {
- for (Iterator it = categoriesToFeatures.keySet().iterator(); it.hasNext();) {
- SiteCategory category = (SiteCategory) it.next();
- result.addIU(createCategoryIU(category, (Set) categoriesToFeatures.get(category), null), IPublisherResult.NON_ROOT);
- }
- }
-
- /**
- * 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
- */
- public IInstallableUnit createCategoryIU(SiteCategory category, Set featureIUs, IInstallableUnit parentCategory) {
- InstallableUnitDescription cat = new MetadataFactory.InstallableUnitDescription();
- cat.setSingleton(true);
- String categoryId = buildCategoryId(category.getName());
- cat.setId(categoryId);
-
- cat.setVersion(Version.createOSGi(0, 0, 0, getDateQualifier()));
- String label = category.getLabel();
- cat.setProperty(IInstallableUnit.PROP_NAME, label != null ? label : category.getName());
- 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.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, 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.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, parentCategory.getId(), VersionRange.emptyRange, parentCategory.getFilter(), false, false));
- }
- cat.setRequiredCapabilities((IRequiredCapability[]) reqsConfigurationUnits.toArray(new IRequiredCapability[reqsConfigurationUnits.size()]));
-
- // Create set of provided capabilities
- ArrayList providedCapabilities = new ArrayList();
- providedCapabilities.add(PublisherHelper.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(PublisherHelper.makeTranslationCapability(categoryId, locale));
- }
- }
-
- cat.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
-
- cat.setArtifacts(new IArtifactKey[0]);
- cat.setProperty(IInstallableUnit.PROP_TYPE_CATEGORY, "true"); //$NON-NLS-1$
- return MetadataFactory.createInstallableUnit(cat);
- }
-
- /**
- * Creates a qualified category id. This action's qualifier is used if one exists
- * or an existing update site's location is used.
- */
- private String buildCategoryId(String categoryName) {
- if (categoryQualifier != null) {
- if (categoryQualifier.length() > 0)
- return categoryQualifier + "." + categoryName; //$NON-NLS-1$
- return categoryName;
- }
- if (updateSite != null)
- return URIUtil.toUnencodedString(updateSite.getLocation()) + "." + categoryName; //$NON-NLS-1$
- return categoryName;
- }
-
- /*
- * Returns the current date/time as a string to be used as a qualifier
- * replacement. This is the default qualifier replacement. Will
- * be of the form YYYYMMDDHHMM.
- * @return current date/time as a qualifier replacement
- */
- private static String getDateQualifier() {
- final String empty = ""; //$NON-NLS-1$
- Calendar calendar = Calendar.getInstance();
- int monthNbr = calendar.get(Calendar.MONTH) + 1;
- String month = (monthNbr < 10 ? "0" : empty) + monthNbr; //$NON-NLS-1$
-
- int dayNbr = calendar.get(Calendar.DAY_OF_MONTH);
- String day = (dayNbr < 10 ? "0" : empty) + dayNbr; //$NON-NLS-1$
-
- int hourNbr = calendar.get(Calendar.HOUR_OF_DAY);
- String hour = (hourNbr < 10 ? "0" : empty) + hourNbr; //$NON-NLS-1$
-
- int minuteNbr = calendar.get(Calendar.MINUTE);
- String minute = (minuteNbr < 10 ? "0" : empty) + minuteNbr; //$NON-NLS-1$
-
- int secondNbr = calendar.get(Calendar.SECOND);
- String second = (secondNbr < 10 ? "0" : empty) + secondNbr; //$NON-NLS-1$
-
- return empty + calendar.get(Calendar.YEAR) + month + day + hour + minute + second;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSite.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSite.java
deleted file mode 100644
index 461d38ce3..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSite.java
+++ /dev/null
@@ -1,581 +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.updatesite;
-
-import java.io.*;
-import java.net.*;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.zip.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ecf.filetransfer.UserCancelledException;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.FeatureParser;
-import org.eclipse.equinox.internal.p2.repository.AuthenticationFailedException;
-import org.eclipse.equinox.internal.p2.repository.RepositoryTransport;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.publisher.eclipse.*;
-import org.eclipse.osgi.util.NLS;
-import org.xml.sax.SAXException;
-
-/**
- * @since 1.0
- */
-public class UpdateSite {
-
- private static final String VERSION_SEPARATOR = "_"; //$NON-NLS-1$
- private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
- private static final String FEATURE_DIR = "features/"; //$NON-NLS-1$
- private static final String PLUGIN_DIR = "plugins/"; //$NON-NLS-1$
- private static final String FEATURE_TEMP_FILE = "feature"; //$NON-NLS-1$
- private static final String SITE_FILE = "site.xml"; //$NON-NLS-1$
- private static final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
- private static final int RETRY_COUNT = 2;
- private static final String DOT_XML = ".xml"; //$NON-NLS-1$
- private static final String SITE = "site"; //$NON-NLS-1$
- private String checksum;
- private URI location;
- private URI rootLocation;
- private SiteModel site;
-
- /*
- * Some variables for caching.
- */
- // map of String (URI.toString()) to UpdateSite
- private static Map siteCache = new HashMap();
- // map of String (featureID_featureVersion) to Feature
- private Map featureCache = new HashMap();
-
- /*
- * Return a URI based on the given URI, which points to a site.xml file.
- */
- private static URI getSiteURI(URI baseLocation) {
- String segment = URIUtil.lastSegment(baseLocation);
- if (constainsUpdateSiteFileName(segment))
- return baseLocation;
- return URIUtil.append(baseLocation, SITE_FILE);
- }
-
- /**
- * Be lenient about accepting any location with *site*.xml at the end.
- */
- private static boolean constainsUpdateSiteFileName(String segment) {
- return segment != null && segment.endsWith(DOT_XML) && segment.indexOf(SITE) != -1;
- }
-
- /**
- * Loads and returns a category file
- * @param location
- * @param monitor
- * @return A CategoryFile
- * @throws ProvisionException
- */
- public static synchronized UpdateSite loadCategoryFile(URI location, IProgressMonitor monitor) throws ProvisionException {
- if (location == null)
- return null;
- UpdateSite result = (UpdateSite) siteCache.get(location.toString());
- if (result != null)
- return result;
- InputStream input = null;
- File siteFile = loadActualSiteFile(location, location, monitor);
- try {
- DefaultSiteParser siteParser = new DefaultSiteParser(location);
- Checksum checksum = new CRC32();
- input = new CheckedInputStream(new BufferedInputStream(new FileInputStream(siteFile)), checksum);
- SiteModel siteModel = siteParser.parse(input);
- String checksumString = Long.toString(checksum.getValue());
- result = new UpdateSite(siteModel, location, checksumString);
- siteCache.put(location.toString(), result);
- return result;
- } catch (SAXException e) {
- String msg = NLS.bind(Messages.ErrorReadingSite, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, msg, e));
- } catch (IOException e) {
- String msg = NLS.bind(Messages.ErrorReadingSite, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, msg, e));
- } finally {
- try {
- if (input != null)
- input.close();
- } catch (IOException e) {
- // ignore
- }
- if (!PROTOCOL_FILE.equals(location.getScheme()))
- siteFile.delete();
- }
- }
-
- /*
- * Load and return an update site object from the given location.
- */
- public static synchronized UpdateSite load(URI location, IProgressMonitor monitor) throws ProvisionException {
- if (location == null)
- return null;
- UpdateSite result = (UpdateSite) siteCache.get(location.toString());
- if (result != null)
- return result;
- InputStream input = null;
- File siteFile = loadSiteFile(location, monitor);
- try {
- DefaultSiteParser siteParser = new DefaultSiteParser(location);
- Checksum checksum = new CRC32();
- input = new CheckedInputStream(new BufferedInputStream(new FileInputStream(siteFile)), checksum);
- SiteModel siteModel = siteParser.parse(input);
- String checksumString = Long.toString(checksum.getValue());
- result = new UpdateSite(siteModel, getSiteURI(location), checksumString);
- siteCache.put(location.toString(), result);
- return result;
- } catch (SAXException e) {
- String msg = NLS.bind(Messages.ErrorReadingSite, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, msg, e));
- } catch (IOException e) {
- String msg = NLS.bind(Messages.ErrorReadingSite, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, msg, e));
- } finally {
- try {
- if (input != null)
- input.close();
- } catch (IOException e) {
- // ignore
- }
- if (!PROTOCOL_FILE.equals(location.getScheme()))
- siteFile.delete();
- }
- }
-
- private static File loadSiteFile(URI location, IProgressMonitor monitor) throws ProvisionException {
- return loadActualSiteFile(location, getSiteURI(location), monitor);
- }
-
- /**
- * Returns a local file containing the contents of the update site at the given location.
- */
- private static File loadActualSiteFile(URI location, URI actualLocation, IProgressMonitor monitor) throws ProvisionException {
- SubMonitor submonitor = SubMonitor.convert(monitor, 1000);
- try {
- File siteFile = null;
- IStatus transferResult = null;
- boolean deleteSiteFile = false;
- try {
- if (PROTOCOL_FILE.equals(actualLocation.getScheme())) {
- siteFile = URIUtil.toFile(actualLocation);
- if (siteFile.exists())
- transferResult = Status.OK_STATUS;
- else {
- String msg = NLS.bind(Messages.ErrorReadingSite, location);
- transferResult = new Status(IStatus.ERROR, Activator.ID, ProvisionException.ARTIFACT_NOT_FOUND, msg, new FileNotFoundException(siteFile.getAbsolutePath()));
- }
- } else {
- // creating a temp file. In the event of an error we want to delete it.
- deleteSiteFile = true;
- OutputStream destination = null;
- try {
- siteFile = File.createTempFile("site", ".xml"); //$NON-NLS-1$//$NON-NLS-2$
- destination = new BufferedOutputStream(new FileOutputStream(siteFile));
- } catch (IOException e) {
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.INTERNAL_ERROR, "Can not create tempfile for site.xml", e)); //$NON-NLS-1$
- }
- try {
- transferResult = getTransport().download(actualLocation, destination, submonitor.newChild(999));
- } finally {
- try {
- destination.close();
- } catch (IOException e) {
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.INTERNAL_ERROR, "Failing to close tempfile for site.xml", e)); //$NON-NLS-1$
- }
- }
- }
- if (monitor.isCanceled())
- throw new OperationCanceledException();
- if (transferResult.isOK()) {
- // successful. If the siteFile is the download of a remote site.xml it will get cleaned up later
- deleteSiteFile = false;
- return siteFile;
- }
-
- // The transferStatus from download has a well formatted message that should
- // be used as it contains useful feedback to the user.
- // The only thing needed is to translate the error code ARTIFACT_NOT_FOUND to
- // REPOSITORY_NOT_FOUND as the download does not know what the file represents.
- //
- IStatus ms = null;
- if (transferResult.getException() instanceof FileNotFoundException)
- ms = new MultiStatus(Activator.ID, //
- ProvisionException.REPOSITORY_NOT_FOUND,
- // (code == ProvisionException.ARTIFACT_NOT_FOUND || code == ProvisionException.REPOSITORY_NOT_FOUND ? ProvisionException.REPOSITORY_NOT_FOUND : ProvisionException.REPOSITORY_FAILED_READ), //
- new IStatus[] {transferResult}, //
- NLS.bind(Messages.ErrorReadingSite, location), null);
- else
- ms = transferResult;
- throw new ProvisionException(ms);
-
- } finally {
- if (deleteSiteFile && siteFile != null)
- siteFile.delete();
- }
- } finally {
- if (monitor != null)
- monitor.done();
- }
- }
-
- /*
- * Parse the feature.xml specified by the given input stream and return the feature object.
- * In case of failure, the failure is logged and null is returned
- */
- private static Feature parseFeature(FeatureParser featureParser, URI featureURI, IProgressMonitor monitor) {
- File featureFile = null;
- if (PROTOCOL_FILE.equals(featureURI.getScheme())) {
- featureFile = URIUtil.toFile(featureURI);
- return featureParser.parse(featureFile);
- }
- try {
- featureFile = File.createTempFile(FEATURE_TEMP_FILE, JAR_EXTENSION);
- IStatus transferResult = null;
- //try the download twice in case of transient network problems
- for (int i = 0; i < RETRY_COUNT; i++) {
- if (monitor.isCanceled())
- throw new OperationCanceledException();
- OutputStream destination = new BufferedOutputStream(new FileOutputStream(featureFile));
- try {
- transferResult = getTransport().download(featureURI, destination, monitor);
- } finally {
- try {
- destination.close();
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.ErrorReadingFeature, featureURI), e));
- return null;
- }
- }
- if (transferResult.isOK())
- break;
- }
- if (monitor.isCanceled())
- throw new OperationCanceledException();
- if (!transferResult.isOK()) {
- LogHelper.log(new ProvisionException(transferResult));
- return null;
- }
- return featureParser.parse(featureFile);
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.ErrorReadingFeature, featureURI), e));
- } finally {
- if (featureFile != null)
- featureFile.delete();
- }
- return null;
- }
-
- /**
- * Throw an exception if the site pointed to by the given URI is not valid.
- * @param url the site file to check
- * @param monitor a monitor
- * @throws UserCancelledException if user canceled during authentication
- * @throws AuthenticationFailedException if too many attempts made to login
- * @throws FileNotFoundException if the remote file does not exist
- * @throws CoreException on errors in communication (unknown host, connection refused, etc.)
- */
- public static void validate(URI url, IProgressMonitor monitor) throws UserCancelledException, AuthenticationFailedException, FileNotFoundException, CoreException {
- URI siteURI = getSiteURI(url);
- long lastModified = getTransport().getLastModified(siteURI, monitor);
- if (lastModified == 0) {
- throw new FileNotFoundException(url.toString());
- // String msg = NLS.bind(Messages.ErrorReadingSite, url);
- // throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, msg, null));
- }
- }
-
- /*
- * Constructor for the class.
- */
- private UpdateSite(SiteModel site, URI location, String checksum) {
- super();
- this.site = site;
- this.location = location;
- this.checksum = checksum;
- this.rootLocation = getRootLocation();
-
- }
-
- private URI getRootLocation() {
- String locationString = location.toString();
- int slashIndex = locationString.lastIndexOf('/');
- if (slashIndex == -1 || slashIndex == (locationString.length() - 1))
- return location;
-
- return URI.create(locationString.substring(0, slashIndex + 1));
- }
-
- /*
- * Iterate over the archive entries in this site and return the matching URI string for
- * the given identifier, if there is one.
- */
- private URI getArchiveURI(URI base, String identifier) {
- URLEntry[] archives = site.getArchives();
- for (int i = 0; archives != null && i < archives.length; i++) {
- URLEntry entry = archives[i];
- if (identifier.equals(entry.getAnnotation()))
- return internalGetURI(base, entry.getURL());
- }
- return null;
- }
-
- /*
- * Return the checksum for this site.
- */
- public String getChecksum() {
- return checksum;
- }
-
- /*
- * Return a URI which represents the location of the given feature.
- */
- public URI getSiteFeatureURI(SiteFeature siteFeature) {
- URL url = siteFeature.getURL();
- try {
- if (url != null)
- return URIUtil.toURI(url);
- } catch (URISyntaxException e) {
- //fall through and resolve the URI ourselves
- }
- URI base = getBaseURI();
- String featureURIString = siteFeature.getURLString();
- return internalGetURI(base, featureURIString);
- }
-
- /*
- * Return a URI which represents the location of the given feature.
- */
- public URI getFeatureURI(String id, String version) {
- SiteFeature[] entries = site.getFeatures();
- for (int i = 0; i < entries.length; i++) {
- if (id.equals(entries[i].getFeatureIdentifier()) && version.equals(entries[i].getFeatureVersion())) {
- return getSiteFeatureURI(entries[i]);
- }
- }
-
- URI base = getBaseURI();
- URI url = getArchiveURI(base, FEATURE_DIR + id + VERSION_SEPARATOR + version + JAR_EXTENSION);
- if (url != null)
- return url;
- return URIUtil.append(base, FEATURE_DIR + id + VERSION_SEPARATOR + version + JAR_EXTENSION);
- }
-
- /*
- * Return the location of this site.
- */
- public URI getLocation() {
- return location;
- }
-
- public String getMirrorsURI() {
- //copy mirror information from update site to p2 repositories
- String mirrors = site.getMirrorsURI();
- if (mirrors == null)
- return 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$
- return mirrors;
- }
-
- /*
- * Return a URI which represents the location of the given plug-in.
- */
- public URI getPluginURI(FeatureEntry plugin) {
- URI base = getBaseURI();
- String path = PLUGIN_DIR + plugin.getId() + VERSION_SEPARATOR + plugin.getVersion() + JAR_EXTENSION;
- URI url = getArchiveURI(base, path);
- if (url != null)
- return url;
- return URIUtil.append(base, path);
- }
-
- private URI getBaseURI() {
- URI base = null;
- String siteURIString = site.getLocationURIString();
- if (siteURIString != null) {
- if (!siteURIString.endsWith("/")) //$NON-NLS-1$
- siteURIString += "/"; //$NON-NLS-1$
- base = internalGetURI(rootLocation, siteURIString);
- }
- if (base == null)
- base = rootLocation;
- return base;
- }
-
- /*
- * Return the site model.
- */
- public SiteModel getSite() {
- return site;
- }
-
- /*
- * The trailing parameter can be either null, relative or absolute. If it is null,
- * then return null. If it is absolute, then create a new url and return it. If it is
- * relative, then make it relative to the given base url.
- */
- private URI internalGetURI(URI base, String trailing) {
- if (trailing == null)
- return null;
- return URIUtil.makeAbsolute(URI.create(trailing), base);
- }
-
- /*
- * Load and return the features references in this update site.
- */
- public synchronized Feature[] loadFeatures(IProgressMonitor monitor) throws ProvisionException {
- if (!featureCache.isEmpty())
- return (Feature[]) featureCache.values().toArray(new Feature[featureCache.size()]);
- Feature[] result = loadFeaturesFromDigest(monitor);
- return result == null ? loadFeaturesFromSite(monitor) : result;
- }
-
- /*
- * Try and load the feature information from the update site's
- * digest file, if it exists.
- */
- private Feature[] loadFeaturesFromDigest(IProgressMonitor monitor) {
- File digestFile = null;
- boolean local = false;
- try {
- URI digestURI = getDigestURI();
- if (PROTOCOL_FILE.equals(digestURI.getScheme())) {
- digestFile = URIUtil.toFile(digestURI);
- if (!digestFile.exists())
- return null;
- local = true;
- } else {
- digestFile = File.createTempFile("digest", ".zip"); //$NON-NLS-1$ //$NON-NLS-2$
- BufferedOutputStream destination = new BufferedOutputStream(new FileOutputStream(digestFile));
- IStatus result = null;
- try {
- result = getTransport().download(digestURI, destination, monitor);
- } finally {
- try {
- destination.close();
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.ErrorReadingFeature, location), e));
- return null;
- }
- }
- if (result.getSeverity() == IStatus.CANCEL || monitor.isCanceled())
- throw new OperationCanceledException();
- if (!result.isOK())
- return null;
- }
- Feature[] features = new DigestParser().parse(digestFile, digestURI);
- if (features == null)
- return null;
- Map tmpFeatureCache = new HashMap(features.length);
- for (int i = 0; i < features.length; i++) {
- String key = features[i].getId() + VERSION_SEPARATOR + features[i].getVersion();
- tmpFeatureCache.put(key, features[i]);
- }
- featureCache = tmpFeatureCache;
- return features;
- } catch (FileNotFoundException fnfe) {
- // we do not track FNF exceptions as we will fall back to the
- // standard feature parsing from the site itself, see bug 225587.
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.ErrorReadingDigest, location), e));
- } finally {
- if (!local && digestFile != null)
- digestFile.delete();
- }
- return null;
- }
-
- private URI getDigestURI() {
- URI digestBase = null;
- String digestURIString = site.getDigestURIString();
- if (digestURIString != null) {
- if (!digestURIString.endsWith("/")) //$NON-NLS-1$
- digestURIString += "/"; //$NON-NLS-1$
- digestBase = internalGetURI(rootLocation, digestURIString);
- }
-
- if (digestBase == null)
- digestBase = rootLocation;
-
- return URIUtil.append(digestBase, "digest.zip"); //$NON-NLS-1$
- }
-
- /*
- * Load and return the features that are referenced by this update site. Note this
- * requires downloading and parsing the feature manifest locally.
- */
- private Feature[] loadFeaturesFromSite(IProgressMonitor monitor) throws ProvisionException {
- SiteFeature[] siteFeatures = site.getFeatures();
- FeatureParser featureParser = new FeatureParser();
- Map tmpFeatureCache = new HashMap(siteFeatures.length);
-
- for (int i = 0; i < siteFeatures.length; i++) {
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
- SiteFeature siteFeature = siteFeatures[i];
- String key = null;
- if (siteFeature.getFeatureIdentifier() != null && siteFeature.getFeatureVersion() != null) {
- key = siteFeature.getFeatureIdentifier() + VERSION_SEPARATOR + siteFeature.getFeatureVersion();
- if (tmpFeatureCache.containsKey(key))
- continue;
- }
- URI featureURI = getSiteFeatureURI(siteFeature);
- Feature feature = parseFeature(featureParser, featureURI, new NullProgressMonitor());
- if (feature == null) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.ErrorReadingFeature, featureURI)));
- } else {
- if (key == null) {
- siteFeature.setFeatureIdentifier(feature.getId());
- siteFeature.setFeatureVersion(feature.getVersion());
- key = siteFeature.getFeatureIdentifier() + VERSION_SEPARATOR + siteFeature.getFeatureVersion();
- }
- tmpFeatureCache.put(key, feature);
- loadIncludedFeatures(feature, featureParser, tmpFeatureCache, monitor);
- }
- }
- featureCache = tmpFeatureCache;
- return (Feature[]) featureCache.values().toArray(new Feature[featureCache.size()]);
- }
-
- /*
- * Load the features that are included by the given feature.
- */
- private void loadIncludedFeatures(Feature feature, FeatureParser featureParser, Map features, IProgressMonitor monitor) throws ProvisionException {
- FeatureEntry[] featureEntries = feature.getEntries();
- for (int i = 0; i < featureEntries.length; i++) {
- if (monitor.isCanceled())
- throw new OperationCanceledException();
- FeatureEntry entry = featureEntries[i];
- if (entry.isRequires() || entry.isPlugin())
- continue;
- String key = entry.getId() + VERSION_SEPARATOR + entry.getVersion();
- if (features.containsKey(key))
- continue;
-
- URI includedFeatureURI = getFeatureURI(entry.getId(), entry.getVersion());
- Feature includedFeature = parseFeature(featureParser, includedFeatureURI, monitor);
- if (includedFeature == null) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.ErrorReadingFeature, includedFeatureURI)));
- } else {
- features.put(key, includedFeature);
- loadIncludedFeatures(includedFeature, featureParser, features, monitor);
- }
- }
- }
-
- private static RepositoryTransport getTransport() {
- return RepositoryTransport.getInstance();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSitePublisherApplication.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSitePublisherApplication.java
deleted file mode 100644
index 49d20107d..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSitePublisherApplication.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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.updatesite;
-
-import java.net.URISyntaxException;
-import org.eclipse.equinox.p2.publisher.*;
-
-/**
- * <p>
- * This application generates meta-data/artifact repositories from a local update site.
- * The -source <localdir> parameter must specify the top-level directory containing the update site.
- * </p>
- */
-public class UpdateSitePublisherApplication extends AbstractPublisherApplication {
-
- private String categoryQualifier = null;
-
- public UpdateSitePublisherApplication() {
- // nothing todo
- }
-
- protected void processParameter(String arg, String parameter, PublisherInfo pinfo) throws URISyntaxException {
- super.processParameter(arg, parameter, pinfo);
-
- if (arg.equalsIgnoreCase("-categoryQualifier")) //$NON-NLS-1$
- categoryQualifier = parameter;
-
- }
-
- protected IPublisherAction[] createActions() {
- return new IPublisherAction[] {new LocalUpdateSiteAction(source, categoryQualifier)};
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepository.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepository.java
deleted file mode 100644
index 517816bb6..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepository.java
+++ /dev/null
@@ -1,139 +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.updatesite.artifact;
-
-import java.io.OutputStream;
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-
-public class UpdateSiteArtifactRepository implements IArtifactRepository {
-
- public static final String TYPE = "org.eclipse.equinox.p2.updatesite.artifactRepository"; //$NON-NLS-1$
- public static final String VERSION = Integer.toString(1);
-
- private URI location;
- private IArtifactRepository delegate;
-
- public UpdateSiteArtifactRepository(URI location, IArtifactRepository repository) {
- this.location = location;
- this.delegate = repository;
- }
-
- public void addDescriptor(IArtifactDescriptor descriptor) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- public void addDescriptors(IArtifactDescriptor[] descriptors) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- public boolean contains(IArtifactDescriptor descriptor) {
- return delegate.contains(descriptor);
- }
-
- public boolean contains(IArtifactKey key) {
- return delegate.contains(key);
- }
-
- public IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- return delegate.getArtifact(descriptor, destination, monitor);
- }
-
- public IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key) {
- return delegate.getArtifactDescriptors(key);
- }
-
- public IArtifactKey[] getArtifactKeys() {
- return delegate.getArtifactKeys();
- }
-
- public IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor) {
- return delegate.getArtifacts(requests, monitor);
- }
-
- public OutputStream getOutputStream(IArtifactDescriptor descriptor) throws ProvisionException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public IStatus getRawArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- return delegate.getRawArtifact(descriptor, destination, monitor);
- }
-
- public void removeAll() {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- public void removeDescriptor(IArtifactDescriptor descriptor) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- public void removeDescriptor(IArtifactKey key) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- public String getDescription() {
- return delegate.getDescription();
- }
-
- public URI getLocation() {
- return this.location;
- }
-
- public String getName() {
- return delegate.getName();
- }
-
- public Map getProperties() {
- return delegate.getProperties();
- }
-
- public String getProvider() {
- return delegate.getProvider();
- }
-
- public String getType() {
- return TYPE;
- }
-
- public String getVersion() {
- return VERSION;
- }
-
- public boolean isModifiable() {
- return false;
- }
-
- public void setDescription(String description) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- public void setName(String name) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- public String setProperty(String key, String value) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- public void setProvider(String provider) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- public Object getAdapter(Class adapter) {
- return delegate.getAdapter(adapter);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepositoryFactory.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepositoryFactory.java
deleted file mode 100644
index 1a1f2b281..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepositoryFactory.java
+++ /dev/null
@@ -1,153 +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.updatesite.artifact;
-
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.updatesite.Activator;
-import org.eclipse.equinox.internal.p2.updatesite.UpdateSite;
-import org.eclipse.equinox.internal.p2.updatesite.metadata.Messages;
-import org.eclipse.equinox.internal.p2.updatesite.metadata.UpdateSiteMetadataRepositoryFactory;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.ArtifactRepositoryFactory;
-import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.SimpleArtifactRepositoryFactory;
-import org.eclipse.equinox.p2.publisher.eclipse.*;
-import org.eclipse.osgi.util.NLS;
-
-public class UpdateSiteArtifactRepositoryFactory 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 properties) {
- return null;
- }
-
- private static final String PROP_ARTIFACT_REFERENCE = "artifact.reference"; //$NON-NLS-1$
- private static final String PROP_FORCE_THREADING = "eclipse.p2.force.threading"; //$NON-NLS-1$
- private static final String PROP_FORMAT_PACKED = "packed"; //$NON-NLS-1$
- private static final String PROP_SITE_CHECKSUM = "site.checksum"; //$NON-NLS-1$
- private static final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
-
- /* (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;
- }
- IArtifactRepository repository = loadRepository(location, monitor);
- try {
- initializeRepository(repository, location, monitor);
- } catch (Exception e) {
- resetCache(repository);
- if (e instanceof ProvisionException)
- throw (ProvisionException) e;
- if (e instanceof OperationCanceledException)
- throw (OperationCanceledException) e;
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Unexpected_exception, location.toString()), e));
- }
- return new UpdateSiteArtifactRepository(location, repository);
- }
-
- private void resetCache(IArtifactRepository repository) {
- repository.setProperty(PROP_SITE_CHECKSUM, "0"); //$NON-NLS-1$
- repository.removeAll();
- }
-
- public IArtifactRepository loadRepository(URI location, IProgressMonitor monitor) {
- URI localRepositoryURL = UpdateSiteMetadataRepositoryFactory.getLocalRepositoryLocation(location);
- SimpleArtifactRepositoryFactory factory = new SimpleArtifactRepositoryFactory();
- try {
- return factory.load(localRepositoryURL, 0, monitor);
- } catch (ProvisionException e) {
- //fall through and create a new repository
- }
- String repositoryName = "update site: " + location; //$NON-NLS-1$
- return factory.create(localRepositoryURL, repositoryName, null, null);
- }
-
- public void initializeRepository(IArtifactRepository repository, URI location, IProgressMonitor monitor) throws ProvisionException {
- UpdateSite updateSite = UpdateSite.load(location, monitor);
- String savedChecksum = (String) repository.getProperties().get(PROP_SITE_CHECKSUM);
- if (savedChecksum != null && savedChecksum.equals(updateSite.getChecksum()))
- return;
-
- if (!location.getScheme().equals(PROTOCOL_FILE))
- repository.setProperty(PROP_FORCE_THREADING, "true"); //$NON-NLS-1$
- repository.setProperty(PROP_SITE_CHECKSUM, updateSite.getChecksum());
- if (updateSite.getSite().getMirrorsURI() != null)
- repository.setProperty(IRepository.PROP_MIRRORS_URL, updateSite.getSite().getMirrorsURI());
- repository.removeAll();
- generateArtifactDescriptors(updateSite, repository, monitor);
- }
-
- private void generateArtifactDescriptors(UpdateSite updateSite, IArtifactRepository repository, IProgressMonitor monitor) throws ProvisionException {
- final String PACK_EXT = ".pack.gz"; //$NON-NLS-1$
- Feature[] features = updateSite.loadFeatures(monitor);
- Set allSiteArtifacts = new HashSet();
- boolean packSupported = updateSite.getSite().isPack200Supported();
- for (int i = 0; i < features.length; i++) {
- Feature feature = features[i];
- IArtifactKey featureKey = FeaturesAction.createFeatureArtifactKey(feature.getId(), feature.getVersion());
- ArtifactDescriptor featureArtifactDescriptor = new ArtifactDescriptor(featureKey);
- URI featureURL = updateSite.getFeatureURI(feature.getId(), feature.getVersion());
- featureArtifactDescriptor.setRepositoryProperty(PROP_ARTIFACT_REFERENCE, featureURL.toString());
- allSiteArtifacts.add(featureArtifactDescriptor);
-
- if (packSupported) {
- // Update site supports pack200, create a packed descriptor
- featureArtifactDescriptor = new ArtifactDescriptor(featureKey);
- featureURL = updateSite.getFeatureURI(feature.getId(), feature.getVersion());
- featureArtifactDescriptor.setRepositoryProperty(PROP_ARTIFACT_REFERENCE, featureURL.toString() + PACK_EXT);
- ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
- featureArtifactDescriptor.setProcessingSteps(steps);
- featureArtifactDescriptor.setProperty(IArtifactDescriptor.FORMAT, PROP_FORMAT_PACKED);
- allSiteArtifacts.add(featureArtifactDescriptor);
- }
-
- FeatureEntry[] featureEntries = feature.getEntries();
- for (int j = 0; j < featureEntries.length; j++) {
- FeatureEntry entry = featureEntries[j];
- if (entry.isPlugin() && !entry.isRequires()) {
- IArtifactKey key = BundlesAction.createBundleArtifactKey(entry.getId(), entry.getVersion());
- ArtifactDescriptor artifactDescriptor = new ArtifactDescriptor(key);
- URI pluginURL = updateSite.getPluginURI(entry);
- artifactDescriptor.setRepositoryProperty(PROP_ARTIFACT_REFERENCE, pluginURL.toString());
- allSiteArtifacts.add(artifactDescriptor);
-
- if (packSupported) {
- // Update site supports pack200, create a packed descriptor
- key = BundlesAction.createBundleArtifactKey(entry.getId(), entry.getVersion());
- artifactDescriptor = new ArtifactDescriptor(key);
- pluginURL = updateSite.getPluginURI(entry);
- artifactDescriptor.setRepositoryProperty(PROP_ARTIFACT_REFERENCE, pluginURL.toString() + PACK_EXT);
- ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
- artifactDescriptor.setProcessingSteps(steps);
- artifactDescriptor.setProperty(IArtifactDescriptor.FORMAT, PROP_FORMAT_PACKED);
- allSiteArtifacts.add(artifactDescriptor);
- }
- }
- }
- }
-
- IArtifactDescriptor[] descriptors = (IArtifactDescriptor[]) allSiteArtifacts.toArray(new IArtifactDescriptor[allSiteArtifacts.size()]);
- repository.addDescriptors(descriptors);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/messages.properties b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/messages.properties
deleted file mode 100644
index de4677de2..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/messages.properties
+++ /dev/null
@@ -1,29 +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
-###############################################################################
-ErrorReadingDigest=Error reading site digest {0}.
-ErrorReadingFeature=Error reading feature {0}.
-ErrorReadingSite=Error reading update site {0}.
-Error_Generation=Problems generating update site metadata {0}.
-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. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/Messages.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/Messages.java
deleted file mode 100644
index f23132de1..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/Messages.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.updatesite.metadata;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.updatesite.metadata.messages"; //$NON-NLS-1$
-
- public static String Unexpected_exception;
- public static String AuthenticationFailedFor_0;
- public static String RepositoryNotFound_0;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- // prevent instantiation
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepository.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepository.java
deleted file mode 100644
index 8d09680b2..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepository.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.updatesite.metadata;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-
-public class UpdateSiteMetadataRepository implements IMetadataRepository {
-
- public static final String TYPE = "org.eclipse.equinox.p2.updatesite.metadataRepository"; //$NON-NLS-1$
- public static final String VERSION = Integer.toString(1);
-
- private URI location;
- private IMetadataRepository delegate;
-
- public UpdateSiteMetadataRepository(URI location, IMetadataRepository repository) {
- this.location = location;
- this.delegate = repository;
- }
-
- public void addInstallableUnits(IInstallableUnit[] installableUnits) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- public void addReference(URI location, String nickname, int type, int options) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- public void removeAll() {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- public boolean removeInstallableUnits(Query query, IProgressMonitor monitor) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- public String getDescription() {
- return delegate.getDescription();
- }
-
- public URI getLocation() {
- return location;
- }
-
- public String getName() {
- return delegate.getName();
- }
-
- public Map getProperties() {
- return delegate.getProperties();
- }
-
- public String getProvider() {
- return delegate.getProvider();
- }
-
- public String getType() {
- return TYPE;
- }
-
- public String getVersion() {
- return VERSION;
- }
-
- public boolean isModifiable() {
- return false;
- }
-
- public void setDescription(String description) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- public void setName(String name) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- public String setProperty(String key, String value) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- public void setProvider(String provider) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- public Object getAdapter(Class adapter) {
- return delegate.getAdapter(adapter);
- }
-
- public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
- return delegate.query(query, collector, monitor);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepositoryFactory.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepositoryFactory.java
deleted file mode 100644
index 528739500..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepositoryFactory.java
+++ /dev/null
@@ -1,128 +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
- * Ray Braithwood (ray@genuitec.com) - fix for bug 220605
- * Code 9 - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.updatesite.metadata;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ecf.filetransfer.UserCancelledException;
-import org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository;
-import org.eclipse.equinox.internal.p2.repository.AuthenticationFailedException;
-import org.eclipse.equinox.internal.p2.updatesite.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.SimpleMetadataRepositoryFactory;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.osgi.util.NLS;
-
-public class UpdateSiteMetadataRepositoryFactory extends MetadataRepositoryFactory {
- private static final String PROP_SITE_CHECKSUM = "site.checksum"; //$NON-NLS-1$
-
- public static URI getLocalRepositoryLocation(URI location) {
- String stateDirName = Integer.toString(location.hashCode());
- File bundleData = Activator.getBundleContext().getDataFile(null);
- File stateDir = new File(bundleData, stateDirName);
- return stateDir.toURI();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory#create(java.net.URL, java.lang.String, java.lang.String, java.util.Map)
- */
- public IMetadataRepository create(URI location, String name, String type, Map properties) {
- return null;
- }
-
- public IStatus validate(URI location, IProgressMonitor monitor) {
- try {
- UpdateSite.validate(location, monitor);
- } catch (ProvisionException e) {
- return e.getStatus();
- } catch (UserCancelledException e) {
- return Status.CANCEL_STATUS;
- } catch (AuthenticationFailedException e) {
- return new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_AUTHENTICATION, NLS.bind(Messages.AuthenticationFailedFor_0, location.toString()), e);
- } catch (FileNotFoundException e) {
- return new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, NLS.bind(Messages.RepositoryNotFound_0, location.toString()), e);
- } catch (CoreException e) {
- return e.getStatus();
- }
- return Status.OK_STATUS;
- }
-
- 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;
- }
-
- IMetadataRepository repository = loadRepository(location, monitor);
- try {
- initializeRepository(repository, location, monitor);
- } catch (Exception e) {
- resetCache(repository);
- if (e instanceof ProvisionException)
- throw (ProvisionException) e;
- if (e instanceof OperationCanceledException)
- throw (OperationCanceledException) e;
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Unexpected_exception, location.toString()), e));
- }
- return new UpdateSiteMetadataRepository(location, repository);
- }
-
- private void resetCache(IMetadataRepository repository) {
- repository.setProperty(PROP_SITE_CHECKSUM, "0"); //$NON-NLS-1$
- repository.removeAll();
- }
-
- public IMetadataRepository loadRepository(URI location, IProgressMonitor monitor) {
- URI localRepositoryURL = getLocalRepositoryLocation(location);
- SimpleMetadataRepositoryFactory factory = new SimpleMetadataRepositoryFactory();
- try {
- return factory.load(localRepositoryURL, 0, monitor);
- } catch (ProvisionException e) {
- //fall through and create a new repository
- }
- String repositoryName = "update site: " + location; //$NON-NLS-1$
- return factory.create(localRepositoryURL, repositoryName, null, null);
- }
-
- public void initializeRepository(IMetadataRepository repository, URI location, IProgressMonitor monitor) throws ProvisionException {
- UpdateSite updateSite = UpdateSite.load(location, monitor);
- String savedChecksum = (String) repository.getProperties().get(PROP_SITE_CHECKSUM);
- if (savedChecksum != null && savedChecksum.equals(updateSite.getChecksum()))
- return;
- repository.setProperty(PROP_SITE_CHECKSUM, updateSite.getChecksum());
- repository.removeAll();
- IStatus status = generateMetadata(updateSite, repository, monitor);
- //site references should be published on load
- if (repository instanceof LocalMetadataRepository)
- ((LocalMetadataRepository) repository).publishRepositoryReferences();
- if (monitor.isCanceled())
- throw new OperationCanceledException();
- if (!status.isOK())
- throw new ProvisionException(status);
- }
-
- private IStatus generateMetadata(UpdateSite updateSite, IMetadataRepository repository, IProgressMonitor monitor) {
- PublisherInfo info = new PublisherInfo();
- info.setMetadataRepository(repository);
- IPublisherAction[] actions = new IPublisherAction[] {new RemoteUpdateSiteAction(updateSite, null)};
- Publisher publisher = new Publisher(info);
- return publisher.publish(actions, monitor);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/messages.properties b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/messages.properties
deleted file mode 100644
index 45a312f49..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/messages.properties
+++ /dev/null
@@ -1,14 +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
-###############################################################################
-
-UpdateSiteMetadataRepositoryFactory.Unexpected_exception=Unexpected exception while loading {0}.
-UpdateSiteMetadataRepositoryFactory.AuthenticationFailedFor_0=Authentication failed {0}.
-UpdateSiteMetadataRepositoryFactory.RepositoryNotFound_0=Repository not found {0}.
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 ba077a403..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.project b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.project
deleted file mode 100644
index bbddddcf3..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.project
+++ /dev/null
@@ -1,34 +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>
- </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 c1430320d..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,265 +0,0 @@
-#Fri Nov 14 17:13:48 EST 2008
-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
-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=true
-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=true
-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=true
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true
-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=false
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 df3e02c57..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,20 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-SymbolicName: org.eclipse.equinox.simpleconfigurator.manipulator;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Bundle-Localization: plugin
-Bundle-Activator: org.eclipse.equinox.internal.simpleconfigurator.manipulator.Activator
-Bundle-ActivationPolicy: lazy
-Import-Package: 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.utils,
- org.osgi.framework;version="1.3.0"
-Bundle-Vendor: %providerName
-Export-Package: org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator;x-friends:="org.eclipse.pde.core,org.eclipse.equinox.p2.metadata.generator,org.eclipse.equinox.p2.publisher",
- org.eclipse.equinox.internal.simpleconfigurator.manipulator;x-friends:="org.eclipse.equinox.p2.touchpoint.eclipse"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.0"
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 ac72e5e75..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/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.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/src/org/eclipse/equinox/internal/provisional/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/provisional/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java
deleted file mode 100644
index 2a990d947..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/provisional/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java
+++ /dev/null
@@ -1,43 +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.simpleconfigurator.manipulator;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-
-public interface SimpleConfiguratorManipulator extends ConfiguratorManipulator {
- /**
- * 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";
-
- /**
- *
- * @param url
- * @param launcherLocation
- * @return
- * @throws IOException
- */
- public BundleInfo[] loadConfiguration(URL url, File launcherLocation) throws IOException;
-
- /**
- *
- * @param bundleConfiguration
- * @param outputFile
- * @param base
- * @throws IOException
- */
- public void saveConfiguration(BundleInfo[] configuration, File outputFile, File base) throws IOException;
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/Activator.java b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/Activator.java
deleted file mode 100644
index e8bcfa9e2..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/Activator.java
+++ /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
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.manipulator;
-
-import java.util.Dictionary;
-import java.util.Hashtable;
-import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
-import org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
-import org.osgi.framework.*;
-
-public class Activator implements BundleActivator {
- final static boolean DEBUG = true;
- private static volatile BundleContext context;
- private ServiceRegistration registration;
-
- static BundleContext getContext() {
- return context;
- }
-
- private void registerConfiguratorManipulator() {
- Dictionary props = new Hashtable();
- props.put(ConfiguratorManipulator.SERVICE_PROP_KEY_CONFIGURATOR_BUNDLESYMBOLICNAME, SimpleConfiguratorManipulator.SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME);
- props.put(Constants.SERVICE_VENDOR, "Eclipse.org"); //$NON-NLS-1$
- SimpleConfiguratorManipulatorImpl manipulator = new SimpleConfiguratorManipulatorImpl();
- String[] clazzes = new String[] {ConfiguratorManipulator.class.getName(), SimpleConfiguratorManipulator.class.getName()};
- registration = context.registerService(clazzes, manipulator, props);
- }
-
- public void start(BundleContext bundleContext) throws Exception {
- Activator.context = bundleContext;
- registerConfiguratorManipulator();
- }
-
- public void stop(BundleContext bundleContext) throws Exception {
- if (registration != null)
- registration.unregister();
- Activator.context = null;
- }
-}
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 65915df0a..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
+++ /dev/null
@@ -1,456 +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.File;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URL;
-import java.util.*;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils;
-import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
-import org.eclipse.equinox.internal.simpleconfigurator.utils.SimpleConfiguratorUtils;
-import org.osgi.framework.Constants;
-
-/**
- *
- */
-public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorManipulator {
- 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) throws IOException {
- 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");
- 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(URL url, File base) throws IOException {
- if (url == null)
- return NULL_BUNDLEINFOS;
-
- List simpleBundles = SimpleConfiguratorUtils.readConfiguration(url, base != null ? base.toURI() : null);
-
- // 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());
- result[i++] = bundleInfo;
- }
- return result;
- }
-
- public void saveConfiguration(BundleInfo[] configuration, File outputFile, File base) throws IOException {
- saveConfiguration(configuration, outputFile, base, false);
- }
-
- private void saveConfiguration(BundleInfo[] configuration, File outputFile, File base, 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 + ")");
- }
- }
-
- // 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];
- String symbolicName = bundleInfo.getSymbolicName();
- String bundleVersion = bundleInfo.getVersion();
- URI location = base != null ? URIUtil.makeRelative(bundleInfo.getLocation(), base.toURI()) : bundleInfo.getLocation();
- if (symbolicName == null || bundleVersion == null || location == null)
- throw new IllegalArgumentException("Cannot persist bundleinfo: " + bundleInfo.toString());
- simpleInfos[i] = new org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo(symbolicName, bundleVersion, location, bundleInfo.getStartLevel(), bundleInfo.isMarkedAsStarted());
- }
- SimpleConfiguratorManipulatorUtils.writeConfiguration(simpleInfos, outputFile);
- }
-
- 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);
- saveConfiguration((BundleInfo[]) setToSimpleConfig.toArray(new BundleInfo[setToSimpleConfig.size()]), outputFile, ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData()), 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);
-
- BundleInfo[] toInstall = loadConfiguration(configFile.toURL(), ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData()));
-
- 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 7c3a1ba7a..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java
+++ /dev/null
@@ -1,131 +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.provisional.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
-import org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo;
-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$
-
- public static void writeConfiguration(BundleInfo[] simpleInfos, File outputFile) throws IOException {
-
- // 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;
- }
-
- // 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;
- }
- });
-
- if (!Utils.createParentDir(outputFile)) {
- throw new IllegalStateException(Messages.exception_failedToCreateDir);
- }
- BufferedWriter writer = null;
- IOException caughtException = null;
- boolean oldStyle = false;
- 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;
- break;
- }
- }
-
- try {
- writer = new BufferedWriter(new FileWriter(outputFile));
- // version line
- writer.write(createVersionLine());
- writer.newLine();
-
- // bundle info lines
- for (int i = 0; i < simpleInfos.length; i++) {
- writer.write(createBundleInfoLine(simpleInfos[i], oldStyle));
- writer.newLine();
- }
- } catch (IOException e) {
- caughtException = e;
- } finally {
- if (writer != null) {
- try {
- writer.close();
- } catch (IOException e) {
- // we want to avoid over-writing the original exception
- if (caughtException != null)
- caughtException = e;
- }
- }
- }
- if (caughtException != null)
- throw caughtException;
- }
-
- 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/.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 e043cc4e2..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-bin
-build.xml
-javaCompiler...args
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 34a383a98..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,270 +0,0 @@
-#Wed Jan 07 13:39:09 EST 2009
-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
-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_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not 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.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=true
-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
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 b9a031031..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,26 +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.ui,
- org.eclipse.equinox.p2.director",
- org.eclipse.equinox.internal.simpleconfigurator;x-internal:=true,
- 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/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 2291eb6ef..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 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 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 7cbc420f5..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;
- }
-
- private 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 da5f020ce..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ApplyCommand.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.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 99b144084..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 configuration URL (optional)
- */
- 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 d0ae2cc1d..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/EquinoxUtils.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.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) {
- 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 {
- Location configLocation = (Location) configLocationTracker.getService();
- 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;
- } 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 c35570311..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java
+++ /dev/null
@@ -1,189 +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.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 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 {
- List bundles = new ArrayList();
-
- BufferedReader r = null;
- try {
- r = new BufferedReader(new InputStreamReader(url.openStream()));
- } catch (IOException e) {
- // if the exception is a FNF we return an empty bundle list
- if (e instanceof FileNotFoundException)
- return bundles;
- throw e;
- }
- try {
- String line;
- 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;
- }
-
- 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 23c798ce4..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-repository
-buildDirectory
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 9da6e2c17..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"?>
-<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 3f64da774..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.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.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
-#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 2f1b9a970..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.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.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 88da5d43a..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=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.cloud/META-INF/MANIFEST.MF b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/META-INF/MANIFEST.MF
deleted file mode 100644
index 5c908b502..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,28 +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,
- org.eclipse.core.runtime,
- org.eclipse.equinox.p2.ui;bundle-version="1.0.100",
- 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.scheduler;bundle-version="1.0.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 5c50a0005..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/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.cloud/cloud.product b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product
deleted file mode 100644
index 7e8413c75..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product
+++ /dev/null
@@ -1,100 +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">
-
- <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.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"/>
- <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.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.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.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 f708f9a50..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin.xml
+++ /dev/null
@@ -1,153 +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>
- </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.cloud.InstalledSoftwarePage">
- </page>
- <page
- name="%installHistoryPage"
- class="org.eclipse.equinox.internal.provisional.p2.ui.dialogs.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/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 c12d07d85..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Activator.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.equinox.p2.examples.rcp.cloud.p2.CloudPolicy;
-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.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 bc962fb16..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/CloudPolicy.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.cloud.p2;
-
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.IUViewQueryContext;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.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 access to manipulate repositories
- setRepositoryManipulator(null);
-
- // XXX Default view is by category
- IUViewQueryContext queryContext = new IUViewQueryContext(
- IUViewQueryContext.AVAILABLE_VIEW_BY_CATEGORY);
- setQueryContext(queryContext);
- }
-}
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 9e08c2e2b..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.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.examples.rcp.cloud.p2;
-
-import org.eclipse.equinox.internal.provisional.p2.ui.IProvHelpContextIds;
-import org.eclipse.equinox.internal.provisional.p2.ui.QueryableMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.InstallWizard;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.ProvisioningWizardDialog;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * InstallNewSoftwareHandler invokes the install wizard
- *
- * @since 3.5
- */
-public class InstallNewSoftwareHandler extends PreloadingRepositoryHandler {
-
- /**
- * The constructor.
- */
- public InstallNewSoftwareHandler() {
- super();
- }
-
- protected void doExecute(String profileId, QueryableMetadataRepositoryManager manager) {
- InstallWizard wizard = new InstallWizard(Policy.getDefault(), profileId, null, null, manager);
- WizardDialog dialog = new ProvisioningWizardDialog(getShell(), wizard);
- dialog.create();
- PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IProvHelpContextIds.INSTALL_WIZARD);
-
- dialog.open();
- }
-
- protected boolean waitForPreload() {
- // If there is no way for the user to manipulate 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 Policy.getDefault().getRepositoryManipulator() == null;
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/Messages.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/Messages.java
deleted file mode 100644
index 2e228a737..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/Messages.java
+++ /dev/null
@@ -1,25 +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.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.p2.examples.rcp.cloud.p2.messages"; //$NON-NLS-1$
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
- public static String InstallNewSoftwareHandler_LoadRepositoryJobLabel;
- public static String UpdateHandler_NoSitesMessage;
- public static String UpdateHandler_NoSitesTitle;
-}
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 8b2213a0c..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.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
- *******************************************************************************/
-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.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.QueryableMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.custom.BusyIndicator;
-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 {
-
- Object LOAD_FAMILY = new Object();
-
- /**
- * The constructor.
- */
- public PreloadingRepositoryHandler() {
- // constructor
- }
-
- /**
- * Execute the command.
- */
- public Object execute(ExecutionEvent event) {
- final String profileId = IProfileRegistry.SELF;
- BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
- public void run() {
- doExecuteAndLoad(profileId, preloadRepositories());
- }
- });
- return null;
- }
-
- void doExecuteAndLoad(final String profileId, boolean preloadRepositories) {
- // cancel any load that is already running
- Job.getJobManager().cancel(LOAD_FAMILY);
- final QueryableMetadataRepositoryManager queryableManager = new QueryableMetadataRepositoryManager(
- Policy.getDefault().getQueryContext(), false);
- if (preloadRepositories) {
- Job loadJob = new Job(
- Messages.InstallNewSoftwareHandler_LoadRepositoryJobLabel) {
-
- protected IStatus run(IProgressMonitor monitor) {
- queryableManager.loadAll(monitor);
- return Status.OK_STATUS;
- }
-
- public boolean belongsTo(Object family) {
- return family == LOAD_FAMILY;
- }
-
- };
- 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(profileId,
- queryableManager);
- }
- });
- }
- }
- });
- loadJob.setUser(true);
- loadJob.schedule();
-
- } else {
- loadJob.setSystem(true);
- loadJob.setUser(false);
- loadJob.schedule();
- doExecute(profileId, queryableManager);
- }
- } else {
- doExecute(profileId, queryableManager);
- }
- }
-
- protected abstract void doExecute(String profileId,
- QueryableMetadataRepositoryManager manager);
-
- protected boolean preloadRepositories() {
- return true;
- }
-
- protected boolean waitForPreload() {
- return true;
- }
-
- /**
- * Return a shell appropriate for parenting dialogs of this handler.
- *
- * @return a Shell
- */
- protected Shell getShell() {
- return ProvUI.getDefaultParentShell();
- }
-}
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 1668b09b3..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java
+++ /dev/null
@@ -1,97 +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 java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ElementQueryDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.QueryableMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.ui.actions.UpdateAction;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.ProfileElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-
-/**
- * UpdateHandler invokes the check for updates UI
- *
- * @since 3.4
- */
-public class UpdateHandler extends PreloadingRepositoryHandler {
-
- boolean hasNoRepos = false;
-
- /**
- * The constructor.
- */
- public UpdateHandler() {
- // constructor
- }
-
- protected void doExecute(String profileId, QueryableMetadataRepositoryManager manager) {
- if (hasNoRepos) {
- boolean goToSites = MessageDialog.openQuestion(getShell(), Messages.UpdateHandler_NoSitesTitle, Messages.UpdateHandler_NoSitesMessage);
- if (goToSites) {
- Policy.getDefault().getRepositoryManipulator().manipulateRepositories(getShell());
- }
- return;
- }
- // get the profile roots
- ElementQueryDescriptor queryDescriptor = Policy.getDefault().getQueryProvider().getQueryDescriptor(new ProfileElement(null, profileId));
- Collection collection = queryDescriptor.performQuery(null);
- final IInstallableUnit[] roots = new IInstallableUnit[collection.size()];
- Iterator iter = collection.iterator();
- int i = 0;
- while (iter.hasNext()) {
- roots[i] = (IInstallableUnit) ProvUI.getAdapter(iter.next(), IInstallableUnit.class);
- i++;
- }
- // now create an update action whose selection is all the roots
- UpdateAction action = new UpdateAction(Policy.getDefault(), new ISelectionProvider() {
-
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- // not dynamic
- }
-
- public ISelection getSelection() {
- return new StructuredSelection(roots);
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- // not dynamic
- }
-
- public void setSelection(ISelection selection) {
- // not mutable
-
- }
- }, profileId, false);
- action.setRepositoryManager(manager);
- action.run();
- }
-
- protected boolean preloadRepositories() {
- hasNoRepos = false;
- RepositoryManipulator repoMan = Policy.getDefault().getRepositoryManipulator();
- if (repoMan != null && repoMan.getKnownRepositories().length == 0) {
- hasNoRepos = true;
- return false;
- }
- return super.preloadRepositories();
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/messages.properties b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/messages.properties
deleted file mode 100644
index e16c86732..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/messages.properties
+++ /dev/null
@@ -1,15 +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
-###############################################################################
-
-
-InstallNewSoftwareHandler_LoadRepositoryJobLabel=Contacting 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
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 337c4649f..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=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.prestartupdate/META-INF/MANIFEST.MF b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/META-INF/MANIFEST.MF
deleted file mode 100644
index 8f4e5b0d1..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,25 +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.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.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-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/prestartupdate.product b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/prestartupdate.product
deleted file mode 100644
index 5e55b3e0f..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/prestartupdate.product
+++ /dev/null
@@ -1,103 +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.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.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.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.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 c08b4d7aa..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Activator.java
+++ /dev/null
@@ -1,97 +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);
-
- // XXX start up the p2 infrastructure. Normally the p2 UI does
- // this, but we are running without UI.
- getBundle("org.eclipse.equinox.p2.exemplarysetup").start(Bundle.START_TRANSIENT); //$NON-NLS-1$
- getBundle("org.eclipse.equinox.frameworkadmin.equinox").start(Bundle.START_TRANSIENT); //$NON-NLS-1$
- getBundle("org.eclipse.equinox.simpleconfigurator.manipulator").start(Bundle.START_TRANSIENT); //$NON-NLS-1$
-
- }
-
- 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 c5f04b9b9..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchAdvisor.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-import org.eclipse.ui.PlatformUI;
-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 void preStartup() {
- // XXX check for updates before starting up.
- // If an update is performed, restart.
- if (P2Util.checkForUpdates())
- PlatformUI.getWorkbench().restart();
- }
-
- 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 2bb795ccd..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchWindowAdvisor.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-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);
- configurer.setShowStatusLine(false);
- }
-
-}
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 2ade309a9..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/P2Util.java
+++ /dev/null
@@ -1,193 +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 java.lang.reflect.InvocationTargetException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.engine.DefaultPhaseSet;
-import org.eclipse.equinox.internal.provisional.p2.engine.IEngine;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-
-public class P2Util {
- // XXX Check for updates to this application and return true if
- // we have installed updates and need a restart.
- // This method is intentionally long and ugly in order to provide
- // "one-stop-shopping" for how to check for and perform an update.
- static boolean checkForUpdates() {
- // Before we show a progress dialog, at least find out that we have
- // installed content and repos to check.
- final IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper
- .getService(Activator.bundleContext, IProfileRegistry.class
- .getName());
- if (profileRegistry == null)
- return false;
- final IProfile profile = profileRegistry
- .getProfile(IProfileRegistry.SELF);
- if (profile == null)
- return false;
-
- // We are going to look for updates to all IU's in the profile. A
- // different query could be used if we are looking for updates to
- // a subset. For example, the p2 UI only looks for updates to those
- // IU's marked with a special property.
- final Collector collector = profile.query(InstallableUnitQuery.ANY,
- new Collector(), null);
- if (collector.isEmpty())
- return false;
- final IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper
- .getService(Activator.bundleContext,
- IMetadataRepositoryManager.class.getName());
- if (manager == null)
- return false;
- final URI[] reposToSearch = manager
- .getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
- if (reposToSearch.length == 0)
- return false;
- final IPlanner planner = (IPlanner) ServiceHelper.getService(
- Activator.bundleContext, IPlanner.class.getName());
- if (planner == null)
- return false;
- // Looking in all known repositories for updates for each IU in the profile
- final boolean[] didWeUpdate = new boolean[1];
- didWeUpdate[0] = false;
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- // We'll break progress up into 4 steps.
- // 1. Load repos - it is not strictly necessary to do this.
- // The planner will do it for us. However, burying this
- // in the planner's progress reporting will not
- // show enough progress initially, so we do it manually.
- // 2. Get update list
- // 3. Build a profile change request and get a provisioning plan
- // 4. Perform the provisioning plan.
- SubMonitor sub = SubMonitor.convert(monitor,
- "Checking for application updates...", 400);
- // 1. Load repos
- SubMonitor loadMonitor = sub.newChild(100, SubMonitor.SUPPRESS_ALL_LABELS);
- for (int i=0; i<reposToSearch.length; i++)
- try {
- if (loadMonitor.isCanceled())
- throw new InterruptedException();
- manager.loadRepository(reposToSearch[i], loadMonitor.newChild(100/reposToSearch.length));
- } catch (ProvisionException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- loadMonitor.done();
-
- // 2. Get update list.
- // First we look for replacement IU's for each IU
- ArrayList iusWithUpdates = new ArrayList();
- ArrayList replacementIUs = new ArrayList();
- Iterator iter = collector.iterator();
- ProvisioningContext pc = new ProvisioningContext(reposToSearch);
- SubMonitor updateSearchMonitor = sub.newChild(100, SubMonitor.SUPPRESS_ALL_LABELS);
- while (iter.hasNext()) {
- if (updateSearchMonitor.isCanceled())
- throw new InterruptedException();
- IInstallableUnit iu = (IInstallableUnit) iter.next();
- IInstallableUnit[] replacements = planner.updatesFor(iu,
- pc, updateSearchMonitor.newChild(100/collector.size()));
- if (replacements.length > 0) {
- iusWithUpdates.add(iu);
- if (replacements.length == 1)
- replacementIUs.add(replacements[0]);
- else {
- IInstallableUnit repl = replacements[0];
- for (int i = 1; i < replacements.length; i++)
- if (replacements[i].getVersion().compareTo(
- repl.getVersion()) > 0)
- repl = replacements[i];
- replacementIUs.add(repl);
- }
- }
- }
- // Did we find any updates?
- if (iusWithUpdates.size() == 0) {
- sub.done();
- } else {
- if (sub.isCanceled())
- throw new InterruptedException();
- // 3. Build a profile change request and get a provisioning plan
- ProfileChangeRequest changeRequest = new ProfileChangeRequest(
- profile);
- changeRequest
- .removeInstallableUnits((IInstallableUnit[]) iusWithUpdates
- .toArray(new IInstallableUnit[iusWithUpdates
- .size()]));
- changeRequest
- .addInstallableUnits((IInstallableUnit[]) replacementIUs
- .toArray(new IInstallableUnit[replacementIUs
- .size()]));
- ProvisioningPlan plan = planner.getProvisioningPlan(
- changeRequest, pc, sub.newChild(100, SubMonitor.SUPPRESS_ALL_LABELS));
- if (plan.getStatus().getSeverity() == IStatus.CANCEL)
- throw new InterruptedException();
- if (plan.getStatus().getSeverity() != IStatus.ERROR) {
- IEngine engine = (IEngine) ServiceHelper.getService(
- Activator.bundleContext, IEngine.class
- .getName());
- IArtifactRepositoryManager artifactMgr = (IArtifactRepositoryManager) ServiceHelper
- .getService(Activator.bundleContext,
- IArtifactRepositoryManager.class
- .getName());
- if (engine != null && artifactMgr != null) {
- // 4. Perform the provisioning plan
- pc
- .setArtifactRepositories(artifactMgr
- .getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL));
- IStatus status = engine.perform(profile,
- new DefaultPhaseSet(), plan.getOperands(),
- pc, sub.newChild(100, SubMonitor.SUPPRESS_ALL_LABELS));
- if (status.getSeverity() == IStatus.CANCEL)
- throw new InterruptedException();
- if (status.getSeverity() != IStatus.ERROR) {
- didWeUpdate[0] = true;
- }
- }
- }
- }
- }
- };
- try {
- new ProgressMonitorDialog(null).run(true, true, runnable);
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- return false;
- } catch (InterruptedException e) {
- return false;
- }
- return didWeUpdate[0];
- }
-}
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 6f414e032..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=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.sdkbundlevisibility/META-INF/MANIFEST.MF b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/META-INF/MANIFEST.MF
deleted file mode 100644
index e0ee6e8b3..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,29 +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,
- org.eclipse.core.runtime,
- org.eclipse.equinox.ds,
- org.eclipse.equinox.p2.ui;bundle-version="1.0.100",
- 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 4847b0eb0..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.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.internal.provisional.p2.ui.dialogs.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
- 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/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 461b080ae..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/sdkbundlevisibility.product
+++ /dev/null
@@ -1,100 +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">
-
- <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="aaa"/>
- <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.sdkbundlevisibility"/>
- <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.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.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.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 752421038..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/AllIUsAreVisiblePolicy.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.examples.rcp.sdkbundlevisibility.p2;
-
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.ColocatedRepositoryManipulator;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.IUViewQueryContext;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.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
- setRepositoryManipulator(new ColocatedRepositoryManipulator(this, PreferenceConstants.PREF_PAGE_SITES));
-
- // XXX Create an IUViewQueryContext to change the visibility of the IUs shown in the UI.
- // XXX Show the flat (non-categorized) view by default.
- IUViewQueryContext context = new IUViewQueryContext(IUViewQueryContext.AVAILABLE_VIEW_FLAT);
- // XXX All available IU's should be shown, not just groups/features
- context.setVisibleAvailableIUProperty(null);
- // XXX All installed IU's should be shown, not just the user-installed.
- context.setVisibleInstalledIUProperty(null);
-
- setQueryContext(context);
- }
-}
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 4dca71781..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/InstallNewSoftwareHandler.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.examples.rcp.sdkbundlevisibility.p2;
-
-import org.eclipse.equinox.internal.provisional.p2.ui.IProvHelpContextIds;
-import org.eclipse.equinox.internal.provisional.p2.ui.QueryableMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.InstallWizard;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.ProvisioningWizardDialog;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * InstallNewSoftwareHandler invokes the install wizard
- *
- * @since 3.5
- */
-public class InstallNewSoftwareHandler extends PreloadingRepositoryHandler {
-
- /**
- * The constructor.
- */
- public InstallNewSoftwareHandler() {
- super();
- }
-
- protected void doExecute(String profileId, QueryableMetadataRepositoryManager manager) {
- InstallWizard wizard = new InstallWizard(Policy.getDefault(), profileId, null, null, manager);
- WizardDialog dialog = new ProvisioningWizardDialog(getShell(), wizard);
- dialog.create();
- PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IProvHelpContextIds.INSTALL_WIZARD);
-
- dialog.open();
- }
-
- protected boolean waitForPreload() {
- // If there is no way for the user to manipulate 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 Policy.getDefault().getRepositoryManipulator() == null;
- }
-}
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 8713ba269..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/Messages.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.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 InstallNewSoftwareHandler_LoadRepositoryJobLabel;
- 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 ea29eb88a..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 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this 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.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$
-}
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 dec8d9bd7..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreloadingRepositoryHandler.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
- *******************************************************************************/
-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.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.QueryableMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.custom.BusyIndicator;
-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 {
-
- Object LOAD_FAMILY = new Object();
-
- /**
- * The constructor.
- */
- public PreloadingRepositoryHandler() {
- // constructor
- }
-
- /**
- * Execute the command.
- */
- public Object execute(ExecutionEvent event) {
- final String profileId = IProfileRegistry.SELF;
- BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
- public void run() {
- doExecuteAndLoad(profileId, preloadRepositories());
- }
- });
- return null;
- }
-
- void doExecuteAndLoad(final String profileId, boolean preloadRepositories) {
- // cancel any load that is already running
- Job.getJobManager().cancel(LOAD_FAMILY);
- final QueryableMetadataRepositoryManager queryableManager = new QueryableMetadataRepositoryManager(
- Policy.getDefault().getQueryContext(), false);
- if (preloadRepositories) {
- Job loadJob = new Job(
- Messages.InstallNewSoftwareHandler_LoadRepositoryJobLabel) {
-
- protected IStatus run(IProgressMonitor monitor) {
- queryableManager.loadAll(monitor);
- return Status.OK_STATUS;
- }
-
- public boolean belongsTo(Object family) {
- return family == LOAD_FAMILY;
- }
-
- };
- 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(profileId,
- queryableManager);
- }
- });
- }
- }
- });
- loadJob.setUser(true);
- loadJob.schedule();
-
- } else {
- loadJob.setSystem(true);
- loadJob.setUser(false);
- loadJob.schedule();
- doExecute(profileId, queryableManager);
- }
- } else {
- doExecute(profileId, queryableManager);
- }
- }
-
- protected abstract void doExecute(String profileId,
- QueryableMetadataRepositoryManager manager);
-
- protected boolean preloadRepositories() {
- return true;
- }
-
- protected boolean waitForPreload() {
- return true;
- }
-
- /**
- * Return a shell appropriate for parenting dialogs of this handler.
- *
- * @return a Shell
- */
- protected Shell getShell() {
- return ProvUI.getDefaultParentShell();
- }
-}
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 9a049f939..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/ProvisioningPreferencePage.java
+++ /dev/null
@@ -1,138 +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.*;
-import org.eclipse.ui.*;
-
-/**
- * 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 891be7e10..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/UpdateHandler.java
+++ /dev/null
@@ -1,97 +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 java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ElementQueryDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.QueryableMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.ui.actions.UpdateAction;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.ProfileElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-
-/**
- * UpdateHandler invokes the check for updates UI
- *
- * @since 3.4
- */
-public class UpdateHandler extends PreloadingRepositoryHandler {
-
- boolean hasNoRepos = false;
-
- /**
- * The constructor.
- */
- public UpdateHandler() {
- // constructor
- }
-
- protected void doExecute(String profileId, QueryableMetadataRepositoryManager manager) {
- if (hasNoRepos) {
- boolean goToSites = MessageDialog.openQuestion(getShell(), Messages.UpdateHandler_NoSitesTitle, Messages.UpdateHandler_NoSitesMessage);
- if (goToSites) {
- Policy.getDefault().getRepositoryManipulator().manipulateRepositories(getShell());
- }
- return;
- }
- // get the profile roots
- ElementQueryDescriptor queryDescriptor = Policy.getDefault().getQueryProvider().getQueryDescriptor(new ProfileElement(null, profileId));
- Collection collection = queryDescriptor.performQuery(null);
- final IInstallableUnit[] roots = new IInstallableUnit[collection.size()];
- Iterator iter = collection.iterator();
- int i = 0;
- while (iter.hasNext()) {
- roots[i] = (IInstallableUnit) ProvUI.getAdapter(iter.next(), IInstallableUnit.class);
- i++;
- }
- // now create an update action whose selection is all the roots
- UpdateAction action = new UpdateAction(Policy.getDefault(), new ISelectionProvider() {
-
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- // not dynamic
- }
-
- public ISelection getSelection() {
- return new StructuredSelection(roots);
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- // not dynamic
- }
-
- public void setSelection(ISelection selection) {
- // not mutable
-
- }
- }, profileId, false);
- action.setRepositoryManager(manager);
- action.run();
- }
-
- protected boolean preloadRepositories() {
- hasNoRepos = false;
- RepositoryManipulator repoMan = Policy.getDefault().getRepositoryManipulator();
- if (repoMan != null && repoMan.getKnownRepositories().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 21475c188..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/messages.properties
+++ /dev/null
@@ -1,22 +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
-###############################################################################
-
-
-InstallNewSoftwareHandler_LoadRepositoryJobLabel=Contacting 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
-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 d3eaf0c57..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="1.0.100",
- 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 58bab2409..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="1.0.100",
- 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 4ce26a1e8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/sdkui.product
+++ /dev/null
@@ -1,100 +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">
-
- <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.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.sdkui"/>
- <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.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.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.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 5afca7c81..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 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.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.sdk/.project b/features/org.eclipse.equinox.p2.sdk/.project
deleted file mode 100644
index e03ca7ec5..000000000
--- a/features/org.eclipse.equinox.p2.sdk/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.sdk</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.sdk/build.properties b/features/org.eclipse.equinox.p2.sdk/build.properties
deleted file mode 100644
index 1f5e7d186..000000000
--- a/features/org.eclipse.equinox.p2.sdk/build.properties
+++ /dev/null
@@ -1,56 +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
-###############################################################################
-bin.includes = feature.xml,license.html,epl-v10.html,license.html,feature.properties
-
-generate.plugin@org.apache.commons.codec.source=org.apache.commons.codec
-generate.plugin@org.apache.commons.httpclient.source=org.apache.commons.httpclient
-generate.plugin@org.apache.commons.logging.source=org.apache.commons.logging
-generate.plugin@org.eclipse.ecf.filetransfer.source=org.eclipse.ecf.filetransfer
-generate.plugin@org.eclipse.ecf.identity.source=org.eclipse.ecf.identity
-generate.plugin@org.eclipse.ecf.provider.filetransfer.httpclient.source=org.eclipse.ecf.provider.filetransfer.httpclient
-generate.plugin@org.eclipse.ecf.provider.filetransfer.httpclient.ssl.source=org.eclipse.ecf.provider.filetransfer.httpclient.ssl
-generate.plugin@org.eclipse.ecf.provider.filetransfer.source=org.eclipse.ecf.provider.filetransfer
-generate.plugin@org.eclipse.ecf.provider.filetransfer.ssl.source=org.eclipse.ecf.provider.filetransfer.ssl
-generate.plugin@org.eclipse.ecf.source=org.eclipse.ecf
-generate.plugin@org.eclipse.ecf.ssl.source=org.eclipse.ecf.ssl
-generate.plugin@org.eclipse.equinox.frameworkadmin.equinox.source=org.eclipse.equinox.frameworkadmin.equinox
-generate.plugin@org.eclipse.equinox.frameworkadmin.source=org.eclipse.equinox.frameworkadmin
-generate.plugin@org.eclipse.equinox.p2.artifact.repository.source=org.eclipse.equinox.p2.artifact.repository
-generate.plugin@org.eclipse.equinox.p2.console.source=org.eclipse.equinox.p2.console
-generate.plugin@org.eclipse.equinox.p2.core.source=org.eclipse.equinox.p2.core
-generate.plugin@org.eclipse.equinox.p2.director.app.source=org.eclipse.equinox.p2.director.app
-generate.plugin@org.eclipse.equinox.p2.director.source=org.eclipse.equinox.p2.director
-generate.plugin@org.eclipse.equinox.p2.directorywatcher.source=org.eclipse.equinox.p2.directorywatcher
-generate.plugin@org.eclipse.equinox.p2.engine.source=org.eclipse.equinox.p2.engine
-generate.plugin@org.eclipse.equinox.p2.exemplarysetup.source=org.eclipse.equinox.p2.exemplarysetup
-generate.plugin@org.eclipse.equinox.p2.extensionlocation.source=org.eclipse.equinox.p2.extensionlocation
-generate.plugin@org.eclipse.equinox.p2.garbagecollector.source=org.eclipse.equinox.p2.garbagecollector
-generate.plugin@org.eclipse.equinox.p2.installer.source=org.eclipse.equinox.p2.installer
-generate.plugin@org.eclipse.equinox.p2.jarprocessor.source=org.eclipse.equinox.p2.jarprocessor
-generate.plugin@org.eclipse.equinox.p2.metadata.generator.source=org.eclipse.equinox.p2.metadata.generator
-generate.plugin@org.eclipse.equinox.p2.metadata.repository.source=org.eclipse.equinox.p2.metadata.repository
-generate.plugin@org.eclipse.equinox.p2.metadata.source=org.eclipse.equinox.p2.metadata
-generate.plugin@org.eclipse.equinox.p2.publisher.source=org.eclipse.equinox.p2.publisher
-generate.plugin@org.eclipse.equinox.p2.reconciler.dropins.source=org.eclipse.equinox.p2.reconciler.dropins
-generate.plugin@org.eclipse.equinox.p2.repository.source=org.eclipse.equinox.p2.repository
-generate.plugin@org.eclipse.equinox.p2.repository.tools.source=org.eclipse.equinox.p2.repository.tools
-generate.plugin@org.eclipse.equinox.p2.tools.source=org.eclipse.equinox.p2.tools
-generate.plugin@org.eclipse.equinox.p2.touchpoint.eclipse.source=org.eclipse.equinox.p2.touchpoint.eclipse
-generate.plugin@org.eclipse.equinox.p2.touchpoint.natives.source=org.eclipse.equinox.p2.touchpoint.natives
-generate.plugin@org.eclipse.equinox.p2.ui.admin.rcp.source=org.eclipse.equinox.p2.ui.admin.rcp
-generate.plugin@org.eclipse.equinox.p2.ui.admin.source=org.eclipse.equinox.p2.ui.admin
-generate.plugin@org.eclipse.equinox.p2.ui.sdk.scheduler.source=org.eclipse.equinox.p2.ui.sdk.scheduler
-generate.plugin@org.eclipse.equinox.p2.ui.sdk.source=org.eclipse.equinox.p2.ui.sdk
-generate.plugin@org.eclipse.equinox.p2.ui.source=org.eclipse.equinox.p2.ui
-generate.plugin@org.eclipse.equinox.p2.updatechecker.source=org.eclipse.equinox.p2.updatechecker
-generate.plugin@org.eclipse.equinox.p2.updatesite.source=org.eclipse.equinox.p2.updatesite
-generate.plugin@org.eclipse.equinox.simpleconfigurator.manipulator.source=org.eclipse.equinox.simpleconfigurator.manipulator
-generate.plugin@org.eclipse.equinox.simpleconfigurator.source=org.eclipse.equinox.simpleconfigurator
diff --git a/features/org.eclipse.equinox.p2.sdk/epl-v10.html b/features/org.eclipse.equinox.p2.sdk/epl-v10.html
deleted file mode 100755
index ed4b19665..000000000
--- a/features/org.eclipse.equinox.p2.sdk/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.sdk/feature.properties b/features/org.eclipse.equinox.p2.sdk/feature.properties
deleted file mode 100755
index 9ab876c25..000000000
--- a/features/org.eclipse.equinox.p2.sdk/feature.properties
+++ /dev/null
@@ -1,147 +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
-###############################################################################
-# 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 SDK
-
-# "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 and source that comprise the Equinox p2 provisioning platform. \n\
-This feature includes the corresponding source and is intended \
-to be added to target platforms at development time rather than \
-deployed with end-user systems.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2009 EclipseSource 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\
-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.sdk/feature.xml b/features/org.eclipse.equinox.p2.sdk/feature.xml
deleted file mode 100644
index 0a5e4a3c2..000000000
--- a/features/org.eclipse.equinox.p2.sdk/feature.xml
+++ /dev/null
@@ -1,656 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.equinox.p2.sdk"
- label="%featureName"
- version="3.5.0.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <plugin
- id="org.apache.commons.codec"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.apache.commons.codec.source"
- 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.httpclient.source"
- 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.apache.commons.logging.source"
- 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.artifact.repository.source"
- 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.console.source"
- 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.core.source"
- 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.director.app"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.director.app.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.director.source"
- 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.directorywatcher.source"
- 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.engine.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.exemplarysetup"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.exemplarysetup.source"
- 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.extensionlocation.source"
- 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.garbagecollector.source"
- 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.installer"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.installer.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.jarprocessor.source"
- 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.generator.source"
- 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.metadata.repository.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata.source"
- 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.publisher.source"
- 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.reconciler.dropins.source"
- 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.repository.source"
- 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.tools.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.tools"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.tools.source"
- 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.eclipse.source"
- 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.p2.touchpoint.natives.source"
- 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.ui.admin.rcp.source"
- 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.source"
- 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.sdk"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ui.sdk.scheduler"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ui.sdk.scheduler.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ui.sdk.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ui.source"
- 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.updatechecker.source"
- 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.eclipse.equinox.p2.updatesite.source"
- 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.filetransfer.source"
- 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.identity.source"
- 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.source"
- 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.httpclient.ssl.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.provider.filetransfer.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- 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.provider.filetransfer.ssl.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- 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.eclipse.ecf.ssl.source"
- 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.simpleconfigurator.manipulator.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.simpleconfigurator.source"
- 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.frameworkadmin.equinox.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.frameworkadmin.source"
- 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"/>
-
-
-
-
-</feature>
diff --git a/features/org.eclipse.equinox.p2.sdk/license.html b/features/org.eclipse.equinox.p2.sdk/license.html
deleted file mode 100755
index c6af966b6..000000000
--- a/features/org.eclipse.equinox.p2.sdk/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/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/Provisioning base.target b/org.eclipse.equinox.p2.releng/Provisioning base.target
deleted file mode 100644
index a2b01aa4d..000000000
--- a/org.eclipse.equinox.p2.releng/Provisioning base.target
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.2"?>
-
-<target name="Provisioning base">
-
- <location path="d:\targets\provisioning-base"/>
-
- <content>
- <plugins>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.launcher"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.services"/>
- <plugin id="org.junit"/>
- </plugins>
- <features>
- </features>
- <extraLocations>
- <location path="D:\targets\equinox\eclipse"/>
- </extraLocations>
- </content>
-
-</target>
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 5080f8ef8..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/feature.properties
+++ /dev/null
@@ -1,125 +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, 2009 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\
-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/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 63ec9a5ba..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/feature.xml
+++ /dev/null
@@ -1,237 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.equinox.p2.agent.feature"
- label="%featureName"
- provider-name="%providerName"
- version="1.0.100.qualifier">
-
- <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.exemplarysetup"
- 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"/>
-
-</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 c6af966b6..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/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/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 42ba84424..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/feature.properties
+++ /dev/null
@@ -1,125 +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, 2009 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\
-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/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 30feb7166..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"
- version="1.0.100.qualifier"
- label="%featureName"
- 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.exemplarysetup"
- 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"/>
-
-</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 c6af966b6..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/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/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 d4b56fbc4..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/feature.properties
+++ /dev/null
@@ -1,125 +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, 2009 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\
-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/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 660d1719a..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/feature.xml
+++ /dev/null
@@ -1,195 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.equinox.p2.generator.feature"
- version="1.0.100.qualifier"
- label="%featureName"
- 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.exemplarysetup"
- 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 c6af966b6..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/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/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/.project b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/.project
deleted file mode 100644
index 14cf063d6..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.user.ui</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.user.ui/build.properties b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/build.properties
deleted file mode 100644
index 9e53b4e24..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/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 = feature.xml,\
- license.html,\
- epl-v10.html,\
- feature.properties,\
- eclipse_update_120.jpg
-src.includes = license.html,epl-v10.html
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/eclipse_update_120.jpg b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/epl-v10.html b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/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.user.ui/feature.properties b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/feature.properties
deleted file mode 100644
index 1a8429d68..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/feature.properties
+++ /dev/null
@@ -1,128 +0,0 @@
-# "featureName" property - name of the feature
-featureName=Equinox p2 Provisioning
-
-# "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=Eclipse Provisioning Platform
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2008, 2009 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\
-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/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/feature.xml b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/feature.xml
deleted file mode 100644
index cb727763f..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/feature.xml
+++ /dev/null
@@ -1,318 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.equinox.p2.user.ui"
- label="%featureName"
- version="1.2.0.qualifier"
- provider-name="%providerName"
- image="eclipse_update_120.jpg">
-
- <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.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.exemplarysetup"
- 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.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.sdk"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ui.sdk.scheduler"
- 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.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.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.security.ui"
- 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.director.app"
- 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.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.ssl"
- download-size="0"
- install-size="0"
- version="0.0.0"
- fragment="true"
- 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.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="1.3.0.qualifier"
- unpack="false"/>
-
- <plugin
- id="org.apache.commons.httpclient"
- download-size="0"
- install-size="0"
- version="3.1.0.qualifier"
- unpack="false"/>
-
-</feature>
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/license.html b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/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/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/build.properties b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/build.properties
deleted file mode 100644
index 5278417b9..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/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/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/eclipse_update_120.jpg b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/epl-v10.html b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/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/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/feature.properties b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/feature.properties
deleted file mode 100644
index 6fd1487fc..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/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 Provisioning 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 provisioning platform
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2008, 2009 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\
-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/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/license.html b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/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/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/projectSet-extssh.psf b/org.eclipse.equinox.p2.releng/projectSet-extssh.psf
deleted file mode 100644
index 4530652b0..000000000
--- a/org.eclipse.equinox.p2.releng/projectSet-extssh.psf
+++ /dev/null
@@ -1,61 +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/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.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.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.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.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.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.touchpoint.natives,org.eclipse.equinox.p2.touchpoint.natives"/>
-<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.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.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.exemplarysetup,org.eclipse.equinox.p2.exemplarysetup"/>
-<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.reconciler.dropins,org.eclipse.equinox.p2.reconciler.dropins"/>
-<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/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.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.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.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.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.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.selfhosting,org.eclipse.equinox.p2.selfhosting"/>
-<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.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.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.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.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.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.tools,org.eclipse.equinox.p2.tools"/>
-<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/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.frameworkadmin,org.eclipse.equinox.frameworkadmin"/>
-<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.test,org.eclipse.equinox.frameworkadmin.test"/>
-
-<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/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.p2.sar,org.eclipse.equinox.p2.sar"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/org.sat4j.core,org.sat4j.core_v2.1.1,v2_1_1"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/org.sat4j.pb,org.sat4j.pb_v2.1.1,v2_1_1"/>
-<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 af15792df..000000000
--- a/org.eclipse.equinox.p2.releng/projectSet.psf
+++ /dev/null
@@ -1,61 +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/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.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.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.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.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.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.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.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.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.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.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.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.exemplarysetup,org.eclipse.equinox.p2.exemplarysetup"/>
-<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.reconciler.dropins,org.eclipse.equinox.p2.reconciler.dropins"/>
-<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/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.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.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.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.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.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.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.selfhosting,org.eclipse.equinox.p2.selfhosting"/>
-<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.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.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.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/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.tools,org.eclipse.equinox.p2.tools"/>
-<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.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/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.p2.sar,org.eclipse.equinox.p2.sar"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/org.sat4j.core,org.sat4j.core_v2.1.1,v2_1_1"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/org.sat4j.pb,org.sat4j.pb_v2.1.1,v2_1_1"/>
-<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