Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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/pom.xml14
-rw-r--r--bundles/ie.wombat.jbdiff.test/src/ie/wombat/jbdiff/test/Activator.java45
-rw-r--r--bundles/ie.wombat.jbdiff.test/src/ie/wombat/jbdiff/test/DiffPatchTest.java112
-rw-r--r--bundles/ie.wombat.jbdiff.test/testData/eclipse-3.2.exebin180224 -> 0 bytes
-rw-r--r--bundles/ie.wombat.jbdiff.test/testData/eclipse-3.3.exebin53248 -> 0 bytes
-rw-r--r--bundles/ie.wombat.jbdiff.test/testData/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/pom.xml14
-rw-r--r--bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/JBDiff.java612
-rw-r--r--bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/JBPatch.java241
-rw-r--r--bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/LICENSE.txt29
-rw-r--r--bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/README.txt51
-rw-r--r--bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/Util.java132
-rw-r--r--bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/readme-more.txt7
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.core.prefs340
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/META-INF/MANIFEST.MF28
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/OSGI-INF/fwadmin.xml13
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherImpl.java91
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java332
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java730
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxConstants.java61
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFrameworkAdminFactoryImpl.java24
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwAdminImpl.java137
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java582
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxLauncherData.java30
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java649
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Log.java92
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Messages.java51
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java199
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/messages.properties40
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java231
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/.project28
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.jdt.core.prefs346
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.jdt.ui.prefs9
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/Framework Admin Test.launch45
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/META-INF/MANIFEST.MF17
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/about.html28
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/build.properties17
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/bundle_1/META-INF/MANIFEST.MF5
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/bundle_2/META-INF/MANIFEST.MF5
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/dummy.frameworkextension_1.0.0.jarbin431 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.equinox.launcher.jarbin43719 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.equinox.simpleconfigurator.jarbin23499 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.osgi.jarbin928386 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.osgi_3.4.0.jarbin949391 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest1/conf/config.ini1
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest1/eclipse.ini2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest3/configuration/config.ini1
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest3/eclipse.ini1
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/conf/config.ini1
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/eclipse.ini11
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug285935/conf/config.ini1
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug285935/eclipse.ini5
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/config.ini2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/user-config.ini3
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/user-noshare-config.ini2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AbstractFwkAdminTest.java437
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Activator.java31
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java55
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug196525.java100
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug258370.java87
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/CleanupTest.java107
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FrameworkExtensionTest.java42
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FwkAdminAndSimpleConfiguratorTest.java98
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherConfigLocationTest.java67
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherDataTest.java92
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/MacOSLikeSetup.java107
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ManipulatorTests.java103
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoConfigurationValueInEclipseIni.java58
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoRenamingLauncherIni.java74
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/OSGiVersionChange.java126
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ParserUtilsTest.java83
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest1.java51
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest2.java60
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest3.java51
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest4.java61
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest5.java60
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug267850.java59
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug285935.java51
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RelativePathTest.java135
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingABundle.java56
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingAllBundles.java77
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RenamingLauncherIni.java73
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SharedConfigurationTest.java107
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorComingAndGoing.java69
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorTest.java82
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestEclipseDataArea.java59
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.java54
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.java108
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/UtilsTest.java66
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/.project34
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.core.prefs343
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/META-INF/MANIFEST.MF30
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/about.html28
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/build.properties17
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/frameworkadmin/BundleInfo.java331
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Activator.java51
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/SimpleBundlesState.java329
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java442
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulator.java73
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulatorFactory.java29
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundlesState.java144
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java176
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdmin.java109
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminFactory.java43
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminRuntimeException.java58
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java255
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/Manipulator.java202
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.jdt.core.prefs341
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.jdt.ui.prefs60
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/META-INF/MANIFEST.MF33
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/build.properties18
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/optimizer.launch24
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/plugin.xml38
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/AbstractDeltaStep.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/Activator.java31
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/OptimizerApplication.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/VersionlessArtifactKey.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Application.java71
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/DeltaComputer.java211
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/JarDeltaOptimizerStep.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Optimizer.java261
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Application.java75
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/JBDiffStep.java61
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/JBDiffZipStep.java62
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Optimizer.java280
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java63
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Messages.java25
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Optimizer.java107
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Pack200OptimizerStep.java86
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/messages.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.jdt.core.prefs342
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/META-INF/MANIFEST.MF26
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/build.properties14
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/plugin.xml19
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java65
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/Activator.java33
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jardelta/DeltaApplier.java184
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jardelta/JarDeltaProcessorStep.java74
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jbdiff/JBPatchStep.java54
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jbdiff/JBPatchZipStep.java54
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/.cvsignore3
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/.project39
-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/META-INF/MANIFEST.MF63
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/OSGI-INF/repositoryManager.xml8
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/build.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/plugin.xml35
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/pom.xml14
-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/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/MD5Verifier.java84
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/messages.properties16
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java95
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Activator.java33
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryManager.java138
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRequest.java77
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java591
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepositoryFactory.java136
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.java71
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorRequest.java283
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorSelector.java365
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/RawMirrorRequest.java79
-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.properties54
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/BlobStore.java127
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/DownloadJob.java77
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/KeyIndex.java84
-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/SimpleArtifactDescriptor.java80
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java1079
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryFactory.java131
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java517
-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/processing/Messages.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStep.java128
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepHandler.java205
-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.common/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.common/README.TXT2
-rw-r--r--bundles/org.eclipse.equinox.p2.console/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.console/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.core.prefs350
-rw-r--r--bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.launching.prefs3
-rw-r--r--bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF28
-rw-r--r--bundles/org.eclipse.equinox.p2.console/Provisioning console.launch22
-rw-r--r--bundles/org.eclipse.equinox.p2.console/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.console/build.properties19
-rw-r--r--bundles/org.eclipse.equinox.p2.console/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.console/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/Activator.java78
-rw-r--r--bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java700
-rw-r--r--bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java308
-rw-r--r--bundles/org.eclipse.equinox.p2.core/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.core/.options8
-rw-r--r--bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF12
-rw-r--r--bundles/org.eclipse.equinox.p2.core/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/Activator.java18
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/DefaultAgentProvider.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningAgent.java100
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningEventBus.java14
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/StringPool.java73
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/ServiceHelper.java43
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/Tracing.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/eventbus/IProvisioningEventBus.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IPool.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/ProvisionException.java11
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/StrongPool.java44
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/WeakPool.java47
-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.prefs349
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.launching.prefs3
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.ui.prefs56
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/META-INF/MANIFEST.MF30
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/build.properties25
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/config.ini87
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/director app.launch24
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/director.product30
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/plugin.xml33
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/scripts/buildExtraJAR.xml10
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Activator.java29
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java660
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java1002
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/ILog.java14
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Messages.java83
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/messages.properties64
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java332
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java18
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties2
-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.MF32
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/about.html38
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/build.properties19
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Activator.java60
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java275
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryChangeListener.java49
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryWatcher.java221
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/EntryAdvice.java66
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Messages.java35
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java301
-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.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java214
-rw-r--r--bundles/org.eclipse.equinox.p2.exemplarysetup/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.exemplarysetup/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.core.prefs349
-rw-r--r--bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.exemplarysetup/META-INF/MANIFEST.MF20
-rw-r--r--bundles/org.eclipse.equinox.p2.exemplarysetup/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.exemplarysetup/build.properties17
-rw-r--r--bundles/org.eclipse.equinox.p2.exemplarysetup/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.exemplarysetup/src/readme.txt1
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/META-INF/MANIFEST.MF7
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Activator.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java70
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepository.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java17
-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.prefs349
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.launching.prefs3
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.ui.prefs59
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.pde.api.tools.prefs94
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.pde.prefs31
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/META-INF/MANIFEST.MF27
-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.properties21
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/installer.product135
-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/pom.xml14
-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.java225
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallDescriptionParser.java228
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallUpdateProductOperation.java263
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallerActivator.java68
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/Messages.java84
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/messages.properties66
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/InstallDialog.java564
-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.jarprocessor/.classpath8
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/.externalToolBuilders/AntTaskBuilder.launch19
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/.project44
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.core.prefs345
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.ui.prefs60
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/META-INF/MANIFEST.MF16
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/build.properties26
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/lib/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/localbuild.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/plugin.xml21
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/CommandStep.java68
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Main.java108
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java193
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackUnpackStep.java86
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/SignCommandStep.java98
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessor.java65
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessorJob.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/UnpackStep.java117
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java328
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/ZipProcessor.java221
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/pack-readme.html82
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/unsigner/UnsignCommand.java37
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/unsigner/Unsigner.java147
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/Verifier.java121
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/VerifyStep.java78
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/IProcessStep.java64
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java398
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessorExecutor.java214
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntBasedProcessorExecutor.java73
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntSignCommand.java59
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/JarProcessorTask.java131
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/.classpath8
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/.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.prefs353
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.ui.prefs60
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/CDC-1.0_Foundation-1.0.profile24
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/CDC-1.1_Foundation-1.1.profile30
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.2.profile47
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.3.profile68
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.4.profile129
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.5.profile157
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/JRE-1.1.profile22
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/JavaSE-1.6.profile194
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/META-INF/MANIFEST.MF44
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator Plugins and Features.launch22
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator SDK.launch24
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator Update Site.launch23
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.0.profile22
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.1.profile23
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.2.profile24
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/build.properties33
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/config.ini57
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/generator.product30
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/p2-izer update site.launch23
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/plugin.xml24
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml36
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java422
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/LocalizationHelper.java200
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Messages.java34
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/ProductQuery.java133
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/DefaultSiteParser.java731
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/FeatureParser.java363
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/Messages.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/ProductFile.java514
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteCategory.java146
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteFeature.java245
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteModel.java197
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/messages.properties28
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/messages.properties22
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/BundleDescriptionFactory.java180
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/EclipseInstallGeneratorInfoProvider.java539
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Feature.java278
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/FeatureEntry.java179
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java1402
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/GeneratorBundleInfo.java142
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IGeneratorInfo.java117
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IncrementalGenerator.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java1434
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/URLEntry.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/GeneratorTask.java223
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/TaskMessages.java24
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/messages.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/.classpath8
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/.cvsignore3
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/.externalToolBuilders/org.eclipse.equinox.p2.metadata.reposiroy buildAntTasks.xml.launch17
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/.project49
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.core.prefs329
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/META-INF/MANIFEST.MF50
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/OSGI-INF/repositoryManager.xml8
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/build.properties28
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/buildAntTasks.xml9
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/plugin.xml36
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/pom.xml42
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/schema/metadataRepositories.exsd129
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java35
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CacheManager.java430
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java374
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepositoryFactory.java153
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java325
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Messages.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryComponent.java33
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryIO.java344
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryManager.java103
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/SimpleMetadataRepositoryFactory.java144
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/URLMetadataRepository.java133
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java902
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java361
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/XMLConstants.java93
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/messages.properties22
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AbstractMDRTask.java31
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AddChildTask.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/CreateCompositeMetadataRepositoryTask.java105
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/RemoveChildTask.java74
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/.project39
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/.settings/.api_filters11
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.core.prefs345
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/META-INF/MANIFEST.MF90
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/build.properties21
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ArtifactKey.java143
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/BasicVersion.java83
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Copyright.java64
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IRequiredCapability.java45
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IUMap.java226
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java397
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitFragment.java52
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitPatch.java70
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/License.java148
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Messages.java148
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/MetadataActivator.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OSGiVersion.java226
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OmniVersion.java260
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ProvidedCapability.java85
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java291
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequirementChange.java77
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java191
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointData.java94
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointInstruction.java166
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointType.java57
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TranslationSupport.java325
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/UpdateDescriptor.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormat.java340
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java1548
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java381
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionVector.java337
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/All.java42
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/And.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Array.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Assignment.java47
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/At.java96
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Binary.java135
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/BooleanFunction.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ClassFunction.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java392
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Collect.java66
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CollectionFilter.java130
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Compare.java60
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CompoundIterator.java84
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Condition.java62
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ContextExpression.java82
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CurryedLambdaExpression.java86
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Equals.java52
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/EvaluationContext.java157
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Everything.java111
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Exists.java42
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Expression.java486
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ExpressionFactory.java293
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/FilterFunction.java35
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/First.java43
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Flatten.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Function.java77
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IExpressionConstants.java79
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IRepeatableIterator.java25
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Intersect.java51
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPApproximation.java77
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPFilter.java74
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LambdaExpression.java72
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Latest.java93
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Limit.java91
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Literal.java176
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchExpression.java91
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchIteratorFilter.java71
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Matches.java144
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Member.java227
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MemberProvider.java135
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/NAry.java59
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Not.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Or.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Parameter.java64
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Pipe.java160
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/QueryResult.java107
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RangeFunction.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RepeatableIterator.java184
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Select.java49
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/SetFunction.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Traverse.java58
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unary.java57
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/UnaryCollectionFilter.java42
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Union.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unique.java81
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Variable.java79
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/VersionFunction.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/WrappedIQuery.java75
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java631
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/LDAPFilterParser.java283
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/QLParser.java356
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CapabilityIndex.java204
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CompoundIndex.java45
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IdIndex.java46
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/Index.java149
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IndexProvider.java23
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/messages.properties69
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/query/UpdateQuery.java46
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IArtifactKey.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ICopyright.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnit.java305
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitFragment.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitPatch.java52
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ILicense.java58
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IProvidedCapability.java56
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirement.java84
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirementChange.java53
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointData.java51
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointInstruction.java73
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointType.java54
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IUpdateDescriptor.java53
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionFormat.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionedId.java33
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/KeyWithLocale.java38
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/MetadataFactory.java670
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/Version.java198
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionFormatException.java25
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionRange.java470
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionedId.java111
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionParseException.java29
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionUtil.java200
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IContextExpression.java59
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IEvaluationContext.java45
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpression.java85
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionFactory.java400
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionParser.java37
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionVisitor.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IFilterExpression.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMatchExpression.java54
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMemberProvider.java31
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/SimplePattern.java205
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/package.html16
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndex.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndexProvider.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IQueryWithIndex.java32
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/package.html18
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/package.html17
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CollectionResult.java57
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/Collector.java172
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CompoundQueryable.java167
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionMatchQuery.java102
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionQuery.java87
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IMatchQuery.java43
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQuery.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryResult.java57
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryable.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/MatchQuery.java100
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java519
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/package.html18
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/.classpath (renamed from bundles/org.eclipse.equinox.p2.director.app/.classpath)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/.cvsignore3
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/.project (renamed from bundles/org.eclipse.equinox.p2.tests.optimizers/.project)2
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/.settings/org.eclipse.jdt.core.prefs (renamed from bundles/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.jdt.core.prefs)29
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/.settings/org.eclipse.jdt.ui.prefs (renamed from bundles/org.eclipse.equinox.p2.tests.verifier/.settings/org.eclipse.jdt.ui.prefs)7
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/.settings/org.eclipse.pde.core.prefs3
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/META-INF/MANIFEST.MF (renamed from bundles/org.eclipse.equinox.p2.publisher/META-INF/MANIFEST.MF)76
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/about.html (renamed from bundles/org.eclipse.equinox.frameworkadmin.equinox/about.html)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/build.properties16
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/plugin.properties (renamed from bundles/org.eclipse.equinox.frameworkadmin/plugin.properties)7
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/plugin.xml (renamed from bundles/org.eclipse.equinox.p2.publisher/plugin.xml)14
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/pom.xml17
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/scripts/buildExtraJAR.xml (renamed from bundles/org.eclipse.equinox.p2.publisher/scripts/buildExtraJAR.xml)10
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/compatibility/GeneratorApplication.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/GeneratorApplication.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/compatibility/IGeneratorConstants.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/IGeneratorConstants.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java656
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/DataLoader.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/DataLoader.java)4
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ExecutablesDescriptor.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ExecutablesDescriptor.java)4
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureManifestParser.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureManifestParser.java)100
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureParser.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureParser.java)45
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/GeneratorBundleInfo.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/GeneratorBundleInfo.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java)5
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java)209
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/AccumulateConfigDataAction.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AccumulateConfigDataAction.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileAdvice.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileAdvice.java)15
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileParser.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileParser.java)39
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java)20
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundleShapeAdvice.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundleShapeAdvice.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java)48
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigAdvice.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigAdvice.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java)22
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/DefaultCUsAction.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/DefaultCUsAction.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/EclipseInstallAction.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EclipseInstallAction.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/EclipsePublisherHelper.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java)11
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxLauncherCUAction.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxLauncherCUAction.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/Feature.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/Feature.java)68
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java)77
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAction.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAction.java)52
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAndBundlesPublisherApplication.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAndBundlesPublisherApplication.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/IBrandingAdvice.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IBrandingAdvice.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/IBundleShapeAdvice.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IBundleShapeAdvice.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/IConfigAdvice.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IConfigAdvice.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/IExecutableAdvice.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IExecutableAdvice.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/IPlatformEntry.java (renamed from bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/HttpConstants.java)17
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/InstallPublisherApplication.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/InstallPublisherApplication.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/LaunchingAdvice.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/LaunchingAdvice.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java)2
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ProductFileAdvice.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductFileAdvice.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ProductPublisherApplication.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductPublisherApplication.java)5
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/URLEntry.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/URLEntry.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/BuildPublisherApplication.java38
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/FeatureRootAdvice.java127
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/GatherBundleAction.java84
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/GatherFeatureAction.java122
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/GatheringComputer.java69
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Activator.java (renamed from bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Activator.java)17
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Constants.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Messages.java (renamed from bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/Messages.java)30
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Utils.java108
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/messages.properties22
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/swt/tools/IconExe.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/swt/tools/IconExe.java)18
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java)11
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/FeaturesAndBundlesPublisherTask.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/FeaturesAndBundlesPublisherTask.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/ProductPublisherTask.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/ProductPublisherTask.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java)0
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/TaskMessages.java (renamed from bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/TaskMessages.java)2
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/messages.properties (renamed from bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/messages.properties)0
-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.prefs348
-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/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/ant_tasks/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/build.properties29
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/CDC-1.0_Foundation-1.0.profile24
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/CDC-1.1_Foundation-1.1.profile30
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.2.profile47
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.3.profile68
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.4.profile129
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.5.profile157
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/JRE-1.1.profile22
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/JavaSE-1.6.profile194
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.0.profile22
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.1.profile23
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.2.profile24
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/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.java41
-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/eclipse/BrandingIron.java544
-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/p2/publisher/AbstractAdvice.java70
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java533
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java353
-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.java256
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherInfo.java99
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherResult.java127
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IAdditionalInstallableUnitAdvice.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ICapabilityAdvice.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFeatureRootAdvice.java29
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFilterAdvice.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ILicenseAdvice.java23
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IPropertyAdvice.java32
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootFilesAdvice.java23
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootIUAdvice.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ITouchpointAdvice.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IVersionAdvice.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/JREAction.java240
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/MergeResultsAction.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/QueryableFilterAdvice.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAction.java164
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAdvice.java44
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAction.java188
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAdvice.java33
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUResultFilterAdvice.java32
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/VersionAdvice.java131
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/LocalizationHelper.java198
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java273
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/.project39
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.core.prefs347
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/META-INF/MANIFEST.MF15
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/build.properties20
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/model/p2ql.bnf67
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/plugin.properties8
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLExpression.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/package.html18
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/.cvsignore3
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/.settings/org.eclipse.jdt.core.prefs330
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/Bootstrap.product72
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/META-INF/MANIFEST.MF39
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/Reconciler App - Metadata Generator.launch23
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/Reconciler app installation.launch24
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/build.properties21
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/plugin.xml41
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Activator.java613
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Application.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java321
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Messages.java35
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java282
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java602
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/messages.properties17
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/.cvsignore3
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/META-INF/MANIFEST.MF3
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/JarComparator.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ClassFileReader.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Disassembler.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Signature.java15
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/Mirroring.java11
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/AbstractApplication.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java32
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java14
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/SlicingOptions.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java29
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorTask.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/SlicingOption.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/.project5
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF19
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/OSGI-INF/cacheManager.xml (renamed from bundles/org.eclipse.equinox.p2.updatechecker/OSGI-INF/updatechecker.xml)16
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/build.properties19
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeRepositoryIO.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java34
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Activator.java137
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java158
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManagerComponent.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Credentials.java39
-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/Messages.java11
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java13
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatus.java154
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatusHelper.java323
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTransport.java245
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Transport.java63
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java93
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/LocationProperties.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties11
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRepository.java15
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRepositoryManager.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepository.java90
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/AbstractArtifactRepository.java91
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/IMetadataRepository.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/spi/AbstractMetadataRepository.java13
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/AbstractRepository.java12
-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/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/DirectByteArrayOutputStream.java73
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarConstants.java34
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarEntry.java188
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarInputStream.java203
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarOutputStream.java206
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarUtil.java204
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/build.properties3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/test.xml63
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/.settings/org.eclipse.jdt.core.prefs343
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/META-INF/MANIFEST.MF28
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/build.properties16
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/AllTests.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Bug209233Test.java54
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffStepTest.java75
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffZipStepTest.java67
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JarDeltaOptimizerTest.java87
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/OptimizerTest.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Pack200OptimizerTest.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/AllTests.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/ArtifactRepositoryMock.java53
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchStepTest.java64
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchZipStepTest.java83
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JarDeltaProcessorTest.java74
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/AutomatedTests.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/TestActivator.java42
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/TestData.java168
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/AllTests.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/DirectByteArrayOutputStreamTest.java47
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/SarEntryTest.java25
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/SarTest.java150
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/jarprocessor.jar.pack.gzbin13587 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/1_6/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gzbin34588 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.2-3.3.jbdiffbin7935 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.2.exebin180224 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.3.exebin53248 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jarbin78074 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gzbin33474 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.2.0-3.3.0.jbdiffbin24134 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.2.0.v20060605-1400.njarbin40662 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.3.0.v20070607-1300.njarbin42387 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.1-2.jarbin1893 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.1.jarbin1958 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.2.jarbin1939 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/alien.zipbin1135 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.2.0.v20060605-1400.jarbin40669 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.2.0.v20060605-1400.sarbin50750 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.3.0.v20070607-1300.jarbin42387 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.3.0.v20070607-1300.sarbin57994 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/test.zipbin1267 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.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.prefs352
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/META-INF/MANIFEST.MF14
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/build.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.java309
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/GenerateTestData.java276
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestLicenseConsistency.java108
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactLockingTest.java488
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/LocationTest.java47
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProvisioningContextTest.java362
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/From36to37.java49
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/Install37from36.java51
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/PersistFragment.java65
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/PersistNegation.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/BatchExecuteMetadataRepositoryTest.java400
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/RepositorManagerDifferentAgentTest.java35
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/StandaloneSerializationTest.java122
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug270668.java56
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572.java58
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small.java106
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small2.java97
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small3.java83
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small4.java106
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small5.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small6.java57
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug301446.java83
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug306279f.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug311330.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug329279.java34
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/EPPPackageInstallStability_bug323322.java83
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MinimalInstall2.java75
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NoUnecessaryIUProperty.java57
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TopLevelFilterTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/UpdateForTwoIUs.java61
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ContextRepositoryTest.java59
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractSharedBundleProductTest.java313
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/BasicProductTests.java107
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/ProfileSynchronizerTest.java79
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/ProfileSynchronizerTest2.java78
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/SharedBundleProductTestSuite.java33
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramPropertyActionTest.java80
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/PathUtilTest.java52
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramPropertyActionTest.java78
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/BundlesActionTest/test3/BundleMeUp.txt17
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/BundlesActionTest/test3/META-INF/MANIFEST.MF11
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/BundlesActionTest/test3/META-INF/p2.inf3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/BundlesActionTest/test3/subFolder/BundleMeUpToo.txt10
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/EquinoxExecutableActionTest/linux/eclipse.xpm24
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/EquinoxExecutableActionTest/win/eclipse.icobin0 -> 1150 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/ProductActionTest/launcherFlags/falseLauncherFlag.product33
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/ProductActionTest/launcherFlags/noLauncherFlag.product36
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/ProductActionTest/launcherFlags/trueLauncherFlag.product33
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/ProfilePreferencesTest/DifferentAgent/p2/org.eclipse.equinox.p2.engine/profileRegistry/TestProfile.profile/.data/.settings/org.eclipse.equinox.p2.artifact.repository.prefs2426
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/ProfilePreferencesTest/DifferentAgent/p2/org.eclipse.equinox.p2.engine/profileRegistry/TestProfile.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs1970
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/ProfilePreferencesTest/DifferentAgent/p2/org.eclipse.equinox.p2.engine/profileRegistry/TestProfile.profile/1345.profile.gz (renamed from bundles/ie.wombat.jbdiff.test/testData/null.data)0
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/packedSiblingsWithUUID/.blobstore/5e/00c3579a3138001f1093800c21638bce1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/packedSiblingsWithUUID/artifacts.xml26
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/bug300572/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/1273605777280.profile.gzbin0 -> 141618 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/bug300572/repo/content.xml119
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/bug300572Small/repo/content.xml356
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/bug301446/p2/org.eclipse.equinox.p2.engine/profileRegistry/bootProfile.profile/1297370265829.profile.gzbin0 -> 1799120 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/bug301446/repo/content.jarbin0 -> 11913 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/bug306279/repo/helios/content.jarbin0 -> 3502155 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/bug306279/repo/rienatoolbox-a/content.jarbin0 -> 3511003 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/bug306279f/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/1272734955914.profile.gzbin0 -> 167344 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/bug306279f/repo/babel/content.jarbin0 -> 3694379 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/bug306279f/repo/helios/content.jarbin0 -> 3502155 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/bug311330/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/1272735176616.profile.gzbin0 -> 204513 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/bug329279/repo/content.jarbin0 -> 378412 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/helios-sr0/content.jarbin0 -> 2203506 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_1.0.0.qualifier.jarbin0 -> 1148 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_default/META-INF/MANIFEST.MF8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_default/OSGI-INF/l10n/bundle.properties2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_default/OSGI-INF/l10n/bundle_de.properties2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_osgi-inf/META-INF/MANIFEST.MF9
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_osgi-inf/OSGI-INF/bundle.properties2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_osgi-inf/OSGI-INF/bundle_de.properties2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/compositeContent.xml (renamed from bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/compositeContent.xml)1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/one/content.xml (renamed from bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/one/content.xml)0
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/qltest/content.xml123
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/profileSynchronizerTest/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/1273437276701.profile.gzbin0 -> 284582 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/profileSynchronizerTest2/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/1273512748503.profile.gzbin0 -> 342069 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/A/content.xml1084
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/B/content.xml6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/C/content.xml5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/updatesite/CategoryXMLActionTest/category01.xml9
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/updatesite/CategoryXMLActionTest/category02.xml9
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/updatesite/CategoryXMLActionTest/features/test.feature_1.0.0.v20100101.jarbin0 -> 908 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/updatesite/CategoryXMLActionTest/features/test.feature_2.0.0.jarbin0 -> 903 bytes
-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.MF18
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/build.properties5
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/p2 test server.launch23
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/plugin.xml12
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/Activator.java148
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/AlwaysFailContext.java46
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/FlipFlopFailContext.java53
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/LinearChange.java80
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/MimeLookup.java738
-rwxr-xr-xbundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecureAction.java96
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecureContext.java51
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecuredArtifactsContext.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/BasicResourceDelivery.java334
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/ChopAndDelay.java141
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/ContentLengthLier.java44
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/FileMolester.java118
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/HelloWorld.java38
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/LastModifiedLier.java82
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Redirector.java105
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/StatusCodeResponse.java80
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/TimeOut.java44
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Truncator.java105
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/artifacts.xml29
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/features/aaFeature_1.0.0.jarbin670 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/plugins/aaPlugin_1.0.0.jarbin469 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/readme.txt2
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/index.html65
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/index.xml10
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/two/content.xml128
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/features/test.feature_1.0.0.jarbin847 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/plugins/test.bundle_1.0.0.jarbin1058 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/plugins/test.fragment_1.0.0.jarbin386 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/site.xml4
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/README.txt1
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.core.prefs330
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF49
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/build.properties20
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.xml236
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Activator.java32
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/AggregatedBundleRepository.java115
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/DirectorUtil.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java128
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java255
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/LazyManipulator.java144
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Messages.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java246
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PublisherUtil.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/SourceManipulator.java79
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java355
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/WhatIsRunning.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ActionConstants.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java284
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramArgumentAction.java71
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddRepositoryAction.java66
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddSourceBundleAction.java70
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java67
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ChmodAction.java133
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CollectAction.java93
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java84
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallFeatureAction.java82
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java106
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java107
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/Messages.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveJVMArgumentAction.java111
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramArgumentAction.java67
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveRepositoryAction.java66
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveSourceBundleAction.java69
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java260
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetLauncherNameAction.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetProgramPropertyAction.java52
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java110
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallBundleAction.java82
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallFeatureAction.java64
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/messages.properties25
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/messages.properties30
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Configuration.java125
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationCache.java70
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationConstants.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationIO.java74
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java278
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java186
-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.java180
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java120
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/messages.properties14
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/OSGiBundleQuery.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/package.html18
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF25
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/build.properties20
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.xml113
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Activator.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java722
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/ClosedBackupStoreException.java24
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/IBackupStore.java105
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/LazyBackupStore.java81
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Messages.java60
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java139
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Util.java166
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ActionConstants.java34
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ChmodAction.java120
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupcopyAction.java103
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupzipAction.java145
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CollectAction.java69
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CopyAction.java154
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/LinkAction.java114
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/MkdirAction.java49
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RemoveAction.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RmdirAction.java62
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/UnzipAction.java92
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/messages.properties47
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.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/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.ini49
-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/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/rcp.product232
-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.java28
-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.prefs329
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/META-INF/MANIFEST.MF41
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/build.properties20
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/artifact_repo_obj.gifbin545 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/iu_obj.gifbin585 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/metadata_repo_obj.gifbin353 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/profile_obj.gifbin368 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/uninstalled_iu.gifbin237 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/icons/provision.gifbin368 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/plugin.properties26
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/plugin.xml101
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java43
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java73
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java85
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java136
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java86
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java79
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java215
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java154
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIMessages.java93
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java259
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvisioningPerspective.java71
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java37
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java224
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java133
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUGroup.java47
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java245
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java60
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java80
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java74
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java260
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java43
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java147
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/messages.properties70
-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
-rwxr-xr-x[-rw-r--r--]bundles/org.eclipse.equinox.p2.ui.importexport/.classpath (renamed from bundles/org.eclipse.equinox.p2.artifact.optimizers/.classpath)0
-rwxr-xr-x[-rw-r--r--]bundles/org.eclipse.equinox.p2.ui.importexport/.project (renamed from bundles/org.eclipse.equinox.frameworkadmin.equinox/.project)78
-rwxr-xr-x[-rw-r--r--]bundles/org.eclipse.equinox.p2.ui.importexport/.settings/org.eclipse.jdt.core.prefs (renamed from bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.jdt.core.prefs)2
-rwxr-xr-x[-rw-r--r--]bundles/org.eclipse.equinox.p2.ui.importexport/.settings/org.eclipse.jdt.ui.prefs (renamed from bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.ui.prefs)0
-rwxr-xr-x[-rw-r--r--]bundles/org.eclipse.equinox.p2.ui.importexport/.settings/org.eclipse.pde.core.prefs (renamed from bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.pde.core.prefs)0
-rwxr-xr-xbundles/org.eclipse.equinox.p2.ui.importexport/META-INF/MANIFEST.MF38
-rwxr-xr-xbundles/org.eclipse.equinox.p2.ui.importexport/OSGI-INF/importexport.xml8
-rwxr-xr-x[-rw-r--r--]bundles/org.eclipse.equinox.p2.ui.importexport/P2 Replication.launch (renamed from bundles/org.eclipse.equinox.p2.ui.admin.rcp/ProvAdminUI.launch)736
-rwxr-xr-x[-rw-r--r--]bundles/org.eclipse.equinox.p2.ui.importexport/build.properties (renamed from bundles/org.eclipse.equinox.frameworkadmin.equinox/build.properties)6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/icons/install_wiz.gifbin0 -> 3550 bytes
-rwxr-xr-xbundles/org.eclipse.equinox.p2.ui.importexport/plugin.properties9
-rwxr-xr-xbundles/org.eclipse.equinox.p2.ui.importexport/plugin.xml49
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/pom.xml (renamed from bundles/org.eclipse.equinox.p2.tests.verifier/pom.xml)2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/IUDetail.java57
-rwxr-xr-xbundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/P2ImportExport.java25
-rwxr-xr-x[-rw-r--r--]bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/Constants.java (renamed from bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLFactory.java)20
-rwxr-xr-xbundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/ImportExportImpl.java139
-rwxr-xr-xbundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/Messages.java64
-rwxr-xr-xbundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/messages.properties45
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/AbstractImportPage.java126
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/AbstractPage.java433
-rwxr-xr-xbundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/AbstractWizard.java42
-rwxr-xr-xbundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ExportPage.java156
-rwxr-xr-xbundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ExportWizard.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportFromInstallationPage.java353
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportFromInstallationWizard.java56
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportPage.java344
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportWizard.java124
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/persistence/P2FConstants.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/persistence/P2FParser.java236
-rwxr-xr-xbundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/persistence/P2FWriter.java62
-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.prefs329
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF39
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/build.properties20
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close.gifbin73 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close_hot.gifbin852 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update.gifbin600 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update_problems.gifbin1005 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/plugin.properties20
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/plugin.xml23
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateMessages.java87
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java182
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.java236
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java383
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java294
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPreferencePage.java304
-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.java146
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/StatusLineCLabelContribution.java133
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/messages.properties72
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/.project39
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/.settings/.api_filters19
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.core.prefs329
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF30
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/licenseManager_component.xml7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/policy_component.xml7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/build.properties20
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/plugin.properties29
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/plugin.xml124
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/IProvSDKHelpContextIds.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java56
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java122
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java44
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java159
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/RevertProfilePageWithCompare.java230
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SDKPolicy.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java92
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java66
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties28
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java67
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java140
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_disabled_patch_obj.gifbin0 -> 1615 bytes
-rwxr-xr-xbundles/org.eclipse.equinox.p2.ui/icons/obj/iu_patch_obj.gifbin0 -> 609 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryTrackerComponent.java (renamed from bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryComponent.java)19
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IPreFilterJobProvider.java23
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IRepositoryManipulationHook.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java37
-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/.project39
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.core.prefs329
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/META-INF/MANIFEST.MF24
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/about.html38
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/build.properties10
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java190
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateCheckerComponent.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateChecker.java58
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateListener.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/UpdateEvent.java38
-rw-r--r--bundles/org.eclipse.equinox.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.launching.prefs3
-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.MF44
-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.properties21
-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/pom.xml14
-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/CategoryParser.java773
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryPublisherApplication.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryXMLAction.java39
-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.java111
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/Messages.java55
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteFeaturesAction.java81
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteUpdateSiteAction.java69
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteCategory.java195
-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/SiteIU.java143
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteModel.java335
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteXMLAction.java411
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSite.java579
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSitePublisherApplication.java45
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/VersionSuffixGenerator.java296
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepository.java168
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepositoryFactory.java152
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/messages.properties32
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepository.java197
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepositoryFactory.java109
-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/.project39
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.core.prefs343
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/META-INF/MANIFEST.MF23
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/OSGI-INF/configurator.xml10
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/about.html28
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/build.properties9
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/plugin.properties13
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorFactoryImpl.java22
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java541
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java142
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java96
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/.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.prefs283
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/.settings/org.eclipse.jdt.ui.prefs61
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/META-INF/MANIFEST.MF27
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/about.html28
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/build.properties18
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/localbuild.xml44
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/plugin.properties13
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/provisional/configurator/Configurator.java68
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/Activator.java78
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/ConfigApplier.java372
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorFactory.java29
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorImpl.java152
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ApplyCommand.java59
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ConfiguratorCommandProvider.java65
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/BundleInfo.java127
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/EquinoxUtils.java82
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorConstants.java49
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java241
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/StateResolverUtils.java75
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/URIUtil.java185
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/Utils.java133
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/.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.MF30
-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.product109
-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/pom.xml14
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/product_lg.gifbin9559 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/splash.bmpbin135600 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Activator.java76
-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.java29
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java51
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java104
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java58
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/.project11
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/Build PrestartUpdate Example.launch15
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/build.properties119
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/buildProduct.xml26
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/readme.txt16
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.classpath7
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.project28
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/META-INF/MANIFEST.MF19
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/build.properties8
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/mail.icobin26694 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample.gifbin983 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample.icnsbin35301 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample2.gifbin318 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample3.gifbin173 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/p2.inf3
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/plugin.xml97
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/pom.xml14
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/prestartupdate.product104
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/product_lg.gifbin9559 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/splash.bmpbin135600 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Activator.java90
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Application.java48
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationActionBarAdvisor.java91
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchAdvisor.java78
-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.java67
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Perspective.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/View.java77
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.classpath7
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.project33
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/META-INF/MANIFEST.MF30
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/OSGI-INF/policy_component.xml8
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/build.properties10
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/mail.icobin26694 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample.gifbin983 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample.icnsbin35301 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample2.gifbin318 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample3.gifbin173 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/p2.inf3
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.properties23
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.xml183
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/pom.xml14
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/product_lg.gifbin9559 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/sdkbundlevisibility.product107
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/splash.bmpbin135600 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Activator.java61
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Application.java45
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationActionBarAdvisor.java107
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationWorkbenchAdvisor.java21
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationWorkbenchWindowAdvisor.java30
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ICommandIds.java15
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/MessagePopupAction.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/NavigationView.java151
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/OpenViewAction.java36
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Perspective.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/View.java77
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/AllIUsAreVisiblePolicy.java33
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/IProvSDKHelpContextIds.java17
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/InstallNewSoftwareHandler.java51
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/Messages.java32
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceConstants.java21
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceInitializer.java32
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreloadingRepositoryHandler.java104
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/ProvisioningPreferencePage.java143
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/UpdateHandler.java54
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/messages.properties21
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.classpath7
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.project28
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/META-INF/MANIFEST.MF27
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/build.properties8
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/mail.icobin26694 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample.gifbin983 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample.icnsbin35301 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample2.gifbin318 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample3.gifbin173 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/p2.inf3
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/plugin.xml97
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/product_lg.gifbin9559 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/sdknoautoupdates.product98
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/splash.bmpbin135600 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Activator.java61
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Application.java45
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationActionBarAdvisor.java108
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationWorkbenchAdvisor.java21
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationWorkbenchWindowAdvisor.java29
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ICommandIds.java15
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/MessagePopupAction.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/NavigationView.java151
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/OpenViewAction.java36
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Perspective.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/View.java77
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.classpath7
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.project28
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/META-INF/MANIFEST.MF29
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/build.properties8
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/mail.icobin26694 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample.gifbin983 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample.icnsbin35301 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample2.gifbin318 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample3.gifbin173 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/p2.inf3
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/plugin.xml97
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/product_lg.gifbin9559 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/sdkui.product121
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/splash.bmpbin135600 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Activator.java61
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Application.java45
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationActionBarAdvisor.java108
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationWorkbenchAdvisor.java21
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationWorkbenchWindowAdvisor.java29
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ICommandIds.java15
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/MessagePopupAction.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/NavigationView.java151
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/OpenViewAction.java36
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Perspective.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/View.java77
-rw-r--r--features/org.eclipse.equinox.p2.discovery.feature/.project17
-rwxr-xr-xfeatures/org.eclipse.equinox.p2.discovery.feature/epl-v10.html328
-rwxr-xr-xfeatures/org.eclipse.equinox.p2.discovery.feature/feature.properties141
-rw-r--r--features/org.eclipse.equinox.p2.discovery.feature/feature.xml41
-rwxr-xr-xfeatures/org.eclipse.equinox.p2.discovery.feature/license.html79
-rw-r--r--features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/epl-v10.html328
-rw-r--r--features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/feature.properties144
-rw-r--r--features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/license.html79
-rw-r--r--features/org.eclipse.equinox.p2.rcp.feature/.project (renamed from org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/.project)2
-rw-r--r--features/org.eclipse.equinox.p2.rcp.feature/build.properties (renamed from features/org.eclipse.equinox.p2.discovery.feature/build.properties)9
-rw-r--r--features/org.eclipse.equinox.p2.rcp.feature/eclipse_update_120.jpg (renamed from features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/eclipse_update_120.jpg)bin21695 -> 21695 bytes
-rw-r--r--features/org.eclipse.equinox.p2.rcp.feature/feature.properties33
-rw-r--r--features/org.eclipse.equinox.p2.rcp.feature/feature.xml62
-rw-r--r--features/org.eclipse.equinox.p2.sdk/build.properties5
-rwxr-xr-xfeatures/org.eclipse.equinox.p2.sdk/epl-v10.html328
-rwxr-xr-xfeatures/org.eclipse.equinox.p2.sdk/feature.properties103
-rw-r--r--features/org.eclipse.equinox.p2.sdk/feature.xml57
-rwxr-xr-xfeatures/org.eclipse.equinox.p2.sdk/license.html79
-rw-r--r--features/org.eclipse.equinox.p2.sdk/pom.xml (renamed from bundles/org.eclipse.equinox.p2.ui.admin/pom.xml)4
-rw-r--r--features/org.eclipse.equinox.p2.user.ui/.project (renamed from org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/.project)0
-rw-r--r--features/org.eclipse.equinox.p2.user.ui/build.properties (renamed from org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/build.properties)2
-rw-r--r--features/org.eclipse.equinox.p2.user.ui/eclipse_update_120.jpg (renamed from org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/eclipse_update_120.jpg)bin21695 -> 21695 bytes
-rw-r--r--features/org.eclipse.equinox.p2.user.ui/feature.properties23
-rw-r--r--features/org.eclipse.equinox.p2.user.ui/feature.xml49
-rw-r--r--features/org.eclipse.equinox.p2.user.ui/pom.xml (renamed from org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/pom.xml)0
-rw-r--r--features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/build.properties (renamed from features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/build.properties)0
-rw-r--r--features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/eclipse_update_120.jpg (renamed from org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/eclipse_update_120.jpg)bin21695 -> 21695 bytes
-rw-r--r--features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/feature.properties38
-rw-r--r--org.eclipse.equinox.p2.releng/.project11
-rw-r--r--org.eclipse.equinox.p2.releng/HOW TO RUN.txt1
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/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.properties121
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/feature.xml236
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/license.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.properties121
-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.properties121
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/feature.xml188
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/license.html79
-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.properties124
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/feature.xml333
-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/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/examples.psf8
-rw-r--r--org.eclipse.equinox.p2.releng/incubator.psf10
-rw-r--r--org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/.project11
-rw-r--r--org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/pom.xml65
-rw-r--r--org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent/.project17
-rw-r--r--org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent/pom.xml87
-rw-r--r--org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/.project17
-rw-r--r--org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/obr.target31
-rw-r--r--org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/pom.xml40
-rw-r--r--org.eclipse.equinox.p2.releng/p2_users_R_3_6_api_cleanup_projectSet.psf12
-rw-r--r--org.eclipse.equinox.p2.releng/projectSet-extssh.psf70
-rw-r--r--org.eclipse.equinox.p2.releng/projectSet.psf70
1625 files changed, 16291 insertions, 126102 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/pom.xml b/bundles/ie.wombat.jbdiff.test/pom.xml
deleted file mode 100644
index 2671b1898..000000000
--- a/bundles/ie.wombat.jbdiff.test/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>ie.wombat.jbdiff.test</artifactId>
- <version>0.1.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/ie.wombat.jbdiff.test/src/ie/wombat/jbdiff/test/Activator.java b/bundles/ie.wombat.jbdiff.test/src/ie/wombat/jbdiff/test/Activator.java
deleted file mode 100644
index 0d0bb3f2a..000000000
--- a/bundles/ie.wombat.jbdiff.test/src/ie/wombat/jbdiff/test/Activator.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package ie.wombat.jbdiff.test;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
- private static BundleContext context;
-
- /*
- * (non-Javadoc)
- *
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- Activator.context = context;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- Activator.context = null;
- }
-
- /**
- * @return the context
- */
- public static BundleContext getContext() {
- return context;
- }
-
-}
diff --git a/bundles/ie.wombat.jbdiff.test/src/ie/wombat/jbdiff/test/DiffPatchTest.java b/bundles/ie.wombat.jbdiff.test/src/ie/wombat/jbdiff/test/DiffPatchTest.java
deleted file mode 100644
index 5f5e7d8f7..000000000
--- a/bundles/ie.wombat.jbdiff.test/src/ie/wombat/jbdiff/test/DiffPatchTest.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package ie.wombat.jbdiff.test;
-
-import ie.wombat.jbdiff.JBDiff;
-import ie.wombat.jbdiff.JBPatch;
-
-import java.io.BufferedInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Arrays;
-
-import junit.framework.TestCase;
-
-public class DiffPatchTest extends TestCase {
-
- public void testNullData() throws Exception {
- bench("null.data", "null.data");
- }
-
- public void testOneData() throws Exception {
- bench("one.data", "one.data");
- }
-
- public void testOneHundredData() throws Exception {
- bench("onehundred.data", "onehundred.data");
- }
-
- public void testOneHundredXData() throws Exception {
- bench("onehundred.data", "onehundredX.data");
- }
-
- public void testOneXHundredXData() throws Exception {
- bench("onehundred.data", "oneXhundredX.data");
- }
-
- public void testPdeCoreJar() throws Exception {
- bench("org.eclipse.pde.core_3.2.jar", "org.eclipse.pde.core_3.3.jar");
- }
-
- public void testEclipse() throws Exception {
- bench("eclipse-3.2.exe", "eclipse-3.3.exe");
- }
-
- private void bench(String resource1, String resource2) throws Exception {
-
- byte[] oldData = getTestData(resource1);
- byte[] newData = getTestData(resource2);
-
- System.out.println(resource1 + "(" + (oldData.length / 1024)
- + " kb) -> " + resource2 + "(" + (newData.length / 1024)
- + " kb)");
-
- diffAndPatchJBDiff(oldData, newData);
-
- System.out.println("");
- }
-
- /**
- * @param resource1
- * @param resource2
- * @throws IOException
- */
- private void diffAndPatchJBDiff(byte[] oldData, byte[] newData)
- throws IOException {
-
- try {
-
- long start = System.currentTimeMillis();
-
- byte[] diff = JBDiff.bsdiff(oldData, oldData.length, newData,
- newData.length);
-
- long diffEnd = System.currentTimeMillis();
-
- byte[] patch = JBPatch.bspatch(oldData, oldData.length, diff);
-
- long patchEnd = System.currentTimeMillis();
-
- System.out.println("JBDiff: Size= " + diff.length + " b ("
- + diff.length / 1024 + " kb), Diffing " + (diffEnd - start)
- + " ms, Patching: " + (patchEnd - diffEnd) + " ms");
-
- assertTrue(Arrays.equals(newData, patch));
-
- } catch (RuntimeException re) {
- System.err.println("JBDiff: error: " + re.getMessage());
- }
- }
-
- private static byte[] getTestData(String name) throws IOException {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- InputStream input = new BufferedInputStream(Activator.getContext()
- .getBundle().getEntry("testData/" + name).openStream());
- int r;
- while ((r = input.read()) != -1) {
- out.write(r);
- }
- input.close();
- out.close();
- return out.toByteArray();
- }
-} \ No newline at end of file
diff --git a/bundles/ie.wombat.jbdiff.test/testData/eclipse-3.2.exe b/bundles/ie.wombat.jbdiff.test/testData/eclipse-3.2.exe
deleted file mode 100644
index 7826d1ed8..000000000
--- a/bundles/ie.wombat.jbdiff.test/testData/eclipse-3.2.exe
+++ /dev/null
Binary files differ
diff --git a/bundles/ie.wombat.jbdiff.test/testData/eclipse-3.3.exe b/bundles/ie.wombat.jbdiff.test/testData/eclipse-3.3.exe
deleted file mode 100644
index c5cd8f038..000000000
--- a/bundles/ie.wombat.jbdiff.test/testData/eclipse-3.3.exe
+++ /dev/null
Binary files differ
diff --git a/bundles/ie.wombat.jbdiff.test/testData/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/pom.xml b/bundles/ie.wombat.jbdiff/pom.xml
deleted file mode 100644
index 37e283127..000000000
--- a/bundles/ie.wombat.jbdiff/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>ie.wombat.jbdiff</artifactId>
- <version>0.1.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/JBDiff.java b/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/JBDiff.java
deleted file mode 100644
index 711fbd425..000000000
--- a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/JBDiff.java
+++ /dev/null
@@ -1,612 +0,0 @@
-/*
- * Copyright (c) 2005, Joe Desbonnet, (jdesbonnet@gmail.com)
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the <organization> nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package ie.wombat.jbdiff;
-
-import java.io.BufferedInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.zip.GZIPOutputStream;
-
-/**
- * Java Binary Diff utility. Based on bsdiff (v4.2) by Colin Percival (see
- * http://www.daemonology.net/bsdiff/ ) and distributed under BSD license.
- *
- * <p>
- * Running this on large files will probably require an increase of the default
- * maximum heap size (use java -Xmx200m)
- * </p>
- *
- * @author Joe Desbonnet, joe@galway.net
- *
- */
-public class JBDiff {
-
- // JBDiff extensions by Stefan.Liebig@compeople.de:
- //
- // - uses GZIP compressor to compress ALL of the blocks (ctrl,diff,extra).
- // - added interfaces that allows using of JBDiff with streams and byte
- // arrays.
-
-// private static final String VERSION = "jbdiff-0.1.0.1";
-
- // This is ´jbdiff40´.
- private static final byte[] MAGIC_BYTES = new byte[] { 0x6a, 0x62, 0x64,
- 0x69, 0x66, 0x66, 0x34, 0x30 };
-
- private final static void split(int[] I, int[] V, int start, int len, int h) {
-
- int i, j, k, x, tmp, jj, kk;
-
- if (len < 16) {
- for (k = start; k < start + len; k += j) {
- j = 1;
- x = V[I[k] + h];
- for (i = 1; k + i < start + len; i++) {
- if (V[I[k + i] + h] < x) {
- x = V[I[k + i] + h];
- j = 0;
- }
-
- if (V[I[k + i] + h] == x) {
- tmp = I[k + j];
- I[k + j] = I[k + i];
- I[k + i] = tmp;
- j++;
- }
-
- }
-
- for (i = 0; i < j; i++) {
- V[I[k + i]] = k + j - 1;
- }
- if (j == 1) {
- I[k] = -1;
- }
- }
-
- return;
- }
-
- x = V[I[start + len / 2] + h];
- jj = 0;
- kk = 0;
- for (i = start; i < start + len; i++) {
- if (V[I[i] + h] < x) {
- jj++;
- }
- if (V[I[i] + h] == x) {
- kk++;
- }
- }
-
- jj += start;
- kk += jj;
-
- i = start;
- j = 0;
- k = 0;
- while (i < jj) {
- if (V[I[i] + h] < x) {
- i++;
- } else if (V[I[i] + h] == x) {
- tmp = I[i];
- I[i] = I[jj + j];
- I[jj + j] = tmp;
- j++;
- } else {
- tmp = I[i];
- I[i] = I[kk + k];
- I[kk + k] = tmp;
- k++;
- }
-
- }
-
- while (jj + j < kk) {
- if (V[I[jj + j] + h] == x) {
- j++;
- } else {
- tmp = I[jj + j];
- I[jj + j] = I[kk + k];
- I[kk + k] = tmp;
- k++;
- }
-
- }
-
- if (jj > start) {
- split(I, V, start, jj - start, h);
- }
-
- for (i = 0; i < kk - jj; i++) {
- V[I[jj + i]] = kk - 1;
- }
-
- if (jj == kk - 1) {
- I[jj] = -1;
- }
-
- if (start + len > kk) {
- split(I, V, kk, start + len - kk, h);
- }
-
- }
-
- /**
- * Fast suffix sporting. Larsson and Sadakane's qsufsort algorithm. See
- * http://www.cs.lth.se/Research/Algorithms/Papers/jesper5.ps
- *
- * @param I
- * @param V
- * @param oldBuf
- * @param oldsize
- */
- private static void qsufsort(int[] I, int[] V, byte[] oldBuf, int oldsize) {
-
- // int oldsize = oldBuf.length;
- int[] buckets = new int[256];
-
- // No need to do that in Java.
- // for ( int i = 0; i < 256; i++ ) {
- // buckets[i] = 0;
- // }
-
- for (int i = 0; i < oldsize; i++) {
- buckets[oldBuf[i] & 0xff]++;
- }
-
- for (int i = 1; i < 256; i++) {
- buckets[i] += buckets[i - 1];
- }
-
- for (int i = 255; i > 0; i--) {
- buckets[i] = buckets[i - 1];
- }
-
- buckets[0] = 0;
-
- for (int i = 0; i < oldsize; i++) {
- I[++buckets[oldBuf[i] & 0xff]] = i;
- }
-
- I[0] = oldsize;
- for (int i = 0; i < oldsize; i++) {
- V[i] = buckets[oldBuf[i] & 0xff];
- }
- V[oldsize] = 0;
-
- for (int i = 1; i < 256; i++) {
- if (buckets[i] == buckets[i - 1] + 1) {
- I[buckets[i]] = -1;
- }
- }
-
- I[0] = -1;
-
- for (int h = 1; I[0] != -(oldsize + 1); h += h) {
- int len = 0;
- int i;
- for (i = 0; i < oldsize + 1;) {
- if (I[i] < 0) {
- len -= I[i];
- i -= I[i];
- } else {
- // if(len) I[i-len]=-len;
- if (len != 0) {
- I[i - len] = -len;
- }
- len = V[I[i]] + 1 - i;
- split(I, V, i, len, h);
- i += len;
- len = 0;
- }
-
- }
-
- if (len != 0) {
- I[i - len] = -len;
- }
- }
-
- for (int i = 0; i < oldsize + 1; i++) {
- I[V[i]] = i;
- }
- }
-
- /**
- * Count the number of bytes that match in oldBuf (starting at offset
- * oldOffset) and newBuf (starting at offset newOffset).
- *
- * @param oldBuf
- * @param oldOffset
- * @param newBuf
- * @param newOffset
- * @return
- */
- private final static int matchlen(byte[] oldBuf, int oldSize,
- int oldOffset, byte[] newBuf, int newSize, int newOffset) {
- // int end = Math
- // .min(oldBuf.length - oldOffset, newBuf.length - newOffset);
- int end = Math.min(oldSize - oldOffset, newSize - newOffset);
- for (int i = 0; i < end; i++) {
- if (oldBuf[oldOffset + i] != newBuf[newOffset + i]) {
- return i;
- }
- }
- return end;
- }
-
- private final static int search(int[] I, byte[] oldBuf, int oldSize,
- byte[] newBuf, int newSize, int newBufOffset, int start, int end,
- IntByRef pos) {
-
- if (end - start < 2) {
- int x = matchlen(oldBuf, oldSize, I[start], newBuf, newSize,
- newBufOffset);
- int y = matchlen(oldBuf, oldSize, I[end], newBuf, newSize,
- newBufOffset);
-
- if (x > y) {
- pos.value = I[start];
- return x;
- } else {
- pos.value = I[end];
- return y;
- }
- }
-
- int x = start + (end - start) / 2;
- if (Util.memcmp(oldBuf, oldSize, I[x], newBuf, newSize, newBufOffset) < 0) {
- return search(I, oldBuf, oldSize, newBuf, newSize, newBufOffset, x,
- end, pos);
- } else {
- return search(I, oldBuf, oldSize, newBuf, newSize, newBufOffset,
- start, x, pos);
- }
-
- }
-
- /**
- * @param oldFile
- * @param newFile
- * @param diffFile
- * @throws IOException
- */
- public static void bsdiff(File oldFile, File newFile, File diffFile)
- throws IOException {
- InputStream oldInputStream = new BufferedInputStream(
- new FileInputStream(oldFile));
- InputStream newInputStream = new BufferedInputStream(
- new FileInputStream(newFile));
- OutputStream diffOutputStream = new FileOutputStream(diffFile);
-
- byte[] diffBytes = bsdiff(oldInputStream, (int) oldFile.length(),
- newInputStream, (int) newFile.length());
-
- diffOutputStream.write(diffBytes);
- diffOutputStream.close();
- }
-
- /**
- * @param oldInputStream
- * @param oldsize
- * @param newInputStream
- * @param newsize
- * @return
- * @throws IOException
- */
- public static byte[] bsdiff(InputStream oldInputStream, int oldsize,
- InputStream newInputStream, int newsize) throws IOException {
-
- byte[] oldBuf = new byte[oldsize];
-
- Util.readFromStream(oldInputStream, oldBuf, 0, oldsize);
- oldInputStream.close();
-
- byte[] newBuf = new byte[newsize];
- Util.readFromStream(newInputStream, newBuf, 0, newsize);
- newInputStream.close();
-
- return bsdiff(oldBuf, oldsize, newBuf, newsize);
- }
-
- /**
- * @param oldBuf
- * @param oldsize
- * @param newBuf
- * @param newsize
- * @return
- * @throws IOException
- */
- public static byte[] bsdiff(byte[] oldBuf, int oldsize, byte[] newBuf,
- int newsize) throws IOException {
-
- int[] I = new int[oldsize + 1];
- qsufsort(I, new int[oldsize + 1], oldBuf, oldsize);
-
- // diff block
- int dblen = 0;
- byte[] db = new byte[newsize];
-
- // extra block
- int eblen = 0;
- byte[] eb = new byte[newsize];
-
- /*
- * Diff file is composed as follows:
- *
- * Header (32 bytes) Data (from offset 32 to end of file)
- *
- * Header: Offset 0, length 8 bytes: file magic "jbdiff40" Offset 8,
- * length 8 bytes: length of compressed ctrl block Offset 16, length 8
- * bytes: length of compressed diff block Offset 24, length 8 bytes:
- * length of new file
- *
- * Data: 32 (length ctrlBlockLen): ctrlBlock (bzip2) 32+ctrlBlockLen
- * (length diffBlockLen): diffBlock (bzip2) 32+ctrlBlockLen+diffBlockLen
- * (to end of file): extraBlock (bzip2)
- *
- * ctrlBlock comprises a set of records, each record 12 bytes. A record
- * comprises 3 x 32 bit integers. The ctrlBlock is not compressed.
- */
-
- ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
- DataOutputStream diffOut = new DataOutputStream(byteOut);
-
- /*
- * Write as much of header as we have now. Size of ctrlBlock and
- * diffBlock must be filled in later.
- */
- diffOut.write(MAGIC_BYTES);
- diffOut.writeLong(-1); // place holder for ctrlBlockLen
- diffOut.writeLong(-1); // place holder for diffBlockLen
- diffOut.writeLong(newsize);
- diffOut.flush();
-
- GZIPOutputStream bzip2Out = new GZIPOutputStream(diffOut);
- DataOutputStream dataOut = new DataOutputStream(bzip2Out);
-
- int oldscore, scsc;
-
- int overlap, Ss, lens;
- int i;
- int scan = 0;
- int len = 0;
- int lastscan = 0;
- int lastpos = 0;
- int lastoffset = 0;
-
- IntByRef pos = new IntByRef();
- // int ctrlBlockLen = 0;
-
- while (scan < newsize) {
- oldscore = 0;
-
- for (scsc = scan += len; scan < newsize; scan++) {
-
- len = search(I, oldBuf, oldsize, newBuf, newsize, scan, 0,
- oldsize, pos);
-
- for (; scsc < scan + len; scsc++) {
- if ((scsc + lastoffset < oldsize)
- && (oldBuf[scsc + lastoffset] == newBuf[scsc])) {
- oldscore++;
- }
- }
-
- if (((len == oldscore) && (len != 0)) || (len > oldscore + 8)) {
- break;
- }
-
- if ((scan + lastoffset < oldsize)
- && (oldBuf[scan + lastoffset] == newBuf[scan])) {
- oldscore--;
- }
- }
-
- if ((len != oldscore) || (scan == newsize)) {
- int s = 0;
- int Sf = 0;
- int lenf = 0;
- for (i = 0; (lastscan + i < scan) && (lastpos + i < oldsize);) {
- if (oldBuf[lastpos + i] == newBuf[lastscan + i])
- s++;
- i++;
- if (s * 2 - i > Sf * 2 - lenf) {
- Sf = s;
- lenf = i;
- }
- }
-
- int lenb = 0;
- if (scan < newsize) {
- s = 0;
- int Sb = 0;
- for (i = 1; (scan >= lastscan + i) && (pos.value >= i); i++) {
- if (oldBuf[pos.value - i] == newBuf[scan - i])
- s++;
- if (s * 2 - i > Sb * 2 - lenb) {
- Sb = s;
- lenb = i;
- }
- }
- }
-
- if (lastscan + lenf > scan - lenb) {
- overlap = (lastscan + lenf) - (scan - lenb);
- s = 0;
- Ss = 0;
- lens = 0;
- for (i = 0; i < overlap; i++) {
- if (newBuf[lastscan + lenf - overlap + i] == oldBuf[lastpos
- + lenf - overlap + i]) {
- s++;
- }
- if (newBuf[scan - lenb + i] == oldBuf[pos.value - lenb
- + i]) {
- s--;
- }
- if (s > Ss) {
- Ss = s;
- lens = i + 1;
- }
- }
-
- lenf += lens - overlap;
- lenb -= lens;
- }
-
- // ? byte casting introduced here -- might affect things
- for (i = 0; i < lenf; i++) {
- db[dblen + i] = (byte) (newBuf[lastscan + i] - oldBuf[lastpos
- + i]);
- }
-
- for (i = 0; i < (scan - lenb) - (lastscan + lenf); i++) {
- eb[eblen + i] = newBuf[lastscan + lenf + i];
- }
-
- dblen += lenf;
- eblen += (scan - lenb) - (lastscan + lenf);
-
- /*
- * Write control block entry (3 x int)
- */
- // diffOut.writeInt( lenf );
- // diffOut.writeInt( ( scan - lenb ) - ( lastscan + lenf ) );
- // diffOut.writeInt( ( pos[0] - lenb ) - ( lastpos + lenf ) );
- // ctrlBlockLen += 12;
- dataOut.writeInt(lenf);
- dataOut.writeInt((scan - lenb) - (lastscan + lenf));
- dataOut.writeInt((pos.value - lenb) - (lastpos + lenf));
-
- lastscan = scan - lenb;
- lastpos = pos.value - lenb;
- lastoffset = pos.value - scan;
- } // end if
- } // end while loop
-
- dataOut.flush();
- bzip2Out.finish();
-
- // now compressed ctrlBlockLen
- int ctrlBlockLen = diffOut.size() - Util.HEADER_SIZE;
- // System.err.println( "Diff: ctrlBlockLen=" + ctrlBlockLen );
-
- // GZIPOutputStream gzOut;
-
- /*
- * Write diff block
- */
- // gzOut = new GZIPOutputStream( diffOut );
- bzip2Out = new GZIPOutputStream(diffOut);
- bzip2Out.write(db, 0, dblen);
- bzip2Out.finish();
- bzip2Out.flush();
- int diffBlockLen = diffOut.size() - ctrlBlockLen - Util.HEADER_SIZE;
- // System.err.println( "Diff: diffBlockLen=" + diffBlockLen );
-
- /*
- * Write extra block
- */
- // gzOut = new GZIPOutputStream( diffOut );
- bzip2Out = new GZIPOutputStream(diffOut);
- bzip2Out.write(eb, 0, eblen);
- bzip2Out.finish();
- bzip2Out.flush();
- // long extraBlockLen = diffOut.size() - diffBlockLen - ctrlBlockLen -
- // HEADER_SIZE;
- // System.err.println( "Diff: extraBlockLen=" + extraBlockLen );
-
- diffOut.close();
-
- /*
- * Write missing header info.
- */
- ByteArrayOutputStream byteHeaderOut = new ByteArrayOutputStream(
- Util.HEADER_SIZE);
- DataOutputStream headerOut = new DataOutputStream(byteHeaderOut);
- headerOut.write(MAGIC_BYTES);
- headerOut.writeLong(ctrlBlockLen); // place holder for ctrlBlockLen
- headerOut.writeLong(diffBlockLen); // place holder for diffBlockLen
- headerOut.writeLong(newsize);
- headerOut.close();
-
- // Copy header information into the diff
- byte[] diffBytes = byteOut.toByteArray();
- byte[] headerBytes = byteHeaderOut.toByteArray();
-
- System.arraycopy(headerBytes, 0, diffBytes, 0, headerBytes.length);
-
- return diffBytes;
- // /*
- // * Write missing header info. Need to reopen the file with
- // RandomAccessFile
- // * for this.
- // */
- // RandomAccessFile diff = new RandomAccessFile( diffFile, "rw" );
- // diff.seek( 8 );
- // diff.writeLong( ctrlBlockLen ); // ctrlBlockLen (compressed) @offset
- // 8
- // diff.writeLong( diffBlockLen ); // diffBlockLen (compressed) @offset
- // 16
- // diff.close();
- }
-
- /**
- * Run JBDiff from the command line. Params: oldfile newfile difffile. diff
- * file will be created.
- *
- * @param arg
- * @throws IOException
- */
- public static void main(String[] arg) throws IOException {
-
- if (arg.length != 3) {
- System.err
- .println("usage example: java -Xmx200m ie.wombat.jbdiff.JBDiff oldfile newfile patchfile\n");
- return;
- }
-
- File oldFile = new File(arg[0]);
- File newFile = new File(arg[1]);
- File diffFile = new File(arg[2]);
-
- bsdiff(oldFile, newFile, diffFile);
-
- }
-
- private static class IntByRef {
- private int value;
- }
-}
diff --git a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/JBPatch.java b/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/JBPatch.java
deleted file mode 100644
index 7f91ecf1b..000000000
--- a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/JBPatch.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Copyright (c) 2005, Joe Desbonnet, (jdesbonnet@gmail.com)
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the <organization> nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */package ie.wombat.jbdiff;
-
-import java.io.BufferedInputStream;
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.zip.GZIPInputStream;
-
-/**
- * Java Binary patcher (based on bspatch by Colin Percival)
- *
- * @author Joe Desbonnet, joe@galway.net
- */
-public class JBPatch {
-
- // JBPatch extensions by Stefan.Liebig@compeople.de:
- //
- // - uses GZIP compressor to compress ALL of the blocks (ctrl,diff,extra).
- // - added an interface that allows using of JBPatch with streams and byte
- // arrays
-
-// private static final String VERSION = "jbdiff-0.1.0";
-
- /**
- * Run JBPatch from the command line. Params: oldfile newfile patchfile.
- * newfile will be created.
- *
- * @param arg
- * @throws IOException
- */
- public static void main(String[] arg) throws IOException {
-
- if (arg.length != 3) {
- System.err
- .println("usage example: java -Xmx200m ie.wombat.jbdiff.JBPatch oldfile newfile patchfile");
- }
-
- File oldFile = new File(arg[0]);
- File newFile = new File(arg[1]);
- File diffFile = new File(arg[2]);
-
- bspatch(oldFile, newFile, diffFile);
- }
-
- /**
- * @param oldFile
- * @param newFile
- * @param diffFile
- * @throws IOException
- */
- public static void bspatch(File oldFile, File newFile, File diffFile)
- throws IOException {
- InputStream oldInputStream = new BufferedInputStream(
- new FileInputStream(oldFile));
- byte[] diffBytes = new byte[(int) diffFile.length()];
- InputStream diffInputStream = new FileInputStream(diffFile);
- Util.readFromStream(diffInputStream, diffBytes, 0, diffBytes.length);
-
- byte[] newBytes = bspatch(oldInputStream, (int) oldFile.length(),
- diffBytes);
-
- OutputStream newOutputStream = new FileOutputStream(newFile);
- newOutputStream.write(newBytes);
- newOutputStream.close();
- }
-
- /**
- * @param oldInputStream
- * @param diffInputStream
- * @return
- */
- public static byte[] bspatch(InputStream oldInputStream, int oldsize,
- byte[] diffBytes) throws IOException {
- /*
- * Read in old file (file to be patched) to oldBuf
- */
- // int oldsize = (int) oldFile.length();
- // byte[] oldBuf = new byte[oldsize + 1];
- byte[] oldBuf = new byte[oldsize];
- // InputStream oldIn = new FileInputStream( oldFile );
- Util.readFromStream(oldInputStream, oldBuf, 0, oldsize);
- oldInputStream.close();
- // oldIn.close();
-
- return JBPatch.bspatch(oldBuf, oldsize, diffBytes);
- }
-
- /**
- * @param oldBuf
- * @param oldsize
- * @param diffBytes
- * @return
- * @throws IOException
- */
- public static byte[] bspatch(byte[] oldBuf, int oldsize, byte[] diffBytes)
- throws IOException {
- return bspatch(oldBuf, oldsize, diffBytes, diffBytes.length);
- }
-
- /**
- * @param oldBuf
- * @param oldsize
- * @param diffBuf
- * @param diffSize
- * @return
- * @throws IOException
- */
- public static byte[] bspatch(byte[] oldBuf, int oldsize, byte[] diffBuf,
- int diffSize) throws IOException {
-
- DataInputStream diffIn = new DataInputStream(new ByteArrayInputStream(
- diffBuf, 0, diffSize));
-
- // skip headerMagic at header offset 0 (length 8 bytes)
- diffIn.skip(8);
-
- // ctrlBlockLen after bzip2 compression at heater offset 8 (length 8
- // bytes)
- long ctrlBlockLen = diffIn.readLong();
-
- // diffBlockLen after bzip2 compression at header offset 16 (length 8
- // bytes)
- long diffBlockLen = diffIn.readLong();
-
- // size of new file at header offset 24 (length 8 bytes)
- int newsize = (int) diffIn.readLong();
-
- // System.err.println( "newsize=" + newsize );
- // System.err.println( "ctrlBlockLen=" + ctrlBlockLen );
- // System.err.println( "diffBlockLen=" + diffBlockLen );
- // System.err.println( "newsize=" + newsize );
-
- InputStream in;
- in = new ByteArrayInputStream(diffBuf, 0, diffSize);
- in.skip(Util.HEADER_SIZE);
- DataInputStream ctrlBlockIn = new DataInputStream(new GZIPInputStream(
- in));
-
- in = new ByteArrayInputStream(diffBuf, 0, diffSize);
- in.skip(ctrlBlockLen + Util.HEADER_SIZE);
- InputStream diffBlockIn = new GZIPInputStream(in);
-
- in = new ByteArrayInputStream(diffBuf, 0, diffSize);
- in.skip(diffBlockLen + ctrlBlockLen + Util.HEADER_SIZE);
- InputStream extraBlockIn = new GZIPInputStream(in);
-
- // byte[] newBuf = new byte[newsize + 1];
- byte[] newBuf = new byte[newsize];
-
- int oldpos = 0;
- int newpos = 0;
- int[] ctrl = new int[3];
- // int nbytes;
- while (newpos < newsize) {
-
- for (int i = 0; i <= 2; i++) {
- // ctrl[i] = diffIn.readInt();
- ctrl[i] = ctrlBlockIn.readInt();
- // System.err.println (" ctrl[" + i + "]=" + ctrl[i]);
- }
-
- if (newpos + ctrl[0] > newsize) {
- throw new IOException("Corrupt patch.");
- }
-
- /*
- * Read ctrl[0] bytes from diffBlock stream
- */
-
- Util.readFromStream(diffBlockIn, newBuf, newpos, ctrl[0]);
-
- for (int i = 0; i < ctrl[0]; i++) {
- if ((oldpos + i >= 0) && (oldpos + i < oldsize)) {
- newBuf[newpos + i] += oldBuf[oldpos + i];
- }
- }
-
- newpos += ctrl[0];
- oldpos += ctrl[0];
-
- if (newpos + ctrl[1] > newsize) {
- throw new IOException("Corrupt patch.");
- }
-
- Util.readFromStream(extraBlockIn, newBuf, newpos, ctrl[1]);
-
- newpos += ctrl[1];
- oldpos += ctrl[2];
- }
-
- // TODO: Check if at end of ctrlIn
- // TODO: Check if at the end of diffIn
- // TODO: Check if at the end of extraIn
-
- // This check is not needed since the byte array has been allocated with
- // this constraint!
- // if ( newBuf.length - 1 != newsize ) {
- // throw new IOException( "Corrupt patch." );
- // }
-
- ctrlBlockIn.close();
- diffBlockIn.close();
- extraBlockIn.close();
- diffIn.close();
-
- return newBuf;
- // OutputStream out = new FileOutputStream( newFile );
- // out.write( newBuf, 0, newBuf.length - 1 );
- // out.close();
- }
-}
diff --git a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/LICENSE.txt b/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/LICENSE.txt
deleted file mode 100644
index 8b8b4d503..000000000
--- a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/LICENSE.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright (c) 2005, Joe Desbonnet (jdesbonnet@gmail.com).
-* Based on a direct translation of bsdiff utility by Colin Percival
-* and available at http://www.daemonology.net/bsdiff/ under the
-* same license.
-
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the <organization> nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/ \ No newline at end of file
diff --git a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/README.txt b/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/README.txt
deleted file mode 100644
index 82356621e..000000000
--- a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/README.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-README file for JBDiff (Java Binary Diff)
-Version: 0.1.1
-Release date: 1 Oct 2007
-
-JBDiff (Java Binary Diff) utility is a Java translation of the bsdiff (v4.2) utility
-by Colin Percival. See http://www.daemonology.net/bsdiff/
-
-The file format is similar to, but currently not compatible with the bsdiff utility.
-This is because bsdiff uses bzip2 for compression which is not available in the
-standard Java libraries. Instead I use gzip (java.util.zip.*)
-
-The diff utility is very memory hungry. Attempting to diff very large files with
-insufficient RAM may cause your computer to 'trash' (ie become unusably slow and may
-require a reset to recover). Comparing two 20MB files will take approx 80 seconds
-on a 2GHz Pentium 4 and will require a maximum heap size of at least 220 MBytes. The
-maximum heap size can be specified using the -Xmx switch to the Java VM (see examples
-below). The patch utility has more modest resource requirements.
-
-EXAMPLES:
-
-To compare old.bin with new.bin and produce diff file new-old.diff:
-
-java -Xmx200m -classpath jbdiff.jar ie.wombat.jbdiff.JBDiff old.bin new.bin new-old.diff
-
-To patch old.bin with new-old.diff to produce new.bin:
-
-java -Xmx200m -classpath jbdiff.jar ie.wombat.jbdiff.JBPatch old.bin new.bin new-old.diff
-
-TODO:
-
-This first release is a rather blind port of the bsdiff utility. A vast bulk of
-the code ported to Java without any modification. There is scope
-for optimization (the C bsdiff runs in approx 50% faster than JBDiff).
-
-Also it would be nice to be able to produce output that is compatible with bsdiff.
-I need a bzip2 library for that.
-
-Any suggestions, feedback and bugs will be much appreciated. Please email
-to joe@galway.net
-
-LICENSE:
-
-Now available under BSD license (previously GPL).
-
-CHANGES SINCE 0.1.0 RELEASE:
-
-Change of license from GPL v2 to BSD license.
-
-Joe Desbonnet
-jdesbonnet@gmail.com
-1 Oct 2007
diff --git a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/Util.java b/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/Util.java
deleted file mode 100644
index 54d5eaf8d..000000000
--- a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/Util.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2005, Joe Desbonnet, (jdesbonnet@gmail.com)
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the <organization> nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package ie.wombat.jbdiff;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * @author
- * @author Joe Desbonnet, joe@galway.net
- *
- */
-public class Util {
-
- // JBDiff extensions by Stefan.Liebig@compeople.de:
- //
- // - introduced a HEADER_SIZE constant here
-
- /**
- * Length of the diff file header.
- */
- public static final int HEADER_SIZE = 32;
-
- /**
- * Equiv of C library memcmp().
- *
- * @param s1
- * @param s1offset
- * @param s2
- * @param n
- * @return
- */
- /*
- * public final static int memcmp(byte[] s1, int s1offset, byte[] s2, int
- * s2offset, int n) {
- *
- * if ((s1offset + n) > s1.length) { n = s1.length - s1offset; } if
- * ((s2offset + n) > s2.length) { n = s2.length - s2offset; } for (int i =
- * 0; i < n; i++) { if (s1[i + s1offset] != s2[i + s2offset]) { return s1[i +
- * s1offset] < s2[i + s2offset] ? -1 : 1; } }
- *
- * return 0; }
- */
-
- /**
- * Equiv of C library memcmp().
- *
- * @param s1
- * @param s1offset
- * @param s2
- * @param n
- * @return
- */
- public final static int memcmp(byte[] s1, int s1Size, int s1offset,
- byte[] s2, int s2Size, int s2offset) {
-
- int n = s1Size - s1offset;
-
- if (n > (s2Size - s2offset)) {
- n = s2Size - s2offset;
- }
- for (int i = 0; i < n; i++) {
- if (s1[i + s1offset] != s2[i + s2offset]) {
- return s1[i + s1offset] < s2[i + s2offset] ? -1 : 1;
- }
- }
-
- return 0;
- // int n = s1.length - s1offset;
- //
- // if (n > (s2.length - s2offset)) {
- // n = s2.length - s2offset;
- // }
- // for (int i = 0; i < n; i++) {
- // if (s1[i + s1offset] != s2[i + s2offset]) {
- // return s1[i + s1offset] < s2[i + s2offset] ? -1 : 1;
- // }
- // }
- //
- // return 0;
- }
-
- /**
- * Read from input stream and fill the given buffer from the given offset up
- * to length len.
- *
- * @param in
- * @param buf
- * @param offset
- * @param len
- * @throws IOException
- */
- public static final void readFromStream(InputStream in, byte[] buf,
- int offset, int len) throws IOException {
-
- int totalBytesRead = 0;
- while (totalBytesRead < len) {
- int bytesRead = in.read(buf, offset + totalBytesRead, len
- - totalBytesRead);
- if (bytesRead < 0) {
- throw new IOException(
- "Could not read expected number of bytes.");
- }
- totalBytesRead += bytesRead;
- }
- }
-
-}
diff --git a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/readme-more.txt b/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/readme-more.txt
deleted file mode 100644
index dd65be179..000000000
--- a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/readme-more.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-This library version is based on JBDiff (http://www.wombat.ie/software/jbdiff/downloads/jbdiff-0.1.1.tar.gz)
-which is also available under the OSI Approved :: BSD License (original)
-http://www.opensource.org/licenses/bsd-license.html
-
-Version 0.1.0.1
- - Extended interface so that it is not only file based and uses GZIP compressor for all data structures.
-
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.classpath b/bundles/org.eclipse.equinox.frameworkadmin.equinox/.classpath
deleted file mode 100644
index 6f3b481ac..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f84716658..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,340 +0,0 @@
-#Wed Jan 23 10:00:41 EST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.3
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index ad9b6dd0f..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:57:33 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 51a335031..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Tue Nov 21 00:29:05 EST 2006
-eclipse.preferences.version=1
-pluginProject.equinox=false
-pluginProject.extensions=false
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.frameworkadmin.equinox/META-INF/MANIFEST.MF
deleted file mode 100644
index 07e9fa750..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,28 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.frameworkadmin.equinox;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Import-Package: org.eclipse.core.runtime.internal.adaptor,
- org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.internal.frameworkadmin.utils,
- org.eclipse.equinox.internal.provisional.configuratormanipulator,
- org.eclipse.equinox.internal.provisional.frameworkadmin,
- org.eclipse.osgi.framework.internal.core,
- org.eclipse.osgi.service.datalocation;version="1.0.0";resolution:=optional,
- org.eclipse.osgi.service.environment;version="1.0.0";resolution:=optional,
- org.eclipse.osgi.service.resolver;version="1.1.0";resolution:=optional,
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.service.log;version="1.3.0",
- org.osgi.service.startlevel;version="1.0.0",
- org.osgi.util.tracker;version="1.3.0"
-Export-Package: org.eclipse.equinox.internal.frameworkadmin.equinox;x-friends:="org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.metadata.generator,org.eclipse.equinox.simpleconfigurator.manipulator",
- org.eclipse.equinox.internal.frameworkadmin.equinox.utils;x-internal:=true
-Require-Bundle: org.eclipse.equinox.common
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Service-Component: OSGI-INF/fwadmin.xml
-Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/OSGI-INF/fwadmin.xml b/bundles/org.eclipse.equinox.frameworkadmin.equinox/OSGI-INF/fwadmin.xml
deleted file mode 100644
index e3f045a71..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/OSGI-INF/fwadmin.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.frameworkadmin.equinox">
- <implementation class="org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwAdminImpl"/>
- <service>
- <provide interface="org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin"/>
- </service>
- <property name="org.eclipse.equinox.frameworkhandler.framework.name" type="String" value="Equinox"/>
- <property name="org.eclipse.equinox.frameworkhandler.framework.version" type="String" value="3.3"/>
- <property name="org.eclipse.equinox.frameworkhandler.launcher.name" type="String" value="Eclipse.exe"/>
- <property name="org.eclipse.equinox.frameworkhandler.launcher.version" type="String" value="3.2"/>
- <reference bind="setStartLevel" cardinality="1..1" interface="org.osgi.service.startlevel.StartLevel" name="StartLevel" policy="static"/>
- <reference bind="setPlatformAdmin" cardinality="1..1" interface="org.eclipse.osgi.service.resolver.PlatformAdmin" name="PlatformAdmin" policy="static"/>
-</scr:component>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/plugin.properties b/bundles/org.eclipse.equinox.frameworkadmin.equinox/plugin.properties
deleted file mode 100644
index 121a7e4b3..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Equinox Framework Admin for Equinox
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml b/bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml
deleted file mode 100644
index 3ee50ae1b..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.frameworkadmin.equinox</artifactId>
- <version>1.0.200.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherImpl.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherImpl.java
deleted file mode 100644
index 8058023d9..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherImpl.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.LinkedList;
-import java.util.List;
-import org.eclipse.equinox.internal.frameworkadmin.utils.SimpleBundlesState;
-import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.service.log.LogService;
-
-public class EclipseLauncherImpl {
- static String getStringOfCmd(String[] cmdarray) {
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < cmdarray.length; i++) {
- sb.append(cmdarray[i]);
- sb.append(" "); //$NON-NLS-1$
- }
- return sb.toString();
- }
-
- EquinoxFwAdminImpl fwAdmin = null;
-
- EclipseLauncherImpl(EquinoxFwAdminImpl fwAdmin) {
- this.fwAdmin = fwAdmin;
- }
-
- public Process launch(Manipulator manipulator, File cwd) throws IllegalArgumentException, IOException, FrameworkAdminRuntimeException {
- SimpleBundlesState.checkAvailability(fwAdmin);
- Log.log(LogService.LOG_DEBUG, this, "launch(Manipulator , File )", ""); //$NON-NLS-1$ //$NON-NLS-2$
- LauncherData launcherData = manipulator.getLauncherData();
- if (launcherData.getLauncher() == null)
- return launchInMemory(manipulator, cwd);
- return launchByLauncher(manipulator, cwd);
- }
-
- private Process launchByLauncher(Manipulator manipulator, File cwd) throws IOException {
- LauncherData launcherData = manipulator.getLauncherData();
-
- if (launcherData.getLauncher() == null)
- throw new IllegalStateException(Messages.exception_launcherLocationNotSet);
- String[] cmdarray = new String[] {launcherData.getLauncher().getAbsolutePath()};
- if (cwd == null)
- cwd = launcherData.getLauncher().getParentFile();
- Process process = Runtime.getRuntime().exec(cmdarray, null, cwd);
- Log.log(LogService.LOG_DEBUG, "\t" + getStringOfCmd(cmdarray)); //$NON-NLS-1$
- return process;
- }
-
- private Process launchInMemory(Manipulator manipulator, File cwd) throws IOException {
- LauncherData launcherData = manipulator.getLauncherData();
- Utils.checkAbsoluteFile(launcherData.getFwJar(), "fwJar"); //$NON-NLS-1$
- Utils.checkAbsoluteDir(cwd, "cwd"); //$NON-NLS-1$
-
- List cmdList = new LinkedList();
- if (launcherData.getJvm() != null)
- cmdList.add(launcherData.getJvm().getAbsolutePath());
- else
- cmdList.add("java"); //$NON-NLS-1$
-
- if (launcherData.getJvmArgs() != null)
- for (int i = 0; i < launcherData.getJvmArgs().length; i++)
- cmdList.add(launcherData.getJvmArgs()[i]);
-
- cmdList.add("-jar"); //$NON-NLS-1$
- cmdList.add(Utils.getRelativePath(launcherData.getFwJar(), cwd));
-
- EquinoxManipulatorImpl.checkConsistencyOfFwConfigLocAndFwPersistentDataLoc(launcherData);
- cmdList.add(EquinoxConstants.OPTION_CONFIGURATION);
- cmdList.add(Utils.getRelativePath(launcherData.getFwPersistentDataLocation(), cwd));
-
- if (launcherData.isClean())
- cmdList.add(EquinoxConstants.OPTION_CLEAN);
-
- String[] cmdarray = new String[cmdList.size()];
- cmdList.toArray(cmdarray);
- Log.log(LogService.LOG_DEBUG, "In CWD = " + cwd + "\n\t" + getStringOfCmd(cmdarray)); //$NON-NLS-1$ //$NON-NLS-2$
- Process process = Runtime.getRuntime().exec(cmdarray, null, cwd);
- return process;
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java
deleted file mode 100644
index ee006b94d..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
-import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdminRuntimeException;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.service.log.LogService;
-
-public class EclipseLauncherParser {
- private static final String MAC_OS_APP_FOLDER = ".app/Contents/MacOS"; //$NON-NLS-1$
- private static final String CONFIGURATION_FOLDER = "configuration"; //$NON-NLS-1$
-
- //this figures out the location of the data area on partial data read from the <eclipse>.ini
- private URI getOSGiInstallArea(List lines, URI base) {
- File osgiInstallArea = ParserUtils.getOSGiInstallArea(lines, null, base);
- if (osgiInstallArea != null)
- return URIUtil.makeAbsolute(osgiInstallArea.toURI(), base);
- return null;
- }
-
- private void setInstall(List lines, LauncherData launcherData, File launcherFolder) {
- if (launcherData.getFwConfigLocation() == null || launcherData.getFwJar() == null) {
- ParserUtils.removeArgument(EquinoxConstants.OPTION_INSTALL, lines);
- return;
- }
- String launcherString = launcherFolder.getAbsolutePath().replace('\\', '/');
- if (launcherString.endsWith(MAC_OS_APP_FOLDER)) {
- //We can do 3 calls to getParentFile without checking because
- launcherFolder = launcherFolder.getParentFile().getParentFile().getParentFile();
- }
- if (!ParserUtils.fromOSGiJarToOSGiInstallArea(launcherData.getFwJar().getAbsolutePath()).equals(launcherFolder)) {
- ParserUtils.setValueForArgument(EquinoxConstants.OPTION_INSTALL, launcherFolder.getAbsolutePath().replace('\\', '/'), lines);
- }
- }
-
- void read(File launcherConfigFile, LauncherData launcherData) throws IOException {
- if (!launcherConfigFile.exists())
- return;
-
- List lines = FileUtils.loadFile(launcherConfigFile);
-
- URI launcherFolder = launcherData.getLauncher().getParentFile().toURI();
- getStartup(lines, launcherFolder);
- getFrameworkJar(lines, launcherFolder, launcherData);
- URI osgiInstallArea = getOSGiInstallArea(lines, launcherFolder);
- if (osgiInstallArea == null) {
- osgiInstallArea = launcherData.getFwJar() != null ? ParserUtils.fromOSGiJarToOSGiInstallArea(launcherData.getFwJar().getAbsolutePath()).toURI() : launcherFolder;
- }
- URI configArea = getConfigurationLocation(lines, osgiInstallArea, launcherData);
- if (configArea == null)
- throw new FrameworkAdminRuntimeException(Messages.exception_nullConfigArea, ""); //$NON-NLS-1$
- getPersistentDataLocation(lines, osgiInstallArea, configArea, launcherData);
- getLauncherLibrary(lines, launcherFolder);
- getJVMArgs(lines, launcherData);
- getProgramArgs(lines, launcherData);
- getVM(lines, launcherFolder, launcherData);
-
- Log.log(LogService.LOG_INFO, NLS.bind(Messages.log_configFile, launcherConfigFile.getAbsolutePath()));
- }
-
- private void getFrameworkJar(List lines, URI launcherFolder, LauncherData launcherData) {
- File fwJar = launcherData.getFwJar();
- if (fwJar != null)
- return;
- URI location = ParserUtils.getFrameworkJar(lines, launcherFolder);
- if (location != null)
- launcherData.setFwJar(URIUtil.toFile(location));
- }
-
- private void getPersistentDataLocation(List lines, URI osgiInstallArea, URI configArea, LauncherData launcherData) {
- //TODO The setting of the -clean could only do properly once config.ini has been read
- if (launcherData.getFwPersistentDataLocation() == null) {
- launcherData.setFwPersistentDataLocation(URIUtil.toFile(configArea), ParserUtils.isArgumentSet(EquinoxConstants.OPTION_CLEAN, lines));
- }
- }
-
- private void getVM(List lines, URI launcherFolder, LauncherData launcherData) {
- String vm = ParserUtils.getValueForArgument(EquinoxConstants.OPTION_VM, lines);
- if (vm == null)
- return;
-
- URI VMFullPath;
- try {
- VMFullPath = URIUtil.makeAbsolute(FileUtils.fromPath(vm), launcherFolder);
- launcherData.setJvm(URIUtil.toFile(VMFullPath));
- ParserUtils.setValueForArgument(EquinoxConstants.OPTION_VM, VMFullPath.toString(), lines);
- } catch (URISyntaxException e) {
- Log.log(LogService.LOG_ERROR, NLS.bind(Messages.log_failed_make_absolute, vm));
- return;
- }
- }
-
- private void setVM(List lines, File vm, URI launcherFolder) {
- if (vm == null) {
- if (ParserUtils.getValueForArgument(EquinoxConstants.OPTION_VM, lines) != null)
- return;
-
- ParserUtils.removeArgument(EquinoxConstants.OPTION_VM, lines);
- return;
- }
-
- URI vmRelativePath = null;
- if (vm.isAbsolute()) {
- vmRelativePath = launcherFolder.relativize(vm.toURI());
- } else {
- //For relative files, File#toURI will create an absolute URI by resolving against the current working directory, we don't want that
- String path = vm.getPath().replace('\\', '/');
- try {
- vmRelativePath = URIUtil.fromString(path);
- } catch (URISyntaxException e) {
- vmRelativePath = launcherFolder.relativize(vm.toURI());
- }
- }
-
- ParserUtils.setValueForArgument(EquinoxConstants.OPTION_VM, FileUtils.toPath(vmRelativePath).replace('\\', '/'), lines);
- }
-
- private void getJVMArgs(List lines, LauncherData launcherData) {
- ArrayList vmargs = new ArrayList(lines.size());
- boolean foundVmArgs = false;
- for (Iterator iterator = lines.iterator(); iterator.hasNext();) {
- String line = (String) iterator.next();
- if (!foundVmArgs) {
- if (EquinoxConstants.OPTION_VMARGS.equals(line))
- foundVmArgs = true;
- continue;
- }
- vmargs.add(line);
- }
-
- launcherData.setJvmArgs(null);
- launcherData.setJvmArgs((String[]) vmargs.toArray(new String[vmargs.size()]));
- }
-
- private void setJVMArgs(List lines, LauncherData launcherData) {
- ParserUtils.removeArgument(EquinoxConstants.OPTION_VMARGS, lines);
- if (launcherData.getJvmArgs() == null || launcherData.getJvmArgs().length == 0)
- return;
- String[] args = launcherData.getJvmArgs();
- lines.add(EquinoxConstants.OPTION_VMARGS);
- for (int i = 0; i < args.length; i++) {
- lines.add(args[i]);
- }
- }
-
- private void getProgramArgs(List lines, LauncherData launcherData) {
- ArrayList args = new ArrayList(lines.size());
- for (Iterator iterator = lines.iterator(); iterator.hasNext();) {
- String line = (String) iterator.next();
- if (EquinoxConstants.OPTION_VMARGS.equals(line))
- break;
- args.add(line);
- }
- launcherData.setProgramArgs(null);
- launcherData.setProgramArgs((String[]) args.toArray(new String[args.size()]));
- }
-
- private URI getLauncherLibrary(List lines, URI launcherFolder) {
- String launcherLibrary = ParserUtils.getValueForArgument(EquinoxConstants.OPTION_LAUNCHER_LIBRARY, lines);
- if (launcherLibrary == null)
- return null;
- URI result = null;
- try {
- result = URIUtil.makeAbsolute(FileUtils.fromPath(launcherLibrary), launcherFolder);
- ParserUtils.setValueForArgument(EquinoxConstants.OPTION_LAUNCHER_LIBRARY, result.toString(), lines);
- } catch (URISyntaxException e) {
- Log.log(LogService.LOG_ERROR, NLS.bind(Messages.log_failed_make_absolute, launcherLibrary));
- return null;
- }
- return result;
- }
-
- private void setLauncherLibrary(List lines, URI launcherFolder) {
- String launcherLibrary = ParserUtils.getValueForArgument(EquinoxConstants.OPTION_LAUNCHER_LIBRARY, lines);
- if (launcherLibrary == null)
- return;
-
- try {
- URI result = URIUtil.makeRelative(FileUtils.fromPath(launcherLibrary), launcherFolder);
- ParserUtils.setValueForArgument(EquinoxConstants.OPTION_LAUNCHER_LIBRARY, FileUtils.toPath(result).replace('\\', '/'), lines);
- } catch (URISyntaxException e) {
- Log.log(LogService.LOG_ERROR, NLS.bind(Messages.log_failed_make_absolute, launcherLibrary));
- return;
- }
- }
-
- private URI getConfigurationLocation(List lines, URI osgiInstallArea, LauncherData data) {
- String configuration = ParserUtils.getValueForArgument(EquinoxConstants.OPTION_CONFIGURATION, lines);
- if (configuration == null)
- try {
- return URIUtil.makeAbsolute(new URI(CONFIGURATION_FOLDER), osgiInstallArea);
- } catch (URISyntaxException e1) {
- //ignore
- }
-
- URI result = null;
- try {
- result = URIUtil.makeAbsolute(FileUtils.fromPath(configuration), osgiInstallArea);
- ParserUtils.setValueForArgument(EquinoxConstants.OPTION_CONFIGURATION, result.toString(), lines);
- data.setFwConfigLocation(URIUtil.toFile(result));
- } catch (URISyntaxException e) {
- Log.log(LogService.LOG_ERROR, NLS.bind(Messages.log_failed_make_absolute, configuration));
- return null;
- }
- return result;
- }
-
- private void setConfigurationLocation(List lines, URI osgiInstallArea, LauncherData data) {
- String result = FileUtils.toPath(URIUtil.makeRelative(data.getFwConfigLocation().toURI(), osgiInstallArea));
- //We don't write the default
- if (CONFIGURATION_FOLDER.equals(result)) {
- if (ParserUtils.getValueForArgument(EquinoxConstants.OPTION_CONFIGURATION, lines) != null)
- ParserUtils.removeArgument(EquinoxConstants.OPTION_CONFIGURATION, lines);
- return;
- }
-
- if (ParserUtils.getValueForArgument(EquinoxConstants.OPTION_CONFIGURATION, lines) == null) {
- ParserUtils.setValueForArgument(EquinoxConstants.OPTION_CONFIGURATION, result.replace('\\', '/'), lines);
- }
- return;
- }
-
- private URI getStartup(List lines, URI launcherFolder) {
- String startup = ParserUtils.getValueForArgument(EquinoxConstants.OPTION_STARTUP, lines);
- if (startup == null)
- return null;
-
- URI result = null;
- try {
- result = URIUtil.makeAbsolute(FileUtils.fromPath(startup), launcherFolder);
- ParserUtils.setValueForArgument(EquinoxConstants.OPTION_STARTUP, result.toString(), lines);
- } catch (URISyntaxException e) {
- Log.log(LogService.LOG_ERROR, NLS.bind(Messages.log_failed_make_absolute, startup));
- return null;
- }
- return result;
- }
-
- private void setStartup(List lines, URI launcherFolder) {
- String startup = ParserUtils.getValueForArgument(EquinoxConstants.OPTION_STARTUP, lines);
- if (startup == null)
- return;
-
- try {
- URI result = URIUtil.makeRelative(FileUtils.fromPath(startup), launcherFolder);
- ParserUtils.setValueForArgument(EquinoxConstants.OPTION_STARTUP, FileUtils.toPath(result).replace('\\', '/'), lines);
- } catch (URISyntaxException e) {
- Log.log(LogService.LOG_ERROR, NLS.bind(Messages.log_failed_make_relative, startup));
- return;
- }
- }
-
- void save(EquinoxLauncherData launcherData, boolean backup) throws IOException {
- File launcherConfigFile = EquinoxManipulatorImpl.getLauncherConfigLocation(launcherData);
-
- if (launcherConfigFile == null)
- throw new IllegalStateException(Messages.exception_launcherLocationNotSet);
- if (!Utils.createParentDir(launcherConfigFile)) {
- throw new IllegalStateException(Messages.exception_failedToCreateDir);
- }
- //Tweak all the values to make them relative
- File launcherFolder = launcherData.getLauncher().getParentFile();
- List newlines = new ArrayList();
- newlines.addAll(Arrays.asList(launcherData.getProgramArgs()));
-
- setStartup(newlines, launcherFolder.toURI());
- setInstall(newlines, launcherData, launcherFolder);
- //Get the osgi install area
- File osgiInstallArea = ParserUtils.getOSGiInstallArea(newlines, null, launcherData);
- //setInstall(lines, osgiInstallArea, launcherFolder);
- setConfigurationLocation(newlines, osgiInstallArea.toURI(), launcherData);
- setLauncherLibrary(newlines, launcherFolder.toURI());
- // setFrameworkJar(newlines, launcherData.getFwJar());
- setVM(newlines, launcherData.getJvm(), launcherFolder.toURI());
-
- //We are done, let's update the program args in the launcher data
- launcherData.setProgramArgs(null);
- launcherData.setProgramArgs((String[]) newlines.toArray(new String[newlines.size()]));
-
- //append jvm args
- setJVMArgs(newlines, launcherData);
-
- // backup file if exists.
- if (backup)
- if (launcherConfigFile.exists()) {
- File dest = Utils.getSimpleDataFormattedFile(launcherConfigFile);
- if (!launcherConfigFile.renameTo(dest))
- throw new IOException(NLS.bind(Messages.exception_failedToRename, launcherConfigFile, dest));
- Log.log(LogService.LOG_INFO, this, "save()", NLS.bind(Messages.log_renameSuccessful, launcherConfigFile, dest)); //$NON-NLS-1$
- }
-
- //only write the file if we actually have content
- if (newlines.size() > 0) {
- BufferedWriter bw = null;
- try {
- bw = new BufferedWriter(new FileWriter(launcherConfigFile));
- for (int j = 0; j < newlines.size(); j++) {
- String arg = (String) newlines.get(j);
- if (arg == null)
- continue;
- bw.write(arg);
- bw.newLine();
- }
- bw.flush();
- Log.log(LogService.LOG_INFO, NLS.bind(Messages.log_launcherConfigSave, launcherConfigFile));
- } finally {
- if (bw != null)
- bw.close();
- }
- }
- File previousLauncherIni = launcherData.getPreviousLauncherIni();
- if (previousLauncherIni != null && !previousLauncherIni.equals(launcherConfigFile))
- previousLauncherIni.delete();
- launcherData.setLauncherConfigLocation(launcherConfigFile);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java
deleted file mode 100644
index 6142b6dcb..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java
+++ /dev/null
@@ -1,730 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.core.runtime.internal.adaptor.EclipseEnvironmentInfo;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
-import org.eclipse.equinox.internal.frameworkadmin.utils.SimpleBundlesState;
-import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.osgi.framework.internal.core.FrameworkProperties;
-import org.eclipse.osgi.service.resolver.*;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.*;
-import org.osgi.service.log.LogService;
-
-public class EquinoxBundlesState implements BundlesState {
- static final long DEFAULT_TIMESTAMP = 0L;
- private static final boolean DEBUG = false;
- // While we recognize the amd64 architecture, we change
- // this internally to be x86_64.
- private static final String INTERNAL_AMD64 = "amd64"; //$NON-NLS-1$
- private static final String INTERNAL_ARCH_I386 = "i386"; //$NON-NLS-1$
- public static final String[] PROPS = {"osgi.os", "osgi.ws", "osgi.nl", "osgi.arch", Constants.FRAMEWORK_SYSTEMPACKAGES, "osgi.resolverMode", Constants.FRAMEWORK_EXECUTIONENVIRONMENT, "osgi.resolveOptional", "osgi.genericAliases"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
-
- static boolean checkFullySupported() {
- //TODO - This was previously doing a bogus check by attempting to instantiate a particular class - it's not clear what this is trying to do
- return true;
- }
-
- /**
- * eclipse.exe will launch a fw where plugins/org.eclipse.osgi_*.*.*.*.jar
- * is an implementation of fw.
- *
- * @param launcherData
- * @param configData
- * @return File of fwJar to be used.
- */
- static File getFwJar(LauncherData launcherData, ConfigData configData) {
- return getFwJar(launcherData, configData, true);
- //
- // // EclipseLauncherParser launcherParser = new
- // EclipseLauncherParser(launcherData);
- // // launcherParser.read();
- // if (launcherData.getFwJar() != null)
- // return launcherData.getFwJar();
- //
- // // check -D arguments of jvmArgs ?
- // String[] jvmArgs = launcherData.getJvmArgs();
- // String location = null;
- // for (int i = 0; i < jvmArgs.length; i++) {
- // if (jvmArgs[i].endsWith("-D" + "osgi.framework=")) {
- // location = jvmArgs[i].substring(("-D" + "osgi.framework=").length());
- // }
- // }
- // if (location != null)
- // return new File(location);
- //
- // File ret = getSystemBundleFromBundleInfos(launcherData, configData);
- // if (ret != null)
- // return ret;
- // return getSystemBundleBySearching(launcherData);
- }
-
- private static File getFwJar(LauncherData launcherData, ConfigData configData, boolean checkBundleInfos) {
- if (launcherData.getFwJar() != null) {
- return launcherData.getFwJar();
- }
-
- // check -D arguments of jvmArgs ?
- String[] jvmArgs = launcherData.getJvmArgs();
- String location = null;
- for (int i = 0; i < jvmArgs.length; i++) {
- if (jvmArgs[i].endsWith("-D" + "osgi.framework=")) { //$NON-NLS-1$ //$NON-NLS-2$
- location = jvmArgs[i].substring(("-D" + "osgi.framework=").length()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- if (location != null) {
- return new File(location);
- }
-
- if (checkBundleInfos) {
- File ret = getSystemBundleFromBundleInfos(configData);
- if (ret != null) {
- return ret;
- }
- }
- return null;
- // return getSystemBundleBySearching(launcherData);
- }
-
- private static long getMaxId(State state) {
- BundleDescription[] bundleDescriptions = state.getBundles();
- long maxId = DEFAULT_TIMESTAMP;
- for (int i = 0; i < bundleDescriptions.length; i++)
- if (maxId < bundleDescriptions[i].getBundleId()) {
- maxId = bundleDescriptions[i].getBundleId();
- }
- return maxId;
- }
-
- private static File getSystemBundleFromBundleInfos(BundleInfo[] bundleInfos) {
- for (int i = 0; i < bundleInfos.length; i++) {
- File match = isSystemBundle(bundleInfos[i]);
- if (match != null)
- return match;
- }
- return null;
- }
-
- protected static File getSystemBundleFromBundleInfos(ConfigData configData) {
- BundleInfo[] bundleInfos = configData.getBundles();
- return getSystemBundleFromBundleInfos(bundleInfos);
- }
-
- static long getTimeStamp(File fwPersistentDataLocation) {
- if (fwPersistentDataLocation == null)
- return DEFAULT_TIMESTAMP;
-
- File file = new File(fwPersistentDataLocation, EquinoxConstants.PERSISTENT_DIR_NAME);
- if (!file.exists() || !file.isDirectory())
- return DEFAULT_TIMESTAMP;
- long ret = file.lastModified();
- File[] lists = file.listFiles();
- if (lists == null)
- return ret;
- for (int i = 0; i < lists.length; i++)
- if (ret < lists[i].lastModified())
- ret = lists[i].lastModified();
- return ret;
- }
-
- public static File isSystemBundle(BundleInfo bundleInfo) {
- if (bundleInfo == null || bundleInfo.getLocation() == null)
- return null;
- URI bundleLocation = bundleInfo.getLocation();
- try {
- String[] clauses = Utils.getClausesManifestMainAttributes(bundleLocation, Constants.BUNDLE_SYMBOLICNAME);
- if (bundleLocation.getPath().indexOf(EquinoxConstants.FW_SYMBOLIC_NAME) > 0)
- if (EquinoxConstants.PERSISTENT_DIR_NAME.equals(Utils.getPathFromClause(clauses[0])))
- return new File(bundleLocation);
- } catch (RuntimeException e) {
- e.printStackTrace();
- }
- return null;
- }
-
- // "osgi.os", "osgi.ws", "osgi.nl", "osgi.arch",
- // Constants.FRAMEWORK_SYSTEMPACKAGES, "osgi.resolverMode",
- // Constants.FRAMEWORK_EXECUTIONENVIRONMENT, "osgi.resolveOptional"
- static Properties setDefaultPlatformProperties() {
- Properties platformProperties = new Properties();
- // set default value
-
- String nl = Locale.getDefault().toString();
- platformProperties.setProperty("osgi.nl", nl); //$NON-NLS-1$
-
- // TODO remove EclipseEnvironmentInfo
- String os = EclipseEnvironmentInfo.guessOS(System.getProperty("os.name"));//$NON-NLS-1$);
- platformProperties.setProperty("osgi.os", os); //$NON-NLS-1$
-
- String ws = EclipseEnvironmentInfo.guessWS(os);
- platformProperties.setProperty("osgi.ws", ws); //$NON-NLS-1$
-
- // if the user didn't set the system architecture with a command line
- // argument then use the default.
- String arch = null;
- String name = FrameworkProperties.getProperty("os.arch");//$NON-NLS-1$
- // Map i386 architecture to x86
- if (name.equalsIgnoreCase(INTERNAL_ARCH_I386))
- arch = org.eclipse.osgi.service.environment.Constants.ARCH_X86;
- // Map amd64 architecture to x86_64
- else if (name.equalsIgnoreCase(INTERNAL_AMD64))
- arch = org.eclipse.osgi.service.environment.Constants.ARCH_X86_64;
- else
- arch = name;
- platformProperties.setProperty("osgi.arch", arch); //$NON-NLS-1$
-
- platformProperties.setProperty(Constants.FRAMEWORK_SYSTEMPACKAGES, FrameworkProperties.getProperty(Constants.FRAMEWORK_SYSTEMPACKAGES));
- platformProperties.setProperty(Constants.FRAMEWORK_EXECUTIONENVIRONMENT, FrameworkProperties.getProperty(Constants.FRAMEWORK_EXECUTIONENVIRONMENT));
- platformProperties.setProperty("osgi.resolveOptional", "" + "true".equals(FrameworkProperties.getProperty("osgi.resolveOptional"))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- return platformProperties;
- }
-
- EquinoxFwAdminImpl fwAdmin = null;
- BundleContext context;
- Manipulator manipulator = null;
- Properties platfromProperties = new Properties();
- long maxId = DEFAULT_TIMESTAMP;
- StateObjectFactory soFactory = null;
- State state = null;
-
- /**
- * Map of String->BundleDescription, where the key is the bundle location.
- */
- private HashMap locationStateIndex = new HashMap();
-
- /**
- * Map of String->BundleDescription, where the key is the bundle name
- * and version as defined by the {@link #getKey(BundleDescription)} method.
- */
- private HashMap nameVersionStateIndex = new HashMap();
- private final PlatformAdmin platformAdmin;
-
- /**
- * If useFwPersistentData flag equals false, this constructor will not take
- * a framework persistent data into account. Otherwise, it will.
- *
- * @param context
- * @param fwAdmin
- * @param manipulator
- * @param useFwPersistentData
- */
- EquinoxBundlesState(BundleContext context, EquinoxFwAdminImpl fwAdmin, Manipulator manipulator, PlatformAdmin admin, boolean useFwPersistentData) {
- this.context = context;
- this.fwAdmin = fwAdmin;
- this.platformAdmin = admin;
- // copy manipulator object for avoiding modifying the parameters of the
- // manipulator.
- this.manipulator = fwAdmin.getManipulator();
- this.manipulator.setConfigData(manipulator.getConfigData());
- this.manipulator.setLauncherData(manipulator.getLauncherData());
- initialize(useFwPersistentData);
- }
-
- /**
- * This constructor does NOT take a framework persistent data into account.
- * It will create State object based on the specified platformProperties.
- *
- * @param context
- * @param fwAdmin
- * @param manipulator
- * @param platformProperties
- */
- EquinoxBundlesState(BundleContext context, EquinoxFwAdminImpl fwAdmin, Manipulator manipulator, PlatformAdmin admin, Properties platformProperties) {
- super();
- this.context = context;
- this.fwAdmin = fwAdmin;
- this.platformAdmin = admin;
- // copy manipulator object for avoiding modifying the parameters of the
- // manipulator.
- this.manipulator = fwAdmin.getManipulator();
- this.manipulator.setConfigData(manipulator.getConfigData());
- this.manipulator.setLauncherData(manipulator.getLauncherData());
- LauncherData launcherData = manipulator.getLauncherData();
- ConfigData configData = manipulator.getConfigData();
- BundleInfo[] bInfos = configData.getBundles();
- this.composeNewState(launcherData, configData, platformProperties, bInfos);
- }
-
- /**
- * compose new state without reading framework persistent data. The
- * configData.getFwDependentProps() is used for the composition.
- *
- * @param launcherData
- * @param configData
- * @param bInfos
- */
- private void composeNewState(LauncherData launcherData, ConfigData configData, BundleInfo[] bInfos) {
- this.composeNewState(launcherData, configData, configData.getProperties(), bInfos);
- }
-
- /**
- * compose new state without reading framework persistent data. The given
- * properties is used for the composition. If system bundle is not included
- * in the given bInfos, the fw jar launcherData contains will be used.
- *
- * @param launcherData
- * @param configData
- * @param properties
- * @param bInfos
- */
- private void composeNewState(LauncherData launcherData, ConfigData configData, Properties properties, BundleInfo[] bInfos) {
- //Note, there use to be a lot more code in this method
- File fwJar = getSystemBundleFromBundleInfos(configData);
- launcherData.setFwJar(fwJar);
- this.setFwJar(fwJar);
- composeState(configData.getBundles(), properties, null);
- resolve(true);
- }
-
- /**
- * compose state. If it cannot compose it by somehow, false is returned.
- *
- * @param bInfos
- * @param props
- * @param fwPersistentDataLocation
- * @return if it cannot compose it by somehow, false is returned.
- * @throws IllegalArgumentException
- * @throws FrameworkAdminRuntimeException
- */
- private boolean composeState(BundleInfo[] bInfos, Dictionary props, File fwPersistentDataLocation) throws IllegalArgumentException, FrameworkAdminRuntimeException {
- BundleInfo[] infos = manipulator.getConfigData().getBundles();
- this.manipulator.getConfigData().setBundles(null);
- SimpleBundlesState.checkAvailability(fwAdmin);
- this.setStateObjectFactory();
- state = null;
- boolean flagNewState = false;
- if (fwPersistentDataLocation != null) {
- //NOTE Here there was a big chunk of code reading the framework state persisted on disk
- // and I removed it because it was causing various problems. See in previous revision
- this.manipulator.getConfigData().setBundles(infos);
- return false;
- }
- state = soFactory.createState(true);
- createStateIndexes();
- flagNewState = true;
- if (props == null) {
- this.manipulator.getConfigData().setBundles(infos);
- return false;
- }
- setPlatformPropertiesToState(props);
- setPlatformProperties(state);
-
- try {
- maxId = state.getHighestBundleId();
- } catch (NoSuchMethodError e) {
- maxId = getMaxId(state);
- }
- if (DEBUG) {
- System.out.println(""); //$NON-NLS-1$
- Log.log(LogService.LOG_DEBUG, this, "composeExpectedState()", "installBundle():"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (flagNewState) {
- int indexSystemBundle = -1;
- for (int j = 0; j < bInfos.length; j++)
- if (isSystemBundle(bInfos[j]) != null) {
- indexSystemBundle = j;
- break;
- }
-
- if (indexSystemBundle > 0) {
- BundleInfo[] newBundleInfos = new BundleInfo[bInfos.length];
- newBundleInfos[0] = bInfos[indexSystemBundle];
- System.arraycopy(bInfos, 0, newBundleInfos, 1, indexSystemBundle);
- if (indexSystemBundle < bInfos.length - 1)
- System.arraycopy(bInfos, indexSystemBundle + 1, newBundleInfos, indexSystemBundle + 1, bInfos.length - indexSystemBundle - 1);
- bInfos = newBundleInfos;
- }
- }
- for (int j = 0; j < bInfos.length; j++) {
- if (DEBUG)
- Log.log(LogService.LOG_DEBUG, this, "composeExpectedState()", "bInfos[" + j + "]=" + bInfos[j]); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- try {
- this.installBundle(bInfos[j]);
- // System.out.println("install bInfos[" + j + "]=" + bInfos[j]);
- } catch (RuntimeException e) {
- //catch the exception and continue
- Log.log(LogService.LOG_ERROR, this, "composeExpectedState()", "BundleInfo:" + bInfos[j], e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- return true;
- }
-
- private BundleInfo convertSystemBundle(BundleDescription toConvert) {
- // Converting the System Bundle
- boolean markedAsStarted = false;
- int sl = BundleInfo.NO_LEVEL;
-
- URI location = null;
- String symbolicNameTarget = toConvert.getSymbolicName();
- Version versionTarget = toConvert.getVersion();
- try {
- File fwJar = manipulator.getLauncherData().getFwJar();
- if (fwJar != null) {
- URI fwJarLocation = fwJar.toURI();
- String[] clauses = Utils.getClausesManifestMainAttributes(fwJarLocation, Constants.BUNDLE_SYMBOLICNAME);
- String fwJarSymbolicName = Utils.getPathFromClause(clauses[0]);
- String fwJarVersionSt = Utils.getManifestMainAttributes(fwJarLocation, Constants.BUNDLE_VERSION);
- if (fwJarSymbolicName.equals(symbolicNameTarget) && fwJarVersionSt.equals(versionTarget.toString())) {
- location = fwJarLocation;
- markedAsStarted = true;
- }
- }
- } catch (FrameworkAdminRuntimeException e1) {
- Log.log(LogService.LOG_ERROR, "", e1); //$NON-NLS-1$
- }
- return createBundleInfo(toConvert, markedAsStarted, sl, location, null);
- }
-
- private BundleInfo createBundleInfo(BundleDescription toConvert, boolean markedAsStarted, int sl, URI location, String fragmentHost) {
- BundleInfo result = new BundleInfo();
- result.setSymbolicName(toConvert.getSymbolicName());
- result.setVersion(toConvert.getVersion().toString());
- result.setLocation(location);
- result.setResolved(toConvert.isResolved());
- result.setMarkedAsStarted(markedAsStarted);
- result.setStartLevel(sl);
- result.setBundleId(toConvert.getBundleId());
- result.setFragmentHost(fragmentHost);
- return result;
- }
-
- public BundleInfo[] convertState(BundleDescription[] bundles) {
- BundleInfo[] originalBInfos = manipulator.getConfigData().getBundles();
- Map bundleInfoMap = new HashMap();
- for (int i = 0; i < originalBInfos.length; i++) {
- bundleInfoMap.put(originalBInfos[i].getLocation(), originalBInfos[i]);
- }
-
- BundleInfo[] result = new BundleInfo[bundles.length];
- for (int i = 0; i < bundles.length; i++) {
- if (bundles[i].getBundleId() == 0 && EquinoxConstants.FW_SYMBOLIC_NAME.equals(bundles[i].getSymbolicName())) {
- result[i] = convertSystemBundle(bundles[i]);
- continue;
- }
-
- boolean markedAsStarted = false;
- int sl = BundleInfo.NO_LEVEL;
-
- //URI location = FileUtils.getEclipseRealLocation(manipulator, bundles[i].getLocation());
- //TODO: I believe this is always an absolute URI
- URI location;
- try {
- location = new URI(bundles[i].getLocation());
- } catch (URISyntaxException e) {
- e.printStackTrace();
- throw new IllegalStateException("BundleDescription conversion problem" + e.getMessage()); //$NON-NLS-1$ //TODO path_fun
- }
- String fragmentHost = null;
- BundleInfo original = (BundleInfo) bundleInfoMap.get(location);
- if (original != null) {
- markedAsStarted = original.isMarkedAsStarted();
- sl = getStartLevel(original.getStartLevel());
- fragmentHost = original.getFragmentHost();
- }
- result[i] = createBundleInfo(bundles[i], markedAsStarted, sl, location, fragmentHost);
- }
- return result;
- }
-
- public BundleInfo[] getExpectedState() throws FrameworkAdminRuntimeException {
- SimpleBundlesState.checkAvailability(fwAdmin);
- return convertState(state.getBundles());
- }
-
- Properties getPlatformProperties() {
- return platfromProperties;
- }
-
- public BundleInfo[] getPrerequisteBundles(BundleInfo bInfo) {
- Set set = new HashSet();
- URI realLocation = bInfo.getLocation();
- BundleDescription bundle = getBundleByLocation(realLocation);
- ImportPackageSpecification[] imports = bundle.getImportPackages();
- for (int i = 0; i < imports.length; i++) {
- BaseDescription supplier = imports[i].getSupplier();
- if (supplier == null) {
- if (!imports[i].getDirective(Constants.RESOLUTION_DIRECTIVE).equals(ImportPackageSpecification.RESOLUTION_OPTIONAL))
- throw new IllegalStateException("Internal error: import supplier should not be null"); //$NON-NLS-1$
- } else
- set.add(supplier.getSupplier());
- }
- BundleDescription[] requires = bundle.getResolvedRequires();
- for (int i = 0; i < requires.length; i++) {
- set.add(requires[i]);
- }
- BundleDescription[] bundles = new BundleDescription[set.size()];
- set.toArray(bundles);
- return convertState(bundles);
- }
-
- private int getStartLevel(int startLevel) {
- return (startLevel == BundleInfo.NO_LEVEL ? manipulator.getConfigData().getInitialBundleStartLevel() : startLevel);
- }
-
- public BundleInfo getSystemBundle() {
- BundleDescription bundle = this.getSystemBundleDescription();
- return (bundle != null ? convertSystemBundle(bundle) : null);
- }
-
- private BundleDescription getSystemBundleDescription() {
- BundleDescription bundle = state.getBundle(0);
- if (bundle == null || bundle.getHost() != null) { // null or a
- // fragment bundle.
- return null;
- }
- return (EquinoxConstants.FW_SYMBOLIC_NAME.equals(bundle.getSymbolicName()) ? bundle : null);
- }
-
- public BundleInfo[] getSystemFragmentedBundles() {
- BundleDescription bundle = this.getSystemBundleDescription();
- if (bundle == null)
- return null;
- return convertState(bundle.getFragments());
- }
-
- public String[] getUnsatisfiedConstraints(BundleInfo bInfo) {
- URI realLocation = bInfo.getLocation();
- BundleDescription description = getBundleByLocation(realLocation);
- StateHelper helper = platformAdmin.getStateHelper();
- VersionConstraint[] constraints = helper.getUnsatisfiedConstraints(description);
- String[] ret = new String[constraints.length];
- for (int i = 0; i < constraints.length; i++)
- ret[i] = constraints[i].toString();
- return ret;
- }
-
- private void initialize(boolean useFwPersistentData) {
- LauncherData launcherData = manipulator.getLauncherData();
- ConfigData configData = manipulator.getConfigData();
- BundleInfo[] bInfos = configData.getBundles();
-
- if (!useFwPersistentData) {
- composeNewState(launcherData, configData, bInfos);
- return;
- }
-
- EquinoxManipulatorImpl.checkConsistencyOfFwConfigLocAndFwPersistentDataLoc(launcherData);
- if (launcherData.isClean()) {
- composeNewState(launcherData, configData, bInfos);
- } else {
- if (manipulator.getLauncherData().getFwPersistentDataLocation() == null) {
- File installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(launcherData.getProgramArgs()), configData.getProperties(), launcherData);
- if (DEBUG)
- Log.log(LogService.LOG_DEBUG, this, "initialize(useFwPersistentDat)", "installArea=" + installArea); //$NON-NLS-1$ //$NON-NLS-2$
- if (installArea == null)
- throw new IllegalStateException(Messages.exception_noInstallArea);
- File fwPersistentDataLocation = new File(installArea, "configuration"); //$NON-NLS-1$
- manipulator.getLauncherData().setFwPersistentDataLocation(fwPersistentDataLocation, false);
- }
- if (!composeState(bInfos, null, manipulator.getLauncherData().getFwPersistentDataLocation()))
- composeNewState(launcherData, configData, bInfos);
- resolve(true);
- }
- }
-
- public void installBundle(BundleInfo bInfo) throws FrameworkAdminRuntimeException {
- SimpleBundlesState.checkAvailability(fwAdmin);
-
- URI realLocation = bInfo.getLocation();
- if (getBundleByLocation(realLocation) != null)
- return;
-
- Dictionary manifest = Utils.getOSGiManifest(realLocation);
- if (manifest == null)
- return;
-
- String newSymbolicName = (String) manifest.get(Constants.BUNDLE_SYMBOLICNAME);
- int position = newSymbolicName.indexOf(";"); //$NON-NLS-1$
- if (position >= 0)
- newSymbolicName = newSymbolicName.substring(0, position).trim();
- String newVersion = (String) manifest.get(Constants.BUNDLE_VERSION);
-
- if (getBundleByNameVersion(newSymbolicName, newVersion) != null)
- return;
-
- try {
- bInfo.setBundleId(++maxId);
- BundleDescription newBundleDescription = soFactory.createBundleDescription(state, manifest, realLocation.toString(), bInfo.getBundleId());
- addBundleToState(newBundleDescription);
- manipulator.getConfigData().addBundle(bInfo);
- } catch (BundleException e) {
- Log.log(LogService.LOG_WARNING, this, "installBundle(BundleInfo)", e); //$NON-NLS-1$
- }
- }
-
- public boolean isFullySupported() {
- return true;
- }
-
- public boolean isResolved() {
- return state.isResolved();
- }
-
- public boolean isResolved(BundleInfo bInfo) {
- URI realLocation = bInfo.getLocation();
- BundleDescription description = getBundleByLocation(realLocation);
- if (description == null)
- return false;
- return description.isResolved();
- }
-
- public void resolve(boolean increment) {
- state.resolve(increment);
- }
-
- void setFwJar(File fwJar) {
- manipulator.getLauncherData().setFwJar(fwJar);
- }
-
- /**
- * get platforme properties from the given state.
- *
- * @param state
- */
- private void setPlatformProperties(State state) {
- Dictionary platformProperties = state.getPlatformProperties()[0];
- platfromProperties.clear();
- if (platformProperties != null) {
- for (Enumeration enumeration = platformProperties.keys(); enumeration.hasMoreElements();) {
- String key = (String) enumeration.nextElement();
- Object value = platformProperties.get(key);
- platfromProperties.setProperty(key, (String) value);
- }
- }
- if (DEBUG)
- Utils.printoutProperties(System.out, "PlatformProperties[0]", platfromProperties); //$NON-NLS-1$
- }
-
- /**
- * set platfromProperties required to compose state object into
- * platformProperties of this state.
- *
- * @param props
- */
- private void setPlatformPropertiesToState(Dictionary props) {
- Properties platformProperties = setDefaultPlatformProperties();
-
- for (Enumeration enumeration = props.keys(); enumeration.hasMoreElements();) {
- String key = (String) enumeration.nextElement();
- for (int i = 0; i < PROPS.length; i++) {
- if (key.equals(PROPS[i])) {
- platformProperties.put(key, props.get(key));
- break;
- }
- }
- }
- state.setPlatformProperties(platformProperties);
- }
-
- private void setStateObjectFactory() {
- if (soFactory == null)
- soFactory = platformAdmin.getFactory();
- }
-
- public String toString() {
- if (state == null)
- return null;
- StringBuffer sb = new StringBuffer();
- BundleDescription[] bundleDescriptions = state.getBundles();
- for (int i = 0; i < bundleDescriptions.length; i++) {
- sb.append(bundleDescriptions[i].getBundleId() + ":"); //$NON-NLS-1$
- sb.append(bundleDescriptions[i].toString() + "("); //$NON-NLS-1$
- sb.append(bundleDescriptions[i].isResolved() + ")"); //$NON-NLS-1$
- String[] ees = bundleDescriptions[i].getExecutionEnvironments();
- for (int j = 0; j < ees.length; j++)
- sb.append(ees[j] + " "); //$NON-NLS-1$
- sb.append("\n"); //$NON-NLS-1$
- }
- sb.append("PlatformProperties:\n"); //$NON-NLS-1$
- Dictionary[] dics = state.getPlatformProperties();
- for (int i = 0; i < dics.length; i++) {
- for (Enumeration enumeration = dics[i].keys(); enumeration.hasMoreElements();) {
- String key = (String) enumeration.nextElement();
- String value = (String) dics[i].get(key);
- sb.append(" (" + key + "," + value + ")\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
- sb.append("\n"); //$NON-NLS-1$
- return sb.toString();
- }
-
- public void uninstallBundle(BundleInfo bInfo) throws FrameworkAdminRuntimeException {
- SimpleBundlesState.checkAvailability(fwAdmin);
- long id = DEFAULT_TIMESTAMP;
- URI realLocation = bInfo.getLocation();
- BundleDescription bundle = getBundleByLocation(bInfo.getLocation());
- if (bundle != null)
- id = bundle.getBundleId();
-
- if (id != DEFAULT_TIMESTAMP) {
- try {
- Dictionary manifest = Utils.getOSGiManifest(bInfo.getLocation());
- if (manifest == null) {
- Log.log(LogService.LOG_WARNING, this, "uninstallBundle(BundleInfo)", NLS.bind(Messages.exception_bundleManifest, bInfo.getLocation())); //$NON-NLS-1$
- return;
- }
- BundleDescription bundleDescription = soFactory.createBundleDescription(state, manifest, realLocation.toString(), id);
- removeBundleFromState(bundleDescription);
- manipulator.getConfigData().removeBundle(bInfo);
- } catch (BundleException e) {
- Log.log(LogService.LOG_WARNING, this, "uninstallBundle(BundleInfo)", e); //$NON-NLS-1$
- }
- }
- }
-
- private BundleDescription getBundleByLocation(URI location) {
- if (location == null)
- return null;
- return (BundleDescription) locationStateIndex.get(location);
- }
-
- private BundleDescription getBundleByNameVersion(String bundleSymbolicName, String bundleVersion) {
- return (BundleDescription) nameVersionStateIndex.get(bundleSymbolicName + ";" + bundleVersion); //$NON-NLS-1$
- }
-
- /**
- * Returns a key for a bundle description containing the bundle name and version,
- * for use in the name/version state index map.
- */
- private String getKey(BundleDescription bundle) {
- return bundle.getSymbolicName() + ';' + bundle.getVersion();
- }
-
- private void createStateIndexes() {
- BundleDescription[] currentInstalledBundles = state.getBundles();
- for (int i = 0; i < currentInstalledBundles.length; i++) {
- URI location = FileUtils.getRealLocation(manipulator, currentInstalledBundles[i].getLocation());
- locationStateIndex.put(location, currentInstalledBundles[i]);
- nameVersionStateIndex.put(getKey(currentInstalledBundles[i]), currentInstalledBundles[i]);
- }
- }
-
- private void addBundleToState(BundleDescription bundleDescription) {
- state.addBundle(bundleDescription);
- URI location = FileUtils.getRealLocation(manipulator, bundleDescription.getLocation());
- locationStateIndex.put(location, bundleDescription);
- nameVersionStateIndex.put(getKey(bundleDescription), bundleDescription);
- }
-
- private void removeBundleFromState(BundleDescription bundleDescription) {
- URI location = FileUtils.getRealLocation(manipulator, bundleDescription.getLocation());
- locationStateIndex.remove(location);
- nameVersionStateIndex.remove(getKey(bundleDescription));
- state.removeBundle(bundleDescription);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxConstants.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxConstants.java
deleted file mode 100644
index d9623ab4b..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxConstants.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-public class EquinoxConstants {
-
- /**
- * If BundleContext#getProperty(PROP_KEY_USE_REFERENCE) does not equal "false",
- * Manipulator#save() will add "reference:" to any bundle location specified osgi.bundles in order to avoid
- * caching its bundle jar. Otherwise, it will add nothing to any bundle location.
- */
- public static final String PROP_KEY_USE_REFERENCE = "org.eclipse.equinox.frameworkadmin.equinox.useReference"; //$NON-NLS-1$
-
- public static final String PLUGINS_DIR = "plugins"; //$NON-NLS-1$
- public final static String FW_SYMBOLIC_NAME = "org.eclipse.osgi"; //$NON-NLS-1$
- public static final String DEFAULT_CONFIGURATION = "configuration"; //$NON-NLS-1$
- public static final String CONFIG_INI = "config.ini"; //$NON-NLS-1$
-
- public final static String FW_VERSION = "3.3"; //$NON-NLS-1$
- public final static String FW_NAME = "Equinox"; //$NON-NLS-1$
- public final static String LAUNCHER_VERSION = "3.2"; //$NON-NLS-1$
- public final static String LAUNCHER_NAME = "Eclipse.exe"; //$NON-NLS-1$
-
- public static final String OPTION_CONFIGURATION = "-configuration"; //$NON-NLS-1$
- public static final String OPTION_FW = "-framework"; //$NON-NLS-1$
- public static final String OPTION_VM = "-vm"; //$NON-NLS-1$
- public static final String OPTION_VMARGS = "-vmargs"; //$NON-NLS-1$
- public static final String OPTION_CLEAN = "-clean"; //$NON-NLS-1$
- public static final String OPTION_STARTUP = "-startup"; //$NON-NLS-1$
- public static final String OPTION_INSTALL = "-install"; //$NON-NLS-1$
- public static final String OPTION_LAUNCHER_LIBRARY = "--launcher.library"; //$NON-NLS-1$
-
- // System properties
- public static final String PROP_BUNDLES = "osgi.bundles"; //$NON-NLS-1$
- public static final String PROP_BUNDLES_STARTLEVEL = "osgi.bundles.defaultStartLevel"; //$NON-NLS-1$ //The start level used to install the bundles
- public static final String PROP_INITIAL_STARTLEVEL = "osgi.startLevel"; //$NON-NLS-1$ //The start level when the fwl start
- public static final String PROP_INSTALL = "osgi.install"; //$NON-NLS-1$
- public static final String PROP_ECLIPSE_COMMANDS = "eclipse.commands"; //$NON-NLS-1$
- public static final String PROP_FW_EXTENSIONS = "osgi.framework.extensions"; //$NON-NLS-1$
- public static final String PROP_OSGI_FW = "osgi.framework"; //$NON-NLS-1$
- public static final String PROP_OSGI_SYSPATH = "osgi.syspath"; //$NON-NLS-1$
- public static final String PROP_LAUNCHER_PATH = "osgi.launcherPath"; //$NON-NLS-1$
- public static final String PROP_LAUNCHER_NAME = "osgi.launcherIni"; //$NON-NLS-1$
- public static final String PROP_SHARED_CONFIGURATION_AREA = "osgi.sharedConfiguration.area"; //$NON-NLS-1$
-
- public static final String INI_EXTENSION = ".ini"; //$NON-NLS-1$
- public static final String EXE_EXTENSION = ".exe"; //$NON-NLS-1$
-
- public static final String PROP_EQUINOX_DEPENDENT_PREFIX = "osgi."; //$NON-NLS-1$
- static final String REFERENCE = "reference:"; //$NON-NLS-1$
- public static final String PERSISTENT_DIR_NAME = "org.eclipse.osgi"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFrameworkAdminFactoryImpl.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFrameworkAdminFactoryImpl.java
deleted file mode 100644
index 72989059b..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFrameworkAdminFactoryImpl.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulatorFactory;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdminFactory;
-
-public class EquinoxFrameworkAdminFactoryImpl extends FrameworkAdminFactory {
- public FrameworkAdmin createFrameworkAdmin() throws InstantiationException, IllegalAccessException, ClassNotFoundException {
- String className = System.getProperty(ConfiguratorManipulatorFactory.SYSTEM_PROPERTY_KEY);
- if (className == null)
- return new EquinoxFwAdminImpl();
- return new EquinoxFwAdminImpl(className);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwAdminImpl.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwAdminImpl.java
deleted file mode 100644
index 39d29374c..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwAdminImpl.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Dictionary;
-import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
-import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulatorFactory;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.osgi.service.resolver.PlatformAdmin;
-import org.osgi.framework.*;
-import org.osgi.service.startlevel.StartLevel;
-
-public class EquinoxFwAdminImpl implements FrameworkAdmin {
-
- boolean active = false;
-
- private ConfiguratorManipulator configuratorManipulator = null;
-
- BundleContext context = null;
-
- private boolean runningFw = false;
-
- private PlatformAdmin platformAdmin;
- private StartLevel startLevelService;
-
- public EquinoxFwAdminImpl() {
- this(null, false);
- }
-
- // private String configuratorManipulatorFactoryName = null;
-
- EquinoxFwAdminImpl(BundleContext context) {
- this(context, false);
- }
-
- EquinoxFwAdminImpl(BundleContext context, boolean runningFw) {
- this.context = context;
- this.active = true;
- this.runningFw = runningFw;
- }
-
- EquinoxFwAdminImpl(String configuratorManipulatorFactoryName) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
- this.context = null;
- this.active = true;
- this.runningFw = false;
- // this.configuratorManipulatorFactoryName = configuratorManipulatorFactoryName;
- loadConfiguratorManipulator(configuratorManipulatorFactoryName);
- }
-
- /**
- * DS component activator
- * @param aContext The bundle context
- */
- public void activate(BundleContext aContext) {
- this.context = aContext;
- this.runningFw = isRunningFw();
- Log.init(aContext);
- }
-
- void deactivate() {
- active = false;
- Log.dispose();
- }
-
- public ConfiguratorManipulator getConfiguratorManipulator() {
- return configuratorManipulator;
- }
-
- public Manipulator getManipulator() {
- return new EquinoxManipulatorImpl(context, this, platformAdmin, startLevelService, false);
- }
-
- public Manipulator getRunningManipulator() {
- if (!this.runningFw)
- return null;
- return new EquinoxManipulatorImpl(context, this, platformAdmin, startLevelService, true);
- }
-
- public boolean isActive() {
- return active;
- }
-
- /**
- * If both the vendor and the Bundle-Version in the manifest match,
- * return true. Otherwise false.
- *
- * @return flag true if the ManipulatorAdmin object can handle currently running fw launch.
- */
- boolean isRunningFw() {
- //TODO implementation for Eclipse.exe and for Equinox
- String fwVendor = context.getProperty(Constants.FRAMEWORK_VENDOR);
- if (!"Eclipse".equals(fwVendor)) //$NON-NLS-1$
- return false;
- //TODO decide if this version can be supported by this bundle.
- Dictionary header = context.getBundle(0).getHeaders();
- String versionSt = (String) header.get(Constants.BUNDLE_VERSION);
- Version version = new Version(versionSt);
- int value = version.compareTo(new Version(EquinoxConstants.FW_VERSION));
- if (value > 0) {
- return true;
- }
- // TODO need to identify the version of eclipse.exe used for this launch, if used.
- return false;
- }
-
- public Process launch(Manipulator manipulator, File cwd) throws IllegalArgumentException, FrameworkAdminRuntimeException, IOException {
- //return new EclipseLauncherImpl(context, this).launch(manipulator, cwd);
- return new EclipseLauncherImpl(this).launch(manipulator, cwd);
- }
-
- private void loadConfiguratorManipulator(String configuratorManipulatorFactoryName) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
- if (configuratorManipulatorFactoryName == null)
- this.configuratorManipulator = null;
- else
- this.configuratorManipulator = ConfiguratorManipulatorFactory.getInstance(configuratorManipulatorFactoryName);
- return;
- }
-
- public void setPlatformAdmin(PlatformAdmin admin) {
- this.platformAdmin = admin;
- }
-
- public void setStartLevel(StartLevel sl) {
- this.startLevelService = sl;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java
deleted file mode 100644
index cd6735c59..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java
+++ /dev/null
@@ -1,582 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
-import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
-import org.osgi.service.log.LogService;
-
-public class EquinoxFwConfigFileParser {
- private static final Set KNOWN_PROPERTIES = new HashSet(Arrays.asList(new String[] {EquinoxConstants.PROP_BUNDLES, EquinoxConstants.PROP_FW_EXTENSIONS, EquinoxConstants.PROP_INITIAL_STARTLEVEL, EquinoxConstants.PROP_BUNDLES_STARTLEVEL}));
- private static final String CONFIG_DIR = "@config.dir/"; //$NON-NLS-1$
- private static final String KEY_ECLIPSE_PROV_DATA_AREA = "eclipse.p2.data.area"; //$NON-NLS-1$
- private static final String KEY_ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL = "org.eclipse.equinox.simpleconfigurator.configUrl"; //$NON-NLS-1$
- private static final String REFERENCE_SCHEME = "reference:"; //$NON-NLS-1$
- private static final String FILE_PROTOCOL = "file:"; //$NON-NLS-1$
- private static boolean DEBUG = false;
-
- public EquinoxFwConfigFileParser(BundleContext context) {
- //Empty
- }
-
- private static StringBuffer toOSGiBundleListForm(BundleInfo bundleInfo, URI location) {
- StringBuffer locationString = new StringBuffer(REFERENCE_SCHEME);
- if (URIUtil.isFileURI(location))
- locationString.append(URIUtil.toUnencodedString(location));
- else if (location.getScheme() == null)
- locationString.append(FILE_PROTOCOL).append(URIUtil.toUnencodedString(location));
- else
- locationString = new StringBuffer(URIUtil.toUnencodedString(location));
-
- int startLevel = bundleInfo.getStartLevel();
- boolean toBeStarted = bundleInfo.isMarkedAsStarted();
-
- StringBuffer sb = new StringBuffer();
- sb.append(locationString);
- if (startLevel == BundleInfo.NO_LEVEL && !toBeStarted)
- return sb;
- sb.append('@');
- if (startLevel != BundleInfo.NO_LEVEL)
- sb.append(startLevel);
- if (toBeStarted)
- sb.append(":start"); //$NON-NLS-1$
- return sb;
- }
-
- private static boolean getMarkedAsStartedFormat(String startInfo) {
- if (startInfo == null)
- return false;
- startInfo = startInfo.trim();
- int colon = startInfo.indexOf(':');
- if (colon > -1) {
- return startInfo.substring(colon + 1).equals("start"); //$NON-NLS-1$
- }
- return startInfo.equals("start"); //$NON-NLS-1$
- }
-
- private static int getStartLevel(String startInfo) {
- if (startInfo == null)
- return BundleInfo.NO_LEVEL;
- startInfo = startInfo.trim();
- int colon = startInfo.indexOf(":"); //$NON-NLS-1$
- if (colon > 0) {
- try {
- return Integer.parseInt(startInfo.substring(0, colon));
- } catch (NumberFormatException e) {
- return BundleInfo.NO_LEVEL;
- }
- }
- return BundleInfo.NO_LEVEL;
- }
-
- private void readBundlesList(Manipulator manipulator, URI osgiInstallArea, Properties props) throws NumberFormatException {
- ConfigData configData = manipulator.getConfigData();
-
- BundleInfo[] fwExtensions = parseBundleList(manipulator, props.getProperty(EquinoxConstants.PROP_FW_EXTENSIONS));
- if (fwExtensions != null) {
- for (int i = 0; i < fwExtensions.length; i++) {
- fwExtensions[i].setFragmentHost(Constants.SYSTEM_BUNDLE_SYMBOLICNAME);
- configData.addBundle(fwExtensions[i]);
- }
- }
-
- BundleInfo[] bundles = parseBundleList(manipulator, props.getProperty(EquinoxConstants.PROP_BUNDLES));
- if (bundles != null) {
- for (int i = 0; i < bundles.length; i++) {
- configData.addBundle(bundles[i]);
- }
- }
- }
-
- private BundleInfo[] parseBundleList(Manipulator manipulator, String value) {
- if (value == null || value.length() == 0)
- return null;
-
- List bundles = new ArrayList();
- String[] bInfoStrings = Utils.getTokens(value, ","); //$NON-NLS-1$
- for (int i = 0; i < bInfoStrings.length; i++) {
- String entry = bInfoStrings[i].trim();
- entry = FileUtils.removeEquinoxSpecificProtocols(entry);
-
- int indexStartInfo = entry.indexOf('@');
- String location = (indexStartInfo == -1) ? entry : entry.substring(0, indexStartInfo);
- URI realLocation = null;
- if (manipulator.getLauncherData().getFwJar() != null) {
- File parentFile = manipulator.getLauncherData().getFwJar().getParentFile();
- try {
- realLocation = URIUtil.makeAbsolute(FileUtils.fromFileURL(location), parentFile.toURI());
- } catch (URISyntaxException e) {
- // try searching as a simple location
- realLocation = FileUtils.getEclipsePluginFullLocation(location, parentFile);
- }
- }
- String slAndFlag = (indexStartInfo > -1) ? entry.substring(indexStartInfo + 1) : null;
-
- boolean markedAsStarted = getMarkedAsStartedFormat(slAndFlag);
- int startLevel = getStartLevel(slAndFlag);
-
- if (realLocation != null) {
- bundles.add(new BundleInfo(realLocation, startLevel, markedAsStarted));
- continue;
- }
- if (location != null && location.startsWith(FILE_PROTOCOL))
- try {
- bundles.add(new BundleInfo(FileUtils.fromFileURL(location), startLevel, markedAsStarted));
- continue;
- } catch (URISyntaxException e) {
- //Ignore
- }
-
- //Fallback case, we use the location as a string
- bundles.add(new BundleInfo(location, null, null, startLevel, markedAsStarted));
- }
- return (BundleInfo[]) bundles.toArray(new BundleInfo[bundles.size()]);
- }
-
- private void writeBundlesList(File fwJar, Properties props, BundleInfo[] bundles) {
- StringBuffer osgiBundlesList = new StringBuffer();
- StringBuffer osgiFrameworkExtensionsList = new StringBuffer();
- for (int j = 0; j < bundles.length; j++) {
- BundleInfo bundle = bundles[j];
-
- //framework jar does not get stored on the bundle list, figure out who that is.
- if (fwJar != null) {
- if (URIUtil.sameURI(fwJar.toURI(), bundle.getLocation()))
- continue;
- } else if (EquinoxConstants.FW_SYMBOLIC_NAME.equals(bundle.getSymbolicName()))
- continue;
-
- URI location = fwJar != null ? URIUtil.makeRelative(bundle.getLocation(), fwJar.getParentFile().toURI()) : bundle.getLocation();
-
- String fragmentHost = bundle.getFragmentHost();
- boolean isFrameworkExtension = fragmentHost != null && (fragmentHost.startsWith(EquinoxConstants.FW_SYMBOLIC_NAME) || fragmentHost.startsWith(Constants.SYSTEM_BUNDLE_SYMBOLICNAME));
-
- if (isFrameworkExtension) {
- bundle.setStartLevel(BundleInfo.NO_LEVEL);
- bundle.setMarkedAsStarted(false);
- osgiFrameworkExtensionsList.append(toOSGiBundleListForm(bundle, location));
- osgiFrameworkExtensionsList.append(',');
- } else {
- osgiBundlesList.append(toOSGiBundleListForm(bundle, location));
- osgiBundlesList.append(',');
- }
- }
- if (osgiFrameworkExtensionsList.length() > 0)
- osgiFrameworkExtensionsList.deleteCharAt(osgiFrameworkExtensionsList.length() - 1);
- props.setProperty(EquinoxConstants.PROP_FW_EXTENSIONS, osgiFrameworkExtensionsList.toString());
-
- if (osgiBundlesList.length() > 0)
- osgiBundlesList.deleteCharAt(osgiBundlesList.length() - 1);
- props.setProperty(EquinoxConstants.PROP_BUNDLES, osgiBundlesList.toString());
- }
-
- /**
- * inputFile must be not a directory but a file.
- *
- * @param manipulator
- * @param inputFile
- * @throws IOException
- */
- public void readFwConfig(Manipulator manipulator, File inputFile) throws IOException, URISyntaxException {
- if (inputFile.isDirectory())
- throw new IllegalArgumentException(NLS.bind(Messages.exception_inputFileIsDirectory, inputFile));
-
- //Initialize data structures
- ConfigData configData = manipulator.getConfigData();
- LauncherData launcherData = manipulator.getLauncherData();
- configData.initialize();
- configData.setBundles(null);
-
- // load configuration properties
- Properties props = loadProperties(inputFile);
-
- // load shared configuration properties
- Properties sharedConfigProperties = getSharedConfiguration(props.getProperty(EquinoxConstants.PROP_SHARED_CONFIGURATION_AREA), ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), props, manipulator.getLauncherData()));
- if (sharedConfigProperties != null) {
- sharedConfigProperties.putAll(props);
- props = sharedConfigProperties;
- }
-
- //Start figuring out stuffs
- //URI rootURI = launcherData.getLauncher() != null ? launcherData.getLauncher().getParentFile().toURI() : null;
-
- readFwJarLocation(configData, launcherData, props);
- URI configArea = inputFile.getParentFile().toURI();
- //readLauncherPath(props, rootURI);
- readp2DataArea(props, configArea);
- readSimpleConfiguratorURL(props, configArea);
- readBundlesList(manipulator, ParserUtils.getOSGiInstallArea(Arrays.asList(launcherData.getProgramArgs()), props, launcherData).toURI(), props);
- readInitialStartLeve(configData, props);
- readDefaultStartLevel(configData, props);
-
- for (Enumeration enumeration = props.keys(); enumeration.hasMoreElements();) {
- String key = (String) enumeration.nextElement();
- if (KNOWN_PROPERTIES.contains(key))
- continue;
- String value = props.getProperty(key);
- configData.setProperty(key, value);
- }
- Log.log(LogService.LOG_INFO, NLS.bind(Messages.log_configFile, inputFile.getAbsolutePath()));
- }
-
- private void readDefaultStartLevel(ConfigData configData, Properties props) {
- if (props.getProperty(EquinoxConstants.PROP_BUNDLES_STARTLEVEL) != null)
- configData.setInitialBundleStartLevel(Integer.parseInt(props.getProperty(EquinoxConstants.PROP_BUNDLES_STARTLEVEL)));
- }
-
- private void writeDefaultStartLevel(ConfigData configData, Properties props) {
- if (configData.getInitialBundleStartLevel() != BundleInfo.NO_LEVEL)
- props.setProperty(EquinoxConstants.PROP_BUNDLES_STARTLEVEL, Integer.toString(configData.getInitialBundleStartLevel()));
- }
-
- private void readInitialStartLeve(ConfigData configData, Properties props) {
- if (props.getProperty(EquinoxConstants.PROP_INITIAL_STARTLEVEL) != null)
- configData.setBeginningFwStartLevel(Integer.parseInt(props.getProperty(EquinoxConstants.PROP_INITIAL_STARTLEVEL)));
- }
-
- private void writeInitialStartLevel(ConfigData configData, Properties props) {
- if (configData.getBeginingFwStartLevel() != BundleInfo.NO_LEVEL)
- props.setProperty(EquinoxConstants.PROP_INITIAL_STARTLEVEL, Integer.toString(configData.getBeginingFwStartLevel()));
- }
-
- private File readFwJarLocation(ConfigData configData, LauncherData launcherData, Properties props) throws URISyntaxException {
- File fwJar = null;
- if (props.getProperty(EquinoxConstants.PROP_OSGI_FW) != null) {
- URI absoluteFwJar = null;
- absoluteFwJar = URIUtil.makeAbsolute(FileUtils.fromFileURL(props.getProperty(EquinoxConstants.PROP_OSGI_FW)), ParserUtils.getOSGiInstallArea(Arrays.asList(launcherData.getProgramArgs()), props, launcherData).toURI());
-
- props.setProperty(EquinoxConstants.PROP_OSGI_FW, absoluteFwJar.toString());
- String fwJarString = props.getProperty(EquinoxConstants.PROP_OSGI_FW);
- if (fwJarString != null) {
- fwJar = URIUtil.toFile(absoluteFwJar);
- if (fwJar == null)
- throw new IllegalStateException(Messages.exception_noFrameworkLocation);
- //Here we overwrite the value read from eclipse.ini, because the value of osgi.framework always takes precedence.
- launcherData.setFwJar(fwJar);
- } else {
- throw new IllegalStateException(Messages.exception_noFrameworkLocation);
- }
- }
- if (launcherData.getFwJar() != null)
- configData.addBundle(new BundleInfo(launcherData.getFwJar().toURI()));
- return launcherData.getFwJar();
- }
-
- private void writeFwJarLocation(ConfigData configData, LauncherData launcherData, Properties props) {
- if (launcherData.getFwJar() == null)
- return;
- props.setProperty(EquinoxConstants.PROP_OSGI_FW, FileUtils.toFileURL(URIUtil.makeRelative(launcherData.getFwJar().toURI(), ParserUtils.getOSGiInstallArea(Arrays.asList(launcherData.getProgramArgs()), configData.getProperties(), launcherData).toURI())));
- }
-
- private static Properties loadProperties(File inputFile) throws FileNotFoundException, IOException {
- Properties props = new Properties();
- InputStream is = null;
- try {
- is = new FileInputStream(inputFile);
- props.load(is);
- } finally {
- try {
- is.close();
- } catch (IOException e) {
- Log.log(LogService.LOG_WARNING, NLS.bind(Messages.log_failed_reading_properties, inputFile));
- }
- is = null;
- }
- return props;
- }
-
- private File findSharedConfigIniFile(URL rootURL, String sharedConfigurationArea) {
- URL sharedConfigurationURL = null;
- try {
- sharedConfigurationURL = new URL(sharedConfigurationArea);
- } catch (MalformedURLException e) {
- // unexpected since this was written by the framework
- Log.log(LogService.LOG_WARNING, NLS.bind(Messages.log_shared_config_url, sharedConfigurationArea));
- return null;
- }
-
- // check for a relative URL
- if (!sharedConfigurationURL.getPath().startsWith("/")) { //$NON-NLS-1$
- if (!rootURL.getProtocol().equals(sharedConfigurationURL.getProtocol())) {
- Log.log(LogService.LOG_WARNING, NLS.bind(Messages.log_shared_config_relative_url, rootURL.toExternalForm(), sharedConfigurationArea));
- return null;
- }
- try {
- sharedConfigurationURL = new URL(rootURL, sharedConfigurationArea);
- } catch (MalformedURLException e) {
- // unexpected since this was written by the framework
- Log.log(LogService.LOG_WARNING, NLS.bind(Messages.log_shared_config_relative_url, rootURL.toExternalForm(), sharedConfigurationArea));
- return null;
- }
- }
- File sharedConfigurationFolder = new File(sharedConfigurationURL.getPath());
- if (!sharedConfigurationFolder.isDirectory()) {
- Log.log(LogService.LOG_WARNING, NLS.bind(Messages.log_shared_config_file_missing, sharedConfigurationFolder));
- return null;
- }
-
- File sharedConfigIni = new File(sharedConfigurationFolder, EquinoxConstants.CONFIG_INI);
- if (!sharedConfigIni.exists()) {
- Log.log(LogService.LOG_WARNING, NLS.bind(Messages.log_shared_config_file_missing, sharedConfigIni));
- return null;
- }
-
- return sharedConfigIni;
- }
-
- private void readp2DataArea(Properties props, URI configArea) throws URISyntaxException {
- if (props.getProperty(KEY_ECLIPSE_PROV_DATA_AREA) != null) {
- String url = props.getProperty(KEY_ECLIPSE_PROV_DATA_AREA);
- if (url != null) {
- if (url.startsWith(CONFIG_DIR))
- url = "file:" + url.substring(CONFIG_DIR.length()); //$NON-NLS-1$
- props.setProperty(KEY_ECLIPSE_PROV_DATA_AREA, URIUtil.makeAbsolute(FileUtils.fromFileURL(url), configArea).toString());
- }
- }
- }
-
- private void writep2DataArea(ConfigData configData, Properties props, URI configArea) throws URISyntaxException {
- String dataArea = getFwProperty(configData, KEY_ECLIPSE_PROV_DATA_AREA);
- if (dataArea != null) {
- if (dataArea.startsWith(CONFIG_DIR)) {
- props.setProperty(KEY_ECLIPSE_PROV_DATA_AREA, dataArea);
- return;
- }
- URI dataAreaURI = new URI(dataArea);
- URI relative = URIUtil.makeRelative(dataAreaURI, configArea);
- if (dataAreaURI.equals(relative)) {
- props.setProperty(KEY_ECLIPSE_PROV_DATA_AREA, FileUtils.toFileURL(dataAreaURI));
- return;
- }
- String result = URIUtil.toUnencodedString(relative);
- //We only relativize up to the level where the p2 and config folder are siblings (e.g. foo/p2 and foo/config)
- if (result.startsWith("../..")) //$NON-NLS-1$
- result = dataArea;
- else if (!result.equals(dataArea)) {
- props.setProperty(KEY_ECLIPSE_PROV_DATA_AREA, CONFIG_DIR + result);
- return;
- }
- props.setProperty(KEY_ECLIPSE_PROV_DATA_AREA, FileUtils.toFileURL(new URI(result)));
- }
- }
-
- // private void readLauncherPath(Properties props, URI root) throws URISyntaxException {
- // if (props.getProperty(EquinoxConstants.PROP_LAUNCHER_PATH) != null) {
- // URI absoluteURI = URIUtil.makeAbsolute(URIUtil.fromString(props.getProperty(EquinoxConstants.PROP_LAUNCHER_PATH)), root);
- // props.setProperty(EquinoxConstants.PROP_LAUNCHER_PATH, URIUtil.toUnencodedString(absoluteURI));
- // }
- // }
- //
- // private void writeLauncherPath(ConfigData configData, Properties props, URI root) throws URISyntaxException {
- // String value = getFwProperty(configData, EquinoxConstants.PROP_LAUNCHER_PATH);
- // if (value != null) {
- // URI launcherPathURI = FileUtils.fromPath(value);
- // String launcherPath = URIUtil.toUnencodedString(URIUtil.makeRelative(launcherPathURI, root));
- // if ("/".equals(launcherPath) || "".equals(launcherPath)) //$NON-NLS-1$ //$NON-NLS-2$
- // launcherPath = "."; //$NON-NLS-1$
- // props.setProperty(EquinoxConstants.PROP_LAUNCHER_PATH, launcherPath);
- // }
- // }
-
- private void readSimpleConfiguratorURL(Properties props, URI configArea) throws URISyntaxException {
- if (props.getProperty(KEY_ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL) != null)
- props.setProperty(KEY_ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL, URIUtil.makeAbsolute(FileUtils.fromFileURL(props.getProperty(KEY_ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL)), configArea).toString());
- }
-
- private void writeSimpleConfiguratorURL(ConfigData configData, Properties props, URI configArea) throws URISyntaxException {
- //FIXME How would someone set such a value.....
- String value = getFwProperty(configData, KEY_ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL);
- if (value != null)
- props.setProperty(KEY_ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL, FileUtils.toFileURL(URIUtil.makeRelative(URIUtil.fromString(value), configArea)));
- }
-
- private String getFwProperty(ConfigData data, String key) {
- return data.getProperty(key);
- }
-
- public void saveFwConfig(BundleInfo[] bInfos, Manipulator manipulator, boolean backup, boolean relative) throws IOException {//{
- ConfigData configData = manipulator.getConfigData();
- LauncherData launcherData = manipulator.getLauncherData();
- //Get the OSGi jar from the bundle.info
- File fwJar = EquinoxBundlesState.getSystemBundleFromBundleInfos(configData);
- launcherData.setFwJar(fwJar);
-
- File outputFile = launcherData.getFwConfigLocation();
- if (outputFile.exists()) {
- if (outputFile.isFile()) {
- if (!outputFile.getName().equals(EquinoxConstants.CONFIG_INI))
- throw new IllegalStateException(NLS.bind(Messages.exception_fwConfigLocationName, outputFile.getAbsolutePath(), EquinoxConstants.CONFIG_INI));
- } else { // Directory
- outputFile = new File(outputFile, EquinoxConstants.CONFIG_INI);
- }
- } else {
- if (!outputFile.getName().equals(EquinoxConstants.CONFIG_INI)) {
- if (!outputFile.mkdir())
- throw new IOException(NLS.bind(Messages.exception_failedToCreateDir, outputFile));
- outputFile = new File(outputFile, EquinoxConstants.CONFIG_INI);
- }
- }
- String header = "This configuration file was written by: " + this.getClass().getName(); //$NON-NLS-1$
-
- Properties configProps = new Properties();
- //URI rootURI = launcherData.getLauncher() != null ? launcherData.getLauncher().getParentFile().toURI() : null;
-
- writeFwJarLocation(configData, launcherData, configProps);
- try {
- //writeLauncherPath(configData, configProps, rootURI);
- URI configArea = manipulator.getLauncherData().getFwConfigLocation().toURI();
- writep2DataArea(configData, configProps, configArea);
- writeSimpleConfiguratorURL(configData, configProps, configArea);
- writeBundlesList(launcherData.getFwJar(), configProps, bInfos);
- writeInitialStartLevel(configData, configProps);
- writeDefaultStartLevel(configData, configProps);
- } catch (URISyntaxException e) {
- throw new FrameworkAdminRuntimeException(e, Messages.exception_errorSavingConfigIni);
- }
-
- Properties original = configData.getProperties();
- original.putAll(configProps);
- configProps = original;
-
- //Deal with the fw jar and ensure it is not set.
- //TODO This can't be done before because of the previous calls to appendProperties
-
- if (configProps == null || configProps.size() == 0) {
- Log.log(LogService.LOG_WARNING, this, "saveFwConfig() ", Messages.log_configProps); //$NON-NLS-1$
- return;
- }
- if (!Utils.createParentDir(outputFile)) {
- throw new IllegalStateException(NLS.bind(Messages.exception_failedToCreateDir, outputFile.getParent()));
- }
-
- if (DEBUG)
- Utils.printoutProperties(System.out, "configProps", configProps); //$NON-NLS-1$
-
- if (backup)
- if (outputFile.exists()) {
- File dest = Utils.getSimpleDataFormattedFile(outputFile);
- if (!outputFile.renameTo(dest))
- throw new IOException(NLS.bind(Messages.exception_failedToRename, outputFile, dest));
- Log.log(LogService.LOG_INFO, this, "saveFwConfig()", NLS.bind(Messages.log_renameSuccessful, outputFile, dest)); //$NON-NLS-1$
- }
-
- FileOutputStream out = null;
- try {
- out = new FileOutputStream(outputFile);
- // configProps = makeRelative(configProps, launcherData.getLauncher().getParentFile().toURI(), fwJar, outputFile.getParentFile(), getOSGiInstallArea(manipulator.getLauncherData()));
- filterPropertiesFromSharedArea(configProps, manipulator);
- configProps.store(out, header);
- Log.log(LogService.LOG_INFO, NLS.bind(Messages.log_fwConfigSave, outputFile));
- } finally {
- try {
- out.flush();
- out.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- out = null;
- }
- }
-
- private void filterPropertiesFromSharedArea(Properties configProps, Manipulator manipulator) {
- LauncherData launcherData = manipulator.getLauncherData();
- //Remove from the config file that we are about to write the properties that are unchanged compared to what is in the base
- Properties sharedConfigProperties = getSharedConfiguration(configProps.getProperty(EquinoxConstants.PROP_SHARED_CONFIGURATION_AREA), ParserUtils.getOSGiInstallArea(Arrays.asList(launcherData.getProgramArgs()), configProps, launcherData));
- if (sharedConfigProperties == null)
- return;
- Enumeration keys = configProps.propertyNames();
- while (keys.hasMoreElements()) {
- String key = (String) keys.nextElement();
- String sharedValue = sharedConfigProperties.getProperty(key);
- if (sharedValue == null)
- continue;
- String value = configProps.getProperty(key);
- if (equalsIgnoringSeparators(sharedValue, value)) {
- configProps.remove(key);
- continue;
- }
-
- if (key.equals(EquinoxConstants.PROP_BUNDLES) && equalBundleLists(manipulator, value, sharedValue)) {
- configProps.remove(key);
- continue;
- }
-
- if (key.equals(EquinoxConstants.PROP_FW_EXTENSIONS) && equalBundleLists(manipulator, value, sharedValue)) {
- configProps.remove(key);
- continue;
- }
- }
- }
-
- private boolean equalBundleLists(Manipulator manipulator, String value, String sharedValue) {
- BundleInfo[] bundles = parseBundleList(manipulator, value);
- BundleInfo[] sharedBundles = parseBundleList(manipulator, sharedValue);
- if (bundles == null || sharedBundles == null || bundles.length != sharedBundles.length)
- return false;
-
- List compareList = new ArrayList(Arrays.asList(bundles));
- compareList.removeAll(Arrays.asList(sharedBundles));
- return compareList.isEmpty();
- }
-
- private boolean equalsIgnoringSeparators(String s1, String s2) {
- if (s1 == null && s2 == null)
- return true;
- if (s1 == null || s2 == null)
- return false;
- StringBuffer sb1 = new StringBuffer(s1);
- StringBuffer sb2 = new StringBuffer(s2);
- canonicalizePathsForComparison(sb1);
- canonicalizePathsForComparison(sb2);
- return sb1.toString().equals(sb2.toString());
- }
-
- private void canonicalizePathsForComparison(StringBuffer s) {
- final String[] tokens = new String[] {"\\\\", "\\", "//", "/"}; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
- for (int t = 0; t < tokens.length; t++) {
- int idx = s.length();
- for (int i = s.length(); i != 0 && idx != -1; i--) {
- idx = s.toString().lastIndexOf(tokens[t], idx);
- if (idx != -1)
- s.replace(idx, idx + tokens[t].length(), "^"); //$NON-NLS-1$
- }
- }
- }
-
- private Properties getSharedConfiguration(String sharedConfigurationArea, File baseFile) {
- if (sharedConfigurationArea == null)
- return null;
- File sharedConfigIni;
- try {
- sharedConfigIni = findSharedConfigIniFile(baseFile.toURL(), sharedConfigurationArea);
- } catch (MalformedURLException e) {
- return null;
- }
- if (sharedConfigIni != null && sharedConfigIni.exists())
- try {
- return loadProperties(sharedConfigIni);
- } catch (FileNotFoundException e) {
- return null;
- } catch (IOException e) {
- return null;
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxLauncherData.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxLauncherData.java
deleted file mode 100644
index 869115bd4..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxLauncherData.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import java.io.File;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-
-public class EquinoxLauncherData extends LauncherData {
- File previousLauncher = null;
-
- public EquinoxLauncherData(String fwName, String fwVersion, String launcherName, String launcherVersion) {
- super(fwName, fwVersion, launcherName, launcherVersion);
- }
-
- public void setLauncher(File launcherFile) {
- if (previousLauncher == null && launcherFile != null && !launcherFile.equals(getLauncher()))
- previousLauncher = EquinoxManipulatorImpl.getLauncherConfigLocation(this);
- super.setLauncher(launcherFile);
- }
-
- File getPreviousLauncherIni() {
- return previousLauncher;
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java
deleted file mode 100644
index def154fc8..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java
+++ /dev/null
@@ -1,649 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.*;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.frameworkadmin.utils.SimpleBundlesState;
-import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
-import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.osgi.service.datalocation.Location;
-import org.eclipse.osgi.service.resolver.PlatformAdmin;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.*;
-import org.osgi.service.log.LogService;
-import org.osgi.service.startlevel.StartLevel;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- *
- */
-public class EquinoxManipulatorImpl implements Manipulator {
- private static final long DEFAULT_LASTMODIFIED = 0L;
- private static final boolean LOG_ILLEGALSTATEEXCEPTION = false;
- private static final String COMMA = ","; //$NON-NLS-1$
- private static final String FILE_PROTOCOL = "file:"; //$NON-NLS-1$
- private static final String IGNORED = "ignored"; //$NON-NLS-1$
-
- /**
- * If the fwConfigLocation is a file and its name does not equal "config.ini",
- * throw an IllegaStateException.
- * If the fwConfigLocation is a file and its name equals "config.ini",
- * fwConfigLocation will be updated by its parent directory.
- *
- * Then, reset fwConfigLocation and fwPersistentDataLocation to be matched.
- *
- * @param launcherData
- */
- static void checkConsistencyOfFwConfigLocAndFwPersistentDataLoc(LauncherData launcherData) {
- File fwConfigLocation = launcherData.getFwConfigLocation();
- File fwPersistentDataLocation = launcherData.getFwPersistentDataLocation();
-
- if (fwConfigLocation != null) {
- if (fwConfigLocation.isFile()) {
- if (fwConfigLocation.getName().equals(EquinoxConstants.CONFIG_INI))
- fwConfigLocation = fwConfigLocation.getParentFile();
- else
- throw new IllegalStateException(NLS.bind(Messages.exception_unexpectedfwConfigLocation, fwConfigLocation.getAbsolutePath(), EquinoxConstants.CONFIG_INI));
- launcherData.setFwConfigLocation(fwConfigLocation);
- }
- if (fwPersistentDataLocation != null) {
- if (!fwConfigLocation.equals(fwPersistentDataLocation))
- throw new IllegalStateException(NLS.bind(Messages.exception_persistantLocationNotEqualConfigLocation, fwPersistentDataLocation.getAbsolutePath(), fwConfigLocation.getAbsolutePath()));
- } else
- launcherData.setFwPersistentDataLocation(fwConfigLocation, launcherData.isClean());
- } else {
- if (fwPersistentDataLocation != null) {
- launcherData.setFwConfigLocation(fwPersistentDataLocation);
- } else {
- File home = launcherData.getHome();
- if (home == null)
- throw new IllegalStateException(Messages.exception_noLocations);
- fwConfigLocation = new File(home, "configuration"); //$NON-NLS-1$
- launcherData.setFwPersistentDataLocation(fwConfigLocation, launcherData.isClean());
- launcherData.setFwConfigLocation(fwConfigLocation);
- }
- }
- }
-
- //This returns the location of the <eclipse>.ini file
- static File getLauncherConfigLocation(LauncherData launcherData) {
- File launcherIni = launcherData.getLauncherConfigLocation();
- if (launcherIni != null)
- return launcherIni;
-
- File launcher = launcherData.getLauncher();
- if (launcher == null)
- return null;
- String launcherName = launcher.getName();
- int dotLocation = launcherName.lastIndexOf('.');
- if (dotLocation != -1)
- launcherName = launcherName.substring(0, dotLocation);
- File result = new File(launcher.getParentFile(), launcherName + EquinoxConstants.INI_EXTENSION);
- return result;
- }
-
- ConfigData configData = new ConfigData(EquinoxConstants.FW_NAME, EquinoxConstants.FW_VERSION, EquinoxConstants.LAUNCHER_NAME, EquinoxConstants.LAUNCHER_VERSION);
- EquinoxLauncherData launcherData = new EquinoxLauncherData(EquinoxConstants.FW_NAME, EquinoxConstants.FW_VERSION, EquinoxConstants.LAUNCHER_NAME, EquinoxConstants.LAUNCHER_VERSION);
- BundleContext context = null;
- private Properties platformProperties = new Properties();
-
- ServiceTracker cmTracker;
- int trackingCount = -1;
- private final PlatformAdmin platformAdmin;
- private final StartLevel startLevelService;
-
- // private final boolean runtime;
-
- ConfiguratorManipulator configuratorManipulator;
-
- EquinoxFwAdminImpl fwAdmin = null;
-
- EquinoxManipulatorImpl(BundleContext context, EquinoxFwAdminImpl fwAdmin, PlatformAdmin admin, StartLevel slService, boolean runtime) {
- this.context = context;
- this.fwAdmin = fwAdmin;
- this.platformAdmin = admin;
- this.startLevelService = slService;
- if (context != null) {
- cmTracker = new ServiceTracker(context, ConfiguratorManipulator.class.getName(), null);
- cmTracker.open();
- }
- // this.runtime = runtime;
- if (runtime)
- initializeRuntime();
- // XXX For Equinox, default value of Initial Bundle Start Level is 4.
- // Precisely speaking, it's not correct.
- // Equinox doesn't support setting initial bundle start level as an OSGi terminology.
- // Only bundles installed by config.ini and updateconfigurator will have that start level(4).
- // Others has a start level of 1.
- configData.setInitialBundleStartLevel(4);
- }
-
- public BundlesState getBundlesState() throws FrameworkAdminRuntimeException {
- if (context == null)
- return new SimpleBundlesState(fwAdmin, this, EquinoxConstants.FW_SYMBOLIC_NAME);
-
- if (!EquinoxBundlesState.checkFullySupported())
- return new SimpleBundlesState(fwAdmin, this, EquinoxConstants.FW_SYMBOLIC_NAME);
-
- if (platformProperties.isEmpty())
- return new EquinoxBundlesState(context, fwAdmin, this, platformAdmin, false);
- // XXX checking if fwDependent or fwIndependent platformProperties are updated after the platformProperties was created might be required for better implementation.
- return new EquinoxBundlesState(context, fwAdmin, this, platformAdmin, platformProperties);
- }
-
- public ConfigData getConfigData() throws FrameworkAdminRuntimeException {
- return configData;
- }
-
- public BundleInfo[] getExpectedState() throws IllegalArgumentException, FrameworkAdminRuntimeException {
- //Log.log(LogService.LOG_DEBUG, this, "getExpectedState()", "BEGIN");
- SimpleBundlesState.checkAvailability(fwAdmin);
-
- BundlesState bundleState = this.getBundlesState();
- if (bundleState instanceof SimpleBundlesState)
- return new BundleInfo[0];
- bundleState.resolve(true);
-
- return bundleState.getExpectedState();
- }
-
- public LauncherData getLauncherData() throws FrameworkAdminRuntimeException {
- return launcherData;
- }
-
- /**
- * Return the configuration location.
- *
- * @see Location
- */
- private File getRunningConfigurationLocation() {
- ServiceTracker tracker = null;
- Filter filter = null;
- try {
- filter = context.createFilter(Location.CONFIGURATION_FILTER);
- } catch (InvalidSyntaxException e) {
- // ignore this. It should never happen as we have tested the above format.
- }
- tracker = new ServiceTracker(context, filter, null);
- tracker.open();
- Location location = (Location) tracker.getService();
- URL url = location.getURL();
- if (!url.getProtocol().equals("file")) //$NON-NLS-1$
- return null;
- return new File(url.getFile());
- }
-
- private File getRunningLauncherFile() {
- File launcherFile = null;
- String eclipseCommandsSt = context.getProperty(EquinoxConstants.PROP_ECLIPSE_COMMANDS);
- if (eclipseCommandsSt == null)
- return null;
-
- StringTokenizer tokenizer = new StringTokenizer(eclipseCommandsSt, "\n"); //$NON-NLS-1$
- boolean found = false;
- String launcherSt = null;
- while (tokenizer.hasMoreTokens()) {
- String token = tokenizer.nextToken();
- if (found) {
- launcherSt = token;
- break;
- }
- if (token.equals("-launcher")) //$NON-NLS-1$
- found = true;
- }
- if (launcherSt != null)
- launcherFile = new File(launcherSt);
- return launcherFile;
- }
-
- private Properties getRunningPlatformProperties() {
- Properties props = new Properties();
- for (int i = 0; i < EquinoxBundlesState.PROPS.length; i++) {
- String value = context.getProperty(EquinoxBundlesState.PROPS[i]);
- if (value != null)
- props.setProperty(EquinoxBundlesState.PROPS[i], value);
- }
- return props;
- }
-
- public long getTimeStamp() {
- long ret = this.getTimeStampWithoutFwPersistentData();
- if (this.launcherData.isClean())
- return ret;
- long lastModifiedFwPersistent = EquinoxBundlesState.getTimeStamp(launcherData.getFwPersistentDataLocation());
- return Math.max(ret, lastModifiedFwPersistent);
- }
-
- private long getTimeStampWithoutFwPersistentData() {
- SimpleBundlesState.checkAvailability(fwAdmin);
- File launcherConfigFile = getLauncherConfigLocation(launcherData);
- long lastModifiedLauncherConfigFile = DEFAULT_LASTMODIFIED;
- long lastModifiedFwConfigFile = DEFAULT_LASTMODIFIED;
- if (launcherConfigFile != null) {
- // use launcher. -- > load from LaucnherConfig file.
- lastModifiedLauncherConfigFile = launcherConfigFile.lastModified();
- }
- checkConsistencyOfFwConfigLocAndFwPersistentDataLoc(launcherData);
-
- if (launcherData.getFwConfigLocation() != null) {
- File fwConfigFile = new File(launcherData.getFwConfigLocation(), EquinoxConstants.CONFIG_INI);
- lastModifiedFwConfigFile = fwConfigFile.lastModified();
- }
- long ret = Math.max(lastModifiedLauncherConfigFile, lastModifiedFwConfigFile);
- return ret;
- }
-
- public void initialize() {
- Log.log(LogService.LOG_DEBUG, this, "initialize()", "BEGIN"); //$NON-NLS-1$ //$NON-NLS-2$
- configData.initialize();
- launcherData.initialize();
- }
-
- private void initializeRuntime() {
- //TODO refine the implementation. using some MAGIC dependent on Eclipse.exe and Equinox implementation,
- // set parameters according to the current running fw.
-
- // 1. retrieve location data from Location services registered by equinox fw.
- String fwJarLocation = context.getProperty(EquinoxConstants.PROP_OSGI_FW);
- if (!fwJarLocation.startsWith("file:")) //$NON-NLS-1$
- throw new IllegalStateException(NLS.bind(Messages.exception_fileURLExpected, EquinoxConstants.PROP_OSGI_FW, fwJarLocation));
- File fwJar = new File(fwJarLocation.substring("file:".length())); //$NON-NLS-1$
- File fwConfigLocation = getRunningConfigurationLocation();
- File launcherFile = getRunningLauncherFile();
- launcherData.setFwJar(fwJar);
- launcherData.setFwPersistentDataLocation(fwConfigLocation, false);
- launcherData.setLauncher(launcherFile);
- launcherData.setOS(context.getProperty("osgi.os")); //$NON-NLS-1$
- try {
- this.loadWithoutFwPersistentData();
- } catch (IOException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- // 2. Create a Manipulator object fully initialized to the current running fw.
-
- ServiceReference reference = context.getServiceReference(StartLevel.class.getName());
- StartLevel startLevel = (StartLevel) context.getService(reference);
- Bundle[] bundles = context.getBundles();
- BundleInfo[] bInfos = new BundleInfo[bundles.length];
- for (int i = 0; i < bundles.length; i++) {
- // System.out.println("bundles[" + i + "]=" + bundles[i]);
- try {
- if (bundles[i].getBundleId() == 0) // SystemBundle
- bInfos[i] = new BundleInfo(bundles[i].getSymbolicName(), (String) bundles[i].getHeaders().get(Constants.BUNDLE_VERSION), FileLocator.getBundleFile(bundles[i]).getAbsoluteFile().toURI(), -1, true);
- else {
- bInfos[i] = new BundleInfo(bundles[i].getSymbolicName(), (String) bundles[i].getHeaders().get(Constants.BUNDLE_VERSION), FileLocator.getBundleFile(bundles[i]).getAbsoluteFile().toURI(), startLevel.getBundleStartLevel(bundles[i]), startLevel.isBundlePersistentlyStarted(bundles[i]));
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- configData.setBundles(bInfos);
- platformProperties = this.getRunningPlatformProperties();
-
- // copy system properties to ConfigData
- Properties props = System.getProperties();
- for (Enumeration enumeration = props.keys(); enumeration.hasMoreElements();) {
- String key = (String) enumeration.nextElement();
- String value = props.getProperty(key);
- if (toBeEliminated(key))
- continue;
- configData.setProperty(key, value);
- }
-
- // update initialBundleStartLevel
- int initialBSL = configData.getInitialBundleStartLevel();
- if (initialBSL != startLevelService.getInitialBundleStartLevel())
- configData.setInitialBundleStartLevel(startLevelService.getInitialBundleStartLevel());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator#load()
- */
- public void load() throws IllegalStateException, IOException, FrameworkAdminRuntimeException {
- Log.log(LogService.LOG_DEBUG, this, "load()", "BEGIN"); //$NON-NLS-1$//$NON-NLS-2$
- loadWithoutFwPersistentData();
-
- BundlesState bundlesState = null;
- if (EquinoxBundlesState.checkFullySupported()) {
- bundlesState = new EquinoxBundlesState(context, fwAdmin, this, platformAdmin, !launcherData.isClean());
- platformProperties = ((EquinoxBundlesState) bundlesState).getPlatformProperties();
- } else {
- bundlesState = new SimpleBundlesState(fwAdmin, this, EquinoxConstants.FW_SYMBOLIC_NAME);
- platformProperties.clear();
- }
- updateAccordingToExpectedState(bundlesState);
- // if (!useConfigurator)
- // return;
- setConfiguratorManipulator();
- if (this.configuratorManipulator == null)
- return;
- configuratorManipulator.updateBundles(this);
- return;
- }
-
- private void loadWithoutFwPersistentData() throws IOException {
- SimpleBundlesState.checkAvailability(fwAdmin);
- File launcherConfigFile = getLauncherConfigLocation(launcherData);
- if (launcherConfigFile != null && !launcherConfigFile.getName().endsWith(IGNORED)) {
- // use launcher. -- > load from LaucnherConfig file.
- // the parameters in memory will be updated.
- EclipseLauncherParser parser = new EclipseLauncherParser();
- parser.read(launcherConfigFile, launcherData);
- }
- checkConsistencyOfFwConfigLocAndFwPersistentDataLoc(launcherData);
-
- File fwConfigFile = new File(launcherData.getFwConfigLocation(), EquinoxConstants.CONFIG_INI);
- EquinoxFwConfigFileParser parser = new EquinoxFwConfigFileParser(context);
- if (fwConfigFile.exists())
- try {
- parser.readFwConfig(this, fwConfigFile);
- } catch (URISyntaxException e) {
- throw new FrameworkAdminRuntimeException(e, NLS.bind(Messages.exception_errorReadingFile, fwConfigFile.getAbsolutePath()));
- }
- }
-
- // Save all parameter in memory into proper config files.
- public void save(boolean backup) throws IOException, FrameworkAdminRuntimeException {
- Log.log(LogService.LOG_DEBUG, this, "save()", "BEGIN"); //$NON-NLS-1$//$NON-NLS-2$
- SimpleBundlesState.checkAvailability(fwAdmin);
-
- try {
- updateAccordingToExpectedState(this.getBundlesState());
- } catch (IllegalStateException e) {
- // ignore.
- }
-
- boolean stateIsEmpty = configData.getBundles().length == 0;
-
- File launcherConfigFile = getLauncherConfigLocation(launcherData);
- if (launcherConfigFile != null) {
- if (!stateIsEmpty) {
- // Use launcher. -- > save LauncherConfig file.
- EclipseLauncherParser launcherParser = new EclipseLauncherParser();
- launcherParser.save(launcherData, backup);
- } else {
- // No bundles in configuration, so delete the launcher config file
- launcherConfigFile.delete();
- }
- }
-
- checkConsistencyOfFwConfigLocAndFwPersistentDataLoc(launcherData);
-
- ConfiguratorManipulator previousConfigurator = setConfiguratorManipulator();
- if (previousConfigurator != null)
- previousConfigurator.cleanup(this);
-
- BundleInfo[] newBInfos = null;
- if (configuratorManipulator != null) { // Optimize BundleInfo[]
- try {
- newBInfos = configuratorManipulator.save(this, backup);
- } catch (IllegalStateException e) {
- if (LOG_ILLEGALSTATEEXCEPTION)
- Log.log(LogService.LOG_WARNING, this, "save()", e); //$NON-NLS-1$
- newBInfos = configData.getBundles();
- }
- } else {
- newBInfos = configData.getBundles();
- }
-
- if (!stateIsEmpty) {
- // Save FwConfigFile
- EquinoxFwConfigFileParser parser = new EquinoxFwConfigFileParser(context);
- parser.saveFwConfig(newBInfos.length != 0 ? newBInfos : getConfigData().getBundles(), this, backup, false);
- } else {
- File configDir = launcherData.getFwConfigLocation();
- File outputFile = new File(configDir, EquinoxConstants.CONFIG_INI);
- if (outputFile != null && outputFile.exists()) {
- outputFile.delete();
- }
- if (configDir != null && configDir.exists()) {
- configDir.delete();
- }
- }
- }
-
- public void setConfigData(ConfigData configData) {
- this.configData.initialize();
- this.configData.setInitialBundleStartLevel(configData.getInitialBundleStartLevel());
- this.configData.setBeginningFwStartLevel(configData.getBeginingFwStartLevel());
- BundleInfo[] bInfos = configData.getBundles();
- for (int i = 0; i < bInfos.length; i++)
- this.configData.addBundle(bInfos[i]);
- this.configData.setProperties(configData.getProperties());
- if (this.configData.getFwName().equals(configData.getFwName()))
- if (this.configData.getFwVersion().equals(configData.getFwVersion())) {
- // TODO refine the algorithm to copying fw dependent props.
- // configData.getFwName()/getFwVersion()/
- // getLauncherName()/getLauncherVersion() might be taken into consideration.
- this.configData.setProperties(configData.getProperties());
- }
- }
-
- /**
- * 1. get all ServiceReferences of ConfiguratorManipulator.
- * 2. Check if there any ConfiguratorBundle in the Bundles list that can be manipulated by
- * the available ConfiguratorManipulators.
- * 3. Choose the one that will be firstly started among them.
- * 4. set the object that corresponds to the chosen ConfiguratorBundle.
- *
- */
- private ConfiguratorManipulator setConfiguratorManipulator() {
- if (context == null) {
- this.configuratorManipulator = this.fwAdmin.getConfiguratorManipulator();
- return null;
- }
- ServiceReference[] references = cmTracker.getServiceReferences();
- if (references == null)
- return null;
-
- // int count = cmTracker.getTrackingCount();
- // if (count == this.trackingCount)
- // return;
- // this.trackingCount = count;
-
- BundleInfo[] bInfos = configData.getBundles();
- int initialBSL = configData.getInitialBundleStartLevel();
- bInfos = Utils.sortBundleInfos(bInfos, initialBSL);
- //int index = -1;
- ConfiguratorManipulator previousConfiguratorManipulator = configuratorManipulator;
- configuratorManipulator = null;
- for (int i = 0; i < bInfos.length; i++) {
- URI location = bInfos[i].getLocation();
- if (!bInfos[i].isMarkedAsStarted())
- continue;
- for (int j = 0; j < references.length; j++)
- if (references[j].getProperty(ConfiguratorManipulator.SERVICE_PROP_KEY_CONFIGURATOR_BUNDLESYMBOLICNAME).equals(Utils.getPathFromClause(Utils.getManifestMainAttributes(location, Constants.BUNDLE_SYMBOLICNAME)))) {
- configuratorManipulator = (ConfiguratorManipulator) cmTracker.getService(references[j]);
- break;
- }
- if (configuratorManipulator != null)
- break;
- }
- if (configuratorManipulator != previousConfiguratorManipulator)
- return previousConfiguratorManipulator;
- return null;
- }
-
- public void setLauncherData(LauncherData value) {
- launcherData.initialize();
- launcherData.setFwConfigLocation(value.getFwConfigLocation());
- launcherData.setFwPersistentDataLocation(value.getFwPersistentDataLocation(), value.isClean());
- launcherData.setJvm(value.getJvm());
- launcherData.setJvmArgs(value.getJvmArgs());
- launcherData.setOS(value.getOS());
- if (launcherData.getFwName().equals(value.getFwName()))
- if (launcherData.getFwVersion().equals(value.getFwVersion())) {
- // TODO launcherData.getFwName()/getFwVersion()/
- // getLauncherName()/getLauncherVersion() might be taken into consideration
- // for copying .
- launcherData.setFwJar(value.getFwJar());
- launcherData.setHome(value.getHome());
- launcherData.setLauncher(value.getLauncher());
- launcherData.setLauncherConfigLocation(value.getLauncherConfigLocation());
- }
- }
-
- /**
- * Temporal implementation.
- *
- * If a property of the given key should be eliminated
- * from FwDependentProperties and FwIndependentProperties,
- * return true. Otherwise false.
- *
- * @param key
- * @return true if it should be elimineted from FwDependentProperties and FwIndependentProperties,
- */
- private boolean toBeEliminated(String key) {
- if (key.startsWith("java.")) //$NON-NLS-1$
- return true;
- return false;
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append("++++++++++++++++++++++++++++++++++++++++++\n" + "Class:" + this.getClass().getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- sb.append("------------- LauncherData -----------\n"); //$NON-NLS-1$
- sb.append(launcherData.toString());
- sb.append("------------- ConfigData -----------\n"); //$NON-NLS-1$
- sb.append(configData.toString());
- sb.append("\n" + Utils.toStringProperties("platformProperties", this.platformProperties)); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("++++++++++++++++++++++++++++++++++++++++++\n"); //$NON-NLS-1$
- return sb.toString();
- }
-
- private void updateAccordingToExpectedState(BundlesState bundlesState) {
- // File newFwJar = EquinoxBundlesState.getFwJar(launcherData, configData);
- // if (bundlesState instanceof EquinoxBundlesState)
- // ((EquinoxBundlesState) bundlesState).setFwJar(newFwJar);
- //
- // if (launcherData.getFwJar() == null && newFwJar != null)
- // launcherData.setFwJar(newFwJar);
- BundleInfo[] newBundleInfos = bundlesState.getExpectedState();
- configData.setBundles(newBundleInfos);
- }
-
- public static String makeRelative(String original, String rootPath) {
- IPath path = new Path(original);
- // ensure we have an absolute path to start with
- if (!path.isAbsolute())
- return original;
-
- //Returns the original string if no relativization has been done
- IPath result = path.makeRelativeTo(new Path(rootPath));
- return path.equals(result) ? original : result.toString();
- }
-
- public static String makeRelative(String urlString, URL rootURL) {
- // we only traffic in file: URLs
- int index = urlString.indexOf(FILE_PROTOCOL);
- if (index == -1)
- return urlString;
- index = index + 5;
-
- // ensure we have an absolute path to start with
- boolean done = false;
- URL url = null;
- String file = urlString;
- while (!done) {
- try {
- url = new URL(file);
- file = url.getFile();
- } catch (java.net.MalformedURLException e) {
- done = true;
- }
- }
- if (url == null || !new File(url.getFile()).isAbsolute())
- return urlString;
-
- String rootString = rootURL.toExternalForm();
- IPath one = new Path(urlString.substring(index));
- IPath two = new Path(rootString.substring(rootString.indexOf(FILE_PROTOCOL) + 5));
- String deviceOne = one.getDevice();
- String deviceTwo = two.getDevice();
- // do checking here because we want to return the exact string we got initially if
- // we are unable to make it relative.
- if (deviceOne != deviceTwo && (deviceOne == null || !deviceOne.equalsIgnoreCase(two.getDevice())))
- return urlString;
-
- return urlString.substring(0, index) + one.makeRelativeTo(two);
- }
-
- public static String makeArrayRelative(String array, URL rootURL) {
- StringBuffer buffer = new StringBuffer();
- for (StringTokenizer tokenizer = new StringTokenizer(array, COMMA); tokenizer.hasMoreTokens();) {
- String token = tokenizer.nextToken();
- String absolute = makeRelative(token, rootURL);
- buffer.append(absolute);
- if (tokenizer.hasMoreTokens())
- buffer.append(',');
- }
- return buffer.toString();
- }
-
- public static String makeArrayAbsolute(String array, URL rootURL) {
- StringBuffer buffer = new StringBuffer();
- for (StringTokenizer tokenizer = new StringTokenizer(array, COMMA); tokenizer.hasMoreTokens();) {
- String token = tokenizer.nextToken();
- String absolute = makeAbsolute(token, rootURL);
- buffer.append(absolute);
- if (tokenizer.hasMoreTokens())
- buffer.append(',');
- }
- return buffer.toString();
- }
-
- /*
- * Make the given path absolute to the specified root, if applicable. If not, then
- * return the path as-is.
- *
- * TODO: can we use URIUtil in these #make* methods?
- */
- public static String makeAbsolute(String original, String rootPath) {
- IPath path = new Path(original);
- // ensure we have a relative path to start with
- if (path.isAbsolute())
- return original;
- IPath root = new Path(rootPath);
- return root.addTrailingSeparator().append(original.replace(':', '}')).toOSString().replace('}', ':');
- }
-
- public static String makeAbsolute(String urlString, URL rootURL) {
- // we only traffic in file: URLs
- int index = urlString.indexOf(FILE_PROTOCOL);
- if (index == -1)
- return urlString;
- index = index + 5;
-
- // ensure we have a relative path to start with
- boolean done = false;
- URL url = null;
- String file = urlString;
- while (!done) {
- try {
- url = new URL(file);
- file = url.getFile();
- } catch (java.net.MalformedURLException e) {
- done = true;
- }
- }
- if (url == null || new File(url.getFile()).isAbsolute())
- return urlString;
-
- return urlString.substring(0, index - 5) + makeAbsolute(urlString.substring(index), rootURL.toExternalForm());
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Log.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Log.java
deleted file mode 100644
index e83b92058..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Log.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import org.osgi.framework.BundleContext;
-import org.osgi.service.log.LogService;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * Utility class with static methods for logging to LogService, if available
- */
-public class Log {
- static private ServiceTracker logTracker;
- static private boolean useLog = false;
-
- public static void dispose() {
- if (logTracker != null) {
- logTracker.close();
- }
- logTracker = null;
- }
-
- public static void init(BundleContext bc) {
- logTracker = new ServiceTracker(bc, LogService.class.getName(), null);
- logTracker.open();
- }
-
- public static void log(int level, Object obj, String method, String message) {
- log(level, obj, method, message, null);
- }
-
- public static void log(int level, Object obj, String method, String message, Throwable e) {
- LogService logService = null;
- String msg = "";
- if (method == null) {
- if (obj != null)
- msg = "(" + obj.getClass().getName() + ")";
- } else if (obj == null)
- msg = "[" + method + "]" + message;
- else
- msg = "[" + method + "](" + obj.getClass().getName() + ")";
- msg += message;
- if (logTracker != null)
- logService = (LogService) logTracker.getService();
-
- if (logService != null) {
- logService.log(level, msg, e);
- } else {
- String levelSt = null;
- if (level == LogService.LOG_DEBUG)
- levelSt = "DEBUG";
- else if (level == LogService.LOG_INFO)
- levelSt = "INFO";
- else if (level == LogService.LOG_WARNING)
- levelSt = "WARNING";
- else if (level == LogService.LOG_ERROR) {
- levelSt = "ERROR";
- useLog = true;
- }
- if (useLog) {
- System.err.println("[" + levelSt + "]" + msg);
- if (e != null)
- e.printStackTrace();
- }
- }
- }
-
- public static void log(int level, Object obj, String method, Throwable e) {
- log(level, obj, method, null, e);
- }
-
- public static void log(int level, String message) {
- log(level, null, null, message, null);
- }
-
- public static void log(int level, String message, Throwable e) {
- log(level, null, null, message, e);
- }
-
- private Log() {
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Messages.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Messages.java
deleted file mode 100644
index 1dd4943dc..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Messages.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 - Initial API and implementation
- **********************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.frameworkadmin.equinox.messages";//$NON-NLS-1$
-
- public static String exception_inputFileIsDirectory;
- public static String exception_fwConfigLocationName;
- public static String exception_failedToCreateDir;
- public static String exception_failedToRename;
- public static String exception_launcherLocationNotSet;
- public static String exception_noInstallArea;
- public static String exception_fileURLExpected;
- public static String exception_bundleManifest;
- public static String exception_createAbsoluteURI;
- public static String exception_nullConfigArea;
- public static String exception_noFrameworkLocation;
- public static String exception_errorSavingConfigIni;
-
- public static String log_configFile;
- public static String log_configProps;
- public static String log_renameSuccessful;
- public static String log_fwConfigSave;
- public static String log_launcherConfigSave;
- public static String log_shared_config_url;
- public static String log_shared_config_relative_url;
- public static String log_shared_config_file_missing;
- public static String log_failed_reading_properties;
- public static String log_failed_make_absolute;
- public static String log_failed_make_relative;
-
- public static String exception_unexpectedfwConfigLocation;
- public static String exception_persistantLocationNotEqualConfigLocation;
- public static String exception_noLocations;
- public static String exception_errorReadingFile;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java
deleted file mode 100644
index 72612ca04..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java
+++ /dev/null
@@ -1,199 +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;
-
- URI base = null;
- if (launcherData.getLauncher() != null)
- base = launcherData.getLauncher().getParentFile().toURI();
- else if (launcherData.getHome() != null)
- base = launcherData.getHome().toURI();
- File result = getOSGiInstallArea(programArgs, properties, base);
- if (result != null)
- return result;
-
- if (launcherData.getHome() != null) {
- return launcherData.getHome();
- }
-
- if (launcherData.getFwJar() != null)
- return fromOSGiJarToOSGiInstallArea(launcherData.getFwJar().getAbsolutePath());
-
- File launcherFile = launcherData.getLauncher();
- if (launcherFile != null) {
- if (Constants.OS_MACOSX.equals(launcherData.getOS())) {
- //the equinox launcher will look 3 levels up on the mac when going from executable to launcher.jar
- //see org.eclipse.equinox.executable/library/eclipse.c : findStartupJar();
- IPath launcherPath = new Path(launcherFile.getAbsolutePath());
- if (launcherPath.segmentCount() > 4) {
- //removing "Eclipse.app/Contents/MacOS/eclipse"
- launcherPath = launcherPath.removeLastSegments(4);
- return launcherPath.toFile();
- }
- }
- return launcherFile.getParentFile();
- }
- return null;
- }
-
- public static URI getFrameworkJar(List lines, URI launcherFolder) {
- String fwk = ParserUtils.getValueForArgument(EquinoxConstants.OPTION_FW, lines);
- if (fwk == null) {
- //Search the file system using the default location
- URI location = FileUtils.getEclipsePluginFullLocation(EquinoxConstants.FW_SYMBOLIC_NAME, new File(URIUtil.toFile(launcherFolder), EquinoxConstants.PLUGINS_DIR));
- if (location != null)
- return location;
- return null;
- }
- try {
- return URIUtil.makeAbsolute(URIUtil.fromString(fwk), launcherFolder);
- } catch (URISyntaxException e) {
- Log.log(LogService.LOG_ERROR, NLS.bind(Messages.exception_createAbsoluteURI, fwk, launcherFolder));
- return null;
- }
- }
-
- //This method should only be used to determine the osgi install area when reading the eclipse.ini
- public static File getOSGiInstallArea(List args, Properties properties, URI base) {
- if (args == null)
- return null;
- String install = getValueForArgument(EquinoxConstants.OPTION_INSTALL, args);
- if (install == null && properties != null)
- install = properties.getProperty("osgi.install.area"); //$NON-NLS-1$
-
- if (install != null) {
- if (install.startsWith(FILE_PROTOCOL))
- install = install.substring(FILE_PROTOCOL.length() + 1);
- File installFile = new File(install);
- if (installFile.isAbsolute())
- return installFile;
- return URIUtil.toFile(URIUtil.makeAbsolute(installFile.toURI(), base));
- }
-
- String startup = getValueForArgument(EquinoxConstants.OPTION_STARTUP, args);
- if (startup != null && base != null) {
- if (startup.startsWith(FILE_PROTOCOL)) {
- try {
- URI startupURI = new URI(startup);
- startup = new File(startupURI).getAbsolutePath();
- } catch (URISyntaxException e) {
- startup = startup.substring(FILE_PROTOCOL.length() + 1);
- }
- }
-
- File osgiInstallArea = fromOSGiJarToOSGiInstallArea(startup);
- if (osgiInstallArea.isAbsolute())
- return osgiInstallArea;
-
- File baseFile = new File(base);
- return new File(baseFile, osgiInstallArea.getPath());
- }
- return null;
- }
-
- public static File fromOSGiJarToOSGiInstallArea(String path) {
- IPath parentFolder = new Path(path).removeLastSegments(1);
- if ("plugins".equalsIgnoreCase(parentFolder.lastSegment())) //$NON-NLS-1$
- return parentFolder.removeLastSegments(1).toFile();
- return parentFolder.toFile();
- }
-
- public static boolean isArgumentSet(String arg, List args) {
- if (arg == null || args == null)
- return false;
- for (int i = 0; i < args.size(); i++) {
- if (args.get(i) == null)
- continue;
- if (((String) args.get(i)).equalsIgnoreCase(arg)) {
- return true;
- }
- }
- return false;
- }
-
- public static String getValueForArgument(String arg, List args) {
- if (arg == null || args == null)
- return null;
- for (int i = 0; i < args.size(); i++) {
- if (args.get(i) == null)
- continue;
- if (((String) args.get(i)).equalsIgnoreCase(arg)) {
- if (i + 1 < args.size() && 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 a5d0d5083..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/messages.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2010 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-exception_inputFileIsDirectory= Illegal Argument: inputFile {0} must not be a directory.
-exception_fwConfigLocationName = Illegal State: Framework Configuration location "{0}" does not match {1}.
-exception_failedToCreateDir = Failed to create directory {0}.
-exception_failedToRename=Failed to rename {0} to {1}.
-exception_launcherLocationNotSet=The launcher location has not been set.
-exception_noInstallArea=Unable to determine osgi.install.area.
-exception_fileURLExpected= The property {0} = {1} is expected to be a \"file:\" URL.
-exception_bundleManifest= Unable to get bundle manifest for: {0}
-exception_createAbsoluteURI=Failed to create absolute URI from \"{0}\" and \"{1}\".
-exception_nullConfigArea=The configuration area is not set.
-exception_noFrameworkLocation = Unable to determinate the osgi.framework location.
-exception_errorSavingConfigIni = Error saving config.ini.
-exception_errorReadingFile = An error occured while reading {0}.
-
-log_configFile= Configuration file ({0}) has been read successfully.
-log_configProps= Configuration properties is empty.
-log_renameSuccessful= Successfully renamed {0} to {1}.
-log_fwConfigSave= Framework Configuration was saved successfully in {0}.
-log_launcherConfigSave= Launcher Configuration was saved successfully in {0}.
-log_shared_config_url=Failed creating shared configuration url for {0}.
-log_shared_config_relative_url=Failed creating shared configuration url for root: {0} and sharedConfiguration: {1}.
-log_shared_config_file_missing=Failed creating shared configuration. File missing: {0}.
-log_failed_reading_properties=Failed reading properties from file: {0}.
-log_failed_make_absolute=Failed to create absolute path for {0}.
-log_failed_make_relative=Failed to create relative path for {0}.
-
-exception_unexpectedfwConfigLocation=The specified framework configuration ({0}) location is not a directory but its name does NOT equal \"{1}\".
-exception_persistantLocationNotEqualConfigLocation=The framework persistent data location ({0}) is not the same as the framework configuration location ({1}).
-exception_noLocations=No locations are set (framework configuration, persistent data, or launcher home).
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java
deleted file mode 100644
index e5a439fc3..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox.utils;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxConstants;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.osgi.service.environment.Constants;
-import org.osgi.framework.Version;
-
-public class FileUtils {
- private static String FILE_SCHEME = "file"; //$NON-NLS-1$
- private static String FILE_PROTOCOL = "file:"; //$NON-NLS-1$
- private static String REFERENCE_PROTOCOL = "reference:"; //$NON-NLS-1$
- private static String INITIAL_PREFIX = "initial@"; //$NON-NLS-1$
-
- // based on org.eclipse.core.runtime.adaptor.EclipseStarter#searchForBundle
- public static URI getEclipseRealLocation(Manipulator manipulator, String location) {
- //if this is some form of URL just return it
- try {
- new URL(location);
- return URIUtil.makeAbsolute(new URI(location), ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData()).toURI());
- } catch (URISyntaxException e) {
- // expected
- } catch (MalformedURLException e) {
- // expected
- }
-
- File base = new File(location);
- if (!base.isAbsolute()) {
- String pluginsDir = getSysPath(manipulator);
- if (pluginsDir == null)
- return null;
- base = new File(pluginsDir, location);
- }
-
- return getEclipsePluginFullLocation(base.getName(), base.getParentFile());
- }
-
- //This mimics the logic of EclipseStarter#getSysPath();
- private static String getSysPath(final Manipulator manipulator) {
- Properties properties = manipulator.getConfigData().getProperties();
- String path = (String) properties.get(EquinoxConstants.PROP_OSGI_SYSPATH);
- if (path != null)
- return path;
- path = (String) properties.get(EquinoxConstants.PROP_OSGI_FW);
- if (path != null) {
- if (path.startsWith(FILE_PROTOCOL))
- path = path.substring(FILE_PROTOCOL.length());
- File file = new File(path);
- return file.getParentFile().getAbsolutePath();
- }
-
- LauncherData launcherData = manipulator.getLauncherData();
- File home = launcherData.getHome();
- File pluginsDir = null;
- if (home != null)
- pluginsDir = new File(home, EquinoxConstants.PLUGINS_DIR);
- else if (launcherData.getFwJar() != null)
- pluginsDir = launcherData.getFwJar().getParentFile();
- else if (launcherData.getLauncher() != null) {
- File launcherDir = null;
- if (Constants.OS_MACOSX.equals(launcherData.getOS())) {
- IPath launcherPath = new Path(launcherData.getLauncher().getAbsolutePath());
- if (launcherPath.segmentCount() > 4) {
- launcherPath = launcherPath.removeLastSegments(4);
- launcherDir = launcherPath.toFile();
- }
- } else
- launcherDir = launcherData.getLauncher().getParentFile();
- pluginsDir = new File(launcherDir, EquinoxConstants.PLUGINS_DIR);
- }
- if (pluginsDir != null)
- return pluginsDir.getAbsolutePath();
- return null;
- }
-
- public static String removeEquinoxSpecificProtocols(String location) {
- if (location == null)
- return null;
- String ret = location;
- if (location.startsWith(REFERENCE_PROTOCOL))
- ret = location.substring(REFERENCE_PROTOCOL.length());
- else if (location.startsWith(INITIAL_PREFIX))
- ret = location.substring(INITIAL_PREFIX.length());
- return ret;
- }
-
- public static URI getRealLocation(Manipulator manipulator, final String location) {
- return FileUtils.getEclipseRealLocation(manipulator, removeEquinoxSpecificProtocols(location));
- }
-
- /**
- * If a bundle of the specified location is in the Eclipse plugin format (either plugin-name_version.jar
- * or as a folder named plugin-name_version ), return version string.Otherwise, return null;
- *
- * @return version string. If invalid format, return null.
- */
- private static Version getVersion(String version) {
- if (version.length() == 0)
- return Version.emptyVersion;
-
- if (version.endsWith(".jar")) //$NON-NLS-1$
- version = version.substring(0, version.length() - 4);
-
- try {
- return new Version(version);
- } catch (IllegalArgumentException e) {
- // bad format
- return null;
- }
- }
-
- /**
- * Find the named plugin in the given bundlesDir
- * @param pluginName
- * @param bundlesDir
- * @return a URL string for the found plugin, or null
- */
- // Based on org.eclipse.core.runtime.adaptor.EclipseStarter#searchFor
- public static URI getEclipsePluginFullLocation(String pluginName, File bundlesDir) {
- if (bundlesDir == null)
- return null;
- File[] candidates = bundlesDir.listFiles();
- if (candidates == null)
- return null;
-
- File result = null;
- Version maxVersion = null;
-
- for (int i = 0; i < candidates.length; i++) {
- String candidateName = candidates[i].getName();
- if (!candidateName.startsWith(pluginName))
- continue;
-
- if (candidateName.length() > pluginName.length() && candidateName.charAt(pluginName.length()) != '_') {
- // allow jar file with no _version tacked on the end
- if (!candidates[i].isFile() || (candidateName.length() != 4 + pluginName.length()) || !candidateName.endsWith(".jar")) //$NON-NLS-1$
- continue;
- }
-
- String candidateVersion = ""; //$NON-NLS-1$
- if (candidateName.length() > pluginName.length() + 1 && candidateName.charAt(pluginName.length()) == '_')
- candidateVersion = candidateName.substring(pluginName.length() + 1);
-
- Version currentVersion = getVersion(candidateVersion);
- if (currentVersion == null)
- continue;
-
- if (maxVersion == null || maxVersion.compareTo(currentVersion) < 0) {
- maxVersion = currentVersion;
- result = candidates[i];
- }
- }
- return result != null ? result.getAbsoluteFile().toURI() : null;
- }
-
- public static URI fromPath(String path) throws URISyntaxException {
- if (path.startsWith(FILE_PROTOCOL)) {
- try {
- return new URI(path);
- } catch (URISyntaxException e) {
- path = path.substring(FILE_PROTOCOL.length() + 1);
- }
- }
-
- File f = new File(path);
- if (f.isAbsolute())
- return f.toURI();
- return URIUtil.fromString(FILE_PROTOCOL + path);
- }
-
- public static String toPath(URI uri) {
- if (!FILE_SCHEME.equalsIgnoreCase(uri.getScheme()))
- return new File(URIUtil.toUnencodedString(uri)).getPath();
- return URIUtil.toFile(uri).getAbsolutePath();
- }
-
- public static String toFileURL(URI uri) {
- if (uri.getScheme() != null)
- return URIUtil.toUnencodedString(uri);
- return FILE_PROTOCOL + URIUtil.toUnencodedString(uri);
- }
-
- public static URI fromFileURL(String url) throws URISyntaxException {
- if (url.startsWith(FILE_PROTOCOL)) {
- return URIUtil.fromString(new File(url.substring(FILE_PROTOCOL.length())).isAbsolute() ? url : url.substring(FILE_PROTOCOL.length()));
- }
- throw new URISyntaxException(url, "Not a file url");
- }
-
- /**
- * Loads an ini file, returning a list of all non-blank lines in the file.
- */
- public static List loadFile(File file) throws IOException {
- BufferedReader br = null;
- try {
- br = new BufferedReader(new FileReader(file));
-
- String line;
- List list = new ArrayList();
- while ((line = br.readLine()) != null) {
- //skip whitespace
- if (line.trim().length() > 0)
- list.add(line);
- }
- return list;
- } finally {
- if (br != null)
- try {
- br.close();
- } catch (IOException e) {
- //Ignore
- }
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/.classpath b/bundles/org.eclipse.equinox.frameworkadmin.test/.classpath
deleted file mode 100644
index 6f3b481ac..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/.project b/bundles/org.eclipse.equinox.frameworkadmin.test/.project
deleted file mode 100644
index 3f8865413..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.frameworkadmin.test</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index acf51d1e2..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,346 +0,0 @@
-#Mon Oct 20 11:38:02 EDT 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index ac0fd9e21..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,9 +0,0 @@
-#Wed Oct 24 10:14:02 EDT 2007
-eclipse.preferences.version=1
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index c231f4e00..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Wed Oct 24 10:11:19 EDT 2007
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/Framework Admin Test.launch b/bundles/org.eclipse.equinox.frameworkadmin.test/Framework Admin Test.launch
deleted file mode 100644
index c9e978704..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/Framework Admin Test.launch
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="append.args" value="true"/>
-<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
-<booleanAttribute key="default" value="false"/>
-<stringAttribute key="deselected_workspace_plugins" value="org.eclipse.equinox.p2.ui.sdk,ie.wombat.jbdiff.test,org.eclipse.equinox.p2.tools,org.eclipse.equinox.p2.ui.admin,org.eclipse.equinox.p2.ui.admin.rcp,org.eclipse.equinox.p2.selfhosting"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/IBM-1.6.0-20090519-SR5"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.equinox.frameworkadmin.tests.AllTests"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.frameworkadmin.test"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.equinox.p2.director.app.product"/>
-<booleanAttribute key="run_in_ui_thread" value="true"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.swt.win32.win32.x86@default:false,org.mortbay.jetty.util@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.jface.databinding@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.osgi.util@default:default,org.eclipse.equinox.http.registry@default:default,javax.servlet@default:default,org.eclipse.equinox.common@2:true,org.eclipse.ui.navigator@default:default,org.eclipse.text@default:default,org.eclipse.ui.ide@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.apache.lucene.analysis@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.apache.ant@default:default,org.eclipse.core.filesystem.win32.x86@default:false,org.eclipse.swt@default:default,org.eclipse.core.resources.win32.x86@default:false,org.eclipse.osgi.services@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.core.commands@default:default,org.apache.commons.el@default:default,org.eclipse.team.core@default:default,org.eclipse.search@default:default,org.eclipse.ecf@default:default,org.eclipse.equinox.security@default:default,org.eclipse.jdt.core@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.app@default:default,com.ibm.icu@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.core.net.win32.x86@default:false,org.eclipse.compare@default:default,org.apache.commons.logging@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.jface.text@default:default,org.eclipse.update.core.win32@default:false,org.eclipse.osgi@-1:true,org.eclipse.core.net@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.equinox.security.ui@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.ecf.identity@default:default,org.junit@default:default,org.eclipse.core.variables@default:default,javax.servlet.jsp@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.update.core@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.ide.application@default:default,org.apache.lucene@default:default,org.eclipse.team.ui@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.help.ui@default:default,org.eclipse.ui.console@default:default,org.eclipse.core.runtime@default:true,org.eclipse.equinox.http.servlet@default:default,org.eclipse.core.databinding@default:default,org.eclipse.jface@default:default,org.eclipse.ui.editors@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.help.base@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.ant.core@default:default,org.eclipse.ui.win32@default:false,org.eclipse.debug.ui@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.jobs@default:default,org.eclipse.debug.core@default:default,org.eclipse.help@default:default,org.eclipse.ui@default:default,org.eclipse.core.expressions@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.equinox.preferences@default:default,org.eclipse.update.configurator@3:true,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.pde.junit.runtime@default:default,org.eclipse.compare.core@default:default,org.mortbay.jetty.server@default:default,org.apache.jasper@default:default,org.eclipse.update.ui@default:default,org.eclipse.ui.views@default:default,org.eclipse.core.resources@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.equinox.p2.testserver@default:default,org.eclipse.equinox.p2.tests@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.core.tests.harness@default:default,org.eclipse.equinox.p2.exemplarysetup@default:default,org.eclipse.jdt.core@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.p2.tests.verifier@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.tests.ui@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.http@default:default,org.eclipse.sdk@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.equinox.p2.director.app@default:default,aniefer.preferences.synchronizer@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.platform.doc.isv@default:default,org.eclipse.equinox.frameworkadmin.test@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.installer@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,ie.wombat.jbdiff@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.sar@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.pde.core@default:default,org.easymock@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.sat4j.core@default:default,org.eclipse.equinox.p2.artifact.optimizers@default:default,org.eclipse.equinox.p2.artifact.processors@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.ant.core@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.swt.tools@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.p2.tests.optimizers@default:default,org.eclipse.pde.build@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.pde.build.tests@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,rcp@default:default,org.eclipse.platform.doc.user@default:default,org.eclipse.pde.doc.user@default:default,org.sat4j.pb@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.test.performance@default:default"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<booleanAttribute key="useProduct" value="false"/>
-</launchConfiguration> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.frameworkadmin.test/META-INF/MANIFEST.MF
deleted file mode 100644
index 96dd29818..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Test Plug-in for Framework Admin
-Bundle-SymbolicName: org.eclipse.equinox.frameworkadmin.test
-Bundle-Version: 1.1.0.qualifier
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.equinox.frameworkadmin,
- org.eclipse.equinox.frameworkadmin.equinox;bundle-version="1.0.100",
- org.junit;bundle-version="3.8.0"
-Bundle-Activator: org.eclipse.equinox.frameworkadmin.tests.Activator
-Import-Package: org.osgi.framework;version="1.4.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Export-Package: org.eclipse.equinox.frameworkadmin.tests
-Bundle-ActivationPolicy: lazy
-Eclipse-BundleShape: dir
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/about.html b/bundles/org.eclipse.equinox.frameworkadmin.test/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/build.properties b/bundles/org.eclipse.equinox.frameworkadmin.test/build.properties
deleted file mode 100644
index 7023dcdbf..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- dataFile/,\
- about.html
-src.includes = about.html
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/bundle_1/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/bundle_1/META-INF/MANIFEST.MF
deleted file mode 100644
index 3a535b6c4..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/bundle_1/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,5 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Bundle 1
-Bundle-SymbolicName: bundle_1
-Bundle-Version: 1.0.0
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/bundle_2/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/bundle_2/META-INF/MANIFEST.MF
deleted file mode 100644
index f46d7f1a1..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/bundle_2/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,5 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Bundle 2
-Bundle-SymbolicName: bundle_2
-Bundle-Version: 1.0.0
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/dummy.frameworkextension_1.0.0.jar b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/dummy.frameworkextension_1.0.0.jar
deleted file mode 100644
index e69311419..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/dummy.frameworkextension_1.0.0.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.equinox.launcher.jar b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.equinox.launcher.jar
deleted file mode 100644
index 5947c8dee..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.equinox.launcher.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.equinox.simpleconfigurator.jar b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.equinox.simpleconfigurator.jar
deleted file mode 100644
index 8a631d83a..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.equinox.simpleconfigurator.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.osgi.jar b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.osgi.jar
deleted file mode 100644
index 20ca2696d..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.osgi.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.osgi_3.4.0.jar b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.osgi_3.4.0.jar
deleted file mode 100644
index 793ad70aa..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.osgi_3.4.0.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest1/conf/config.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest1/conf/config.ini
deleted file mode 100644
index c9f0304f6..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest1/conf/config.ini
+++ /dev/null
@@ -1 +0,0 @@
-foo=bar \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest1/eclipse.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest1/eclipse.ini
deleted file mode 100644
index 4f54e6223..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest1/eclipse.ini
+++ /dev/null
@@ -1,2 +0,0 @@
--configuration
-conf \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest3/configuration/config.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest3/configuration/config.ini
deleted file mode 100644
index c9f0304f6..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest3/configuration/config.ini
+++ /dev/null
@@ -1 +0,0 @@
-foo=bar \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest3/eclipse.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest3/eclipse.ini
deleted file mode 100644
index fbcc88191..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest3/eclipse.ini
+++ /dev/null
@@ -1 +0,0 @@
--foobar \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/conf/config.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/conf/config.ini
deleted file mode 100644
index c9f0304f6..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/conf/config.ini
+++ /dev/null
@@ -1 +0,0 @@
-foo=bar \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/eclipse.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/eclipse.ini
deleted file mode 100644
index b31688c3a..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/eclipse.ini
+++ /dev/null
@@ -1,11 +0,0 @@
--startup
-plugins\org.eclipse.equinox.launcher_1.0.200.v20090306-1900.jar
---launcher.library
-plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090306-1900
--showsplash
-org.eclipse.platform
---launcher.XXMaxPermSize
-256m
--vmargs
--Xms40m
--Xmx356m
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug285935/conf/config.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug285935/conf/config.ini
deleted file mode 100644
index c9f0304f6..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug285935/conf/config.ini
+++ /dev/null
@@ -1 +0,0 @@
-foo=bar \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug285935/eclipse.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug285935/eclipse.ini
deleted file mode 100644
index 06e5db00b..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug285935/eclipse.ini
+++ /dev/null
@@ -1,5 +0,0 @@
--startup
-
-plugins/org.eclipse.equinox.launcher_1.0.300.v20090720.jar
--configuration
-conf \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/config.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/config.ini
deleted file mode 100644
index 7a8f3fa37..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/config.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-config.shared=false
-from.parent=true \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/user-config.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/user-config.ini
deleted file mode 100644
index f46e7259d..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/user-config.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-osgi.sharedConfiguration.area=file\:configuration/
-config.shared=true
-
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/user-noshare-config.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/user-noshare-config.ini
deleted file mode 100644
index dd1498b48..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/user-noshare-config.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-config.shared=false
-
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/pom.xml b/bundles/org.eclipse.equinox.frameworkadmin.test/pom.xml
deleted file mode 100644
index c9f08d58a..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.frameworkadmin.test</artifactId>
- <version>1.1.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AbstractFwkAdminTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AbstractFwkAdminTest.java
deleted file mode 100644
index 27b5c2902..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AbstractFwkAdminTest.java
+++ /dev/null
@@ -1,437 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URL;
-import java.util.List;
-import java.util.Properties;
-import junit.framework.TestCase;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.osgi.service.datalocation.Location;
-import org.osgi.framework.*;
-import org.osgi.util.tracker.ServiceTracker;
-
-public abstract class AbstractFwkAdminTest extends TestCase {
- private ServiceTracker fwAdminTracker;
- private File testFolder;
-
- public AbstractFwkAdminTest(String name) {
- super(name);
- }
-
- /**
- * Copy an input stream to an output stream.
- * Optionally close the streams when done.
- * Return the number of bytes written.
- */
- public static int copyStream(InputStream in, boolean closeIn, OutputStream out, boolean closeOut) throws IOException {
- try {
- int written = 0;
- byte[] buffer = new byte[16 * 1024];
- int len;
- while ((len = in.read(buffer)) != -1) {
- out.write(buffer, 0, len);
- written += len;
- }
- return written;
- } finally {
- try {
- if (closeIn) {
- in.close();
- }
- } finally {
- if (closeOut) {
- out.close();
- }
- }
- }
- }
-
- public static boolean delete(File file) {
- if (!file.exists())
- return true;
- if (file.isDirectory()) {
- File[] children = file.listFiles();
- for (int i = 0; i < children.length; i++)
- delete(children[i]);
- }
- return file.delete();
- }
-
- public FrameworkAdmin getEquinoxFrameworkAdmin() throws BundleException {
- final String FILTER_OBJECTCLASS = "(" + Constants.OBJECTCLASS + "=" + FrameworkAdmin.class.getName() + ")";
- final String filterFwName = "(" + FrameworkAdmin.SERVICE_PROP_KEY_FW_NAME + "=Equinox)";
- final String filterLauncherName = "(" + FrameworkAdmin.SERVICE_PROP_KEY_LAUNCHER_NAME + "=Eclipse.exe)";
- final String filterFwAdmin = "(&" + FILTER_OBJECTCLASS + filterFwName + filterLauncherName + ")";
-
- String FWK_ADMIN_EQ = "org.eclipse.equinox.frameworkadmin.equinox";
- Bundle b = Platform.getBundle(FWK_ADMIN_EQ);
- if (b == null)
- throw new IllegalStateException("Bundle: " + FWK_ADMIN_EQ + " is required for this test");
- b.start();
-
- if (fwAdminTracker == null) {
- Filter filter;
- try {
- filter = Activator.getContext().createFilter(filterFwAdmin);
- fwAdminTracker = new ServiceTracker(Activator.getContext(), filter, null);
- fwAdminTracker.open();
- } catch (InvalidSyntaxException e) {
- // never happens
- e.printStackTrace();
- }
- }
- return (FrameworkAdmin) fwAdminTracker.getService();
- }
-
- protected File getTestFolder(String name) {
- return getTestFolder(name, true);
- }
-
- protected File getTestFolder(String name, boolean clean) {
- Location instanceLocation = Platform.getInstanceLocation();
- URL url = instanceLocation != null ? instanceLocation.getURL() : null;
- if (instanceLocation == null || !instanceLocation.isSet() || url == null) {
- testFolder = Activator.getContext().getDataFile(name);
- } else {
- testFolder = new File(url.getFile(), name);
- }
-
- if (clean && testFolder.exists())
- delete(testFolder);
- testFolder.mkdirs();
- return testFolder;
- }
-
- protected void runTest() throws Throwable {
- super.runTest();
-
- //clean up after success
- if (testFolder != null && testFolder.exists()) {
- delete(testFolder);
- testFolder = null;
- }
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- if (fwAdminTracker != null) {
- fwAdminTracker.close();
- }
- }
-
- public void assertIsFile(File file) {
- if (!file.exists())
- fail("File: " + file.toString() + " can't be found.");
- if (!file.isFile())
- fail("File: " + file.toString() + " is expected to be a file.");
- }
-
- public void assertIsDirectory(File file) {
- if (!file.exists())
- fail("Directory: " + file.toString() + " can't be found.");
- if (!file.isDirectory())
- fail("Directory: " + file.toString() + " is expected to be a directory.");
- }
-
- public void assertNothing(File file) {
- if (file.exists())
- fail("No file or directory should be there: " + file);
- }
-
- public void assertNotContent(File file, String search) {
- if (!file.exists())
- fail("File: " + file.toString() + " can't be found.");
- try {
- BufferedReader reader = null;
- try {
- reader = new BufferedReader(new FileReader(file));
- while (reader.ready()) {
- String line = reader.readLine();
- if (line.indexOf(search) >= 0)
- fail("The string: " + search + " was not expected in this file: " + file.getAbsolutePath());
- }
- } finally {
- if (reader != null)
- reader.close();
- }
- } catch (FileNotFoundException e) {
- //ignore, caught before
- } catch (IOException e) {
- fail("String: " + search + " not found in " + file.getAbsolutePath());
- }
- }
-
- public void assertIniFileNotContain(File file, String argument, String value) {
- List args = null;
- try {
- args = FileUtils.loadFile(file);
- } catch (IOException e) {
- fail("Can't read file " + file);
- }
- String tmp = ParserUtils.getValueForArgument(argument, args);
- if (tmp == null)
- return;
-
- assertTrue(tmp.indexOf(value) == -1);
- }
-
- private String getProperty(File file, String property) {
- Properties p = new Properties();
- FileInputStream fis = null;
- try {
- fis = new FileInputStream(file);
- p.load(fis);
- } catch (FileNotFoundException e) {
- fail("Can't find file " + file);
- } catch (IOException e) {
- fail("Error reading " + file);
- } finally {
- if (fis != null)
- try {
- fis.close();
- } catch (IOException e) {
- //ignore
- }
- }
- return p.getProperty(property);
- }
-
- public void assertPropertyContains(File file, String property, String text) {
- String value = getProperty(file, property);
- if (value == null)
- fail("property: " + property + " not found in: " +file);
-
- int index = value.indexOf(text);
- if (index == -1)
- fail(text + " not found in property:" + property + " for file: " +file);
- }
-
- public void assertNotPropertyContains(File file, String property, String text) {
- String value = getProperty(file, property);
- if (value == null)
- return;
-
- int index = value.indexOf(text);
- if (index != -1)
- fail(text + " found in property:" + property + " for file: " +file);
- }
-
- public void assertEquals(String[] array1, String[] array2) {
- if (array1 == null || array2 == null) {
- if (array1 == array2)
- return;
- fail(array1 + " not equal to " + array2);
- }
- assertEquals(array1.length, array2.length);
- for (int i = 0; i < array1.length; i++) {
- assertEquals(array1[i], array2[i]);
- }
- }
-
- public void assertContent(File file, String search) {
- assertContents(file, new String [] { search } );
- }
- public void assertContents(File file, String [] lines) {
- if (!file.exists())
- fail("File: " + file.toString() + " can't be found.");
- int idx = 0;
- try {
- BufferedReader reader = null;
- try {
- reader = new BufferedReader(new FileReader(file));
- while (reader.ready()) {
- String line = reader.readLine();
- if (line.indexOf(lines[idx]) >= 0) {
- if(++idx >= lines.length)
- return;
- }
- }
- } finally {
- if (reader != null)
- reader.close();
- }
- } catch (FileNotFoundException e) {
- //ignore, caught before
- } catch (IOException e) {
- fail("String: " + lines[idx] + " not found in " + file.getAbsolutePath());
- }
- fail("String:" + lines[idx] + " not found");
- }
-
- public void startSimpleConfiguratorManipulator() {
- final String SIMPLECONFIGURATOR_MANIPULATOR = "org.eclipse.equinox.simpleconfigurator.manipulator";
- Bundle manipulatorBundle = Platform.getBundle(SIMPLECONFIGURATOR_MANIPULATOR);
- if (manipulatorBundle == null)
- fail("Bundle: " + SIMPLECONFIGURATOR_MANIPULATOR + " is required for this test");
- try {
- manipulatorBundle.start();
- } catch (BundleException e) {
- fail("Exception while starting up " + SIMPLECONFIGURATOR_MANIPULATOR + ' ' + e.getMessage());
- }
- }
-
- public void stopSimpleConfiguratorManipulator() {
- final String SIMPLECONFIGURATOR_MANIPULATOR = "org.eclipse.equinox.simpleconfigurator.manipulator";
- Bundle manipulatorBundle = Platform.getBundle(SIMPLECONFIGURATOR_MANIPULATOR);
- if (manipulatorBundle == null)
- return;
- try {
- manipulatorBundle.stop();
- } catch (BundleException e) {
- fail("Exception while starting up " + SIMPLECONFIGURATOR_MANIPULATOR + ' ' + e.getMessage());
- }
- }
-
- /*
- * Copy
- * - if we have a file, then copy the file
- * - if we have a directory then merge
- */
- public static void copy(String message, File source, File target) {
- if (!source.exists())
- return;
- target.getParentFile().mkdirs();
- if (source.isDirectory()) {
- if (target.exists() && target.isFile())
- target.delete();
- if (!target.exists())
- target.mkdirs();
- File[] children = source.listFiles();
- for (int i = 0; i < children.length; i++)
- copy(message, children[i], new File(target, children[i].getName()));
- return;
- }
- InputStream input = null;
- OutputStream output = null;
- try {
- input = new BufferedInputStream(new FileInputStream(source));
- output = new BufferedOutputStream(new FileOutputStream(target));
-
- byte[] buffer = new byte[8192];
- int bytesRead = 0;
- while ((bytesRead = input.read(buffer)) != -1)
- output.write(buffer, 0, bytesRead);
- } catch (IOException e) {
- fail(message + ": " + e);
- } finally {
- if (input != null) {
- try {
- input.close();
- } catch (IOException e) {
- System.err.println("Exception while trying to close input stream on: " + source.getAbsolutePath());
- e.printStackTrace();
- }
- }
- if (output != null) {
- try {
- output.close();
- } catch (IOException e) {
- System.err.println("Exception while trying to close output stream on: " + target.getAbsolutePath());
- e.printStackTrace();
- }
- }
- }
- }
-
- /*
- * Look up and return a file handle to the given entry in the bundle.
- */
- protected File getTestData(String message, String entry) {
- if (entry == null)
- fail(message + " entry is null.");
- URL base = Activator.getContext().getBundle().getEntry(entry);
- if (base == null)
- fail(message + " entry not found in bundle: " + entry);
- try {
- String osPath = new Path(FileLocator.toFileURL(base).getPath()).toOSString();
- File result = new File(osPath);
- if (!result.getCanonicalPath().equals(result.getPath()))
- fail(message + " result path: " + result.getPath() + " does not match canonical path: " + result.getCanonicalFile().getPath());
- return result;
- } catch (IOException e) {
- fail(message + ": " + e);
- }
- // avoid compile error... should never reach this code
- return null;
- }
-
- protected Manipulator getFrameworkManipulator(File configuration, File launcher) throws BundleException {
- startSimpleConfiguratorManipulator();
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configuration);
- launcherData.setLauncher(launcher);
-
- return manipulator;
- }
-
- //This is a dumb helper writing out the values as they have been passed to it.
- protected void writeEclipseIni(File location, String[] lines) {
- location.getParentFile().mkdirs();
- BufferedWriter bw = null;
- try {
- bw = new BufferedWriter(new FileWriter(location));
- for (int j = 0; j < lines.length; j++) {
- bw.write(lines[j]);
- bw.newLine();
- }
- bw.flush();
-
- } catch (IOException e) {
- fail("Fail writing eclipse.ini file");
- } finally {
- if (bw != null)
- try {
- bw.close();
- } catch (IOException e) {
- fail("Fail writing eclipse.ini file in " + location);
- }
- }
- }
-
- //This is a dumb helper writing out the values as they have been passed to it
- protected void writeConfigIni(File location, Properties properties) {
- location.getParentFile().mkdirs();
- FileOutputStream out = null;
- try {
- out = new FileOutputStream(location);
- properties.store(out, "#header");
- } catch (IOException e) {
- fail("Faile writing config.ini in" + location);
- } finally {
- try {
- out.flush();
- out.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- out = null;
- }
- }
-
- public void assertContains(String message, BundleInfo[] bundles, URI location) {
- for (int i = 0; i < bundles.length; i++) {
- if (bundles[i].getLocation().equals(location))
- return;
- }
- fail(message + " Can't find the bundle info " + location);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Activator.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Activator.java
deleted file mode 100644
index bed2838eb..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Activator.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
- private static BundleContext ctx;
-
- public void start(BundleContext context) throws Exception {
- ctx = context;
-
- }
-
- public void stop(BundleContext context) throws Exception {
- ctx = null;
- }
-
- public static BundleContext getContext() {
- return ctx;
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java
deleted file mode 100644
index 0af378a55..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-
-import junit.framework.*;
-
-/**
- * Performs all automated director tests.
- */
-public class AllTests extends TestCase {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(Bug196525.class);
- suite.addTestSuite(Bug258370.class);
- suite.addTestSuite(CleanupTest.class);
- suite.addTestSuite(FrameworkExtensionTest.class);
- suite.addTestSuite(LauncherConfigLocationTest.class);
- suite.addTestSuite(LauncherDataTest.class);
- suite.addTestSuite(ManipulatorTests.class);
- suite.addTestSuite(NoConfigurationValueInEclipseIni.class);
- suite.addTestSuite(NoRenamingLauncherIni.class);
- suite.addTestSuite(OSGiVersionChange.class);
- suite.addTestSuite(ParserUtilsTest.class);
- suite.addTestSuite(ReaderTest1.class);
- suite.addTestSuite(ReaderTest2.class);
- suite.addTestSuite(ReaderTest3.class);
- suite.addTestSuite(ReaderTest4.class);
- suite.addTestSuite(ReaderTest5.class);
- suite.addTestSuite(ReaderTestBug267850.class);
- suite.addTestSuite(ReaderTestBug285935.class);
- suite.addTestSuite(RelativePathTest.class);
- suite.addTestSuite(RemovingABundle.class);
- suite.addTestSuite(RemovingAllBundles.class);
- suite.addTestSuite(RenamingLauncherIni.class);
- suite.addTestSuite(SharedConfigurationTest.class);
- suite.addTestSuite(SimpleConfiguratorComingAndGoing.class);
- suite.addTestSuite(SimpleConfiguratorTest.class);
- suite.addTestSuite(TestEclipseDataArea.class);
- suite.addTestSuite(TestRunningInstance.class);
- suite.addTestSuite(TestVMArg.class);
- suite.addTestSuite(UtilsTest.class);
- return suite;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug196525.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug196525.java
deleted file mode 100644
index 69a2d6877..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug196525.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class Bug196525 extends AbstractFwkAdminTest {
- private File installFolder = null;
- private File configurationFolder = null;
- private String launcherName = "eclipse";
- private File bundleTXT;
- private File configINI;
-
- public Bug196525(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- startSimpleConfiguratorManipulator();
- //create a configuration with osgi and simpleconfigurator in it
-
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- installFolder = Activator.getContext().getDataFile(Bug196525.class.getName());
- configurationFolder = new File(installFolder, "configuration");
-
- bundleTXT = new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info");
- configINI = new File(configurationFolder, "config.ini");
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- BundleInfo configuratorBi = new BundleInfo("org.eclipse.equinox.simpleconfigurator", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))), 1, true);
-
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(configuratorBi);
-
- manipulator.save(false);
- }
-
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- try {
- assertContains("1.0", manipulator.getConfigData().getBundles(), URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))));
- assertContains("2.0", manipulator.getConfigData().getBundles(), URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))));
- } catch (URISyntaxException e) {
- fail("Unexpected failure while creating URI");
- }
- BundleInfo bundle1Bi = new BundleInfo("bundle_1", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1"))), 2, true);
-
- manipulator.getConfigData().addBundle(bundle1Bi);
-
- manipulator.save(false);
-
- assertContent(bundleTXT, "org.eclipse.osgi");
- assertContent(configINI, "org.eclipse.osgi");
- assertContent(bundleTXT, "org.eclipse.equinox.simpleconfigurator");
- assertContent(configINI, "org.eclipse.equinox.simpleconfigurator");
- assertContent(bundleTXT, "bundle_1");
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug258370.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug258370.java
deleted file mode 100644
index 151c893a6..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug258370.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class Bug258370 extends FwkAdminAndSimpleConfiguratorTest {
- public Bug258370(String name) {
- super(name);
- // TODO Auto-generated constructor stub
- }
-
- public void testComma() {
- FrameworkAdmin fwkAdmin = null;
- try {
- fwkAdmin = getEquinoxFrameworkAdmin();
- } catch (BundleException e1) {
- fail("0.0");
- }
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = Activator.getContext().getDataFile(SimpleConfiguratorTest.class.getName());
- File configurationFolder = new File(installFolder, "configuration");
- String launcherName = "eclipse";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- try {
- manipulator.load();
- } catch (FrameworkAdminRuntimeException e) {
- fail("1.0");
- } catch (IOException e) {
- fail("2.0");
- }
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- BundleInfo osgiBi = null;
- BundleInfo bundle1Bi = null;
- BundleInfo bundle2Bi = null;
-
- try {
- osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- bundle1Bi = new BundleInfo("bundle_1", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1"))), 2, true);
- bundle2Bi = new BundleInfo("bundle_2", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_2"))), 2, true);
- } catch (URISyntaxException e) {
- fail("3.0");
- } catch (IOException e) {
- fail("4.0");
- }
-
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(bundle1Bi);
- manipulator.getConfigData().addBundle(bundle2Bi);
- try {
- manipulator.save(false);
- } catch (FrameworkAdminRuntimeException e) {
- fail("5.0");
- } catch (IOException e) {
- fail("6.0");
- }
-
- File configINI = new File(configurationFolder, "config.ini");
- assertContent(configINI, "org.eclipse.osgi");
- assertContent(configINI, "bundle_1");
- assertContent(configINI, "bundle_2");
- assertContent(configINI, "start,reference"); //This test for the presence of the comma.
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/CleanupTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/CleanupTest.java
deleted file mode 100644
index d0cc6829a..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/CleanupTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-
-public class CleanupTest extends FwkAdminAndSimpleConfiguratorTest {
-
- public CleanupTest(String name) {
- super(name);
- }
-
- Manipulator m = null;
-
- protected void setUp() throws Exception {
- super.setUp();
- m = createMinimalConfiguration(CleanupTest.class.getName());
- }
-
- public void testSimpleConfiguratorRemoval() {
- BundleInfo[] bis = m.getConfigData().getBundles();
- for (int i = 0; i < bis.length; i++) {
- if (bis[i].getSymbolicName().equals("org.eclipse.equinox.simpleconfigurator"))
- m.getConfigData().removeBundle(bis[i]);
- }
- try {
- m.save(false);
- } catch (IOException e) {
- fail("Error while saving");
- }
- assertNothing(new File(getConfigurationFolder(), "org.eclipse.equinox.simpleconfigurator"));
- assertIsDirectory(getConfigurationFolder());
-
- //Now remove osgi
- bis = m.getConfigData().getBundles();
- for (int i = 0; i < bis.length; i++) {
- if (bis[i].getSymbolicName().equals("org.eclipse.osgi"))
- m.getConfigData().removeBundle(bis[i]);
- }
- try {
- m.save(false);
- } catch (IOException e) {
- fail("Error while saving");
- }
- assertNothing(getConfigurationFolder());
- assertNothing(new File(getInstallFolder(), getLauncherName() + ".ini"));
- }
-
- public void testOSGiRemoval() {
- BundleInfo[] bis = m.getConfigData().getBundles();
- for (int i = 0; i < bis.length; i++) {
- if (bis[i].getSymbolicName().equals("org.eclipse.osgi"))
- m.getConfigData().removeBundle(bis[i]);
- }
- try {
- m.save(false);
- } catch (IOException e) {
- fail("Error while saving");
- }
- assertIsDirectory(new File(getConfigurationFolder(), "org.eclipse.equinox.simpleconfigurator"));
- assertIsDirectory(getConfigurationFolder());
- assertNotContent(new File(getConfigurationFolder(), "org.eclipse.equinox.simpleconfigurator/bundles.info"), "org.eclipse.osgi");
-
- bis = m.getConfigData().getBundles();
- for (int i = 0; i < bis.length; i++) {
- if (bis[i].getSymbolicName().equals("org.eclipse.equinox.simpleconfigurator"))
- m.getConfigData().removeBundle(bis[i]);
- }
- try {
- m.save(false);
- } catch (IOException e) {
- fail("Error while saving");
- }
- assertNothing(getConfigurationFolder());
- assertNothing(new File(getInstallFolder(), getLauncherName() + ".ini"));
- }
-
- public void testWithMutipleBundles() throws IOException, URISyntaxException {
- BundleInfo bi = new BundleInfo(URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1"))), 2, false);
- m.getConfigData().addBundle(bi);
- m.save(false);
-
- BundleInfo[] bis = m.getConfigData().getBundles();
- for (int i = 0; i < bis.length; i++) {
- if (bis[i].getSymbolicName().equals("org.eclipse.equinox.simpleconfigurator"))
- m.getConfigData().removeBundle(bis[i]);
- }
- m.save(false);
-
- assertNothing(getBundleTxt());
- assertContent(getConfigIni(), "bundle_1");
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FrameworkExtensionTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FrameworkExtensionTest.java
deleted file mode 100644
index aecb53309..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FrameworkExtensionTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.osgi.framework.Constants;
-
-public class FrameworkExtensionTest extends FwkAdminAndSimpleConfiguratorTest {
-
- public FrameworkExtensionTest(String name) {
- super(name);
- }
-
- public void testAddRemoveFrameworkExtension() throws Exception {
- Manipulator manipulator = createMinimalConfiguration(FrameworkExtensionTest.class.getName());
- BundleInfo bundleInfo = new BundleInfo("dummy.frameworkextension", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/dummy.frameworkextension_1.0.0.jar"))), 4, false);
- bundleInfo.setFragmentHost(Constants.SYSTEM_BUNDLE_SYMBOLICNAME);
- manipulator.getConfigData().addBundle(bundleInfo);
- manipulator.save(false);
- assertContent(getBundleTxt(), "dummy.frameworkextension");
- assertPropertyContains(getConfigIni(),"osgi.framework.extensions", "dummy.frameworkextension");
- assertNotPropertyContains(getConfigIni(),"osgi.bundles", "dummy.frameworkextension");
-
- BundleInfo basicBundleInfo = new BundleInfo("dummy.frameworkextension", "1.0.0", null, -1, false);
- manipulator.getConfigData().removeBundle(basicBundleInfo);
- manipulator.save(false);
- assertNotContent(getBundleTxt(), "dummy.frameworkextension");
- assertNotPropertyContains(getConfigIni(),"osgi.framework.extensions", "dummy.frameworkextension");
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FwkAdminAndSimpleConfiguratorTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FwkAdminAndSimpleConfiguratorTest.java
deleted file mode 100644
index c8b314a93..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FwkAdminAndSimpleConfiguratorTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public abstract class FwkAdminAndSimpleConfiguratorTest extends AbstractFwkAdminTest {
- private File installFolder;
- private File configurationFolder;
- private String launcherName;
-
- public FwkAdminAndSimpleConfiguratorTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- startSimpleConfiguratorManipulator();
- }
-
- protected Manipulator getNewManipulator(String workArea) throws FrameworkAdminRuntimeException, IOException, BundleException {
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- installFolder = getTestFolder(workArea, false);
- configurationFolder = new File(installFolder, "configuration");
- launcherName = "eclipse";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
- return manipulator;
- }
-
- protected Manipulator createMinimalConfiguration(String workArea) throws Exception {
- Manipulator manipulator = getNewManipulator(workArea);
-
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- BundleInfo configuratorBi = new BundleInfo("org.eclipse.equinox.simpleconfigurator", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))), 1, true);
-
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(configuratorBi);
-
- try {
- manipulator.save(false);
- } catch (IOException e) {
- fail("Error while persisting");
- } catch (FrameworkAdminRuntimeException e) {
- fail("Error while persisting");
- }
- return manipulator;
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- if (installFolder != null)
- delete(installFolder);
- }
-
- public File getInstallFolder() {
- return installFolder;
- }
-
- public File getConfigurationFolder() {
- return configurationFolder;
- }
-
- public File getBundleTxt() {
- return new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info");
- }
-
- public File getConfigIni() {
- return new File(configurationFolder, "config.ini");
- }
-
- public String getLauncherName() {
- return launcherName;
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherConfigLocationTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherConfigLocationTest.java
deleted file mode 100644
index a01e523a1..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherConfigLocationTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class LauncherConfigLocationTest extends AbstractFwkAdminTest {
-
- public LauncherConfigLocationTest(String name) {
- super(name);
- }
-
- public void testCustomLauncherConfig() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratorManipulator();
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = Activator.getContext().getDataFile(LauncherConfigLocationTest.class.getName());
- if(installFolder.exists())
- delete(installFolder);
-
- File configurationFolder = new File(installFolder, "configuration");
- String launcherName = "foo";
-
- LauncherData launcherData = manipulator.getLauncherData();
- assertNotNull("Null launcher data" + launcherData, launcherData);
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
-
- File defaultlaunchConfig = new File(installFolder, launcherName + ".ini");
- assertEquals(defaultlaunchConfig.exists(), false);
- File launchConfig = new File(installFolder, "mylaunch.ini");
- assertEquals(launchConfig.exists(), false);
- launcherData.setLauncherConfigLocation(launchConfig);
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- BundleInfo configuratorBi = new BundleInfo("org.eclipse.equinox.simpleconfigurator", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))), 1, true);
-
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(configuratorBi);
-
- manipulator.save(false);
-
- assertEquals(launchConfig.exists(), true);
- assertEquals(defaultlaunchConfig.exists(), false);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherDataTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherDataTest.java
deleted file mode 100644
index 021b5a8d0..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherDataTest.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import junit.framework.TestCase;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-
-/**
- * @since 1.0
- */
-public class LauncherDataTest extends TestCase {
-
- /*
- * Constructor for the class.
- */
- public LauncherDataTest(String name) {
- super(name);
- }
-
- public void testRemoveProgramArg() {
- LauncherData data = new LauncherData("equinox", "1.0", "eclipse", "1.0");
- data.setProgramArgs(new String[] {"-console", "-startup", "foo"});
- data.removeProgramArg("-startup");
- assertEquals("1.0", new String[] {"-console"}, data.getProgramArgs());
-
- data.setProgramArgs(null);
- data.setProgramArgs(new String[] {"-console", "-startup", "foo", "-bar"});
- data.removeProgramArg("-startup");
- assertEquals("2.0", new String[] {"-console", "-bar"}, data.getProgramArgs());
-
- data.setProgramArgs(null);
- data.setProgramArgs(new String[] {"-startup", "foo"});
- data.removeProgramArg("-startup");
- assertEquals("3.0", new String[0], data.getProgramArgs());
-
- data.setProgramArgs(null);
- data.setProgramArgs(new String[] {"-console", "-startup", "foo", "bar"});
- data.removeProgramArg("-startup");
- assertEquals("4.0", new String[] {"-console"}, data.getProgramArgs());
-
- data.setProgramArgs(null);
- data.setProgramArgs(new String[] {"-console", "-startup", "foo", "bar", "-xxx"});
- data.removeProgramArg("-startup");
- assertEquals("5.0", new String[] {"-console", "-xxx"}, data.getProgramArgs());
-
- // arg which doesn't start with a dash - dont' consume anything but that specific arg
- data.setProgramArgs(null);
- data.setProgramArgs(new String[] {"-console", "-startup", "foo", "bar", "-xxx"});
- data.removeProgramArg("foo");
- assertEquals("6.0", new String[] {"-console", "-startup", "foo", "bar", "-xxx"}, data.getProgramArgs());
-
- // non-matching arg
- data.setProgramArgs(null);
- data.setProgramArgs(new String[] {"-console", "-startup", "foo", "bar", "-xxx"});
- data.removeProgramArg("zzz");
- assertEquals("7.0", new String[] {"-console", "-startup", "foo", "bar", "-xxx"}, data.getProgramArgs());
-
- // empty string
- data.setProgramArgs(null);
- data.setProgramArgs(new String[] {"-console", "-startup", "foo", "bar", "-xxx"});
- data.removeProgramArg("foo");
- assertEquals("8.0", new String[] {"-console", "-startup", "foo", "bar", "-xxx"}, data.getProgramArgs());
-
- // just whitespace
- data.setProgramArgs(null);
- data.setProgramArgs(new String[] {"-console", "-startup", "foo", "bar", "-xxx"});
- data.removeProgramArg(" ");
- assertEquals("9.0", new String[] {"-console", "-startup", "foo", "bar", "-xxx"}, data.getProgramArgs());
-
- }
-
- /*
- * Compare the give 2 arrays and assert whether or not they should be considered equal.
- */
- public static void assertEquals(String message, String[] one, String[] two) {
- if (one == null)
- assertNull(message, two);
- if (two == null)
- fail(message);
- assertEquals(message, one.length, two.length);
- for (int i = 0; i < one.length; i++)
- assertEquals(message, one[i], two[i]);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/MacOSLikeSetup.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/MacOSLikeSetup.java
deleted file mode 100644
index f3153e05f..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/MacOSLikeSetup.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxConstants;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.osgi.service.environment.Constants;
-import org.osgi.framework.BundleException;
-
-public class MacOSLikeSetup extends FwkAdminAndSimpleConfiguratorTest {
-
- public MacOSLikeSetup(String name) {
- super(name);
- }
-
- public void testMacOSSetup() throws FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = new File(Activator.getContext().getDataFile(MacOSLikeSetup.class.getName()), "eclipse");
- File configurationFolder = new File(installFolder, "configuration");
- File launcherFolder = new File(installFolder, "Eclipse.app/Contents/MacOS/");
- File launcherName = new File(launcherFolder, "eclipse");
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(launcherName);
- launcherData.setLauncherConfigLocation(new File(launcherFolder, "eclipse.ini"));
- launcherData.setOS(Constants.OS_MACOSX);
-
- //Setup the plugins as they should
- File osgiJar = new File(installFolder, "plugins/org.eclipse.osgi.jar");
- File scJar = new File(installFolder, "plugins/org.eclipse.equinox.simpleconfigurator.jar");
- File launcherJar = new File(installFolder, "plugins/org.eclipse.equinox.launcher.jar");
- copy("OSGi", new File(FileLocator.toFileURL(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar")).getPath()), osgiJar);
- copy("SC", new File(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar")).getPath()), scJar);
- copy("Startup", new File(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.launcher.jar")).getPath()), launcherJar);
-
- manipulator.getConfigData().addBundle(new BundleInfo(osgiJar.toURI()));
- manipulator.getConfigData().addBundle(new BundleInfo(scJar.toURI(), 1, true));
- manipulator.getConfigData().addBundle(new BundleInfo(launcherJar.toURI()));
-
- manipulator.getLauncherData().addProgramArg(EquinoxConstants.OPTION_STARTUP);
- manipulator.getLauncherData().addProgramArg(launcherJar.toURI().toString());
-
- manipulator.getLauncherData().setFwJar(osgiJar);
-
- try {
- manipulator.save(false);
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
- File launcherIni = new File(launcherFolder, "eclipse.ini");
- assertNotContent(launcherIni, "-configuration");
- assertNotContent(launcherIni, "-install");
- assertContent(launcherIni, "-startup");
- assertContent(launcherIni, "../../../plugins/org.eclipse.equinox.launcher.jar");
- assertNotContent(launcherIni, MacOSLikeSetup.class.getName());
- assertNotContent(new File(configurationFolder, "config.ini"), MacOSLikeSetup.class.getName());
- assertTrue("bundles.info missing", new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info").exists());
-
- }
-
- public void testMacWithoutStartupOrFw() throws Exception {
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = new File(Activator.getContext().getDataFile(MacOSLikeSetup.class.getName()), "eclipse");
- File configurationFolder = new File(installFolder, "configuration");
- File launcherFolder = new File(installFolder, "Eclipse.app/Contents/MacOS/");
- File launcherName = new File(launcherFolder, "eclipse");
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(launcherName);
- launcherData.setOS(Constants.OS_MACOSX);
-
- File osgiJar = new File(installFolder, "plugins/org.eclipse.osgi.jar");
- File scJar = new File(installFolder, "plugins/org.eclipse.equinox.simpleconfigurator.jar");
- File bundle = new File(installFolder, "plugins/bundle_1");
- copy("OSGi", new File(FileLocator.toFileURL(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar")).getPath()), osgiJar);
- copy("SC", new File(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar")).getPath()), scJar);
- copy("bundle", new File(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1")).getPath()), bundle);
-
- manipulator.getConfigData().addBundle(new BundleInfo(osgiJar.toURI()));
- manipulator.getConfigData().addBundle(new BundleInfo(scJar.toURI(), 1, true));
- manipulator.getConfigData().addBundle(new BundleInfo(bundle.toURI()));
- manipulator.save(false);
-
- File launcherIni = new File(launcherFolder, "eclipse.ini");
- File bundleInfo = new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info");
- assertNotContent(launcherIni, "-configuration");
- assertNotContent(launcherIni, "../../../configuration");
- assertContent(bundleInfo, "file:plugins/bundle_1/");
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ManipulatorTests.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ManipulatorTests.java
deleted file mode 100644
index d758c92e3..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ManipulatorTests.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.*;
-import java.util.Properties;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-
-public class ManipulatorTests extends AbstractFwkAdminTest {
-
- public ManipulatorTests(String name) {
- super(name);
- }
-
- public void testBug212361_osgiInBundlesList() throws Exception {
- File installFolder = Activator.getContext().getDataFile("212361");
- File configurationFolder = new File(installFolder, "configuration");
- Manipulator manipulator = getFrameworkManipulator(configurationFolder, new File(installFolder, "foo"));
-
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- BundleInfo configuratorBi = new BundleInfo("org.eclipse.equinox.simpleconfigurator", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))), 1, true);
-
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(configuratorBi);
-
- manipulator.save(false);
-
- Properties configIni = new Properties();
- InputStream in = new BufferedInputStream(new FileInputStream(new File(configurationFolder, "config.ini")));
- configIni.load(in);
- in.close();
-
- String bundles = (String) configIni.get("osgi.bundles");
- assertTrue(bundles.indexOf("org.eclipse.osgi") == -1);
- }
-
- public void testBug277553_installAreaFromFwJar() throws Exception {
- File folder = getTestFolder("installAreaFromFwJar");
- File fwJar = new File(folder, "plugins/org.eclipse.osgi.jar");
- fwJar.getParentFile().mkdirs();
-
- copyStream(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar").openStream(), true, new FileOutputStream(fwJar), true);
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", fwJar.toURI(), 0, true);
-
- File ini = new File(folder, "eclipse.ini");
- writeEclipseIni(ini, new String[] {"-foo", "bar", "-vmargs", "-Xmx256m"});
-
- startSimpleConfiguratorManipulator();
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
-
- Manipulator manipulator = fwkAdmin.getManipulator();
- manipulator.getConfigData().addBundle(osgiBi);
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwJar(fwJar);
- launcherData.setLauncher(new File(folder, "eclipse"));
-
- manipulator.load();
-
- assertEquals(manipulator.getLauncherData().getFwPersistentDataLocation(), new File(folder, "configuration"));
- }
-
- public void testBug258126_ProgramArgs_VMArgs() throws Exception {
- File installFolder = getTestFolder("258126");
- File ini = new File(installFolder, "eclipse.ini");
- writeEclipseIni(ini, new String[] {"-foo", "bar", "-vmargs", "-Xmx256m"});
-
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setLauncher(new File(installFolder, "eclipse"));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- assertEquals(launcherData.getJvmArgs(), new String[] {"-Xmx256m"});
- assertEquals(launcherData.getProgramArgs(), new String[] {"-foo", "bar"});
-
- launcherData.addJvmArg("-Xms64m");
- launcherData.addProgramArg("-console");
-
- //eclipse.ini won't save unless we actually have something in the configuration
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.save(false);
-
- assertContents(ini, new String[] {"-foo", "bar", "-console", "-vmargs", "-Xmx256m", "-Xms64m"});
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoConfigurationValueInEclipseIni.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoConfigurationValueInEclipseIni.java
deleted file mode 100644
index 4cf664dcc..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoConfigurationValueInEclipseIni.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class NoConfigurationValueInEclipseIni extends FwkAdminAndSimpleConfiguratorTest {
-
- public NoConfigurationValueInEclipseIni(String name) {
- super(name);
- }
-
- public void testAbsenceOfConfigurationInEclipseINI() throws Exception {
- createMinimalConfiguration(NoConfigurationValueInEclipseIni.class.getName());
- File launcherIni = new File(getInstallFolder(), getLauncherName() + ".ini");
- assertNotContent(launcherIni, "-configuration");
- }
-
- public void testPresenceOfConfigurationInEclipseINI() throws FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = Activator.getContext().getDataFile("bis" + NoConfigurationValueInEclipseIni.class.getName());
- File configurationFolder = new File(installFolder, "config2");
- String launcherName = "eclipse";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
-
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- BundleInfo configuratorBi = new BundleInfo("org.eclipse.equinox.simpleconfigurator", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))), 1, true);
-
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(configuratorBi);
-
- try {
- manipulator.save(false);
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
- File launcherIni = new File(installFolder, launcherName + ".ini");
- assertContent(launcherIni, "-configuration");
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoRenamingLauncherIni.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoRenamingLauncherIni.java
deleted file mode 100644
index a1966044e..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoRenamingLauncherIni.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class NoRenamingLauncherIni extends AbstractFwkAdminTest {
-
- public NoRenamingLauncherIni(String name) {
- super(name);
- }
-
- public void testConfigFiles() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratorManipulator();
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = Activator.getContext().getDataFile(NoRenamingLauncherIni.class.getName());
- File configurationFolder = new File(installFolder, "configuration");
- String launcherName = "foo";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- BundleInfo configuratorBi = new BundleInfo("org.eclipse.equinox.simpleconfigurator", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))), 1, true);
-
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(configuratorBi);
-
- manipulator.save(false);
-
- File fooINI = new File(installFolder, "foo.ini");
- assertEquals(fooINI.exists(), true);
-
- Manipulator m2 = fwkAdmin.getManipulator();
-
- LauncherData launcherData2 = m2.getLauncherData();
- launcherData2.setFwConfigLocation(configurationFolder);
- launcherData2.setLauncher(new File(installFolder, launcherName));
-
- try {
- m2.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
- launcherData2.setLauncher(new File(installFolder, "bar"));
- m2.save(false);
-
- assertEquals(fooINI.exists(), false);
- assertEquals(new File(installFolder, "bar.ini").exists(), true);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/OSGiVersionChange.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/OSGiVersionChange.java
deleted file mode 100644
index 9c57a9f05..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/OSGiVersionChange.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdminRuntimeException;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.osgi.framework.BundleException;
-
-public class OSGiVersionChange extends FwkAdminAndSimpleConfiguratorTest {
- private Manipulator defaultManipulator = null;
- private String workArea = OSGiVersionChange.class.getName();
-
- public OSGiVersionChange(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- defaultManipulator = createMinimalConfiguration(workArea);
- }
-
- public void testRemovalUsingSameManipulator() throws IllegalStateException, FrameworkAdminRuntimeException, IOException {
- BundleInfo[] infos = defaultManipulator.getConfigData().getBundles();
- BundleInfo osgi = null;
- for (int i = 0; i < infos.length; i++) {
- if ("org.eclipse.osgi".equals(infos[i].getSymbolicName())) {
- osgi = infos[i];
- break;
- }
- }
- assertEquals(true, defaultManipulator.getConfigData().removeBundle(osgi));
- defaultManipulator.save(false);
- assertNotContent(getBundleTxt(), "org.eclipse.osgi");
- assertNotPropertyContains(getConfigIni(),"osgi.bundles", "org.eclipse.osgi");
- }
-
- public void testRemovalUsingOtherManipulator() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
- Manipulator newManipulator = getNewManipulator(workArea);
- BundleInfo[] infos = newManipulator.getConfigData().getBundles();
- BundleInfo osgi = null;
- for (int i = 0; i < infos.length; i++) {
- if ("org.eclipse.osgi".equals(infos[i].getSymbolicName())) {
- osgi = infos[i];
- break;
- }
- }
- newManipulator.getConfigData().removeBundle(osgi);
- newManipulator.save(false);
- assertNotContent(getBundleTxt(), "org.eclipse.osgi");
- assertNotPropertyContains(getConfigIni(),"osgi.bundles", "org.eclipse.osgi");
- }
-
- public void testAdditionUsingOtherManipulator() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
- BundleInfo[] infos = defaultManipulator.getConfigData().getBundles();
- BundleInfo osgi = null;
- for (int i = 0; i < infos.length; i++) {
- if ("org.eclipse.osgi".equals(infos[i].getSymbolicName())) {
- osgi = infos[i];
- break;
- }
- }
- assertEquals(true, defaultManipulator.getConfigData().removeBundle(osgi));
- defaultManipulator.save(false);
-
- Manipulator newManipulator = getNewManipulator(workArea);
-
- newManipulator.getConfigData().addBundle(osgi);
- newManipulator.save(false);
- assertContent(getBundleTxt(), "org.eclipse.osgi");
- assertNotPropertyContains(getConfigIni(),"osgi.bundles", "org.eclipse.osgi");
- }
-
- public void testChangeVersion() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, URISyntaxException {
- BundleInfo[] infos = defaultManipulator.getConfigData().getBundles();
- BundleInfo osgi = null;
- for (int i = 0; i < infos.length; i++) {
- if ("org.eclipse.osgi".equals(infos[i].getSymbolicName())) {
- osgi = infos[i];
- break;
- }
- }
- defaultManipulator.getConfigData().removeBundle(osgi);
- defaultManipulator.save(false);
-
- //These two constants describe the data file used in the test
- final String FILENAME = "org.eclipse.osgi_3.4.0.jar";
- final String VERSION = "3.4.0.v20071105";
- BundleInfo newOSGi = new BundleInfo("org.eclipse.osgi", "3.4.0.v20071105", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/" + FILENAME))), 0, true);
- defaultManipulator.getConfigData().addBundle(newOSGi);
- defaultManipulator.save(false);
- assertContent(getBundleTxt(), VERSION);
- assertContent(getConfigIni(), FILENAME);
- }
-
- public void testReadConfigWithoutOSGi() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
- //First Create a configuration that does not contain OSGi
- BundleInfo[] infos = defaultManipulator.getConfigData().getBundles();
- BundleInfo osgi = null;
- for (int i = 0; i < infos.length; i++) {
- if ("org.eclipse.osgi".equals(infos[i].getSymbolicName())) {
- osgi = infos[i];
- break;
- }
- }
- defaultManipulator.getConfigData().removeBundle(osgi);
- defaultManipulator.save(false);
- assertNotContent(getBundleTxt(), "org.eclipse.osgi");
- assertNotPropertyContains(getConfigIni(),"osgi.bundles", "org.eclipse.osgi");
-
- Manipulator newManipulator = getNewManipulator(workArea);
- assertEquals(1, newManipulator.getConfigData().getBundles().length);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ParserUtilsTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ParserUtilsTest.java
deleted file mode 100644
index 88b77bc32..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ParserUtilsTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils;
-
-/**
- * Tests for {@link ParserUtils}.
- */
-public class ParserUtilsTest extends AbstractFwkAdminTest {
-
- public ParserUtilsTest(String name) {
- super(name);
- }
- public void testGetValueForArgument() throws Exception {
- List args = new ArrayList();
- args.add("-foo");
- args.add("bar");
- assertEquals( "bar", ParserUtils.getValueForArgument("-foo", args));
-
- args.set(1, "-bar");
- assertEquals(null, ParserUtils.getValueForArgument("-foo", args));
- }
-
- public void testRemoveArgument() throws Exception {
- String [] args = new String [] { "-bar", "-foo", "-other"};
- ParserUtils.removeArgument("-foo", Arrays.asList(args));
- assertEquals(args, new String [] {"-bar", null, "-other"});
-
- args = new String [] { "-bar", "-foo", "other"};
- ParserUtils.removeArgument("-foo", Arrays.asList(args));
- assertEquals(args, new String [] {"-bar", null, null});
-
- args = new String [] { "-bar", "-foo", "s-pecial"};
- ParserUtils.removeArgument("-foo", Arrays.asList(args));
- assertEquals(args, new String [] {"-bar", null, null});
- }
-
- public void testSetValueForArgument() throws Exception {
- List args = new ArrayList();
- ParserUtils.setValueForArgument("-foo", "bar", args);
- assertTrue(args.size() == 2);
- assertEquals(args.get(0), "-foo");
- assertEquals(args.get(1), "bar");
-
- args.add("-other");
- args.set(1, "s-pecial");
- ParserUtils.setValueForArgument("-foo", "bas", args);
- assertTrue(args.size() == 3);
- assertEquals(args.get(0), "-foo");
- assertEquals(args.get(1), "bas");
- assertEquals(args.get(2), "-other");
-
- args.remove(1);
- ParserUtils.setValueForArgument("-foo", "bas", args);
- assertTrue(args.size() == 3);
- assertEquals(args.get(0), "-foo");
- assertEquals(args.get(1), "bas");
- assertEquals(args.get(2), "-other");
- }
-
- public void testFromOSGiJarToOSGiInstallArea() {
- String path = "";
- File result =ParserUtils.fromOSGiJarToOSGiInstallArea(path);
- assertNotNull("1.0", result);
-
- path = "osgi.jar";
- result =ParserUtils.fromOSGiJarToOSGiInstallArea(path);
- assertNotNull("1.0", result);
- assertEquals("1.1", "", result.toString());
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest1.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest1.java
deleted file mode 100644
index d0fb71596..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest1.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class ReaderTest1 extends AbstractFwkAdminTest {
- private File installFolder = null;
- private String launcherName = "eclipse";
-
- public ReaderTest1(String name) {
- super(name);
- }
-
-
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratorManipulator();
-
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- installFolder = getTestData(ReaderTest1.class.getName(),"dataFile/readerTest1");
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
- assertEquals(new File(installFolder, "conf"), manipulator.getLauncherData().getFwConfigLocation());
- assertEquals("bar", manipulator.getConfigData().getProperty("foo"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest2.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest2.java
deleted file mode 100644
index fac583e0e..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest2.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.Properties;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class ReaderTest2 extends AbstractFwkAdminTest {
- private File installFolder = null;
- private File configurationFolder = null;
- private String launcherName = "eclipse";
-
- public ReaderTest2(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- startSimpleConfiguratorManipulator();
-
- installFolder = Activator.getContext().getDataFile(ReaderTest2.class.getName());
- configurationFolder = new File(installFolder, "conf");
- writeEclipseIni(new File(installFolder, "eclipse.ini"), new String[] { "-configuration", configurationFolder.getAbsolutePath() });
- Properties properties = new Properties();
- properties.setProperty("foo", "bar");
- writeConfigIni(new File(configurationFolder, "config.ini"), properties);
- }
-
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- assertEquals(new File(installFolder, "conf"), manipulator.getLauncherData().getFwConfigLocation());
- assertEquals("bar", manipulator.getConfigData().getProperty("foo"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest3.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest3.java
deleted file mode 100644
index 4def4fd63..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest3.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class ReaderTest3 extends AbstractFwkAdminTest {
- private File installFolder = null;
- private String launcherName = "eclipse";
-
- public ReaderTest3(String name) {
- super(name);
- }
-
-
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratorManipulator();
-
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- installFolder = getTestData(ReaderTest3.class.getName(),"dataFile/readerTest3");
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
- assertEquals(new File(installFolder, "configuration"), manipulator.getLauncherData().getFwConfigLocation());
- assertEquals("bar", manipulator.getConfigData().getProperty("foo"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest4.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest4.java
deleted file mode 100644
index dd08dccdd..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest4.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.Properties;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class ReaderTest4 extends AbstractFwkAdminTest {
- private File installFolder = null;
- private File configurationFolder = null;
- private String launcherName = "eclipse";
-
- public ReaderTest4(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- startSimpleConfiguratorManipulator();
-
- installFolder = Activator.getContext().getDataFile(ReaderTest4.class.getName());
- configurationFolder = new File(installFolder, "conf");
- writeEclipseIni(new File(installFolder, "eclipse.ini"), new String[] { "-install", installFolder.getAbsolutePath(), "-configuration", URIUtil.toUnencodedString(URIUtil.makeRelative(configurationFolder.toURI(), installFolder.toURI())) });
- Properties properties = new Properties();
- properties.setProperty("foo", "bar");
- writeConfigIni(new File(configurationFolder, "config.ini"), properties);
- }
-
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- assertEquals(new File(installFolder, "conf"), manipulator.getLauncherData().getFwConfigLocation());
- assertEquals("bar", manipulator.getConfigData().getProperty("foo"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest5.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest5.java
deleted file mode 100644
index 8363f41df..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest5.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.Properties;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class ReaderTest5 extends AbstractFwkAdminTest {
- private File installFolder = null;
- private File configurationFolder = null;
- private String launcherName = "eclipse";
-
- public ReaderTest5(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- startSimpleConfiguratorManipulator();
-
- installFolder = Activator.getContext().getDataFile(ReaderTest5.class.getName());
- configurationFolder = new File(installFolder, "configuration");
- writeEclipseIni(new File(installFolder, "eclipse.ini"), new String[] { "-install", installFolder.getAbsolutePath()});
- Properties properties = new Properties();
- properties.setProperty("foo", "bar");
- writeConfigIni(new File(configurationFolder, "config.ini"), properties);
- }
-
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- assertEquals(configurationFolder, manipulator.getLauncherData().getFwConfigLocation());
- assertEquals("bar", manipulator.getConfigData(). getProperty("foo"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug267850.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug267850.java
deleted file mode 100644
index f41cc5d09..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug267850.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class ReaderTestBug267850 extends AbstractFwkAdminTest {
- private File installFolder = null;
- private String launcherName = "eclipse";
-
- public ReaderTestBug267850(String name) {
- super(name);
- }
-
-
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratorManipulator();
-
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- installFolder = getTestData(ReaderTestBug267850.class.getName(),"dataFile/readerTestBug267850");
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
- LauncherData data = manipulator.getLauncherData();
- String[] args = data.getProgramArgs();
- assertEquals("-startup", args[0]);
-// assertEquals("file:/C:/1target/provmiddle/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/plugins/org.eclipse.equinox.launcher_1.0.200.v20090306-1900.jar", args[1]);
- assertEquals("--launcher.library", args[2]);
-// assertEquals("file:/C:/1target/provmiddle/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090306-1900", args[3]);
- assertEquals("-showsplash", args[4]);
- assertEquals("org.eclipse.platform", args[5]);
- assertEquals("--launcher.XXMaxPermSize", args[6]);
- assertEquals("256m", args[7]);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug285935.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug285935.java
deleted file mode 100644
index 2c1f0dd0f..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug285935.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class ReaderTestBug285935 extends AbstractFwkAdminTest {
- private File installFolder = null;
- private String launcherName = "eclipse";
-
- public ReaderTestBug285935(String name) {
- super(name);
- }
-
-
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratorManipulator();
-
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- installFolder = getTestData(ReaderTestBug285935.class.getName(),"dataFile/readerTestBug285935");
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
- assertEquals(new File(installFolder, "conf"), manipulator.getLauncherData().getFwConfigLocation());
- assertEquals("bar", manipulator.getConfigData().getProperty("foo"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RelativePathTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RelativePathTest.java
deleted file mode 100644
index 43ea1f12e..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RelativePathTest.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.*;
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-
-public class RelativePathTest extends FwkAdminAndSimpleConfiguratorTest {
- /** Constant value indicating if the current platform is Windows */
- private static final boolean WINDOWS = java.io.File.separatorChar == '\\';
-
- public RelativePathTest(String name) throws Exception {
- super(name);
- }
-
- public void testRelativePaths() throws Exception {
- File installFolder = Activator.getContext().getDataFile(RelativePathTest.class.getName());
-
- //First we copy some jars into a well
- File osgiJar = new File(installFolder, "plugins/org.eclipse.osgi.jar");
- osgiJar.getParentFile().mkdirs();
- File scJar = new File(installFolder, "plugins/org.eclipse.equinox.simpleconfigurator.jar");
-
- copyStream(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar").openStream(), true, new FileOutputStream(osgiJar), true);
- copyStream(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar").openStream(), true, new FileOutputStream(scJar), true);
-
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File configurationFolder = new File(installFolder, "configuration");
- String launcherName = "eclipse";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", osgiJar.toURI(), 0, true);
- BundleInfo configuratorBi = new BundleInfo("org.eclipse.equinox.simpleconfigurator", "1.0.0", scJar.toURI(), 1, true);
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(configuratorBi);
- try {
- manipulator.save(false);
- } catch (IOException e) {
- fail("Error while persisting");
- } catch (FrameworkAdminRuntimeException e) {
- fail("Error while persisting");
- }
-
- //":path.jar" is a poor man approach to test relative paths
- assertNotContent(new File(configurationFolder, "config.ini"), installFolder.getAbsolutePath());
- assertNotContent(new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info"), installFolder.getAbsolutePath());
- assertContent(new File(configurationFolder, "config.ini"), ":org.eclipse.equinox.simpleconfigurator.jar");
- //Note: This is testing for old style bundle locations
- assertContent(new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info"), "file:plugins/org.eclipse.equinox.simpleconfigurator.jar");
- assertContent(new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info"), "file:plugins/org.eclipse.osgi.jar");
-
- BundleInfo bi = new BundleInfo(URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1"))), 2, false);
- manipulator.getConfigData().addBundle(bi);
- manipulator.save(false);
- // assertContent(new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info"), FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1")).toExternalForm());
-
- Manipulator newManipulator = fwkAdmin.getManipulator();
- LauncherData newLauncherData = newManipulator.getLauncherData();
- newLauncherData.setFwConfigLocation(configurationFolder);
- newLauncherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- }
-
- public void testMakeRelative_NonWindows() {
- if (WINDOWS)
- return;
- URL base = null;
- try {
- base = new URL("file:/eclipse/");
- } catch (MalformedURLException e) {
- e.printStackTrace();
- fail("0.98");
- }
- // data - [0] is the test data and [1] is the expected result
- String[][] data = new String[][] { //
- new String[] {"file:/home/eclipse/foo.jar", "file:../home/eclipse/foo.jar"}, //
- new String[] {"file:///home/eclipse/foo.jar", "file:../home/eclipse/foo.jar"}, //
- };
- for (int i = 0; i < data.length; i++)
- assertEquals("1." + i, data[i][1], EquinoxManipulatorImpl.makeRelative(data[i][0], base));
- }
-
- public void testMakeRelative_Windows() {
- if (!WINDOWS)
- return;
- URL base = null;
- // platform specific data
- try {
- base = new URL("file:/c:/a/eclipse/");
- } catch (MalformedURLException e) {
- e.printStackTrace();
- fail("0.99");
- }
- // data - [0] is the test data and [1] is the expected result
- String[][] data = new String[][] {new String[] {"file:c:/b/shared/plugins/bar.jar", "file:../../b/shared/plugins/bar.jar"}, //
- new String[] {"file:d:/b/shared/plugins/bar.jar", "file:d:/b/shared/plugins/bar.jar"}, //
- new String[] {"file:/c:/a/eclipse/plugins/bar.jar", "file:plugins/bar.jar"}, //
- new String[] {"file:c:/a/eclipse/plugins/bar.jar", "file:plugins/bar.jar"}, //
- new String[] {"file:/c:/a/shared/plugins/bar.jar", "file:../shared/plugins/bar.jar"}, //
- new String[] {"file:/d:/a/eclipse/plugins/bar.jar", "file:/d:/a/eclipse/plugins/bar.jar"}, //
- new String[] {"file:/c:/x/eclipse/plugins/bar.jar", "file:../../x/eclipse/plugins/bar.jar"}, //
- };
- for (int i = 0; i < data.length; i++)
- assertEquals("2." + i, data[i][1], EquinoxManipulatorImpl.makeRelative(data[i][0], base));
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingABundle.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingABundle.java
deleted file mode 100644
index 4dc54b55c..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingABundle.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class RemovingABundle extends FwkAdminAndSimpleConfiguratorTest {
-
- public RemovingABundle(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- Manipulator manipulator = createMinimalConfiguration(RemovingABundle.class.getName());
- manipulator.getConfigData().addBundle(new BundleInfo("bundle_1", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1"))), 4, false));
- manipulator.save(false);
-
- File fooINI = new File(getInstallFolder(), getLauncherName() +".ini");
- assertEquals(fooINI.exists(), true);
- assertContent(getBundleTxt(), "bundle_1");
- }
-
- public void testRemoveBundleWithoutURL() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
- Manipulator m2 = getEquinoxFrameworkAdmin().getManipulator();
-
- LauncherData launcherData2 = m2.getLauncherData();
- launcherData2.setFwConfigLocation(getConfigurationFolder());
- launcherData2.setLauncher(new File(getInstallFolder(), "eclipse"));
-
- try {
- m2.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
- BundleInfo info = new BundleInfo("bundle_1", "1.0.0", null, 0, false);
- m2.getConfigData().removeBundle(info);
- m2.save(false);
-
- assertNotContent(getBundleTxt(), "bundle_1");
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingAllBundles.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingAllBundles.java
deleted file mode 100644
index f30a39f0d..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingAllBundles.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class RemovingAllBundles extends AbstractFwkAdminTest {
-
- public RemovingAllBundles(String name) {
- super(name);
- }
-
- public void testConfigFiles() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratorManipulator();
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = Activator.getContext().getDataFile(RemovingAllBundles.class.getName());
- File configurationFolder = new File(installFolder, "configuration");
- String launcherName = "foo";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- BundleInfo configuratorBi = new BundleInfo("org.eclipse.equinox.simpleconfigurator", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))), 1, true);
-
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(configuratorBi);
-
- manipulator.save(false);
-
- File fooINI = new File(installFolder, "foo.ini");
- assertEquals(fooINI.exists(), true);
-
- Manipulator m2 = fwkAdmin.getManipulator();
-
- LauncherData launcherData2 = m2.getLauncherData();
- launcherData2.setFwConfigLocation(configurationFolder);
- launcherData2.setLauncher(new File(installFolder, launcherName));
-
- try {
- m2.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- BundleInfo[] infos = m2.getConfigData().getBundles();
- for (int i = 0; i < infos.length; i++) {
- m2.getConfigData().removeBundle(infos[i]);
- }
- m2.save(false);
-
- assertEquals(new File(configurationFolder + "/org.eclipse.equinox.simpleconfigurator", "bundles.info").exists(), false);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RenamingLauncherIni.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RenamingLauncherIni.java
deleted file mode 100644
index 23e1ae849..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RenamingLauncherIni.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class RenamingLauncherIni extends AbstractFwkAdminTest {
-
- public RenamingLauncherIni(String name) {
- super(name);
- }
-
- public void testConfigFiles() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratorManipulator();
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = Activator.getContext().getDataFile(RenamingLauncherIni.class.getName());
- File configurationFolder = new File(installFolder, "configuration");
- String launcherName = "foo";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- BundleInfo configuratorBi = new BundleInfo("org.eclipse.equinox.simpleconfigurator", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))), 1, true);
-
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(configuratorBi);
-
- manipulator.save(false);
-
- File fooINI = new File(installFolder, "foo.ini");
- assertEquals(fooINI.exists(), true);
-
- Manipulator m2 = fwkAdmin.getManipulator();
-
- LauncherData launcherData2 = m2.getLauncherData();
- launcherData2.setFwConfigLocation(configurationFolder);
- launcherData2.setLauncher(new File(installFolder, launcherName));
-
- try {
- m2.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
- launcherData2.setLauncher(new File(installFolder, "foo"));
- m2.save(false);
-
- assertEquals(new File(installFolder, "foo.ini").exists(), true);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SharedConfigurationTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SharedConfigurationTest.java
deleted file mode 100644
index 0bbf5e755..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SharedConfigurationTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class SharedConfigurationTest extends AbstractFwkAdminTest {
-
- public SharedConfigurationTest(String name) {
- super(name);
- }
-
- public void testDefaultConfiguration() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
- startSimpleConfiguratorManipulator();
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = Activator.getContext().getDataFile(SharedConfigurationTest.class.getName());
- File defaultConfigurationFolder = new File(installFolder, "configuration");
- defaultConfigurationFolder.mkdirs();
- copy("creating shared config.ini", getTestData("", "dataFile/sharedconfiguration/config.ini"), new File(defaultConfigurationFolder, "config.ini"));
-
- String launcherName = "foo";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(defaultConfigurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
-
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- assertEquals("false", manipulator.getConfigData().getProperty("config.shared"));
- assertEquals("true", manipulator.getConfigData().getProperty("from.parent"));
- }
-
- public void testSharedConfiguration() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
- startSimpleConfiguratorManipulator();
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = Activator.getContext().getDataFile(SharedConfigurationTest.class.getName());
- File defaultConfigurationFolder = new File(installFolder, "configuration");
- defaultConfigurationFolder.mkdirs();
- copy("creating shared config.ini", getTestData("", "dataFile/sharedconfiguration/config.ini"), new File(defaultConfigurationFolder, "config.ini"));
- File userConfigurationFolder = new File(installFolder, "user/configuration");
- userConfigurationFolder.mkdirs();
- copy("creating shared config.ini", getTestData("", "dataFile/sharedconfiguration/user-config.ini"), new File(userConfigurationFolder, "config.ini"));
-
- String launcherName = "foo";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(userConfigurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
-
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- assertEquals("true", manipulator.getConfigData().getProperty("config.shared"));
- assertEquals("true", manipulator.getConfigData().getProperty("from.parent"));
- }
-
- public void testNotSharedConfiguration() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
- startSimpleConfiguratorManipulator();
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = Activator.getContext().getDataFile(SharedConfigurationTest.class.getName());
- File defaultConfigurationFolder = new File(installFolder, "configuration");
- defaultConfigurationFolder.mkdirs();
- copy("creating shared config.ini", getTestData("", "dataFile/sharedconfiguration/config.ini"), new File(defaultConfigurationFolder, "config.ini"));
- File userConfigurationFolder = new File(installFolder, "user/configuration");
- userConfigurationFolder.mkdirs();
- copy("creating shared config.ini", getTestData("", "dataFile/sharedconfiguration/user-noshare-config.ini"), new File(userConfigurationFolder, "config.ini"));
-
- String launcherName = "foo";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(userConfigurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
-
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- assertEquals("false", manipulator.getConfigData().getProperty("config.shared"));
- assertEquals(null, manipulator.getConfigData().getProperty("from.parent"));
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorComingAndGoing.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorComingAndGoing.java
deleted file mode 100644
index 56286d16b..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorComingAndGoing.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class SimpleConfiguratorComingAndGoing extends FwkAdminAndSimpleConfiguratorTest {
- Manipulator m = null;
-
- public SimpleConfiguratorComingAndGoing(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- m = createMinimalConfiguration(SimpleConfiguratorComingAndGoing.class.getName());
- }
-
- public void testWithMutipleBundles() throws IOException, BundleException, URISyntaxException {
- BundleInfo bi = new BundleInfo(URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1"))), 2, false);
- m.getConfigData().addBundle(bi);
- m.save(false);
-
- BundleInfo[] bis = m.getConfigData().getBundles();
- for (int i = 0; i < bis.length; i++) {
- if (bis[i].getSymbolicName().equals("org.eclipse.equinox.simpleconfigurator"))
- m.getConfigData().removeBundle(bis[i]);
- }
- m.save(false);
-
- assertNothing(getBundleTxt());
- assertContent(getConfigIni(), "bundle_1");
- assertContent(getConfigIni(), "org.eclipse.osgi");
-
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator newManipulator = fwkAdmin.getManipulator();
-
- LauncherData launcherData = newManipulator.getLauncherData();
- launcherData.setFwConfigLocation(getConfigurationFolder());
- launcherData.setLauncher(new File(getInstallFolder(), getLauncherName()));
- try {
- newManipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- newManipulator.getConfigData().addBundle(new BundleInfo(URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))), 1, true));
- newManipulator.save(false);
-
- assertContent(getBundleTxt(), "org.eclipse.osgi");
- assertContent(getBundleTxt(), "bundle_1");
- assertContent(getBundleTxt(), "org.eclipse.equinox.simpleconfigurator");
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorTest.java
deleted file mode 100644
index 7cc535eaa..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorTest.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.net.URI;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class SimpleConfiguratorTest extends AbstractFwkAdminTest {
-
- public SimpleConfiguratorTest(String name) {
- super(name);
- }
-
- public void testConfigFiles() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratorManipulator();
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = Activator.getContext().getDataFile(SimpleConfiguratorTest.class.getName());
- File configurationFolder = new File(installFolder, "configuration");
- String launcherName = "eclipse";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- BundleInfo configuratorBi = new BundleInfo("org.eclipse.equinox.simpleconfigurator", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))), 1, true);
-
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(configuratorBi);
-
- manipulator.save(false);
-
- File bundleTXT = new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info");
- File configINI = new File(configurationFolder, "config.ini");
- assertContent(bundleTXT, "org.eclipse.osgi");
- assertContent(configINI, "org.eclipse.osgi");
- assertContent(bundleTXT, "org.eclipse.equinox.simpleconfigurator");
- assertContent(configINI, "org.eclipse.equinox.simpleconfigurator");
- }
-
- public void testBundleInfoEquals() throws Exception {
- BundleInfo b1 = new BundleInfo("org.foo", "3.1.0", new URI("plugins/org.foo_3.1.0"), -1, false);
- BundleInfo b2 = new BundleInfo("org.foo", "3.1.0", null, -1, false);
- BundleInfo b3 = new BundleInfo("org.foo", "3.1.0", URIUtil.fromString("C:/sp ace/plugins/org.foo_3.1.0"), -1, false);
-
- assertEquals(b1, b2);
- assertFalse(b1.equals(b3));
-
- b1.setBaseLocation(URIUtil.fromString("C:/sp ace"));
- assertEquals(b1, b3);
-
- b3.setBaseLocation(URIUtil.fromString("C:/sp ace"));
- assertEquals(b1, b3);
-
- b3.setVersion(null);
- b1.setVersion("0.0.0");
- assertEquals(b1, b3);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestEclipseDataArea.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestEclipseDataArea.java
deleted file mode 100644
index 9a0babf45..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestEclipseDataArea.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-
-public class TestEclipseDataArea extends FwkAdminAndSimpleConfiguratorTest {
- Manipulator m = null;
-
- public TestEclipseDataArea(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- m = createMinimalConfiguration(TestEclipseDataArea.class.getName());
- }
-
- public void testp2DataArea() throws IOException {
- m.getConfigData().setProperty("eclipse.p2.data.area", "@config.dir/../p2");
- m.save(false);
- assertContent(getConfigIni(), "@config.dir/../p2");
- m.load();
- m.save(false);
- assertContent(getConfigIni(), "@config.dir/../p2");
-
- m.getConfigData().setProperty("eclipse.p2.data.area", new File(getConfigurationFolder(), "p2").getAbsoluteFile().toURI().toString());
- m.save(false);
- assertContent(getConfigIni(), "@config.dir/p2");
- m.load();
- m.save(false);
- assertContent(getConfigIni(), "@config.dir/p2");
-
- m.getConfigData().setProperty("eclipse.p2.data.area", new File(getConfigurationFolder(), "../p2").getAbsoluteFile().toURI().toString());
- m.save(false);
- assertContent(getConfigIni(), "@config.dir/../p2");
- m.load();
- m.save(false);
- assertContent(getConfigIni(), "@config.dir/../p2");
-
- m.getConfigData().setProperty("eclipse.p2.data.area", "file:/d:/tmp/fo%20o/bar/p2");
- m.save(false);
- assertContent(getConfigIni(), "/tmp/fo o/bar/p2");
- assertNotContent(getConfigIni(), "@config.dir");
- m.load();
- m.save(false);
- assertContent(getConfigIni(), "/tmp/fo o/bar/p2");
- assertNotContent(getConfigIni(), "@config.dir");
-
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.java
deleted file mode 100644
index e10e2c929..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.osgi.framework.*;
-
-public class TestRunningInstance extends AbstractFwkAdminTest {
-
- public TestRunningInstance(String name) {
- super(name);
- }
-
- public void testRunningInstance() throws BundleException {
- //TODO Commented out due to NPE failure on Windows on test machines only
- if (Platform.OS_WIN32.equals(Platform.getOS()))
- return;
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator m = fwkAdmin.getRunningManipulator();
- BundleInfo[] infos = m.getConfigData().getBundles();
-
- Bundle[] bundles = Activator.getContext().getBundles();
-
- assertEquals(bundles.length, infos.length);
- for (int i = 0; i < bundles.length; i++) {
- boolean found = false;
- for (int j = 0; j < infos.length && found == false; j++) {
- found = same(infos[j], bundles[i]);
- }
- if (found == false) {
- fail("Can't find: " + bundles[i]);
- }
- }
- }
-
- private boolean same(BundleInfo info, Bundle bundle) {
- if (info.getSymbolicName().equals(bundle.getSymbolicName())) {
- if (new Version((String) bundle.getHeaders().get(Constants.BUNDLE_VERSION)).equals(new Version(info.getVersion())))
- return true;
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.java
deleted file mode 100644
index ae3aa39b7..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdminRuntimeException;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-
-public class TestVMArg extends FwkAdminAndSimpleConfiguratorTest {
- private Manipulator m;
-
- public TestVMArg(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- m = createMinimalConfiguration(TestEclipseDataArea.class.getName());
- }
-
- public void testVMInsideInstall() throws FrameworkAdminRuntimeException, IOException {
- //Test VM path in the install folder
- File jreLocation = new File(m.getLauncherData().getLauncher().getParentFile(), "jre");
- m.getLauncherData().setJvm(jreLocation);
- m.save(false);
- assertNotContent(new File(getInstallFolder(), "eclipse.ini"), jreLocation.getAbsolutePath());
- assertContent(new File(getInstallFolder(), "eclipse.ini"), "jre");
- assertContent(m.getLauncherData().getLauncherConfigLocation(), "-vm");
- assertContent(m.getLauncherData().getLauncherConfigLocation(), "jre");
- assertNotContent(m.getLauncherData().getLauncherConfigLocation(), "file:");
- m.load();
- assertEquals(jreLocation, m.getLauncherData().getJvm());
-
- m.getLauncherData().setJvm(null);
- m.save(false);
- assertNotContent(m.getLauncherData().getLauncherConfigLocation(), "-vm");
- assertNotContent(m.getLauncherData().getLauncherConfigLocation(), "jre");
- }
-
- public void testVMOutsideInstall() throws FrameworkAdminRuntimeException, IOException {
- //Test VM path in the install folder
- File jreLocation = new File(m.getLauncherData().getLauncher().getParentFile(), "../../jre").getCanonicalFile();
- m.getLauncherData().setJvm(jreLocation);
- m.save(false);
- assertContent(new File(getInstallFolder(), "eclipse.ini"), jreLocation.getAbsolutePath().replace('\\','/'));
- assertContent(m.getLauncherData().getLauncherConfigLocation(), "-vm");
- assertContent(m.getLauncherData().getLauncherConfigLocation(), "jre");
- assertNotContent(m.getLauncherData().getLauncherConfigLocation(), "file:");
- m.load();
- assertEquals(jreLocation, m.getLauncherData().getJvm());
- }
-
- public void test269502() throws FrameworkAdminRuntimeException, IOException {
- //Test VM path in the install folder
- String winPath = "c:/ibm5sr3/bin";
- String linuxPath = "/Users/Pascal/ibm5sr3/bin";
- String chosenPath = Platform.getOS().equals("win32") ? winPath : linuxPath;
- File jreLocation = new File(chosenPath);
- m.getLauncherData().setJvm(jreLocation);
- m.save(false);
- assertContent(new File(getInstallFolder(), "eclipse.ini"), chosenPath);
- assertContent(m.getLauncherData().getLauncherConfigLocation(), "-vm");
- assertContent(m.getLauncherData().getLauncherConfigLocation(), chosenPath);
- assertNotContent(m.getLauncherData().getLauncherConfigLocation(), "file:");
- m.load();
- assertEquals(jreLocation, m.getLauncherData().getJvm());
- }
- /**
- * But 282303:
- * Have -vm ../jre as program arguments.
- * See them vanish during the save operation of the manipulator
- *
- * @throws FrameworkAdminRuntimeException
- * @throws IOException
- */
- public void test282303() throws FrameworkAdminRuntimeException, IOException {
- assertNotContent(new File(getInstallFolder(), "eclipse.ini"), "-vm");
- assertNotContent(new File(getInstallFolder(), "eclipse.ini"), "../mylocation");
- assertNotContent(new File(getInstallFolder(), "eclipse.ini"), "-otherarg");
- m.getLauncherData().addProgramArg("-vm");
- m.getLauncherData().addProgramArg("../mylocation");
- m.getLauncherData().addProgramArg("-otherarg");
- m.getLauncherData().setJvm(new File("../mylocation"));
- m.save(false);
- m.load();
- String[] args = m.getLauncherData().getProgramArgs();
- boolean found = false;
- for(int i = 0; i < args.length; i++) {
- if("-vm".equals(args[i]) && i != args.length - 1) {
- if("../mylocation".equals(args[++i])) {
- found = true;
- break;
- }
- }
- }
- assertTrue("Can't find vm argument.", found);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/UtilsTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/UtilsTest.java
deleted file mode 100644
index 0841eb48b..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/UtilsTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.osgi.service.environment.Constants;
-
-public class UtilsTest extends AbstractFwkAdminTest {
-
- /**
- * @param name
- */
- public UtilsTest(String name) {
- super(name);
- }
-
- public void test_getEclipseRealLocation() throws Exception {
- File installFolder = Activator.getContext().getDataFile("212361");
-
- File plugins = new File(installFolder, "plugins");
- File foo1 = new File(plugins, "org.foo_1.2.3.abc");
- File foo2 = new File(plugins, "org.foo_1.2.4.xyz");
- File foo_64 = new File(plugins, "org.foo.x86_64_1.2.3");
- File fooWithSpaces = new File(plugins, "alotof/s p a c e s/org.foo_1.2.3.abc");
- foo1.mkdirs();
- foo2.mkdirs();
- foo_64.mkdirs();
- fooWithSpaces.mkdirs();
-
- Manipulator manipulator = getFrameworkManipulator(new File(installFolder, "configuration"), new File(installFolder, "eclipse"));
-
-
- assertEquals(FileUtils.getEclipseRealLocation(manipulator, "org.foo"), foo2.toURI());
- assertEquals(FileUtils.getEclipseRealLocation(manipulator, "org.foo_1.2.3.abc"), foo1.toURI());
- assertEquals(FileUtils.getEclipseRealLocation(manipulator, "org.foo.x86_64"), foo_64.toURI());
-
- assertEquals(FileUtils.getEclipseRealLocation(manipulator, plugins.toURI().toString() + "alotof/s%20p%20a%20c%20e%20s/org.foo_1.2.3.abc/"), fooWithSpaces.toURI());
-
- File other = new File(installFolder, "other/org.foo_1.2.4");
- other.mkdirs();
- manipulator.getConfigData().setProperty("osgi.syspath", other.getParentFile().getAbsolutePath());
- assertEquals(FileUtils.getEclipseRealLocation(manipulator, "org.foo"), other.toURI());
- }
-
- public void testMacRealLocation() throws Exception {
- File installFolder = Activator.getContext().getDataFile("280007");
-
- File plugins = new File(installFolder, "plugins");
- File foo = new File(plugins, "org.foo_1.2.3.abc");
- foo.mkdirs();
-
- Manipulator manipulator = getFrameworkManipulator(new File(installFolder, "configuration"), new File(installFolder, "Eclipse.app/Contents/MacOS/eclipse"));
- manipulator.getLauncherData().setOS(Constants.OS_MACOSX);
- assertEquals(FileUtils.getEclipseRealLocation(manipulator, "org.foo"), foo.toURI());
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/.classpath b/bundles/org.eclipse.equinox.frameworkadmin/.classpath
deleted file mode 100644
index 6f3b481ac..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/.project b/bundles/org.eclipse.equinox.frameworkadmin/.project
deleted file mode 100644
index 20c6cbd32..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.frameworkadmin</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index b5ebf1caa..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,343 +0,0 @@
-#Thu Mar 04 10:20:10 EST 2010
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 283b95a98..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:57:26 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.frameworkadmin/META-INF/MANIFEST.MF
deleted file mode 100644
index c1bde7c05..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.frameworkadmin;singleton:=true
-Bundle-Version: 2.0.0.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Import-Package: org.eclipse.osgi.service.pluginconversion;version="1.0.0",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0"
-Export-Package: org.eclipse.equinox.frameworkadmin;version="2.0.0",
- org.eclipse.equinox.internal.frameworkadmin.utils;
- x-friends:="org.eclipse.equinox.frameworkadmin.equinox,
- org.eclipse.equinox.p2.metadata.generator,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.simpleconfigurator.manipulator",
- org.eclipse.equinox.internal.provisional.configuratormanipulator;x-friends:="org.eclipse.equinox.frameworkadmin.equinox,org.eclipse.equinox.simpleconfigurator.manipulator",
- org.eclipse.equinox.internal.provisional.frameworkadmin;
- x-friends:="org.eclipse.equinox.frameworkadmin.equinox,
- org.eclipse.equinox.p2.metadata.generator,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.touchpoint.eclipse,
- org.eclipse.equinox.simpleconfigurator.manipulator,
- org.eclipse.pde.core,
- org.eclipse.pde.ui"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Require-Bundle: org.eclipse.equinox.common;bundle-version="3.4.0"
-Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.equinox.internal.frameworkadmin.utils.Activator
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/about.html b/bundles/org.eclipse.equinox.frameworkadmin/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/build.properties b/bundles/org.eclipse.equinox.frameworkadmin/build.properties
deleted file mode 100644
index b0b12db73..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
-src.includes = about.html
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/pom.xml b/bundles/org.eclipse.equinox.frameworkadmin/pom.xml
deleted file mode 100644
index 239c24f76..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.frameworkadmin</artifactId>
- <version>2.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/frameworkadmin/BundleInfo.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/frameworkadmin/BundleInfo.java
deleted file mode 100644
index 702fd1811..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/frameworkadmin/BundleInfo.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin;
-
-import java.net.URI;
-import org.eclipse.core.runtime.URIUtil;
-import org.osgi.framework.Version;
-
-/**
- * This object represents information of a bundle.
- * @since 2.0
- */
-public class BundleInfo {
- public static final String EMPTY_VERSION = "0.0.0"; //$NON-NLS-1$
- public static final int NO_LEVEL = -1;
- public static final int NO_BUNDLEID = -1;
-
- private String symbolicName = null;
- private String version = EMPTY_VERSION;
- private URI baseLocation = null;
- private URI location = null;
- private long bundleId = NO_BUNDLEID;
-
- private boolean markedAsStarted = false;
- private int startLevel = NO_LEVEL;
- private boolean resolved = false;
-
- private String manifest = null;
- private String fragmentHost = null;
-
- /**
- * Create a new BundleInfo object
- */
- public BundleInfo() {
- }
-
- /**
- * Create a new BundleInfo object
- * @param location - the location of the bundle
- */
- public BundleInfo(URI location) {
- this.location = location;
- }
-
- /**
- * Create a new BundleInfo object
- * @param location - the location of the bundle
- * @param startLevel - the start to be used or {@link BundleInfo#NO_LEVEL}
- * @param started - whether or not the bundle should be started
- */
- public BundleInfo(URI location, int startLevel, boolean started) {
- this.location = location;
- this.startLevel = startLevel < 0 ? NO_LEVEL : startLevel;
- this.markedAsStarted = started;
- }
-
- /**
- * Create a new BundleInfo object
- * @param symbolic The Bundle-SymbolicName name for this bundle
- * @param version - The version for this bundle, this must be a valid {@link Version} string, if null is passed {@link #EMPTY_VERSION} will be used instead
- * @param location - the location of the bundle
- * @param startLevel - the start level of the bundle or {@link BundleInfo#NO_LEVEL}
- * @param started - whether or not the bundle should be started
- */
- public BundleInfo(String symbolic, String version, URI location, int startLevel, boolean started) {
- this.symbolicName = symbolic;
- this.version = version != null ? version : EMPTY_VERSION;
- this.location = location;
- this.markedAsStarted = started;
- this.startLevel = startLevel < 0 ? NO_LEVEL : startLevel;
- }
-
- /**
- * Get the bundle id
- * @return the bundle id or {@link #NO_BUNDLEID}
- */
- public long getBundleId() {
- return bundleId;
- }
-
- /**
- * The base location
- * An absolute URI which may be used to resolve relative {@link #getLocation()} URIs
- * @return absolute URI or null if not set
- */
- public URI getBaseLocation() {
- return baseLocation;
- }
-
- /**
- * The location of this bundle.
- * A location is required if this bundle will be persisted into a configuration file
- * @return URI location or null if not set
- */
- public URI getLocation() {
- return location;
- }
-
- /**
- * The manifest for this bundle
- * @return the manifest or null if not set
- */
- public String getManifest() {
- return manifest;
- }
-
- /**
- * The start level for this bundle
- * @return the start level or {@link #NO_LEVEL}
- */
- public int getStartLevel() {
- return startLevel;
- }
-
- /**
- * The Bundle-SymbolicName for this bundle.
- * A symbolic name is required if this bundle will be persisted into a configuration file
- * @return the symbolic name or null if not set
- */
- public String getSymbolicName() {
- return symbolicName;
- }
-
- /**
- * Return the version
- * @return an {@link Version} string, or "0.0.0" if not set
- */
- public String getVersion() {
- if (version == null)
- return EMPTY_VERSION;
- return version;
- }
-
- /**
- * Return the host if this bundle is a fragment
- * @return the host, or null if this is not a fragment
- */
- public String getFragmentHost() {
- return fragmentHost;
- }
-
- /**
- * Whether or not this bundle is marked to be started
- * Default is false
- * @return boolean
- */
- public boolean isMarkedAsStarted() {
- return markedAsStarted;
- }
-
- /**
- * Whether or not this bundle is resolved
- * Default is false
- * @return boolean
- */
- public boolean isResolved() {
- return resolved;
- }
-
- /**
- * Set the bundle id
- * @param bundleId
- */
- public void setBundleId(long bundleId) {
- this.bundleId = bundleId;
- }
-
- /**
- * Set a base location against which relative {@link #getLocation()} URIs may be resolved
- * @param baseLocation - an absolute URI
- */
- public void setBaseLocation(URI baseLocation) {
- this.baseLocation = baseLocation;
- }
-
- /**
- * Set the location for this bundle.
- * @param location
- */
- public void setLocation(URI location) {
- this.location = location;
- }
-
- /**
- * Set the manifest for this bundle
- * @param manifest
- */
- public void setManifest(String manifest) {
- this.manifest = manifest;
- }
-
- /**
- * Set whether or not this bundle should be started
- * @param markedAsStarted
- */
- public void setMarkedAsStarted(boolean markedAsStarted) {
- this.markedAsStarted = markedAsStarted;
- }
-
- /**
- * Set whether or not the bundle is resolved
- * @param resolved
- */
- public void setResolved(boolean resolved) {
- this.resolved = resolved;
- }
-
- /**
- * Set the start level.
- * @param level if a value < 0 is passed, the start level will be set to {@link #NO_LEVEL}
- */
- public void setStartLevel(int level) {
- this.startLevel = level < 0 ? NO_LEVEL : level;
- }
-
- /**
- * Set the Bundle-SymbolicName
- * @param symbolicName
- */
- public void setSymbolicName(String symbolicName) {
- this.symbolicName = symbolicName;
- }
-
- /**
- * Set the version, should be a valid {@link Version} string
- * @param value
- */
- public void setVersion(String value) {
- if (value == null)
- this.version = EMPTY_VERSION;
- else
- this.version = value;
- }
-
- /**
- * Set the host if this bundle is a fragment
- * @param fragmentHost
- */
- public void setFragmentHost(String fragmentHost) {
- this.fragmentHost = fragmentHost;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append("BundleInfo("); //$NON-NLS-1$
- if (symbolicName != null)
- buffer.append(symbolicName);
- buffer.append(", "); //$NON-NLS-1$
- buffer.append(version);
-
- if (fragmentHost != null) {
- buffer.append(", fragmentHost="); //$NON-NLS-1$
- buffer.append(fragmentHost);
- }
-
- if (baseLocation != null) {
- buffer.append(", baseLocation="); //$NON-NLS-1$
- buffer.append(baseLocation);
- }
- buffer.append(", location="); //$NON-NLS-1$
- buffer.append(location);
- buffer.append(", startLevel="); //$NON-NLS-1$
- buffer.append(startLevel);
- buffer.append(", toBeStarted="); //$NON-NLS-1$
- buffer.append(markedAsStarted);
- buffer.append(", resolved="); //$NON-NLS-1$
- buffer.append(resolved);
- buffer.append(", id="); //$NON-NLS-1$
- buffer.append(this.bundleId);// buffer.append(',').append(manifest == null ? "no manifest" : "manifest available");
- buffer.append(',').append(manifest == null ? "no manifest" : "manifest available"); //$NON-NLS-1$ //$NON-NLS-2$
- buffer.append(')');
- return buffer.toString();
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((symbolicName == null) ? 0 : symbolicName.hashCode());
- result = prime * result + version.hashCode();
- return result;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
-
- if (obj == null)
- return false;
-
- if (getClass() != obj.getClass())
- return false;
-
- BundleInfo other = (BundleInfo) obj;
- if (symbolicName == null) {
- if (other.symbolicName != null)
- return false;
- } else if (!symbolicName.equals(other.symbolicName))
- return false;
-
- if (!version.equals(other.getVersion()))
- return false;
-
- if (location == null || other.location == null)
- return true;
-
- //compare absolute location URIs
- URI absoluteLocation = null;
- if (location.isAbsolute() || baseLocation == null)
- absoluteLocation = location;
- else
- absoluteLocation = URIUtil.append(baseLocation, URIUtil.toUnencodedString(location));
-
- URI otherAbsoluteLocation = null;
- if (other.location.isAbsolute() || other.baseLocation == null)
- otherAbsoluteLocation = other.location;
- else
- otherAbsoluteLocation = URIUtil.append(other.baseLocation, URIUtil.toUnencodedString(other.location));
- return URIUtil.sameURI(absoluteLocation, otherAbsoluteLocation);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Activator.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Activator.java
deleted file mode 100644
index 733bdcb5d..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Activator.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.utils;
-
-import org.eclipse.osgi.service.pluginconversion.PluginConverter;
-import org.osgi.framework.*;
-
-/**
- * @since 1.0
- */
-public class Activator implements BundleActivator {
-
- private static BundleContext bundleContext;
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- bundleContext = context;
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- bundleContext = null;
- }
-
- /*
- * Acquire the plug-in conversion service or return <code>null</code> if it is not available.
- */
- public static PluginConverter acquirePluginConverter() {
- if (bundleContext == null)
- return null;
- ServiceReference reference = bundleContext.getServiceReference(PluginConverter.class.getName());
- if (reference == null)
- return null;
- PluginConverter result = (PluginConverter) bundleContext.getService(reference);
- bundleContext.ungetService(reference);
- return result;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/SimpleBundlesState.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/SimpleBundlesState.java
deleted file mode 100644
index 2d257a581..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/SimpleBundlesState.java
+++ /dev/null
@@ -1,329 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.utils;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.util.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.Constants;
-
-/**
- * This implementation of BundlesState doesn't support any of
- * - resolving bundles,
- * - retrieving fw persistent data.
- *
- * This implementation can be used for those cases.
- *
- */
-
-public class SimpleBundlesState implements BundlesState {
- public static final BundleInfo[] NULL_BUNDLEINFOS = new BundleInfo[0];
-
- /**
- * Check if the specified FrameworkAdmin is available.
- *
- * @param fwAdmin
- * @throws FrameworkAdminRuntimeException
- */
- public static void checkAvailability(FrameworkAdmin fwAdmin) throws FrameworkAdminRuntimeException {
- if (!fwAdmin.isActive())
- throw new FrameworkAdminRuntimeException("FrameworkAdmin creates this object is no more available.", FrameworkAdminRuntimeException.FRAMEWORKADMIN_UNAVAILABLE);
- }
-
- /**
- *
- * @param launcherData
- * @return File of fwJar to be used.
- * @throws IOException
- */
- static File getFwJar(LauncherData launcherData) {
- if (launcherData.getFwJar() != null)
- return launcherData.getFwJar();
- return null;
- }
-
- private final String systemBundleSymbolicName;
-
- private final String systemBundleName;
-
- private final String systemBundleVendor;
- List bundleInfosList = new LinkedList();
-
- FrameworkAdmin fwAdmin = null;
-
- Manipulator manipulator = null;
-
- /**
- * If the manifest of the target fw implementation has Constants.BUNDLE_SYMBOLICNAME header,
- * this constructor should be used.
- *
- * @param ManipulatorAdmin
- * @param Manipulator
- * @param systemBundleSymbolicName
- */
- public SimpleBundlesState(FrameworkAdmin ManipulatorAdmin, Manipulator Manipulator, String systemBundleSymbolicName) {
- super();
- this.fwAdmin = ManipulatorAdmin;
- // copy Manipulator object for avoiding modifying the parameters of the Manipulator.
- this.manipulator = ManipulatorAdmin.getManipulator();
- this.manipulator.setConfigData(Manipulator.getConfigData());
- this.manipulator.setLauncherData(Manipulator.getLauncherData());
- this.systemBundleSymbolicName = systemBundleSymbolicName;
- this.systemBundleName = null;
- this.systemBundleVendor = null;
- initialize();
- }
-
- /**
- * If the manifest of the target fw implementation has not Constants.BUNDLE_SYMBOLICNAME header
- * but , Constants.BUNDLE_NAME and BUNDLE_VERSION,
- * this constructor should be used.
- *
- * @param ManipulatorAdmin
- * @param Manipulator
- * @param systemBundleName
- * @param systemBundleVender
- */
- public SimpleBundlesState(FrameworkAdmin ManipulatorAdmin, Manipulator Manipulator, String systemBundleName, String systemBundleVender) {
- super();
- this.fwAdmin = ManipulatorAdmin;
- // copy Manipulator object for avoiding modifying the parameters of the Manipulator.
- this.manipulator = ManipulatorAdmin.getManipulator();
- this.manipulator.setConfigData(Manipulator.getConfigData());
- this.manipulator.setLauncherData(Manipulator.getLauncherData());
- this.systemBundleSymbolicName = null;
- this.systemBundleName = systemBundleName;
- this.systemBundleVendor = systemBundleVender;
- initialize();
- }
-
- public BundleInfo[] getExpectedState() throws FrameworkAdminRuntimeException {
- if (!fwAdmin.isActive())
- throw new FrameworkAdminRuntimeException("FrameworkAdmin creates this object is no more available.", FrameworkAdminRuntimeException.FRAMEWORKADMIN_UNAVAILABLE);
- return Utils.getBundleInfosFromList(this.bundleInfosList);
- }
-
- /*
- * Just return required bundles.
- *
- * @see org.eclipse.equinox.internal.provisional.frameworkadmin.BundlesState#getPrerequisteBundles(org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo)
- */
- public BundleInfo[] getPrerequisteBundles(BundleInfo bInfo) {
- URI location = bInfo.getLocation();
- final String requiredBundles = Utils.getManifestMainAttributes(location, Constants.REQUIRE_BUNDLE);
- if (requiredBundles == null)
- return new BundleInfo[] {this.getSystemBundle()};
-
- String[] clauses = Utils.getClauses(requiredBundles);
- List list = new LinkedList();
- for (int i = 0; i < clauses.length; i++)
- list.add(Utils.getPathFromClause(clauses[i]));
-
- List ret = new LinkedList();
- ret.add(this.getSystemBundle());
- for (Iterator ite = this.bundleInfosList.iterator(); ite.hasNext();) {
- BundleInfo currentBInfo = (BundleInfo) ite.next();
- URI currentLocation = currentBInfo.getLocation();
- String currentSymbolicName = Utils.getManifestMainAttributes(currentLocation, Constants.BUNDLE_SYMBOLICNAME);
- if (currentSymbolicName == null)
- continue;
- currentSymbolicName = Utils.getPathFromClause(currentSymbolicName);
- for (Iterator ite2 = list.iterator(); ite2.hasNext();) {
- String symbolicName = (String) ite2.next();
- if (symbolicName.equals(currentSymbolicName)) {
- ret.add(currentBInfo);
- break;
- }
- }
- }
- return Utils.getBundleInfosFromList(ret);
- }
-
- public BundleInfo getSystemBundle() {
- if (this.systemBundleSymbolicName == null) {
- for (Iterator ite = this.bundleInfosList.iterator(); ite.hasNext();) {
- BundleInfo bInfo = (BundleInfo) ite.next();
- // if (bInfo.getStartLevel() != 1)
- // return null;;
- URI location = bInfo.getLocation();
- String bundleName = Utils.getManifestMainAttributes(location, Constants.BUNDLE_NAME);
- if (systemBundleName.equals(bundleName)) {
- String bundleVendor = Utils.getManifestMainAttributes(location, Constants.BUNDLE_VENDOR);
- if (systemBundleVendor.equals(bundleVendor))
- return bInfo;
- }
- }
- return null;
- }
- for (Iterator ite = this.bundleInfosList.iterator(); ite.hasNext();) {
- BundleInfo bInfo = (BundleInfo) ite.next();
- URI location = bInfo.getLocation();
- String symbolicName = Utils.getManifestMainAttributes(location, Constants.BUNDLE_SYMBOLICNAME);
- symbolicName = Utils.getPathFromClause(symbolicName);
- if (this.systemBundleSymbolicName.equals(symbolicName))
- return bInfo;
- }
- return null;
- }
-
- public BundleInfo[] getSystemFragmentedBundles() {
- BundleInfo systemBInfo = this.getSystemBundle();
- if (systemBInfo == null)
- return NULL_BUNDLEINFOS;
-
- List list = new LinkedList();
- for (Iterator ite = this.bundleInfosList.iterator(); ite.hasNext();) {
- BundleInfo bInfo = (BundleInfo) ite.next();
- URI location = bInfo.getLocation();
- String manifestVersion = Utils.getManifestMainAttributes(location, Constants.BUNDLE_MANIFESTVERSION);
- if (manifestVersion == null)
- continue;
- if (manifestVersion.equals("1") || manifestVersion.equals("1.0")) //$NON-NLS-1$//$NON-NLS-2$
- continue;
-
- String fragmentHost = Utils.getManifestMainAttributes(location, Constants.FRAGMENT_HOST);
- if (fragmentHost == null)
- continue;
- int index = fragmentHost.indexOf(";"); //$NON-NLS-1$
- if (index == -1)
- continue;
- String symbolicName = fragmentHost.substring(0, index).trim();
- String parameter = fragmentHost.substring(index + 1).trim();
- // TODO What to do ,in case of alias name of system bundle is not used ?
- if (symbolicName.equals(Constants.SYSTEM_BUNDLE_SYMBOLICNAME))
- if (parameter.equals(Constants.EXTENSION_DIRECTIVE + ":=" + Constants.EXTENSION_FRAMEWORK)) { //$NON-NLS-1$
- list.add(location);
- break;
- }
- }
- return Utils.getBundleInfosFromList(list);
- }
-
- public String[] getUnsatisfiedConstraints(BundleInfo bInfo) throws FrameworkAdminRuntimeException {
- throw new FrameworkAdminRuntimeException("getUnsatisfiedConstraints(BundleInfo bInfo) is not supported in this implementation", FrameworkAdminRuntimeException.UNSUPPORTED_OPERATION);
- }
-
- private void initialize() {
- this.bundleInfosList.clear();
- LauncherData launcherData = manipulator.getLauncherData();
- ConfigData configData = manipulator.getConfigData();
- File fwJar = getFwJar(launcherData);;
-
- if (fwJar == null)
- throw new IllegalStateException("launcherData.getLauncherConfigFile() == null && fwJar is not set.");
- // No fw persistent data location is taken into consideration.
-
- BundleInfo[] bInfos = configData.getBundles();
- for (int j = 0; j < bInfos.length; j++)
- this.installBundle(bInfos[j]);
-
- if (getSystemBundle() == null) {
- BundleInfo sysBInfo = new BundleInfo(launcherData.getFwJar().toURI(), 0, true);
- sysBInfo.setBundleId(0);
- this.installBundle(sysBInfo);
- }
- }
-
- public void installBundle(BundleInfo bInfo) throws FrameworkAdminRuntimeException {
-
- URI newLocation = bInfo.getLocation();
- Dictionary newManifest = Utils.getOSGiManifest(newLocation);
- if (newManifest == null) {
- // TODO log something here
- return;
- }
- String newSymbolicName = (String) newManifest.get(Constants.BUNDLE_SYMBOLICNAME);
- String newVersion = (String) newManifest.get(Constants.BUNDLE_VERSION);
- //System.out.println("> currentInstalledBundles.length=" + currentInstalledBundles.length);
- boolean found = false;
- for (Iterator ite = this.bundleInfosList.iterator(); ite.hasNext();) {
- BundleInfo currentBInfo = (BundleInfo) ite.next();
- URI location = currentBInfo.getLocation();
- if (newLocation.equals(location)) {
- found = true;
- break;
- }
- Dictionary manifest = Utils.getOSGiManifest(location);
- String symbolicName = (String) manifest.get(Constants.BUNDLE_SYMBOLICNAME);
- String version = (String) manifest.get(Constants.BUNDLE_VERSION);
- if (newSymbolicName != null && newVersion != null)
- if (newSymbolicName.equals(symbolicName) && newVersion.equals(version)) {
- found = true;
- break;
- }
- }
- if (!found) {
- this.bundleInfosList.add(bInfo);
- }
- }
-
- // public String toString() {
- // if (state == null)
- // return null;
- // StringBuffer sb = new StringBuffer();
- // BundleDescription[] bundleDescriptions = state.getBundles();
- // for (int i = 0; i < bundleDescriptions.length; i++) {
- // sb.append(bundleDescriptions[i].getBundleId() + ":");
- // sb.append(bundleDescriptions[i].toString() + "(");
- // sb.append(bundleDescriptions[i].isResolved() + ")");
- // String[] ees = bundleDescriptions[i].getExecutionEnvironments();
- // for (int j = 0; j < ees.length; j++)
- // sb.append(ees[j] + " ");
- // sb.append("\n");
- // }
- // sb.append("PlatformProperties:\n");
- // Dictionary[] dics = state.getPlatformProperties();
- // for (int i = 0; i < dics.length; i++) {
- // for (Enumeration enum = dics[i].keys(); enum.hasMoreElements();) {
- // String key = (String) enum.nextElement();
- // String value = (String) dics[i].get(key);
- // sb.append(" (" + key + "," + value + ")\n");
- // }
- // }
- // sb.append("\n");
- // return sb.toString();
- // }
-
- public boolean isFullySupported() {
- return false;
- }
-
- public boolean isResolved() throws FrameworkAdminRuntimeException {
- throw new FrameworkAdminRuntimeException("isResolved() is not supported in this implementation", FrameworkAdminRuntimeException.UNSUPPORTED_OPERATION);
- }
-
- public boolean isResolved(BundleInfo bInfo) throws FrameworkAdminRuntimeException {
- throw new FrameworkAdminRuntimeException("isResolved(BundleInfo bInfo) is not supported in this implementation", FrameworkAdminRuntimeException.UNSUPPORTED_OPERATION);
- }
-
- public void resolve(boolean increment) throws FrameworkAdminRuntimeException {
- throw new FrameworkAdminRuntimeException("resolve(boolean increment) is not supported in this implementation", FrameworkAdminRuntimeException.UNSUPPORTED_OPERATION);
- }
-
- public void uninstallBundle(BundleInfo bInfo) throws FrameworkAdminRuntimeException {
- URI targetLocation = bInfo.getLocation();
- int index = -1;
- for (Iterator ite = this.bundleInfosList.iterator(); ite.hasNext();) {
- index++;
- BundleInfo currentBInfo = (BundleInfo) ite.next();
- URI location = currentBInfo.getLocation();
- if (targetLocation.equals(location)) {
- break;
- }
- }
- if (index != -1)
- this.bundleInfosList.remove(index);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java
deleted file mode 100644
index 375622c2c..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java
+++ /dev/null
@@ -1,442 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.utils;
-
-import java.io.*;
-import java.net.*;
-import java.text.SimpleDateFormat;
-import java.util.*;
-import java.util.jar.JarFile;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.osgi.service.pluginconversion.PluginConversionException;
-import org.eclipse.osgi.service.pluginconversion.PluginConverter;
-import org.eclipse.osgi.util.ManifestElement;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.Constants;
-
-public class Utils {
- private static final String FEATURE_MANIFEST = "feature.xml"; //$NON-NLS-1$
- private static final String FILE_SCHEME = "file"; //$NON-NLS-1$
- private static final String FRAGMENT_MANIFEST = "fragment.xml"; //$NON-NLS-1$
- private static final String PATH_SEP = "/"; //$NON-NLS-1$
- private static final String PLUGIN_MANIFEST = "plugin.xml"; //$NON-NLS-1$
-
- /**
- * Overwrite all properties of from to the properties of to. Return the result of to.
- *
- * @param to Properties whose keys and values of other Properties will be appended to.
- * @param from Properties whose keys and values will be set to the other properties.
- * @return Properties as a result of this method.
- */
- public static Properties appendProperties(Properties to, Properties from) {
- if (from != null) {
- if (to == null)
- to = new Properties();
- // printoutProperties(System.out, "to", to);
- // printoutProperties(System.out, "from", from);
-
- for (Enumeration enumeration = from.keys(); enumeration.hasMoreElements();) {
- String key = (String) enumeration.nextElement();
- to.setProperty(key, from.getProperty(key));
- }
- }
- // printoutProperties(System.out, "to", to);
- return to;
- }
-
- //Return a dictionary representing a manifest. The data may result from plugin.xml conversion
- private static Dictionary basicLoadManifest(File bundleLocation) {
- InputStream manifestStream = null;
- ZipFile jarFile = null;
- try {
- try {
- // Handle a JAR'd bundle
- if (bundleLocation.isFile()) {
- jarFile = new ZipFile(bundleLocation, ZipFile.OPEN_READ);
- ZipEntry manifestEntry = jarFile.getEntry(JarFile.MANIFEST_NAME);
- if (manifestEntry != null) {
- manifestStream = jarFile.getInputStream(manifestEntry);
- }
- } else {
- // we have a directory-based bundle
- File bundleManifestFile = new File(bundleLocation, JarFile.MANIFEST_NAME);
- if (bundleManifestFile.exists())
- manifestStream = new BufferedInputStream(new FileInputStream(new File(bundleLocation, JarFile.MANIFEST_NAME)));
- }
- } catch (IOException e) {
- //ignore
- }
- // we were unable to get an OSGi manifest file so try and convert an old-style manifest
- if (manifestStream == null)
- return convertPluginManifest(bundleLocation, true);
-
- try {
- Map manifest = ManifestElement.parseBundleManifest(manifestStream, null);
- // add this check to handle the case were we read a non-OSGi manifest
- if (manifest.get(Constants.BUNDLE_SYMBOLICNAME) == null)
- return convertPluginManifest(bundleLocation, true);
- return manifestToProperties(manifest);
- } catch (IOException ioe) {
- return null;
- } catch (BundleException e) {
- return null;
- }
- } finally {
- try {
- if (manifestStream != null)
- manifestStream.close();
- } catch (IOException e1) {
- //Ignore
- }
- try {
- if (jarFile != null)
- jarFile.close();
- } catch (IOException e2) {
- //Ignore
- }
- }
- }
-
- public static void checkAbsoluteDir(File file, String dirName) throws IllegalArgumentException {
- if (file == null)
- throw new IllegalArgumentException(dirName + " is null");
- if (!file.isAbsolute())
- throw new IllegalArgumentException(dirName + " is not absolute path. file=" + file.getAbsolutePath());
- if (!file.isDirectory())
- throw new IllegalArgumentException(dirName + " is not directory. file=" + file.getAbsolutePath());
- }
-
- public static void checkAbsoluteFile(File file, String dirName) {//throws ManipulatorException {
- if (file == null)
- throw new IllegalArgumentException(dirName + " is null");
- if (!file.isAbsolute())
- throw new IllegalArgumentException(dirName + " is not absolute path. file=" + file.getAbsolutePath());
- if (file.isDirectory())
- throw new IllegalArgumentException(dirName + " is not file but directory");
- }
-
- public static URL checkFullUrl(URL url, String urlName) throws IllegalArgumentException {//throws ManipulatorException {
- if (url == null)
- throw new IllegalArgumentException(urlName + " is null");
- if (!url.getProtocol().endsWith("file")) //$NON-NLS-1$
- return url;
- File file = new File(url.getFile());
- if (!file.isAbsolute())
- throw new IllegalArgumentException(urlName + "(" + url + ") does not have absolute path");
- if (file.getAbsolutePath().startsWith(PATH_SEP))
- return url;
- try {
- return getUrl("file", null, PATH_SEP + file.getAbsolutePath()); //$NON-NLS-1$
- } catch (MalformedURLException e) {
- throw new IllegalArgumentException(urlName + "(" + "file:" + PATH_SEP + file.getAbsolutePath() + ") is not fully quallified");
- }
- }
-
- /*
- * Copied from BundleDescriptionFactory in the metadata generator.
- */
- private static Dictionary convertPluginManifest(File bundleLocation, boolean logConversionException) {
- PluginConverter converter;
- try {
- converter = org.eclipse.equinox.internal.frameworkadmin.utils.Activator.acquirePluginConverter();
- if (converter == null) {
- new RuntimeException("Unable to aquire PluginConverter service during generation for: " + bundleLocation).printStackTrace(); //$NON-NLS-1$
- return null;
- }
- return converter.convertManifest(bundleLocation, false, null, true, null);
- } catch (PluginConversionException convertException) {
- // only log the exception if we had a plugin.xml or fragment.xml and we failed conversion
- if (bundleLocation.getName().equals(FEATURE_MANIFEST))
- return null;
- if (!new File(bundleLocation, PLUGIN_MANIFEST).exists() && !new File(bundleLocation, FRAGMENT_MANIFEST).exists())
- return null;
- if (logConversionException) {
- IStatus status = new Status(IStatus.WARNING, "org.eclipse.equinox.frameworkadmin", 0, "Error converting bundle manifest.", convertException);
- System.out.println(status);
- //TODO Need to find a way to get a logging service to log
- }
- return null;
- }
- }
-
- public static boolean createParentDir(File file) {
- File parent = file.getParentFile();
- if (parent == null)
- return false;
- if (parent.exists())
- return true;
- return parent.mkdirs();
- }
-
- public static BundleInfo[] getBundleInfosFromList(List list) {
- if (list == null)
- return new BundleInfo[0];
- BundleInfo[] ret = new BundleInfo[list.size()];
- list.toArray(ret);
- return ret;
- }
-
- public static String[] getClauses(String header) {
- StringTokenizer token = new StringTokenizer(header, ","); //$NON-NLS-1$
- List list = new LinkedList();
- while (token.hasMoreTokens()) {
- list.add(token.nextToken());
- }
- String[] ret = new String[list.size()];
- list.toArray(ret);
- return ret;
- }
-
- public static String[] getClausesManifestMainAttributes(URI location, String name) {
- return getClauses(getManifestMainAttributes(location, name));
- }
-
- public static String getManifestMainAttributes(URI location, String name) {
- Dictionary manifest = Utils.getOSGiManifest(location);
- if (manifest == null)
- throw new RuntimeException("Unable to locate bundle manifest: " + location);
- return (String) manifest.get(name);
- }
-
- public static Dictionary getOSGiManifest(URI location) {
- if (location == null)
- return null;
- // if we have a file-based URL that doesn't end in ".jar" then...
- if (FILE_SCHEME.equals(location.getScheme()))
- return basicLoadManifest(URIUtil.toFile(location));
-
- try {
- URL url = new URL("jar:" + location.toString() + "!/"); //$NON-NLS-1$//$NON-NLS-2$
- JarURLConnection jarConnection = (JarURLConnection) url.openConnection();
- ZipFile jar = jarConnection.getJarFile();
-
- try {
- ZipEntry entry = jar.getEntry(JarFile.MANIFEST_NAME);
- if (entry == null)
- return null;
-
- Map manifest = ManifestElement.parseBundleManifest(jar.getInputStream(entry), null);
- // if we have a JAR'd bundle that has a non-OSGi manifest file (like
- // the ones produced by Ant, then try and convert the plugin.xml
- if (manifest.get(Constants.BUNDLE_SYMBOLICNAME) == null) {
- String jarName = jar.getName();
- File file = jarName != null ? new File(jarName) : null;
- if (file != null && file.exists()) {
- return convertPluginManifest(file, true);
- }
- return null;
- }
- return manifestToProperties(manifest);
- } catch (BundleException e) {
- return null;
- } finally {
- jar.close();
- }
- } catch (IOException e) {
- if (System.getProperty("osgi.debug") != null) {
- System.err.println("location=" + location);
- e.printStackTrace();
- }
- }
- return null;
- }
-
- public static String getPathFromClause(String clause) {
- if (clause == null)
- return null;
- if (clause.indexOf(";") != -1)
- clause = clause.substring(0, clause.indexOf(";"));
- return clause.trim();
- }
-
- public static String getRelativePath(File target, File from) {
-
- String targetPath = Utils.replaceAll(target.getAbsolutePath(), File.separator, PATH_SEP);
- String fromPath = Utils.replaceAll(from.getAbsolutePath(), File.separator, PATH_SEP);
-
- String[] targetTokens = Utils.getTokens(targetPath, PATH_SEP);
- String[] fromTokens = Utils.getTokens(fromPath, PATH_SEP);
- int index = -1;
- for (int i = 0; i < fromTokens.length; i++)
- if (fromTokens[i].equals(targetTokens[i]))
- index = i;
- else
- break;
-
- StringBuffer sb = new StringBuffer();
- for (int i = index + 1; i < fromTokens.length; i++)
- sb.append(".." + PATH_SEP);
-
- for (int i = index + 1; i < targetTokens.length; i++)
- if (i != targetTokens.length - 1)
- sb.append(targetTokens[i] + PATH_SEP);
- else
- sb.append(targetTokens[i]);
- return sb.toString();
- }
-
- /**
- * This method will be called for create a backup file.
- *
- * @param file target file
- * @return File backup file whose filename consists of "hogehoge.yyyyMMddHHmmss.ext" or
- * "hogehoge.yyyyMMddHHmmss".
- */
- public static File getSimpleDataFormattedFile(File file) {
- SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss"); //$NON-NLS-1$
- String date = df.format(new Date());
- String filename = file.getName();
- int index = filename.lastIndexOf("."); //$NON-NLS-1$
- if (index != -1)
- filename = filename.substring(0, index) + "." + date + "." + filename.substring(index + 1); //$NON-NLS-1$ //$NON-NLS-2$
- else
- filename = filename + "." + date; //$NON-NLS-1$
- File dest = new File(file.getParentFile(), filename);
- return dest;
- }
-
- public static String[] getTokens(String msg, String delim) {
- return getTokens(msg, delim, false);
- }
-
- public static String[] getTokens(String msg, String delim, boolean returnDelims) {
- StringTokenizer targetST = new StringTokenizer(msg, delim, returnDelims);
- String[] tokens = new String[targetST.countTokens()];
- ArrayList list = new ArrayList(targetST.countTokens());
- while (targetST.hasMoreTokens()) {
- list.add(targetST.nextToken());
- }
- list.toArray(tokens);
- return tokens;
- }
-
- public static URL getUrl(String protocol, String host, String file) throws MalformedURLException {// throws ManipulatorException {
- file = Utils.replaceAll(file, File.separator, "/");
- return new URL(protocol, host, file);
- }
-
- public static URL getUrlInFull(String path, URL from) throws MalformedURLException {//throws ManipulatorException {
- Utils.checkFullUrl(from, "from");
- path = Utils.replaceAll(path, File.separator, "/"); //$NON-NLS-1$
- //System.out.println("from.toExternalForm()=" + from.toExternalForm());
- String fromSt = Utils.removeLastCh(from.toExternalForm(), '/');
- //System.out.println("fromSt=" + fromSt);
- if (path.startsWith("/")) { //$NON-NLS-1$
- String fileSt = from.getFile();
- return new URL(fromSt.substring(0, fromSt.lastIndexOf(fileSt) - 1) + path);
- }
- return new URL(fromSt + "/" + path); //$NON-NLS-1$
- }
-
- private static Properties manifestToProperties(Map d) {
- Iterator iter = d.keySet().iterator();
- Properties result = new Properties();
- while (iter.hasNext()) {
- String key = (String) iter.next();
- result.put(key, d.get(key));
- }
- return result;
- }
-
- /**
- * Just used for debug.
- *
- * @param ps printstream
- * @param name name of properties
- * @param props properties whose keys and values will be printed out.
- */
- public static void printoutProperties(PrintStream ps, String name, Properties props) {
- if (props == null || props.size() == 0) {
- ps.println("Props(" + name + ") is empty");
- return;
- }
- ps.println("Props(" + name + ")=");
- for (Enumeration enumeration = props.keys(); enumeration.hasMoreElements();) {
- String key = (String) enumeration.nextElement();
- ps.print("\tkey=" + key);
- ps.println("\tvalue=" + props.getProperty(key));
- }
- }
-
- public static String removeLastCh(String target, char ch) {
- while (target.charAt(target.length() - 1) == ch) {
- target = target.substring(0, target.length() - 1);
- }
- return target;
- }
-
- public static String replaceAll(String st, String oldSt, String newSt) {
- if (oldSt.equals(newSt))
- return st;
- int index = -1;
- while ((index = st.indexOf(oldSt)) != -1) {
- st = st.substring(0, index) + newSt + st.substring(index + oldSt.length());
- }
- return st;
- }
-
- /**
- * Sort by increasing order of startlevels.
- *
- * @param bInfos array of BundleInfos to be sorted.
- * @param initialBSL initial bundle start level to be used.
- * @return sorted array of BundleInfos
- */
- public static BundleInfo[] sortBundleInfos(BundleInfo[] bInfos, int initialBSL) {
- SortedMap bslToList = new TreeMap();
- for (int i = 0; i < bInfos.length; i++) {
- Integer sL = new Integer(bInfos[i].getStartLevel());
- if (sL.intValue() == BundleInfo.NO_LEVEL)
- sL = new Integer(initialBSL);
- List list = (List) bslToList.get(sL);
- if (list == null) {
- list = new LinkedList();
- bslToList.put(sL, list);
- }
- list.add(bInfos[i]);
- }
-
- // bslToList is sorted by the key (StartLevel).
- List bundleInfoList = new LinkedList();
- for (Iterator ite = bslToList.keySet().iterator(); ite.hasNext();) {
- Integer sL = (Integer) ite.next();
- List list = (List) bslToList.get(sL);
- for (Iterator ite2 = list.iterator(); ite2.hasNext();) {
- BundleInfo bInfo = (BundleInfo) ite2.next();
- bundleInfoList.add(bInfo);
- }
- }
- return getBundleInfosFromList(bundleInfoList);
- }
-
- /**
- * get String representing the given properties.
- *
- * @param name name of properties
- * @param props properties whose keys and values will be printed out.
- */
- public static String toStringProperties(String name, Properties props) {
- if (props == null || props.size() == 0) {
- return "Props(" + name + ") is empty\n";
- }
- StringBuffer sb = new StringBuffer();
- sb.append("Props(" + name + ") is \n");
- for (Enumeration enumeration = props.keys(); enumeration.hasMoreElements();) {
- String key = (String) enumeration.nextElement();
- sb.append("\tkey=" + key + "\tvalue=" + props.getProperty(key) + "\n");
- }
- return sb.toString();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulator.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulator.java
deleted file mode 100644
index dfc6b43d8..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulator.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.configuratormanipulator;
-
-import java.io.File;
-import java.io.IOException;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-
-/**
- *
- * This interface provides methods that enable client bundles to
- * manipulate the corresponding ConfiguratorBundle.
- *
- * see org.eclipse.equinox.internal.provisional.configurator.Configurator
- */
-
-public interface ConfiguratorManipulator {
- String SERVICE_PROP_KEY_CONFIGURATOR_BUNDLESYMBOLICNAME = "org.eclipse.equinox.configurator.BundleSymbolicName"; //$NON-NLS-1$
-
- /**
- * Save configuration for the corresponding Configurator Bundle so that
- * Bundles kept by the specified {@link Manipulator} would be installed after completion of a launch.
- * The location of a configuration file is determined by the parameters set to the Manipulator object
- * and it depends on the corresponding ConfiguratorBundle implementation.
- *
- * While some parameters of the {@link Manipulator} object will be modified (for setting info about the
- * location the ConfiguratorBundle would be able to refer in a future launch),
- * the Bundles kept by the {@link Manipulator} object should not be modified.
- *
- * Instead, it will return BundleInfo[] to be managed not by the ConfiguratorBundle.
- * These values are supposed to be saved into fw config files.
- *
- * If backup flag is true, a file have existed already under the same name
- * will be renamed into another name as a backup.
- *
- * We assume that the implementation of {@link Manipulator#save(boolean)} will call this method.
- *
- * @return array of BundleInfo to be saved as installing bundles in fw config files.
- * @param manipulator {@link Manipulator} object which contains the bundles to be installed finally.
- * @param backup if files exists at the location to save, it will be copied as a backup.
- * @throws IOException - If fail to save configuration for the corresponding Configurator Bundle.
- */
- BundleInfo[] save(Manipulator manipulator, boolean backup) throws IOException;
-
- /**
- * Update bundles kept by the specified {@link Manipulator} object into installed bundles
- * if {@link FrameworkAdmin#launch(Manipulator, File)} with the specified
- * {@link Manipulator} is called taking the corresponding ConfiguratorBundle behaivior into account.
- *
- * If there is no corresponding ConfiguratorBundle in Manipulator.getConfigData().getBundles(),
- * just return.
- *
- * The BundleInfo[] of the specified Manipulator object will be modified.
- *
- * This method is assumed to be called from {@link Manipulator#load()}.
- *
- * @param manipulator {@link Manipulator} object to be used and updated.
- * @throws IOException - If fail to read configuration for the corresponding Configurator Bundle.
- */
- void updateBundles(Manipulator manipulator) throws IOException;
-
- void cleanup(Manipulator manipulator);
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulatorFactory.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulatorFactory.java
deleted file mode 100644
index 7ff12534d..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulatorFactory.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.configuratormanipulator;
-
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
-
-/**
- * Factory class for creating ConfiguratorManipulator object from Java programs.
- *
- * @see FrameworkAdmin
- */
-public abstract class ConfiguratorManipulatorFactory {
- public final static String SYSTEM_PROPERTY_KEY = "org.eclipse.equinox.configuratorManipulatorFactory"; //$NON-NLS-1$
-
- abstract protected ConfiguratorManipulator createConfiguratorManipulator();
-
- public static ConfiguratorManipulator getInstance(String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
- ConfiguratorManipulatorFactory factory = (ConfiguratorManipulatorFactory) Class.forName(className).newInstance();
- return factory.createConfiguratorManipulator();
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundlesState.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundlesState.java
deleted file mode 100644
index bbd261cc3..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundlesState.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.frameworkadmin;
-
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-
-/**
- * This API is used for expecting bundles state virtually.
- *
- * This object is instantiated by {@link Manipulator#getBundlesState()}.
- * At its instantiation, state of the bundles will be created in this object
- * according to the parameters which the calling {@link Manipulator} object has.
- * For its creation, information in the fw persistent data will be taken into account.
- *
- * Modification of this object after its instantiation never affects the parameters
- * in the calling {@link Manipulator} object.
- *
- * XXX Implementation of Simple ConfiguratorManipulator needs the functions.
- *
- * @see Manipulator
- */
-public interface BundlesState {
-
- /** Return expected bundles state currently kept in this object.
- *
- * The implementation of this method will try to resolve the state
- * if resolving a state is supported.
- *
- * @return bundle array of BundleInfo currently composed in this object.
- * @throws FrameworkAdminRuntimeException - If the {@link FrameworkAdmin} service created the parent {@link Manipulator} is unregistered.
- */
- BundleInfo[] getExpectedState() throws FrameworkAdminRuntimeException;
-
- /**
- * Return required bundles to be resolve the specified bInfo
- * under the state currently composed.
- *
- * The implementation of this method will try to resolve the state
- * if resolving a state is supported.
- *
- * @param bInfo bundleinfo whose prerequisite bundles will be searched.
- * @return bundle array of BundleInfos required for the specified bInfo to be resolved.
- */
- BundleInfo[] getPrerequisteBundles(BundleInfo bInfo);
-
- /**
- * Return a bundle to be used as a framework under the state currently composed.
- * @return a bundle to be used as a framework under the state currently composed.
- */
- public BundleInfo getSystemBundle();
-
- /**
- * Return bundles which are fragment bundles of the framework under the state currently composed.
- * @return array of BundleInfos which are fragment bundles of the framework.
- */
- public BundleInfo[] getSystemFragmentedBundles();
-
- /**
- * Return array of Strings which tells the unsatisfied constaints
- * to resolve the specified bInfo under the state currently composed.
- *
- * If this implementation doesn't support resolving state,
- * FrameworkAdminRuntimeException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}
- * will be thrown.
- *
- * XXX this method is prepared mainly for debugging.
- *
- * @param bInfo
- * @return array of Strings which tells the unsatisfied constaints.
- * @throws FrameworkAdminRuntimeException if this implementation doesn't support resolving state, FrameworkAdminRuntimeException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION} will be thrown.
- */
- public String[] getUnsatisfiedConstraints(BundleInfo bInfo) throws FrameworkAdminRuntimeException;
-
- /**
- * Install the specified bInfo as a installed bundle to the current state virtually.
- * Note that resolve this bundle is not done in this implementation.
- *
- * @param bInfo BundleInfo to be installed
- * @throws FrameworkAdminRuntimeException - If the {@link FrameworkAdmin} service created the parent {@link Manipulator} is unregistered.
- */
- void installBundle(BundleInfo bInfo) throws FrameworkAdminRuntimeException;
-
- /**
- * Return true if this implementation supports full functions,
- * such as resolving bundles and .
- * Otherwise false will be returend.
- * @return true if this implementation supports resolving state. Otherwise false.
- */
- boolean isFullySupported();
-
- /**
- * Return true if the state currently composed is resolved after the last change of the state.
- * Otherwise false.
- *
- * If this implementation doesn't support resolving state,
- * FrameworkAdminRuntimeException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}
- * will be thrown.
- *
- * @return true if the state currently composed is resolved after the last change of the state. Otherwise false.
- * @throws FrameworkAdminRuntimeException if this implementation doesn't support resolving state, FrameworkAdminRuntimeException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION} will be thrown.
- */
- public boolean isResolved() throws FrameworkAdminRuntimeException;
-
- /**
- * Return true if the specified bundle is resolved.
- * Otherwise false.
- *
- * If this implementation doesn't support resolving state,
- * FwLauncherException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}
- * will be thrown.
- *
- * @return true if the specified bundle is resolved. Otherwise false.
- * @throws FrameworkAdminRuntimeException if this implementation doesn't support resolving state, FrameworkAdminRuntimeException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION} will be thrown.
- */
- public boolean isResolved(BundleInfo bInfo) throws FrameworkAdminRuntimeException;
-
- /**
- * Resolves the constraints contained in this state.
- *
- * If this implementation doesn't support resolving state,
- * FrameworkAdminRuntimeException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}
- * will be thrown.
- *
- * @param incremental a flag controlling whether resolution should be incremental
- * @throws FrameworkAdminRuntimeException
- */
- void resolve(boolean increment) throws FrameworkAdminRuntimeException;
-
- /**
- * Uninstall the specified bInfo from the current state virtually.
- *
- * @param bInfo BundleInfo to be uninstalled
- * @throws FrameworkAdminRuntimeException - If the {@link FrameworkAdmin} service created the parent {@link Manipulator} is unregistered.
- */
- void uninstallBundle(BundleInfo bInfo) throws FrameworkAdminRuntimeException;
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java
deleted file mode 100644
index 33a80f472..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.frameworkadmin;
-
-import java.util.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-
-/**
- * This object is instantiated by {@link Manipulator#getConfigData()};
- * The class that keeps some parameters of the {@link Manipulator}
- * created this object. The manipulating of the parameters will affect
- * the {@link Manipulator}.
- *
- * @see Manipulator
- */
-public class ConfigData {
- final private String fwName;
- final private String fwVersion;
- final private String launcherName;
- final private String launcherVersion;
- private int beginningFwStartLevel = BundleInfo.NO_LEVEL;
- private int initialBundleStartLevel = BundleInfo.NO_LEVEL;
- // List of BundleInfo
- private LinkedHashSet bundlesList = new LinkedHashSet();
-
- private Properties properties = new Properties();
-
- public ConfigData(String fwName, String fwVersion, String launcherName, String launcherVersion) {
- this.fwName = fwName;
- this.fwVersion = fwVersion;
- this.launcherName = launcherName;
- this.launcherVersion = launcherVersion;
- this.initialize();
- }
-
- public void addBundle(BundleInfo bundleInfo) {
- bundlesList.add(bundleInfo);
- }
-
- public int getBeginingFwStartLevel() {
- return beginningFwStartLevel;
- }
-
- public BundleInfo[] getBundles() {
- if (bundlesList.size() == 0)
- return new BundleInfo[0];
- BundleInfo[] ret = new BundleInfo[bundlesList.size()];
- bundlesList.toArray(ret);
- return ret;
- }
-
- public String getProperty(String key) {
- return properties.getProperty(key);
- }
-
- public Properties getProperties() {
- Properties ret = new Properties();
- ret.putAll(properties);
- return ret;
- }
-
- public String getFwName() {
- return fwName;
- }
-
- public String getFwVersion() {
- return fwVersion;
- }
-
- public int getInitialBundleStartLevel() {
- return initialBundleStartLevel;
- }
-
- public String getLauncherName() {
- return launcherName;
- }
-
- public String getLauncherVersion() {
- return launcherVersion;
- }
-
- public void initialize() {
- beginningFwStartLevel = BundleInfo.NO_LEVEL;
- initialBundleStartLevel = BundleInfo.NO_LEVEL;
- bundlesList.clear();
- properties.clear();
- properties.clear();
- }
-
- public boolean removeBundle(BundleInfo bundleInfo) {
- if (bundleInfo == null)
- throw new IllegalArgumentException("Bundle info can't be null:" + bundleInfo); //$NON-NLS-1$
- return bundlesList.remove(bundleInfo);
- }
-
- public void setBeginningFwStartLevel(int startLevel) {
- beginningFwStartLevel = startLevel;
- }
-
- public void setBundles(BundleInfo[] bundleInfos) {
- bundlesList.clear();
- if (bundleInfos != null)
- for (int i = 0; i < bundleInfos.length; i++)
- bundlesList.add(bundleInfos[i]);
- }
-
- public void setProperty(String key, String value) {
- if (value == null)
- properties.remove(key);
- else
- properties.setProperty(key, value);
- }
-
- public void appendProperties(Properties props) {
- properties.putAll(props);
- }
-
- public void setProperties(Properties props) {
- properties.clear();
- properties.putAll(props);
- }
-
- public void setInitialBundleStartLevel(int startLevel) {
- initialBundleStartLevel = startLevel;
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append("Class:" + getClass().getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("============Independent===============\n"); //$NON-NLS-1$
- sb.append("fwName=" + fwName + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("fwVersion=" + fwVersion + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("launcherName=" + launcherName + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("launcherVersion=" + launcherVersion + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("beginningFwStartLevel=" + beginningFwStartLevel + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("initialBundleStartLevel=" + initialBundleStartLevel + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- if (this.bundlesList.size() == 0)
- sb.append("bundlesList=null\n"); //$NON-NLS-1$
- else {
- sb.append("bundlesList=\n"); //$NON-NLS-1$
- int i = 0;
- for (Iterator iter = bundlesList.iterator(); iter.hasNext();) {
- sb.append("\tbundlesList[" + i + "]=" + iter.next().toString() + "\n"); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
- i++;
- }
- }
-
- sb.append("============ Properties ===============\n"); //$NON-NLS-1$
- sb.append("fwIndependentProps="); //$NON-NLS-1$
- setPropsStrings(sb, properties);
- return sb.toString();
- }
-
- private static void setPropsStrings(StringBuffer sb, Properties props) {
- if (props.size() > 0) {
- sb.append("\n"); //$NON-NLS-1$
- for (Enumeration enumeration = props.keys(); enumeration.hasMoreElements();) {
- String key = (String) enumeration.nextElement();
- String value = props.getProperty(key);
- if (value == null || value.equals("")) //$NON-NLS-1$
- continue;
- sb.append("\t{" + key + " ,\t" + value + "}\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- } else
- sb.append("empty\n"); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdmin.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdmin.java
deleted file mode 100644
index fdadaf308..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdmin.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.frameworkadmin;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * The implementation of this API will be registered to the service
- * registry as an OSGi service.
- *
- * *****************************************************************
- * 1. For developers who implement bundles that register this service.
- *
- * Upon registration, the following service properties must be set to allow clients to
- * search the FrameworkAdmin object, which will create BundlesState / ConfigData / LauncherData objects.
- *
- * {@link FrameworkAdmin#SERVICE_PROP_KEY_FW_NAME}: String; name of the framework
- * {@link FrameworkAdmin#SERVICE_PROP_KEY_FW_VERSION}: String; version of the framework
- * {@link FrameworkAdmin#SERVICE_PROP_KEY_LAUNCHER_NAME}: String; name of the launcher
- * {@link FrameworkAdmin#SERVICE_PROP_KEY_LAUNCHER_VERSION}: String; version of the launcher
- *
- * Bundles that register this service will check if the currently running system can be manipulated by
- * this FrameworkAdmin. If yes and this implementation can create an initialized Manipulator object
- * according to the running framework and launcher, add the service property keyed by
- *
- * {@link FrameworkAdmin#SERVICE_PROP_KEY_RUNNING_SYSTEM_FLAG}: String; if "true",
- * the service that will be returned by getRunningManipulator() is fully initialized to
- * represent the state of the running system.
- *
- * It is recommended to implement Manipulator objects created by calling methods of this interface
- * so that they cannot be used after this service is unregistered.
- *
- * *****************************************************************
- * 2. For developers who implement client bundles that use this service.
- *
- * A client of this service can obtain a Manipulator object by calling the {@link #getManipulator()} method.
- *
- * A client can search among services registered in a service registry to find the
- * desired FrameworkAdmin implementation that matches the desired framework
- * type, framework version, launcher type, and launcher version.
- *
- * In order for a client bundle to manipulate the {@link Manipulator} object
- * of the running framework and launcher, the service filter (FrameworkAdmin#SERVICE_PROP_KEY_RUNNING_FW_FLAG=true)
- * should be used.
- *
- * As with all OSGi services, the client bundle should track this service state.
- * If the service is unregistered, it should stop using any of the objects obtained from this service and
- * release them. If it continues to use them, {@link FrameworkAdminRuntimeException} might
- * be thrown.
- *
- * *****************************************************************
- * In addition, FrameworkAdminFactory will create this object. This is used by Java programs.
- *
- * @see FrameworkAdminFactory
- *
- */
-public interface FrameworkAdmin {
-
- String SERVICE_PROP_KEY_FW_NAME = "org.eclipse.equinox.frameworkhandler.framework.name"; //$NON-NLS-1$
- String SERVICE_PROP_KEY_FW_VERSION = "org.eclipse.equinox.frameworkhandler.framework.version"; //$NON-NLS-1$
-
- String SERVICE_PROP_KEY_LAUNCHER_NAME = "org.eclipse.equinox.frameworkhandler.launcher.name"; //$NON-NLS-1$
- String SERVICE_PROP_KEY_LAUNCHER_VERSION = "org.eclipse.equinox.frameworkhandler.launcher.version"; //$NON-NLS-1$
- String SERVICE_PROP_KEY_RUNNING_SYSTEM_FLAG = "org.eclipse.equinox.frameworkhandler.runningfwflag"; //$NON-NLS-1$
-
- /**
- * Create new instance of {@link Manipulator} and return it.
- *
- * @return new instance of Manipulator.
- */
- public Manipulator getManipulator();
-
- /**
- * Create new instance of {@link Manipulator} for running system
- * and return it. The instance must be initialized fully according to the
- * running environment. If this implementation cannot provide it, return null.
- *
- * @return new instance of Manipulator.
- */
- public Manipulator getRunningManipulator();
-
- /**
- * Launch a framework instance under the specified current working directory.
- *
- * @param manipulator {@link Manipulator} object to be launched.
- * @param cwd current working directory to be used for launching.
- * @return process
- * @throws IllegalArgumentException if specified arguments are null.
- * @throws IOException if any error relate with IO occurs
- * @throws FrameworkAdminRuntimeException if the FrameworkAdmin service object
- * that created the specified Manipulator object is unregistered.
- */
- public Process launch(Manipulator manipulator, File cwd) throws IllegalArgumentException, IOException, FrameworkAdminRuntimeException;
-
- /**
- *
- * @return true if this object is active. false otherwise.
- */
- public boolean isActive();
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminFactory.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminFactory.java
deleted file mode 100644
index 07fcec83c..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminFactory.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.frameworkadmin;
-
-/**
- * Factory class for creating FrameworkAdmin object from Java programs.
- *
- * @see FrameworkAdmin
- */
-public abstract class FrameworkAdminFactory {
- abstract protected FrameworkAdmin createFrameworkAdmin() throws InstantiationException, IllegalAccessException, ClassNotFoundException;
-
- // proposed method: only for ConfiguratorManipulatorFactory, magic system property is used.
- public static FrameworkAdmin getInstance(String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
- FrameworkAdminFactory factory = (FrameworkAdminFactory) Class.forName(className).newInstance();
- return factory.createFrameworkAdmin();
- }
-
- // // method 3: two magic system properties are used.
- // public static FrameworkAdmin getInstance() throws InstantiationException, IllegalAccessException, ClassNotFoundException {
- // String className = System.getProperty("org.eclipse.equinox.internal.provisional.frameworkadmin.frameworkAdminFactory");
- // if (className == null)
- // throw new ClassNotFoundException("System property keyed by \"org.eclipse.equinox.internal.provisional.frameworkadmin.frameworkAdminFactory\" is not set.");
- // FrameworkAdminFactory factory = (FrameworkAdminFactory) Class.forName(className).newInstance();
- // return (FrameworkAdmin) factory.createFrameworkAdmin();
- // }
-
- // // method 1: no magic system properties are used.
- //
- // public static FrameworkAdmin getInstance(String className, String configuratorManipulatorFactoryName) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
- // ExtendedFrameworkAdminFactory factory = (ExtendedFrameworkAdminFactory) Class.forName(className).newInstance();
- // return (FrameworkAdmin) factory.createFrameworkAdmin(configuratorManipulatorFactoryName);
- // }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminRuntimeException.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminRuntimeException.java
deleted file mode 100644
index 0e9960529..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminRuntimeException.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.frameworkadmin;
-
-public class FrameworkAdminRuntimeException extends RuntimeException {
-
- private static final long serialVersionUID = -2292498677000772317L;
- public static final String FRAMEWORKADMIN_UNAVAILABLE = "FrameworkAdmin service created this object is not available any more";
- public static final String UNSUPPORTED_OPERATION = "This implementation doesn't support this method.";
-
- private final String reason;
- private Throwable cause;
-
- /**
- * @param message
- */
- public FrameworkAdminRuntimeException(String message, String reason) {
- super(message);
- this.reason = reason;
- this.cause = null;
- }
-
- /**
- * @param message
- * @param cause
- */
- public FrameworkAdminRuntimeException(String message, Throwable cause, String reason) {
- super(message);
- this.reason = reason;
- this.cause = cause;
- }
-
- /**
- * @param cause
- */
- public FrameworkAdminRuntimeException(Throwable cause, String reason) {
- super(cause.getLocalizedMessage());
- this.reason = reason;
- this.cause = cause;
- }
-
- public String getReason() {
- return reason;
- }
-
- public Throwable getCause() {
- return cause;
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java
deleted file mode 100644
index 09d03cb87..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.frameworkadmin;
-
-import java.io.File;
-import java.util.*;
-
-/**
- * This object is instantiated by {@link Manipulator#getLauncherData()};
- * The class that keeps some parameters of the {@link Manipulator}
- * created this object. The manipulating of the parameters will affect
- * the {@link Manipulator}.
- *
- *
- * @see Manipulator
- */
-public class LauncherData {
- private File fwPersistentDataLocation = null;
- private File jvm = null;
- private List jvmArgs = new LinkedList();
- private List programArgs = new LinkedList();
-
- private boolean clean;
- private File fwConfigLocation;
- private File home = null;
- private File fwJar = null;
-
- private File launcher = null;
- private File launcherConfigLocation = null;
-
- private String fwName;
- private String fwVersion;
- private String launcherName;
- private String launcherVersion;
- private String os;
-
- public LauncherData(String fwName, String fwVersion, String launcherName, String launcherVersion) {
- this.fwName = fwName;
- this.fwVersion = fwVersion;
- this.launcherName = launcherName;
- this.launcherVersion = launcherVersion;
- this.initialize();
- }
-
- public void addJvmArg(String arg) {
- if (arg == null)
- return;
- jvmArgs.add(arg);
- }
-
- public void addProgramArg(String arg) {
- if (arg == null)
- return;
- programArgs.add(arg);
- }
-
- public File getFwConfigLocation() {
- return fwConfigLocation;
- }
-
- public File getFwJar() {
- return fwJar;
- }
-
- public String getFwName() {
- return fwName;
- }
-
- public File getFwPersistentDataLocation() {
- return fwPersistentDataLocation;
- }
-
- public String getFwVersion() {
- return fwVersion;
- }
-
- public File getHome() {
- return home;
- }
-
- public File getJvm() {
- return jvm;
- }
-
- public String[] getJvmArgs() {
- String[] args = new String[jvmArgs.size()];
- jvmArgs.toArray(args);
- return args;
- }
-
- public File getLauncher() {
- return launcher;
- }
-
- public File getLauncherConfigLocation() {
- return launcherConfigLocation;
- }
-
- public String getLauncherName() {
- return launcherName;
- }
-
- public String getLauncherVersion() {
- return launcherVersion;
- }
-
- public String[] getProgramArgs() {
- String[] args = new String[programArgs.size()];
- programArgs.toArray(args);
- return args;
- }
-
- public void initialize() {
- fwPersistentDataLocation = null;
- jvm = null;
- jvmArgs.clear();
- programArgs.clear();
- clean = false;
- fwConfigLocation = null;
- fwJar = null;
- launcher = null;
- }
-
- public boolean isClean() {
- return clean;
- }
-
- public void removeJvmArg(String arg) {
- jvmArgs.remove(arg);
- }
-
- public void removeProgramArg(String arg) {
- // We want to handle program args as key/value pairs subsequently
- // a key MUST start with a "-", all other args are ignored. For
- // backwards compatibility we remove all program args until the
- // next program arg key
- // (see bug 253862)
- if (!arg.startsWith("-")) //$NON-NLS-1$
- return;
-
- int index = programArgs.indexOf(arg);
- if (index == -1)
- return;
-
- programArgs.remove(index);
- while (index < programArgs.size()) {
- String next = (String) programArgs.get(index);
- if (next.charAt(0) == '-')
- return;
- programArgs.remove(index);
- }
- }
-
- public void setFwConfigLocation(File fwConfigLocation) {
- this.fwConfigLocation = fwConfigLocation;
- }
-
- public void setFwJar(File fwJar) {
- this.fwJar = fwJar;
- }
-
- public void setFwPersistentDataLocation(File fwPersistentDataLocation, boolean clean) {
- this.fwPersistentDataLocation = fwPersistentDataLocation;
- this.clean = clean;
- }
-
- public void setHome(File home) {
- this.home = home;
- }
-
- public void setJvm(File file) {
- this.jvm = file;
- if (file == null)
- removeProgramArg("-vm"); //$NON-NLS-1$
- }
-
- public void setJvmArgs(String[] args) {
- if (args == null || args.length == 0) {
- jvmArgs.clear();
- return;
- }
- for (int i = 0; i < args.length; i++)
- this.addJvmArg(args[i]);
- }
-
- public void setLauncher(File launcherFile) {
- launcher = launcherFile;
- }
-
- public void setLauncherConfigLocation(File launcherConfigLocation) {
- this.launcherConfigLocation = launcherConfigLocation;
- }
-
- public void setOS(String os) {
- this.os = os;
- }
-
- public String getOS() {
- return os;
- }
-
- public void setProgramArgs(String[] args) {
- if (args == null || args.length == 0) {
- programArgs.clear();
- return;
- }
- for (int i = 0; i < args.length; i++)
- this.addProgramArg(args[i]);
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append("Class:" + this.getClass().getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("fwName=" + this.fwName + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("fwVersion=" + this.fwVersion + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("launcherName=" + this.launcherName + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("launcherVersion=" + this.launcherVersion + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
-
- sb.append("jvm=" + this.jvm + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- if (this.jvmArgs.size() == 0)
- sb.append("jvmArgs = null\n"); //$NON-NLS-1$
- else {
- sb.append("jvmArgs=\n"); //$NON-NLS-1$
- int i = 0;
- for (Iterator iterator = jvmArgs.iterator(); iterator.hasNext(); iterator.next())
- sb.append("\tjvmArgs[" + i++ + "]=" + iterator + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- }
- if (this.programArgs.size() == 0)
- sb.append("programArgs = null\n"); //$NON-NLS-1$
- else {
- sb.append("programArgs=\n"); //$NON-NLS-1$
- int i = 0;
- for (Iterator iterator = programArgs.iterator(); iterator.hasNext(); iterator.next())
- sb.append("\tprogramArgs[" + i++ + "]=" + iterator + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- sb.append("fwConfigLocation=" + this.fwConfigLocation + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("fwJar=" + this.fwJar + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("fwPersistentDataLocation=" + this.fwPersistentDataLocation + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("home=" + this.home + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("launcher=" + this.launcher + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("launcherConfigLocation=" + this.launcherConfigLocation + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("clean=" + this.isClean() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
-
- return sb.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/Manipulator.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/Manipulator.java
deleted file mode 100644
index 463b35296..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/Manipulator.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.frameworkadmin;
-
-import java.io.File;
-import java.io.IOException;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
-
-/**
- * A manipulator is used to query and modify the state of a framework instance.
- * A manipulator instance is obtained by calling {@link FrameworkAdmin#getManipulator()}.
- *
- * The typical use-cases of this interface:
- *
- * Usecase 1: set parameters, check the expected state, save them into configuration files, and launch.
- * A. create a {@link Manipulator} object from a {@link FrameworkAdmin}.
- * B. set parameters to the {@link Manipulator} object.
- * C. getExpectedState() and check what bundle state will be realized.
- * If it is not same as you desire, repeat B and C until it becomes as you desire.
- * D. save parameters into configuration files by {@link Manipulator#save(boolean)}.
- * E. launch the framework by {@link FrameworkAdmin#launch(Manipulator, File)}.
- *
- * Usecase 2: set parameters required for loading, load parameters from configuration files,
- * check the expected state, and launch.
- * A. create a {@link Manipulator} object from a {@link FrameworkAdmin}.
- * B. set parameters about launcher or framework configuration file to the {@link Manipulator} object.
- * C. load parameters from configuration files by {@link Manipulator#load()};
- * D. getExpectedState() and check what bundle state will be realized.
- * E. launch the framework by {@link FrameworkAdmin#launch(Manipulator, File)}.
- * @see FrameworkAdmin
- * @see ConfigData
- * @see LauncherData
- */
-public interface Manipulator {
-
- /**
- * Return the newly created BundldsState object,
- * according to the parameters set to this object "in memory".
- *
- * None of launcher config file, framework config file and configurator config file
- * will be read by this method. However, the framework persistent data location should be
- * taken into consideration. In other words, this method will return
- * the expected {@link BundlesState} object assuming that the current parameters were saved and
- * {@link FrameworkAdmin#launch(Manipulator, File)} with an argument of this object
- * were called. (It would read the framework persistent data location if required).
- *
- * This method should not modify the parameters in this {@link Manipulator} object.
- *
- * @return framework bundle state object created according to he current parameters set.
- * @throws FrameworkAdminRuntimeException - If the {@link FrameworkAdmin} service created this object is unregistered or this implementation doesn't support this method.
- */
- BundlesState getBundlesState() throws FrameworkAdminRuntimeException;
-
- /**
- * The reference of {@link ConfigData} object representing configuration information related with framework settings will be returned.
- * Remind that manipulating returned object will affect this Manipulator behavior.
- *
- * @return ConfigData object representing configuration information related with framework setting
- * @throws FrameworkAdminRuntimeException - If the {@link FrameworkAdmin} service created this object is unregistered or this implementation doesn't support this method.
- * @see ConfigData
- */
- ConfigData getConfigData() throws FrameworkAdminRuntimeException;
-
- /**
- * Return the expected BundleInfo array representing state of bundles,
- * according to the parameters set to this object "in memory".
- *
- * None of launcher config file, framework config file and configurator config file
- * will be read by this method. However, the framework persistent data location should be
- * taken into consideration. In other words, this method will return
- * the expected bundles state assuming that the current parameters were saved and
- * {@link FrameworkAdmin#launch(Manipulator, File)} with an argument of this object
- * were called. (It would read the framework persistent data location if required).
- *
- * Returned BundleInfos must have resolved flag set.
- * This method should not modify the parameters in this {@link Manipulator} object.
- *
- * cf. getConfigData().getBundles() will return array of BundleInfo too.
- * However the resolved flag of returned BundleInfos might not be reliable.
- *
- * This method is equivalent to calling getBundlesState().getExpectedState().
- *
- * @return array of BundleInfo representing expected state of all bundles installed.
- * @throws IllegalArgumentException - If either of fwJar or cwd doesn't exist.
- * @throws IOException - If reading fw configuration file or reading persistently recorded information
- * of fw fails.
- * @throws FrameworkAdminRuntimeException - If the {@link FrameworkAdmin} service created this object is unregistered or this implementation doesn't support this method.
- */
- BundleInfo[] getExpectedState() throws IllegalStateException, IOException, FrameworkAdminRuntimeException;
-
- /**
- * The reference of {@link LauncherData} object representing configuration information
- * related with launcher settings will be returned.
- * Remember that manipulating returned object will affect this Manipulator object behavior.
- *
- * @return LauncherData object representing configuration information related with launcher setting
- * @throws FrameworkAdminRuntimeException - If the ManipulatorAdmin service created this object is unregistered or this implementation doesn't support this method.
- * @see LauncherData
- */
- LauncherData getLauncherData() throws FrameworkAdminRuntimeException;
-
- /**
- * Return timestamp of configurations which will be loaded by load() method
- * according to the parameters set to this manipulator in long value.
- *
- * This method will check last modified time of all launcher configuration file, framework configuration file,
- * and framework persistent storage according to the parameters set.
- * @return long
- */
- long getTimeStamp();
-
- /**
- * Initialize all information that this object keeps at that time.
- */
- void initialize();
-
- /**
- * load configs from appropriate config files,
- * including launcher config file, fw config file, and configurator config files,
- * whose locations are determined by the current setting. In addition,
- * the fw persistent data location should be taken into consideration.
- *
- * The following procedure contains the matters of implementation detail.
- * However, it is an example how it works.
- *
- * 1. if launcher object is set, corresponding launcher config file will be read.
- * According to the information retrieved, setting of this object will be updated.
- * including fw config file.
- *
- * 2. If fw config file is not specified, IllegalStateException will be thrown.
- * Otherwise, the information will be retrieved from the fw config file.
- *
- * 3. If any ConfiguratorBundle is included in the bundle list,
- * read appropriate configurator config file by
- * {@link ConfiguratorManipulator#updateBundles(Manipulator)},
- * which will update the parameter about installed bundles in its
- * {@link Manipulator#getConfigData()} object.
- *
- * Most old parameters will be updated by this method call.
- *
- * @throws IOException - If reading info from configuration files fails.
- * @throws IllegalStateException - If config files cannot be determined.
- * @throws FrameworkAdminRuntimeException - If the {@link FrameworkAdmin} service created this object is unregistered or this implementation doesn't support this method.
- */
- void load() throws IllegalStateException, IOException, FrameworkAdminRuntimeException;
-
- /**
- * Save parameters that this object keeps at that time into appropriate configuration files,
- * which include launcher configuration file, framework configuration file, and configurator configuration files
- * (if required and implementation of this object supports), according to the current setting and situation.
- *
- * The following procedure contains the matters of implementation detail.
- * However, it is an example how it works.
- *
- * 1. if a launcher file is set,
- * the parameters to be saved into a LauncherConfigFile will be saved into the default LauncherConfigFile
- * that is determined by the location of the launcher file.
- *
- *
- * 2. if there are any {@link ConfiguratorManipulator} objects available whose corresponding ConfiguratorBundle
- * is set to be started, choose the ConfiguratorBudnle that starts the first among them and go to next step.
- * Otherwise, save the BundleInfo[] set to this object into a FwConfigFile that is determined
- * by the parameters set.
- *
- * 3. call {@link ConfiguratorManipulator#save(Manipulator, boolean)} of
- * the ConfiguratorManipulator that can manipulate the chosen ConfiguratorBudnle.
- * This method will save configurations for ConfiguratorBundle to read appropriately
- * and return BundleInfo[] to be saved in the FwConfigFile, which is determined by the parameters set.
- *
- * 4. Save the returned BundleInfo[] in the FwConfigFile, which is determined by the parameters set.
- *
- * @param backup - if true, keep old file by renaming if exists.
- * @throws IOException - If writing info into configuration files fails.
- * @throws FrameworkAdminRuntimeException - If the {@link FrameworkAdmin} service created this object is unregistered or this implementation doesn't support this method.
- */
- void save(boolean backup) throws IOException, FrameworkAdminRuntimeException;
-
- /**
- * Copy all information the specified {@link ConfigData} contains into this object.
- * All of old settings will be initialized and replaced.
- *
- * @param configData fw config data to be set to this object.
- */
- void setConfigData(ConfigData configData);
-
- /**
- * Copy all information the specified {@link LauncherData} contains into this object.
- * All of old settings will be initialized and replaced.
- *
- * @param launcherData launcher config data to be set to this object.
- */
- void setLauncherData(LauncherData launcherData);
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.project b/bundles/org.eclipse.equinox.p2.artifact.optimizers/.project
deleted file mode 100644
index 28e367d4c..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.artifact.optimizers</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index c9dc95db0..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Nov 14 12:49:29 EST 2007
-eclipse.preferences.version=1
-encoding/<project>=ISO-8859-1
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f8cf8a7e7..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,341 +0,0 @@
-#Wed Dec 30 08:04:56 CET 2009
-eclipse.preferences.version=1
-instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 900e4e143..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,60 +0,0 @@
-#Mon Nov 05 16:53:31 EST 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.artifact.optimizers/META-INF/MANIFEST.MF
deleted file mode 100644
index e14032c74..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,33 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.artifact.optimizers;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.artifact.optimizers.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.artifact.optimizers;x-friends:="org.eclipse.equinox.p2.artifact.processors",
- org.eclipse.equinox.internal.p2.artifact.optimizers.jardelta;x-internal:=true,
- org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff;x-internal:=true,
- org.eclipse.equinox.internal.p2.artifact.optimizers.pack200;x-internal:=true
-Require-Bundle: org.eclipse.equinox.common,
- org.eclipse.equinox.p2.artifact.repository
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: ie.wombat.jbdiff,
- org.eclipse.equinox.app;version="1.0.0",
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.metadata,
- org.eclipse.equinox.internal.p2.sar,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
- org.eclipse.internal.provisional.equinox.p2.jarprocessor,
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0"
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/about.html b/bundles/org.eclipse.equinox.p2.artifact.optimizers/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/build.properties b/bundles/org.eclipse.equinox.p2.artifact.optimizers/build.properties
deleted file mode 100644
index d72e993c0..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.properties
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/optimizer.launch b/bundles/org.eclipse.equinox.p2.artifact.optimizers/optimizer.launch
deleted file mode 100644
index 65bf9330b..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/optimizer.launch
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/optimizer"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.6.0"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog -application org.eclipse.equinox.p2.artifact.optimizers.pack200optimizer&#13;&#10;-artifactRepository file:d:/prov/repo&#13;&#10;-console"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.ant.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime@default:default,org.eclipse.core.runtime.compatibility.registry@default:default,org.eclipse.core.variables@default:default,org.eclipse.equinox.app@default:true,org.eclipse.equinox.common@default:default,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.launcher.win32.win32.x86@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.osgi@:,org.eclipse.osgi.services@default:default,org.eclipse.update.configurator@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="ie.wombat.jbdiff@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.eclipse.ecf@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:true,org.eclipse.equinox.p2.artifact.optimizers@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.download@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.sar@default:default"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/plugin.properties b/bundles/org.eclipse.equinox.p2.artifact.optimizers/plugin.properties
deleted file mode 100644
index fe0fea6e8..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Equinox p2 Artifact Optimizers
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/plugin.xml b/bundles/org.eclipse.equinox.p2.artifact.optimizers/plugin.xml
deleted file mode 100644
index fb0e4f618..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/plugin.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension id="jardeltaoptimizer" point="org.eclipse.core.runtime.applications">
- <application>
- <run class="org.eclipse.equinox.internal.p2.artifact.optimizers.jardelta.Application"/>
- </application>
- </extension>
-
- <extension id="pack200optimizer" point="org.eclipse.core.runtime.applications">
- <application>
- <run class="org.eclipse.equinox.internal.p2.artifact.optimizers.pack200.Application"/>
- </application>
- </extension>
-
- <extension id="jbdiffoptimizer" point="org.eclipse.core.runtime.applications">
- <application>
- <run class="org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff.Application"/>
- </application>
- </extension>
-
- <extension id="Pack200Optimizer" point="org.eclipse.equinox.p2.artifact.repository.processingSteps">
- <step class="org.eclipse.equinox.internal.p2.artifact.optimizers.pack200.Pack200OptimizerStep"/>
- </extension>
-
- <extension id="JarDeltaOptimizer" point="org.eclipse.equinox.p2.artifact.repository.processingSteps">
- <step class="org.eclipse.equinox.internal.p2.artifact.optimizers.jardelta.JarDeltaOptimizerStep"/>
- </extension>
-
- <extension id="JBDiffStep" point="org.eclipse.equinox.p2.artifact.repository.processingSteps">
- <step class="org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff.JBDiffStep"/>
- </extension>
-
- <extension id="JBDiffZipStep" point="org.eclipse.equinox.p2.artifact.repository.processingSteps">
- <step class="org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff.JBDiffZipStep"/>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/pom.xml b/bundles/org.eclipse.equinox.p2.artifact.optimizers/pom.xml
deleted file mode 100644
index 0b2199eb5..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.artifact.optimizers</artifactId>
- <version>1.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/AbstractDeltaStep.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/AbstractDeltaStep.java
deleted file mode 100644
index 871ce263f..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/AbstractDeltaStep.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers;
-
-import java.io.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.artifact.processing.AbstractBufferingStep;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-
-/**
- * The <code>AbstractDeltaDiffStep</code> is an abstract processing step that
- * retrieves a local artifact repository containing the serialized/encoded
- * artifact key. It assumes that the artifact key is stored within the data property
- * of the processing step descriptor and that is encoded with the <code>ArtifactKeySerializer</code>.
- */
-public abstract class AbstractDeltaStep extends AbstractBufferingStep {
-
- protected IArtifactKey key;
- protected IArtifactRepository repository;
-
- public AbstractDeltaStep() {
- this(null);
- }
-
- protected AbstractDeltaStep(IArtifactRepository repository) {
- super();
- this.repository = repository;
- }
-
- public void initialize(IProvisioningAgent agent, IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
- super.initialize(agent, descriptor, context);
- readArtifactKey(descriptor);
- }
-
- protected void readArtifactKey(IProcessingStepDescriptor descriptor) {
- try {
- key = ArtifactKey.parse(descriptor.getData());
- } catch (IllegalArgumentException e) {
- setStatus(new Status(IStatus.ERROR, Activator.ID, "Predecessor artifact key for delta could not be deserialized. Serialized key is " + descriptor.getData(), e));
- }
- }
-
- protected File fetchPredecessor(ArtifactDescriptor descriptor) {
- if (repository instanceof IFileArtifactRepository)
- return ((IFileArtifactRepository) repository).getArtifactFile(descriptor);
- File result = null;
- OutputStream resultStream = null;
- try {
- try {
- result = File.createTempFile(PREDECESSOR_ROOT, JAR_SUFFIX);
- resultStream = new BufferedOutputStream(new FileOutputStream(result));
- setStatus(repository.getArtifact(descriptor, resultStream, getProgressMonitor()));
- return result;
- } finally {
- if (resultStream != null)
- resultStream.close();
- }
- } catch (IOException e) {
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/Activator.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/Activator.java
deleted file mode 100644
index 4d0ea17fd..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/Activator.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.artifact.optimizers;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
- public static final String ID = "org.eclipse.equinox.p2.artifact.optimizers"; //$NON-NLS-1$
- private static BundleContext context = null;
-
- public static BundleContext getContext() {
- return context;
- }
-
- public void start(BundleContext context) throws Exception {
- Activator.context = context;
- }
-
- public void stop(BundleContext context) throws Exception {
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/OptimizerApplication.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/OptimizerApplication.java
deleted file mode 100644
index 26f3366b8..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/OptimizerApplication.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.eclipse.equinox.internal.p2.artifact.optimizers;
-
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-
-public abstract class OptimizerApplication implements IApplication {
-
- public static IProvisioningAgent getAgent() {
- return (IProvisioningAgent) ServiceHelper.getService(Activator.getContext(), IProvisioningAgent.SERVICE_NAME);
- }
-
- public static IArtifactRepositoryManager getArtifactRepositoryManager() {
- return (IArtifactRepositoryManager) getAgent().getService(IArtifactRepositoryManager.SERVICE_NAME);
- }
-
- public void stop() {
- // Nothing to do
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/VersionlessArtifactKey.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/VersionlessArtifactKey.java
deleted file mode 100644
index d6d7d0213..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/VersionlessArtifactKey.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers;
-
-import org.eclipse.equinox.p2.metadata.Version;
-
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-
-public class VersionlessArtifactKey extends ArtifactKey {
-
- public VersionlessArtifactKey(String classifier, String id) {
- super(classifier, id, Version.emptyVersion);
- }
-
- public VersionlessArtifactKey(IArtifactKey base) {
- super(base.getClassifier(), base.getId(), Version.emptyVersion);
- }
-
- public int hashCode() {
- int hash = getId().hashCode();
- hash = 17 * hash + getClassifier().hashCode();
- return hash;
- }
-
- public boolean equals(Object obj) {
- if (!(obj instanceof IArtifactKey))
- return false;
- IArtifactKey ak = (IArtifactKey) obj;
- return ak.getId().equals(getId()) && ak.getClassifier().equals(getClassifier());
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Application.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Application.java
deleted file mode 100644
index 30d6c0b74..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Application.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.jardelta;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.OptimizerApplication;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-
-/**
- * The optimizer <code>Application</code> for JBDiff based optimizations.
- */
-public class Application extends OptimizerApplication {
-
- private URI artifactRepositoryLocation;
- private int width = 1;
- private int depth = 1;
-
- public Object start(IApplicationContext context) throws Exception {
- Map<?, ?> args = context.getArguments();
- initializeFromArguments((String[]) args.get("application.args")); //$NON-NLS-1$
- IArtifactRepository repository = setupRepository(artifactRepositoryLocation);
- new Optimizer(repository, width, depth).run();
- return null;
- }
-
- private IArtifactRepository setupRepository(URI location) throws ProvisionException {
- IArtifactRepositoryManager manager = getArtifactRepositoryManager();
- if (manager == null)
- // TODO log here
- return null;
- return manager.loadRepository(location, null);
- }
-
- public void initializeFromArguments(String[] args) throws Exception {
- if (args == null)
- return;
- for (int i = 0; i < args.length; i++) {
- // check for args without parameters (i.e., a flag arg)
- // if (args[i].equals("-pack"))
- // pack = true;
-
- // check for args with parameters. If we are at the last argument or
- // if the next one has a '-' as the first character, then we can't have
- // an arg with a param so continue.
- if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
- continue;
- String arg = args[++i];
-
- if (args[i - 1].equalsIgnoreCase("-artifactRepository") || args[i - 1].equalsIgnoreCase("-ar")) //$NON-NLS-1$ //$NON-NLS-2$
- artifactRepositoryLocation = new URI(arg);
-
- if (args[i - 1].equalsIgnoreCase("-depth")) //$NON-NLS-1$
- depth = Integer.parseInt(arg);
-
- if (args[i - 1].equalsIgnoreCase("-width")) //$NON-NLS-1$
- width = Integer.parseInt(arg);
-
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/DeltaComputer.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/DeltaComputer.java
deleted file mode 100644
index 62955636f..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/DeltaComputer.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.jardelta;
-
-import java.io.*;
-import java.util.*;
-import java.util.zip.*;
-
-public class DeltaComputer {
- private File target;
- private File base;
- private File destination;
- private ZipFile baseJar;
- private ZipFile targetJar;
- private Set<String> baseEntries;
- private ArrayList<ZipEntry> additions;
- private ArrayList<ZipEntry> changes;
- private ZipFile manifestJar = null;
-
- public DeltaComputer(File base, File target, File destination) {
- this.base = base;
- this.target = target;
- this.destination = destination;
- }
-
- public void run() throws IOException {
- try {
- if (!openJars())
- return;
- computeDelta();
- writeDelta();
- } finally {
- closeJars();
- }
- }
-
- private void writeDelta() {
- ZipOutputStream result = null;
- try {
- try {
- result = new ZipOutputStream(new FileOutputStream(destination));
- // if the delta includes the manifest, be sure to write it first
- if (manifestJar != null)
- writeEntry(result, manifestJar.getEntry("META-INF/MANIFEST.MF"), manifestJar, true);
- // write out the removals. These are all the entries left in the baseEntries
- // since they were not seen in the targetJar. Here just write out an empty
- // entry with a name that signals the delta processor to delete.
- for (String baseEntry : baseEntries)
- writeEntry(result, new ZipEntry(baseEntry + ".delete"), null, false);
- // write out the additions.
- for (ZipEntry entry : additions)
- writeEntry(result, entry, targetJar, false);
- // write out the changes.
- for (ZipEntry entry : changes)
- writeEntry(result, entry, targetJar, false);
- } finally {
- if (result != null)
- result.close();
- }
- } catch (IOException e) {
- e.printStackTrace();
- return;
- }
- }
-
- private void writeEntry(ZipOutputStream result, ZipEntry entry, ZipFile sourceJar, boolean manifest) throws IOException {
- if (!manifest && entry.getName().equalsIgnoreCase("META-INF/MANIFEST.MF"))
- return;
- // add the entry
- result.putNextEntry(entry);
- try {
- // if there is a sourceJar copy over the content for the entry into the result
- if (sourceJar != null) {
- InputStream contents = sourceJar.getInputStream(entry);
- try {
- transferStreams(contents, result);
- } finally {
- contents.close();
- }
- }
- } finally {
- result.closeEntry();
- }
- }
-
- /**
- * Transfers all available bytes from the given input stream to the given
- * output stream. Does not close either stream.
- *
- * @param source
- * @param destination
- * @throws IOException
- */
- public static void transferStreams(InputStream source, OutputStream destination) throws IOException {
- source = new BufferedInputStream(source);
- destination = new BufferedOutputStream(destination);
- try {
- byte[] buffer = new byte[8192];
- while (true) {
- int bytesRead = -1;
- if ((bytesRead = source.read(buffer)) == -1)
- break;
- destination.write(buffer, 0, bytesRead);
- }
- } finally {
- destination.flush();
- }
- }
-
- private void computeDelta() throws IOException {
- changes = new ArrayList<ZipEntry>();
- additions = new ArrayList<ZipEntry>();
- // start out assuming that all the base entries are being removed
- baseEntries = getEntries(baseJar);
- for (Enumeration<? extends ZipEntry> e = targetJar.entries(); e.hasMoreElements();)
- check(e.nextElement(), targetJar);
- }
-
- private boolean openJars() {
- try {
- baseJar = new ZipFile(base);
- targetJar = new ZipFile(target);
- } catch (IOException e) {
- return false;
- }
- return true;
- }
-
- private void closeJars() {
- if (baseJar != null)
- try {
- baseJar.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- if (targetJar != null)
- try {
- targetJar.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- /**
- * Compare the given entry against the base JAR to see if/how it differs. Update the appropriate set
- * based on the discovered difference.
- * @param entry the entry to test
- * @throws IOException
- */
- private void check(ZipEntry entry, ZipFile file) throws IOException {
- ZipEntry baseEntry = baseJar.getEntry(entry.getName());
-
- // remember the manifest if we see it
- checkForManifest(entry, file);
- // if there is no entry then this is an addition. remember the addition and return;
- if (baseEntry == null) {
- additions.add(entry);
- return;
- }
- // now we know each JAR has an entry for the name, compare and see how/if they differ
- boolean changed = !equals(entry, baseEntry);
- if (changed)
- changes.add(entry);
- baseEntries.remove(baseEntry.getName());
- }
-
- // compare the two entries. We already know that they have the same name.
- private boolean equals(ZipEntry entry, ZipEntry baseEntry) {
- if (entry.getSize() != baseEntry.getSize())
- return false;
- // make sure the entries are of the same type
- if (entry.isDirectory() != baseEntry.isDirectory())
- return false;
- // if the entries are files then compare the times.
- if (!entry.isDirectory())
- if (entry.getTime() != baseEntry.getTime())
- return false;
- return true;
- }
-
- private Set<String> getEntries(ZipFile jar) {
- HashSet<String> result = new HashSet<String>(jar.size());
- for (Enumeration<? extends ZipEntry> e = jar.entries(); e.hasMoreElements();) {
- ZipEntry entry = e.nextElement();
- checkForManifest(entry, jar);
- result.add(entry.getName());
- }
- return result;
- }
-
- /**
- * Check to see if the given entry is the manifest. If so, remember it for use when writing
- * the resultant JAR.
- * @param entry
- * @param jar
- */
- private void checkForManifest(ZipEntry entry, ZipFile jar) {
- if (entry.getName().equalsIgnoreCase("META-INF/MANIFEST.MF"))
- manifestJar = jar;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/JarDeltaOptimizerStep.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/JarDeltaOptimizerStep.java
deleted file mode 100644
index b238be76b..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/JarDeltaOptimizerStep.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
-*******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.jardelta;
-
-import java.io.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.AbstractDeltaStep;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.Activator;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-
-/**
- * The JAR delta expects an input containing normal ".jar" data.
- */
-public class JarDeltaOptimizerStep extends AbstractDeltaStep {
-
- private File incoming;
-
- protected JarDeltaOptimizerStep(IArtifactRepository repository) {
- super(repository);
- }
-
- protected OutputStream createIncomingStream() throws IOException {
- incoming = File.createTempFile(INCOMING_ROOT, JAR_SUFFIX);
- return new BufferedOutputStream(new FileOutputStream(incoming));
- }
-
- protected void cleanupTempFiles() {
- super.cleanupTempFiles();
- if (incoming != null)
- incoming.delete();
- }
-
- protected void performProcessing() throws IOException {
- File resultFile = null;
- try {
- resultFile = optimize();
- // now write the optimized content to the destination
- if (resultFile.length() > 0) {
- InputStream resultStream = new BufferedInputStream(new FileInputStream(resultFile));
- FileUtils.copyStream(resultStream, true, getDestination(), false);
- } else {
- setStatus(new Status(IStatus.ERROR, Activator.ID, "Empty optimized file: " + resultFile)); //$NON-NLS-1$
- }
- } finally {
- if (resultFile != null)
- resultFile.delete();
- }
- }
-
- protected File optimize() throws IOException {
- File predecessor = null;
- try {
- File resultFile = File.createTempFile(RESULT_ROOT, JAR_SUFFIX);
- // get the predecessor and perform the optimization into a temp file
- predecessor = fetchPredecessor(new ArtifactDescriptor(key));
- new DeltaComputer(predecessor, incoming, resultFile).run();
- return resultFile;
- } finally {
- // if we have a predecessor and it is our temp file then clean up the file
- if (predecessor != null && predecessor.getAbsolutePath().indexOf(PREDECESSOR_ROOT) > -1)
- predecessor.delete();
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Optimizer.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Optimizer.java
deleted file mode 100644
index e3b580932..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Optimizer.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - adaptation to JAR deltas and on-going development
-*******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.jardelta;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepHandler;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-
-public class Optimizer {
-
- private IArtifactRepository repository;
- private int width;
- private int depth;
-
- private static final String JAR_DELTA_FORMAT = "jarDelta"; //$NON-NLS-1$
- private static final String JAR_DELTA_PATCH_STEP = "org.eclipse.equinox.p2.processing.JarDeltaPatchStep"; //$NON-NLS-1$
-
- private static final Comparator<IArtifactDescriptor> ARTIFACT_DESCRIPTOR_VERSION_COMPARATOR = new ArtifactDescriptorVersionComparator();
- private static final Comparator<IArtifactKey> ARTIFACT_KEY_VERSION_COMPARATOR = new ArtifactKeyVersionComparator();
-
- /**
- * This optimizer performs delta generation based on (currently) jbdiff.
- * The optimization can be controlled with the ´width´ and the ´depth´ parameter.
- * ´width´ defines for how many ´related´ artifact keys a delta should be generated,
- * starting from the most up-to-date.
- * ´depth´ defines to how many predecessor a delta should be generated.
- *
- * With AK(c-v) : AK - artifact key, c - artifact id, v - artifact version
- * the ´repository content´ can be viewed a two dimensional array, where the
- * artifact keys for the same component are in order of their version:
- * <pre><code>
- * w=1 w=2
- * | |
- * | +------.------------+ d=2
- * | | +----.---+ d=1 |
- * | | | | | v
- * [ v | | v v v
- * [ AK(x,2.0) AK(x,1.5) AK(x,1.1) ]
- * [ AK(y,2.0) AK(y,1.9) ]
- * [ AK(z,2.0) AK(z,1.5) AK(z,1.3) AK(z,1.0) ]
- * ]
- * </code></pre>
- * E.g: with a ´width´ of one and a ´depth´ of two the optimizer would
- * create two deltas for component ´x´ from 1.5 to 2.0 and from 1.1 to 2.0.
- *
- * @param repository
- * @param width
- * @param depth
- */
- public Optimizer(IArtifactRepository repository, int width, int depth) {
- this.repository = repository;
- this.width = width;
- this.depth = depth;
- }
-
- public void run() {
- System.out.println("Starting delta (jardelta) optimizations (width=" + width + ", depth=" + depth + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- IQueryResult<IArtifactKey> queryResult = repository.query(ArtifactKeyQuery.ALL_KEYS, null);
- IArtifactKey[][] keys = getSortedRelatedArtifactKeys(queryResult);
- for (int i = 0; i < keys.length; i++) {
- if (keys[i].length < 2)
- // Nothing to diff here!
- continue;
- int minWidth = Math.min(width, keys[i].length);
- for (int j = 0; j < minWidth; j++) {
- IArtifactKey key = keys[i][j];
- boolean isArchive = key.getClassifier().equals("plugin"); //$NON-NLS-1$
- optimize(keys[i], key);
- }
- }
- System.out.println("Done."); //$NON-NLS-1$
-
- }
-
- private void optimize(IArtifactKey[] keys, IArtifactKey key) {
- IArtifactDescriptor[] descriptors = repository.getArtifactDescriptors(key);
- IArtifactDescriptor canonical = null;
- for (int k = 0; k < descriptors.length; k++) {
- IArtifactDescriptor descriptor = descriptors[k];
- boolean optimized = false;
- if (isCanonical(descriptor))
- canonical = descriptor;
- else
- optimized |= isOptimized(descriptor);
- if (!optimized)
- optimize(canonical, keys);
- }
- }
-
- private IArtifactKey getVersionlessKey(IArtifactKey key) {
- return new ArtifactKey(key.getClassifier(), key.getId(), Version.emptyVersion);
- }
-
- /**
- * This method retrieves a list of list of IArtifactKeys. The artifact keys in the
- * list of artifact keys are all ´strongly related´ to each other such that are
- * equal but not considering the versions. This list is sorted such that the
- * newer versions are first in the list.<p>
- * With AK(c-v) : AK - artifact key, c - artifact id, v - artifact version
- * the result is than, e.g.
- * <pre><code>
- * [
- * [ AK(x,2.0) AK(x,1.5) AK(x,1.1) ]
- * [ AK(y,2.0) AK(y,1.9) ]
- * [ AK(z,2.0) AK(z,1.5) AK(z,1.3) AK(z,1.0) ]
- * ]
- * </code></pre>
- * @param artifactKeys
- * @return the sorted artifact keys
- */
- private IArtifactKey[][] getSortedRelatedArtifactKeys(IQueryResult<IArtifactKey> artifactKeys) {
- Map<IArtifactKey, List<IArtifactKey>> map = new HashMap<IArtifactKey, List<IArtifactKey>>();
- for (Iterator<IArtifactKey> iter = artifactKeys.iterator(); iter.hasNext();) {
- IArtifactKey nxt = iter.next();
- IArtifactKey freeKey = getVersionlessKey(nxt);
- List<IArtifactKey> values = map.get(freeKey);
- if (values == null) {
- values = new ArrayList<IArtifactKey>();
- map.put(freeKey, values);
- }
- values.add(nxt);
- }
- IArtifactKey[][] lists = new IArtifactKey[map.size()][];
- int i = 0;
- for (List<IArtifactKey> artifactKeyList : map.values()) {
- IArtifactKey[] relatedArtifactKeys = artifactKeyList.toArray(new IArtifactKey[artifactKeyList.size()]);
- Arrays.sort(relatedArtifactKeys, ARTIFACT_KEY_VERSION_COMPARATOR);
- lists[i++] = relatedArtifactKeys;
- }
- int candidates = 0;
- for (int ii = 0; ii < lists.length; ii++) {
- for (int jj = 0; jj < lists[ii].length; jj++) {
- System.out.println(lists[ii][jj] + ", "); //$NON-NLS-1$
- }
- System.out.println(""); //$NON-NLS-1$
- if (lists[ii].length > 1)
- candidates++;
- }
- System.out.println("Candidates found: " + candidates); //$NON-NLS-1$
- return lists;
- }
-
- private void optimize(IArtifactDescriptor canonical, IArtifactKey[] relatedArtifactKeys) {
- System.out.println("Optimizing " + canonical); //$NON-NLS-1$
-
- IArtifactDescriptor[] descriptors = getSortedCompletePredecessors(canonical.getArtifactKey(), relatedArtifactKeys);
-
- int minDepth = Math.min(depth, descriptors.length);
- for (int i = 0; i < minDepth; i++) {
- System.out.println("\t with jar delta against " + descriptors[i].getArtifactKey()); //$NON-NLS-1$
- String predecessorData = descriptors[i].getArtifactKey().toExternalForm();
- ArtifactDescriptor newDescriptor = new ArtifactDescriptor(canonical);
- IProcessingStepDescriptor patchStep = new ProcessingStepDescriptor(JAR_DELTA_PATCH_STEP, predecessorData, true);
- IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {patchStep};
- newDescriptor.setProcessingSteps(steps);
- newDescriptor.setProperty(IArtifactDescriptor.FORMAT, JAR_DELTA_FORMAT);
- OutputStream repositoryStream = null;
- try {
- repositoryStream = repository.getOutputStream(newDescriptor);
-
- // Add in all the processing steps needed to optimize (e.g., pack200, ...)
- ProcessingStep optimizerStep = new JarDeltaOptimizerStep(repository);
- optimizerStep.initialize(repository.getProvisioningAgent(), patchStep, newDescriptor);
- ProcessingStepHandler handler = new ProcessingStepHandler();
- OutputStream destination = handler.link(new ProcessingStep[] {optimizerStep}, repositoryStream, null);
-
- // Do the actual work by asking the repo to get the artifact and put it in the destination.
- IStatus status = repository.getArtifact(canonical, destination, new NullProgressMonitor());
- if (!status.isOK()) {
- System.out.println("Getting the artifact is not ok."); //$NON-NLS-1$
- System.out.println(status);
- }
- } catch (ProvisionException e) {
- System.out.println("Skipping optimization of: " + descriptors[i].getArtifactKey()); //$NON-NLS-1$
- System.out.println(e.getMessage());
- e.printStackTrace();
- } finally {
- if (repositoryStream != null)
- try {
- repositoryStream.close();
- IStatus status = ProcessingStepHandler.checkStatus(repositoryStream);
- if (!status.isOK()) {
- System.out.println("Skipping optimization of: " + descriptors[i].getArtifactKey()); //$NON-NLS-1$
- System.out.println(status.toString());
- }
- } catch (IOException e) {
- System.out.println("Skipping optimization of: " + descriptors[i].getArtifactKey()); //$NON-NLS-1$
- System.out.println(e.getMessage());
- e.printStackTrace();
- }
- }
- }
- }
-
- private IArtifactDescriptor[] getSortedCompletePredecessors(IArtifactKey artifactKey, IArtifactKey[] relatedArtifactKeys) {
- // get all artifact keys
- List<IArtifactDescriptor> completeDescriptors = new ArrayList<IArtifactDescriptor>(relatedArtifactKeys.length);
- for (int i = 0; i < relatedArtifactKeys.length; i++) {
- // if we find ´our self´ skip
- if (relatedArtifactKeys[i].equals(artifactKey))
- continue;
- // look for a complete artifact descriptor of the current key
- IArtifactDescriptor[] descriptors = repository.getArtifactDescriptors(relatedArtifactKeys[i]);
- for (int j = 0; j < descriptors.length; j++) {
- if (isCanonical(descriptors[j])) {
- completeDescriptors.add(descriptors[j]);
- break;
- }
- }
- }
-
- IArtifactDescriptor[] completeSortedDescriptors = completeDescriptors.toArray(new IArtifactDescriptor[completeDescriptors.size()]);
- // Sort, so to allow a depth lookup!
- Arrays.sort(completeSortedDescriptors, ARTIFACT_DESCRIPTOR_VERSION_COMPARATOR);
- return completeSortedDescriptors;
- }
-
- private boolean isOptimized(IArtifactDescriptor descriptor) {
- if (descriptor.getProcessingSteps().length != 1)
- return false;
- return JAR_DELTA_FORMAT.equals(descriptor.getProperty(IArtifactDescriptor.FORMAT));
- }
-
- private boolean isCanonical(IArtifactDescriptor descriptor) {
- // TODO length != 0 is not necessarily an indicator for not being canonical!
- return descriptor.getProcessingSteps().length == 0;
- }
-
- static final class ArtifactDescriptorVersionComparator implements Comparator<IArtifactDescriptor> {
- public int compare(IArtifactDescriptor artifactDescriptor0, IArtifactDescriptor artifactDescriptor1) {
- return -1 * artifactDescriptor0.getArtifactKey().getVersion().compareTo(artifactDescriptor1.getArtifactKey().getVersion());
- }
- }
-
- static final class ArtifactKeyVersionComparator implements Comparator<IArtifactKey> {
- public int compare(IArtifactKey artifactKey0, IArtifactKey artifactKey1) {
- return -1 * artifactKey0.getVersion().compareTo(artifactKey1.getVersion());
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Application.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Application.java
deleted file mode 100644
index 67eafc721..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Application.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.OptimizerApplication;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-
-/**
- * The optimizer <code>Application</code> for JBDiff based optimizations.
- */
-public class Application extends OptimizerApplication {
-
- private URI artifactRepositoryLocation;
- private int width = 1;
- private int depth = 1;
- private boolean nosar;
-
- public Object start(IApplicationContext context) throws Exception {
- Map<?, ?> args = context.getArguments();
- initializeFromArguments((String[]) args.get("application.args")); //$NON-NLS-1$
- IArtifactRepository repository = setupRepository(artifactRepositoryLocation);
- new Optimizer(repository, width, depth, nosar).run();
- return null;
- }
-
- private IArtifactRepository setupRepository(URI location) throws ProvisionException {
- IArtifactRepositoryManager manager = getArtifactRepositoryManager();
- if (manager == null)
- // TODO log here
- return null;
- return manager.loadRepository(location, null);
- }
-
- public void initializeFromArguments(String[] args) throws Exception {
- if (args == null)
- return;
- for (int i = 0; i < args.length; i++) {
- // check for args without parameters (i.e., a flag arg)
- // if (args[i].equals("-pack"))
- // pack = true;
-
- if (args[i].equals("-nosar")) //$NON-NLS-1$
- nosar = true;
-
- // check for args with parameters. If we are at the last argument or
- // if the next one has a '-' as the first character, then we can't have
- // an arg with a param so continue.
- if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
- continue;
- String arg = args[++i];
-
- if (args[i - 1].equalsIgnoreCase("-artifactRepository") || args[i - 1].equalsIgnoreCase("-ar")) //$NON-NLS-1$ //$NON-NLS-2$
- artifactRepositoryLocation = new URI(arg);
-
- if (args[i - 1].equalsIgnoreCase("-depth")) //$NON-NLS-1$
- depth = Integer.parseInt(arg);
-
- if (args[i - 1].equalsIgnoreCase("-width")) //$NON-NLS-1$
- width = Integer.parseInt(arg);
-
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/JBDiffStep.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/JBDiffStep.java
deleted file mode 100644
index d8c726cf0..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/JBDiffStep.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff;
-
-import ie.wombat.jbdiff.JBDiff;
-import java.io.*;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.AbstractDeltaStep;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.sar.DirectByteArrayOutputStream;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-
-/**
- *
- */
-public class JBDiffStep extends AbstractDeltaStep {
-
- public JBDiffStep() {
- super();
- }
-
- // TODO We need a different way of injecting the base artifacts. This approach forces
- // the target and base to live in the same repo. Typical but not really required.
- protected JBDiffStep(IArtifactRepository repository) {
- super(repository);
- }
-
- protected OutputStream createIncomingStream() throws IOException {
- return new DirectByteArrayOutputStream();
- }
-
- protected void performProcessing() throws IOException {
- DirectByteArrayOutputStream predecessor = fetchPredecessorBytes(new ArtifactDescriptor(key));
- DirectByteArrayOutputStream current = (DirectByteArrayOutputStream) incomingStream;
- byte[] diff = JBDiff.bsdiff(predecessor.getBuffer(), predecessor.getBufferLength(), current.getBuffer(), current.getBufferLength());
- // free up the memory as soon as possible.
- predecessor = null;
- current = null;
- incomingStream = null;
-
- // copy the result of the optimization to the destination.
- FileUtils.copyStream(new ByteArrayInputStream(diff), true, getDestination(), false);
- }
-
- private DirectByteArrayOutputStream fetchPredecessorBytes(ArtifactDescriptor artifactDescriptor) throws IOException {
- DirectByteArrayOutputStream result = new DirectByteArrayOutputStream();
- setStatus(repository.getArtifact(artifactDescriptor, result, getProgressMonitor()));
- if (!getStatus().isOK())
- throw (IOException) new IOException(getStatus().getMessage()).initCause(getStatus().getException());
- return result;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/JBDiffZipStep.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/JBDiffZipStep.java
deleted file mode 100644
index 2b926fdc5..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/JBDiffZipStep.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff;
-
-import ie.wombat.jbdiff.JBDiff;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.sar.DirectByteArrayOutputStream;
-import org.eclipse.equinox.internal.p2.sar.SarUtil;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-
-public class JBDiffZipStep extends JBDiffStep {
-
- public JBDiffZipStep() {
- super();
- }
-
- // TODO We need a different way of injecting the base artifacts. This approach forces
- // the target and base to live in the same repo. Typical but not really required.
- protected JBDiffZipStep(IArtifactRepository repository) {
- super(repository);
- }
-
- protected void performProcessing() throws IOException {
- DirectByteArrayOutputStream sarredCurrent = new DirectByteArrayOutputStream();
- SarUtil.zipToSar(((DirectByteArrayOutputStream) incomingStream).getInputStream(), sarredCurrent);
- incomingStream = null;
- DirectByteArrayOutputStream predecessor = fetchPredecessorBytes(new ArtifactDescriptor(key));
- byte[] diff = JBDiff.bsdiff(predecessor.getBuffer(), predecessor.getBufferLength(), sarredCurrent.getBuffer(), sarredCurrent.getBufferLength());
- // free up the memory as soon as possible.
- predecessor = null;
- incomingStream = null;
- sarredCurrent = null;
-
- // copy the result of the optimization to the destination.
- FileUtils.copyStream(new ByteArrayInputStream(diff), true, getDestination(), false);
- }
-
- private DirectByteArrayOutputStream fetchPredecessorBytes(ArtifactDescriptor artifactDescriptor) throws IOException {
- DirectByteArrayOutputStream zippedPredecessor = new DirectByteArrayOutputStream();
-
- setStatus(repository.getArtifact(artifactDescriptor, zippedPredecessor, getProgressMonitor()));
- if (!getStatus().isOK())
- throw (IOException) new IOException(getStatus().getMessage()).initCause(getStatus().getException());
-
- DirectByteArrayOutputStream result = new DirectByteArrayOutputStream();
- SarUtil.zipToSar(zippedPredecessor.getInputStream(), result);
- return result;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Optimizer.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Optimizer.java
deleted file mode 100644
index e54f41f27..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Optimizer.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.VersionlessArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepHandler;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-
-public class Optimizer {
-
- private IArtifactRepository repository;
- private int width;
- private int depth;
- private boolean nosar;
-
- private static final String JBPATCH_STEP_ID = "org.eclipse.equinox.p2.repository.JBPatchStep"; //$NON-NLS-1$
- private static final String JBPATCH_STEP_ZIP_ID = "org.eclipse.equinox.p2.repository.JBPatchZipStep"; //$NON-NLS-1$
-
- private static final Comparator<IArtifactDescriptor> ARTIFACT_DESCRIPTOR_VERSION_COMPARATOR = new ArtifactDescriptorVersionComparator();
- private static final Comparator<IArtifactKey> ARTIFACT_KEY_VERSION_COMPARATOR = new ArtifactKeyVersionComparator();
-
- /**
- * This optimizer performs delta generation based on (currently) jbdiff.
- * The optimization can be controlled with the ´width´ and the ´depth´ parameter.
- * ´width´ defines for how many ´related´ artifact keys a delta should be generated,
- * starting from the most up-to-date.
- * ´depth´ defines to how many predecessor a delta should be generated.
- *
- * With AK(c-v) : AK - artifact key, c - artifact id, v - artifact version
- * the ´repository content´ can be viewed a two dimensional array, where the
- * artifact keys for the same component are in order of their version:
- * <pre><code>
- * w=1 w=2
- * | |
- * | +------.------------+ d=2
- * | | +----.---+ d=1 |
- * | | | | | v
- * [ v | | v v v
- * [ AK(x,2.0) AK(x,1.5) AK(x,1.1) ]
- * [ AK(y,2.0) AK(y,1.9) ]
- * [ AK(z,2.0) AK(z,1.5) AK(z,1.3) AK(z,1.0) ]
- * ]
- * </code></pre>
- * E.g: with a ´width´ of one and a ´depth´ of two the optimizer would
- * create two deltas for component ´x´ from 1.5 to 2.0 and from 1.1 to 2.0.
- *
- * @param repository
- * @param width
- * @param depth
- * @param nosar
- */
- public Optimizer(IArtifactRepository repository, int width, int depth, boolean nosar) {
- this.repository = repository;
- this.width = width;
- this.depth = depth;
- this.nosar = nosar;
- }
-
- public void run() {
- System.out.println("Starting delta (jbdiff) optimizations (width=" + width + ", depth=" + depth + ", nosar=" + nosar + ")");
- IQueryResult<IArtifactKey> queryResult = repository.query(ArtifactKeyQuery.ALL_KEYS, null);
- IArtifactKey[][] keys = getSortedRelatedArtifactKeys(queryResult);
- for (int i = 0; i < keys.length; i++) {
- if (keys[i].length < 2)
- // Nothing to diff here!
- continue;
- int minWidth = Math.min(width, keys[i].length);
- for (int j = 0; j < minWidth; j++) {
- IArtifactKey key = keys[i][j];
- boolean isArchive = key.getClassifier().equals("plugin"); //$NON-NLS-1$
- String proposedStrategy = isArchive && !nosar ? JBPATCH_STEP_ZIP_ID : JBPATCH_STEP_ID;
- optimize(keys[i], key, proposedStrategy);
- }
- }
- System.out.println("Done.");
-
- }
-
- private void optimize(IArtifactKey[] keys, IArtifactKey key, String proposedStrategy) throws OutOfMemoryError {
- boolean retry;
- do {
- retry = false;
- try {
- IArtifactDescriptor[] descriptors = repository.getArtifactDescriptors(key);
- IArtifactDescriptor complete = null;
- for (int k = 0; k < descriptors.length; k++) {
- IArtifactDescriptor descriptor = descriptors[k];
- if (isCanonical(descriptor))
- complete = descriptor;
- else if (isOptimized(descriptor, proposedStrategy)) {
- proposedStrategy = null;
- break;
- }
- }
- if (proposedStrategy != null && complete != null)
- optimize(complete, proposedStrategy, keys);
- } catch (OutOfMemoryError e) {
- if (JBPATCH_STEP_ID.equals(proposedStrategy))
- throw e;
- proposedStrategy = JBPATCH_STEP_ID;
- System.out.println("Retry with " + proposedStrategy);
- retry = true;
- }
- } while (retry);
- }
-
- /**
- * This method retrieves a list of list of IArtifactKeys. The artifact keys in the
- * list of artifact keys are all ´strongly related´ to each other such that are
- * equal but not considering the versions. This list is sorted such that the
- * newer versions are first in the list.<p>
- * With AK(c-v) : AK - artifact key, c - artifact id, v - artifact version
- * the result is than, e.g.
- * <pre><code>
- * [
- * [ AK(x,2.0) AK(x,1.5) AK(x,1.1) ]
- * [ AK(y,2.0) AK(y,1.9) ]
- * [ AK(z,2.0) AK(z,1.5) AK(z,1.3) AK(z,1.0) ]
- * ]
- * </code></pre>
- * @param artifactKeys
- * @return the sorted artifact keys
- */
- private IArtifactKey[][] getSortedRelatedArtifactKeys(IQueryResult<IArtifactKey> artifactKeys) {
- Map<IArtifactKey, List<IArtifactKey>> map = new HashMap<IArtifactKey, List<IArtifactKey>>();
- for (Iterator<IArtifactKey> iter = artifactKeys.iterator(); iter.hasNext();) {
- IArtifactKey nxt = iter.next();
- IArtifactKey freeKey = new VersionlessArtifactKey(nxt);
- List<IArtifactKey> values = map.get(freeKey);
- if (values == null) {
- values = new ArrayList<IArtifactKey>();
- map.put(freeKey, values);
- }
- values.add(nxt);
- }
- IArtifactKey[][] lists = new IArtifactKey[map.size()][];
- int i = 0;
- for (List<IArtifactKey> artifactKeyList : map.values()) {
- IArtifactKey[] relatedArtifactKeys = artifactKeyList.toArray(new IArtifactKey[artifactKeyList.size()]);
- Arrays.sort(relatedArtifactKeys, ARTIFACT_KEY_VERSION_COMPARATOR);
- lists[i++] = relatedArtifactKeys;
- }
- int candidates = 0;
- for (int ii = 0; ii < lists.length; ii++) {
- for (int jj = 0; jj < lists[ii].length; jj++) {
- System.out.println(lists[ii][jj] + ", ");
- }
- System.out.println("");
- if (lists[ii].length > 1)
- candidates++;
- }
- System.out.println("Candidates found: " + candidates);
- return lists;
- }
-
- private void optimize(IArtifactDescriptor complete, String strategy, IArtifactKey[] relatedArtifactKeys) {
- System.out.println("Optimizing " + complete);
-
- IArtifactDescriptor[] descriptors = getSortedCompletePredecessors(complete.getArtifactKey(), relatedArtifactKeys);
-
- int minDepth = Math.min(depth, descriptors.length);
- for (int i = 0; i < minDepth; i++) {
-
- System.out.println("\t with " + strategy + " against " + descriptors[i].getArtifactKey());
- String predecessorData = descriptors[i].getArtifactKey().toExternalForm();
- ArtifactDescriptor newDescriptor = new ArtifactDescriptor(complete);
- IProcessingStepDescriptor patchStep = new ProcessingStepDescriptor(strategy, predecessorData, true);
- IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {patchStep};
- newDescriptor.setProcessingSteps(steps);
- newDescriptor.setProperty(IArtifactDescriptor.FORMAT, strategy);
- OutputStream repositoryStream = null;
- try {
- repositoryStream = repository.getOutputStream(newDescriptor);
-
- // Add in all the processing steps needed to optimize (e.g., pack200, ...)
- ProcessingStep diffStep = getProcessingStep(strategy);
- diffStep.initialize(repository.getProvisioningAgent(), patchStep, newDescriptor);
- ProcessingStepHandler handler = new ProcessingStepHandler();
- OutputStream destination = handler.link(new ProcessingStep[] {diffStep}, repositoryStream, null);
-
- // Do the actual work by asking the repo to get the artifact and put it in the destination.
- IStatus status = repository.getArtifact(complete, destination, new NullProgressMonitor());
- if (!status.isOK()) {
- System.out.println("Getting the artifact is not ok."); //$NON-NLS-1$
- System.out.println(status);
- }
- } catch (ProvisionException e) {
- System.out.println("Skipping optimization of: " + descriptors[i].getArtifactKey()); //$NON-NLS-1$
- System.out.println(e.getMessage());
- e.printStackTrace();
- } finally {
- if (repositoryStream != null)
- try {
- repositoryStream.close();
- IStatus status = ProcessingStepHandler.checkStatus(repositoryStream);
- if (!status.isOK()) {
- System.out.println("Skipping optimization of: " + descriptors[i].getArtifactKey()); //$NON-NLS-1$
- System.out.println(status.toString());
- }
- } catch (IOException e) {
- System.out.println("Skipping optimization of: " + descriptors[i].getArtifactKey()); //$NON-NLS-1$
- System.out.println(e.getMessage());
- e.printStackTrace();
- }
- }
- }
- }
-
- private ProcessingStep getProcessingStep(String strategy) {
- if (strategy.equals(JBPATCH_STEP_ID))
- return new JBDiffStep(repository);
- return new JBDiffZipStep(repository);
- }
-
- private IArtifactDescriptor[] getSortedCompletePredecessors(IArtifactKey artifactKey, IArtifactKey[] relatedArtifactKeys) {
- // get all artifact keys
- List<IArtifactDescriptor> completeDescriptors = new ArrayList<IArtifactDescriptor>(relatedArtifactKeys.length);
- for (int i = 0; i < relatedArtifactKeys.length; i++) {
- // if we find ´our self´ skip
- if (relatedArtifactKeys[i].equals(artifactKey))
- continue;
- // look for a complete artifact descriptor of the current key
- IArtifactDescriptor[] descriptors = repository.getArtifactDescriptors(relatedArtifactKeys[i]);
- for (int j = 0; j < descriptors.length; j++) {
- if (isCanonical(descriptors[j])) {
- completeDescriptors.add(descriptors[j]);
- break;
- }
- }
- }
-
- IArtifactDescriptor[] completeSortedDescriptors = completeDescriptors.toArray(new IArtifactDescriptor[completeDescriptors.size()]);
- // Sort, so to allow a depth lookup!
- Arrays.sort(completeSortedDescriptors, ARTIFACT_DESCRIPTOR_VERSION_COMPARATOR);
- return completeSortedDescriptors;
- }
-
- private boolean isOptimized(IArtifactDescriptor descriptor, String stepId) {
- if (descriptor.getProcessingSteps().length != 1)
- return false;
- return stepId.equals(descriptor.getProcessingSteps()[0].getProcessorId());
- }
-
- private boolean isCanonical(IArtifactDescriptor descriptor) {
- // TODO length != 0 is not necessarily an indicator for not being complete!
- return descriptor.getProcessingSteps().length == 0;
- }
-
- static final class ArtifactDescriptorVersionComparator implements Comparator<IArtifactDescriptor> {
- public int compare(IArtifactDescriptor artifactDescriptor0, IArtifactDescriptor artifactDescriptor1) {
- return -1 * artifactDescriptor0.getArtifactKey().getVersion().compareTo(artifactDescriptor1.getArtifactKey().getVersion());
- }
- }
-
- static final class ArtifactKeyVersionComparator implements Comparator<IArtifactKey> {
- public int compare(IArtifactKey artifactKey0, IArtifactKey artifactKey1) {
- return -1 * artifactKey0.getVersion().compareTo(artifactKey1.getVersion());
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java
deleted file mode 100644
index 2e0efec37..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.pack200;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.OptimizerApplication;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-
-public class Application extends OptimizerApplication {
- //Application return code
- private static final Integer NON_WRITTABLE_REPOSITORY = new Integer(-1);
-
- //Application arguments
- private static final String ARTIFACT_REPOSITORY_ARG = "-artifactRepository"; //$NON-NLS-1$
- private static final String ARTIFACT_REPOSITORY_SHORT_ARG = "-ar"; //$NON-NLS-1$
-
- private URI artifactRepositoryLocation;
-
- public Object start(IApplicationContext context) throws Exception {
- Map<?, ?> args = context.getArguments();
- initializeFromArguments((String[]) args.get("application.args")); //$NON-NLS-1$
- IArtifactRepository repository = setupRepository(artifactRepositoryLocation);
- if (!repository.isModifiable())
- return NON_WRITTABLE_REPOSITORY;
- new Optimizer(repository).run();
- return null;
- }
-
- private IArtifactRepository setupRepository(URI location) throws ProvisionException {
- IArtifactRepositoryManager manager = getArtifactRepositoryManager();
- if (manager == null)
- // TODO log here
- return null;
- return manager.loadRepository(location, null);
- }
-
- public void initializeFromArguments(String[] args) throws Exception {
- if (args == null)
- return;
- for (int i = 0; i < args.length; i++) {
- // check for args with parameters. If we are at the last argument or
- // if the next one has a '-' as the first character, then we can't have
- // an arg with a param so continue.
- if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
- continue;
- String arg = args[++i];
-
- if (args[i - 1].equalsIgnoreCase(ARTIFACT_REPOSITORY_ARG) || args[i - 1].equalsIgnoreCase(ARTIFACT_REPOSITORY_SHORT_ARG))
- artifactRepositoryLocation = new URI(arg);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Messages.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Messages.java
deleted file mode 100644
index 85dc7fa0f..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Messages.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.pack200;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.artifact.optimizers.pack200.messages"; //$NON-NLS-1$
- public static String failed_getting_artifact;
- public static String skip_optimization;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- // Do not instantiate
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Optimizer.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Optimizer.java
deleted file mode 100644
index 9f91321b5..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Optimizer.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.pack200;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Iterator;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepHandler;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-import org.eclipse.osgi.util.NLS;
-
-public class Optimizer {
- private IArtifactRepository repository;
-
- public Optimizer(IArtifactRepository repository) {
- this.repository = repository;
- }
-
- public void run() {
- IQueryResult<IArtifactKey> keys = repository.query(ArtifactKeyQuery.ALL_KEYS, null);
- for (Iterator<IArtifactKey> iterator = keys.iterator(); iterator.hasNext();) {
- IArtifactKey key = iterator.next();
- if (!key.getClassifier().equals("plugin")) //$NON-NLS-1$
- continue;
- IArtifactDescriptor[] descriptors = repository.getArtifactDescriptors(key);
- IArtifactDescriptor canonical = null;
- boolean optimized = false;
- for (int j = 0; j < descriptors.length; j++) {
- IArtifactDescriptor descriptor = descriptors[j];
- if (isCanonical(descriptor))
- canonical = descriptor;
- optimized |= isOptimized(descriptor);
- }
- if (!optimized)
- optimize(canonical);
- }
- }
-
- private boolean isCanonical(IArtifactDescriptor descriptor) {
- // TODO length != 0 is not necessarily an indicator for not being complete!
- String format = descriptor.getProperty(IArtifactDescriptor.FORMAT);
- if (format == null)
- return true;
- return false;
- }
-
- private void optimize(IArtifactDescriptor descriptor) {
- ArtifactDescriptor newDescriptor = new ArtifactDescriptor(descriptor);
- IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
- newDescriptor.setProcessingSteps(steps);
- newDescriptor.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
- OutputStream repositoryStream = null;
- try {
- repositoryStream = repository.getOutputStream(newDescriptor);
-
- // Add in all the processing steps needed to optimize (e.g., pack200, ...)
- ProcessingStepHandler handler = new ProcessingStepHandler();
- OutputStream destination = handler.link(new ProcessingStep[] {new Pack200OptimizerStep()}, repositoryStream, null);
-
- // Do the actual work by asking the repo to get the artifact and put it in the destination.
- IStatus status = repository.getArtifact(descriptor, destination, new NullProgressMonitor());
- if (!status.isOK()) {
- System.out.println(NLS.bind(Messages.failed_getting_artifact, descriptor.getArtifactKey()));
- System.out.println(status);
- }
- } catch (ProvisionException e) {
- System.out.println(NLS.bind(Messages.skip_optimization, descriptor.getArtifactKey()));
- System.out.println(e.getMessage());
- e.printStackTrace();
- } finally {
- if (repositoryStream != null)
- try {
- repositoryStream.close();
- IStatus status = ProcessingStepHandler.checkStatus(repositoryStream);
- if (!status.isOK()) {
- System.out.println(NLS.bind(Messages.skip_optimization, descriptor.getArtifactKey()));
- System.out.println(status.toString());
- }
- } catch (IOException e) {
- System.out.println(NLS.bind(Messages.skip_optimization, descriptor.getArtifactKey()));
- System.out.println(e.getMessage());
- e.printStackTrace();
- }
- }
- }
-
- private boolean isOptimized(IArtifactDescriptor descriptor) {
- return IArtifactDescriptor.FORMAT_PACKED.equals(descriptor.getProperty(IArtifactDescriptor.FORMAT));
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Pack200OptimizerStep.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Pack200OptimizerStep.java
deleted file mode 100644
index f950b5da0..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Pack200OptimizerStep.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.pack200;
-
-import java.io.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.Activator;
-import org.eclipse.equinox.internal.p2.artifact.processing.AbstractBufferingStep;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor.Options;
-
-/**
- * The Pack200Packer expects an input containing normal ".jar" data.
- */
-public class Pack200OptimizerStep extends AbstractBufferingStep {
- private static final String PACKED_SUFFIX = ".pack.gz"; //$NON-NLS-1$
- private File incoming;
- private static boolean pack200Available;
-
- static {
- try {
- // TODO This is not very elegant. But there is currently no other way to
- // find it out. PackStep.canPack() is not visible due to restrictions.
- JarProcessor.getPackProcessor(null);
- pack200Available = true;
- } catch (UnsupportedOperationException e) {
- pack200Available = false;
- }
- }
-
- protected OutputStream createIncomingStream() throws IOException {
- incoming = File.createTempFile(INCOMING_ROOT, JAR_SUFFIX);
- return new BufferedOutputStream(new FileOutputStream(incoming));
- }
-
- protected void cleanupTempFiles() {
- super.cleanupTempFiles();
- if (incoming != null)
- incoming.delete();
- }
-
- protected void performProcessing() throws IOException {
- File resultFile = null;
- try {
- resultFile = process();
- // now write the optimized content to the destination
- if (resultFile.length() > 0) {
- InputStream resultStream = new BufferedInputStream(new FileInputStream(resultFile));
- FileUtils.copyStream(resultStream, true, getDestination(), false);
- } else {
- setStatus(new Status(IStatus.ERROR, Activator.ID, "Empty intermediate file: " + resultFile)); //$NON-NLS-1$
- }
- } finally {
- if (resultFile != null)
- resultFile.delete();
- }
- }
-
- protected File process() throws IOException {
- if (!pack200Available)
- // TODO Slightly abused API!!
- throw new FileNotFoundException("Could not find pack200 command.");
- // unpack
- Options options = new Options();
- options.pack = true;
- // TODO use false here assuming that all content is conditioned. Need to revise this
- options.processAll = false;
- options.input = incoming;
- options.outputDir = getWorkDir().getPath();
- options.verbose = true;
- new JarProcessorExecutor().runJarProcessor(options);
- return new File(getWorkDir(), incoming.getName() + PACKED_SUFFIX);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/messages.properties b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/messages.properties
deleted file mode 100644
index 4970a32d6..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/messages.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-failed_getting_artifact=Failed getting the artifact {0}.
-skip_optimization=Skipping optimization of {0}.
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/.classpath b/bundles/org.eclipse.equinox.p2.artifact.processors/.classpath
deleted file mode 100644
index 7cdeb7319..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/.project b/bundles/org.eclipse.equinox.p2.artifact.processors/.project
deleted file mode 100644
index 88c78e726..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.artifact.processors</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index c973c1373..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Nov 14 12:49:38 EST 2007
-eclipse.preferences.version=1
-encoding/<project>=ISO-8859-1
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index b503d85c9..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,342 +0,0 @@
-#Tue Nov 06 20:46:54 EST 2007
-eclipse.preferences.version=1
-instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 57ebea5c9..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Mon Nov 05 21:23:42 EST 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.artifact.processors/META-INF/MANIFEST.MF
deleted file mode 100644
index bfacdcbc1..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,26 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.artifact.processors;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.artifact.processors.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.artifact.processors;x-internal:=true,
- org.eclipse.equinox.internal.p2.artifact.processors.jardelta;x-internal:=true,
- org.eclipse.equinox.internal.p2.artifact.processors.jbdiff;x-internal:=true
-Require-Bundle: org.eclipse.equinox.common,
- org.eclipse.equinox.p2.artifact.repository
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Bundle-ActivationPolicy: lazy
-Import-Package: ie.wombat.jbdiff,
- org.eclipse.equinox.internal.p2.artifact.optimizers,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.sar,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="2.0.0",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
- org.osgi.framework;version="1.4.0"
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/about.html b/bundles/org.eclipse.equinox.p2.artifact.processors/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/build.properties b/bundles/org.eclipse.equinox.p2.artifact.processors/build.properties
deleted file mode 100644
index ad40ab407..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/plugin.properties b/bundles/org.eclipse.equinox.p2.artifact.processors/plugin.properties
deleted file mode 100644
index 9bb3b4448..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Equinox p2 Artifact Processing Support
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/plugin.xml b/bundles/org.eclipse.equinox.p2.artifact.processors/plugin.xml
deleted file mode 100644
index 2b083618c..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/plugin.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- point="org.eclipse.equinox.p2.artifact.repository.processingSteps"
- id="org.eclipse.equinox.p2.processing.JarDeltaPatchStep">
- <step class="org.eclipse.equinox.internal.p2.artifact.processors.jardelta.JarDeltaProcessorStep"/>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.artifact.repository.processingSteps"
- id="org.eclipse.equinox.p2.processing.JBPatchStep">
- <step class="org.eclipse.equinox.internal.p2.artifact.processors.jbdiff.JBPatchStep"/>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.artifact.repository.processingSteps"
- id="org.eclipse.equinox.p2.processing.JBPatchZipStep">
- <step class="org.eclipse.equinox.internal.p2.artifact.processors.jbdiff.JBPatchZipStep"/>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/pom.xml b/bundles/org.eclipse.equinox.p2.artifact.processors/pom.xml
deleted file mode 100644
index 9fe5da1de..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.artifact.processors</artifactId>
- <version>1.0.100.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java b/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java
deleted file mode 100644
index 8b60e4ff5..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.processors;
-
-import java.net.URI;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.AbstractDeltaStep;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.artifact.*;
-
-/**
- * The <code>AbstractDeltaPatchStep</code> is an abstract processing step that
- * retrieves a local artifact repository containing the serialized/encoded
- * artifact key. It assumes that the artifact key is stored within the data property
- * of the processing step descriptor encoding the artifact key of the base artifact.
- */
-public abstract class AbstractDeltaProcessorStep extends AbstractDeltaStep {
-
- public void initialize(IProvisioningAgent agent, IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
- super.initialize(agent, descriptor, context);
- if (!getStatus().isOK())
- return;
- fetchLocalArtifactRepository(agent);
- }
-
- /**
- * Fetch a local artifact repository containing the fetched artifact key.
- */
- private void fetchLocalArtifactRepository(IProvisioningAgent agent) {
- if (repository != null)
- return;
- IArtifactRepositoryManager repoMgr = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- if (repoMgr == null) {
- setStatus(new Status(IStatus.ERROR, Activator.ID, "Could not get artifact repository manager."));
- return;
- }
-
- URI[] repositories = repoMgr.getKnownRepositories(IRepositoryManager.REPOSITORIES_LOCAL);
- for (int i = 0; i < repositories.length; i++) {
- try {
- IArtifactRepository currentRepo = repoMgr.loadRepository(repositories[i], null);
- if (currentRepo.contains(key)) {
- repository = currentRepo;
- return;
- }
- } catch (ProvisionException e) {
- //just skip unreadable repositories
- }
- }
- setStatus(new Status(IStatus.ERROR, Activator.ID, "No repository available containing key " + key));
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/Activator.java b/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/Activator.java
deleted file mode 100644
index f11af994d..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/Activator.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.artifact.processors;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
- public static final String ID = "org.eclipse.equinox.p2.artifact.processors"; //$NON-NLS-1$
- private static BundleContext context = null;
-
- public static BundleContext getContext() {
- return context;
- }
-
- public void start(BundleContext context) throws Exception {
- Activator.context = context;
- }
-
- public void stop(BundleContext context) throws Exception {
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jardelta/DeltaApplier.java b/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jardelta/DeltaApplier.java
deleted file mode 100644
index d5f4d16f2..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jardelta/DeltaApplier.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.processors.jardelta;
-
-import java.io.*;
-import java.util.*;
-import java.util.zip.*;
-
-public class DeltaApplier {
- private static final String DELETE_SUFFIX = ".delete"; //$NON-NLS-1$
- private static final String MANIFEST_ENTRY_NAME = "META-INF/MANIFEST.MF"; //$NON-NLS-1$
- private File delta;
- private File base;
- private File destination;
- private ZipFile baseJar;
- private ZipFile deltaJar;
- private Set baseEntries;
- private ZipFile manifestJar;
-
- public DeltaApplier(File base, File delta, File destination) {
- this.base = base;
- this.delta = delta;
- this.destination = destination;
- }
-
- public void run() {
- try {
- if (!openJars())
- return;
- applyDelta();
- writeResult();
- } finally {
- closeJars();
- }
- }
-
- private void applyDelta() {
- // start out assuming that all the base entries will be moved over.
- baseEntries = getEntries(baseJar);
- // remove from the base all the entries that appear in the delta
- for (Enumeration e = deltaJar.entries(); e.hasMoreElements();) {
- ZipEntry entry = ((ZipEntry) e.nextElement());
- checkForManifest(entry, deltaJar);
- String name = entry.getName();
- if (name.endsWith(DELETE_SUFFIX)) {
- name = name.substring(0, name.length() - DELETE_SUFFIX.length());
- // if the manifest is being deleted, forget anyone who might have a manifest
- if (name.equalsIgnoreCase(MANIFEST_ENTRY_NAME))
- manifestJar = null;
- }
- baseEntries.remove(name);
- }
- }
-
- private void writeResult() {
- ZipOutputStream result = null;
- try {
- try {
- result = new ZipOutputStream(new FileOutputStream(destination));
- // if the delta includes the manifest, be sure to write it first
- if (manifestJar != null)
- writeEntry(result, manifestJar.getEntry(MANIFEST_ENTRY_NAME), manifestJar, true);
- // write out the things we know are staying from the base JAR
- for (Iterator i = baseEntries.iterator(); i.hasNext();) {
- ZipEntry entry = baseJar.getEntry((String) i.next());
- writeEntry(result, entry, baseJar, false);
- }
- // write out the changes/additions from the delta.
- for (Enumeration e = deltaJar.entries(); e.hasMoreElements();) {
- ZipEntry entry = (ZipEntry) e.nextElement();
- if (!entry.getName().endsWith(DELETE_SUFFIX))
- writeEntry(result, entry, deltaJar, false);
- }
- } finally {
- if (result != null)
- result.close();
- }
- } catch (IOException e) {
- e.printStackTrace();
- return;
- }
- }
-
- private void writeEntry(ZipOutputStream result, ZipEntry entry, ZipFile sourceJar, boolean manifest) throws IOException {
- if (!manifest && entry.getName().equalsIgnoreCase(MANIFEST_ENTRY_NAME))
- return;
- // add the entry
- result.putNextEntry(entry);
- try {
- // if there is a sourceJar copy over the content for the entry into the result
- if (sourceJar != null) {
- InputStream contents = sourceJar.getInputStream(entry);
- try {
- transferStreams(contents, result);
- } finally {
- contents.close();
- }
- }
- } finally {
- result.closeEntry();
- }
- }
-
- /**
- * Transfers all available bytes from the given input stream to the given
- * output stream. Does not close either stream.
- *
- * @param source
- * @param destination
- * @throws IOException
- */
- public static void transferStreams(InputStream source, OutputStream destination) throws IOException {
- source = new BufferedInputStream(source);
- destination = new BufferedOutputStream(destination);
- try {
- byte[] buffer = new byte[8192];
- while (true) {
- int bytesRead = -1;
- if ((bytesRead = source.read(buffer)) == -1)
- break;
- destination.write(buffer, 0, bytesRead);
- }
- } finally {
- destination.flush();
- }
- }
-
- private boolean openJars() {
- try {
- baseJar = new ZipFile(base);
- deltaJar = new ZipFile(delta);
- } catch (IOException e) {
- return false;
- }
- return true;
- }
-
- private void closeJars() {
- if (baseJar != null)
- try {
- baseJar.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- if (deltaJar != null)
- try {
- deltaJar.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- private Set getEntries(ZipFile jar) {
- HashSet result = new HashSet(jar.size());
- for (Enumeration e = jar.entries(); e.hasMoreElements();) {
- ZipEntry entry = (ZipEntry) e.nextElement();
- checkForManifest(entry, jar);
- result.add(entry.getName());
- }
- return result;
- }
-
- /**
- * Check to see if the given entry is the manifest. If so, remember it for use when writing
- * the resultant JAR.
- * @param entry
- * @param jar
- */
- private void checkForManifest(ZipEntry entry, ZipFile jar) {
- if (entry.getName().equalsIgnoreCase(MANIFEST_ENTRY_NAME))
- manifestJar = jar;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jardelta/JarDeltaProcessorStep.java b/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jardelta/JarDeltaProcessorStep.java
deleted file mode 100644
index 8c07924ff..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jardelta/JarDeltaProcessorStep.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.processors.jardelta;
-
-import java.io.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.artifact.processors.AbstractDeltaProcessorStep;
-import org.eclipse.equinox.internal.p2.artifact.processors.Activator;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-
-/**
- * Processor that takes a JAR delta and applies it.
- */
-public class JarDeltaProcessorStep extends AbstractDeltaProcessorStep {
-
- private File incoming;
-
- public JarDeltaProcessorStep() {
- super();
- }
-
- protected OutputStream createIncomingStream() throws IOException {
- incoming = File.createTempFile(INCOMING_ROOT, JAR_SUFFIX);
- return new BufferedOutputStream(new FileOutputStream(incoming));
- }
-
- protected void cleanupTempFiles() {
- super.cleanupTempFiles();
- if (incoming != null)
- incoming.delete();
- }
-
- protected void performProcessing() throws IOException {
- File resultFile = null;
- try {
- resultFile = process();
- // now write the optimized content to the destination
- if (resultFile.length() > 0) {
- InputStream resultStream = new BufferedInputStream(new FileInputStream(resultFile));
- FileUtils.copyStream(resultStream, true, getDestination(), false);
- } else {
- setStatus(new Status(IStatus.ERROR, Activator.ID, "Empty optimized file: " + resultFile)); //$NON-NLS-1$
- }
- } finally {
- if (resultFile != null)
- resultFile.delete();
- }
- }
-
- protected File process() throws IOException {
- File predecessor = null;
- try {
- File resultFile = File.createTempFile(RESULT_ROOT, JAR_SUFFIX);
- // get the predecessor and perform the optimization into a temp file
- predecessor = fetchPredecessor(new ArtifactDescriptor(key));
- new DeltaApplier(predecessor, incoming, resultFile).run();
- return resultFile;
- } finally {
- // if we have a predecessor and it is our temp file then clean up the file
- if (predecessor != null && predecessor.getAbsolutePath().indexOf(PREDECESSOR_ROOT) > -1)
- predecessor.delete();
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jbdiff/JBPatchStep.java b/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jbdiff/JBPatchStep.java
deleted file mode 100644
index c31b42309..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jbdiff/JBPatchStep.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.processors.jbdiff;
-
-import ie.wombat.jbdiff.JBPatch;
-import java.io.*;
-import org.eclipse.equinox.internal.p2.artifact.processors.AbstractDeltaProcessorStep;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.sar.DirectByteArrayOutputStream;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-
-/**
- * The JBPatchStep patches a JBDiff based data.
- */
-public class JBPatchStep extends AbstractDeltaProcessorStep {
-
- public JBPatchStep() {
- super();
- }
-
- protected OutputStream createIncomingStream() throws IOException {
- return new DirectByteArrayOutputStream();
- }
-
- protected void performProcessing() throws IOException {
- DirectByteArrayOutputStream predecessor = fetchPredecessorBytes(new ArtifactDescriptor(key));
- DirectByteArrayOutputStream current = (DirectByteArrayOutputStream) incomingStream;
- byte[] result = JBPatch.bspatch(predecessor.getBuffer(), predecessor.getBufferLength(), current.getBuffer(), current.getBufferLength());
- // free up the memory as soon as possible.
- predecessor = null;
- current = null;
- incomingStream = null;
-
- // copy the result of the optimization to the destination.
- FileUtils.copyStream(new ByteArrayInputStream(result), true, getDestination(), false);
- }
-
- private DirectByteArrayOutputStream fetchPredecessorBytes(ArtifactDescriptor artifactDescriptor) throws IOException {
- DirectByteArrayOutputStream result = new DirectByteArrayOutputStream();
- setStatus(repository.getArtifact(artifactDescriptor, result, getProgressMonitor()));
- if (!getStatus().isOK())
- throw (IOException) new IOException(getStatus().getMessage()).initCause(getStatus().getException());
- return result;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jbdiff/JBPatchZipStep.java b/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jbdiff/JBPatchZipStep.java
deleted file mode 100644
index de4ff46ff..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jbdiff/JBPatchZipStep.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.processors.jbdiff;
-
-import ie.wombat.jbdiff.JBPatch;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import org.eclipse.equinox.internal.p2.sar.DirectByteArrayOutputStream;
-import org.eclipse.equinox.internal.p2.sar.SarUtil;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-
-/**
- * The <code>JBPatchZipStep</code> patches a JBDiff based diff of zips/jars.
- */
-public class JBPatchZipStep extends JBPatchStep {
-
- public JBPatchZipStep() {
- super();
- }
-
- protected void performProcessing() throws IOException {
- DirectByteArrayOutputStream predecessor = fetchPredecessorBytes(new ArtifactDescriptor(key));
- DirectByteArrayOutputStream current = (DirectByteArrayOutputStream) incomingStream;
- byte[] result = JBPatch.bspatch(predecessor.getBuffer(), predecessor.getBufferLength(), current.getBuffer(), current.getBufferLength());
- // free up the memory as soon as possible.
- predecessor = null;
- current = null;
- incomingStream = null;
-
- // copy the result of the optimization to the destination.
- SarUtil.sarToZip(new ByteArrayInputStream(result), true, getDestination(), false);
- }
-
- private DirectByteArrayOutputStream fetchPredecessorBytes(ArtifactDescriptor artifactDescriptor) throws IOException {
- DirectByteArrayOutputStream zippedPredecessor = new DirectByteArrayOutputStream();
- setStatus(repository.getArtifact(artifactDescriptor, zippedPredecessor, getProgressMonitor()));
- if (!getStatus().isOK())
- throw (IOException) new IOException(getStatus().getMessage()).initCause(getStatus().getException());
-
- DirectByteArrayOutputStream result = new DirectByteArrayOutputStream();
- SarUtil.zipToSar(zippedPredecessor.getInputStream(), result);
- return result;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/.classpath b/bundles/org.eclipse.equinox.p2.artifact.repository/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.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.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.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/.project b/bundles/org.eclipse.equinox.p2.artifact.repository/.project
deleted file mode 100644
index 641a8f970..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/.project
+++ /dev/null
@@ -1,39 +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.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.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 c75efa1c2..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,346 +0,0 @@
-#Tue Dec 22 19:31:57 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.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/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF
deleted file mode 100644
index 2cce6bc62..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,63 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.artifact.repository;singleton:=true
-Bundle-Version: 1.1.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.artifact.repository.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: 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.p2.ui,
- org.eclipse.equinox.p2.directorywatcher,
- org.eclipse.equinox.p2.repository.tools",
- org.eclipse.equinox.internal.p2.artifact.repository.simple;
- x-friends:="org.eclipse.equinox.p2.touchpoint.eclipse,
- org.eclipse.equinox.p2.tests,
- org.eclipse.equinox.p2.directorywatcher,
- org.eclipse.equinox.p2.updatesite,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.extensionlocation",
- 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"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.equinox.registry,
- org.eclipse.equinox.p2.metadata
-Import-Package: javax.xml.parsers,
- org.eclipse.core.runtime.jobs,
- 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.repository,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.core.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.spi;version="[2.0.0,3.0.0)",
- org.eclipse.internal.provisional.equinox.p2.jarprocessor;resolution:=optional,
- 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.service.prefs;version="1.1.1",
- org.w3c.dom,
- org.xml.sax;resolution:=optional
-Service-Component: OSGI-INF/repositoryManager.xml
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/OSGI-INF/repositoryManager.xml b/bundles/org.eclipse.equinox.p2.artifact.repository/OSGI-INF/repositoryManager.xml
deleted file mode 100644
index 62a650ed3..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/OSGI-INF/repositoryManager.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.artifact.repository">
- <implementation class="org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryComponent"/>
- <service>
- <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
- </service>
- <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager"/>
-</scr:component> \ No newline at end of file
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 57d41ddb0..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- about.html,\
- plugin.properties,\
- OSGI-INF/
-src.includes = about.html,\
- schema/
-source.. = src/
-javacTarget=jsr14
-javacSource=1.5
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 7025c7f08..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/plugin.xml
+++ /dev/null
@@ -1,35 +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.p2.artifact.repository.simple.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
- 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>
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/pom.xml b/bundles/org.eclipse.equinox.p2.artifact.repository/pom.xml
deleted file mode 100644
index 14275340c..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.artifact.repository</artifactId>
- <version>1.1.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
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 36a7db0b5..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"/>
- </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/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/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 49aa609a2..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java
+++ /dev/null
@@ -1,84 +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.processing.ProcessingStep;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
-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(IProvisioningAgent agent, IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
- super.initialize(agent, 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(IProcessingStepDescriptor 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.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 f82bb997a..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/messages.properties
+++ /dev/null
@@ -1,16 +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}.
-
-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 fa96f4b42..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java
+++ /dev/null
@@ -1,95 +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.p2.jarprocessor.Utils;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
-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 static boolean detailedResult = false;
-
- 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(IProvisioningAgent agent, IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
- super.initialize(agent, descriptor, context);
- if (!UnpackStep.canUnpack()) {
- IStatus status = null;
- if (detailedResult) {
- status = new Status(IStatus.ERROR, Activator.ID, "Unpack facility not configured."); //$NON-NLS-1$
- detailedResult = true;
- } else {
- String[] locations = Utils.getPack200Commands("unpack200"); //$NON-NLS-1$
- StringBuffer locationTried = new StringBuffer(100);
- for (int i = 0; i < locations.length; i++) {
- locationTried.append(locations[i]).append(", "); //$NON-NLS-1$
- }
- status = new Status(IStatus.ERROR, Activator.ID, "Unpack facility not configured. The locations searched for unpack200 are: " + locationTried); //$NON-NLS-1$
- }
- setStatus(status);
- }
- }
-
- 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 043ba761d..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Activator.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
- public static final String ID = "org.eclipse.equinox.p2.artifact.repository"; //$NON-NLS-1$
- public static final String REPO_PROVIDER_XPT = ID + '.' + "artifactRepositories"; //$NON-NLS-1$
-
- private static BundleContext context;
-
- public static BundleContext getContext() {
- return Activator.context;
- }
-
- public void start(BundleContext aContext) throws Exception {
- Activator.context = aContext;
- }
-
- public void stop(BundleContext aContext) throws Exception {
- Activator.context = null;
- }
-}
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 155f09f15..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryManager.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Genuitec LLC - various bug fixes
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository;
-
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager;
-import org.eclipse.equinox.internal.p2.repository.helpers.LocationProperties;
-import org.eclipse.equinox.p2.core.*;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.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<IArtifactKey> implements IArtifactRepositoryManager {
-
- public ArtifactRepositoryManager(IProvisioningAgent agent) {
- super(agent);
- }
-
- public void addRepository(IArtifactRepository repository) {
- super.addRepository(repository, true, null);
- }
-
- public IArtifactRequest createMirrorRequest(IArtifactKey key, IArtifactRepository destination, Map<String, String> destinationDescriptorProperties, Map<String, String> destinationRepositoryProperties) {
- return new MirrorRequest(key, destination, destinationDescriptorProperties, destinationRepositoryProperties);
- }
-
- public IArtifactRepository createRepository(URI location, String name, String type, Map<String, String> properties) throws ProvisionException {
- return (IArtifactRepository) doCreateRepository(location, name, type, properties);
- }
-
- public IArtifactRepository getRepository(URI location) {
- return (IArtifactRepository) basicGetRepository(location);
- }
-
- protected IRepository<IArtifactKey> factoryCreate(URI location, String name, String type, Map<String, String> properties, IExtension extension) throws ProvisionException {
- ArtifactRepositoryFactory factory = (ArtifactRepositoryFactory) createExecutableExtension(extension, EL_FACTORY);
- if (factory == null)
- return null;
- factory.setAgent(agent);
- return factory.create(location, name, type, properties);
- }
-
- protected IRepository<IArtifactKey> factoryLoad(URI location, IExtension extension, int flags, SubMonitor monitor) throws ProvisionException {
- ArtifactRepositoryFactory factory = (ArtifactRepositoryFactory) createExecutableExtension(extension, EL_FACTORY);
- if (factory == null)
- return null;
- factory.setAgent(agent);
- return factory.load(location, flags, monitor.newChild(10));
- }
-
- protected String getBundleId() {
- return Activator.ID;
- }
-
- protected String getDefaultSuffix() {
- return "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);
- }
-
- protected String[] getPreferredRepositorySearchOrder(LocationProperties properties) {
- return properties.getArtifactFactorySearchOrder();
- }
-
- /**
- * 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.
- IAgentLocation location = (IAgentLocation) getAgent().getService(IAgentLocation.SERVICE_NAME);
- if (location == null)
- // TODO should do something here since we are failing to restore.
- return;
- URI cacheLocation = URIUtil.append(location.getDataArea("org.eclipse.equinox.p2.core"), "cache/"); //$NON-NLS-1$ //$NON-NLS-2$
-
- try {
- loadRepository(cacheLocation, 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<String, String> properties = new HashMap<String, String>(1);
- properties.put(IRepository.PROP_SYSTEM, Boolean.TRUE.toString());
- createRepository(cacheLocation, "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 2248eab30..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRequest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRequest;
-
-/**
- * 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(IArtifactRepository, 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 sourceRepository the repository to download the artifact from
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- */
- abstract public void perform(IArtifactRepository sourceRepository, IProgressMonitor monitor);
-
- /**
- * Sets the result of an invocation of {@link #perform(IArtifactRepository, 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;
- }
-
- protected 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 04167f75d..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
+++ /dev/null
@@ -1,591 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.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.persistence.CompositeRepositoryIO;
-import org.eclipse.equinox.internal.p2.persistence.CompositeRepositoryState;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.*;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.AbstractArtifactRepository;
-import org.eclipse.osgi.util.NLS;
-
-public class CompositeArtifactRepository extends AbstractArtifactRepository implements ICompositeRepository<IArtifactKey> {
-
- 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<URI> childrenURIs = new ArrayList<URI>();
- // keep a list of the repositories that we have successfully loaded
- private List<ChildInfo> loadedRepos = new ArrayList<ChildInfo>();
- private IArtifactRepositoryManager manager;
- private boolean disableSave;
-
- /**
- * Create a Composite repository in memory.
- * @return the repository or null if unable to create one
- */
- public static CompositeArtifactRepository createMemoryComposite(IProvisioningAgent agent) {
- if (agent == null)
- return null;
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- 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;
- }
-
- private IArtifactRepositoryManager getManager() {
- return manager;
- }
-
- /**
- * This is only called by the parser when loading a repository.
- */
- CompositeArtifactRepository(IArtifactRepositoryManager manager, CompositeRepositoryState state) {
- super(manager.getAgent(), state.getName(), state.getType(), state.getVersion(), state.getLocation(), state.getDescription(), state.getProvider(), state.getProperties());
- this.manager = manager;
- for (int i = 0; i < state.getChildren().length; i++)
- addChild(state.getChildren()[i], false);
- }
-
- /**
- * @noreference This constructor is not intended to be referenced by clients.
- */
- protected CompositeArtifactRepository(IArtifactRepositoryManager manager, URI location, String repositoryName, Map<String, String> properties) {
- super(manager.getAgent(), repositoryName, REPOSITORY_TYPE, REPOSITORY_VERSION.toString(), location, null, null, properties);
- this.manager = manager;
- 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(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 <T> boolean add(List<T> list, T 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(getLocation().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, getLocation());
- 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, getLocation()) : URIUtil.makeAbsolute(childURI, getLocation());
- 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 (ChildInfo current : loadedRepos) {
- URI repoLocation = current.repo.getLocation();
- if (URIUtil.sameURI(childURI, repoLocation) || URIUtil.sameURI(other, repoLocation)) {
- found = current;
- break;
- }
- }
- if (found != null)
- loadedRepos.remove(found);
- save();
- }
- }
-
- public void removeAllChildren() {
- childrenURIs.clear();
- loadedRepos.clear();
- save();
- }
-
- public List<URI> getChildren() {
- List<URI> result = new ArrayList<URI>();
- for (URI uri : childrenURIs)
- result.add(URIUtil.makeAbsolute(uri, getLocation()));
- return result;
- }
-
- public List<IArtifactRepository> getLoadedChildren() {
- List<IArtifactRepository> result = new ArrayList<IArtifactRepository>(loadedRepos.size());
- for (ChildInfo info : loadedRepos) {
- result.add(info.repo);
- }
- 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 (ChildInfo current : loadedRepos) {
- if (current.isGood() && current.repo.contains(key))
- return true;
- }
- return false;
- }
-
- public boolean contains(IArtifactDescriptor descriptor) {
- for (ChildInfo current : loadedRepos) {
- if (current.isGood() && current.repo.contains(descriptor))
- return true;
- }
- return false;
- }
-
- public IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key) {
- ArrayList<IArtifactDescriptor> result = new ArrayList<IArtifactDescriptor>();
- for (ChildInfo current : loadedRepos) {
- if (current.isGood()) {
- IArtifactDescriptor[] tempResult = current.repo.getArtifactDescriptors(key);
- for (int i = 0; i < tempResult.length; i++)
- add(result, tempResult[i]);
- }
- }
- return result.toArray(new IArtifactDescriptor[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 (ChildInfo childInfo : loadedRepos) {
- if (requests.length == 0)
- break;
- IArtifactRepository current = childInfo.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<ChildInfo> childIterator = loadedRepos.iterator(); childIterator.hasNext();) {
- ChildInfo current = 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()) {
- //we are done with this artifact so forgive bad children so they can try again on next artifact
- resetChildFailures();
- return Status.OK_STATUS;
- }
- // 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(true);
- // If more children are available, set retry
- if (childIterator.hasNext())
- 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
- resetChildFailures();
- return status;
- }
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- }
- return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.artifact_not_found, descriptor));
- }
-
- /**
- * Rests the failure state on all children to 'good'. This is done after a successful
- * download to ensure that children who failed to obtain one artifact get a chance
- * on the next artifact.
- */
- private void resetChildFailures() {
- for (ChildInfo current : loadedRepos)
- current.setBad(false);
- }
-
- private IArtifactRequest[] filterUnfetched(IArtifactRequest[] requests) {
- ArrayList<IArtifactRequest> filteredRequests = new ArrayList<IArtifactRequest>();
- 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<IArtifactRequest> applicable = new ArrayList<IArtifactRequest>();
- for (int i = 0; i < requests.length; i++) {
- if (repository.contains(requests[i].getArtifactKey()))
- applicable.add(requests[i]);
- }
- return applicable.toArray(new IArtifactRequest[applicable.size()]);
- }
-
- /**
- * This method is only protected for testing purposes
- *
- * @nooverride This method is not intended to be re-implemented or extended by clients.
- * @noreference This method is not intended to be referenced by clients.
- */
- protected void save() {
- if (disableSave)
- return;
- if (!isModifiable())
- return;
- boolean compress = "true".equalsIgnoreCase(getProperty(PROP_COMPRESSED)); //$NON-NLS-1$
- OutputStream os = null;
- try {
- URI actualLocation = getActualLocation(getLocation(), false);
- File artifactsFile = URIUtil.toFile(actualLocation);
- File jarFile = URIUtil.toFile(getActualLocation(getLocation(), 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, getLocation()), e));
- }
- }
-
- private IArtifactRepository load(URI repoURI) throws ProvisionException {
- // make sure we are dealing with an absolute location
- repoURI = URIUtil.makeAbsolute(repoURI, getLocation());
- 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 (ChildInfo childInfo : loadedRepos) {
- // IArtifactRepository current = childInfo.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) {
- // IQueryResult<IArtifactKey> toCheckKeys = one.query(ArtifactKeyQuery.ALL_KEYS, null);
- // for (Iterator<IArtifactKey> iterator = toCheckKeys.iterator(); iterator.hasNext();) {
- // IArtifactKey key = iterator.next();
- // 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.
- // */
- // private boolean validate(String comparatorID) {
- // IArtifactComparator comparator = ArtifactComparatorFactory.getArtifactComparator(comparatorID);
- // ChildInfo[] repos = 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(boolean bad) {
- good = !bad;
- }
-
- boolean isGood() {
- return good;
- }
- }
-
- public IQueryResult<IArtifactKey> query(IQuery<IArtifactKey> query, IProgressMonitor monitor) {
- // Query all the all the repositories this composite repo contains
- List<IArtifactRepository> repos = new ArrayList<IArtifactRepository>();
- for (ChildInfo info : loadedRepos) {
- if (info.isGood())
- repos.add(info.repo);
- }
- IQueryable<IArtifactKey> queryable = QueryUtil.compoundQueryable(repos);
- return queryable.query(query, monitor);
- }
-
- public IQueryable<IArtifactDescriptor> descriptorQueryable() {
- // Query all the all the repositories this composite repo contains
- List<IQueryable<IArtifactDescriptor>> repos = new ArrayList<IQueryable<IArtifactDescriptor>>();
- for (ChildInfo info : loadedRepos) {
- if (info.isGood())
- repos.add(info.repo.descriptorQueryable());
- }
- return QueryUtil.compoundQueryable(repos);
- }
-
- public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
- IStatus result = null;
- synchronized (this) {
- try {
- disableSave = true;
- runnable.run(monitor);
- } catch (OperationCanceledException oce) {
- return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce);
- } catch (Throwable e) {
- result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
- } finally {
- disableSave = false;
- try {
- save();
- } catch (Exception e) {
- if (result != null)
- result = new MultiStatus(Activator.ID, IStatus.ERROR, new IStatus[] {result}, e.getMessage(), e);
- else
- result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
- }
- }
- }
- if (result == null)
- result = Status.OK_STATUS;
- return result;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.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 a37216807..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepositoryFactory.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository;
-
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactRepositoryFactory;
-
-import org.eclipse.equinox.p2.core.ProvisionException;
-
-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.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.osgi.util.NLS;
-
-public class CompositeArtifactRepositoryFactory extends ArtifactRepositoryFactory {
-
- private IArtifactRepositoryManager getManager() {
- if (getAgent() != null)
- return (IArtifactRepositoryManager) getAgent().getService(IArtifactRepositoryManager.SERVICE_NAME);
- return null;
- }
-
- 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(getManager(), 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<String, String> properties) {
- return new CompositeArtifactRepository(getManager(), 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 72dedad7d..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and 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 no_location;
- 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_childrenRepos;
- public static String exception_comparatorNotFound;
- public static String exception_noComparators;
- public static String exception_unsupportedAddToComposite;
-
- public static String exception_unsupportedGetOutputStream;
- public static String exception_unsupportedRemoveFromComposite;
-
- 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 1262780f2..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorRequest.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * 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.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactDescriptor;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.repository.RepositoryTransport;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepHandler;
-import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * A request to mirror (copy) an artifact into a given destination artifact repository.
- */
-public class MirrorRequest extends ArtifactRequest {
- /**
- * The name of a repository property on an artifact repository, indicating the base URI
- * to be used for reporting download statistics.
- */
- private static final String PROP_STATS_URI = "p2.statsURI"; //$NON-NLS-1$
-
- /**
- * The name of a property on an artifact descriptor, indicating the relative download URI
- * to be used to report download statistics for that artifact. The value of this property,
- * if present, is appended to the {@link #PROP_STATS_URI} to create the full URI
- * for reporting download statistics for that artifact.
- */
- private static final String PROP_DOWNLOAD_STATS = "download.stats"; //$NON-NLS-1$
-
- protected final IArtifactRepository target;
-
- private final Map<String, String> targetDescriptorProperties;
- private final Map<String, String> targetRepositoryProperties;
- protected IArtifactDescriptor descriptor;
-
- public MirrorRequest(IArtifactKey key, IArtifactRepository targetRepository, Map<String, String> targetDescriptorProperties, Map<String, String> targetRepositoryProperties) {
- super(key);
- target = targetRepository;
- if (targetDescriptorProperties == null || targetDescriptorProperties.isEmpty()) {
- this.targetDescriptorProperties = null;
- } else {
- this.targetDescriptorProperties = new HashMap<String, String>();
- this.targetDescriptorProperties.putAll(targetDescriptorProperties);
- }
-
- if (targetRepositoryProperties == null || targetRepositoryProperties.isEmpty()) {
- this.targetRepositoryProperties = null;
- } else {
- this.targetRepositoryProperties = new HashMap<String, String>();
- this.targetRepositoryProperties.putAll(targetRepositoryProperties);
- }
- }
-
- public void perform(IArtifactRepository sourceRepository, IProgressMonitor monitor) {
- monitor.subTask(NLS.bind(Messages.downloading, getArtifactKey().getId()));
- setSourceRepository(sourceRepository);
- // 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;
- }
-
- IArtifactDescriptor 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 IArtifactDescriptor 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...
- IArtifactDescriptor destinationDescriptor = target.createArtifactDescriptor(sourceDescriptor.getArtifactKey());
- // 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 instanceof ArtifactDescriptor)
- ((ArtifactDescriptor) destinationDescriptor).addProperties(targetDescriptorProperties);
- if (targetRepositoryProperties != null && destinationDescriptor instanceof SimpleArtifactDescriptor)
- ((SimpleArtifactDescriptor) 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);
- if (status.isOK())
- collectStats(sourceDescriptor, monitor);
- return status;
- }
-
- /**
- * Collect download statistics, if specified by the descriptor and the source repository
- */
- private void collectStats(IArtifactDescriptor sourceDescriptor, IProgressMonitor monitor) {
- final String statsProperty = sourceDescriptor.getProperty(PROP_DOWNLOAD_STATS);
- if (statsProperty == null)
- return;
- String statsRoot = sourceDescriptor.getRepository().getProperties().get(PROP_STATS_URI);
- if (statsRoot == null)
- return;
- URI statsURI;
- try {
- statsURI = URIUtil.append(new URI(statsRoot), statsProperty);
- } catch (URISyntaxException e) {
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Unable to report download statistics due to invalid URL: " + statsRoot + " suffix: " + statsProperty)); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- try {
- RepositoryTransport.getInstance().getLastModified(statsURI, monitor);
- } catch (FileNotFoundException e) {
- //ignore because it is expected that the statistics URI doesn't represent an existing file
- } catch (Exception e) {
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Failure reporting download statistics to URL: " + statsURI, e)); //$NON-NLS-1$
- }
- }
-
- 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 1fbd11df8..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorSelector.java
+++ /dev/null
@@ -1,365 +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.io.FileNotFoundException;
-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.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<MirrorInfo> {
- private static final long PRIMARY_FAILURE_LINGER_TIME = 30000; // Retry again after 30 seconds
- private static final long SECONDARY_FAILURE_LINGER_TIME = 300000; // Wait 5 minutes
- private static final int ACCEPTABLE_FILE_NOT_FOUND_COUNT = 5; // Given an established connection, those are generally quick
- private static final Timer resetFailure = new Timer("Mirror failure timer", true); //$NON-NLS-1$
-
- long bytesPerSecond;
- int failureCount;
- int fileNotFoundCount;
- int totalFailureCount;
- 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;
- totalFailureCount = 0;
- bytesPerSecond = DownloadStatus.UNKNOWN_RATE;
- }
-
- /**
- * Comparison used to sort mirrors.
- */
- public synchronized int compareTo(MirrorInfo that) {
- synchronized (that) {
- double rank = 0.0;
- if (bytesPerSecond != that.bytesPerSecond) {
- if (bytesPerSecond != DownloadStatus.UNKNOWN_RATE && that.bytesPerSecond != DownloadStatus.UNKNOWN_RATE) {
- if (bytesPerSecond > that.bytesPerSecond)
- rank -= (double) bytesPerSecond / (double) that.bytesPerSecond;
- else
- rank += (double) that.bytesPerSecond / (double) bytesPerSecond;
- }
- }
-
- //less failures is better
- if (failureCount != that.failureCount) {
- if (failureCount > that.failureCount)
- rank += ((double) (failureCount + 1) / (double) (that.failureCount + 1)) * 2.0;
- else
- rank -= ((double) (that.failureCount + 1) / (double) (failureCount + 1)) * 2.0;
- }
-
- if (rank == 0.0)
- //trust that initial rank indicates geographical proximity
- rank = initialRank - that.initialRank;
-
- if (rank == 0.0)
- return 0;
-
- int intRank;
- intRank = (int) rank;
- if (intRank == 0)
- intRank = rank > 0 ? 1 : -1;
- return intRank;
- }
- }
-
- public synchronized String toString() {
- return "Mirror(" + locationString + ',' + failureCount + ',' + bytesPerSecond + ')'; //$NON-NLS-1$
- }
-
- public synchronized void decrementFailureCount() {
- if (failureCount > 0)
- failureCount--;
- }
-
- public synchronized void incrementFailureCount() {
- ++failureCount;
- ++totalFailureCount;
- if (totalFailureCount < 3) {
- resetFailure.schedule(new TimerTask() {
- @Override
- public void run() {
- decrementFailureCount();
- }
- }, totalFailureCount == 1 ? PRIMARY_FAILURE_LINGER_TIME : SECONDARY_FAILURE_LINGER_TIME);
- }
- }
-
- public synchronized void setBytesPerSecond(long newValue) {
- // Any non-positive value is treated as an unknown rate
- if (newValue <= 0)
- newValue = DownloadStatus.UNKNOWN_RATE;
-
- if (newValue > 0)
- // Back in commission
- failureCount = 0;
- bytesPerSecond = newValue;
- }
-
- public synchronized void incrementFileNotFoundCount() {
- if (++fileNotFoundCount > ACCEPTABLE_FILE_NOT_FOUND_COUNT) {
- incrementFailureCount();
- fileNotFoundCount = 0;
- }
- }
- }
-
- /**
- * 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 = 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 = 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) {
- // Punishing a mirror harshly for a FileNotFoundException can be very wrong.
- // Some artifacts are not found on any mirror. When that's the case,
- // the best mirrors will be the first to receive that kind of punishment.
- //
- if (result.getException() instanceof FileNotFoundException)
- mirror.incrementFileNotFoundCount();
- else
- 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$
- 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 doesn't have multiple failures.
- if (mirrors == null || mirrors.length == 0)
- return false;
- Arrays.sort(mirrors);
- return mirrors[0].failureCount < 2;
- }
-
- /**
- * 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;
-
- MirrorInfo selected;
- if (mirrorCount == 1)
- selected = mirrors[0];
- else {
- Arrays.sort(mirrors);
- for (;;) {
- //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;
-
- int mirrorIndex = highestMirror - 1 - result;
- selected = mirrors[mirrorIndex];
-
- // If the ranking of the selected mirror is significantly worse then the top ranked
- // mirror, then we consider this a bad choice and reiterate.
- if (mirrorIndex == 0 || mirrors[0].compareTo(selected) < 4)
- // This is good enough
- break;
- }
- }
-
- //for now, don't tolerate mirrors with multiple failures
- if (selected.failureCount > 1)
- 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 740775e83..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/RawMirrorRequest.java
+++ /dev/null
@@ -1,79 +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.processing.ProcessingStep;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepHandler;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-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(IArtifactRepository sourceRepository, IProgressMonitor monitor) {
- monitor.subTask(NLS.bind(Messages.downloading, getArtifactKey().getId()));
- setSourceRepository(sourceRepository);
- // 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 2108b52f4..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<IStatus> allStatus = new ArrayList<IStatus>(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, 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 64bf98934..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/messages.properties
+++ /dev/null
@@ -1,54 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-artifact_not_found=Artifact not found: {0}.
-available_already_in=The artifact is already available in the repository {0}.
-no_location=No location for {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_childrenRepos = Messages while trying children repositories.
-
-exception_comparatorNotFound = The Artifact Comparator {0} was not found.
-exception_noComparators = No Artifact Comparators are available.
-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 bf6fed250..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/BlobStore.java
+++ /dev/null
@@ -1,127 +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.artifact.repository.simple;
-
-import java.io.*;
-import java.net.URI;
-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<byte[]> set) {
- for (byte[] blob : set)
- deleteBlob(blob);
- }
-
- 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 20373a7b6..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/DownloadJob.java
+++ /dev/null
@@ -1,77 +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.p2.repository.artifact.IArtifactRequest;
-
-public class DownloadJob extends Job {
- static final Object FAMILY = new Object();
-
- private LinkedList<IArtifactRequest> requestsPending;
- private SimpleArtifactRepository repository;
- private IProgressMonitor masterMonitor;
- private MultiStatus overallStatus;
-
- DownloadJob(String name) {
- super(name);
- setSystem(true);
- }
-
- void initialize(SimpleArtifactRepository repository, LinkedList<IArtifactRequest> 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 = 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(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/KeyIndex.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/KeyIndex.java
deleted file mode 100644
index 445543289..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/KeyIndex.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository.simple;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.p2.metadata.index.Index;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-
-/**
- * An index that maps id to IArtifactKey
- */
-public class KeyIndex extends Index<IArtifactKey> {
- // Memory conserving map. Stores either String -> IArtifactKey
- // or String -> IArtifactKey[]
- // A stored array is always length >= 2.
- private final Map<String, Object> artifactMap;
-
- public KeyIndex(Collection<IArtifactKey> artifactKeys) {
- artifactMap = new HashMap<String, Object>(artifactKeys.size());
- for (IArtifactKey ak : artifactKeys) {
- Object prev = artifactMap.put(ak.getId(), ak);
- if (prev != null) {
- if (prev instanceof IArtifactKey)
- artifactMap.put(ak.getId(), new IArtifactKey[] {(IArtifactKey) prev, ak});
- else {
- IArtifactKey[] prevArr = (IArtifactKey[]) prev;
- IArtifactKey[] nxtArr = new IArtifactKey[prevArr.length + 1];
- System.arraycopy(prevArr, 0, nxtArr, 0, prevArr.length);
- nxtArr[prevArr.length] = ak;
- artifactMap.put(ak.getId(), nxtArr);
- }
- }
- }
- }
-
- public Iterator<IArtifactKey> getCandidates(IEvaluationContext ctx, IExpression variable, IExpression booleanExpr) {
- Object queriedKeys = getQueriedIDs(ctx, variable, ArtifactKey.MEMBER_ID, booleanExpr, null);
- if (queriedKeys == null)
- return null;
-
- Collection<IArtifactKey> collector = null;
- if (queriedKeys.getClass().isArray()) {
- Object[] keyArr = (Object[]) queriedKeys;
- int idx = keyArr.length;
- while (--idx >= 0) {
- Object v = artifactMap.get(keyArr[idx]);
- if (v == null)
- continue;
- if (collector == null)
- collector = new ArrayList<IArtifactKey>();
- if (v instanceof IArtifactKey)
- collector.add((IArtifactKey) v);
- else {
- IArtifactKey[] akArr = (IArtifactKey[]) v;
- for (IArtifactKey ak : akArr)
- collector.add(ak);
- }
- }
- if (collector == null)
- collector = CollectionUtils.emptySet();
- } else {
- Object v = artifactMap.get(queriedKeys);
- if (v == null)
- collector = CollectionUtils.emptySet();
- else if (v instanceof IArtifactKey)
- collector = Collections.singleton((IArtifactKey) v);
- else
- collector = CollectionUtils.unmodifiableList((IArtifactKey[]) v);
- }
- return collector.iterator();
- }
-}
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 80b6b3e44..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, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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<String, Object> values = new Hashtable<String, Object>(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/SimpleArtifactDescriptor.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactDescriptor.java
deleted file mode 100644
index baa18869b..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactDescriptor.java
+++ /dev/null
@@ -1,80 +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.simple;
-
-import java.util.Map;
-import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-
-public class SimpleArtifactDescriptor extends ArtifactDescriptor {
- public static final String ARTIFACT_REFERENCE = "artifact.reference"; //$NON-NLS-1$
-
- protected Map<String, String> repositoryProperties = new OrderedProperties();
-
- public SimpleArtifactDescriptor(IArtifactKey key) {
- super(key);
- }
-
- public SimpleArtifactDescriptor(IArtifactDescriptor base) {
- super(base);
- }
-
- public String getRepositoryProperty(String propertyKey) {
- return 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<String, String> 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<String, String> getRepositoryProperties() {
- return OrderedProperties.unmodifiableProperties(repositoryProperties);
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null || !(obj instanceof SimpleArtifactDescriptor))
- return false;
-
- SimpleArtifactDescriptor other = (SimpleArtifactDescriptor) obj;
-
- //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;
-
- return super.equals(obj);
- }
-
- public int hashCode() {
- int superHash = super.hashCode();
- String ref = getRepositoryProperty(ARTIFACT_REFERENCE);
- if (ref != null)
- return 31 * superHash + ref.hashCode();
- return superHash;
- }
-}
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 1bb37ed04..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
+++ /dev/null
@@ -1,1079 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Genuitec, LLC - support for multi-threaded downloads
- * Cloudsmith Inc. - query indexes
- *******************************************************************************/
-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.Map.Entry;
-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.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.p2.metadata.expression.CompoundIterator;
-import org.eclipse.equinox.internal.p2.metadata.index.IndexProvider;
-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.processing.*;
-import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.AbstractArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.osgi.util.NLS;
-
-public class SimpleArtifactRepository extends AbstractArtifactRepository implements IFileArtifactRepository, IIndexProvider<IArtifactKey> {
- /**
- * 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<SimpleArtifactDescriptor> artifactDescriptors = new HashSet<SimpleArtifactDescriptor>();
- /**
- * Map<IArtifactKey,List<IArtifactDescriptor>> containing the index of artifacts in the repository.
- */
- private Map<IArtifactKey, List<IArtifactDescriptor>> artifactMap = new HashMap<IArtifactKey, List<IArtifactDescriptor>>();
- private transient BlobStore blobStore;
- transient private Mapper mapper = new Mapper();
- private KeyIndex keyIndex;
- private boolean snapshotNeeded = false;
-
- 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;
-
- private boolean disableSave = false;
-
- 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(IProvisioningAgent agent, String name, String type, String version, String description, String provider, Set<SimpleArtifactDescriptor> artifacts, String[][] mappingRules, Map<String, String> properties) {
- super(agent, name, type, version, null, description, provider, properties);
- this.artifactDescriptors.addAll(artifacts);
- this.mappingRules = mappingRules;
- for (SimpleArtifactDescriptor desc : artifactDescriptors)
- mapDescriptor(desc);
- }
-
- private synchronized void mapDescriptor(IArtifactDescriptor descriptor) {
- IArtifactKey key = descriptor.getArtifactKey();
- if (snapshotNeeded) {
- cloneAritfactMap();
- snapshotNeeded = false;
- }
- List<IArtifactDescriptor> descriptors = artifactMap.get(key);
- if (descriptors == null) {
- descriptors = new ArrayList<IArtifactDescriptor>();
- artifactMap.put(key, descriptors);
- }
- descriptors.add(descriptor);
- keyIndex = null;
- }
-
- private synchronized void unmapDescriptor(IArtifactDescriptor descriptor) {
- IArtifactKey key = descriptor.getArtifactKey();
- List<IArtifactDescriptor> descriptors = artifactMap.get(key);
- if (descriptors == null)
- return;
-
- if (snapshotNeeded) {
- cloneAritfactMap();
- snapshotNeeded = false;
- descriptors = artifactMap.get(key);
- }
- descriptors.remove(descriptor);
- if (descriptors.isEmpty())
- artifactMap.remove(key);
- keyIndex = null;
- }
-
- private void cloneAritfactMap() {
- HashMap<IArtifactKey, List<IArtifactDescriptor>> clone = new HashMap<IArtifactKey, List<IArtifactDescriptor>>(artifactMap.size());
- for (Entry<IArtifactKey, List<IArtifactDescriptor>> entry : artifactMap.entrySet())
- clone.put(entry.getKey(), new ArrayList<IArtifactDescriptor>(entry.getValue()));
- artifactMap = clone;
- }
-
- public SimpleArtifactRepository(IProvisioningAgent agent, String repositoryName, URI location, Map<String, String> properties) {
- super(agent, 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 = 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) {
- if (artifactDescriptors.contains(toAdd))
- return;
-
- SimpleArtifactDescriptor internalDescriptor = createInternalDescriptor(toAdd);
- artifactDescriptors.add(internalDescriptor);
- mapDescriptor(internalDescriptor);
- save();
- }
-
- public IArtifactDescriptor createArtifactDescriptor(IArtifactKey key) {
- return new SimpleArtifactDescriptor(key);
- }
-
- private SimpleArtifactDescriptor createInternalDescriptor(IArtifactDescriptor descriptor) {
- SimpleArtifactDescriptor internal = new SimpleArtifactDescriptor(descriptor);
-
- internal.setRepository(this);
- if (isFolderBased(descriptor))
- internal.setRepositoryProperty(ARTIFACT_FOLDER, Boolean.TRUE.toString());
-
- //clear out the UUID if we aren't using the blobstore.
- if (flatButPackedEnabled(descriptor) && internal.getProperty(ARTIFACT_UUID) != null) {
- internal.setProperty(ARTIFACT_UUID, null);
- }
-
- if (descriptor instanceof SimpleArtifactDescriptor) {
- Map<String, String> repoProperties = ((SimpleArtifactDescriptor) descriptor).getRepositoryProperties();
- for (Map.Entry<String, String> entry : repoProperties.entrySet()) {
- internal.setRepositoryProperty(entry.getKey(), entry.getValue());
- }
- }
- return internal;
- }
-
- public synchronized void addDescriptors(IArtifactDescriptor[] descriptors) {
- for (int i = 0; i < descriptors.length; i++) {
- if (artifactDescriptors.contains(descriptors[i]))
- continue;
- SimpleArtifactDescriptor internalDescriptor = createInternalDescriptor(descriptors[i]);
- artifactDescriptors.add(internalDescriptor);
- mapDescriptor(internalDescriptor);
- }
- save();
- }
-
- private synchronized OutputStream addPostSteps(ProcessingStepHandler handler, IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- ArrayList<ProcessingStep> steps = new ArrayList<ProcessingStep>();
- steps.add(new SignatureVerifier());
- if (steps.isEmpty())
- return destination;
- ProcessingStep[] stepArray = 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<ProcessingStep> steps = new ArrayList<ProcessingStep>();
- 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 = 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) {
- SimpleArtifactDescriptor simpleDescriptor = createInternalDescriptor(descriptor);
- return artifactDescriptors.contains(simpleDescriptor);
- }
-
- 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(getLocation(), 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) {
- SimpleArtifactDescriptor simple = null;
- if (descriptor instanceof SimpleArtifactDescriptor)
- simple = (SimpleArtifactDescriptor) descriptor;
- else
- simple = createInternalDescriptor(descriptor);
- if (simple.getRepositoryProperty(SimpleArtifactDescriptor.ARTIFACT_REFERENCE) == null) {
- File file = getArtifactFile(descriptor);
- if (file != null) {
- // If the file != null remove it, otherwise just remove
- // the descriptor
- 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, NLS.bind(Messages.no_location, 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);
- }
-
- @SuppressWarnings("rawtypes")
- 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(IArtifactRequest request, IProgressMonitor monitor) {
- request.perform(this, 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) {
- List<IArtifactDescriptor> result = artifactMap.get(key);
- if (result == null)
- return new IArtifactDescriptor[0];
-
- return 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 IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor) {
- final MultiStatus overallStatus = new MultiStatus(Activator.ID, IStatus.OK, null, null);
- LinkedList<IArtifactRequest> requestsPending = new LinkedList<IArtifactRequest>(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(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) {
- List<IArtifactDescriptor> descriptors = artifactMap.get(key);
- if (descriptors == null)
- return null;
-
- for (IArtifactDescriptor desc : descriptors) {
- // 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<SimpleArtifactDescriptor> 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)) && IArtifactDescriptor.FORMAT_PACKED.equals(descriptor.getProperty(IArtifactDescriptor.FORMAT));
- }
-
- /**
- * @see #flatButPackedEnabled(IArtifactDescriptor)
- */
- private URI getLocationForPackedButFlatArtifacts(IArtifactDescriptor descriptor) {
- IArtifactKey key = descriptor.getArtifactKey();
- return mapper.map(getLocation(), key.getClassifier(), key.getId(), key.getVersion().toString(), descriptor.getProperty(IArtifactDescriptor.FORMAT));
- }
-
- public synchronized URI getLocation(IArtifactDescriptor descriptor) {
- if (flatButPackedEnabled(descriptor)) {
- return getLocationForPackedButFlatArtifacts(descriptor);
- }
-
- // if the artifact has a uuid then use it
- String uuid = descriptor.getProperty(ARTIFACT_UUID);
- if (uuid != null)
- return blobStore.fileFor(bytesFromHexString(uuid));
-
- try {
- // if the artifact is just a reference then return the reference location
- if (descriptor instanceof SimpleArtifactDescriptor) {
- String artifactReference = ((SimpleArtifactDescriptor) descriptor).getRepositoryProperty(SimpleArtifactDescriptor.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(getLocation(), 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 = 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 = createInternalDescriptor(descriptor);
-
- // 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, NLS.bind(Messages.no_location, 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 repoLocation) {
- setLocation(repoLocation);
- blobStore = new BlobStore(getBlobStoreLocation(repoLocation), 128);
- initializeMapper();
- for (SimpleArtifactDescriptor desc : artifactDescriptors)
- desc.setRepository(this);
- }
-
- private synchronized void initializeMapper() {
- mapper = new Mapper();
- mapper.initialize(Activator.getContext(), mappingRules);
- }
-
- private boolean isFolderBased(IArtifactDescriptor descriptor) {
- // This is called from createInternalDescriptor, so if we aren't a
- // SimpleArtifactDescriptor then just check the descriptor properties instead
- // of creating the internal descriptor.
- SimpleArtifactDescriptor internalDescriptor = null;
- if (descriptor instanceof SimpleArtifactDescriptor)
- internalDescriptor = (SimpleArtifactDescriptor) descriptor;
- if (internalDescriptor != null) {
- String useArtifactFolder = internalDescriptor.getRepositoryProperty(ARTIFACT_FOLDER);
- if (useArtifactFolder != null)
- return Boolean.valueOf(useArtifactFolder).booleanValue();
- }
- 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(getLocation().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(getProvisioningAgent(), descriptor.getProcessingSteps(), descriptor, destination, monitor);
- destination = addPreSteps(handler, descriptor, destination, monitor);
- return destination;
- }
-
- public synchronized void removeAll() {
- IArtifactDescriptor[] toRemove = 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() {
- if (disableSave)
- return;
- boolean compress = "true".equalsIgnoreCase(getProperty(PROP_COMPRESSED)); //$NON-NLS-1$
- save(compress);
- }
-
- private void save(boolean compress) {
- assertModifiable();
- OutputStream os = null;
- try {
- try {
- URI actualLocation = getActualLocation(getLocation(), false);
- File artifactsFile = URIUtil.toFile(actualLocation);
- File jarFile = URIUtil.toFile(getActualLocation(getLocation(), 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(getProvisioningAgent()).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) getProvisioningAgent().getService(IArtifactRepositoryManager.SERVICE_NAME);
- if (manager.removeRepository(getLocation()))
- manager.addRepository(this);
- return oldValue;
- }
-
- public synchronized void setRules(String[][] rules) {
- mappingRules = rules;
- }
-
- public String toString() {
- return getLocation().toString();
- }
-
- public IQueryable<IArtifactDescriptor> descriptorQueryable() {
- return new IQueryable<IArtifactDescriptor>() {
- public IQueryResult<IArtifactDescriptor> query(IQuery<IArtifactDescriptor> query, IProgressMonitor monitor) {
- synchronized (SimpleArtifactRepository.this) {
- snapshotNeeded = true;
- Collection<List<IArtifactDescriptor>> descs = SimpleArtifactRepository.this.artifactMap.values();
- return query.perform(new CompoundIterator<IArtifactDescriptor>(descs.iterator()));
- }
- }
- };
- }
-
- public IQueryResult<IArtifactKey> query(IQuery<IArtifactKey> query, IProgressMonitor monitor) {
- return IndexProvider.query(this, query, monitor);
- }
-
- public synchronized Iterator<IArtifactKey> everything() {
- snapshotNeeded = true;
- return artifactMap.keySet().iterator();
- }
-
- public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
- IStatus result = null;
- synchronized (this) {
- try {
- disableSave = true;
- runnable.run(monitor);
- } catch (OperationCanceledException oce) {
- return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce);
- } catch (Throwable e) {
- result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
- } finally {
- disableSave = false;
- try {
- save();
- } catch (Exception e) {
- if (result != null)
- result = new MultiStatus(Activator.ID, IStatus.ERROR, new IStatus[] {result}, e.getMessage(), e);
- else
- result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
- }
- }
- }
- if (result == null)
- result = Status.OK_STATUS;
- return result;
- }
-
- public synchronized IIndex<IArtifactKey> getIndex(String memberName) {
- if (ArtifactKey.MEMBER_ID.equals(memberName)) {
- snapshotNeeded = true;
- if (keyIndex == null)
- keyIndex = new KeyIndex(artifactMap.keySet());
- return keyIndex;
- }
- return null;
- }
-
- public Object getManagedProperty(Object client, String memberName, Object key) {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryFactory.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryFactory.java
deleted file mode 100644
index d9cd59a79..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryFactory.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository.simple;
-
-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.core.helpers.Tracing;
-import org.eclipse.equinox.internal.p2.repository.RepositoryTransport;
-import org.eclipse.equinox.internal.p2.repository.Transport;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactRepositoryFactory;
-import org.eclipse.osgi.util.NLS;
-
-public class SimpleArtifactRepositoryFactory extends ArtifactRepositoryFactory {
- public SimpleArtifactRepositoryFactory() {
- super();
- }
-
- 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(getAgent());
- 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<String, String> properties) {
- return new SimpleArtifactRepository(getAgent(), name, location, 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/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 06df4e3e6..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java
+++ /dev/null
@@ -1,517 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.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.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-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 {
-
- private final IProvisioningAgent agent;
-
- public SimpleArtifactRepositoryIO(IProvisioningAgent agent) {
- this.agent = agent;
- }
-
- /**
- * 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 = Version.createOSGi(1, 0, 0);
- public static final Version CURRENT_VERSION = Version.createOSGi(1, 1, 0);
- public static final VersionRange XML_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, Version.createOSGi(2, 0, 0), false);
-
- // Constants for processing instructions
- public static final String PI_REPOSITORY_TARGET = "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<SimpleArtifactDescriptor> artifactDescriptors) {
- start(ARTIFACTS_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, artifactDescriptors.size());
- for (SimpleArtifactDescriptor descriptor : artifactDescriptors) {
- 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(IProcessingStepDescriptor[] 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<String, String> properties = (propertiesHandler == null ? new OrderedProperties(0) //
- : propertiesHandler.getProperties());
- Set<SimpleArtifactDescriptor> artifacts = (artifactsHandler == null ? new HashSet<SimpleArtifactDescriptor>(0) //
- : artifactsHandler.getArtifacts());
- repository = new SimpleArtifactRepository(agent, attrValues[0], attrValues[1], attrValues[2], attrValues[3], //
- attrValues[4], artifacts, mappingRules, properties);
- }
- }
- }
-
- protected class MappingRulesHandler extends AbstractHandler {
-
- private List<String[]> mappingRules;
-
- public MappingRulesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, MAPPING_RULES_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- mappingRules = (size != null ? new ArrayList<String[]>(new Integer(size).intValue()) : new ArrayList<String[]>(4));
- }
-
- public String[][] getMappingRules() {
- String[][] rules = new String[mappingRules.size()][2];
- for (int index = 0; index < mappingRules.size(); index++) {
- String[] ruleAttributes = 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<String[]> 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<SimpleArtifactDescriptor> artifacts;
-
- public ArtifactsHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, ARTIFACTS_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- artifacts = (size != null ? new LinkedHashSet<SimpleArtifactDescriptor>(new Integer(size).intValue()) : new LinkedHashSet<SimpleArtifactDescriptor>(4));
- }
-
- public Set<SimpleArtifactDescriptor> 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<SimpleArtifactDescriptor> artifacts;
- SimpleArtifactDescriptor currentArtifact = null;
-
- private PropertiesHandler propertiesHandler = null;
- private PropertiesHandler repositoryPropertiesHandler = null;
- private ProcessingStepsHandler processingStepsHandler = null;
-
- public ArtifactHandler(AbstractHandler parentHandler, Attributes attributes, Set<SimpleArtifactDescriptor> 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 SimpleArtifactDescriptor(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<String, String> properties = (propertiesHandler == null ? new OrderedProperties(0) : propertiesHandler.getProperties());
- currentArtifact.addProperties(properties);
-
- properties = (repositoryPropertiesHandler == null ? new OrderedProperties(0) : repositoryPropertiesHandler.getProperties());
- currentArtifact.addRepositoryProperties(properties);
-
- IProcessingStepDescriptor[] processingSteps = (processingStepsHandler == null ? new ProcessingStepDescriptor[0] //
- : processingStepsHandler.getProcessingSteps());
- currentArtifact.setProcessingSteps(processingSteps);
- artifacts.add(currentArtifact);
- }
- }
- }
-
- protected class ProcessingStepsHandler extends AbstractHandler {
-
- private List<IProcessingStepDescriptor> processingSteps;
-
- public ProcessingStepsHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, PROCESSING_STEPS_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- processingSteps = (size != null ? new ArrayList<IProcessingStepDescriptor>(new Integer(size).intValue()) : new ArrayList<IProcessingStepDescriptor>(4));
- }
-
- public IProcessingStepDescriptor[] getProcessingSteps() {
- return 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<IProcessingStepDescriptor> 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/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 c0e4858ec..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStep.java
+++ /dev/null
@@ -1,128 +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.repository.IStateful;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
-
-/**
- * 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(IProvisioningAgent agent, IProcessingStepDescriptor 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/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 e5530e937..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepHandler.java
+++ /dev/null
@@ -1,205 +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.repository.IStateful;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
-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;
- IProcessingStepDescriptor[] 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<IStatus> list = new ArrayList<IStatus>();
- int severity = collectStatus(stream, list);
- if (severity == IStatus.OK)
- return Status.OK_STATUS;
- IStatus[] result = 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<IStatus> list = new ArrayList<IStatus>();
- int severity = collectErrorStatus(stream, list);
- if (severity == IStatus.OK)
- return Status.OK_STATUS;
- IStatus[] result = 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<IStatus> 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<IStatus> 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(IProvisioningAgent agent, IProcessingStepDescriptor[] descriptors, IArtifactDescriptor context) {
- ProcessingStep[] result = new ProcessingStep[descriptors.length];
- for (int i = 0; i < descriptors.length; i++)
- result[i] = create(agent, descriptors[i], context);
- return result;
- }
-
- public ProcessingStep create(IProvisioningAgent agent, IProcessingStepDescriptor 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(agent, 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(IProvisioningAgent agent, IProcessingStepDescriptor[] descriptors, IArtifactDescriptor context, OutputStream output, IProgressMonitor monitor) {
- if (descriptors == null)
- return output;
- ProcessingStep[] steps = create(agent, 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.common/.project b/bundles/org.eclipse.equinox.p2.common/.project
deleted file mode 100644
index b2faed800..000000000
--- a/bundles/org.eclipse.equinox.p2.common/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.common</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.common/README.TXT b/bundles/org.eclipse.equinox.p2.common/README.TXT
deleted file mode 100644
index abb2b2faa..000000000
--- a/bundles/org.eclipse.equinox.p2.common/README.TXT
+++ /dev/null
@@ -1,2 +0,0 @@
-This bundle is obsolete. It was briefly introduced during p2 API development but was never
-released into HEAD stream. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.console/.classpath b/bundles/org.eclipse.equinox.p2.console/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.console/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.console/.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 f3c4905e1..000000000
--- a/bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,350 +0,0 @@
-#Fri Jan 22 13:20:25 EST 2010
-eclipse.preferences.version=1
-instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.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=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.launching.prefs b/bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.launching.prefs
deleted file mode 100644
index d5facb7c0..000000000
--- a/bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.launching.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Fri Jan 22 13:26:41 EST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index b61b6ad25..000000000
--- a/bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:57:44 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF
deleted file mode 100644
index bbbae5ece..000000000
--- a/bundles/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,28 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.console;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.console.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.console;x-friends:="org.eclipse.equinox.p2.director.app"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.planner;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.framework.console;version="1.0.0";resolution:=optional,
- org.eclipse.osgi.service.environment;version="1.0.0",
- org.osgi.framework;version="1.4.0",
- org.osgi.util.tracker;version="1.3.0"
-Bundle-ActivationPolicy: lazy
-Require-Bundle: org.eclipse.equinox.common;bundle-version="3.3.0"
diff --git a/bundles/org.eclipse.equinox.p2.console/Provisioning console.launch b/bundles/org.eclipse.equinox.p2.console/Provisioning console.launch
deleted file mode 100644
index b8541dcab..000000000
--- a/bundles/org.eclipse.equinox.p2.console/Provisioning console.launch
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Provisioning console"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-1.6.0-openjdk-1.6.0.0.x86_64"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog -noexit"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.osgi.services@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.common@2:true,org.eclipse.core.net@default:default,org.eclipse.equinox.security@default:default,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.core.contenttype@default:default,org.apache.commons.codec@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.app@default:default,org.eclipse.ecf@default:default,javax.servlet@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.apache.commons.logging@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.equinox.util@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.equinox.preferences@default:default,org.apache.commons.httpclient@default:default,org.eclipse.core.jobs@default:default,org.eclipse.osgi@-1:true,org.eclipse.equinox.registry@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.core.variables@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.p2.touchpoint.osgi@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:true,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.sat4j.pb@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.exemplarysetup@default:true,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.p2.artifact.optimizers@default:default,ie.wombat.jbdiff@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.sar@default:default,org.eclipse.equinox.p2.artifact.processors@default:default,org.eclipse.equinox.p2.console@default:true,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.sat4j.core@default:default,org.eclipse.equinox.simpleconfigurator@1:true"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.console/about.html b/bundles/org.eclipse.equinox.p2.console/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.console/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.console/build.properties b/bundles/org.eclipse.equinox.p2.console/build.properties
deleted file mode 100644
index 246ea6cb7..000000000
--- a/bundles/org.eclipse.equinox.p2.console/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
-src.includes = about.html
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.console/plugin.properties b/bundles/org.eclipse.equinox.p2.console/plugin.properties
deleted file mode 100644
index e06d37680..000000000
--- a/bundles/org.eclipse.equinox.p2.console/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Equinox Provisioning Console
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.console/pom.xml b/bundles/org.eclipse.equinox.p2.console/pom.xml
deleted file mode 100644
index bcbcc9567..000000000
--- a/bundles/org.eclipse.equinox.p2.console/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.console</artifactId>
- <version>1.0.100.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/Activator.java b/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/Activator.java
deleted file mode 100644
index 10304f9de..000000000
--- a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/Activator.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008, 2009, IBM Corporation and others. All rights reserved. This
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Composent, Inc. - additions
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.console;
-
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.osgi.framework.*;
-import org.osgi.util.tracker.ServiceTracker;
-import org.osgi.util.tracker.ServiceTrackerCustomizer;
-
-public class Activator implements BundleActivator, ServiceTrackerCustomizer {
- // 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 agentTracker;
- private ProvCommandProvider provider;
- private ServiceRegistration providerRegistration = null;
-
- public static BundleContext getContext() {
- return context;
- }
-
- public Activator() {
- super();
- }
-
- public void start(BundleContext ctxt) throws Exception {
- Activator.context = ctxt;
- boolean registerCommands = true;
- try {
- Class.forName(PROVIDER_NAME);
- } catch (ClassNotFoundException e) {
- registerCommands = false;
- }
-
- if (registerCommands) {
- agentTracker = new ServiceTracker(context, IProvisioningAgent.SERVICE_NAME, this);
- agentTracker.open();
- }
- }
-
- public void stop(BundleContext ctxt) throws Exception {
- agentTracker.close();
- if (providerRegistration != null)
- providerRegistration.unregister();
- providerRegistration = null;
- Activator.context = null;
- }
-
- public Object addingService(ServiceReference reference) {
- BundleContext ctxt = Activator.getContext();
- IProvisioningAgent agent = (IProvisioningAgent) ctxt.getService(reference);
- provider = new ProvCommandProvider(ctxt.getProperty("eclipse.p2.profile"), agent); //$NON-NLS-1$
- providerRegistration = ctxt.registerService(PROVIDER_NAME, provider, null);
- return agent;
- }
-
- public void modifiedService(ServiceReference reference, Object service) {
- // nothing
- }
-
- 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 3024d1185..000000000
--- a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java
+++ /dev/null
@@ -1,700 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Band XI - add more commands
- * Composent, Inc. - command additions
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.console;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.osgi.framework.console.CommandInterpreter;
-import org.eclipse.osgi.framework.console.CommandProvider;
-
-/**
- * An OSGi console command provider that adds various commands for interacting
- * with the provisioning system.
- */
-public class ProvCommandProvider implements CommandProvider {
- private static final String WILDCARD_ANY = "*"; //$NON-NLS-1$
- public static final String NEW_LINE = System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
-
- private final IProvisioningAgent agent;
-
- // private Profile profile;
-
- public ProvCommandProvider(String profileId, IProvisioningAgent agent) {
- this.agent = agent;
- // look up the profile we are currently running and use it as the
- // default.
- // TODO define a way to spec the default profile to manage
- // if (profileId != null) {
- // profile = registry.getProfile(profileId);
- // if (profile != null)
- // return;
- // }
- // // A default was not defined so manage the first profile we can find
- // Profile[] profiles = registry.getProfiles();
- // if (profiles.length > 0)
- // profile = profiles[0];
- }
-
- /**
- * Adds both a metadata repository and artifact repository
- */
- public void _provaddrepo(CommandInterpreter interpreter) {
- String urlString = interpreter.nextArgument();
- if (urlString == null) {
- interpreter.println("Repository location must be provided");
- return;
- }
- URI repoURI = toURI(interpreter, urlString);
- if (repoURI == null)
- return;
- // add metadata repo
- if (ProvisioningHelper.addMetadataRepository(agent, repoURI) == null) {
- interpreter.println("Unable to add metadata repository: " + repoURI);
- } else // add artifact repo at same URL
- if (ProvisioningHelper.addArtifactRepository(agent, repoURI) == null) {
- interpreter.println("Unable to add artifact repository: " + repoURI);
- }
- }
-
- public void _provdelrepo(CommandInterpreter interpreter) {
- String urlString = interpreter.nextArgument();
- if (urlString == null) {
- interpreter.println("Repository location must be provided");
- return;
- }
- URI repoURI = toURI(interpreter, urlString);
- if (repoURI == null)
- return;
- ProvisioningHelper.removeMetadataRepository(agent, repoURI);
- ProvisioningHelper.removeArtifactRepository(agent, repoURI);
- }
-
- /**
- * Adds a metadata repository.
- */
- public void _provaddmetadatarepo(CommandInterpreter interpreter) {
- String urlString = interpreter.nextArgument();
- if (urlString == null) {
- interpreter.println("Repository location must be provided");
- return;
- }
- URI repoURI = toURI(interpreter, urlString);
- if (repoURI == null)
- return;
- if (ProvisioningHelper.addMetadataRepository(agent, repoURI) == null)
- interpreter.println("Unable to add repository: " + repoURI);
- }
-
- public void _provdelmetadatarepo(CommandInterpreter interpreter) {
- String urlString = interpreter.nextArgument();
- if (urlString == null) {
- interpreter.println("Repository location must be provided");
- return;
- }
- URI repoURI = toURI(interpreter, urlString);
- if (repoURI == null)
- return;
- ProvisioningHelper.removeMetadataRepository(agent, repoURI);
- }
-
- public void _provaddartifactrepo(CommandInterpreter interpreter) {
- String urlString = interpreter.nextArgument();
- if (urlString == null) {
- interpreter.println("Repository location must be provided");
- return;
- }
- URI repoURI = toURI(interpreter, urlString);
- if (repoURI == null)
- return;
- if (ProvisioningHelper.addArtifactRepository(agent, repoURI) == null)
- interpreter.println("Unable to add repository " + repoURI);
- }
-
- public void _provdelartifactrepo(CommandInterpreter interpreter) {
- String urlString = interpreter.nextArgument();
- if (urlString == null) {
- interpreter.println("Repository location must be provided");
- return;
- }
- URI repoURI = toURI(interpreter, urlString);
- if (repoURI == null)
- return;
- ProvisioningHelper.removeArtifactRepository(agent, repoURI);
- }
-
- /**
- * Install a given IU to a given profile location.
- */
- public void _provinstall(CommandInterpreter interpreter) {
- String iu = interpreter.nextArgument();
- String version = interpreter.nextArgument();
- String profileId = interpreter.nextArgument();
- if (profileId == null || profileId.equals("this")) //$NON-NLS-1$
- profileId = IProfileRegistry.SELF;
- if (iu == null || version == null || profileId == null) {
- interpreter.println("Installable unit id, version, and profileid must be provided");
- return;
- }
- IStatus s = null;
- try {
- s = ProvisioningHelper.install(agent, iu, version, ProvisioningHelper.getProfile(agent, profileId), new NullProgressMonitor());
- } catch (ProvisionException e) {
- interpreter.println("Installation failed with ProvisionException for " + iu + " " + version);
- interpreter.printStackTrace(e);
- return;
- }
- if (s.isOK())
- interpreter.println("Installation complete for " + iu + " " + version);
- else {
- interpreter.println("Installation failed for " + iu + " " + version);
- interpreter.println(flattenStatus(s.getChildren(), " "));
- }
- }
-
- private String flattenStatus(IStatus[] childs, String indent) {
- StringBuffer sb = new StringBuffer();
-
- for (int i = 0; (childs != null) && (i < childs.length); i++) {
- sb.append(indent).append(childs[i].getMessage()).append(NEW_LINE);
- sb.append(flattenStatus(childs[i].getChildren(), indent + " "));
- }
- return sb.toString();
- }
-
- /**
- * Creates a profile given an id, location, and flavor
- */
- public void _provaddprofile(CommandInterpreter interpreter) {
- String profileId = interpreter.nextArgument();
- String location = interpreter.nextArgument();
- String flavor = interpreter.nextArgument();
- if (profileId == null || location == null || flavor == null) {
- interpreter.println("Id, location, and flavor must be provided");
- return;
- }
- String environments = interpreter.nextArgument();
- Map<String, String> props = new HashMap<String, String>();
- props.put(IProfile.PROP_INSTALL_FOLDER, location);
- if (environments != null)
- props.put(IProfile.PROP_ENVIRONMENTS, environments);
-
- try {
- ProvisioningHelper.addProfile(agent, profileId, props);
- } catch (ProvisionException e) {
- interpreter.println("Add profile failed. " + e.getMessage());
- interpreter.printStackTrace(e);
- }
- }
-
- /**
- * Deletes a profile given an id, location, and flavor
- */
- public void _provdelprofile(CommandInterpreter interpreter) {
- String profileId = interpreter.nextArgument();
- if (profileId == null) {
- interpreter.println("profileid must be provided");
- return;
- }
- ProvisioningHelper.removeProfile(agent, profileId);
- }
-
- /**
- * Lists the installable units that match the given URL, id, and/or version.
- *
- * @param interpreter
- */
- public void _provliu(CommandInterpreter interpreter) {
- String urlString = processArgument(interpreter.nextArgument());
- String id = processArgument(interpreter.nextArgument());
- String version = processArgument(interpreter.nextArgument());
- URI repoURL = null;
- if (urlString != null && !urlString.equals(WILDCARD_ANY))
- repoURL = toURI(interpreter, urlString);
- IInstallableUnit[] units = sort(ProvisioningHelper.getInstallableUnits(agent, repoURL, QueryUtil.createIUQuery(id, new VersionRange(version)), null));
- for (int i = 0; i < units.length; i++)
- println(interpreter, units[i]);
- }
-
- /**
- * Lists the installable units that match the given URL and query. A third
- * boolean argument can be provided where <code>true</code> means &quot;full query&quot;
- * and <code>false</code> means &quote;match query&quote;. The default is <code>false</code>.
- *
- * @param interpreter
- */
- public void _provlquery(CommandInterpreter interpreter) {
- String urlString = processArgument(interpreter.nextArgument());
- String expression = processArgument(interpreter.nextArgument());
- if (expression == null) {
- interpreter.println("Please enter a query");
- return;
- }
- boolean useFull = Boolean.valueOf(processArgument(interpreter.nextArgument())).booleanValue();
- URI repoURL = null;
- if (urlString != null && !urlString.equals(WILDCARD_ANY))
- repoURL = toURI(interpreter, urlString);
-
- IQuery<IInstallableUnit> query = useFull ? QueryUtil.createQuery(expression) : QueryUtil.createMatchQuery(expression);
- IInstallableUnit[] units = sort(ProvisioningHelper.getInstallableUnits(agent, repoURL, query, null));
- // Now print out results
- if (units.length == 0)
- interpreter.println("No units found");
- else {
- for (int i = 0; i < units.length; i++)
- println(interpreter, units[i]);
- }
- }
-
- /**
- * Lists the known metadata repositories, or the contents of a given
- * metadata repository.
- *
- * @param interpreter
- */
- public void _provlr(CommandInterpreter interpreter) {
- String urlString = processArgument(interpreter.nextArgument());
- String id = processArgument(interpreter.nextArgument());
- String version = processArgument(interpreter.nextArgument());
- if (urlString == null) {
- URI[] repositories = ProvisioningHelper.getMetadataRepositories(agent);
- if (repositories != null)
- for (int i = 0; i < repositories.length; i++)
- interpreter.println(repositories[i]);
- return;
- }
- URI repoLocation = toURI(interpreter, urlString);
- if (repoLocation == null)
- return;
- IInstallableUnit[] units = sort(ProvisioningHelper.getInstallableUnits(agent, repoLocation, QueryUtil.createIUQuery(id, new VersionRange(version)), null));
- for (int i = 0; i < units.length; i++)
- println(interpreter, units[i]);
- }
-
- /**
- * Lists the group IUs in all known metadata repositories, or in the given
- * metadata repository.
- *
- * @param interpreter
- */
- public void _provlg(CommandInterpreter interpreter) {
- String urlString = processArgument(interpreter.nextArgument());
- IQueryable<IInstallableUnit> queryable = null;
- if (urlString == null) {
- queryable = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (queryable == null)
- return;
- } else {
- URI repoURL = toURI(interpreter, urlString);
- if (repoURL == null)
- return;
- queryable = ProvisioningHelper.getMetadataRepository(agent, repoURL);
- if (queryable == null)
- return;
- }
- IInstallableUnit[] units = sort(queryable.query(QueryUtil.createIUGroupQuery(), null));
- for (int i = 0; i < units.length; i++)
- println(interpreter, units[i]);
- }
-
- /**
- * Lists the known artifact repositories, or the contents of a given
- * artifact repository.
- *
- * @param interpreter
- */
- public void _provlar(CommandInterpreter interpreter) {
- String urlString = processArgument(interpreter.nextArgument());
- if (urlString == null) {
- URI[] repositories = ProvisioningHelper.getArtifactRepositories(agent);
- if (repositories == null)
- return;
- for (int i = 0; i < repositories.length; i++)
- interpreter.println(repositories[i]);
- return;
- }
- URI repoURL = toURI(interpreter, urlString);
- if (repoURL == null)
- return;
- IArtifactRepository repo = ProvisioningHelper.getArtifactRepository(agent, repoURL);
- IQueryResult<IArtifactKey> keys = null;
- try {
- keys = (repo != null) ? repo.query(ArtifactKeyQuery.ALL_KEYS, null) : null;
- } catch (UnsupportedOperationException e) {
- interpreter.println("Repository does not support queries.");
- return;
- }
- if (keys == null || keys.isEmpty()) {
- interpreter.println("Repository has no artifacts");
- return;
- }
- IFileArtifactRepository fileRepo = (IFileArtifactRepository) repo.getAdapter(IFileArtifactRepository.class);
- for (Iterator<IArtifactKey> iterator = keys.iterator(); iterator.hasNext();) {
- IArtifactKey key = iterator.next();
- IArtifactDescriptor[] descriptors = repo.getArtifactDescriptors(key);
- for (int j = 0; j < descriptors.length; j++) {
- IArtifactDescriptor descriptor = descriptors[j];
- File location = null;
- if (fileRepo != null)
- location = fileRepo.getArtifactFile(descriptor);
- println(interpreter, key, location);
- }
-
- }
- }
-
- /**
- * Returns the given string as an URL, or <code>null</code> if the string
- * could not be interpreted as an URL.
- */
- private URI toURI(CommandInterpreter interpreter, String urlString) {
- try {
- return new URI(urlString);
- } catch (URISyntaxException e) {
- interpreter.print(e.getMessage());
- interpreter.println();
- return null;
- }
- }
-
- private String processArgument(String arg) {
- if (arg == null || arg.equals(WILDCARD_ANY))
- return null;
- return arg;
- }
-
- /**
- * Lists the known profiles, or the contents of a given profile.
- *
- * @param interpreter
- */
- public void _provlp(CommandInterpreter interpreter) {
- String profileId = processArgument(interpreter.nextArgument());
- String id = processArgument(interpreter.nextArgument());
- String range = processArgument(interpreter.nextArgument());
- if (profileId == null) {
- IProfile[] profiles = ProvisioningHelper.getProfiles(agent);
- for (int i = 0; i < profiles.length; i++)
- interpreter.println(profiles[i].getProfileId());
- return;
- }
- // determine which profile is to be listed
- IProfile target = null;
- if (profileId.equals("this")) //$NON-NLS-1$
- profileId = IProfileRegistry.SELF;
- target = ProvisioningHelper.getProfile(agent, profileId);
- if (target == null)
- return;
-
- // list the profile contents
- IInstallableUnit[] result = sort(target.query(QueryUtil.createIUQuery(id, new VersionRange(range)), null));
- for (int i = 0; i < result.length; i++)
- interpreter.println(result[i]);
- }
-
- /**
- * Lists the profile timestamps for a given profile id, if no profile id, the default profile
- * is used.
- *
- * @param interpreter
- */
- public void _provlpts(CommandInterpreter interpreter) {
- String profileId = processArgument(interpreter.nextArgument());
- if (profileId == null || profileId.equals("this")) { //$NON-NLS-1$
- profileId = IProfileRegistry.SELF;
- }
- long[] profileTimestamps = ProvisioningHelper.getProfileTimestamps(agent, profileId);
- // if no profile timestamps for given id, print that out and done
- if (profileTimestamps == null || profileTimestamps.length == 0) {
- interpreter.print("No timestamps found for profile ");
- interpreter.println(profileId);
- return;
- }
- // else if there are some timestamps then print them out on separate line
- interpreter.print("Timestamps for profile ");
- interpreter.println(profileId);
- for (int i = 0; i < profileTimestamps.length; i++) {
- interpreter.print("\t"); //$NON-NLS-1$
- interpreter.println(new Long(profileTimestamps[i]));
- }
- }
-
- /**
- * Revert a profile to a given timestamp
- */
- public void _provrevert(CommandInterpreter interpreter) {
- String timestamp = interpreter.nextArgument();
- if (timestamp == null) {
- interpreter.println("Valid timestamp must be provided. Timestamps can be retrieved via 'provlpts' command.");
- return;
- }
- Long ts = null;
- try {
- ts = new Long(timestamp);
- } catch (NumberFormatException e) {
- interpreter.println("Timestamp " + timestamp + " not valid. Timestamps can be retrieved via 'provlpts' command.");
- return;
- }
- String profileId = interpreter.nextArgument();
- if (profileId == null || profileId.equals("this"))
- profileId = IProfileRegistry.SELF;
-
- IProfile profile = ProvisioningHelper.getProfile(agent, profileId);
- if (profile == null) {
- interpreter.println("Profile " + profileId + " not found");
- return;
- }
- IStatus s = null;
- try {
- s = ProvisioningHelper.revertToPreviousState(agent, profile, ts.longValue());
- } catch (ProvisionException e) {
- interpreter.println("revert failed ");
- interpreter.printStackTrace(e);
- return;
- }
- if (s.isOK())
- interpreter.println("revert completed");
- else {
- interpreter.println("revert failed ");
- printErrorStatus(interpreter, s);
- }
- }
-
- private IInstallableUnit[] sort(IQueryResult<IInstallableUnit> queryResult) {
- IInstallableUnit[] units = queryResult.toArray(IInstallableUnit.class);
- Arrays.sort(units, new Comparator<IInstallableUnit>() {
- public int compare(IInstallableUnit arg0, IInstallableUnit arg1) {
- return arg0.toString().compareTo(arg1.toString());
- }
- });
- return units;
- }
-
- public void _provlgp(CommandInterpreter interpreter) {
- String profileId = processArgument(interpreter.nextArgument());
- if (profileId == null || profileId.equals("this")) {
- profileId = IProfileRegistry.SELF;
- }
- IProfile profile = ProvisioningHelper.getProfile(agent, profileId);
- if (profile == null) {
- interpreter.println("Profile " + profileId + " not found");
- return;
- }
- IInstallableUnit[] units = sort(profile.query(QueryUtil.createIUGroupQuery(), new NullProgressMonitor()));
- // Now print out results
- for (int i = 0; i < units.length; i++)
- println(interpreter, units[i]);
- }
-
- /**
- * Lists the installable units that match the given profile id and query. The id can be
- * &quot;this&quot; to denote the self profile. A third boolean argument can be provided
- * where <code>true</code> means &quot;full query&quot; and <code>false</code> means
- * &quote;match query&quote;. The default is <code>false</code>.
- *
- * @param interpreter
- */
- public void _provlpquery(CommandInterpreter interpreter) {
- String profileId = processArgument(interpreter.nextArgument());
- if (profileId == null || profileId.equals("this")) {
- profileId = IProfileRegistry.SELF;
- }
-
- String expression = processArgument(interpreter.nextArgument());
- if (expression == null) {
- interpreter.println("Please enter a query");
- return;
- }
-
- boolean useFull = Boolean.valueOf(processArgument(interpreter.nextArgument())).booleanValue();
- IQuery<IInstallableUnit> query = useFull ? QueryUtil.createQuery(expression) : QueryUtil.createMatchQuery(expression);
-
- IProfile profile = ProvisioningHelper.getProfile(agent, profileId);
- if (profile == null) {
- interpreter.println("Profile " + profileId + " not found");
- return;
- }
- IInstallableUnit[] units = sort(profile.query(query, new NullProgressMonitor()));
- // Now print out results
- if (units.length == 0)
- interpreter.println("No units found");
- else {
- for (int i = 0; i < units.length; i++)
- println(interpreter, units[i]);
- }
- }
-
- public void _provremove(CommandInterpreter interpreter) {
- String iu = interpreter.nextArgument();
- String version = interpreter.nextArgument();
- String profileId = interpreter.nextArgument();
- if (profileId == null || profileId.equals("this"))
- profileId = IProfileRegistry.SELF;
- if (version == null) {
- version = Version.emptyVersion.toString();
- }
- if (iu == null) {
- interpreter.println("Installable unit id must be provided");
- return;
- }
- IStatus s = null;
- try {
- s = ProvisioningHelper.uninstall(agent, iu, version, ProvisioningHelper.getProfile(agent, profileId), new NullProgressMonitor());
- } catch (ProvisionException e) {
- interpreter.println("Remove failed with ProvisionException for " + iu + " " + version);
- interpreter.printStackTrace(e);
- return;
- }
- if (s.isOK())
- interpreter.println("Remove complete for " + iu + " " + version);
- else {
- interpreter.println("Remove failed for " + iu + " " + version);
- printErrorStatus(interpreter, s);
- }
- }
-
- private void printErrorStatus(CommandInterpreter interpreter, IStatus status) {
- interpreter.print("--Error status ");
- interpreter.print("message=" + status.getMessage());
- interpreter.print(",code=" + status.getCode());
- String severityString = null;
- switch (status.getSeverity()) {
- case IStatus.INFO :
- severityString = "INFO";
- break;
- case IStatus.CANCEL :
- severityString = "CANCEL";
- break;
- case IStatus.WARNING :
- severityString = "WARNING";
- break;
- case IStatus.ERROR :
- severityString = "ERROR";
- break;
- }
- interpreter.print(",severity=" + severityString);
- interpreter.print(",bundle=" + status.getPlugin());
- interpreter.println("--");
- Throwable t = status.getException();
- if (t != null)
- interpreter.printStackTrace(t);
- IStatus[] children = status.getChildren();
- if (children != null && children.length > 0) {
- interpreter.println("Error status children:");
- for (int i = 0; i < children.length; i++) {
- printErrorStatus(interpreter, children[i]);
- }
- }
- interpreter.println("--End Error Status--");
- }
-
- public String getHelp() {
- StringBuffer help = new StringBuffer();
- help.append(NEW_LINE);
- help.append("---");
- help.append("P2 Provisioning Commands");
- help.append("---");
- help.append(NEW_LINE);
-
- help.append("---");
- help.append("Repository Commands");
- help.append("---");
- help.append(NEW_LINE);
- help.append("\tprovaddrepo <repository URI> - Adds a both a metadata and artifact repository at URI");
- help.append(NEW_LINE);
- help.append("\tprovdelrepo <repository URI> - Deletes a metadata and artifact repository at URI");
- help.append(NEW_LINE);
- help.append("\tprovaddmetadatarepo <repository URI> - Adds a metadata repository at URI");
- help.append(NEW_LINE);
- help.append("\tprovdelmetadatarepo <repository URI> - Deletes a metadata repository at URI");
- help.append(NEW_LINE);
- help.append("\tprovaddartifactrepo <repository URI> - Adds an artifact repository at URI");
- help.append(NEW_LINE);
- help.append("\tprovdelartifactrepo <repository URI> - Deletes an artifact repository URI");
- help.append(NEW_LINE);
- help.append("\tprovlg [<repository URI> <iu id | *> <version range | *>] - Lists all IUs with group capabilities in the given repo or in all repos if URI is omitted");
- help.append(NEW_LINE);
- help.append("\tprovlr [<repository URI> <iu id | *> <version range | *>] - Lists all metadata repositories, or the contents of a given metadata repository");
- help.append(NEW_LINE);
- help.append("\tprovlar [<repository URI>] - Lists all artifact repositories, or the contents of a given artifact repository");
- help.append(NEW_LINE);
- help.append("\tprovliu [<repository URI | *> <iu id | *> <version range | *>] - Lists the IUs that match the pattern in the given repo. * matches all");
- help.append(NEW_LINE);
- help.append("\tprovlquery <repository URI | *> <expression> [ true | false ] - Lists the IUs that match the query expression in the given repo. * matches all. The expression is expected to be a boolean match expression unless the third argument is true, in which case the expression is a full query");
- help.append(NEW_LINE);
-
- help.append("---");
- help.append("Profile Registry Commands");
- help.append("---");
- help.append(NEW_LINE);
-
- help.append("\tprovaddprofile <profileid> <location> <flavor> - Adds a profile with the given profileid, location and flavor");
- help.append(NEW_LINE);
- help.append("\tprovdelprofile <profileid> - Deletes a profile with the given profileid");
- help.append(NEW_LINE);
- help.append("\tprovlp [<profileid | *>] - Lists all profiles, or the contents of the profile at the given profile");
- help.append(NEW_LINE);
- help.append("\tprovlgp [<profileid>] - Lists all IUs with group capabilities in the given profile, or current profile if profileid is omitted");
- help.append(NEW_LINE);
- help.append("\tprovlpts [<profileid>] - Lists timestamps for given profile, or if no profileid given then the default profile timestamps are reported");
- help.append(NEW_LINE);
- help.append("\tprovlpquery <profileid | this> <expression> [ true | false ] - Lists the IUs that match the query expression in the given profile. The expression is expected to be a boolean match expression unless the third argument is true, in which case the expression is a full query");
- help.append(NEW_LINE);
-
- help.append("---");
- help.append("Install Commands");
- help.append("---");
- help.append(NEW_LINE);
-
- help.append("\tprovinstall <InstallableUnit> <version> <profileid> - installs an IU to the profileid. If no profileid is given, installs into default profile.");
- help.append(NEW_LINE);
- help.append("\tprovremove <InstallableUnit> <version> <profileid> - Removes an IU from the profileid. If no profileid is given, installs into default profile.");
- help.append(NEW_LINE);
- help.append("\tprovrevert <profileTimestamp> <profileid>] - Reverts to a given profileTimestamp for an optional profileId");
- help.append(NEW_LINE);
-
- return help.toString();
- }
-
- /**
- * Prints a string representation of an {@link IInstallableUnit} to the
- * iterpreter's output stream.
- */
- public void print(CommandInterpreter interpreter, IInstallableUnit unit) {
- interpreter.print(unit.getId() + ' ' + unit.getVersion());
- }
-
- /**
- * Prints a string representation of an {@link IInstallableUnit} to the
- * iterpreter's output stream, following by a line terminator
- */
- public void println(CommandInterpreter interpreter, IInstallableUnit unit) {
- print(interpreter, unit);
- interpreter.println();
- }
-
- private void println(CommandInterpreter interpreter, IArtifactKey artifactKey, File location) {
- interpreter.print(artifactKey.toString() + ' ' + location);
- interpreter.println();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java b/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java
deleted file mode 100644
index 883f58071..000000000
--- a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.console;
-
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.planner.IPlanner;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-
-public class ProvisioningHelper {
-
- static IMetadataRepository addMetadataRepository(IProvisioningAgent agent, URI location) {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager == null)
- throw new IllegalStateException("No metadata repository manager found");
- try {
- return manager.loadRepository(location, null);
- } catch (ProvisionException e) {
- //fall through and create a new repository
- }
-
- // for convenience create and add a repository here
- String repositoryName = location + " - metadata";
- try {
- return manager.createRepository(location, repositoryName, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
- } catch (ProvisionException e) {
- return null;
- }
- }
-
- static IMetadataRepository getMetadataRepository(IProvisioningAgent agent, URI location) {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager == null)
- throw new IllegalStateException("No metadata repository manager found");
- try {
- return manager.loadRepository(location, null);
- } catch (ProvisionException e) {
- return null;
- }
- }
-
- static void removeMetadataRepository(IProvisioningAgent agent, URI location) {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager == null)
- throw new IllegalStateException("No metadata repository manager found");
- manager.removeRepository(location);
- }
-
- static IArtifactRepository addArtifactRepository(IProvisioningAgent agent, URI location) {
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- if (manager == null)
- // TODO log here
- return null;
- try {
- return manager.loadRepository(location, null);
- } catch (ProvisionException e) {
- //fall through and create a new repository
- }
- // could not load a repo at that location so create one as a convenience
- String repositoryName = location + " - artifacts";
- try {
- return manager.createRepository(location, repositoryName, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
- } catch (ProvisionException e) {
- return null;
- }
- }
-
- static void removeArtifactRepository(IProvisioningAgent agent, URI location) {
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- if (manager == null)
- // TODO log here
- return;
- manager.removeRepository(location);
- }
-
- static IProfile addProfile(IProvisioningAgent agent, String profileId, Map<String, String> properties) throws ProvisionException {
- IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null)
- return null;
- IProfile profile = profileRegistry.getProfile(profileId);
- if (profile != null)
- return profile;
-
- Map<String, String> profileProperties = new HashMap<String, String>(properties);
- if (profileProperties.get(IProfile.PROP_ENVIRONMENTS) == null) {
- EnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName());
- if (info != null)
- profileProperties.put(IProfile.PROP_ENVIRONMENTS, "osgi.os=" + info.getOS() + ",osgi.ws=" + info.getWS() + ",osgi.arch=" + info.getOSArch()); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- else
- profileProperties.put(IProfile.PROP_ENVIRONMENTS, "");
- }
-
- return profileRegistry.addProfile(profileId, profileProperties);
- }
-
- static void removeProfile(IProvisioningAgent agent, String profileId) {
- IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null)
- return;
- profileRegistry.removeProfile(profileId);
- }
-
- static IProfile[] getProfiles(IProvisioningAgent agent) {
- IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null)
- return new IProfile[0];
- return profileRegistry.getProfiles();
- }
-
- static IProfile getProfile(IProvisioningAgent agent, String id) {
- IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null)
- return null;
- return profileRegistry.getProfile(id);
- }
-
- /**
- * Returns the installable units that match the given query
- * in the given metadata repository.
- *
- * @param location The location of the metadata repo to search. <code>null</code> indicates
- * search all known repos.
- * @param query The query to perform
- * @param monitor A progress monitor, or <code>null</code>
- * @return The IUs that match the query
- */
- static IQueryResult<IInstallableUnit> getInstallableUnits(IProvisioningAgent agent, URI location, IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- IQueryable<IInstallableUnit> queryable = null;
- if (location == null) {
- queryable = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- } else {
- queryable = getMetadataRepository(agent, location);
- }
- if (queryable != null)
- return queryable.query(query, monitor);
- return Collector.emptyCollector();
- }
-
- static URI[] getMetadataRepositories(IProvisioningAgent agent) {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager == null)
- // TODO log here
- return null;
- URI[] repos = manager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
- if (repos.length > 0)
- return repos;
- return null;
- }
-
- /**
- * Install the described IU
- */
- static IStatus install(IProvisioningAgent agent, String unitId, String version, IProfile profile, IProgressMonitor progress) throws ProvisionException {
- if (profile == null)
- return null;
- IQueryResult<IInstallableUnit> units = getInstallableUnits(agent, (URI) null, QueryUtil.createIUQuery(unitId, Version.create(version)), progress);
- if (units.isEmpty()) {
- StringBuffer error = new StringBuffer();
- error.append("Installable unit not found: " + unitId + ' ' + version + '\n');
- error.append("Repositories searched:\n");
- URI[] repos = getMetadataRepositories(agent);
- if (repos != null) {
- for (int i = 0; i < repos.length; i++)
- error.append(repos[i] + "\n");
- }
- throw new ProvisionException(error.toString());
- }
-
- IPlanner planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
- if (planner == null)
- throw new ProvisionException("No planner service found.");
-
- IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
- if (engine == null)
- throw new ProvisionException("No director service found.");
- ProvisioningContext context = new ProvisioningContext(agent);
- ProfileChangeRequest request = new ProfileChangeRequest(profile);
- request.addAll(units.toUnmodifiableSet());
- IProvisioningPlan result = planner.getProvisioningPlan(request, context, progress);
- return PlanExecutionHelper.executePlan(result, engine, context, progress);
- }
-
- static URI[] getArtifactRepositories(IProvisioningAgent agent) {
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- if (manager == null)
- // TODO log here
- return null;
- URI[] repos = manager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
- if (repos.length > 0)
- return repos;
- return null;
- }
-
- static IArtifactRepository getArtifactRepository(IProvisioningAgent agent, URI repoURL) {
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- try {
- if (manager != null)
- return manager.loadRepository(repoURL, null);
- } catch (ProvisionException e) {
- //for console, just ignore repositories that can't be read
- }
- return null;
- }
-
- static long[] getProfileTimestamps(IProvisioningAgent agent, String profileId) {
- if (profileId == null) {
- profileId = IProfileRegistry.SELF;
- }
- IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null)
- return null;
- return profileRegistry.listProfileTimestamps(profileId);
- }
-
- static IStatus revertToPreviousState(IProvisioningAgent agent, IProfile profile, long revertToPreviousState) throws ProvisionException {
- IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
- if (engine == null)
- throw new ProvisionException("No p2 engine found.");
- IPlanner planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
- if (planner == null)
- throw new ProvisionException("No planner found.");
- IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null)
- throw new ProvisionException("profile registry cannot be null");
- // If given profile is null, then get/use the self profile
- if (profile == null) {
- profile = getProfile(agent, IProfileRegistry.SELF);
- }
- IProfile targetProfile = null;
- if (revertToPreviousState == 0) {
- long[] profiles = profileRegistry.listProfileTimestamps(profile.getProfileId());
- if (profiles.length == 0)
- // Nothing to do, as the profile does not have any previous timestamps
- return Status.OK_STATUS;
- targetProfile = profileRegistry.getProfile(profile.getProfileId(), profiles[profiles.length - 1]);
- } else {
- targetProfile = profileRegistry.getProfile(profile.getProfileId(), revertToPreviousState);
- }
- if (targetProfile == null)
- throw new ProvisionException("target profile with timestamp=" + revertToPreviousState + " not found");
- URI[] artifactRepos = getArtifactRepositories(agent);
- URI[] metadataRepos = getMetadataRepositories(agent);
- IProvisioningPlan plan = planner.getDiffPlan(profile, targetProfile, new NullProgressMonitor());
- ProvisioningContext context = new ProvisioningContext(agent);
- context.setMetadataRepositories(metadataRepos);
- context.setArtifactRepositories(artifactRepos);
- return PlanExecutionHelper.executePlan(plan, engine, context, new NullProgressMonitor());
- }
-
- /**
- * Install the described IU
- */
- static IStatus uninstall(IProvisioningAgent agent, String unitId, String version, IProfile profile, IProgressMonitor progress) throws ProvisionException {
- if (profile == null)
- return null;
- IQueryResult<IInstallableUnit> units = profile.query(QueryUtil.createIUQuery(unitId, Version.create(version)), progress);
- if (units.isEmpty()) {
- StringBuffer error = new StringBuffer();
- error.append("Installable unit not found: " + unitId + ' ' + version + '\n');
- error.append("Repositories searched:\n");
- URI[] repos = getMetadataRepositories(agent);
- if (repos != null) {
- for (int i = 0; i < repos.length; i++)
- error.append(repos[i] + "\n"); //$NON-NLS-1$
- }
- throw new ProvisionException(error.toString());
- }
-
- IPlanner planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
- if (planner == null)
- throw new ProvisionException("No planner service found.");
-
- IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
- if (engine == null)
- throw new ProvisionException("No engine service found.");
- ProvisioningContext context = new ProvisioningContext(agent);
- ProfileChangeRequest request = new ProfileChangeRequest(profile);
- request.removeAll(units.toUnmodifiableSet());
- IProvisioningPlan result = planner.getProvisioningPlan(request, context, progress);
- return PlanExecutionHelper.executePlan(result, engine, context, progress);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/.cvsignore b/bundles/org.eclipse.equinox.p2.core/.cvsignore
new file mode 100644
index 000000000..eb5a316cb
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.core/.cvsignore
@@ -0,0 +1 @@
+target
diff --git a/bundles/org.eclipse.equinox.p2.core/.options b/bundles/org.eclipse.equinox.p2.core/.options
index 92221e798..7024adaa4 100644
--- a/bundles/org.eclipse.equinox.p2.core/.options
+++ b/bundles/org.eclipse.equinox.p2.core/.options
@@ -35,4 +35,10 @@ org.eclipse.equinox.p2.core/planner/projector=false
org.eclipse.equinox.p2.core/reconciler=false
#Detailed debugging information about the publisher
-org.eclipse.equinox.p2.core/publisher=false \ No newline at end of file
+org.eclipse.equinox.p2.core/publisher=false
+
+#Detailed debugging information about event clients
+org.eclipse.equinox.p2.core/events/client = false
+
+#Information about the use of the default provisioning UI
+org.eclipse.equinox.p2.core/ui/default = false \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF
index f38645299..b5f8fe5a6 100644
--- a/bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF
@@ -2,12 +2,12 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.equinox.p2.core;singleton:=true
-Bundle-Version: 2.0.0.qualifier
+Bundle-Version: 2.1.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.equinox.internal.p2.core.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.core;x-friends:="org.eclipse.equinox.p2.metadata.generator,org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.repository",
+Export-Package: org.eclipse.equinox.internal.p2.core;x-friends:="org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.repository",
org.eclipse.equinox.internal.p2.core.helpers;
x-friends:="org.eclipse.equinox.frameworkadmin.test,
org.eclipse.equinox.p2.artifact.optimizers,
@@ -23,10 +23,10 @@ Export-Package: org.eclipse.equinox.internal.p2.core;x-friends:="org.eclipse.equ
org.eclipse.equinox.p2.garbagecollector,
org.eclipse.equinox.p2.installer,
org.eclipse.equinox.p2.metadata,
- org.eclipse.equinox.p2.metadata.generator,
org.eclipse.equinox.p2.metadata.repository,
org.eclipse.equinox.p2.operations,
org.eclipse.equinox.p2.publisher,
+ org.eclipse.equinox.p2.publisher.eclipse,
org.eclipse.equinox.p2.ql,
org.eclipse.equinox.p2.reconciler.dropins,
org.eclipse.equinox.p2.repository,
@@ -48,7 +48,6 @@ Export-Package: org.eclipse.equinox.internal.p2.core;x-friends:="org.eclipse.equ
org.eclipse.equinox.p2.engine,
org.eclipse.equinox.p2.garbagecollector,
org.eclipse.equinox.p2.metadata,
- org.eclipse.equinox.p2.metadata.generator,
org.eclipse.equinox.p2.metadata.repository,
org.eclipse.equinox.p2.operations,
org.eclipse.equinox.p2.publisher,
@@ -56,6 +55,7 @@ Export-Package: org.eclipse.equinox.internal.p2.core;x-friends:="org.eclipse.equ
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.updatesite",
@@ -71,5 +71,5 @@ Import-Package: org.eclipse.osgi.framework.eventmgr;version="1.2.0",
org.eclipse.osgi.framework.log;version="1.0.0",
org.eclipse.osgi.service.debug;version="1.0.0",
org.eclipse.osgi.util;version="1.0.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.util.tracker;version="1.3.0"
+ org.osgi.framework;version="1.6.0",
+ org.osgi.util.tracker;version="1.5.0"
diff --git a/bundles/org.eclipse.equinox.p2.core/pom.xml b/bundles/org.eclipse.equinox.p2.core/pom.xml
index 037ea71af..1135dcf35 100644
--- a/bundles/org.eclipse.equinox.p2.core/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.core/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse</groupId>
<artifactId>org.eclipse.equinox.p2.core</artifactId>
- <version>2.0.0.qualifier</version>
+ <version>2.1.0.qualifier</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/Activator.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/Activator.java
index 8571bc6b4..bfa77c33d 100644
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/Activator.java
+++ b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/Activator.java
@@ -45,9 +45,9 @@ public class Activator implements BundleActivator {
private static final String VAR_USER_HOME = "@user.home"; //$NON-NLS-1$
private IProvisioningAgent agent;
- private ServiceRegistration agentLocationRegistration = null;
+ private ServiceRegistration<IAgentLocation> agentLocationRegistration = null;
- ServiceTracker logTracker;
+ ServiceTracker<FrameworkLog, FrameworkLog> logTracker;
/**
* NOTE: This method is copied from LocationHelper in org.eclipse.osgi
@@ -106,10 +106,10 @@ public class Activator implements BundleActivator {
Activator a = instance;
if (a == null)
return null;
- ServiceTracker tracker = a.getLogTracker();
+ ServiceTracker<FrameworkLog, FrameworkLog> tracker = a.getLogTracker();
if (tracker == null)
return null;
- return (FrameworkLog) tracker.getService();
+ return tracker.getService();
}
private static String substituteVar(String source, String var, String prop) {
@@ -147,13 +147,13 @@ public class Activator implements BundleActivator {
return result;
}
- private ServiceTracker getLogTracker() {
+ private ServiceTracker<FrameworkLog, FrameworkLog> getLogTracker() {
if (logTracker != null)
return logTracker;
//lazy init if the bundle has been started
if (context == null)
return null;
- logTracker = new ServiceTracker(context, FrameworkLog.class.getName(), null);
+ logTracker = new ServiceTracker<FrameworkLog, FrameworkLog>(context, FrameworkLog.class, null);
logTracker.open();
return logTracker;
}
@@ -167,10 +167,10 @@ public class Activator implements BundleActivator {
//no need to register an agent if there is no agent location
if (agentDataLocation == null)
return;
- ServiceReference agentProviderRef = context.getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);
+ ServiceReference<IProvisioningAgentProvider> agentProviderRef = context.getServiceReference(IProvisioningAgentProvider.class);
IProvisioningAgentProvider provider = null;
if (agentProviderRef != null)
- provider = (IProvisioningAgentProvider) context.getService(agentProviderRef);
+ provider = context.getService(agentProviderRef);
if (provider == null) {
// If we don't have a provider, which could happen if the p2.core bundle is
@@ -195,7 +195,7 @@ public class Activator implements BundleActivator {
Dictionary<String, Object> locationProperties = new Hashtable<String, Object>();
if (agentDataLocation != null) {
locationProperties.put("type", PROP_AGENT_DATA_AREA); //$NON-NLS-1$
- agentLocationRegistration = aContext.registerService(IAgentLocation.SERVICE_NAME, agentDataLocation, locationProperties);
+ agentLocationRegistration = aContext.registerService(IAgentLocation.class, agentDataLocation, locationProperties);
}
registerAgent();
}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/DefaultAgentProvider.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/DefaultAgentProvider.java
index 158e28177..3d0f4bc60 100644
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/DefaultAgentProvider.java
+++ b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/DefaultAgentProvider.java
@@ -39,7 +39,7 @@ public class DefaultAgentProvider implements IProvisioningAgentProvider {
properties.put(Constants.SERVICE_RANKING, new Integer(100));
properties.put(IProvisioningAgent.SERVICE_CURRENT, Boolean.TRUE.toString());
}
- ServiceRegistration reg = context.registerService(IProvisioningAgent.SERVICE_NAME, result, properties);
+ ServiceRegistration<IProvisioningAgent> reg = context.registerService(IProvisioningAgent.class, result, properties);
result.setServiceRegistration(reg);
return result;
}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningAgent.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningAgent.java
index 938e11f97..32a6a30ef 100644
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningAgent.java
+++ b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningAgent.java
@@ -23,13 +23,13 @@ import org.osgi.util.tracker.ServiceTrackerCustomizer;
/**
* Represents a p2 agent instance.
*/
-public class ProvisioningAgent implements IProvisioningAgent, ServiceTrackerCustomizer {
+public class ProvisioningAgent implements IProvisioningAgent, ServiceTrackerCustomizer<IAgentServiceFactory, Object> {
private final Map<String, Object> agentServices = Collections.synchronizedMap(new HashMap<String, Object>());
private BundleContext context;
- private boolean stopped = false;
- private ServiceRegistration reg;
- private final Map<ServiceReference, ServiceTracker> trackers = Collections.synchronizedMap(new HashMap<ServiceReference, ServiceTracker>());
+ private volatile boolean stopped = false;
+ private ServiceRegistration<IProvisioningAgent> reg;
+ private final Map<ServiceReference<IAgentServiceFactory>, ServiceTracker<IAgentServiceFactory, Object>> trackers = Collections.synchronizedMap(new HashMap<ServiceReference<IAgentServiceFactory>, ServiceTracker<IAgentServiceFactory, Object>>());
/**
* Instantiates a provisioning agent.
@@ -44,39 +44,43 @@ public class ProvisioningAgent implements IProvisioningAgent, ServiceTrackerCust
* @see org.eclipse.equinox.p2.core.IProvisioningAgent#getService(java.lang.String)
*/
public Object getService(String serviceName) {
- checkRunning();
- Object service = agentServices.get(serviceName);
- if (service != null)
+ //synchronize so concurrent gets always obtain the same service
+ synchronized (agentServices) {
+ checkRunning();
+ Object service = agentServices.get(serviceName);
+ if (service != null)
+ return service;
+ //attempt to get factory service from service registry
+ Collection<ServiceReference<IAgentServiceFactory>> refs;
+ try {
+ refs = context.getServiceReferences(IAgentServiceFactory.class, "(" + IAgentServiceFactory.PROP_CREATED_SERVICE_NAME + '=' + serviceName + ')'); //$NON-NLS-1$
+ } catch (InvalidSyntaxException e) {
+ e.printStackTrace();
+ return null;
+ }
+ if (refs == null || refs.isEmpty())
+ return null;
+ ServiceReference<IAgentServiceFactory> firstRef = refs.iterator().next();
+ //track the factory so that we can automatically remove the service when the factory goes away
+ ServiceTracker<IAgentServiceFactory, Object> tracker = new ServiceTracker<IAgentServiceFactory, Object>(context, firstRef, this);
+ tracker.open();
+ IAgentServiceFactory factory = (IAgentServiceFactory) tracker.getService();
+ if (factory == null) {
+ tracker.close();
+ return null;
+ }
+ service = factory.createService(this);
+ if (service == null) {
+ tracker.close();
+ return null;
+ }
+ registerService(serviceName, service);
+ trackers.put(firstRef, tracker);
return service;
- //attempt to get factory service from service registry
- ServiceReference[] refs;
- try {
- refs = context.getServiceReferences(IAgentServiceFactory.SERVICE_NAME, "(" + IAgentServiceFactory.PROP_CREATED_SERVICE_NAME + '=' + serviceName + ')'); //$NON-NLS-1$
- } catch (InvalidSyntaxException e) {
- e.printStackTrace();
- return null;
- }
- if (refs == null || refs.length == 0)
- return null;
- //track the factory so that we can automatically remove the service when the factory goes away
- ServiceTracker tracker = new ServiceTracker(context, refs[0], this);
- tracker.open();
- IAgentServiceFactory factory = (IAgentServiceFactory) tracker.getService();
- if (factory == null) {
- tracker.close();
- return null;
}
- service = factory.createService(this);
- if (service == null) {
- tracker.close();
- return null;
- }
- registerService(serviceName, service);
- trackers.put(refs[0], tracker);
- return service;
}
- private synchronized void checkRunning() {
+ private void checkRunning() {
if (stopped)
throw new IllegalStateException("Attempt to access stopped agent: " + this); //$NON-NLS-1$
}
@@ -96,9 +100,9 @@ public class ProvisioningAgent implements IProvisioningAgent, ServiceTrackerCust
//treat a null location as using the currently running platform
IAgentLocation agentLocation = null;
if (location == null) {
- ServiceReference ref = context.getServiceReference(IAgentLocation.SERVICE_NAME);
+ ServiceReference<IAgentLocation> ref = context.getServiceReference(IAgentLocation.class);
if (ref != null) {
- agentLocation = (IAgentLocation) context.getService(ref);
+ agentLocation = context.getService(ref);
context.ungetService(ref);
}
} else {
@@ -108,11 +112,9 @@ public class ProvisioningAgent implements IProvisioningAgent, ServiceTrackerCust
}
public void unregisterService(String serviceName, Object service) {
- synchronized (this) {
+ synchronized (agentServices) {
if (stopped)
return;
- }
- synchronized (agentServices) {
if (agentServices.get(serviceName) == service)
agentServices.remove(serviceName);
}
@@ -121,18 +123,20 @@ public class ProvisioningAgent implements IProvisioningAgent, ServiceTrackerCust
}
public void stop() {
+ List<Object> toStop;
+ synchronized (agentServices) {
+ toStop = new ArrayList<Object>(agentServices.values());
+ }
//give services a chance to do their own shutdown
- for (Object service : agentServices.values()) {
+ for (Object service : toStop) {
if (service instanceof IAgentService)
if (service != this)
((IAgentService) service).stop();
}
- synchronized (this) {
- stopped = true;
- }
+ stopped = true;
//close all service trackers
synchronized (trackers) {
- for (ServiceTracker t : trackers.values())
+ for (ServiceTracker<IAgentServiceFactory, Object> t : trackers.values())
t.close();
trackers.clear();
}
@@ -142,14 +146,14 @@ public class ProvisioningAgent implements IProvisioningAgent, ServiceTrackerCust
}
}
- public void setServiceRegistration(ServiceRegistration reg) {
+ public void setServiceRegistration(ServiceRegistration<IProvisioningAgent> reg) {
this.reg = reg;
}
/*(non-Javadoc)
* @see org.osgi.util.tracker.ServiceTrackerCustomizer#addingService(org.osgi.framework.ServiceReference)
*/
- public Object addingService(ServiceReference reference) {
+ public Object addingService(ServiceReference<IAgentServiceFactory> reference) {
if (stopped)
return null;
return context.getService(reference);
@@ -158,14 +162,14 @@ public class ProvisioningAgent implements IProvisioningAgent, ServiceTrackerCust
/*(non-Javadoc)
* @see org.osgi.util.tracker.ServiceTrackerCustomizer#modifiedService(org.osgi.framework.ServiceReference, java.lang.Object)
*/
- public void modifiedService(ServiceReference reference, Object service) {
+ public void modifiedService(ServiceReference<IAgentServiceFactory> reference, Object service) {
//nothing to do
}
/*(non-Javadoc)
* @see org.osgi.util.tracker.ServiceTrackerCustomizer#removedService(org.osgi.framework.ServiceReference, java.lang.Object)
*/
- public void removedService(ServiceReference reference, Object factoryService) {
+ public void removedService(ServiceReference<IAgentServiceFactory> reference, Object factoryService) {
if (stopped)
return;
String serviceName = (String) reference.getProperty(IAgentServiceFactory.PROP_CREATED_SERVICE_NAME);
@@ -177,7 +181,7 @@ public class ProvisioningAgent implements IProvisioningAgent, ServiceTrackerCust
if (FrameworkUtil.getBundle(registered.getClass()) == FrameworkUtil.getBundle(factoryService.getClass())) {
//the service we are holding is going away
unregisterService(serviceName, registered);
- ServiceTracker toRemove = trackers.remove(reference);
+ ServiceTracker<IAgentServiceFactory, Object> toRemove = trackers.remove(reference);
if (toRemove != null)
toRemove.close();
}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningEventBus.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningEventBus.java
index eff68815c..883b95243 100644
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningEventBus.java
+++ b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningEventBus.java
@@ -21,9 +21,9 @@ import org.eclipse.osgi.framework.eventmgr.*;
/**
* Default implementation of the {@link IProvisioningEventBus} service.
*/
-public class ProvisioningEventBus implements EventDispatcher, IProvisioningEventBus, IAgentService {
- private final CopyOnWriteIdentityMap syncListeners = new CopyOnWriteIdentityMap();
- private final CopyOnWriteIdentityMap asyncListeners = new CopyOnWriteIdentityMap();
+public class ProvisioningEventBus implements EventDispatcher<ProvisioningListener, ProvisioningListener, EventObject>, IProvisioningEventBus, IAgentService {
+ private final CopyOnWriteIdentityMap<ProvisioningListener, ProvisioningListener> syncListeners = new CopyOnWriteIdentityMap<ProvisioningListener, ProvisioningListener>();
+ private final CopyOnWriteIdentityMap<ProvisioningListener, ProvisioningListener> asyncListeners = new CopyOnWriteIdentityMap<ProvisioningListener, ProvisioningListener>();
private EventManager eventManager = new EventManager("Provisioning Event Dispatcher"); //$NON-NLS-1$
private Object dispatchEventLock = new Object();
@@ -75,7 +75,7 @@ public class ProvisioningEventBus implements EventDispatcher, IProvisioningEvent
return;
}
/* queue to hold set of listeners */
- ListenerQueue listeners = new ListenerQueue(eventManager);
+ ListenerQueue<ProvisioningListener, ProvisioningListener, EventObject> listeners = new ListenerQueue<ProvisioningListener, ProvisioningListener, EventObject>(eventManager);
/* synchronize while building the listener list */
synchronized (syncListeners) {
@@ -85,7 +85,7 @@ public class ProvisioningEventBus implements EventDispatcher, IProvisioningEvent
listeners.dispatchEventSynchronous(0, event);
}
- listeners = new ListenerQueue(eventManager);
+ listeners = new ListenerQueue<ProvisioningListener, ProvisioningListener, EventObject>(eventManager);
synchronized (asyncListeners) {
listeners.queueListeners(asyncListeners.entrySet(), this);
synchronized (dispatchEventLock) {
@@ -98,14 +98,14 @@ public class ProvisioningEventBus implements EventDispatcher, IProvisioningEvent
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus#dispatchEvent(java.lang.Object, java.lang.Object, int, java.lang.Object)
*/
- public void dispatchEvent(Object eventListener, Object listenerObject, int eventAction, Object eventObject) {
+ public void dispatchEvent(ProvisioningListener eventListener, ProvisioningListener listenerObject, int eventAction, EventObject eventObject) {
synchronized (dispatchEventLock) {
if (closed)
return;
dispatchingEvents++;
}
try {
- ((ProvisioningListener) eventListener).notify((EventObject) eventObject);
+ eventListener.notify(eventObject);
} catch (Exception e) {
LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Exception during event notification", e)); //$NON-NLS-1$
} finally {
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/StringPool.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/StringPool.java
deleted file mode 100644
index f7ff68cd6..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/StringPool.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core;
-
-import java.util.HashMap;
-
-/**
- * A string pool is used for sharing strings in a way that eliminates duplicate
- * equal strings. A string pool instance can be maintained over a long period
- * of time, or used as a temporary structure during a string sharing pass over
- * a data structure.
- * <p>
- * This class is not intended to be subclassed by clients.
- * </p>
- */
-public final class StringPool {
- private int savings;
- private final HashMap<String, String> map = new HashMap<String, String>();
-
- /**
- * Creates a new string pool.
- */
- public StringPool() {
- super();
- }
-
- /**
- * Adds a <code>String</code> to the pool. Returns a <code>String</code>
- * that is equal to the argument but that is unique within this pool.
- * @param string The string to add to the pool
- * @return A string that is equal to the argument.
- */
- public String add(String string) {
- if (string == null)
- return string;
- String result = map.get(string);
- if (result != null) {
- if (result != string)
- savings += 44 + 2 * string.length();
- return result;
- }
- //explicitly copy the string to trim excess baggage
- String trim = new String(string.toCharArray());
- map.put(string, trim);
- return trim;
- }
-
- /**
- * Returns an estimate of the size in bytes that was saved by sharing strings in
- * the pool. In particular, this returns the size of all strings that were added to the
- * pool after an equal string had already been added. This value can be used
- * to estimate the effectiveness of a string sharing operation, in order to
- * determine if or when it should be performed again.
- *
- * In some cases this does not precisely represent the number of bytes that
- * were saved. For example, say the pool already contains string S1. Now
- * string S2, which is equal to S1 but not identical, is added to the pool five
- * times. This method will return the size of string S2 multiplied by the
- * number of times it was added, even though the actual savings in this case
- * is only the size of a single copy of S2.
- */
- public int getSavedStringCount() {
- return savings;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/ServiceHelper.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/ServiceHelper.java
index e09fb6695..bf06f0c35 100644
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/ServiceHelper.java
+++ b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/ServiceHelper.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved. This
* program and the accompanying materials are made available under the terms of
* the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@@ -8,6 +8,7 @@
******************************************************************************/
package org.eclipse.equinox.internal.p2.core.helpers;
+import java.util.Collection;
import org.osgi.framework.*;
public class ServiceHelper {
@@ -17,13 +18,49 @@ public class ServiceHelper {
* system thinks the service is not in use but indeed the caller is about to use the returned
* service object.
* @param context
+ * @param clazz the service class
+ * @return The requested service
+ */
+ public static <T> T getService(BundleContext context, Class<T> clazz) {
+ if (context == null)
+ return null;
+ ServiceReference<T> reference = context.getServiceReference(clazz);
+ if (reference == null)
+ return null;
+ T result = context.getService(reference);
+ context.ungetService(reference);
+ return result;
+ }
+
+ public static <T> T getService(BundleContext context, Class<T> clazz, String filter) {
+ Collection<ServiceReference<T>> references;
+ try {
+ references = context.getServiceReferences(clazz, filter);
+ } catch (InvalidSyntaxException e) {
+ // TODO Auto-generated catch block
+ return null;
+ }
+ if (references.isEmpty())
+ return null;
+ final ServiceReference<T> ref = references.iterator().next();
+ T result = context.getService(ref);
+ context.ungetService(ref);
+ return result;
+ }
+
+ /**
+ * Returns the service described by the given arguments. Note that this is a helper class
+ * that <b>immediately</b> ungets the service reference. This results in a window where the
+ * system thinks the service is not in use but indeed the caller is about to use the returned
+ * service object.
+ * @param context
* @param name
* @return The requested service
*/
public static Object getService(BundleContext context, String name) {
if (context == null)
return null;
- ServiceReference reference = context.getServiceReference(name);
+ ServiceReference<?> reference = context.getServiceReference(name);
if (reference == null)
return null;
Object result = context.getService(reference);
@@ -32,7 +69,7 @@ public class ServiceHelper {
}
public static Object getService(BundleContext context, String name, String filter) {
- ServiceReference[] references;
+ ServiceReference<?>[] references;
try {
references = context.getServiceReferences(name, filter);
} catch (InvalidSyntaxException e) {
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/Tracing.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/Tracing.java
index ca929c56e..952e425a7 100644
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/Tracing.java
+++ b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/Tracing.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -35,12 +35,15 @@ public class Tracing {
public static boolean DEBUG_RECONCILER = false;
public static boolean DEBUG_REMOVE_REPO = false;
public static boolean DEBUG_UPDATE_CHECK = false;
+ public static boolean DEBUG_EVENTS_CLIENT = false;
+ public static boolean DEBUG_DEFAULT_UI = false;
static {
DebugOptions options = (DebugOptions) ServiceHelper.getService(Activator.context, DebugOptions.class.getName());
if (options != null) {
DEBUG = options.getBooleanOption(Activator.ID + "/debug", false); //$NON-NLS-1$
if (DEBUG) {
+ DEBUG_EVENTS_CLIENT = options.getBooleanOption(Activator.ID + "/events/client", false); //$NON-NLS-1$
DEBUG_GENERATOR_PARSING = options.getBooleanOption(Activator.ID + "/generator/parsing", false); //$NON-NLS-1$
DEBUG_INSTALL_REGISTRY = options.getBooleanOption(Activator.ID + "/engine/installregistry", false); //$NON-NLS-1$
DEBUG_METADATA_PARSING = options.getBooleanOption(Activator.ID + "/metadata/parsing", false); //$NON-NLS-1$
@@ -53,6 +56,7 @@ public class Tracing {
DEBUG_RECONCILER = options.getBooleanOption(Activator.ID + "/reconciler", false); //$NON-NLS-1$
DEBUG_REMOVE_REPO = options.getBooleanOption(Activator.ID + "/core/removeRepo", false); //$NON-NLS-1$
DEBUG_UPDATE_CHECK = options.getBooleanOption(Activator.ID + "/updatechecker", false); //$NON-NLS-1$
+ DEBUG_DEFAULT_UI = options.getBooleanOption(Activator.ID + "/ui/default", false); //$NON-NLS-1$
}
}
}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/eventbus/IProvisioningEventBus.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/eventbus/IProvisioningEventBus.java
index ee4d7d3e4..32b6d45cd 100644
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/eventbus/IProvisioningEventBus.java
+++ b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/eventbus/IProvisioningEventBus.java
@@ -17,7 +17,7 @@ import org.eclipse.osgi.framework.eventmgr.EventDispatcher;
* The bus for events related to provisioning. This service can be used to register
* a listener to receive provisioning events, or to broadcast events.
*/
-public interface IProvisioningEventBus extends EventDispatcher {
+public interface IProvisioningEventBus extends EventDispatcher<ProvisioningListener, ProvisioningListener, EventObject> {
/**
* The name used for obtaining a reference to the event bus service.
*/
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IPool.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IPool.java
new file mode 100644
index 000000000..849b41dea
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IPool.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.core;
+
+/**
+ * A Pool allows semantically equivalent objects to be shared. To be useful, objects added to the pool should implement
+ * a meaningful equals() method.
+ * <p>
+ * Care must be taken by users that object sharing is appropriate for their application. It is easy
+ * to "over share" objects leading to unexpected and difficult to debug behaviour.
+ * </p><p>
+ * This interface is not intended to be implemented by clients.
+ * </p>
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @since 2.1
+ */
+public interface IPool<T> {
+
+ /**
+ * Returns the first object from this pool which is equal to the given object. If the pool
+ * contains no such object then the object is added to the pool and returned. If the object is <code>null</code>,
+ * <code>null</code> is returned.
+ *
+ * @param newObject the object to add
+ * @return a shared object that is equal to the given object or <code>null</code>
+ */
+ public abstract T add(T newObject);
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/ProvisionException.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/ProvisionException.java
index af5b6786a..e88fe6307 100644
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/ProvisionException.java
+++ b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/ProvisionException.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -101,6 +101,13 @@ public class ProvisionException extends CoreException {
public static final int ARTIFACT_INCOMPLETE_SIZING = 1202;
/**
+ * Status code constant (value 1203) indicating an artifact's md5
+ * does not match the expected value.
+ * @since 2.1
+ */
+ public static final int ARTIFACT_MD5_NOT_MATCH = 1203;
+
+ /**
* Creates a new exception with the given status object. The message
* of the given status is used as the exception message.
*
@@ -131,4 +138,4 @@ public class ProvisionException extends CoreException {
super(new Status(IStatus.ERROR, Activator.ID, message, cause));
}
-}
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/StrongPool.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/StrongPool.java
new file mode 100644
index 000000000..d1780388b
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/StrongPool.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.core;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * An object pool backed by strong references. Objects stored in this pool
+ * will not be garbage collected as they refer to themselves. The client is responsible for
+ * nulling all references to the pool instance when it is no longer needed so that
+ * the contained objects can be garbage collected.
+ * <p>
+ * If a long lived, memory managed pool is required use {@link org.eclipse.equinox.p2.core.WeakPool}.
+ * </p>
+ * @since 2.1
+ */
+public class StrongPool<T> implements IPool<T> {
+ private Map<T, T> pool = new HashMap<T, T>();
+
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.p2.core.IPool#add(T)
+ */
+ public T add(T newObject) {
+ if (newObject == null) {
+ return null;
+ }
+
+ T reference = pool.get(newObject);
+ if (reference == null) {
+ pool.put(newObject, newObject);
+ return newObject;
+ }
+ return reference;
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/WeakPool.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/WeakPool.java
new file mode 100644
index 000000000..3f389fc75
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/WeakPool.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.core;
+
+import java.lang.ref.WeakReference;
+import java.util.Map;
+import java.util.WeakHashMap;
+
+/**
+ * An object pool backed by weak references. Objects stored in this pool
+ * will be garbage collected once all strong references to the objects are broken.
+ * <p>
+ * Since {@link WeakReference} are not particularly light-weight, a client could use a {@link StrongPool}
+ * if the pool will be short lived and explicitly nulled by the client.
+ * </p>
+ * @since 2.1
+ */
+public class WeakPool<T> implements IPool<T> {
+ private Map<T, WeakReference<T>> pool = new WeakHashMap<T, WeakReference<T>>();
+
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.p2.core.IPool#add(T)
+ */
+ public T add(T newObject) {
+ if (newObject == null) {
+ return null;
+ }
+
+ WeakReference<T> weakReference = pool.get(newObject);
+ if (weakReference != null) {
+ T reference = weakReference.get();
+ if (reference != null) {
+ return reference;
+ }
+ }
+ pool.put(newObject, new WeakReference<T>(newObject));
+ return newObject;
+ }
+}
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 14a07a3fd..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/.externalToolBuilders/Build Director Ant Tasks.launch
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1255396835944_5&quot; label=&quot;working set&quot; name=&quot;working set&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.equinox.p2.director.app&quot; type=&quot;4&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.director.app/scripts/buildExtraJAR.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.director.app"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="true"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.director.app/scripts/buildExtraJAR.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.director.app/.project b/bundles/org.eclipse.equinox.p2.director.app/.project
deleted file mode 100644
index cccb79f1a..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/.project
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.director.app</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value>&lt;project&gt;/.externalToolBuilders/Build Director Ant Tasks.launch</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f01b97a38..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,349 +0,0 @@
-#Fri Jan 22 13:29:43 EST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
-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=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.launching.prefs b/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.launching.prefs
deleted file mode 100644
index 233758b1b..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.launching.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Oct 07 15:35:11 EDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 7acf5447f..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,56 +0,0 @@
-#Fri Apr 24 11:01:31 EDT 2009
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.director.app/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.director.app/META-INF/MANIFEST.MF
deleted file mode 100644
index 0f930c12c..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-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.director.app;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.director.app.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.director.app;x-internal:=true
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.equinox.app,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.planner;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.framework.log,
- org.eclipse.osgi.service.environment,
- org.eclipse.osgi.util,
- org.osgi.framework,
- org.osgi.service.packageadmin
diff --git a/bundles/org.eclipse.equinox.p2.director.app/about.html b/bundles/org.eclipse.equinox.p2.director.app/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.director.app/build.properties b/bundles/org.eclipse.equinox.p2.director.app/build.properties
deleted file mode 100644
index d80a7ff0d..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/build.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-source.ant_tasks/director-ant.jar=src_ant/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- ant_tasks/director-ant.jar,\
- about.html,\
- plugin.properties
-src.includes = about.html
-jars.compile.order=.,ant_tasks/director-ant.jar
-extra.ant_tasks/director-ant.jar = platform:/plugin/org.apache.ant
-jars.extra.classpath = platform:/plugin/org.apache.ant/lib/ant.jar
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.director.app/config.ini b/bundles/org.eclipse.equinox.p2.director.app/config.ini
deleted file mode 100644
index fe0772359..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/config.ini
+++ /dev/null
@@ -1,87 +0,0 @@
-# Eclipse runtime configuration file
-# This file contains a number of key/value pairs that are merged into the
-# System properties on system startup. The values control the way the
-# runtime is structured and runs.
-
-# Note: Only platform:/base/ and file: URLs are supported. In general the
-# URLs given may include a version number (e.g., .../location_1.2.3).
-# If a version is not specified, the system binds
-# to the location which matches exactly or to the versioned location with the
-# latest version number. If a version number is given then only exact matches
-# are considered.
-
-# The URL for the runtime entry point. The default value is
-# platform:/base/plugins/org.eclipse.osgi
-#osgi.framework=platform:/base/plugins/org.eclipse.osgi
-
-# The classpath for the framework found at the osgi.framework location. This
-# comma-separated list contains either URLs or simple element names. Simple
-# names are assumed to be relative to the framework's install directory.
-# Typically this value need not be set as it is initialized by the framework itself.
-# Version match searching is not done for URLs listed here.
-#osgi.frameworkClassPath =
-
-# The comma-separated list of locations to search for the splash screen file (splash.bmp).
-# For each list element a subdirectory structure based on the pattern nl/<locale> is searched.
-# The system binds to the first matching file. There is no default value.
-#osgi.splashPath=
-
-# The location of the splash screen file. If this value is set at system startup it is used
-# in favour of the osgi.splashPath searching outlined above. If the value is not set
-# the searching is done and this key is bound to the result of the search.
-#osgi.splashLocation =
-
-# The comma-separated list of bundles which are automatically installed and optionally started
-# once the system is up and running. Each entry if of the form
-# <URL | simple bundle location>[@ [<startlevel>] [":start"]]
-# If the startlevel is omitted then the framework will use the default start level for the bundle.
-# If the "start" tag is added then the bundle will be marked as started after being installed.
-# Simple bundle locations are interepreted as relative to the framework's parent directory.
-# The startlevel indicates the OSGi start level at which the bundle should run.
-osgi.bundles=\
- org.eclipse.core.jobs,\
- org.eclipse.ecf,\
- org.eclipse.ecf.filetransfer,\
- org.eclipse.ecf.identity,\
- org.eclipse.ecf.provider.filetransfer,\
- org.eclipse.equinox.app@start,\
- org.eclipse.equinox.common,\
- org.eclipse.equinox.frameworkadmin,\
- org.eclipse.equinox.frameworkadmin.equinox@start,\
- org.eclipse.equinox.p2.artifact.repository,\
- org.eclipse.equinox.p2.console,\
- org.eclipse.equinox.p2.core,\
- org.eclipse.equinox.p2.director,\
- org.eclipse.equinox.p2.director.app,\
- org.eclipse.equinox.p2.download,\
- org.eclipse.equinox.p2.engine,\
- org.eclipse.equinox.p2.jarprocessor,\
- org.eclipse.equinox.p2.metadata,\
- org.eclipse.equinox.p2.metadata.repository,\
- org.eclipse.equinox.p2.operations,\
- org.eclipse.equinox.p2.touchpoint.eclipse,\
- org.eclipse.equinox.p2.touchpoint.natives,\
- org.eclipse.equinox.registry,\
- org.eclipse.equinox.simpleconfigurator,\
- org.eclipse.equinox.simpleconfigurator.manipulator@start,\
- org.eclipse.osgi.services,\
- org.sat4j.core,\
- org.sat4j.pb
-
-org.eclipse.update.reconcile=false
-
-# The product to run. A given Eclipse configuration may contain many products.
-# The product identified will supply the branding (window icons, title bar text) etc
-# as well as define the default application to run.
-#eclipse.product=
-
-# The application to run. The value specified here is the id of the application extension
-# the runtime will find, instantiate and execute once the system is up. Note that typically
-# the identified eclipse.product defines the default application to run.
-#eclipse.application=
-
-# The build identifier
-eclipse.buildId=@build@
-
-# End of file marker - must be here
-eof=eof \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.director.app/director app.launch b/bundles/org.eclipse.equinox.p2.director.app/director app.launch
deleted file mode 100644
index e2020f827..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/director app.launch
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/director app"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consoleLog -application org.eclipse.equinox.p2.director -installIU org.eclipse.e4.workbench.sdk -p2.os macosx -p2.ws cocoa -p2.arch x86 -roaming -profile SDKProfile -metadatarepository file:/Users/Pascal/tmp/paul/helios/,file:/Users/Pascal/tmp/paul/e4/ -destination /Users/Pascal/tmp/paul/install -bundlepool /Users/Pascal/tmp/paul/install"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Doff.eclipse.p2.data.area=file:/Application/eclipse/p2/&#10;-Doff.eclipse.p2.profile=SDKProfile"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.equinox.security@default:default,org.eclipse.core.runtime@default:true,org.eclipse.equinox.security.macosx@default:false,org.eclipse.osgi@-1:true,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.ant.core@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.equinox.common@2:true,org.eclipse.osgi.services@default:default,org.eclipse.equinox.app@default:default,org.eclipse.core.variables@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.core.jobs@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.simpleconfigurator@default:true,org.eclipse.equinox.p2.exemplarysetup@default:true,org.eclipse.equinox.simpleconfigurator.manipulator@default:true,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.p2.console@default:default,org.sat4j.pb@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:true,org.sat4j.core@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.director.app/director.product b/bundles/org.eclipse.equinox.p2.director.app/director.product
deleted file mode 100644
index 0fa6e99ca..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/director.product
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.1"?>
-
-<product name="Equinox Provisioning Director" id="org.eclipse.equinox.p2.director.app.product" application="org.eclipse.equinox.p2.director.app.application" useFeatures="true">
-
- <configIni use="custom" path="/org.eclipse.equinox.p2.director.app/config.ini"/>
-
- <launcherArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <launcher name="eclipse">
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- </plugins>
-
- <features>
- <feature id="org.eclipse.equinox.p2.director.feature" version="0.0.0"/>
- <feature id="org.eclipse.rcp" version="0.0.0"/>
- </features>
-
-</product>
diff --git a/bundles/org.eclipse.equinox.p2.director.app/plugin.properties b/bundles/org.eclipse.equinox.p2.director.app/plugin.properties
deleted file mode 100644
index 3e0d50f9b..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Equinox Provisioning Director Application
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.director.app/plugin.xml b/bundles/org.eclipse.equinox.p2.director.app/plugin.xml
deleted file mode 100644
index 6d9af373f..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/plugin.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension id="application" point="org.eclipse.core.runtime.applications">
- <application>
- <run class="org.eclipse.equinox.internal.p2.director.app.Application"/>
- </application>
- </extension>
- <extension id="org.eclipse.equinox.p2.director" point="org.eclipse.core.runtime.applications">
- <application
- cardinality="singleton-global"
- thread="main"
- visible="true">
- <run class="org.eclipse.equinox.internal.p2.director.app.DirectorApplication"/>
- </application>
- </extension>
- <extension id="product" point="org.eclipse.core.runtime.products">
- <product application="org.eclipse.equinox.p2.director.app.application" name="Equinox Provisioning Director" />
- </extension>
- <extension id="org.eclipse.equinox.p2.director.product" point="org.eclipse.core.runtime.products">
- <product application="org.eclipse.equinox.p2.director" name="Equinox P2 Director" />
- </extension>
- <extension point="org.eclipse.ant.core.extraClasspathEntries">
- <extraClasspathEntry library="ant_tasks/director-ant.jar"/>
- </extension>
- <extension point="org.eclipse.ant.core.antTasks">
- <antTask
- library="ant_tasks/director-ant.jar"
- name="p2.director"
- class="org.eclipse.equinox.p2.director.app.ant.DirectorTask">
- </antTask>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.director.app/pom.xml b/bundles/org.eclipse.equinox.p2.director.app/pom.xml
deleted file mode 100644
index 4451f7ce6..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.director.app</artifactId>
- <version>1.0.200.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.director.app/scripts/buildExtraJAR.xml b/bundles/org.eclipse.equinox.p2.director.app/scripts/buildExtraJAR.xml
deleted file mode 100644
index 1582323b9..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/scripts/buildExtraJAR.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="org.eclipse.equinox.p2.director.app" default="default" basedir="..">
-
- <target name="default" description="Jar up the binaries that were compiled by the jdt builder" >
- <mkdir dir="${basedir}/ant_tasks" />
- <delete file="${basedir}/ant_tasks/director-ant.jar" failonerror="false"/>
- <jar destfile="${basedir}/ant_tasks/director-ant.jar" basedir="${basedir}/bin_ant"/>
- </target>
-
-</project> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Activator.java b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Activator.java
deleted file mode 100644
index de0403a9a..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Activator.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.director.app;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
- public static final String ID = "org.eclipse.equinox.p2.director.app"; //$NON-NLS-1$
- private static BundleContext bundleContext;
-
- public static BundleContext getContext() {
- return bundleContext;
- }
-
- public void start(BundleContext context) throws Exception {
- bundleContext = context;
- }
-
- public void stop(BundleContext context) throws Exception {
- bundleContext = null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java
deleted file mode 100644
index 2a16dccbe..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java
+++ /dev/null
@@ -1,660 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Cloudsmith - https://bugs.eclipse.org/bugs/show_bug.cgi?id=226401
- * EclipseSource - ongoing development
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.director.app;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.p2.core.*;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.planner.IPlanner;
-import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.osgi.framework.log.FrameworkLog;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.ServiceReference;
-
-/**
- * This is the original p2 director application created for the p2 1.0 release. There
- * is a replacement application in {@link DirectorApplication} that should be preferred
- * over this implementation where possible. This implementation remains for backwards
- * compatibility purposes.
- * @deprecated
- */
-public class Application implements IApplication {
- private static final Integer EXIT_ERROR = new Integer(13);
- static private final String ANT_PROPERTY_PREFIX = "${"; //$NON-NLS-1$
- static private final String FLAVOR_DEFAULT = "tooling"; //$NON-NLS-1$
-
- public static final int COMMAND_INSTALL = 0;
- public static final int COMMAND_UNINSTALL = 1;
- public static final int COMMAND_LIST = 2;
-
- public static final String[] COMMAND_NAMES = {"-installIU", "-uninstallIU", "-list"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- private Path destination;
-
- private URI[] artifactRepositoryLocations;
- private URI[] metadataRepositoryLocations;
-
- private URI[] metadataReposForRemoval;
- private URI[] artifactReposForRemoval;
- private IArtifactRepositoryManager artifactManager;
- private IMetadataRepositoryManager metadataManager;
-
- private String root;
- private Version version = null;
- private String flavor;
- private String profileId;
- private String profileProperties; // a comma-separated list of property pairs "tag=value"
- private String bundlePool = null;
- private String nl;
- private String os;
- private String arch;
- private String ws;
- private boolean roamingProfile = false;
- private IPlanner planner;
- private IEngine engine;
- private boolean noProfileId = false;
-
- private int command = -1;
- protected IProvisioningAgent agent;
-
- private void ambigousCommand(int cmd1, int cmd2) throws CoreException {
- throw new CoreException(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Ambigous_Command, new Object[] {COMMAND_NAMES[cmd1], COMMAND_NAMES[cmd2]})));
- }
-
- private ProfileChangeRequest buildProvisioningRequest(IProfile profile, IQueryResult<IInstallableUnit> roots, boolean install) {
- ProfileChangeRequest request = new ProfileChangeRequest(profile);
- markRoots(request, roots);
- if (install) {
- request.addAll(roots.toUnmodifiableSet());
- } else {
- request.removeAll(roots.toUnmodifiableSet());
- }
- return request;
- }
-
- /*
- * Copied from ProvisioningHelper 1.57
- */
- static IProfile addProfile(IProvisioningAgent agent, String profileId, Map<String, String> properties) throws ProvisionException {
- IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null)
- return null;
- IProfile profile = profileRegistry.getProfile(profileId);
- if (profile != null)
- return profile;
-
- Map<String, String> profileProperties = new HashMap<String, String>(properties);
- if (profileProperties.get(IProfile.PROP_ENVIRONMENTS) == null) {
- EnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName());
- if (info != null)
- profileProperties.put(IProfile.PROP_ENVIRONMENTS, "osgi.os=" + info.getOS() + ",osgi.ws=" + info.getWS() + ",osgi.arch=" + info.getOSArch()); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- else
- profileProperties.put(IProfile.PROP_ENVIRONMENTS, ""); //$NON-NLS-1$
- }
- return profileRegistry.addProfile(profileId, profileProperties);
- }
-
- /*
- * Copied from ProvisioningHelper 1.57
- */
- static IProfile getProfile(IProvisioningAgent agent, String id) {
- IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null)
- return null;
- return profileRegistry.getProfile(id);
- }
-
- /*
- * Copied from ProvisioningHelper 1.57
- */
- static IMetadataRepository getMetadataRepository(IProvisioningAgent agent, URI location) {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager == null)
- throw new IllegalStateException("No metadata repository manager found"); //$NON-NLS-1$
- try {
- return manager.loadRepository(location, null);
- } catch (ProvisionException e) {
- return null;
- }
- }
-
- /*
- * Copied from ProvisioningHelper 1.57
- */
- static IQueryResult<IInstallableUnit> getInstallableUnits(IProvisioningAgent agent, URI location, IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- IQueryable<IInstallableUnit> queryable = null;
- if (location == null) {
- queryable = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- } else {
- queryable = getMetadataRepository(agent, location);
- }
- if (queryable != null)
- return queryable.query(query, monitor);
- return Collector.emptyCollector();
- }
-
- private String getEnvironmentProperty() {
- Map<String, String> values = new HashMap<String, String>();
- if (os != null)
- values.put("osgi.os", os); //$NON-NLS-1$
- if (nl != null)
- values.put("osgi.nl", nl); //$NON-NLS-1$
- if (ws != null)
- values.put("osgi.ws", ws); //$NON-NLS-1$
- if (arch != null)
- values.put("osgi.arch", arch); //$NON-NLS-1$
- if (values.isEmpty())
- return null;
- return toString(values);
- }
-
- private IProfile initializeProfile() throws CoreException {
- if (profileId == null) {
- profileId = IProfileRegistry.SELF;
- noProfileId = true;
- }
- IProfile profile = getProfile(agent, profileId);
- if (profile == null) {
- if (destination == null)
- missingArgument("destination"); //$NON-NLS-1$
- if (flavor == null)
- flavor = System.getProperty("eclipse.p2.configurationFlavor", FLAVOR_DEFAULT); //$NON-NLS-1$
-
- Map<String, String> props = new HashMap<String, String>();
- props.put(IProfile.PROP_INSTALL_FOLDER, destination.toOSString());
- if (bundlePool == null || bundlePool.equals(Messages.destination_commandline))
- props.put(IProfile.PROP_CACHE, destination.toOSString());
- else
- props.put(IProfile.PROP_CACHE, bundlePool);
- if (roamingProfile)
- props.put(IProfile.PROP_ROAMING, Boolean.TRUE.toString());
-
- String env = getEnvironmentProperty();
- if (env != null)
- props.put(IProfile.PROP_ENVIRONMENTS, env);
- if (profileProperties != null) {
- putProperties(profileProperties, props);
- }
- profile = addProfile(agent, profileId, props);
- }
- return profile;
- }
-
- private void initializeRepositories(boolean throwException) throws CoreException {
- if (artifactRepositoryLocations == null) {
- if (throwException)
- missingArgument("artifactRepository"); //$NON-NLS-1$
- } else {
- artifactManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- if (artifactManager == null) {
- if (throwException)
- throw new ProvisionException(Messages.Application_NoManager);
- } else {
- int removalIdx = 0;
- boolean anyValid = false; // do we have any valid repos or did they all fail to load?
- artifactReposForRemoval = new URI[artifactRepositoryLocations.length];
- for (int i = 0; i < artifactRepositoryLocations.length; i++) {
- try {
- if (!artifactManager.contains(artifactRepositoryLocations[i])) {
- artifactManager.loadRepository(artifactRepositoryLocations[i], null);
- artifactReposForRemoval[removalIdx++] = artifactRepositoryLocations[i];
- }
- anyValid = true;
- } catch (ProvisionException e) {
- //one of the repositories did not load
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, artifactRepositoryLocations[i].toString() + " failed to load", e)); //$NON-NLS-1$
- }
- }
- if (throwException && !anyValid)
- //all repositories failed to load
- throw new ProvisionException(Messages.Application_NoRepositories);
- }
- }
-
- if (metadataRepositoryLocations == null) {
- if (throwException)
- missingArgument("metadataRepository"); //$NON-NLS-1$
- } else {
- metadataManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (metadataManager == null) {
- if (throwException)
- throw new ProvisionException(Messages.Application_NoManager);
- } else {
- int removalIdx = 0;
- boolean anyValid = false; // do we have any valid repos or did they all fail to load?
- metadataReposForRemoval = new URI[metadataRepositoryLocations.length];
- for (int i = 0; i < metadataRepositoryLocations.length; i++) {
- try {
- if (!metadataManager.contains(metadataRepositoryLocations[i])) {
- metadataManager.loadRepository(metadataRepositoryLocations[i], null);
- metadataReposForRemoval[removalIdx++] = metadataRepositoryLocations[i];
- }
- anyValid = true;
- } catch (ProvisionException e) {
- //one of the repositories did not load
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, metadataRepositoryLocations[i].toString() + " failed to load", e)); //$NON-NLS-1$
- }
- }
- if (throwException && !anyValid)
- //all repositories failed to load
- throw new ProvisionException(Messages.Application_NoRepositories);
- }
- }
- }
-
- private void initializeServices() throws ProvisionException {
- ServiceReference agentProviderRef = Activator.getContext().getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);
- IProvisioningAgentProvider provider = (IProvisioningAgentProvider) Activator.getContext().getService(agentProviderRef);
- agent = provider.createAgent(null);
-
- IDirector director = (IDirector) agent.getService(IDirector.SERVICE_NAME);
- if (director == null)
- throw new RuntimeException(Messages.Missing_director);
-
- planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
- if (planner == null)
- throw new RuntimeException(Messages.Missing_planner);
-
- engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
- if (engine == null)
- throw new RuntimeException(Messages.Missing_Engine);
- }
-
- private void markRoots(IProfileChangeRequest request, IQueryResult<IInstallableUnit> roots) {
- for (Iterator<IInstallableUnit> iterator = roots.iterator(); iterator.hasNext();) {
- request.setInstallableUnitProfileProperty(iterator.next(), IProfile.PROP_PROFILE_ROOT_IU, Boolean.TRUE.toString());
- }
- }
-
- private void missingArgument(String argumentName) throws CoreException {
- throw new CoreException(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Missing_Required_Argument, argumentName)));
- }
-
- private IStatus planAndExecute(IProfile profile, ProvisioningContext context, ProfileChangeRequest request) {
- IProvisioningPlan result;
- IStatus operationStatus;
- result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
- if (!result.getStatus().isOK())
- operationStatus = result.getStatus();
- else {
- operationStatus = PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
- }
- return operationStatus;
- }
-
- private void printRequest(ProfileChangeRequest request) {
- Collection<IInstallableUnit> toAdd = request.getAdditions();
- Collection<IInstallableUnit> toRemove = request.getRemovals();
- for (IInstallableUnit added : toAdd) {
- System.out.println(NLS.bind(Messages.Installing, added.getId(), added.getVersion()));
- }
- for (IInstallableUnit removed : toRemove) {
- System.out.println(NLS.bind(Messages.Uninstalling, removed.getId(), removed.getVersion()));
- }
- }
-
- public void processArguments(String[] args) throws Exception {
- if (args == null)
- return;
- for (int i = 0; i < args.length; i++) {
-
- String opt = args[i];
- if (opt.equals("-roaming")) { //$NON-NLS-1$
- roamingProfile = true;
- }
-
- if (opt.equals(COMMAND_NAMES[COMMAND_LIST])) {
- if (command != -1)
- ambigousCommand(COMMAND_LIST, command);
- command = COMMAND_LIST;
- }
-
- // check for args without parameters (i.e., a flag arg)
-
- // check for args with parameters. If we are at the last
- // argument or
- // if the next one
- // has a '-' as the first character, then we can't have an arg
- // with
- // a parm so continue.
- if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
- continue;
-
- String arg = args[++i];
-
- if (opt.equalsIgnoreCase("-profile")) //$NON-NLS-1$
- profileId = arg;
-
- if (opt.equalsIgnoreCase("-profileProperties") || opt.equalsIgnoreCase("-props")) //$NON-NLS-1$ //$NON-NLS-2$
- profileProperties = arg;
-
- // we create a path object here to handle ../ entries in the middle of paths
- if (opt.equalsIgnoreCase("-destination") || opt.equalsIgnoreCase("-dest")) { //$NON-NLS-1$ //$NON-NLS-2$
- if (arg.startsWith("file:")) //$NON-NLS-1$
- arg = arg.substring(5);
- destination = new Path(arg);
- }
-
- // we create a path object here to handle ../ entries in the middle of paths
- if (opt.equalsIgnoreCase("-bundlepool") || opt.equalsIgnoreCase("-bp")) { //$NON-NLS-1$ //$NON-NLS-2$
- if (arg.startsWith("file:")) //$NON-NLS-1$
- arg = arg.substring(5);
- bundlePool = new Path(arg).toOSString();
- }
-
- if (opt.equalsIgnoreCase("-metadataRepository") || opt.equalsIgnoreCase("-metadataRepositories") || opt.equalsIgnoreCase("-mr")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- metadataRepositoryLocations = getURIs(arg);
-
- if (opt.equalsIgnoreCase("-artifactRepository") || opt.equalsIgnoreCase("-artifactRepositories") || opt.equalsIgnoreCase("-ar")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- artifactRepositoryLocations = getURIs(arg);
-
- if (opt.equalsIgnoreCase("-flavor")) //$NON-NLS-1$
- flavor = arg;
-
- if (opt.equalsIgnoreCase(COMMAND_NAMES[COMMAND_INSTALL])) {
- if (command != -1)
- ambigousCommand(COMMAND_INSTALL, command);
- root = arg;
- command = COMMAND_INSTALL;
- }
-
- if (opt.equalsIgnoreCase("-version")) { //$NON-NLS-1$
- if (arg != null && !arg.startsWith(ANT_PROPERTY_PREFIX))
- version = Version.create(arg);
- }
-
- if (opt.equalsIgnoreCase(COMMAND_NAMES[COMMAND_UNINSTALL])) {
- if (command != -1)
- ambigousCommand(COMMAND_UNINSTALL, command);
- root = arg;
- command = COMMAND_UNINSTALL;
- }
-
- if (opt.equalsIgnoreCase("-p2.os")) { //$NON-NLS-1$
- os = arg;
- }
- if (opt.equalsIgnoreCase("-p2.ws")) { //$NON-NLS-1$
- ws = arg;
- }
- if (opt.equalsIgnoreCase("-p2.nl")) { //$NON-NLS-1$
- nl = arg;
- }
- if (opt.equalsIgnoreCase("-p2.arch")) { //$NON-NLS-1$
- arch = arg;
- }
- }
-
- }
-
- /**
- * @param pairs a comma separated list of tag=value pairs
- * @param properties the collection into which the pairs are put
- */
- private void putProperties(String pairs, Map<String, String> properties) {
- StringTokenizer tok = new StringTokenizer(pairs, ",", true); //$NON-NLS-1$
- while (tok.hasMoreTokens()) {
- String next = tok.nextToken().trim();
- int i = next.indexOf('=');
- if (i > 0 && i < next.length() - 1) {
- String tag = next.substring(0, i).trim();
- String value = next.substring(i + 1, next.length()).trim();
- if (tag.length() > 0 && value.length() > 0) {
- properties.put(tag, value);
- }
- }
- }
- }
-
- public Object run(String[] args) throws Exception {
- System.out.println(Messages.Deprecated_application);
- long time = -System.currentTimeMillis();
- initializeServices();
- processArguments(args);
-
- IStatus operationStatus = Status.OK_STATUS;
- IQuery<IInstallableUnit> query;
- IQueryResult<IInstallableUnit> roots;
- try {
- initializeRepositories(command == COMMAND_INSTALL);
- switch (command) {
- case COMMAND_INSTALL :
- case COMMAND_UNINSTALL :
-
- IProfile profile = initializeProfile();
- query = QueryUtil.createIUQuery(root, version == null ? VersionRange.emptyRange : new VersionRange(version, true, version, true));
- roots = collectRootIUs(metadataRepositoryLocations, QueryUtil.createLatestQuery(query));
- if (roots.isEmpty())
- roots = profile.query(query, new NullProgressMonitor());
- if (roots.isEmpty()) {
- System.out.println(NLS.bind(Messages.Missing_IU, root));
- logFailure(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Missing_IU, root)));
- return EXIT_ERROR;
- }
- // keep this result status in case there is a problem so we can report it to the user
- boolean wasRoaming = Boolean.valueOf(profile.getProperty(IProfile.PROP_ROAMING)).booleanValue();
- try {
- IStatus updateRoamStatus = updateRoamingProperties(profile);
- if (!updateRoamStatus.isOK()) {
- MultiStatus multi = new MultiStatus(Activator.ID, IStatus.ERROR, NLS.bind(Messages.Cant_change_roaming, profile.getProfileId()), null);
- multi.add(updateRoamStatus);
- System.out.println(multi.getMessage());
- System.out.println(updateRoamStatus.getMessage());
- logFailure(multi);
- return EXIT_ERROR;
- }
- ProvisioningContext context = new ProvisioningContext(agent);
- context.setMetadataRepositories(metadataRepositoryLocations);
- context.setArtifactRepositories(artifactRepositoryLocations);
- ProfileChangeRequest request = buildProvisioningRequest(profile, roots, command == COMMAND_INSTALL);
- printRequest(request);
- operationStatus = planAndExecute(profile, context, request);
- } finally {
- // if we were originally were set to be roaming and we changed it, change it back before we return
- if (wasRoaming && !Boolean.valueOf(profile.getProperty(IProfile.PROP_ROAMING)).booleanValue())
- setRoaming(profile);
- }
- break;
- case COMMAND_LIST :
- query = QueryUtil.createIUQuery(null, VersionRange.emptyRange);
- if (metadataRepositoryLocations == null)
- missingArgument("metadataRepository"); //$NON-NLS-1$
-
- roots = collectRootIUs(metadataRepositoryLocations, query);
- Iterator<IInstallableUnit> unitIterator = roots.iterator();
- while (unitIterator.hasNext()) {
- IInstallableUnit iu = unitIterator.next();
- System.out.println(iu.getId());
- }
- break;
- }
- } finally {
- cleanupRepositories();
- }
-
- time += System.currentTimeMillis();
- if (operationStatus.isOK())
- System.out.println(NLS.bind(Messages.Operation_complete, new Long(time)));
- else {
- System.out.println(Messages.Operation_failed);
- logFailure(operationStatus);
- return EXIT_ERROR;
- }
- return IApplication.EXIT_OK;
- }
-
- private void cleanupRepositories() {
- if (artifactReposForRemoval != null && artifactManager != null) {
- for (int i = 0; i < artifactReposForRemoval.length && artifactReposForRemoval[i] != null; i++) {
- artifactManager.removeRepository(artifactReposForRemoval[i]);
- }
- }
- if (metadataReposForRemoval != null && metadataManager != null) {
- for (int i = 0; i < metadataReposForRemoval.length && metadataReposForRemoval[i] != null; i++) {
- metadataManager.removeRepository(metadataReposForRemoval[i]);
- }
- }
- }
-
- class LocationQueryable implements IQueryable<IInstallableUnit> {
- private URI location;
-
- public LocationQueryable(URI location) {
- this.location = location;
- }
-
- public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- return getInstallableUnits(agent, location, query, monitor);
- }
- }
-
- private IQueryResult<IInstallableUnit> collectRootIUs(URI[] locations, IQuery<IInstallableUnit> query) {
- IProgressMonitor nullMonitor = new NullProgressMonitor();
-
- if (locations == null || locations.length == 0)
- return getInstallableUnits(agent, (URI) null, query, nullMonitor);
-
- List<IQueryable<IInstallableUnit>> locationQueryables = new ArrayList<IQueryable<IInstallableUnit>>(locations.length);
- for (int i = 0; i < locations.length; i++)
- locationQueryables.add(new LocationQueryable(locations[i]));
- return QueryUtil.compoundQueryable(locationQueryables).query(query, nullMonitor);
- }
-
- public Object start(IApplicationContext context) throws Exception {
- return run((String[]) context.getArguments().get("application.args")); //$NON-NLS-1$
- }
-
- public void stop() {
- //nothing to do
- }
-
- private String toString(Map<String, String> context) {
- StringBuffer result = new StringBuffer();
- boolean first = true;
- for (String key : context.keySet()) {
- if (first)
- first = false;
- else
- result.append(',');
- result.append(key);
- result.append('=');
- result.append(context.get(key));
- }
- return result.toString();
- }
-
- private IStatus updateRoamingProperties(IProfile profile) {
- // if the user didn't specify a destination path on the command-line
- // then we assume they are installing into the currently running
- // instance and we don't have anything to update
- if (destination == null)
- return Status.OK_STATUS;
-
- // if the user didn't set a profile id on the command-line this is ok if they
- // also didn't set the destination path. (handled in the case above) otherwise throw an error.
- if (noProfileId) // && destination != null
- return new Status(IStatus.ERROR, Activator.ID, Messages.Missing_profileid);
-
- // make sure that we are set to be roaming before we update the values
- if (!Boolean.valueOf(profile.getProperty(IProfile.PROP_ROAMING)).booleanValue())
- return Status.OK_STATUS;
-
- ProfileChangeRequest request = new ProfileChangeRequest(profile);
- File destinationFile = destination.toFile();
- if (!destinationFile.equals(new File(profile.getProperty(IProfile.PROP_INSTALL_FOLDER))))
- request.setProfileProperty(IProfile.PROP_INSTALL_FOLDER, destination.toOSString());
- if (!destinationFile.equals(new File(profile.getProperty(IProfile.PROP_CACHE))))
- request.setProfileProperty(IProfile.PROP_CACHE, destination.toOSString());
- if (request.getProfileProperties().size() == 0)
- return Status.OK_STATUS;
-
- // otherwise we have to make a change so set the profile to be non-roaming so the
- // values don't get recalculated to the wrong thing if we are flushed from memory - we
- // will set it back later (see bug 269468)
- request.setProfileProperty(IProfile.PROP_ROAMING, "false"); //$NON-NLS-1$
-
- ProvisioningContext context = new ProvisioningContext(agent);
- context.setMetadataRepositories(new URI[0]);
- context.setArtifactRepositories(new URI[0]);
- IProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
- return PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
- }
-
- /*
- * Set the roaming property on the given profile.
- */
- private IStatus setRoaming(IProfile profile) {
- ProfileChangeRequest request = new ProfileChangeRequest(profile);
- request.setProfileProperty(IProfile.PROP_ROAMING, "true"); //$NON-NLS-1$
- ProvisioningContext context = new ProvisioningContext(agent);
- context.setMetadataRepositories(new URI[0]);
- context.setArtifactRepositories(new URI[0]);
- IProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
- return PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
- }
-
- private static URI[] getURIs(String spec) {
- if (spec == null)
- return null;
- String[] urlSpecs = getArrayFromString(spec, ","); //$NON-NLS-1$
- ArrayList<URI> result = new ArrayList<URI>(urlSpecs.length);
- for (int i = 0; i < urlSpecs.length; i++) {
- try {
- result.add(URIUtil.fromString(urlSpecs[i]));
- } catch (URISyntaxException e) {
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, NLS.bind(Messages.Ignored_repo, urlSpecs[i])));
- }
- }
- if (result.size() == 0)
- return null;
- return result.toArray(new URI[result.size()]);
- }
-
- /**
- * Convert a list of tokens into an array. The list separator has to be
- * specified.
- */
- public static String[] getArrayFromString(String list, String separator) {
- if (list == null || list.trim().equals("")) //$NON-NLS-1$
- return new String[0];
- List<String> result = new ArrayList<String>();
- for (StringTokenizer tokens = new StringTokenizer(list, separator); tokens.hasMoreTokens();) {
- String token = tokens.nextToken().trim();
- if (!token.equals("")) //$NON-NLS-1$
- result.add(token);
- }
- return result.toArray(new String[result.size()]);
- }
-
- private void logFailure(IStatus status) {
- FrameworkLog log = (FrameworkLog) ServiceHelper.getService(Activator.getContext(), FrameworkLog.class.getName());
- if (log != null)
- System.err.println("Application failed, log file location: " + log.getFile()); //$NON-NLS-1$
- LogHelper.log(status);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
deleted file mode 100644
index 8f400a55f..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
+++ /dev/null
@@ -1,1002 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Cloudsmith - https://bugs.eclipse.org/bugs/show_bug.cgi?id=226401
- * EclipseSource - ongoing development
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.director.app;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.security.cert.Certificate;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.p2.core.*;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.planner.IPlanner;
-import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.osgi.framework.log.FrameworkLog;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-/**
- * This director implementation is a complete replacement for the old director application.
- * This implementation has simplified command line
- * arguments, and doesn't require the user to set system property such as the
- * p2 data location. See bug 268138 for related discussion.
- */
-public class DirectorApplication implements IApplication {
- class AvoidTrustPromptService extends UIServices {
- @Override
- public AuthenticationInfo getUsernamePassword(String location) {
- return null;
- }
-
- @Override
- public AuthenticationInfo getUsernamePassword(String location, AuthenticationInfo previousInfo) {
- return null;
- }
-
- @Override
- public TrustInfo getTrustInfo(Certificate[][] untrustedChain, String[] unsignedDetail) {
- return new TrustInfo(null, false, true);
- }
- }
-
- class LocationQueryable implements IQueryable<IInstallableUnit> {
- private URI location;
-
- public LocationQueryable(URI location) {
- this.location = location;
- Assert.isNotNull(location);
- }
-
- public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- return getInstallableUnits(location, query, monitor);
- }
- }
-
- private static class CommandLineOption {
- private final String[] identifiers;
- private final String optionSyntaxString;
- private final String helpString;
-
- CommandLineOption(String[] identifiers, String optionSyntaxString, String helpString) {
- this.identifiers = identifiers;
- this.optionSyntaxString = optionSyntaxString;
- this.helpString = helpString;
- }
-
- boolean isOption(String opt) {
- int idx = identifiers.length;
- while (--idx >= 0)
- if (identifiers[idx].equalsIgnoreCase(opt))
- return true;
- return false;
- }
-
- void appendHelp(PrintStream out) {
- out.print(identifiers[0]);
- for (int idx = 1; idx < identifiers.length; ++idx) {
- out.print(" | "); //$NON-NLS-1$
- out.print(identifiers[idx]);
- }
- if (optionSyntaxString != null) {
- out.print(' ');
- out.print(optionSyntaxString);
- }
- out.println();
- out.print(" "); //$NON-NLS-1$
- out.println(helpString);
- }
- }
-
- private static final CommandLineOption OPTION_HELP = new CommandLineOption(new String[] {"-help", "-h", "-?"}, null, Messages.Help_Prints_this_command_line_help); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final CommandLineOption OPTION_LIST = new CommandLineOption(new String[] {"-list", "-l"}, Messages.Help_lb_lt_comma_separated_list_gt_rb, Messages.Help_List_all_IUs_found_in_repos); //$NON-NLS-1$ //$NON-NLS-2$
- private static final CommandLineOption OPTION_INSTALL_IU = new CommandLineOption(new String[] {"-installIU", "-installIUs", "-i"}, Messages.Help_lt_comma_separated_list_gt, Messages.Help_Installs_the_listed_IUs); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final CommandLineOption OPTION_UNINSTALL_IU = new CommandLineOption(new String[] {"-uninstallIU", "-uninstallIUs", "-u"}, Messages.Help_lt_comma_separated_list_gt, Messages.Help_Uninstalls_the_listed_IUs); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final CommandLineOption OPTION_REVERT = new CommandLineOption(new String[] {"-revert"}, Messages.Help_lt_comma_separated_list_gt, Messages.Help_Revert_to_previous_state); //$NON-NLS-1$
- private static final CommandLineOption OPTION_DESTINATION = new CommandLineOption(new String[] {"-destination", "-d"}, Messages.Help_lt_path_gt, Messages.Help_The_folder_in_which_the_targetd_product_is_located); //$NON-NLS-1$ //$NON-NLS-2$
- private static final CommandLineOption OPTION_METADATAREPOS = new CommandLineOption(new String[] {"-metadatarepository", "metadatarepositories", "-m"}, Messages.Help_lt_comma_separated_list_gt, Messages.Help_A_list_of_URLs_denoting_metadata_repositories); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final CommandLineOption OPTION_ARTIFACTREPOS = new CommandLineOption(new String[] {"-artifactrepository", "artifactrepositories", "-a"}, Messages.Help_lt_comma_separated_list_gt, Messages.Help_A_list_of_URLs_denoting_artifact_repositories); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final CommandLineOption OPTION_REPOSITORIES = new CommandLineOption(new String[] {"-repository", "repositories", "-r"}, Messages.Help_lt_comma_separated_list_gt, Messages.Help_A_list_of_URLs_denoting_colocated_repositories); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final CommandLineOption OPTION_VERIFY_ONLY = new CommandLineOption(new String[] {"-verifyOnly"}, null, Messages.Help_Only_verify_dont_install); //$NON-NLS-1$
- private static final CommandLineOption OPTION_PROFILE = new CommandLineOption(new String[] {"-profile", "-p"}, Messages.Help_lt_name_gt, Messages.Help_Defines_what_profile_to_use_for_the_actions); //$NON-NLS-1$ //$NON-NLS-2$
- private static final CommandLineOption OPTION_FLAVOR = new CommandLineOption(new String[] {"-flavor", "-f"}, Messages.Help_lt_name_gt, Messages.Help_Defines_flavor_to_use_for_created_profile); //$NON-NLS-1$ //$NON-NLS-2$
- private static final CommandLineOption OPTION_SHARED = new CommandLineOption(new String[] {"-shared", "-s"}, Messages.Help_lb_lt_path_gt_rb, Messages.Help_Use_a_shared_location_for_the_install); //$NON-NLS-1$ //$NON-NLS-2$
- private static final CommandLineOption OPTION_BUNDLEPOOL = new CommandLineOption(new String[] {"-bundlepool", "-b"}, Messages.Help_lt_path_gt, Messages.Help_The_location_where_the_plugins_and_features_will_be_stored); //$NON-NLS-1$ //$NON-NLS-2$
- private static final CommandLineOption OPTION_PROFILE_PROPS = new CommandLineOption(new String[] {"-profileproperties"}, Messages.Help_lt_comma_separated_list_gt, Messages.Help_A_list_of_properties_in_the_form_key_value_pairs); //$NON-NLS-1$
- private static final CommandLineOption OPTION_ROAMING = new CommandLineOption(new String[] {"-roaming"}, null, Messages.Help_Indicates_that_the_product_can_be_moved); //$NON-NLS-1$
- private static final CommandLineOption OPTION_P2_OS = new CommandLineOption(new String[] {"-p2.os"}, null, Messages.Help_The_OS_when_profile_is_created); //$NON-NLS-1$
- private static final CommandLineOption OPTION_P2_WS = new CommandLineOption(new String[] {"-p2.ws"}, null, Messages.Help_The_WS_when_profile_is_created); //$NON-NLS-1$
- private static final CommandLineOption OPTION_P2_ARCH = new CommandLineOption(new String[] {"-p2.arch"}, null, Messages.Help_The_ARCH_when_profile_is_created); //$NON-NLS-1$
- private static final CommandLineOption OPTION_P2_NL = new CommandLineOption(new String[] {"-p2.nl"}, null, Messages.Help_The_NL_when_profile_is_created); //$NON-NLS-1$
- private static final CommandLineOption OPTION_PURGEHISTORY = new CommandLineOption(new String[] {"-purgeHistory"}, null, Messages.Help_Purge_the_install_registry); //$NON-NLS-1$
-
- private static final Integer EXIT_ERROR = new Integer(13);
- static private final String FLAVOR_DEFAULT = "tooling"; //$NON-NLS-1$
- static private final String PROP_P2_PROFILE = "eclipse.p2.profile"; //$NON-NLS-1$
- static private final String NO_ARTIFACT_REPOSITORIES_AVAILABLE = "noArtifactRepositoriesAvailable"; //$NON-NLS-1$
-
- public static final String LINE_SEPARATOR = System.getProperty("line.separator"); //$NON-NLS-1$
-
- private static void getURIs(List<URI> uris, String spec) throws CoreException {
- if (spec == null)
- return;
- String[] urlSpecs = StringHelper.getArrayFromString(spec, ',');
- for (int i = 0; i < urlSpecs.length; i++) {
- try {
- uris.add(new URI(urlSpecs[i]));
- } catch (URISyntaxException e1) {
- try {
- uris.add(URIUtil.fromString(urlSpecs[i]));
- } catch (URISyntaxException e) {
- throw new ProvisionException(NLS.bind(Messages.unable_to_parse_0_to_uri_1, urlSpecs[i], e.getMessage()));
- }
- }
-
- }
- }
-
- private static String getRequiredArgument(String[] args, int argIdx) throws CoreException {
- if (argIdx < args.length) {
- String arg = args[argIdx];
- if (!arg.startsWith("-")) //$NON-NLS-1$
- return arg;
- }
- throw new ProvisionException(NLS.bind(Messages.option_0_requires_an_argument, args[argIdx - 1]));
- }
-
- private static String getOptionalArgument(String[] args, int argIdx) {
- //Look ahead to the next argument
- ++argIdx;
- if (argIdx < args.length) {
- String arg = args[argIdx];
- if (!arg.startsWith("-")) //$NON-NLS-1$
- return arg;
- }
- return null;
- }
-
- private static void parseIUsArgument(List<IVersionedId> vnames, String arg) {
- String[] roots = StringHelper.getArrayFromString(arg, ',');
- for (int i = 0; i < roots.length; ++i)
- vnames.add(VersionedId.parse(roots[i]));
- }
-
- private static File processFileArgument(String arg) {
- if (arg.startsWith("file:")) //$NON-NLS-1$
- arg = arg.substring(5);
-
- // we create a path object here to handle ../ entries in the middle of paths
- return Path.fromOSString(arg).toFile();
- }
-
- private IArtifactRepositoryManager artifactManager;
- IMetadataRepositoryManager metadataManager;
-
- private URI[] artifactReposForRemoval;
- private URI[] metadataReposForRemoval;
-
- private final List<URI> artifactRepositoryLocations = new ArrayList<URI>();
- private final List<URI> metadataRepositoryLocations = new ArrayList<URI>();
- private final List<IVersionedId> rootsToInstall = new ArrayList<IVersionedId>();
- private final List<IVersionedId> rootsToUninstall = new ArrayList<IVersionedId>();
- private final List<IVersionedId> rootsToList = new ArrayList<IVersionedId>();
-
- private File bundlePool = null;
- private File destination;
- private File sharedLocation;
- private String flavor;
- private boolean printHelpInfo = false;
- private boolean printIUList = false;
- private long revertToPreviousState = -1;
- private boolean verifyOnly = false;
- private boolean roamingProfile = false;
- private boolean purgeRegistry = 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 ILog log = null;
-
- private IProvisioningAgent targetAgent;
- private boolean noArtifactRepositorySpecified = false;
-
- private ProfileChangeRequest buildProvisioningRequest(IProfile profile, Collection<IInstallableUnit> installs, Collection<IInstallableUnit> uninstalls) {
- ProfileChangeRequest request = new ProfileChangeRequest(profile);
- markRoots(request, installs);
- markRoots(request, uninstalls);
- request.addAll(installs);
- request.removeAll(uninstalls);
- return request;
- }
-
- private void cleanupRepositories() {
- if (artifactReposForRemoval != null && artifactManager != null) {
- for (int i = 0; i < artifactReposForRemoval.length && artifactReposForRemoval[i] != null; i++) {
- artifactManager.removeRepository(artifactReposForRemoval[i]);
- }
- }
- if (metadataReposForRemoval != null && metadataManager != null) {
- for (int i = 0; i < metadataReposForRemoval.length && metadataReposForRemoval[i] != null; i++) {
- metadataManager.removeRepository(metadataReposForRemoval[i]);
- }
- }
- }
-
- private IQueryResult<IInstallableUnit> collectRootIUs(IQuery<IInstallableUnit> query) {
- IProgressMonitor nullMonitor = new NullProgressMonitor();
-
- int top = metadataRepositoryLocations.size();
- if (top == 0)
- return getInstallableUnits(null, query, nullMonitor);
-
- List<IQueryable<IInstallableUnit>> locationQueryables = new ArrayList<IQueryable<IInstallableUnit>>(top);
- for (int i = 0; i < top; i++)
- locationQueryables.add(new LocationQueryable(metadataRepositoryLocations.get(i)));
- return QueryUtil.compoundQueryable(locationQueryables).query(query, nullMonitor);
- }
-
- private Collection<IInstallableUnit> collectRoots(IProfile profile, List<IVersionedId> rootNames, boolean forInstall) throws CoreException {
- ArrayList<IInstallableUnit> allRoots = new ArrayList<IInstallableUnit>();
- int top = rootNames.size();
- for (int i = 0; i < top; ++i) {
- IVersionedId rootName = rootNames.get(i);
- Version v = rootName.getVersion();
- IQuery<IInstallableUnit> query = QueryUtil.createIUQuery(rootName.getId(), Version.emptyVersion.equals(v) ? VersionRange.emptyRange : new VersionRange(v, true, v, true));
- IQueryResult<IInstallableUnit> roots = null;
- if (forInstall)
- roots = collectRootIUs(QueryUtil.createLatestQuery(query));
-
- if (roots == null || roots.isEmpty())
- roots = profile.query(query, new NullProgressMonitor());
-
- Iterator<IInstallableUnit> itor = roots.iterator();
- if (!itor.hasNext())
- throw new CoreException(new Status(IStatus.ERROR, org.eclipse.equinox.internal.p2.director.app.Activator.ID, NLS.bind(Messages.Missing_IU, rootName)));
- do {
- allRoots.add(itor.next());
- } while (itor.hasNext());
- }
- return allRoots;
- }
-
- synchronized Bundle getBundle(String symbolicName) {
- if (packageAdmin == null)
- return null;
-
- Bundle[] bundles = packageAdmin.getBundles(symbolicName, null);
- if (bundles == null)
- return null;
- //Return the first bundle that is not installed or uninstalled
- for (int i = 0; i < bundles.length; i++) {
- if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) {
- return bundles[i];
- }
- }
- return null;
- }
-
- private String getEnvironmentProperty() {
- HashMap<String, String> values = new HashMap<String, String>();
- if (os != null)
- values.put("osgi.os", os); //$NON-NLS-1$
- if (nl != null)
- values.put("osgi.nl", nl); //$NON-NLS-1$
- if (ws != null)
- values.put("osgi.ws", ws); //$NON-NLS-1$
- if (arch != null)
- values.put("osgi.arch", arch); //$NON-NLS-1$
- return values.isEmpty() ? null : toString(values);
- }
-
- private IProfile getProfile() {
- IProfileRegistry profileRegistry = (IProfileRegistry) targetAgent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileId == null) {
- profileId = IProfileRegistry.SELF;
- noProfileId = true;
- }
- return profileRegistry.getProfile(profileId);
- }
-
- private IProfile initializeProfile() throws CoreException {
- IProfile profile = getProfile();
- if (profile == null) {
- if (destination == null)
- missingArgument("destination"); //$NON-NLS-1$
- if (flavor == null)
- flavor = System.getProperty("eclipse.p2.configurationFlavor", FLAVOR_DEFAULT); //$NON-NLS-1$
-
- Map<String, String> props = new HashMap<String, String>();
- props.put(IProfile.PROP_INSTALL_FOLDER, destination.toString());
- if (bundlePool == null)
- props.put(IProfile.PROP_CACHE, sharedLocation == null ? destination.getAbsolutePath() : sharedLocation.getAbsolutePath());
- else
- props.put(IProfile.PROP_CACHE, bundlePool.getAbsolutePath());
- if (roamingProfile)
- props.put(IProfile.PROP_ROAMING, Boolean.TRUE.toString());
-
- String env = getEnvironmentProperty();
- if (env != null)
- props.put(IProfile.PROP_ENVIRONMENTS, env);
- if (profileProperties != null)
- putProperties(profileProperties, props);
- profile = ((IProfileRegistry) targetAgent.getService(IProfileRegistry.SERVICE_NAME)).addProfile(profileId, props);
- }
- return profile;
- }
-
- private void initializeRepositories() throws CoreException {
- if (rootsToInstall.isEmpty() && revertToPreviousState == -1 && !printIUList)
- // Not much point initializing repositories if we have nothing to install
- return;
- if (artifactRepositoryLocations == null)
- missingArgument("-artifactRepository"); //$NON-NLS-1$
-
- artifactManager = (IArtifactRepositoryManager) targetAgent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- if (artifactManager == null)
- throw new ProvisionException(Messages.Application_NoManager);
-
- int removalIdx = 0;
- boolean anyValid = false; // do we have any valid repos or did they all fail to load?
- artifactReposForRemoval = new URI[artifactRepositoryLocations.size()];
- for (int i = 0; i < artifactRepositoryLocations.size(); i++) {
- URI location = artifactRepositoryLocations.get(i);
- try {
- if (!artifactManager.contains(location)) {
- artifactManager.loadRepository(location, null);
- artifactReposForRemoval[removalIdx++] = location;
- }
- anyValid = true;
- } catch (ProvisionException e) {
- //one of the repositories did not load
- logStatus(e.getStatus());
- }
- }
- if (!anyValid)
- noArtifactRepositorySpecified = true;
-
- if (metadataRepositoryLocations == null)
- missingArgument("metadataRepository"); //$NON-NLS-1$
-
- metadataManager = (IMetadataRepositoryManager) targetAgent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (metadataManager == null)
- throw new ProvisionException(Messages.Application_NoManager);
-
- removalIdx = 0;
- anyValid = false; // do we have any valid repos or did they all fail to load?
- int top = metadataRepositoryLocations.size();
- metadataReposForRemoval = new URI[top];
- for (int i = 0; i < top; i++) {
- URI location = metadataRepositoryLocations.get(i);
- try {
- if (!metadataManager.contains(location)) {
- metadataManager.loadRepository(location, null);
- metadataReposForRemoval[removalIdx++] = location;
- }
- anyValid = true;
- } catch (ProvisionException e) {
- //one of the repositories did not load
- logStatus(e.getStatus());
- }
- }
- if (!anyValid)
- //all repositories failed to load
- throw new ProvisionException(Messages.Application_NoRepositories);
- }
-
- private void initializeServices() throws CoreException {
- BundleContext context = Activator.getContext();
- packageAdminRef = context.getServiceReference(PackageAdmin.class.getName());
- packageAdmin = (PackageAdmin) context.getService(packageAdminRef);
- ServiceReference agentProviderRef = context.getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);
- IProvisioningAgentProvider provider = (IProvisioningAgentProvider) context.getService(agentProviderRef);
- URI p2DataArea;
- if (destination != null || sharedLocation != null) {
- File dataAreaFile = sharedLocation == null ? new File(destination, "p2") : sharedLocation;//$NON-NLS-1$
- p2DataArea = dataAreaFile.toURI();
- } else {
- p2DataArea = null;
- }
- targetAgent = provider.createAgent(p2DataArea);
- targetAgent.registerService(IProvisioningAgent.INSTALLER_AGENT, provider.createAgent(null));
-
- context.ungetService(agentProviderRef);
- if (profileId == null) {
- if (destination != null) {
- File configIni = new File(destination, "configuration/config.ini"); //$NON-NLS-1$
- InputStream in = null;
- try {
- Properties ciProps = new Properties();
- in = new BufferedInputStream(new FileInputStream(configIni));
- ciProps.load(in);
- profileId = ciProps.getProperty(PROP_P2_PROFILE);
- } catch (IOException e) {
- // Ignore
- } finally {
- if (in != null)
- try {
- in.close();
- } catch (IOException e) {
- // Ignore;
- }
- }
- if (profileId == null)
- profileId = destination.toString();
- }
- }
- if (profileId != null)
- targetAgent.registerService(PROP_P2_PROFILE, profileId);
- else
- targetAgent.unregisterService(PROP_P2_PROFILE, null);
-
- IDirector director = (IDirector) targetAgent.getService(IDirector.SERVICE_NAME);
- if (director == null)
- throw new ProvisionException(Messages.Missing_director);
-
- planner = (IPlanner) targetAgent.getService(IPlanner.SERVICE_NAME);
- if (planner == null)
- throw new ProvisionException(Messages.Missing_planner);
-
- engine = (IEngine) targetAgent.getService(IEngine.SERVICE_NAME);
- if (engine == null)
- throw new ProvisionException(Messages.Missing_Engine);
-
- targetAgent.registerService(UIServices.SERVICE_NAME, new AvoidTrustPromptService());
- }
-
- private void logStatus(IStatus status) {
- if (log != null)
- log.log(status);
- else
- LogHelper.log(status);
- }
-
- private void printMessage(String message) {
- if (log != null)
- log.log(message);
- else
- System.out.println(message);
- }
-
- private void logFailure(IStatus status) {
- if (log == null) {
- FrameworkLog frameworkLog = (FrameworkLog) ServiceHelper.getService(Activator.getContext(), FrameworkLog.class.getName());
- if (frameworkLog != null)
- System.err.println("Application failed, log file location: " + frameworkLog.getFile()); //$NON-NLS-1$
- }
-
- logStatus(status);
- }
-
- private void markRoots(IProfileChangeRequest request, Collection<IInstallableUnit> roots) {
- for (IInstallableUnit root : roots) {
- request.setInstallableUnitProfileProperty(root, IProfile.PROP_PROFILE_ROOT_IU, Boolean.TRUE.toString());
- }
- }
-
- private void missingArgument(String argumentName) throws CoreException {
- throw new ProvisionException(NLS.bind(Messages.Missing_Required_Argument, argumentName));
- }
-
- private void performList() throws CoreException {
- if (metadataRepositoryLocations.isEmpty())
- missingArgument("metadataRepository"); //$NON-NLS-1$
-
- ArrayList<IInstallableUnit> allRoots = new ArrayList<IInstallableUnit>();
- if (rootsToList.size() == 0) {
- Iterator<IInstallableUnit> roots = collectRootIUs(QueryUtil.createIUAnyQuery()).iterator();
- while (roots.hasNext())
- allRoots.add(roots.next());
- } else {
- for (IVersionedId rootName : rootsToList) {
- Version v = rootName.getVersion();
- IQuery<IInstallableUnit> query = QueryUtil.createIUQuery(rootName.getId(), Version.emptyVersion.equals(v) ? VersionRange.emptyRange : new VersionRange(v, true, v, true));
- Iterator<IInstallableUnit> roots = collectRootIUs(query).iterator();
- while (roots.hasNext())
- allRoots.add(roots.next());
- }
- }
-
- Collections.sort(allRoots);
- for (IInstallableUnit iu : allRoots) {
- System.out.println(iu.getId() + '=' + iu.getVersion());
- }
- }
-
- private void performProvisioningActions() throws CoreException {
- IProfile profile = initializeProfile();
- Collection<IInstallableUnit> installs = collectRoots(profile, rootsToInstall, true);
- Collection<IInstallableUnit> uninstalls = collectRoots(profile, rootsToUninstall, false);
-
- // keep this result status in case there is a problem so we can report it to the user
- boolean wasRoaming = Boolean.valueOf(profile.getProperty(IProfile.PROP_ROAMING)).booleanValue();
- try {
- updateRoamingProperties(profile);
- ProvisioningContext context = new ProvisioningContext(targetAgent);
- context.setMetadataRepositories(metadataRepositoryLocations.toArray(new URI[metadataRepositoryLocations.size()]));
- context.setArtifactRepositories(artifactRepositoryLocations.toArray(new URI[artifactRepositoryLocations.size()]));
- ProfileChangeRequest request = buildProvisioningRequest(profile, installs, uninstalls);
- printRequest(request);
- planAndExecute(profile, context, request);
- } finally {
- // if we were originally were set to be roaming and we changed it, change it back before we return
- if (wasRoaming && !Boolean.valueOf(profile.getProperty(IProfile.PROP_ROAMING)).booleanValue())
- setRoaming(profile);
- }
- }
-
- private void planAndExecute(IProfile profile, ProvisioningContext context, ProfileChangeRequest request) throws CoreException {
- IProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
- IStatus operationStatus = result.getStatus();
- if (!operationStatus.isOK())
- throw new CoreException(operationStatus);
- executePlan(context, result);
- }
-
- private void executePlan(ProvisioningContext context, IProvisioningPlan result) throws CoreException {
- IStatus operationStatus;
- if (!verifyOnly) {
- operationStatus = PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
- if (!operationStatus.isOK()) {
- if (noArtifactRepositorySpecified && hasNoRepositoryFound(operationStatus))
- throw new ProvisionException(Messages.Application_NoRepositories);
- throw new CoreException(operationStatus);
- }
- }
- }
-
- private boolean hasNoRepositoryFound(IStatus status) {
- if (status.getException() != null && NO_ARTIFACT_REPOSITORIES_AVAILABLE.equals(status.getException().getMessage()))
- return true;
- if (status.isMultiStatus()) {
- for (IStatus child : status.getChildren()) {
- if (hasNoRepositoryFound(child))
- return true;
- }
- }
- return false;
- }
-
- private void printRequest(ProfileChangeRequest request) {
- Collection<IInstallableUnit> toAdd = request.getAdditions();
- for (IInstallableUnit added : toAdd) {
- printMessage(NLS.bind(Messages.Installing, added.getId(), added.getVersion()));
- }
- Collection<IInstallableUnit> toRemove = request.getRemovals();
- for (IInstallableUnit removed : toRemove) {
- printMessage(NLS.bind(Messages.Uninstalling, removed.getId(), removed.getVersion()));
- }
- }
-
- public void processArguments(String[] args) throws CoreException {
- if (args == null) {
- printHelpInfo = true;
- return;
- }
-
- 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/").toFile(); //$NON-NLS-1$ //$NON-NLS-2$
- continue;
- }
-
- if (OPTION_DESTINATION.isOption(opt)) {
- destination = processFileArgument(getRequiredArgument(args, ++i));
- continue;
- }
-
- if (OPTION_BUNDLEPOOL.isOption(opt)) {
- bundlePool = processFileArgument(getRequiredArgument(args, ++i));
- continue;
- }
-
- if (OPTION_METADATAREPOS.isOption(opt)) {
- getURIs(metadataRepositoryLocations, getRequiredArgument(args, ++i));
- continue;
- }
-
- if (OPTION_ARTIFACTREPOS.isOption(opt)) {
- getURIs(artifactRepositoryLocations, getRequiredArgument(args, ++i));
- continue;
- }
-
- if (OPTION_REPOSITORIES.isOption(opt)) {
- String arg = getRequiredArgument(args, ++i);
- getURIs(metadataRepositoryLocations, arg);
- getURIs(artifactRepositoryLocations, arg);
- continue;
- }
-
- if (OPTION_PROFILE_PROPS.isOption(opt)) {
- profileProperties = getRequiredArgument(args, ++i);
- continue;
- }
-
- if (OPTION_ROAMING.isOption(opt)) {
- roamingProfile = true;
- continue;
- }
-
- if (OPTION_VERIFY_ONLY.isOption(opt)) {
- verifyOnly = true;
- continue;
- }
-
- if (OPTION_PURGEHISTORY.isOption(opt)) {
- purgeRegistry = true;
- continue;
- }
-
- if (OPTION_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 && !purgeRegistry && rootsToInstall.isEmpty() && rootsToUninstall.isEmpty() && revertToPreviousState == -1) {
- printMessage(Messages.Help_Missing_argument);
- printHelpInfo = true;
- }
- }
-
- /**
- * @param pairs a comma separated list of tag=value pairs
- * @param properties the collection into which the pairs are put
- */
- private void putProperties(String pairs, Map<String, String> properties) {
- String[] propPairs = StringHelper.getArrayFromString(pairs, ',');
- for (int i = 0; i < propPairs.length; ++i) {
- String propPair = propPairs[i];
- int eqIdx = propPair.indexOf('=');
- if (eqIdx < 0)
- continue;
- String tag = propPair.substring(0, eqIdx).trim();
- if (tag.length() == 0)
- continue;
- String value = propPair.substring(eqIdx + 1).trim();
- if (value.length() > 0)
- properties.put(tag, value);
- }
- }
-
- private void cleanupServices() {
- BundleContext context = Activator.getContext();
- //dispose agent
- if (targetAgent != null) {
- targetAgent.stop();
- targetAgent = null;
- }
- if (packageAdminRef != null)
- context.ungetService(packageAdminRef);
- }
-
- public Object run(String[] args) {
- long time = System.currentTimeMillis();
-
- try {
- processArguments(args);
- if (printHelpInfo)
- performHelpInfo();
- else {
- initializeServices();
- initializeRepositories();
- if (revertToPreviousState >= 0) {
- revertToPreviousState();
- } else if (!(rootsToInstall.isEmpty() && rootsToUninstall.isEmpty()))
- performProvisioningActions();
- if (printIUList)
- performList();
- if (purgeRegistry)
- purgeRegistry();
- printMessage(NLS.bind(Messages.Operation_complete, new Long(System.currentTimeMillis() - time)));
- }
- return IApplication.EXIT_OK;
- } catch (CoreException e) {
- printMessage(Messages.Operation_failed);
- deeplyPrint(e.getStatus(), System.err, 0);
- logFailure(e.getStatus());
- //set empty exit data to suppress error dialog from launcher
- setSystemProperty("eclipse.exitdata", ""); //$NON-NLS-1$ //$NON-NLS-2$
- return EXIT_ERROR;
- } finally {
- if (packageAdminRef != null) {
- cleanupRepositories();
- cleanupServices();
- }
- }
- }
-
- private void purgeRegistry() throws ProvisionException {
- if (getProfile() == null)
- return;
- IProfileRegistry registry = (IProfileRegistry) targetAgent.getService(IProfileRegistry.SERVICE_NAME);
- long[] allProfiles = registry.listProfileTimestamps(profileId);
- for (int i = 0; i < allProfiles.length - 1; i++) {
- registry.removeProfile(profileId, allProfiles[i]);
- }
- }
-
- private void revertToPreviousState() throws CoreException {
- IProfile profile = initializeProfile();
- IProfileRegistry profileRegistry = (IProfileRegistry) targetAgent.getService(IProfileRegistry.SERVICE_NAME);
- IProfile targetProfile = null;
- if (revertToPreviousState == 0) {
- long[] profiles = profileRegistry.listProfileTimestamps(profile.getProfileId());
- if (profiles.length == 0)
- return;
- targetProfile = profileRegistry.getProfile(profile.getProfileId(), profiles[profiles.length - 1]);
- } else {
- targetProfile = profileRegistry.getProfile(profile.getProfileId(), revertToPreviousState);
- }
- if (targetProfile == null)
- throw new CoreException(new Status(IStatus.ERROR, Activator.ID, Messages.Missing_profile));
- IProvisioningPlan plan = planner.getDiffPlan(profile, targetProfile, new NullProgressMonitor());
-
- ProvisioningContext context = new ProvisioningContext(targetAgent);
- context.setMetadataRepositories(metadataRepositoryLocations.toArray(new URI[metadataRepositoryLocations.size()]));
- context.setArtifactRepositories(artifactRepositoryLocations.toArray(new URI[artifactRepositoryLocations.size()]));
- executePlan(context, plan);
- }
-
- /**
- * Sets a system property, using the EnvironmentInfo service if possible.
- */
- private void setSystemProperty(String key, String value) {
- EnvironmentInfo env = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName());
- if (env != null) {
- env.setProperty(key, value);
- } else {
- System.getProperties().put(key, value);
- }
- }
-
- private static void appendLevelPrefix(PrintStream strm, int level) {
- for (int idx = 0; idx < level; ++idx)
- strm.print(' ');
- }
-
- IQueryResult<IInstallableUnit> getInstallableUnits(URI location, IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- IQueryable<IInstallableUnit> queryable = null;
- if (location == null) {
- queryable = metadataManager;
- } else {
- try {
- queryable = metadataManager.loadRepository(location, monitor);
- } catch (ProvisionException e) {
- //repository is not available - just return empty result
- }
- }
- if (queryable != null)
- return queryable.query(query, monitor);
- return Collector.emptyCollector();
- }
-
- private void deeplyPrint(CoreException ce, PrintStream strm, int level) {
- appendLevelPrefix(strm, level);
- if (stackTrace)
- ce.printStackTrace(strm);
- deeplyPrint(ce.getStatus(), strm, level);
- }
-
- private void deeplyPrint(IStatus status, PrintStream strm, int level) {
- appendLevelPrefix(strm, level);
- String msg = status.getMessage();
- strm.println(msg);
- Throwable cause = status.getException();
- if (cause != null) {
- strm.print("Caused by: "); //$NON-NLS-1$
- if (stackTrace || !(msg.equals(cause.getMessage()) || msg.equals(cause.toString())))
- deeplyPrint(cause, strm, level);
- }
-
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++)
- deeplyPrint(children[i], strm, level + 1);
- }
- }
-
- private void deeplyPrint(Throwable t, PrintStream strm, int level) {
- if (t instanceof CoreException)
- deeplyPrint((CoreException) t, strm, level);
- else {
- appendLevelPrefix(strm, level);
- if (stackTrace)
- t.printStackTrace(strm);
- else {
- strm.println(t.toString());
- Throwable cause = t.getCause();
- if (cause != null) {
- strm.print("Caused by: "); //$NON-NLS-1$
- deeplyPrint(cause, strm, level);
- }
- }
- }
- }
-
- private void performHelpInfo() {
- CommandLineOption[] allOptions = new CommandLineOption[] {OPTION_HELP, OPTION_LIST, OPTION_INSTALL_IU, OPTION_UNINSTALL_IU, OPTION_REVERT, OPTION_DESTINATION, OPTION_METADATAREPOS, OPTION_ARTIFACTREPOS, OPTION_REPOSITORIES, OPTION_VERIFY_ONLY, OPTION_PROFILE, OPTION_FLAVOR, OPTION_SHARED, OPTION_BUNDLEPOOL, OPTION_PROFILE_PROPS, OPTION_ROAMING, OPTION_P2_OS, OPTION_P2_WS, OPTION_P2_ARCH, OPTION_P2_NL, OPTION_PURGEHISTORY};
- for (int i = 0; i < allOptions.length; ++i) {
- allOptions[i].appendHelp(System.out);
- }
- }
-
- /*
- * Set the roaming property on the given profile.
- */
- private IStatus setRoaming(IProfile profile) {
- ProfileChangeRequest request = new ProfileChangeRequest(profile);
- request.setProfileProperty(IProfile.PROP_ROAMING, "true"); //$NON-NLS-1$
- ProvisioningContext context = new ProvisioningContext(targetAgent);
- context.setMetadataRepositories(new URI[0]);
- context.setArtifactRepositories(new URI[0]);
- IProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
- return PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
- }
-
- public Object start(IApplicationContext context) throws Exception {
- return run((String[]) context.getArguments().get("application.args")); //$NON-NLS-1$
- }
-
- private String toString(Map<String, String> context) {
- StringBuffer result = new StringBuffer();
- for (Map.Entry<String, String> entry : context.entrySet()) {
- if (result.length() > 0)
- result.append(',');
- result.append(entry.getKey());
- result.append('=');
- result.append(entry.getValue());
- }
- return result.toString();
- }
-
- private void updateRoamingProperties(IProfile profile) throws CoreException {
- // if the user didn't specify a destination path on the command-line
- // then we assume they are installing into the currently running
- // instance and we don't have anything to update
- if (destination == null)
- return;
-
- // if the user didn't set a profile id on the command-line this is ok if they
- // also didn't set the destination path. (handled in the case above) otherwise throw an error.
- if (noProfileId) // && destination != null
- throw new ProvisionException(Messages.Missing_profileid);
-
- // make sure that we are set to be roaming before we update the values
- if (!Boolean.valueOf(profile.getProperty(IProfile.PROP_ROAMING)).booleanValue())
- return;
-
- ProfileChangeRequest request = new ProfileChangeRequest(profile);
- if (!destination.equals(new File(profile.getProperty(IProfile.PROP_INSTALL_FOLDER))))
- request.setProfileProperty(IProfile.PROP_INSTALL_FOLDER, destination.getAbsolutePath());
- if (!destination.equals(new File(profile.getProperty(IProfile.PROP_CACHE))))
- request.setProfileProperty(IProfile.PROP_CACHE, destination.getAbsolutePath());
- if (request.getProfileProperties().size() == 0)
- return;
-
- // otherwise we have to make a change so set the profile to be non-roaming so the
- // values don't get recalculated to the wrong thing if we are flushed from memory - we
- // will set it back later (see bug 269468)
- request.setProfileProperty(IProfile.PROP_ROAMING, "false"); //$NON-NLS-1$
-
- ProvisioningContext context = new ProvisioningContext(targetAgent);
- context.setMetadataRepositories(new URI[0]);
- context.setArtifactRepositories(new URI[0]);
- IProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
- IStatus status = PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
- if (!status.isOK())
- throw new CoreException(new MultiStatus(org.eclipse.equinox.internal.p2.director.app.Activator.ID, IStatus.ERROR, new IStatus[] {status}, NLS.bind(Messages.Cant_change_roaming, profile.getProfileId()), null));
- }
-
- public void stop() {
- if (log != null)
- log.close();
- }
-
- public void setLog(ILog log) {
- this.log = log;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/ILog.java b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/ILog.java
deleted file mode 100644
index 7d12bf3f2..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/ILog.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.eclipse.equinox.internal.p2.director.app;
-
-import org.eclipse.core.runtime.IStatus;
-
-public interface ILog {
-
- // Log a status
- public void log(IStatus status);
-
- public void log(String message);
-
- // Notify that logging is completed & cleanup resources
- public void close();
-}
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Messages.java b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Messages.java
deleted file mode 100644
index 872d2964c..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Messages.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Cloudsmith - https://bugs.eclipse.org/bugs/show_bug.cgi?id=226401
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.director.app;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.director.app.messages"; //$NON-NLS-1$
-
- public static String Deprecated_application;
- public static String Ambigous_Command;
- public static String Application_NoManager;
-
- public static String Application_NoRepositories;
- public static String Cant_change_roaming;
- public static String destination_commandline;
-
- public static String Help_A_list_of_properties_in_the_form_key_value_pairs;
- public static String Help_A_list_of_URLs_denoting_artifact_repositories;
- public static String Help_A_list_of_URLs_denoting_colocated_repositories;
- public static String Help_A_list_of_URLs_denoting_metadata_repositories;
- public static String Help_Defines_flavor_to_use_for_created_profile;
- public static String Help_Defines_what_profile_to_use_for_the_actions;
- public static String Help_Indicates_that_the_product_can_be_moved;
- public static String Help_Installs_the_listed_IUs;
- public static String Help_lb_lt_path_gt_rb;
- public static String Help_List_all_IUs_found_in_repos;
- public static String Help_lt_comma_separated_list_gt;
- public static String Help_lb_lt_comma_separated_list_gt_rb;
- public static String Help_lt_name_gt;
- public static String Help_lt_path_gt;
- public static String Help_Missing_argument;
- public static String Help_Only_verify_dont_install;
- public static String Help_Prints_this_command_line_help;
- public static String Help_The_ARCH_when_profile_is_created;
- public static String Help_The_folder_in_which_the_targetd_product_is_located;
- public static String Help_The_location_where_the_plugins_and_features_will_be_stored;
- public static String Help_The_NL_when_profile_is_created;
- public static String Help_The_OS_when_profile_is_created;
- public static String Help_The_WS_when_profile_is_created;
- public static String Help_Uninstalls_the_listed_IUs;
- public static String Help_Revert_to_previous_state;
- public static String Help_Use_a_shared_location_for_the_install;
- public static String Help_Purge_the_install_registry;
-
- public static String Ignored_repo;
- public static String Installing;
- public static String Missing_director;
- public static String Missing_Engine;
- public static String Missing_IU;
- public static String Missing_planner;
- public static String Missing_profileid;
- public static String Missing_Required_Argument;
- public static String Missing_profile;
-
- public static String Operation_complete;
- public static String Operation_failed;
- public static String option_0_requires_an_argument;
- public static String unable_to_parse_0_to_uri_1;
- public static String Uninstalling;
- public static String unknown_option_0;
-
- public static String problem_CallingDirector;
- public static String problem_repoMustBeURI;
- public static String unableToWriteLogFile;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- //empty
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/messages.properties b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/messages.properties
deleted file mode 100644
index 48dc5cff3..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/messages.properties
+++ /dev/null
@@ -1,64 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2010 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Cloudsmith - ongoing development
-###############################################################################
-destination_commandline=<destination>
-Deprecated_application=This application is deprecated and will be removed in a future release. Please use the org.eclipse.equinox.p2.director application.
-Help_Only_verify_dont_install=Only verify that the actions can be performed. Don't actually install or remove anything.
-Operation_complete=Operation completed in {0} ms.
-Operation_failed=Installation failed.
-Cant_change_roaming=Problem while updating the profile {0}.
-
-Missing_profileid = Must specify a profile id if a destination is specified.
-Missing_director=Director could not be loaded.
-Missing_Engine=Engine could not be loaded.
-Missing_planner=Planner could not be loaded.
-Missing_IU=The installable unit {0} has not been found.
-Missing_Required_Argument=Missing required argument -{0}.
-Help_A_list_of_properties_in_the_form_key_value_pairs=A list of properties in the form key=value pairs. Effective only when a new profile is created.
-Help_A_list_of_URLs_denoting_artifact_repositories=A list of URL's denoting artifact repositories.
-Help_A_list_of_URLs_denoting_colocated_repositories=A list of URL's denoting co-located meta-data and artifact repositories.
-Help_A_list_of_URLs_denoting_metadata_repositories=A list of URL's denoting meta-data repositories.
-Ambigous_Command=Cannot execute both {0} and {1} in one invocation.
-Application_NoManager=The repository manager is not available.
-Application_NoRepositories=Unable to load repositories.
-Help_Defines_flavor_to_use_for_created_profile=Defines what flavor to use for a newly created profile.
-Help_Defines_what_profile_to_use_for_the_actions=Defines what profile to use for the actions.
-Help_Indicates_that_the_product_can_be_moved=Indicates that the product resulting from the installation can be moved. Effective only when a new profile is created.
-Installing=Installing {0} {1}.
-Help_Installs_the_listed_IUs=Installs the listed IU's. Each entry in the list is in the form <id> [ '/' <version> ].
-Uninstalling=Uninstalling {0} {1}.
-Help_Uninstalls_the_listed_IUs=Uninstalls the listed IU's. Each entry in the list is in the form <id> [ '/' <version> ].
-Help_Use_a_shared_location_for_the_install=Use a shared location for the install. The <path> defaults to ${user.home}/.p2
-Ignored_repo=The repository {1} will not be considered.
-Help_lb_lt_path_gt_rb=[ <path> ]
-Help_List_all_IUs_found_in_repos=Lists all IU's found in the given repositories. IUs can optionally be listed. Each entry in the list is in the form <id> [ '/' <version> ].
-Help_Revert_to_previous_state=Revert the installation to a previous state [ the number representing the previous state of the profile as found in p2/org.eclipse.equinox.p2.engine/<profileId>/ ].
-Help_lt_comma_separated_list_gt=<comma separated list>
-Help_lb_lt_comma_separated_list_gt_rb=[ <comma separated list> ]
-Help_lt_name_gt=<name>
-Help_lt_path_gt=<path>
-option_0_requires_an_argument=Option {0} requires an argument.
-Help_Prints_this_command_line_help=Prints this command line help information.
-Help_The_ARCH_when_profile_is_created=The architecture to use when the profile is created.
-Help_The_folder_in_which_the_targetd_product_is_located=The folder in which the targeted product is located.
-Help_The_location_where_the_plugins_and_features_will_be_stored=The location where the plug-ins and features will be stored. Effective only when a new profile is created.
-Help_The_NL_when_profile_is_created=The language to use when the profile is created.
-Help_The_OS_when_profile_is_created=The OS to use when the profile is created.
-Help_The_WS_when_profile_is_created=The windowing system to use when the profile is created.
-Help_Purge_the_install_registry=Remove the history of the profile registry.
-unable_to_parse_0_to_uri_1=Unable to parse {0} into an URI: {1}.
-unknown_option_0=Unknown option {0}. Use -help for a list of known options.
-Help_Missing_argument=The argument specifying what to install or uninstall is missing.
-Missing_profile = The profile to revert to could not be found.
-problem_CallingDirector=A problem occured while invoking the director.
-problem_repoMustBeURI = The repository location ({0}) must be a URI.
-unableToWriteLogFile=Unable to write to the log file {0}.
-
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java b/bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java
deleted file mode 100644
index a753b225f..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.director.app.ant;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.apache.tools.ant.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.internal.p2.director.app.*;
-import org.eclipse.equinox.p2.metadata.VersionedId;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * An Ant task to call the p2 Director application.
- *
- * @since 1.0
- */
-public class DirectorTask extends Task implements ILog {
- private static final String ANT_PREFIX = "${"; //$NON-NLS-1$
- private static final String ENTRY = "!ENTRY "; //$NON-NLS-1$
- private static final String SUBENTRY = "!SUBENTRY "; //$NON-NLS-1$
- private static final String logEntry = "{0} {1} {2}\n"; //$NON-NLS-1$
- private static final String MESSAGE = "!MESSAGE "; //$NON-NLS-1$
-
- private boolean roaming;
- private boolean list;
- private String profile, flavor, os, ws, nl, arch, uninstallIU;
- private String extraArguments;
- private File destination, bundlePool, agentLocation;
- private URI metadataRepository, artifactRepository;
- private List<IUDescription> ius = new ArrayList<IUDescription>();
- private String outputProperty;
- private StringBuffer outputBuffer = null;
- private File logFile = null;
-
- public static class IUDescription {
- private String id = null;
- private String version = null;
-
- public VersionedId getVersionedId() {
- return new VersionedId(id, version);
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public void setVersion(String version) {
- if (version.length() > 0 && !version.startsWith(ANT_PREFIX))
- this.version = version;
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() throws BuildException {
- Object result = null;
- try {
- if (outputProperty != null)
- outputBuffer = new StringBuffer();
-
- // collect the arguments and call the application
- DirectorApplication application = new DirectorApplication();
- application.setLog(this);
- result = application.run(getArguments());
- } catch (Exception e) {
- getProject().log(Messages.problem_CallingDirector, e, Project.MSG_ERR);
- throw new BuildException(Messages.problem_CallingDirector, e);
- } finally {
- log(outputBuffer);
- }
- if (result != null && !result.equals(IApplication.EXIT_OK)) {
- getProject().log(Messages.problem_CallingDirector, Project.MSG_ERR);
- throw new BuildException(Messages.problem_CallingDirector);
- }
- }
-
- public void addConfiguredIu(IUDescription iu) {
- ius.add(iu);
- }
-
- private String[] getArguments() {
- List<String> result = new ArrayList<String>();
- if (roaming)
- result.add("-roaming"); //$NON-NLS-1$
- if (profile != null) {
- result.add("-profile"); //$NON-NLS-1$
- result.add(profile);
- }
- if (extraArguments != null) {
- StringTokenizer tokenizer = new StringTokenizer(extraArguments);
- while (tokenizer.hasMoreTokens()) {
- result.add(tokenizer.nextToken());
- }
- }
- if (destination != null) {
- result.add("-destination"); //$NON-NLS-1$
- result.add(destination.getAbsolutePath());
- }
- if (bundlePool != null) {
- result.add("-bundlePool"); //$NON-NLS-1$
- result.add(bundlePool.getAbsolutePath());
- }
- if (agentLocation != null) {
- result.add("-shared"); //$NON-NLS-1$
- result.add(agentLocation.getAbsolutePath());
- }
- if (metadataRepository != null) {
- result.add("-metadataRepository"); //$NON-NLS-1$
- result.add(URIUtil.toUnencodedString(metadataRepository));
- }
- if (artifactRepository != null) {
- result.add("-artifactRepository"); //$NON-NLS-1$
- result.add(URIUtil.toUnencodedString(artifactRepository));
- }
- if (flavor != null) {
- result.add("-flavor"); //$NON-NLS-1$
- result.add(flavor);
- }
- if (ius.size() > 0) {
- result.add("-installIUs"); //$NON-NLS-1$
- StringBuffer arg = new StringBuffer();
- for (Iterator<IUDescription> iterator = ius.iterator(); iterator.hasNext();) {
- IUDescription object = iterator.next();
- arg.append(object.getVersionedId().toString());
- if (iterator.hasNext())
- arg.append(',');
- }
- result.add(arg.toString());
- }
- if (os != null) {
- result.add("-p2.os"); //$NON-NLS-1$
- result.add(os);
- }
- if (ws != null) {
- result.add("-p2.ws"); //$NON-NLS-1$
- result.add(ws);
- }
- if (arch != null) {
- result.add("-p2.arch"); //$NON-NLS-1$
- result.add(arch);
- }
- if (nl != null) {
- result.add("-p2.nl"); //$NON-NLS-1$
- result.add(nl);
- }
- if (list) {
- result.add("-list"); //$NON-NLS-1$
- }
-
- if (uninstallIU != null) {
- result.add("-uninstallIU"); //$NON-NLS-1$
- result.add(uninstallIU);
- }
- return result.toArray(new String[result.size()]);
- }
-
- public void setArch(String value) {
- arch = value;
- }
-
- public void setArtifactRepository(String value) {
- try {
- artifactRepository = URIUtil.fromString(value);
- } catch (URISyntaxException e) {
- log(NLS.bind(Messages.problem_repoMustBeURI, value), e, Project.MSG_ERR);
- }
- }
-
- public void setBundlePool(String value) {
- bundlePool = new File(value);
- }
-
- public void setDestination(String value) {
- destination = new File(value);
- }
-
- public void setFlavor(String value) {
- if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
- flavor = value;
- }
-
- public void setList(String value) {
- if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
- list = Boolean.valueOf(value).booleanValue();
- }
-
- public void setMetadataRepository(String value) {
- try {
- metadataRepository = URIUtil.fromString(value);
- } catch (URISyntaxException e) {
- log(NLS.bind(Messages.problem_repoMustBeURI, value), e, Project.MSG_ERR);
- }
- }
-
- public void setNl(String value) {
- if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
- nl = value;
- }
-
- public void setOs(String value) {
- if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
- os = value;
- }
-
- public void setProfile(String value) {
- if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
- profile = value;
- }
-
- public void setExtraArguments(String value) {
- if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX)) {
- extraArguments = value;
- }
-
- }
-
- public void setRoaming(String value) {
- if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
- roaming = Boolean.valueOf(value).booleanValue();
- }
-
- public void setUninstallIU(String value) {
- if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
- uninstallIU = value;
- }
-
- public void setWs(String value) {
- if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
- ws = value;
- }
-
- public void setAgentLocation(String value) {
- if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
- agentLocation = new File(value);
- }
-
- public void log(String msg) {
- if (outputBuffer != null) {
- outputBuffer.append(msg);
- if (!msg.endsWith("\n")) //$NON-NLS-1$
- outputBuffer.append('\n');
- }
- super.log(msg, Project.MSG_INFO);
- }
-
- public void log(IStatus status) {
- log(0, status);
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- log(1, children[i]);
- }
- }
- }
-
- private void log(int depth, IStatus status) {
- log(status.getMessage(), status.getException(), Project.MSG_ERR);
- if (outputBuffer != null) {
- if (depth == 0)
- outputBuffer.append(ENTRY);
- else
- outputBuffer.append(SUBENTRY);
- outputBuffer.append(NLS.bind(logEntry, new String[] {status.getPlugin(), Integer.toString(status.getSeverity()), Integer.toString(status.getCode())}));
- outputBuffer.append(MESSAGE);
- outputBuffer.append(status.getMessage());
- outputBuffer.append('\n');
- }
- }
-
- private void log(StringBuffer buffer) {
- if (outputBuffer == null)
- return;
-
- String logString = outputBuffer.toString();
- getProject().setNewProperty(outputProperty, logString);
-
- if (logFile != null) {
- File parentFile = logFile.getParentFile();
- if (parentFile != null && !parentFile.exists())
- parentFile.mkdirs();
-
- FileWriter writer = null;
- try {
- writer = new FileWriter(logFile);
- writer.write(logString);
-
- } catch (IOException e) {
- getProject().log(NLS.bind(Messages.unableToWriteLogFile, logFile.getAbsolutePath()), e, Project.MSG_WARN);
- } finally {
- if (writer != null) {
- try {
- writer.close();
- } catch (IOException e) {
- //ignore
- }
- }
- }
- }
- }
-
- public void setOutputProperty(String property) {
- this.outputProperty = property;
- }
-
- public void setLogFile(String file) {
- if (file != null && !file.startsWith(ANT_PREFIX)) {
- this.logFile = new File(file);
- if (!logFile.isAbsolute()) {
- logFile = new File(getProject().getBaseDir(), file);
- }
- }
- }
-
- public void close() {
- // ILog#close(), nothing to do here
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java
index 72b9e11b5..4b3e7f89b 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java
@@ -30,8 +30,6 @@ public class Messages extends NLS {
public static String Director_Task_Resolving_Dependencies;
public static String Director_Unsatisfied_Dependencies;
public static String Director_error_applying_configuration;
- public static String Director_For_Target;
- public static String Director_For_Target_Unselect_Required;
public static String Explanation_alreadyInstalled;
public static String Explanation_from;
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
index 7fea137f2..d92964abf 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
@@ -17,8 +17,6 @@ import java.util.*;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.p2.director.Explanation.MissingIU;
-import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.p2.metadata.query.UpdateQuery;
import org.eclipse.equinox.internal.p2.rollback.FormerState;
import org.eclipse.equinox.internal.provisional.p2.director.*;
@@ -129,22 +127,6 @@ public class SimplePlanner implements IPlanner {
private IStatus convertExplanationToStatus(Set<Explanation> explanations) {
if (explanations == null)
return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, Messages.Director_Unsatisfied_Dependencies);
-
- // hack to create a useful message when a user installs something intended for a target platform into the IDE
- ArrayList<IStatus> forTargets = new ArrayList<IStatus>(0);
- for (Explanation next : explanations) {
- if (next instanceof Explanation.MissingIU) {
- Explanation.MissingIU missingIU = (MissingIU) next;
- if (missingIU.req instanceof IRequiredCapability && "A.PDE.Target.Platform".equals(((IRequiredCapability) missingIU.req).getNamespace())) //$NON-NLS-1$
- forTargets.add(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, missingIU.getUserReadableName(missingIU.iu)));
- }
- }
- if (forTargets.size() > 0) {
- // add a blurb about disabling 'include required software'. The following line could be removed if bug 309863 is fixed
- forTargets.add(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, Messages.Director_For_Target_Unselect_Required));
- // return a multi status with all the IUs that require A.PDE.Target.Platform
- return new MultiStatus(DirectorActivator.PI_DIRECTOR, 1, forTargets.toArray(new IStatus[forTargets.size()]), Messages.Director_For_Target, null);
- }
MultiStatus root = new MultiStatus(DirectorActivator.PI_DIRECTOR, 1, Messages.Director_Unsatisfied_Dependencies, null);
//try to find a more specific root message if possible
String specificMessage = null;
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties
index f05266c81..e52f3df51 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties
@@ -16,8 +16,6 @@ Director_Task_Resolving_Dependencies=Calculating requirements and dependencies.
Director_Unsatisfied_Dependencies=\
Cannot complete the install because some dependencies are not satisfiable
Director_error_applying_configuration=Unexpected failure applying configuration after for the installer plan execution.
-Director_For_Target = The following software cannot be installed because it is intended for use only in Plug-in Development Environment (PDE) target platforms. Please deselect these items and retry the operation.
-Director_For_Target_Unselect_Required = If provisioning a target platform then try disabling the option ''Include required software''
Explanation_alreadyInstalled=Software currently installed: {0}
Explanation_from=From: {0}
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/.classpath b/bundles/org.eclipse.equinox.p2.directorywatcher/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/.project b/bundles/org.eclipse.equinox.p2.directorywatcher/.project
deleted file mode 100644
index 349eb7607..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.directorywatcher</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 925b1bff0..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,329 +0,0 @@
-#Wed Dec 23 00:33:28 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 1546d829a..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,58 +0,0 @@
-#Tue Aug 21 11:27:48 CDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-internal.default.compliance=user
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=99
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 6904bd96c..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Sat Aug 11 20:17:52 EDT 2007
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.directorywatcher/META-INF/MANIFEST.MF
deleted file mode 100644
index d04ee2d39..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,32 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.directorywatcher;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.provisional.p2.directorywatcher.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.provisional.p2.directorywatcher;x-friends:="org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.p2.extensionlocation"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.3.0,4.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.equinox.internal.p2.artifact.repository.simple,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.metadata.expression,
- org.eclipse.equinox.internal.p2.update,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.publisher.actions,
- org.eclipse.equinox.p2.publisher.eclipse,
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.service.resolver;version="1.1.0",
- org.eclipse.osgi.util,
- org.osgi.framework;version="1.4.0",
- org.osgi.service.packageadmin;version="1.2.0"
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/about.html b/bundles/org.eclipse.equinox.p2.directorywatcher/about.html
deleted file mode 100644
index d62785d75..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/about.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
- <h3>Third Party Content</h3>
- <p>The Content includes items that have been sourced from third parties as set out below. If you
- did not receive this Content directly from the Eclipse Foundation, the following is provided
- for informational purposes only, and you should look to the Redistributor's license for
- terms and conditions of use.</p>
-
- <h4>FileInstall 1.0</h4>
- <p>The bundle includes derivative works of software originally developed by Peter Kriens (aQute).
- That original work was licensed under the EPL v1.0 and this derivative work is similarly licensed.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/build.properties b/bundles/org.eclipse.equinox.p2.directorywatcher/build.properties
deleted file mode 100644
index ca5030900..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
-src.includes = about.html
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/plugin.properties b/bundles/org.eclipse.equinox.p2.directorywatcher/plugin.properties
deleted file mode 100644
index d8a6f4e18..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Equinox Provisioning Directory Watcher
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/pom.xml b/bundles/org.eclipse.equinox.p2.directorywatcher/pom.xml
deleted file mode 100644
index 39a919fdc..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.directorywatcher</artifactId>
- <version>1.0.100.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Activator.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Activator.java
deleted file mode 100644
index 05cd04b94..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Activator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Code 9 - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.directorywatcher;
-
-import java.io.File;
-import java.net.URI;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-/**
- * Bundle activator for directory watcher bundle.
- */
-public class Activator implements BundleActivator {
- public static final String ID = "org.eclipse.equinox.p2.directorywatcher"; //$NON-NLS-1$
-
- private static BundleContext context;
-
- public static BundleContext getContext() {
- return context;
- }
-
- public void start(BundleContext aContext) throws Exception {
- context = aContext;
- }
-
- public void stop(BundleContext aContext) throws Exception {
- context = null;
- }
-
- public static IArtifactRepositoryManager getArtifactRepositoryManager() {
- return (IArtifactRepositoryManager) ((IProvisioningAgent) ServiceHelper.getService(context, IProvisioningAgent.SERVICE_NAME)).getService(IArtifactRepositoryManager.SERVICE_NAME);
- }
-
- public static IMetadataRepositoryManager getMetadataRepositoryManager() {
- return (IMetadataRepositoryManager) ((IProvisioningAgent) ServiceHelper.getService(context, IProvisioningAgent.SERVICE_NAME)).getService(IMetadataRepositoryManager.SERVICE_NAME);
- }
-
- public static URI getDefaultRepositoryLocation(Object object, String repositoryName) {
- PackageAdmin packageAdmin = (PackageAdmin) ServiceHelper.getService(context, PackageAdmin.class.getName());
- Bundle bundle = packageAdmin.getBundle(object.getClass());
- BundleContext context = bundle.getBundleContext();
- File base = context.getDataFile(""); //$NON-NLS-1$
- File result = new File(base, "listener_" + repositoryName.hashCode()); //$NON-NLS-1$
- result.mkdirs();
- return result.toURI();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java
deleted file mode 100644
index 36bfd20b4..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.directorywatcher;
-
-import java.io.File;
-import java.io.OutputStream;
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.metadata.expression.CompoundIterator;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-
-public class CachingArtifactRepository implements IArtifactRepository, IFileArtifactRepository {
-
- private static final String NULL = ""; //$NON-NLS-1$
- private IArtifactRepository innerRepo;
- private Set<IArtifactDescriptor> descriptorsToAdd = new HashSet<IArtifactDescriptor>();
- private Map<IArtifactKey, List<IArtifactDescriptor>> artifactMap = new HashMap<IArtifactKey, List<IArtifactDescriptor>>();
- private Set<IArtifactDescriptor> descriptorsToRemove = new HashSet<IArtifactDescriptor>();
- private Map<String, String> propertyChanges = new HashMap<String, String>();
-
- protected CachingArtifactRepository(IArtifactRepository innerRepo) {
- this.innerRepo = innerRepo;
- }
-
- public void save() {
- savePropertyChanges();
- saveAdditions();
- saveRemovals();
- }
-
- private void saveRemovals() {
- for (IArtifactDescriptor desc : descriptorsToRemove)
- innerRepo.removeDescriptor(desc);
- descriptorsToRemove.clear();
- }
-
- private void saveAdditions() {
- if (descriptorsToAdd.isEmpty())
- return;
- innerRepo.addDescriptors(descriptorsToAdd.toArray(new IArtifactDescriptor[descriptorsToAdd.size()]));
- descriptorsToAdd.clear();
- artifactMap.clear();
- }
-
- private void savePropertyChanges() {
- for (String key : propertyChanges.keySet()) {
- String value = propertyChanges.get(key);
- innerRepo.setProperty(key, value == NULL ? null : value);
- }
- propertyChanges.clear();
- }
-
- private void mapDescriptor(IArtifactDescriptor descriptor) {
- IArtifactKey key = descriptor.getArtifactKey();
- List<IArtifactDescriptor> descriptors = artifactMap.get(key);
- if (descriptors == null) {
- descriptors = new ArrayList<IArtifactDescriptor>();
- artifactMap.put(key, descriptors);
- }
- descriptors.add(descriptor);
- }
-
- private void unmapDescriptor(IArtifactDescriptor descriptor) {
- IArtifactKey key = descriptor.getArtifactKey();
- List<IArtifactDescriptor> descriptors = artifactMap.get(key);
- if (descriptors == null) {
- // we do not have the descriptor locally so remember it to be removed from
- // the inner repo on save.
- descriptorsToRemove.add(descriptor);
- return;
- }
-
- descriptors.remove(descriptor);
- if (descriptors.isEmpty())
- artifactMap.remove(key);
- }
-
- public synchronized void addDescriptors(IArtifactDescriptor[] descriptors) {
- for (int i = 0; i < descriptors.length; i++) {
- ((ArtifactDescriptor) descriptors[i]).setRepository(this);
- descriptorsToAdd.add(descriptors[i]);
- mapDescriptor(descriptors[i]);
- }
- }
-
- public synchronized void addDescriptor(IArtifactDescriptor toAdd) {
- ((ArtifactDescriptor) toAdd).setRepository(this);
- descriptorsToAdd.add(toAdd);
- mapDescriptor(toAdd);
- }
-
- public synchronized IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key) {
- List<IArtifactDescriptor> result = artifactMap.get(key);
- if (result == null)
- return innerRepo.getArtifactDescriptors(key);
- result = new ArrayList<IArtifactDescriptor>(result);
- result.addAll(Arrays.asList(innerRepo.getArtifactDescriptors(key)));
- return result.toArray(new IArtifactDescriptor[result.size()]);
- }
-
- public synchronized boolean contains(IArtifactDescriptor descriptor) {
- return descriptorsToAdd.contains(descriptor) || innerRepo.contains(descriptor);
- }
-
- public synchronized boolean contains(IArtifactKey key) {
- return artifactMap.containsKey(key) || innerRepo.contains(key);
- }
-
- public IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- return innerRepo.getArtifact(descriptor, destination, monitor);
- }
-
- public IStatus getRawArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- return innerRepo.getRawArtifact(descriptor, destination, monitor);
- }
-
- public IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor) {
- return Status.OK_STATUS;
- }
-
- public OutputStream getOutputStream(IArtifactDescriptor descriptor) {
- return null;
- }
-
- public synchronized void removeAll() {
- IArtifactDescriptor[] toRemove = descriptorsToAdd.toArray(new IArtifactDescriptor[descriptorsToAdd.size()]);
- for (int i = 0; i < toRemove.length; i++)
- doRemoveArtifact(toRemove[i]);
- }
-
- public synchronized void removeDescriptor(IArtifactDescriptor descriptor) {
- doRemoveArtifact(descriptor);
- }
-
- public synchronized void removeDescriptor(IArtifactKey key) {
- IArtifactDescriptor[] toRemove = getArtifactDescriptors(key);
- for (int i = 0; i < toRemove.length; i++)
- doRemoveArtifact(toRemove[i]);
- }
-
- /**
- * Removes the given descriptor and returns <code>true</code> if and only if the
- * descriptor existed in the repository, and was successfully removed.
- */
- private boolean doRemoveArtifact(IArtifactDescriptor descriptor) {
- // if the descriptor is already in the pending additoins, remove it
- boolean result = descriptorsToAdd.remove(descriptor);
- if (result)
- unmapDescriptor(descriptor);
- // either way, note this as a descriptor to remove from the inner repo
- descriptorsToRemove.add(descriptor);
- return result;
- }
-
- public String getDescription() {
- return innerRepo.getDescription();
- }
-
- public URI getLocation() {
- return innerRepo.getLocation();
- }
-
- public String getName() {
- return innerRepo.getName();
- }
-
- public Map<String, String> getProperties() {
- // TODO need to combine the local and inner properties
- return innerRepo.getProperties();
- }
-
- public String getProperty(String key) {
- return innerRepo.getProperty(key);
- }
-
- public String getProvider() {
- return innerRepo.getProvider();
- }
-
- public IProvisioningAgent getProvisioningAgent() {
- return innerRepo.getProvisioningAgent();
- }
-
- public String getType() {
- return innerRepo.getType();
- }
-
- public String getVersion() {
- return innerRepo.getVersion();
- }
-
- public boolean isModifiable() {
- return innerRepo.isModifiable();
- }
-
- public String setProperty(String key, String value) {
- String result = getProperties().get(key);
- propertyChanges.put(key, value == null ? NULL : value);
- return result;
- }
-
- @SuppressWarnings("rawtypes")
- public Object getAdapter(Class adapter) {
- return innerRepo.getAdapter(adapter);
- }
-
- public File getArtifactFile(IArtifactKey key) {
- if (innerRepo instanceof IFileArtifactRepository)
- return ((IFileArtifactRepository) innerRepo).getArtifactFile(key);
- return null;
- }
-
- public File getArtifactFile(IArtifactDescriptor descriptor) {
- if (innerRepo instanceof IFileArtifactRepository)
- return ((IFileArtifactRepository) innerRepo).getArtifactFile(descriptor);
- return null;
- }
-
- public IArtifactDescriptor createArtifactDescriptor(IArtifactKey key) {
- return innerRepo.createArtifactDescriptor(key);
- }
-
- public IArtifactKey createArtifactKey(String classifier, String id, Version version) {
- return innerRepo.createArtifactKey(classifier, id, version);
- }
-
- public IQueryable<IArtifactDescriptor> descriptorQueryable() {
- final Collection<List<IArtifactDescriptor>> descs = artifactMap.values();
- IQueryable<IArtifactDescriptor> cached = new IQueryable<IArtifactDescriptor>() {
- public IQueryResult<IArtifactDescriptor> query(IQuery<IArtifactDescriptor> query, IProgressMonitor monitor) {
- return query.perform(new CompoundIterator<IArtifactDescriptor>(descs.iterator()));
- }
- };
-
- return QueryUtil.compoundQueryable(cached, innerRepo.descriptorQueryable());
- }
-
- public IQueryResult<IArtifactKey> query(IQuery<IArtifactKey> query, IProgressMonitor monitor) {
- final Iterator<IArtifactKey> keyIterator = artifactMap.keySet().iterator();
- IQueryable<IArtifactKey> cached = new IQueryable<IArtifactKey>() {
- public IQueryResult<IArtifactKey> query(IQuery<IArtifactKey> q, IProgressMonitor mon) {
- return q.perform(keyIterator);
- }
- };
-
- IQueryable<IArtifactKey> compound = QueryUtil.compoundQueryable(cached, innerRepo);
- return compound.query(query, monitor);
- }
-
- public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
- try {
- runnable.run(monitor);
- } catch (OperationCanceledException oce) {
- return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce);
- } catch (Exception e) {
- return new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
- }
- return Status.OK_STATUS;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryChangeListener.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryChangeListener.java
deleted file mode 100644
index 515e19d29..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryChangeListener.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial implementation and ideas
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.directorywatcher;
-
-import java.io.File;
-
-/*
- * Abstract class which contains stub methods. Sub-classes to over-ride
- * methods which they are interested in.
- */
-public abstract class DirectoryChangeListener {
-
- public void startPoll() {
- // do nothing
- }
-
- public void stopPoll() {
- // do nothing
- }
-
- public boolean isInterested(File file) {
- return false;
- }
-
- public boolean added(File file) {
- return false;
- }
-
- public boolean removed(File file) {
- return false;
- }
-
- public boolean changed(File file) {
- return false;
- }
-
- //TODO this method name needs to be more descriptive. getLastModified?
- public Long getSeenFile(File file) {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryWatcher.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryWatcher.java
deleted file mode 100644
index c47d07603..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryWatcher.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 aQute and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * aQute - initial implementation and ideas
- * IBM Corporation - initial adaptation to Equinox provisioning use
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.directorywatcher;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-
-public class DirectoryWatcher {
- private static final String DEL_EXT = ".del"; //$NON-NLS-1$
-
- public class WatcherThread extends Thread {
-
- private final long pollFrequency;
- private boolean done = false;
-
- public WatcherThread(long pollFrequency) {
- super("Directory Watcher"); //$NON-NLS-1$
- this.pollFrequency = pollFrequency;
- }
-
- public void run() {
- do {
- try {
- poll();
- synchronized (this) {
- wait(pollFrequency);
- }
- } catch (InterruptedException e) {
- // ignore
- } catch (Throwable e) {
- log(Messages.error_main_loop, e);
- done = true;
- }
- } while (!done);
- }
-
- public synchronized void done() {
- done = true;
- notify();
- }
- }
-
- public final static String POLL = "eclipse.p2.directory.watcher.poll"; //$NON-NLS-1$
- public final static String DIR = "eclipse.p2.directory.watcher.dir"; //$NON-NLS-1$
- private static final long DEFAULT_POLL_FREQUENCY = 2000;
-
- public static void log(String string, Throwable e) {
- System.err.println(string + ": " + e); //$NON-NLS-1$
- }
-
- final File[] directories;
-
- long poll = 2000;
- private Set<DirectoryChangeListener> listeners = new HashSet<DirectoryChangeListener>();
- private HashSet<File> scannedFiles = new HashSet<File>();
- private HashSet<File> removals;
- private Set<File> pendingDeletions;
- private WatcherThread watcher;
-
- public DirectoryWatcher(Map<String, String> properties, BundleContext context) {
- String dir = properties.get(DIR);
- if (dir == null)
- dir = "./load"; //$NON-NLS-1$
-
- File targetDirectory = new File(dir);
- targetDirectory.mkdirs();
- directories = new File[] {targetDirectory};
- }
-
- public DirectoryWatcher(File directory) {
- if (directory == null)
- throw new IllegalArgumentException(Messages.null_folder);
-
- this.directories = new File[] {directory};
- }
-
- public DirectoryWatcher(File[] directories) {
- if (directories == null)
- throw new IllegalArgumentException(Messages.null_folder);
- this.directories = directories;
- }
-
- public synchronized void addListener(DirectoryChangeListener listener) {
- listeners.add(listener);
- }
-
- public synchronized void removeListener(DirectoryChangeListener listener) {
- listeners.remove(listener);
- }
-
- public void start() {
- start(DEFAULT_POLL_FREQUENCY);
- }
-
- public synchronized void poll() {
- startPoll();
- scanDirectories();
- stopPoll();
- }
-
- public synchronized void start(final long pollFrequency) {
- if (watcher != null)
- throw new IllegalStateException(Messages.thread_started);
-
- watcher = new WatcherThread(pollFrequency);
- watcher.start();
- }
-
- public synchronized void stop() {
- if (watcher == null)
- throw new IllegalStateException(Messages.thread_not_started);
-
- watcher.done();
- watcher = null;
- }
-
- public File[] getDirectories() {
- return directories;
- }
-
- private void startPoll() {
- removals = scannedFiles;
- scannedFiles = new HashSet<File>();
- pendingDeletions = new HashSet<File>();
- for (DirectoryChangeListener listener : listeners)
- listener.startPoll();
- }
-
- private void scanDirectories() {
- for (int index = 0; index < directories.length; index++) {
- File directory = directories[index];
- File list[] = directory.listFiles();
- if (list == null)
- continue;
- for (int i = 0; i < list.length; i++) {
- File file = list[i];
- // if this is a deletion marker then add to the list of pending deletions.
- if (list[i].getPath().endsWith(DEL_EXT)) {
- File target = new File(file.getPath().substring(0, file.getPath().length() - 4));
- removals.add(target);
- pendingDeletions.add(target);
- } else {
- // else remember that we saw the file and remove it from this list of files to be
- // removed at the end. Then notify all the listeners as needed.
- scannedFiles.add(file);
- removals.remove(file);
- for (DirectoryChangeListener listener : listeners) {
- if (isInterested(listener, file))
- processFile(file, listener);
- }
- }
- }
- }
- }
-
- private void stopPoll() {
- notifyRemovals();
- removals = scannedFiles;
- for (DirectoryChangeListener listener : listeners)
- listener.stopPoll();
- processPendingDeletions();
- }
-
- private boolean isInterested(DirectoryChangeListener listener, File file) {
- return listener.isInterested(file);
- }
-
- /**
- * Notify the listeners of the files that have been deleted or marked for deletion.
- */
- private void notifyRemovals() {
- Set<File> removed = removals;
- for (DirectoryChangeListener listener : listeners) {
- for (File file : removed) {
- if (isInterested(listener, file))
- listener.removed(file);
- }
- }
- }
-
- private void processFile(File file, DirectoryChangeListener listener) {
- try {
- Long oldTimestamp = listener.getSeenFile(file);
- if (oldTimestamp == null) {
- // The file is new
- listener.added(file);
- } else {
- // The file is not new but may have changed
- long lastModified = file.lastModified();
- if (oldTimestamp.longValue() != lastModified)
- listener.changed(file);
- }
- } catch (Exception e) {
- log(NLS.bind(Messages.error_processing, listener), e);
- }
- }
-
- /**
- * Try to remove the files that have been marked for deletion.
- */
- private void processPendingDeletions() {
- for (Iterator<File> iterator = pendingDeletions.iterator(); iterator.hasNext();) {
- File file = iterator.next();
- if (!file.exists() || file.delete())
- iterator.remove();
- new File(file.getPath() + DEL_EXT).delete();
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/EntryAdvice.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/EntryAdvice.java
deleted file mode 100644
index 00b12b749..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/EntryAdvice.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.directorywatcher;
-
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
-import org.eclipse.equinox.p2.metadata.Version;
-
-import java.io.File;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.equinox.internal.p2.update.Site;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.publisher.actions.IPropertyAdvice;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-
-/**
- * Entry advice captures the name, location, modified time, shape etc of something
- * discovered by the repository listener. It is a simplified structure intended to represent
- * only one entry at a time and that entry is the the only entry being published.
- */
-public class EntryAdvice implements IPropertyAdvice {
- private Map<String, String> metadataProps = new HashMap<String, String>();
- private Map<String, String> artifactProps = new HashMap<String, String>();
-
- public boolean isApplicable(String configSpec, boolean includeDefault, String id, Version version) {
- return true;
- }
-
- void setProperties(File location, long timestamp, URI reference) {
- setProperties(location, timestamp, reference, null);
- }
-
- void setProperties(File location, long timestamp, URI reference, String linkFile) {
- if (reference == null)
- artifactProps.remove(RepositoryListener.ARTIFACT_REFERENCE);
- else
- artifactProps.put(RepositoryListener.ARTIFACT_REFERENCE, reference.toString());
- if (location.isDirectory())
- artifactProps.put(RepositoryListener.ARTIFACT_FOLDER, Boolean.TRUE.toString());
- else
- artifactProps.remove(RepositoryListener.ARTIFACT_FOLDER);
- artifactProps.put(RepositoryListener.FILE_NAME, location.getAbsolutePath());
- metadataProps.put(RepositoryListener.FILE_NAME, location.getAbsolutePath());
- metadataProps.put(RepositoryListener.FILE_LAST_MODIFIED, Long.toString(timestamp));
- if (linkFile != null)
- metadataProps.put(Site.PROP_LINK_FILE, linkFile);
- }
-
- public Map<String, String> getArtifactProperties(IInstallableUnit iu, IArtifactDescriptor descriptor) {
- return artifactProps;
- }
-
- public Map<String, String> getInstallableUnitProperties(InstallableUnitDescription iu) {
- return metadataProps;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Messages.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Messages.java
deleted file mode 100644
index 74d19b6aa..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Messages.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.directorywatcher;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.provisional.p2.directorywatcher.messages"; //$NON-NLS-1$
- public static String artifact_repo_manager_not_registered;
- public static String error_main_loop;
- public static String error_processing;
- public static String failed_create_artifact_repo;
- public static String failed_create_metadata_repo;
- public static String filename_missing;
- public static String metadata_repo_manager_not_registered;
- public static String null_folder;
- public static String thread_not_started;
- public static String thread_started;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- //
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java
deleted file mode 100644
index e84e91e53..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial implementation and ideas
- * Code 9 - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.directorywatcher;
-
-import java.io.File;
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactDescriptor;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.update.Site;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
-import org.eclipse.equinox.p2.publisher.eclipse.FeaturesAction;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-import org.eclipse.osgi.util.NLS;
-
-public class RepositoryListener extends DirectoryChangeListener {
- public static final String ARTIFACT_FOLDER = "artifact.folder"; //$NON-NLS-1$
- public static final String ARTIFACT_REFERENCE = "artifact.reference"; //$NON-NLS-1$
- public static final String FILE_LAST_MODIFIED = "file.lastModified"; //$NON-NLS-1$
- public static final String FILE_NAME = "file.name"; //$NON-NLS-1$
- private final IMetadataRepository metadataRepository;
- private final CachingArtifactRepository artifactRepository;
- // at any point in time currentFiles is the list of files/dirs that the watcher has seen and
- // believes to be on disk.
- private final Map<File, Long> currentFiles = new HashMap<File, Long>();
- private final Collection<File> polledSeenFiles = new HashSet<File>();
-
- private EntryAdvice advice = new EntryAdvice();
- private PublisherInfo info;
- private IPublisherResult iusToAdd;
- private IPublisherResult iusToChange;
-
- /**
- * Create a repository listener that watches the specified folder and generates repositories
- * for its content.
- * @param repositoryName the repository name to use for the repository
- * @param 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<String, String> properties = new HashMap<String, String>(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<String, String> properties = new HashMap<String, String>(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 = metadataRepository.getProperties().get(Site.PROP_LINK_FILE);
- advice.setProperties(file, file.lastModified(), file.toURI(), link);
- return publish(new FeaturesAction(new File[] {file}), isAddition);
- }
-
- private boolean publish(IPublisherAction action, boolean isAddition) {
- IPublisherResult result = isAddition ? iusToAdd : iusToChange;
- return action.perform(info, result, new NullProgressMonitor()).isOK();
- }
-
- public boolean isInterested(File file) {
- return true;
- }
-
- public Long getSeenFile(File file) {
- Long lastSeen = currentFiles.get(file);
- if (lastSeen != null)
- polledSeenFiles.add(file);
- return lastSeen;
- }
-
- public void startPoll() {
- iusToAdd = new PublisherResult();
- iusToChange = new PublisherResult();
- synchronizeCurrentFiles();
- }
-
- public void stopPoll() {
- final Set<File> filesToRemove = new HashSet<File>(currentFiles.keySet());
- filesToRemove.removeAll(polledSeenFiles);
- polledSeenFiles.clear();
-
- synchronizeMetadataRepository(filesToRemove);
- synchronizeArtifactRepository(filesToRemove);
- iusToAdd = null;
- iusToChange = null;
- }
-
- /**
- * Flush all the pending changes to the metadata repository.
- */
- private void synchronizeMetadataRepository(final Collection<File> removedFiles) {
- if (metadataRepository == null)
- return;
- final Collection<IInstallableUnit> changes = iusToChange.getIUs(null, null);
- // first remove any IUs that have changed or that are associated with removed files
- if (!removedFiles.isEmpty() || !changes.isEmpty()) {
- metadataRepository.removeInstallableUnits(changes);
-
- // create a query that will identify all ius related to removed files.
- // It's safe to compare a String with a File since the auto coercion will
- // first convert the String into a File.
- IQuery<IInstallableUnit> removeQuery = QueryUtil.createMatchQuery( //
- "$1.exists(x | properties[$0] == x)", FILE_NAME, removedFiles); //$NON-NLS-1$
- IQueryResult<IInstallableUnit> toRemove = metadataRepository.query(removeQuery, null);
- metadataRepository.removeInstallableUnits(toRemove.toUnmodifiableSet());
- }
- // Then add all the new IUs as well as the new copies of the ones that have changed
- Collection<IInstallableUnit> additions = iusToAdd.getIUs(null, null);
- additions.addAll(changes);
- if (!additions.isEmpty())
- metadataRepository.addInstallableUnits(additions);
- }
-
- /**
- * Here the artifacts have all been added to the artifact repo. Remove the
- * descriptors related to any file that has been removed and flush the repo
- * to ensure that all the additions and removals have been completed.
- */
- private void synchronizeArtifactRepository(final Collection<File> removedFiles) {
- if (artifactRepository == null)
- return;
- if (!removedFiles.isEmpty()) {
- IQueryResult<IArtifactDescriptor> descriptors = artifactRepository.descriptorQueryable().query(ArtifactDescriptorQuery.ALL_DESCRIPTORS, null);
- for (Iterator<IArtifactDescriptor> iterator = descriptors.iterator(); iterator.hasNext();) {
- SimpleArtifactDescriptor descriptor = (SimpleArtifactDescriptor) iterator.next();
- 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) {
- IQueryResult<IInstallableUnit> ius = metadataRepository.query(QueryUtil.createIUAnyQuery(), null);
- for (Iterator<IInstallableUnit> it = ius.iterator(); it.hasNext();) {
- IInstallableUnit iu = it.next();
- String filename = iu.getProperty(FILE_NAME);
- if (filename == null) {
- 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.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java
index a5b94f15e..894c5ddf1 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java
@@ -24,6 +24,7 @@ import org.eclipse.equinox.p2.repository.*;
import org.eclipse.equinox.p2.repository.artifact.*;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.repository.spi.RepositoryReference;
/**
* A provisioning context defines the scope in which a provisioning operation
@@ -37,6 +38,8 @@ public class ProvisioningContext {
private final List<IInstallableUnit> extraIUs = Collections.synchronizedList(new ArrayList<IInstallableUnit>());
private URI[] metadataRepositories; //metadata repositories to consult
private final Map<String, String> properties = new HashMap<String, String>();
+ private Map<String, IRepositoryReference> metadataRepositorySnapshot = null;
+ private Map<String, IRepositoryReference> artifactRepositorySnapshot = null;
private Map<String, IArtifactRepository> referencedArtifactRepositories = null;
private static final String FILE_PROTOCOL = "file"; //$NON-NLS-1$
@@ -71,14 +74,19 @@ public class ProvisioningContext {
};
/**
- * Instructs the provisioning context to follow metadata repository references when
- * providing queryables for obtaining metadata and artifacts. When this property is set to
- * "true", then metadata repository references that are encountered while loading the
- * specified metadata repositories will be included in the provisioning
- * context.
+ * Instructs the provisioning context to follow repository references when providing
+ * queryables for obtaining metadata and artifacts. When this property is set to
+ * "true", then both enabled and disabled repository references that are encountered
+ * while loading the specified metadata repositories will be included in the provisioning
+ * context. In this mode, the provisioning context has a distinct lifecycle, whereby
+ * the metadata and artifact repositories to be used are determined when the client
+ * retrieves the metadata queryable. Clients using this property should not reset the
+ * list of metadata repository locations or artifact repository locations once the
+ * metadata queryable has been retrieved.
*
* @see #getMetadata(IProgressMonitor)
* @see #setMetadataRepositories(URI[])
+ * @see #setArtifactRepositories(URI[])
*/
public static final String FOLLOW_REPOSITORY_REFERENCES = "org.eclipse.equinox.p2.director.followRepositoryReferences"; //$NON-NLS-1$
@@ -103,6 +111,7 @@ public class ProvisioningContext {
* @return a queryable that can be used to query available artifact keys.
*
* @see #setArtifactRepositories(URI[])
+ * @see #FOLLOW_REPOSITORY_REFERENCES
*/
public IQueryable<IArtifactKey> getArtifactKeys(IProgressMonitor monitor) {
return QueryUtil.compoundQueryable(getLoadedArtifactRepositories(monitor));
@@ -116,6 +125,7 @@ public class ProvisioningContext {
* @return a queryable that can be used to query available artifact descriptors.
*
* @see #setArtifactRepositories(URI[])
+ * @see #FOLLOW_REPOSITORY_REFERENCES
*/
public IQueryable<IArtifactDescriptor> getArtifactDescriptors(IProgressMonitor monitor) {
List<IArtifactRepository> repos = getLoadedArtifactRepositories(monitor);
@@ -134,6 +144,7 @@ public class ProvisioningContext {
* @return a queryable that can be used to query available artifact repositories.
*
* @see #setArtifactRepositories(URI[])
+ * @see #FOLLOW_REPOSITORY_REFERENCES
*/
public IQueryable<IArtifactRepository> getArtifactRepositories(IProgressMonitor monitor) {
return new ArtifactRepositoryQueryable(getLoadedArtifactRepositories(monitor));
@@ -167,68 +178,141 @@ public class ProvisioningContext {
private Set<IMetadataRepository> getLoadedMetadataRepositories(IProgressMonitor monitor) {
IMetadataRepositoryManager repoManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
URI[] repositories = metadataRepositories == null ? repoManager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL) : metadataRepositories;
-
- HashMap<String, IMetadataRepository> repos = new HashMap<String, IMetadataRepository>();
- SubMonitor sub = SubMonitor.convert(monitor, repositories.length * 100);
-
- // Clear out the list of remembered artifact repositories
+ Set<IMetadataRepository> repos = new HashSet<IMetadataRepository>();
+ SubMonitor sub = SubMonitor.convert(monitor, repositories.length * 100 + 100);
+ // We always load the repositories explicitly specified first. This way, the side effects of loading
+ // the top level repositories (reading repository references and remembering them in the manager)
+ // are the same regardless of whether we choose to follow those references.
+ for (int i = 0; i < repositories.length; i++) {
+ if (sub.isCanceled())
+ throw new OperationCanceledException();
+ try {
+ repos.add(repoManager.loadRepository(repositories[i], sub.newChild(100)));
+ } catch (ProvisionException e) {
+ //skip unreadable repositories
+ }
+ }
+ if (!shouldFollowReferences()) {
+ sub.done();
+ return repos;
+ }
+ // Those last 100 ticks are now converted to be based on the repository reference following
+ sub = SubMonitor.convert(sub.newChild(100), 100 * repositories.length);
+ // Snapshot the repository state. Anything else we enable or add as part of traversing references should be
+ // forgotten when we are done.
+ snapShotRepositoryState();
+ // We need to remember the loaded artifact repositories because we will be
+ // restoring the enable/disable state of the referenced repos in the manager after traversing
+ // the metadata repos.
referencedArtifactRepositories = new HashMap<String, IArtifactRepository>();
+
for (int i = 0; i < repositories.length; i++) {
if (sub.isCanceled())
throw new OperationCanceledException();
loadMetadataRepository(repoManager, repositories[i], repos, shouldFollowReferences(), sub.newChild(100));
}
- Set<IMetadataRepository> set = new HashSet<IMetadataRepository>();
- set.addAll(repos.values());
- return set;
+ restoreRepositoryState();
+ return repos;
}
- private void loadMetadataRepository(IMetadataRepositoryManager manager, URI location, HashMap<String, IMetadataRepository> repos, boolean followMetadataRepoReferences, IProgressMonitor monitor) {
- // if we've already processed this repo, don't do it again. This keeps us from getting
- // caught up in circular references.
- if (repos.containsKey(location.toString()))
- return;
+ private void snapShotRepositoryState() {
+ metadataRepositorySnapshot = new HashMap<String, IRepositoryReference>();
+ IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+ List<URI> all = new ArrayList<URI>();
+ all.addAll(Arrays.asList(manager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL)));
+ all.addAll(Arrays.asList(manager.getKnownRepositories(IRepositoryManager.REPOSITORIES_DISABLED)));
+ for (URI location : all) {
+ int options = manager.isEnabled(location) ? IRepository.ENABLED : IRepository.NONE;
+ metadataRepositorySnapshot.put(location.toString(), new RepositoryReference(location, manager.getRepositoryProperty(location, IRepository.PROP_NICKNAME), IRepository.TYPE_METADATA, options));
+ }
+ artifactRepositorySnapshot = new HashMap<String, IRepositoryReference>();
+ IArtifactRepositoryManager artManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
+ all = new ArrayList<URI>();
+ all.addAll(Arrays.asList(artManager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL)));
+ all.addAll(Arrays.asList(artManager.getKnownRepositories(IRepositoryManager.REPOSITORIES_DISABLED)));
+ for (URI location : all) {
+ int options = artManager.isEnabled(location) ? IRepository.ENABLED : IRepository.NONE;
+ artifactRepositorySnapshot.put(location.toString(), new RepositoryReference(location, artManager.getRepositoryProperty(location, IRepository.PROP_NICKNAME), IRepository.TYPE_ARTIFACT, options));
+ }
+ }
- SubMonitor sub = SubMonitor.convert(monitor, 1000);
- // First load the repository itself.
- IMetadataRepository repository;
- try {
- repository = manager.loadRepository(location, sub.newChild(500));
- } catch (ProvisionException e) {
- // nothing more to do
- return;
+ private void restoreRepositoryState() {
+ if (metadataRepositorySnapshot != null) {
+ IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+ List<URI> all = new ArrayList<URI>();
+ all.addAll(Arrays.asList(manager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL)));
+ all.addAll(Arrays.asList(manager.getKnownRepositories(IRepositoryManager.REPOSITORIES_DISABLED)));
+ for (URI location : all) {
+ IRepositoryReference reference = metadataRepositorySnapshot.get(location.toString());
+ if (reference == null) {
+ manager.removeRepository(location);
+ } else {
+ manager.setEnabled(location, (reference.getOptions() & IRepository.ENABLED) == IRepository.ENABLED);
+ manager.setRepositoryProperty(location, IRepository.PROP_NICKNAME, reference.getNickname());
+ metadataRepositorySnapshot.remove(location);
+ }
+ }
+ // Anything left in the map is no longer known by the manager, so add it back. (This is not likely)
+ for (IRepositoryReference ref : metadataRepositorySnapshot.values()) {
+ manager.addRepository(ref.getLocation());
+ manager.setEnabled(ref.getLocation(), (ref.getOptions() & IRepository.ENABLED) == IRepository.ENABLED);
+ manager.setRepositoryProperty(ref.getLocation(), IRepository.PROP_NICKNAME, ref.getNickname());
+ }
+ metadataRepositorySnapshot = null;
}
- repos.put(location.toString(), repository);
- Collection<IRepositoryReference> references = repository.getReferences();
- // We always load artifact repositories referenced by this repository. We might load
- // metadata repositories
- if (references.size() > 0) {
- IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- SubMonitor repoSubMon = SubMonitor.convert(sub.newChild(500), 100 * references.size());
- for (IRepositoryReference ref : references) {
- if (ref.getType() == IRepository.TYPE_METADATA && followMetadataRepoReferences && isEnabled(manager, ref)) {
- loadMetadataRepository(manager, ref.getLocation(), repos, followMetadataRepoReferences, repoSubMon.newChild(100));
- } else if (ref.getType() == IRepository.TYPE_ARTIFACT) {
- // We want to remember all enabled artifact repository locations.
- if (isEnabled(artifactManager, ref))
- try {
- referencedArtifactRepositories.put(ref.getLocation().toString(), artifactManager.loadRepository(ref.getLocation(), repoSubMon.newChild(100)));
- } catch (ProvisionException e) {
- // ignore this one but keep looking at other references
- }
+ if (artifactRepositorySnapshot != null) {
+ IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
+ List<URI> all = new ArrayList<URI>();
+ all.addAll(Arrays.asList(manager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL)));
+ all.addAll(Arrays.asList(manager.getKnownRepositories(IRepositoryManager.REPOSITORIES_DISABLED)));
+ for (URI location : all) {
+ IRepositoryReference reference = artifactRepositorySnapshot.get(location.toString());
+ if (reference == null) {
+ manager.removeRepository(location);
+ } else {
+ manager.setEnabled(location, (reference.getOptions() & IRepository.ENABLED) == IRepository.ENABLED);
+ manager.setRepositoryProperty(location, IRepository.PROP_NICKNAME, reference.getNickname());
+ artifactRepositorySnapshot.remove(location);
}
}
- } else {
- sub.done();
+ // Anything left in the map is no longer known by the manager, so add it back. (This is not likely)
+ for (IRepositoryReference ref : artifactRepositorySnapshot.values()) {
+ manager.addRepository(ref.getLocation());
+ manager.setEnabled(ref.getLocation(), (ref.getOptions() & IRepository.ENABLED) == IRepository.ENABLED);
+ manager.setRepositoryProperty(ref.getLocation(), IRepository.PROP_NICKNAME, ref.getNickname());
+ }
+ artifactRepositorySnapshot = null;
}
-
}
- // If the manager knows about the repo, consider its enablement state in the manager.
- // If the manager does not know about the repo, consider the reference enablement state
- @SuppressWarnings("rawtypes")
- private boolean isEnabled(IRepositoryManager manager, IRepositoryReference reference) {
- return (manager.contains(reference.getLocation()) && manager.isEnabled(reference.getLocation())) || ((!manager.contains(reference.getLocation())) && ((reference.getOptions() | IRepository.ENABLED) == IRepository.ENABLED));
+ private void loadMetadataRepository(IMetadataRepositoryManager manager, URI location, Set<IMetadataRepository> repos, boolean followReferences, IProgressMonitor monitor) {
+ try {
+ if (!followReferences) {
+ repos.add(manager.loadRepository(location, monitor));
+ return;
+ }
+ // We want to load all repositories referenced by this repository
+ SubMonitor sub = SubMonitor.convert(monitor, 1000);
+ IMetadataRepository repository = manager.loadRepository(location, sub.newChild(500));
+ repos.add(repository);
+ Collection<IRepositoryReference> references = repository.getReferences();
+ if (references.size() > 0) {
+ IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
+ SubMonitor repoSubMon = SubMonitor.convert(sub.newChild(500), 100 * references.size());
+ for (IRepositoryReference ref : references) {
+ if (ref.getType() == IRepository.TYPE_METADATA) {
+ loadMetadataRepository(manager, ref.getLocation(), repos, followReferences, repoSubMon.newChild(100));
+ } else {
+ // keyed by location so that duplicate instances are treated as one. We can't rely on "equals"
+ referencedArtifactRepositories.put(ref.getLocation().toString(), artifactManager.loadRepository(ref.getLocation(), repoSubMon.newChild(100)));
+ }
+ }
+ } else {
+ sub.done();
+ }
+ } catch (ProvisionException e) {
+ //skip unreadable repositories
+ }
}
private boolean shouldFollowReferences() {
@@ -238,12 +322,6 @@ public class ProvisioningContext {
/**
* Returns a queryable that can be used to obtain any metadata (installable units)
* that are needed for the provisioning operation.
- *
- * The provisioning context has a distinct lifecycle, whereby the metadata
- * and artifact repositories to be used are determined when the client retrieves
- * retrieves the metadata queryable. Clients should not reset the list of
- * metadata repository locations or artifact repository locations once the
- * metadata queryable has been retrieved.
*
* @param monitor a progress monitor to be used when creating the queryable
* @return a queryable that can be used to query available metadata.
@@ -290,12 +368,13 @@ public class ProvisioningContext {
/**
* Sets the artifact repositories to consult when performing an operation.
* <p>
- * The provisioning context has a distinct lifecycle, whereby the metadata
- * and artifact repositories to be used are determined when the client
- * retrieves the metadata queryable. Clients should not reset the list of
- * artifact repository locations once the metadata queryable has been retrieved.
+ * When the {@link #FOLLOW_REPOSITORY_REFERENCES} property is set, this
+ * method should be called prior to calling {@link #getMetadata(IProgressMonitor)},
+ * because setting the repositories after retrieving metadata will have no
+ * effect.
*
* @param artifactRepositories the artifact repository locations
+ * @see #FOLLOW_REPOSITORY_REFERENCES
*/
public void setArtifactRepositories(URI[] artifactRepositories) {
this.artifactRepositories = artifactRepositories;
@@ -303,12 +382,6 @@ public class ProvisioningContext {
/**
* Sets the metadata repositories to consult when performing an operation.
- * <p>
- * The provisioning context has a distinct lifecycle, whereby the metadata
- * and artifact repositories to be used are determined when the client
- * retrieves the metadata queryable. Clients should not reset the list of
- * metadata repository locations once the metadata queryable has been retrieved.
-
* @param metadataRepositories the metadata repository locations
*/
public void setMetadataRepositories(URI[] metadataRepositories) {
@@ -354,9 +427,8 @@ public class ProvisioningContext {
* Return the array of repository locations for artifact repositories.
* @return an array of repository locations. This is never <code>null</code>.
*
- * @deprecated This method will be removed in the next release. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=305086
- * @noreference This method will be removed in the next release.
- *
+ * @deprecated This method will be removed before the final release of 3.6
+ * @noreference This method will be removed before the final release of 3.6
* @see #getArtifactRepositories()
* @see #getArtifactDescriptors(IProgressMonitor)
* @see #getArtifactKeys(IProgressMonitor)
diff --git a/bundles/org.eclipse.equinox.p2.exemplarysetup/.classpath b/bundles/org.eclipse.equinox.p2.exemplarysetup/.classpath
deleted file mode 100644
index 7cdeb7319..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.exemplarysetup/.project b/bundles/org.eclipse.equinox.p2.exemplarysetup/.project
deleted file mode 100644
index 1b81b1ee6..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.exemplarysetup</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 91a0eb69e..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,349 +0,0 @@
-#Mon Feb 08 08:33:54 EST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index bb66afef0..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:58:11 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.exemplarysetup/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.exemplarysetup/META-INF/MANIFEST.MF
deleted file mode 100644
index 22725fdff..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,20 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.exemplarysetup;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.100"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.garbagecollector,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.osgi.framework;version="1.3.0"
-Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.equinox.p2.exemplarysetup/about.html b/bundles/org.eclipse.equinox.p2.exemplarysetup/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.exemplarysetup/build.properties b/bundles/org.eclipse.equinox.p2.exemplarysetup/build.properties
deleted file mode 100644
index a6b8330d2..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
-src.includes = about.html
diff --git a/bundles/org.eclipse.equinox.p2.exemplarysetup/plugin.properties b/bundles/org.eclipse.equinox.p2.exemplarysetup/plugin.properties
deleted file mode 100644
index a0c085e42..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Equinox Provisioning Exemplary Setup
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.exemplarysetup/src/readme.txt b/bundles/org.eclipse.equinox.p2.exemplarysetup/src/readme.txt
deleted file mode 100644
index bf54b304b..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/src/readme.txt
+++ /dev/null
@@ -1 +0,0 @@
-This bundle is obsolete and will be deleted before 3.6 M6. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/.cvsignore b/bundles/org.eclipse.equinox.p2.extensionlocation/.cvsignore
index e043cc4e2..98d91b940 100644
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/.cvsignore
+++ b/bundles/org.eclipse.equinox.p2.extensionlocation/.cvsignore
@@ -1,3 +1,4 @@
bin
build.xml
javaCompiler...args
+target
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.extensionlocation/META-INF/MANIFEST.MF
index 84f75ec97..b6b2f1c26 100644
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.extensionlocation/META-INF/MANIFEST.MF
@@ -2,11 +2,11 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.equinox.p2.extensionlocation;singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.2.100.qualifier
Bundle-Activator: org.eclipse.equinox.internal.p2.extensionlocation.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.extensionlocation;x-friends:="org.eclipse.equinox.p2.reconciler.dropins"
+Export-Package: org.eclipse.equinox.internal.p2.extensionlocation;x-friends:="org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.p2.ui.importexport"
Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
org.eclipse.equinox.p2.metadata
Bundle-RequiredExecutionEnvironment: J2SE-1.5,
@@ -22,6 +22,7 @@ Import-Package: org.eclipse.equinox.internal.p2.artifact.repository.simple,
org.eclipse.equinox.internal.provisional.p2.directorywatcher,
org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.publisher,
org.eclipse.equinox.p2.publisher.eclipse,
org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
@@ -32,4 +33,4 @@ Import-Package: org.eclipse.equinox.internal.p2.artifact.repository.simple,
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
+ org.osgi.framework;version="1.6.0"
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/pom.xml b/bundles/org.eclipse.equinox.p2.extensionlocation/pom.xml
index 0f9c3a18b..2f15d23f5 100644
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.extensionlocation/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse</groupId>
<artifactId>org.eclipse.equinox.p2.extensionlocation</artifactId>
- <version>1.2.0.qualifier</version>
+ <version>1.2.100.qualifier</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Activator.java b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Activator.java
index c05ff6868..ac780a867 100644
--- 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
@@ -69,10 +69,10 @@ public class Activator implements BundleActivator {
}
public static IProvisioningAgent getCurrentAgent() {
- ServiceReference reference = bundleContext.getServiceReference(IProvisioningAgent.SERVICE_NAME);
+ ServiceReference<IProvisioningAgent> reference = bundleContext.getServiceReference(IProvisioningAgent.class);
if (reference == null)
return null;
- return (IProvisioningAgent) bundleContext.getService(reference);
+ return bundleContext.getService(reference);
}
public static IFileArtifactRepository getBundlePoolRepository() {
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
index 984f56314..5bcb42d0a 100644
--- 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
@@ -147,26 +147,69 @@ public class ExtensionLocationArtifactRepository extends AbstractRepository<IArt
return plugins.isDirectory() || features.isDirectory();
}
+ public void addDescriptor(IArtifactDescriptor descriptor, IProgressMonitor monitor) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Deprecated
public void addDescriptor(IArtifactDescriptor descriptor) {
throw new UnsupportedOperationException();
}
+ public void addDescriptors(IArtifactDescriptor[] descriptors, IProgressMonitor monitor) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Deprecated
public void addDescriptors(IArtifactDescriptor[] descriptors) {
throw new UnsupportedOperationException();
}
+ public void removeAll(IProgressMonitor monitor) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Deprecated
public void removeAll() {
throw new UnsupportedOperationException();
}
+ public void removeDescriptor(IArtifactDescriptor descriptor, IProgressMonitor monitor) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Deprecated
public void removeDescriptor(IArtifactDescriptor descriptor) {
throw new UnsupportedOperationException();
}
+ public void removeDescriptor(IArtifactKey key, IProgressMonitor monitor) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Deprecated
public void removeDescriptor(IArtifactKey key) {
throw new UnsupportedOperationException();
}
+ public void removeDescriptors(IArtifactDescriptor[] descriptors, IProgressMonitor monitor) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Deprecated
+ public void removeDescriptors(IArtifactDescriptor[] descriptors) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void removeDescriptors(IArtifactKey[] keys, IProgressMonitor monitor) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Deprecated
+ public void removeDescriptors(IArtifactKey[] keys) {
+ throw new UnsupportedOperationException();
+ }
+
public boolean contains(IArtifactDescriptor descriptor) {
ensureInitialized();
return artifactRepository.contains(descriptor);
@@ -217,18 +260,23 @@ public class ExtensionLocationArtifactRepository extends AbstractRepository<IArt
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))
+ public String setProperty(String key, String value, IProgressMonitor monitor) {
+ try {
+ 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;
- state = SiteListener.UNINITIALIZED;
- ensureInitialized();
- return oldValue;
+ } finally {
+ if (monitor != null)
+ monitor.done();
+ }
}
public IArtifactDescriptor createArtifactDescriptor(IArtifactKey key) {
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
index 55f0d0c13..4c0651d5c 100644
--- 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
@@ -207,17 +207,22 @@ public class ExtensionLocationMetadataRepository extends AbstractMetadataReposit
* @see org.eclipse.equinox.p2.repository.spi.AbstractRepository#setProperty(java.lang.String, java.lang.String)
*/
@Override
- public String setProperty(String key, String value) {
- ensureInitialized();
- String oldValue = metadataRepository.setProperty(key, value);
- // if the value didn't really change then just return
- if (oldValue == value || (oldValue != null && oldValue.equals(value)))
- return oldValue;
- // we want to re-initialize if we are changing the site policy or plug-in list
- if (!SiteListener.SITE_LIST.equals(key) && !SiteListener.SITE_POLICY.equals(key))
+ public String setProperty(String key, String value, IProgressMonitor monitor) {
+ try {
+ 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;
- state = SiteListener.UNINITIALIZED;
- ensureInitialized();
- return oldValue;
+ } finally {
+ if (monitor != null)
+ monitor.done();
+ }
}
}
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
index faffa378c..74e1307ef 100644
--- 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -52,12 +52,21 @@ public class SiteListener extends DirectoryChangeListener {
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()))
+ if (filename.endsWith(plugins[i]))
return true;
return false;
}
/**
+ * Converts a list of file names to a normalized form suitable for comparison.
+ */
+ private String[] normalize(String[] filenames) {
+ for (int i = 0; i < filenames.length; i++)
+ filenames[i] = new File(filenames[i]).toString();
+ return filenames;
+ }
+
+ /**
* Given one repo and a base location, ensure cause the other repo to be loaded and then
* poll the base location once updating the repositories accordingly. This method is used to
* ensure that both the metadata and artifact repos corresponding to one location are
@@ -116,7 +125,7 @@ public class SiteListener extends DirectoryChangeListener {
if (listString != null)
for (StringTokenizer tokenizer = new StringTokenizer(listString, ","); tokenizer.hasMoreTokens();) //$NON-NLS-1$
listCollection.add(tokenizer.nextToken());
- this.list = listCollection.toArray(new String[listCollection.size()]);
+ this.list = normalize(listCollection.toArray(new String[listCollection.size()]));
}
/* (non-Javadoc)
@@ -275,7 +284,7 @@ public class SiteListener extends DirectoryChangeListener {
result.add(pluginLocation.toString());
}
}
- managedFiles = result.toArray(new String[result.size()]);
+ managedFiles = normalize(result.toArray(new String[result.size()]));
return managedFiles;
}
diff --git a/bundles/org.eclipse.equinox.p2.installer/.classpath b/bundles/org.eclipse.equinox.p2.installer/.classpath
deleted file mode 100644
index 64c5e31b7..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="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.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 5dd2785c3..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,349 +0,0 @@
-#Wed Feb 17 13:57:50 EST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.launching.prefs b/bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.launching.prefs
deleted file mode 100644
index d4e11d5d3..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.launching.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Feb 17 13:57:32 EST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/bundles/org.eclipse.equinox.p2.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/.settings/org.eclipse.pde.api.tools.prefs b/bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.pde.api.tools.prefs
deleted file mode 100644
index 7f465d533..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.pde.api.tools.prefs
+++ /dev/null
@@ -1,94 +0,0 @@
-#Wed Feb 17 13:55:35 EST 2010
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Ignore
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
diff --git a/bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 6438a3473..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,31 +0,0 @@
-#Wed Feb 17 13:56:07 EST 2010
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=2
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=2
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
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 00976377c..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,27 +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;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata.repository;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.equinox.p2.metadata;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.core;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.artifact.repository;bundle-version="1.1.0",
- org.eclipse.swt,
- org.eclipse.core.net;bundle-version="1.1.0",
- org.eclipse.equinox.p2.repository;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-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 f85c9d6ef..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/build.properties
+++ /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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- product_lg.gif,\
- about.html,\
- plugin.properties
-src.includes = about.html
-javacTarget=jsr14
-javacSource=1.5
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 61ab80295..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/installer.product
+++ /dev/null
@@ -1,135 +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" version="1.1.0.qualifier" 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.contenttype"/>
- <plugin id="org.eclipse.core.expressions"/>
- <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.linux.x86_64" 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"/>
- <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
- <plugin id="org.eclipse.ecf"/>
- <plugin id="org.eclipse.ecf.filetransfer"/>
- <plugin id="org.eclipse.ecf.identity"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.ds"/>
- <plugin id="org.eclipse.equinox.frameworkadmin"/>
- <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
- <plugin id="org.eclipse.equinox.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.ppc64" 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.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.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.ql"/>
- <plugin id="org.eclipse.equinox.p2.repository"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.natives"/>
- <plugin id="org.eclipse.equinox.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.equinox.util"/>
- <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.ppc64" 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.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.ds" 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/pom.xml b/bundles/org.eclipse.equinox.p2.installer/pom.xml
deleted file mode 100644
index 929d3c928..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.installer</artifactId>
- <version>1.0.200.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
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 5c376a731..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallApplication.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * 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.eclipse.equinox.p2.core.*;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-/**
- * 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();
- IProvisioningAgent agent = startAgent(description);
- //perform long running install operation
- InstallUpdateProductOperation operation = new InstallUpdateProductOperation(agent, 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);
- }
- agent.stop();
- } 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 IProvisioningAgent startAgent(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();
- try {
- IProvisioningAgentProvider provider = (IProvisioningAgentProvider) getService(InstallerActivator.getDefault().getContext(), IProvisioningAgentProvider.SERVICE_NAME);
- return provider.createAgent(agentLocation == null ? null : agentLocation.toFile().toURI());
- } catch (ProvisionException 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 ed8e9468c..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallDescriptionParser.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Code 9 - ongoing development
- * Sonatype, Inc. - 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.CollectionUtils;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.repository.RepositoryTransport;
-import org.eclipse.equinox.p2.metadata.VersionedId;
-import org.eclipse.equinox.internal.provisional.p2.installer.InstallDescription;
-import org.eclipse.equinox.p2.metadata.IVersionedId;
-
-/**
- * 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);
- }
- }
- Map<String, String> properties;
- try {
- in = RepositoryTransport.getInstance().stream(propsURI, monitor);
- properties = CollectionUtils.loadProperties(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, CollectionUtils.toMap(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, Map<String, String> properties, URI base) {
- String property = properties.get(PROP_ARTIFACT_REPOSITORY);
- if (property != null)
- description.setArtifactRepositories(getURIs(property, base));
-
- property = properties.get(PROP_METADATA_REPOSITORY);
- if (property != null)
- description.setMetadataRepositories(getURIs(property, base));
-
- property = properties.get(PROP_IS_AUTO_START);
- if (property != null)
- description.setAutoStart(Boolean.TRUE.toString().equalsIgnoreCase(property));
-
- property = properties.get(PROP_LAUNCHER_NAME);
- if (property != null)
- description.setLauncherName(property);
-
- property = properties.get(PROP_INSTALL_LOCATION);
- if (property != null)
- description.setInstallLocation(new Path(property));
-
- property = properties.get(PROP_AGENT_LOCATION);
- if (property != null)
- description.setAgentLocation(new Path(property));
-
- property = properties.get(PROP_BUNDLE_LOCATION);
- if (property != null)
- description.setBundleLocation(new Path(property));
-
- property = properties.get(PROP_PROFILE_NAME);
- if (property != null)
- description.setProductName(property);
-
- // Process the retro root id and rootVersion properties
- String id = properties.get(PROP_ROOT_ID);
- if (id != null) {
- String version = properties.get(PROP_ROOT_VERSION);
- try {
- description.setRoots(new IVersionedId[] {new VersionedId(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.get(PROP_ROOTS);
- if (rootSpec != null) {
- String[] rootList = getArrayFromString(rootSpec, ","); //$NON-NLS-1$
- ArrayList<IVersionedId> roots = new ArrayList<IVersionedId>(rootList.length);
- for (int i = 0; i < rootList.length; i++) {
- try {
- roots.add(VersionedId.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(roots.toArray(new IVersionedId[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, Map<String, String> properties) {
- //any remaining properties are profile properties
- Map<String, String> profileProperties = new HashMap<String, String>(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<URI> result = new ArrayList<URI>(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 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<String> result = new ArrayList<String>();
- for (StringTokenizer tokens = new StringTokenizer(list, separator); tokens.hasMoreTokens();) {
- String token = tokens.nextToken().trim();
- if (!token.equals("")) //$NON-NLS-1$
- result.add(token);
- }
- return result.toArray(new String[result.size()]);
- }
-
-}
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 bb2477c9c..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallUpdateProductOperation.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Code 9 - ongoing development
- * Sonatype, Inc. - 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.director.IDirector;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.installer.IInstallOperation;
-import org.eclipse.equinox.internal.provisional.p2.installer.InstallDescription;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * This operation performs installation or update of an Eclipse-based product.
- */
-public class InstallUpdateProductOperation implements IInstallOperation {
-
- private IArtifactRepositoryManager artifactRepoMan;
- private IProvisioningAgent agent;
- private IDirector director;
- private final InstallDescription installDescription;
- private boolean isInstall = true;
- private IMetadataRepositoryManager metadataRepoMan;
- private IProfileRegistry profileRegistry;
- private IStatus result;
-
- public InstallUpdateProductOperation(IProvisioningAgent agent, InstallDescription description) {
- this.agent = agent;
- this.installDescription = description;
- }
-
- /**
- * Determine what top level installable units should be installed by the director
- */
- private Collection<IInstallableUnit> computeUnitsToInstall() throws CoreException {
- ArrayList<IInstallableUnit> units = new ArrayList<IInstallableUnit>();
- IVersionedId roots[] = installDescription.getRoots();
- for (int i = 0; i < roots.length; i++) {
- IVersionedId root = roots[i];
- IInstallableUnit iu = findUnit(root);
- if (iu != null)
- units.add(iu);
- }
- return units;
- }
-
- /**
- * This profile is being updated; return the units to uninstall from the profile.
- */
- private IQueryResult<IInstallableUnit> computeUnitsToUninstall(IProfile p) {
- return p.query(QueryUtil.createIUAnyQuery(), null);
- }
-
- /**
- * Create and return the profile into which units will be installed.
- */
- private IProfile createProfile() throws ProvisionException {
- IProfile profile = getProfile();
- if (profile == null) {
- Map<String, String> properties = new HashMap<String, String>();
- 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();
- Collection<IInstallableUnit> toInstall = computeUnitsToInstall();
- monitor.worked(5);
-
- IStatus s;
- ProfileChangeRequest request = new ProfileChangeRequest(p);
- if (isInstall) {
- monitor.setTaskName(NLS.bind(Messages.Op_Installing, installDescription.getProductName()));
- request.addAll(toInstall);
- s = director.provision(request, null, monitor.newChild(90));
- } else {
- monitor.setTaskName(NLS.bind(Messages.Op_Updating, installDescription.getProductName()));
- IQueryResult<IInstallableUnit> toUninstall = computeUnitsToUninstall(p);
- request.removeAll(toUninstall.toUnmodifiableSet());
- request.addAll(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(IVersionedId 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);
- IQuery<IInstallableUnit> query = QueryUtil.createIUQuery(id, range);
- Iterator<IInstallableUnit> matches = metadataRepoMan.query(query, null).iterator();
- // pick the newest match
- IInstallableUnit newest = null;
- while (matches.hasNext()) {
- IInstallableUnit candidate = 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 {
- Object service = agent.getService(name);
- if (service == null)
- throw fail(Messages.Op_NoServiceImpl + name);
- 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() {
- //nothing to do
- }
-
- private void preInstall() throws CoreException {
- //obtain required services
- director = (IDirector) getService(IDirector.SERVICE_NAME);
- metadataRepoMan = (IMetadataRepositoryManager) getService(IMetadataRepositoryManager.SERVICE_NAME);
- artifactRepoMan = (IArtifactRepositoryManager) getService(IArtifactRepositoryManager.SERVICE_NAME);
- profileRegistry = (IProfileRegistry) getService(IProfileRegistry.SERVICE_NAME);
- }
-
- 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 da6f3ff1e..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallerActivator.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.installer;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * 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;
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static InstallerActivator getDefault() {
- return plugin;
- }
-
- /**
- * The constructor
- */
- public InstallerActivator() {
- //nothing to do
- }
-
- /**
- * 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;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext aContext) throws Exception {
- 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 82334a89a..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/Messages.java
+++ /dev/null
@@ -1,84 +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_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_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 b34f85067..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/messages.properties
+++ /dev/null
@@ -1,66 +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_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_FailedToSetProxyMessage=Failed to set proxy settings.
-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 d78406a22..000000000
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/InstallDialog.java
+++ /dev/null
@@ -1,564 +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.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 91dc773c4..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<String> 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(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_FailedToSetProxyMessage + 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<String>();
- 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 b8adcccc7..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.p2.metadata.IVersionedId;
-
-/**
- * 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 IVersionedId[] roots;
- private final Map<String, String> profileProperties = new HashMap<String, String>();
-
- /**
- * 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<String, String> 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<String, String> properties) {
- profileProperties.putAll(properties);
- }
-
- /**
- * Returns the set of roots to be installed for this installation
- * @return the roots to install
- */
- public IVersionedId[] getRoots() {
- return roots;
- }
-
- /**
- * Set the list of roots to install
- * @param value the set of roots to install
- */
- public void setRoots(IVersionedId[] 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.jarprocessor/.classpath b/bundles/org.eclipse.equinox.p2.jarprocessor/.classpath
deleted file mode 100644
index 0179ed600..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" output="bin_ant" path="src_ant"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/.externalToolBuilders/AntTaskBuilder.launch b/bundles/org.eclipse.equinox.p2.jarprocessor/.externalToolBuilders/AntTaskBuilder.launch
deleted file mode 100644
index ae5694459..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/.externalToolBuilders/AntTaskBuilder.launch
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.jarprocessor/localbuild.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.jarprocessor"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.jarprocessor/localbuild.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/org.eclipse.equinox.p2.jarprocessor}"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/.project b/bundles/org.eclipse.equinox.p2.jarprocessor/.project
deleted file mode 100644
index cf69b3579..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/.project
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.jarprocessor</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value>&lt;project&gt;/.externalToolBuilders/AntTaskBuilder.launch</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index a46514810..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,345 +0,0 @@
-#Thu Sep 24 13:53:16 EDT 2009
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.incompleteClasspath=error
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.formatter.join_wrapped_lines=true
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.compiler.problem.nullReference=ignore
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 0d3112f5e..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,60 +0,0 @@
-#Thu Sep 24 13:53:46 EDT 2009
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.sort_members=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.remove_unused_private_members=false
-org.eclipse.jdt.ui.staticondemandthreshold=3
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.never_use_parentheses_in_expressions=true
-formatter_profile=_core
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.organize_imports=true
-sp_cleanup.always_use_blocks=true
-org.eclipse.jdt.ui.importorder=;
-sp_cleanup.use_blocks=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members_all=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-eclipse.preferences.version=1
-org.eclipse.jdt.ui.ondemandthreshold=3
-sp_cleanup.add_missing_methods=false
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.format_source_code=true
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.remove_unused_private_fields=true
-formatter_settings_version=11
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-org.eclipse.jdt.ui.ignorelowercasenames=true
-sp_cleanup.add_serial_version_id=false
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 69a27179c..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Tue Aug 28 11:19:59 EDT 2007
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.jarprocessor/META-INF/MANIFEST.MF
deleted file mode 100644
index 5c21d1f2d..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.jarprocessor;singleton:=true
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.0.200.qualifier
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Main-Class: org.eclipse.equinox.internal.p2.jarprocessor.Main
-Export-Package: org.eclipse.equinox.internal.p2.jarprocessor;x-friends:="org.eclipse.equinox.p2.artifact.repository,org.eclipse.pde.build",
- org.eclipse.equinox.internal.p2.jarprocessor.unsigner;x-internal:=true,
- org.eclipse.equinox.internal.p2.jarprocessor.verifier;x-internal:=true,
- org.eclipse.internal.provisional.equinox.p2.jarprocessor;x-friends:="org.eclipse.equinox.p2.artifact.optimizers,org.eclipse.equinox.p2.artifact.repository,org.eclipse.pde.build"
-Import-Package: org.eclipse.core.runtime.jobs;resolution:=optional
-Require-Bundle: org.eclipse.equinox.common;bundle-version="3.3.0"
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/about.html b/bundles/org.eclipse.equinox.p2.jarprocessor/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/build.properties b/bundles/org.eclipse.equinox.p2.jarprocessor/build.properties
deleted file mode 100644
index f0c7174cb..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/build.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties,\
- plugin.xml,\
- lib/jarprocessor-ant.jar
-src.includes = about.html
-
-source.lib/jarprocessor-ant.jar = src_ant/
-output.lib/jarprocessor-ant.jar = bin_ant/
-
-jars.extra.classpath = platform:/plugin/org.apache.ant/lib/ant.jar
-jars.compile.order = .,\
- lib/jarprocessor-ant.jar
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/lib/.cvsignore b/bundles/org.eclipse.equinox.p2.jarprocessor/lib/.cvsignore
deleted file mode 100644
index c45d3e953..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/lib/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-jarprocessor-ant.jar
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/localbuild.xml b/bundles/org.eclipse.equinox.p2.jarprocessor/localbuild.xml
deleted file mode 100644
index e5729a87c..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/localbuild.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0"?>
-<project name="project" default="workspaceBinaries">
- <description>
- Build the jarprocessor-ant.jar by gathering up the results of a workspace build from bin_ant.
- </description>
-
- <target name="workspaceBinaries" description="Jar up the binaries that were compiled by the jdt builder" >
- <mkdir dir="lib" />
- <delete file="lib/jarprocessor-ant.jar" failonerror="false"/>
- <jar destfile="lib/jarprocessor-ant.jar" basedir="bin_ant"/>
- <eclipse.convertPath fileSystemPath="${basedir}/lib" property="resourcePath"/>
- <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
- </target>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/plugin.properties b/bundles/org.eclipse.equinox.p2.jarprocessor/plugin.properties
deleted file mode 100644
index 937ec9174..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Equinox Provisioning JAR Processor
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/plugin.xml b/bundles/org.eclipse.equinox.p2.jarprocessor/plugin.xml
deleted file mode 100644
index 36d254f41..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/plugin.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <!-- Tasks -->
- <extension
- point="org.eclipse.ant.core.antTasks">
- <antTask
- class="org.eclipse.equinox.internal.p2.jarprocessor.ant.JarProcessorTask"
- headless="true"
- library="lib/jarprocessor-ant.jar"
- name="eclipse.jarProcessor">
- </antTask>
- </extension>
- <!-- Extra Classpath -->
- <extension
- point="org.eclipse.ant.core.extraClasspathEntries">
- <extraClasspathEntry
- library="lib/jarprocessor-ant.jar">
- </extraClasspathEntry>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/pom.xml b/bundles/org.eclipse.equinox.p2.jarprocessor/pom.xml
deleted file mode 100644
index 2443cf420..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.jarprocessor</artifactId>
- <version>1.0.200.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/CommandStep.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/CommandStep.java
deleted file mode 100644
index dde666095..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/CommandStep.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.File;
-import java.util.List;
-import java.util.Properties;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.IProcessStep;
-
-public abstract class CommandStep implements IProcessStep {
- protected String command = null;
- protected String extension = null;
- private Properties options = null;
- protected boolean verbose = false;
-
- public CommandStep(Properties options, String command, String extension, boolean verbose) {
- this.command = command;
- this.extension = extension;
- this.options = options;
- this.verbose = verbose;
- }
-
- protected static int execute(String[] cmd) {
- return execute(cmd, false);
- }
-
- protected static int execute(String[] cmd, boolean verbose) {
- Runtime runtime = Runtime.getRuntime();
- Process proc = null;
- try {
- proc = runtime.exec(cmd);
- StreamProcessor.start(proc.getErrorStream(), StreamProcessor.STDERR, verbose);
- StreamProcessor.start(proc.getInputStream(), StreamProcessor.STDOUT, verbose);
- } catch (Exception e) {
- if (verbose) {
- System.out.println("Error executing command " + Utils.concat(cmd)); //$NON-NLS-1$
- e.printStackTrace();
- }
- return -1;
- }
- try {
- int result = proc.waitFor();
- return result;
- } catch (InterruptedException e) {
- if (verbose)
- e.printStackTrace();
- }
- return -1;
- }
-
- public Properties getOptions() {
- if (options == null)
- options = new Properties();
- return options;
- }
-
- public void adjustInf(File input, Properties inf, List containers) {
- //nothing
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Main.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Main.java
deleted file mode 100644
index 23df70d63..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Main.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.File;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor;
-
-public class Main {
-
- private static void printUsage() {
- System.out.println("[-option ...]... input"); //$NON-NLS-1$
- System.out.println("The following options are supported:"); //$NON-NLS-1$
- System.out.println("-processAll process all jars, regardless of whether they were previously normalized"); //$NON-NLS-1$
- System.out.println(" By default only normalized jars will be processed."); //$NON-NLS-1$
- System.out.println("-repack normalize jars "); //$NON-NLS-1$
- System.out.println("-sign <command> sign jars using <command>"); //$NON-NLS-1$
- System.out.println("-pack pack the jars. pack and repack are redundant unless"); //$NON-NLS-1$
- System.out.println(" sign is also specified."); //$NON-NLS-1$
- System.out.println("-unpack unpack pack.gz files. Unpack is mutually exclusive"); //$NON-NLS-1$
- System.out.println(" with repack, sign and pack."); //$NON-NLS-1$
- System.out.println();
- System.out.println("-outputDir <dir> the output directory"); //$NON-NLS-1$
- System.out.println("-verbose verbose mode "); //$NON-NLS-1$
- }
-
- public static JarProcessorExecutor.Options processArguments(String[] args) {
- if (args.length == 0) {
- printUsage();
- return null;
- }
-
- JarProcessorExecutor.Options options = new JarProcessorExecutor.Options();
- int i = 0;
- for (; i < args.length - 1; i++) {
- if (args[i].equals("-pack")) {//$NON-NLS-1$
- options.pack = true;
- } else if (args[i].equals("-unpack")) { //$NON-NLS-1$
- options.unpack = true;
- } else if (args[i].equals("-sign") && i < args.length - 2) { //$NON-NLS-1$
- if (args[i + 1].startsWith("-")) { //$NON-NLS-1$
- printUsage();
- return null;
- }
- options.signCommand = args[++i];
- } else if (args[i].equals("-repack")) { //$NON-NLS-1$
- options.repack = true;
- } else if (args[i].equals("-outputDir") && i < args.length - 2) { //$NON-NLS-1$
- if (args[i + 1].startsWith("-")) { //$NON-NLS-1$
- printUsage();
- return null;
- }
- options.outputDir = args[++i];
- } else if (args[i].equals("-verbose")) { //$NON-NLS-1$
- options.verbose = true;
- } else if (args[i].equals("-processAll")) { //$NON-NLS-1$
- options.processAll = true;
- }
- }
-
- options.input = new File(args[i]);
-
- String problemMessage = null;
- String inputName = options.input.getName();
- if (options.unpack) {
- if (!JarProcessor.canPerformUnpack()) {
- problemMessage = "The unpack200 command cannot be found."; //$NON-NLS-1$
- } else if (options.input.isFile() && !inputName.endsWith(".zip") && !inputName.endsWith(".pack.gz")) { //$NON-NLS-1$ //$NON-NLS-2$
- problemMessage = "Input file is not a pack.gz file."; //$NON-NLS-1$
- } else if (options.pack || options.repack || options.signCommand != null) {
- problemMessage = "Pack, repack or sign cannot be specified with unpack."; //$NON-NLS-1$
- }
- } else {
- if (options.input.isFile() && !inputName.endsWith(".zip") && !inputName.endsWith(".jar")) { //$NON-NLS-1$ //$NON-NLS-2$
- problemMessage = "Input file is not a jar file."; //$NON-NLS-1$
- } else if ((options.pack || options.repack) && !JarProcessor.canPerformPack()) {
- problemMessage = "The pack200 command can not be found."; //$NON-NLS-1$
- }
- }
- if(problemMessage != null){
- System.out.println(problemMessage);
- System.out.println();
- printUsage();
- return null;
- }
-
- return options;
- }
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- JarProcessorExecutor.Options options = processArguments(args);
- if (options == null)
- return;
- new JarProcessorExecutor().runJarProcessor(options);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java
deleted file mode 100644
index 3d519736d..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.*;
-
-public class PackStep extends CommandStep {
-
- protected static String packCommand = null;
- private static Boolean canPack = null;
-
- private Set exclusions = Collections.EMPTY_SET;
-
- public static boolean canPack() {
- if (canPack != null)
- return canPack.booleanValue();
-
- String[] locations = Utils.getPack200Commands("pack200"); //$NON-NLS-1$
- if (locations == null) {
- canPack = Boolean.FALSE;
- packCommand = null;
- return false;
- }
-
- int result;
- for (int i = 0; i < locations.length; i++) {
- if (locations[i] == null)
- continue;
- result = execute(new String[] {locations[i], "-V"}); //$NON-NLS-1$
- if (result == 0) {
- packCommand = locations[i];
- canPack = Boolean.TRUE;
- return true;
- }
- }
-
- canPack = Boolean.FALSE;
- return false;
- }
-
- public PackStep(Properties options) {
- super(options, null, null, false);
- exclusions = Utils.getPackExclusions(options);
- }
-
- public PackStep(Properties options, boolean verbose) {
- super(options, null, null, verbose);
- exclusions = Utils.getPackExclusions(options);
- }
-
- public String recursionEffect(String entryName) {
- if (canPack() && entryName.endsWith(".jar") && !exclusions.contains(entryName)) { //$NON-NLS-1$
- return entryName + Utils.PACKED_SUFFIX;
- }
- return null;
- }
-
- public File preProcess(File input, File workingDirectory, List containers) {
- return null;
- }
-
- public File postProcess(File input, File workingDirectory, List containers) {
- if (canPack() && packCommand != null) {
- Properties inf = Utils.getEclipseInf(input, verbose);
- if (!shouldPack(input, containers, inf))
- return null;
- File outputFile = new File(workingDirectory, input.getName() + Utils.PACKED_SUFFIX);
- try {
- String[] cmd = getCommand(input, outputFile, inf, containers);
- int result = execute(cmd, verbose);
- if (result != 0 && verbose)
- System.out.println("Error: " + result + " was returned from command: " + Utils.concat(cmd)); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (IOException e) {
- if (verbose)
- e.printStackTrace();
- return null;
- }
- return outputFile;
- }
- return null;
- }
-
- protected boolean shouldPack(File input, List containers, Properties inf) {
- //1: exclude by containers
- // innermost jar is first on the list, it can override outer jars
- for (Iterator iterator = containers.iterator(); iterator.hasNext();) {
- Properties container = (Properties) iterator.next();
- if (container.containsKey(Utils.MARK_EXCLUDE_CHILDREN_PACK)) {
- if (Boolean.valueOf(container.getProperty(Utils.MARK_EXCLUDE_CHILDREN_PACK)).booleanValue()) {
- if (verbose)
- System.out.println(input.getName() + " is excluded from pack200 by its containers."); //$NON-NLS-1$
- return false;
- }
- break;
- }
- }
-
- //2: excluded by self
- if (inf != null && inf.containsKey(Utils.MARK_EXCLUDE_PACK) && Boolean.valueOf(inf.getProperty(Utils.MARK_EXCLUDE_PACK)).booleanValue()) {
- if (verbose)
- System.out.println("Excluding " + input.getName() + " from " + getStepName()); //$NON-NLS-1$ //$NON-NLS-2$
- return false;
- }
-
- return true;
- }
-
- protected String[] getCommand(File input, File outputFile, Properties inf, List containers) throws IOException {
- String[] cmd = null;
- String arguments = getArguments(input, inf, containers);
- if (arguments != null && arguments.length() > 0) {
- String[] args = Utils.toStringArray(arguments, ","); //$NON-NLS-1$
- cmd = new String[3 + args.length];
- cmd[0] = packCommand;
- System.arraycopy(args, 0, cmd, 1, args.length);
- cmd[cmd.length - 2] = outputFile.getCanonicalPath();
- cmd[cmd.length - 1] = input.getCanonicalPath();
- } else {
- cmd = new String[] {packCommand, outputFile.getCanonicalPath(), input.getCanonicalPath()};
- }
- return cmd;
- }
-
- protected String getArguments(File input, Properties inf, List containers) {
- //1: Explicitly marked in our .inf file
- if (inf != null && inf.containsKey(Utils.PACK_ARGS)) {
- return inf.getProperty(Utils.PACK_ARGS);
- }
-
- //2: Defaults set in one of our containing jars
- for (Iterator iterator = containers.iterator(); iterator.hasNext();) {
- Properties container = (Properties) iterator.next();
- if (container.containsKey(Utils.DEFAULT_PACK_ARGS)) {
- return container.getProperty(Utils.DEFAULT_PACK_ARGS);
- }
- }
-
- //3: Set by name in outside pack.properties file
- Properties options = getOptions();
- String argsKey = input.getName() + Utils.PACK_ARGS_SUFFIX;
- if (options.containsKey(argsKey)) {
- return options.getProperty(argsKey);
- }
-
- //4: Set by default in outside pack.properties file
- if (options.containsKey(Utils.DEFAULT_PACK_ARGS)) {
- return options.getProperty(Utils.DEFAULT_PACK_ARGS);
- }
-
- return ""; //$NON-NLS-1$
- }
-
- public String getStepName() {
- return "Pack"; //$NON-NLS-1$
- }
-
- public void adjustInf(File input, Properties inf, List containers) {
- if (input == null || inf == null)
- return;
-
- //don't be verbose to check if we should mark the inf
- boolean v = verbose;
- verbose = false;
- if (!shouldPack(input, containers, inf)) {
- verbose = v;
- return;
- }
- verbose = v;
-
- //mark as conditioned if not previously marked. A signed jar is assumed to be previously conditioned.
- if (inf.getProperty(Utils.MARK_PROPERTY) == null) {
- inf.put(Utils.MARK_PROPERTY, "true"); //$NON-NLS-1$
-
- //record arguments used
- String arguments = inf.getProperty(Utils.PACK_ARGS);
- if (arguments == null) {
- arguments = getArguments(input, inf, containers);
- if (arguments != null && arguments.length() > 0)
- inf.put(Utils.PACK_ARGS, arguments);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackUnpackStep.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackUnpackStep.java
deleted file mode 100644
index 79707a69f..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackUnpackStep.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.*;
-
-/**
- * @author aniefer@ca.ibm.com
- *
- */
-public class PackUnpackStep extends PackStep {
- private Set exclusions = null;
-
- public PackUnpackStep(Properties options) {
- super(options);
- exclusions = Utils.getPackExclusions(options);
- }
-
- public PackUnpackStep(Properties options, boolean verbose) {
- super(options, verbose);
- exclusions = Utils.getPackExclusions(options);
- }
-
- public String recursionEffect(String entryName) {
- if (canPack() && entryName.endsWith(".jar") && !exclusions.contains(entryName)) { //$NON-NLS-1$
- return entryName;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.update.internal.jarprocessor.PackStep#postProcess(java.io.File, java.io.File, java.util.LinkedList)
- */
- public File postProcess(File input, File workingDirectory, List containers) {
- if (canPack() && packCommand != null && input != null) {
- Properties inf = Utils.getEclipseInf(input, verbose);
- if (!shouldPack(input, containers, inf))
- return null;
- File tempFile = new File(workingDirectory, "temp_" + input.getName()); //$NON-NLS-1$
- try {
- String[] tmp = getCommand(input, tempFile, inf, containers);
- String[] cmd = new String[tmp.length + 1];
- cmd[0] = tmp[0];
- cmd[1] = "-r"; //$NON-NLS-1$
- System.arraycopy(tmp, 1, cmd, 2, tmp.length - 1);
-
- int result = execute(cmd, verbose);
- if (result == 0 && tempFile.exists()) {
- File finalFile = new File(workingDirectory, input.getName());
- if (finalFile.exists())
- finalFile.delete();
- tempFile.renameTo(finalFile);
- return finalFile;
- } else if (verbose) {
- System.out.println("Error: " + result + " was returned from command: " + Utils.concat(cmd)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- } catch (IOException e) {
- if (verbose)
- e.printStackTrace();
- return null;
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.update.internal.jarprocessor.PackStep#preProcess(java.io.File, java.io.File, java.util.LinkedList)
- */
- public File preProcess(File input, File workingDirectory, List containers) {
- return null;
- }
-
- public String getStepName() {
- return "Repack"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/SignCommandStep.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/SignCommandStep.java
deleted file mode 100644
index e648808fb..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/SignCommandStep.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.*;
-
-public class SignCommandStep extends CommandStep {
- private Set exclusions = null;
-
- public SignCommandStep(Properties options, String command) {
- super(options, command, ".jar", false); //$NON-NLS-1$
- exclusions = Utils.getSignExclusions(options);
- }
-
- public SignCommandStep(Properties options, String command, boolean verbose) {
- super(options, command, ".jar", verbose); //$NON-NLS-1$
- exclusions = Utils.getSignExclusions(options);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.update.jarprocessor.IProcessStep#recursionEffect(java.lang.String)
- */
- public String recursionEffect(String entryName) {
- if (entryName.endsWith(extension) && !exclusions.contains(entryName))
- return entryName;
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.update.jarprocessor.IProcessStep#preProcess(java.io.File, java.io.File)
- */
- public File preProcess(File input, File workingDirectory, List containers) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.update.jarprocessor.IProcessStep#postProcess(java.io.File, java.io.File)
- */
- public File postProcess(File input, File workingDirectory, List containers) {
- if (command != null && input != null && shouldSign(input, containers)) {
- try {
- String[] cmd = new String[] {command, input.getCanonicalPath()};
- int result = execute(cmd, verbose);
- if (result == 0) {
- return input;
- } else if (verbose) {
- System.out.println("Error: " + result + " was returned from command: " + Utils.concat(cmd)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- } catch (IOException e) {
- if (verbose) {
- e.printStackTrace();
- }
- }
- }
- return null;
- }
-
- public boolean shouldSign(File input, List containers) {
- Properties inf = null;
-
- //1: Are we excluded from signing by our parents?
- //innermost jar is first on the list, it overrides outer jars
- for (Iterator iterator = containers.iterator(); iterator.hasNext();) {
- inf = (Properties) iterator.next();
- if (inf.containsKey(Utils.MARK_EXCLUDE_CHILDREN_SIGN)){
- if(Boolean.valueOf(inf.getProperty(Utils.MARK_EXCLUDE_CHILDREN_SIGN)).booleanValue()) {
- if (verbose)
- System.out.println(input.getName() + "is excluded from signing by its containers."); //$NON-NLS-1$
- return false;
- }
- break;
- }
- }
-
- //2: Is this jar itself marked as exclude?
- inf = Utils.getEclipseInf(input, verbose);
- if (inf != null && inf.containsKey(Utils.MARK_EXCLUDE_SIGN) && Boolean.valueOf(inf.getProperty(Utils.MARK_EXCLUDE_SIGN)).booleanValue()) {
- if (verbose)
- System.out.println("Excluding " + input.getName() + " from signing."); //$NON-NLS-1$ //$NON-NLS-2$
- return false;
- }
- return true;
- }
-
- public String getStepName() {
- return "Sign"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessor.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessor.java
deleted file mode 100644
index df1a236c4..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessor.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.*;
-
-public class StreamProcessor {
- private static final String JOBS = "org.eclipse.core.runtime.jobs.Job"; //$NON-NLS-1$
- public static final String STREAM_PROCESSOR = "Stream Processor"; //$NON-NLS-1$
- public static final String STDERR = "STDERR"; //$NON-NLS-1$
- public static final String STDOUT = "STDOUT"; //$NON-NLS-1$
-
- static private boolean haveJobs = false;
-
- static {
- try {
- haveJobs = (Class.forName(JOBS) != null);
- } catch (ClassNotFoundException e) {
- //no jobs
- }
- }
-
- static public void start(final InputStream is, final String name, final boolean verbose) {
- if (haveJobs) {
- new StreamProcessorJob(is, name, verbose).schedule();
- } else {
- Thread job = new Thread(STREAM_PROCESSOR) {
- public void run() {
- StreamProcessor.run(is, name, verbose);
- }
- };
- job.start();
- }
- }
-
- static public void run(InputStream inputStream, String name, boolean verbose) {
- try {
- InputStreamReader isr = new InputStreamReader(inputStream);
- BufferedReader br = new BufferedReader(isr);
- while (true) {
- String s = br.readLine();
- if (s == null) {
- break;
- }
- if (verbose) {
- if (STDERR.equals(name))
- System.err.println(name + ": " + s); //$NON-NLS-1$
- else
- System.out.println(name + ": " + s); //$NON-NLS-1$
- }
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessorJob.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessorJob.java
deleted file mode 100644
index db404fec4..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessorJob.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.InputStream;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-
-public class StreamProcessorJob extends Job {
- private InputStream inputStream = null;
- private String name = null;
- private boolean verbose = false;
-
- public StreamProcessorJob(InputStream stream, String name, boolean verbose) {
- super(StreamProcessor.STREAM_PROCESSOR + " : " + name); //$NON-NLS-1$
- setPriority(Job.SHORT);
- setSystem(true);
- this.inputStream = stream;
- this.name = name;
- this.verbose = verbose;
- }
-
- protected IStatus run(IProgressMonitor monitor) {
- StreamProcessor.run(inputStream, name, verbose);
- inputStream = null;
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/UnpackStep.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/UnpackStep.java
deleted file mode 100644
index a6c84bf67..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/UnpackStep.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-import java.util.Properties;
-
-/**
- * @author aniefer
- *
- */
-public class UnpackStep extends CommandStep {
- public static final String UNPACKER_PROPERTY = "org.eclipse.update.jarprocessor.Unpacker"; //$NON-NLS-1$
- private static Boolean canUnpack = null;
- private static String unpackCommand = null;
-
- public static boolean canUnpack() {
- if (canUnpack != null)
- return canUnpack.booleanValue();
-
- String[] locations = Utils.getPack200Commands("unpack200"); //$NON-NLS-1$
- if (locations == null) {
- canUnpack = Boolean.FALSE;
- unpackCommand = null;
- return false;
- }
-
- int result;
- for (int i = 0; i < locations.length; i++) {
- if (locations[i] == null)
- continue;
- result = execute(new String[] {locations[i], "-V"}); //$NON-NLS-1$
- if (result == 0) {
- unpackCommand = locations[i];
- canUnpack = Boolean.TRUE;
- return true;
- }
- }
-
- canUnpack = Boolean.FALSE;
- return false;
- }
-
- public UnpackStep(Properties options) {
- super(options, null, null, false);
- }
-
- public UnpackStep(Properties options, boolean verbose) {
- super(options, null, null, verbose);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.update.jarprocessor.IProcessStep#recursionEffect(java.lang.String)
- */
- public String recursionEffect(String entryName) {
- if (canUnpack() && entryName.endsWith(Utils.PACKED_SUFFIX)) {
- return entryName.substring(0, entryName.length() - Utils.PACKED_SUFFIX.length());
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.update.jarprocessor.IProcessStep#preProcess(java.io.File, java.io.File)
- */
- public File preProcess(File input, File workingDirectory, List containers) {
- if (canUnpack() && unpackCommand != null) {
- String name = input.getName();
- if (name.endsWith(Utils.PACKED_SUFFIX)) {
- name = name.substring(0, name.length() - Utils.PACKED_SUFFIX.length());
-
- File unpacked = new File(workingDirectory, name);
- File parent = unpacked.getParentFile();
- if (!parent.exists())
- parent.mkdirs();
- try {
- String options = getOptions().getProperty(input.getName() + ".unpack.args"); //$NON-NLS-1$
- String[] cmd = null;
- if (options != null) {
- cmd = new String[] {unpackCommand, options, input.getCanonicalPath(), unpacked.getCanonicalPath()};
- } else {
- cmd = new String[] {unpackCommand, input.getCanonicalPath(), unpacked.getCanonicalPath()};
- }
- int result = execute(cmd, verbose);
- if (result != 0 && verbose)
- System.out.println("Error: " + result + " was returned from command: " + Utils.concat(cmd)); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (IOException e) {
- if (verbose)
- e.printStackTrace();
- return null;
- }
- return unpacked;
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.update.jarprocessor.IProcessStep#postProcess(java.io.File, java.io.File)
- */
- public File postProcess(File input, File workingDirectory, List containers) {
- return null;
- }
-
- public String getStepName() {
- return "Unpack"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java
deleted file mode 100644
index d6bbc6a36..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.*;
-import java.util.*;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-import java.util.zip.ZipException;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor;
-
-/**
- * @author aniefer@ca.ibm.com
- *
- */
-public class Utils {
- public static final String MARK_FILE_NAME = "META-INF/eclipse.inf"; //$NON-NLS-1$
-
- /*
- * Properties found in outer pack.properties file
- */
- //comma separated list of jars to exclude from sigining
- public static final String SIGN_EXCLUDES = "sign.excludes"; //$NON-NLS-1$
- //comma separated list of jars to exlclude from packing
- public static final String PACK_EXCLUDES = "pack.excludes"; //$NON-NLS-1$
- //Suffix used when specifying arguments to use when running pack200 on a jar
- public static final String PACK_ARGS_SUFFIX = ".pack.args"; //$NON-NLS-1$
-
- /*
- * Properties found in both pack.properties and eclipse.inf
- */
- // Default arguments to use when running pack200.
- // Affects all jars when specified in pack.properties, affects children when specified in eclipse.inf
- public static final String DEFAULT_PACK_ARGS = "pack200.default.args"; //$NON-NLS-1$
-
- /*
- * Properties found in eclipse.inf file
- */
- //This jar has been conditioned with pack200
- public static final String MARK_PROPERTY = "pack200.conditioned"; //$NON-NLS-1$
- //Exclude this jar from processing
- public static final String MARK_EXCLUDE = "jarprocessor.exclude"; //$NON-NLS-1$
- //Exclude this jar from pack200
- public static final String MARK_EXCLUDE_PACK = "jarprocessor.exclude.pack"; //$NON-NLS-1$
- //Exclude this jar from signing
- public static final String MARK_EXCLUDE_SIGN = "jarprocessor.exclude.sign"; //$NON-NLS-1$
- //Exclude this jar's children from processing
- public static final String MARK_EXCLUDE_CHILDREN = "jarprocessor.exclude.children"; //$NON-NLS-1$
- //Exclude this jar's children from pack200
- public static final String MARK_EXCLUDE_CHILDREN_PACK = "jarprocessor.exclude.children.pack"; //$NON-NLS-1$
- //Exclude this jar's children from signing
- public static final String MARK_EXCLUDE_CHILDREN_SIGN = "jarprocessor.exclude.children.sign"; //$NON-NLS-1$
- //Arguments used in pack200 for this jar
- public static final String PACK_ARGS = "pack200.args"; //$NON-NLS-1$
-
- public static final String PACK200_PROPERTY = "org.eclipse.update.jarprocessor.pack200"; //$NON-NLS-1$
- public static final String JRE = "@jre"; //$NON-NLS-1$
- public static final String PATH = "@path"; //$NON-NLS-1$
- public static final String NONE = "@none"; //$NON-NLS-1$
-
- public static final String PACKED_SUFFIX = ".pack.gz"; //$NON-NLS-1$
- public static final String JAR_SUFFIX = ".jar"; //$NON-NLS-1$
-
- public static final FileFilter JAR_FILTER = new FileFilter() {
- public boolean accept(File pathname) {
- return pathname.isFile() && pathname.getName().endsWith(".jar"); //$NON-NLS-1$
- }
- };
-
- public static final FileFilter PACK_GZ_FILTER = new FileFilter() {
- public boolean accept(File pathname) {
- return pathname.isFile() && pathname.getName().endsWith(JarProcessor.PACKED_SUFFIX);
- }
- };
-
- public static void close(Object stream) {
- if (stream != null) {
- try {
- if (stream instanceof InputStream)
- ((InputStream) stream).close();
- else if (stream instanceof OutputStream)
- ((OutputStream) stream).close();
- else if (stream instanceof JarFile)
- ((JarFile) stream).close();
- } catch (IOException e) {
- //ignore
- }
- }
- }
-
- /**
- * get the set of commands to try to execute pack/unpack
- * @param cmd the command, either "pack200" or "unpack200"
- * @return String [] or null
- */
- public static String[] getPack200Commands(String cmd) {
- String[] locations = null;
- String prop = System.getProperty(PACK200_PROPERTY);
- String javaHome = System.getProperty("java.home"); //$NON-NLS-1$
- if (NONE.equals(prop)) {
- return null;
- } else if (JRE.equals(prop)) {
- locations = new String[] {javaHome + "/bin/" + cmd}; //$NON-NLS-1$
- } else if (PATH.equals(prop)) {
- locations = new String[] {cmd};
- } else if (prop == null) {
- locations = new String[] {javaHome + "/bin/" + cmd, cmd}; //$NON-NLS-1$
- } else {
- locations = new String[] {prop + "/" + cmd}; //$NON-NLS-1$
- }
- return locations;
- }
-
- /**
- * Transfers all available bytes from the given input stream to the given
- * output stream. Closes both streams if close == true, regardless of failure.
- * Flushes the destination stream if close == false
- *
- * @param source
- * @param destination
- * @param close
- * @throws IOException
- */
- public static void transferStreams(InputStream source, OutputStream destination, boolean close) throws IOException {
- source = new BufferedInputStream(source);
- destination = new BufferedOutputStream(destination);
- try {
- byte[] buffer = new byte[8192];
- while (true) {
- int bytesRead = -1;
- if ((bytesRead = source.read(buffer)) == -1)
- break;
- destination.write(buffer, 0, bytesRead);
- }
- } finally {
- if (close) {
- close(source);
- close(destination);
- } else {
- destination.flush();
- }
- }
- }
-
- /**
- * Deletes all the files and directories from the given root down (inclusive).
- * Returns false if we could not delete some file or an exception occurred
- * at any point in the deletion.
- * Even if an exception occurs, a best effort is made to continue deleting.
- */
- public static boolean clear(java.io.File root) {
- boolean result = clearChildren(root);
- try {
- if (root.exists())
- result &= root.delete();
- } catch (Exception e) {
- result = false;
- }
- return result;
- }
-
- /**
- * Deletes all the files and directories from the given root down, except for
- * the root itself.
- * Returns false if we could not delete some file or an exception occurred
- * at any point in the deletion.
- * Even if an exception occurs, a best effort is made to continue deleting.
- */
- public static boolean clearChildren(java.io.File root) {
- boolean result = true;
- if (root.isDirectory()) {
- String[] list = root.list();
- // for some unknown reason, list() can return null.
- // Just skip the children If it does.
- if (list != null)
- for (int i = 0; i < list.length; i++)
- result &= clear(new java.io.File(root, list[i]));
- }
- return result;
- }
-
- public static Set getPackExclusions(Properties properties) {
- if (properties == null)
- return Collections.EMPTY_SET;
-
- String packExcludes = properties.getProperty(PACK_EXCLUDES);
- if (packExcludes != null) {
- String[] excludes = toStringArray(packExcludes, ","); //$NON-NLS-1$
- Set packExclusions = new HashSet();
- for (int i = 0; i < excludes.length; i++) {
- packExclusions.add(excludes[i]);
- }
- return packExclusions;
- }
- return Collections.EMPTY_SET;
- }
-
- public static Set getSignExclusions(Properties properties) {
- if (properties == null)
- return Collections.EMPTY_SET;
- String signExcludes = properties.getProperty(SIGN_EXCLUDES);
- if (signExcludes != null) {
- String[] excludes = toStringArray(signExcludes, ","); //$NON-NLS-1$
- Set signExclusions = new HashSet();
- for (int i = 0; i < excludes.length; i++) {
- signExclusions.add(excludes[i]);
- }
- return signExclusions;
- }
- return Collections.EMPTY_SET;
- }
-
- public static String concat(String[] array) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < array.length; i++) {
- if (i > 0)
- buffer.append(' ');
- buffer.append(array[i]);
- }
- return buffer.toString();
- }
-
- public static String[] toStringArray(String input, String separator) {
- StringTokenizer tokenizer = new StringTokenizer(input, separator);
- int count = tokenizer.countTokens();
- String[] result = new String[count];
- for (int i = 0; i < count; i++) {
- result[i] = tokenizer.nextToken().trim();
- }
- return result;
- }
-
- /**
- * Get the properties from the eclipse.inf file from the given jar. If the file is not a jar, null is returned.
- * If the file is a jar, but does not contain an eclipse.inf file, an empty Properties object is returned.
- * @param jarFile
- * @return The eclipse.inf properties for the given jar file
- */
- public static Properties getEclipseInf(File jarFile, boolean verbose) {
- if (jarFile == null || !jarFile.exists()) {
- if (verbose)
- System.out.println("Failed to obtain eclipse.inf due to missing jar file: " + jarFile); //$NON-NLS-1$
- return null;
- }
- JarFile jar = null;
- try {
- jar = new JarFile(jarFile, false);
- } catch (ZipException e) {
- //not a jar, don't bother logging this.
- return null;
- } catch (IOException e) {
- if (verbose) {
- System.out.println("Failed to obtain eclipse.inf due to IOException: " + jarFile); //$NON-NLS-1$
- e.printStackTrace();
- }
- return null;
- }
- try {
- JarEntry mark = jar.getJarEntry(MARK_FILE_NAME);
- if (mark != null) {
- InputStream in = jar.getInputStream(mark);
- Properties props = new Properties();
- props.load(in);
- in.close();
- return props;
- }
- return new Properties();
- } catch (IOException e) {
- if (verbose) {
- System.out.println("Failed to obtain eclipse.inf due to IOException: " + jarFile); //$NON-NLS-1$
- e.printStackTrace();
- }
- return null;
- } finally {
- close(jar);
- }
- }
-
- public static boolean shouldSkipJar(File input, boolean processAll, boolean verbose) {
- Properties inf = getEclipseInf(input, verbose);
- if (inf == null) {
- //not a jar, could be a pack.gz
- return false;
- }
- String exclude = inf.getProperty(MARK_EXCLUDE);
-
- //was marked as exclude, we should skip
- if (exclude != null && Boolean.valueOf(exclude).booleanValue())
- return true;
-
- //process all was set, don't skip
- if (processAll)
- return false;
-
- //otherwise, we skip if not marked marked
- String marked = inf.getProperty(MARK_PROPERTY);
- return !Boolean.valueOf(marked).booleanValue();
- }
-
- /**
- * Stores the given properties in the output stream. We store the properties
- * in sorted order so that the signing hash doesn't change if the properties didn't change.
- * @param props
- * @param stream
- */
- public static void storeProperties(Properties props, OutputStream stream) {
- PrintStream printStream = new PrintStream(stream);
- printStream.print("#Processed using Jarprocessor\n"); //$NON-NLS-1$
- SortedMap sorted = new TreeMap(props);
- for (Iterator iter = sorted.keySet().iterator(); iter.hasNext();) {
- String key = (String) iter.next();
- printStream.print(key);
- printStream.print(" = "); //$NON-NLS-1$
- printStream.print(sorted.get(key));
- printStream.print("\n"); //$NON-NLS-1$
-
- }
- printStream.flush();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/ZipProcessor.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/ZipProcessor.java
deleted file mode 100644
index 9f413f065..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/ZipProcessor.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.*;
-import java.util.*;
-import java.util.zip.*;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor;
-
-/**
- * @author aniefer@ca.ibm.com
- *
- */
-public class ZipProcessor {
-
- private JarProcessorExecutor executor = null;
- private JarProcessorExecutor.Options options = null;
-
- private String workingDirectory = null;
- private Properties properties = null;
- private Set packExclusions = null;
- private Set signExclusions = null;
-
- public void setExecutor(JarProcessorExecutor executor) {
- this.executor = executor;
- }
-
- public void setOptions(JarProcessorExecutor.Options options) {
- this.options = options;
- }
-
- public void setWorkingDirectory(String dir) {
- workingDirectory = dir;
- }
-
- public String getWorkingDirectory() {
- if (workingDirectory == null)
- workingDirectory = "."; //$NON-NLS-1$
- return workingDirectory;
- }
-
- private boolean repacking() {
- return options.repack || (options.pack && options.signCommand != null);
- }
-
- public void processZip(File zipFile) throws ZipException, IOException {
- if (options.verbose)
- System.out.println("Processing " + zipFile.getPath()); //$NON-NLS-1$
- ZipFile zip = new ZipFile(zipFile);
- initialize(zip);
-
- String extension = options.unpack ? "pack.gz" : ".jar"; //$NON-NLS-1$ //$NON-NLS-2$
- File tempDir = new File(getWorkingDirectory(), "temp_" + zipFile.getName()); //$NON-NLS-1$
- JarProcessor processor = new JarProcessor();
- processor.setVerbose(options.verbose);
- processor.setProcessAll(options.processAll);
- processor.setWorkingDirectory(tempDir.getCanonicalPath());
- if (options.unpack) {
- executor.addPackUnpackStep(processor, properties, options);
- }
-
- File outputFile = new File(getWorkingDirectory(), zipFile.getName() + ".temp"); //$NON-NLS-1$
- File parent = outputFile.getParentFile();
- if (!parent.exists())
- parent.mkdirs();
- ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(outputFile));
- Enumeration entries = zip.entries();
- if (entries.hasMoreElements()) {
- for (ZipEntry entry = (ZipEntry) entries.nextElement(); entry != null; entry = entries.hasMoreElements() ? (ZipEntry) entries.nextElement() : null) {
- String name = entry.getName();
-
- InputStream entryStream = zip.getInputStream(entry);
-
- boolean pack = options.pack && !packExclusions.contains(name);
- boolean sign = options.signCommand != null && !signExclusions.contains(name);
- boolean repack = repacking() && !packExclusions.contains(name);
-
- File extractedFile = null;
-
- if (entry.getName().endsWith(extension) && (pack || sign || repack || options.unpack)) {
- extractedFile = new File(tempDir, name);
- parent = extractedFile.getParentFile();
- if (!parent.exists())
- parent.mkdirs();
- if (options.verbose)
- System.out.println("Extracting " + entry.getName()); //$NON-NLS-1$
- FileOutputStream extracted = new FileOutputStream(extractedFile);
- Utils.transferStreams(entryStream, extracted, true); // this will close the stream
- entryStream = null;
-
- boolean skip = Utils.shouldSkipJar(extractedFile, options.processAll, options.verbose);
- if (skip) {
- //skipping this file
- entryStream = new FileInputStream(extractedFile);
- if (options.verbose)
- System.out.println(entry.getName() + " is not marked, skipping."); //$NON-NLS-1$
- } else {
- if (options.unpack) {
- File result = processor.processJar(extractedFile);
- name = name.substring(0, name.length() - extractedFile.getName().length()) + result.getName();
- extractedFile = result;
- } else {
- if (repack || sign) {
- processor.clearProcessSteps();
- if (repack)
- executor.addPackUnpackStep(processor, properties, options);
- if (sign)
- executor.addSignStep(processor, properties, options);
- extractedFile = processor.processJar(extractedFile);
- }
- if (pack) {
- processor.clearProcessSteps();
- executor.addPackStep(processor, properties, options);
- File modifiedFile = processor.processJar(extractedFile);
- if (modifiedFile.exists()) {
- try {
- String newName = name.substring(0, name.length() - extractedFile.getName().length()) + modifiedFile.getName();
- if (options.verbose) {
- System.out.println("Adding " + newName + " to " + outputFile.getPath()); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println();
- }
- ZipEntry zipEntry = new ZipEntry(newName);
- entryStream = new FileInputStream(modifiedFile);
- zipOut.putNextEntry(zipEntry);
- Utils.transferStreams(entryStream, zipOut, false); //we want to keep zipOut open
- entryStream.close();
- Utils.clear(modifiedFile);
- } catch (IOException e) {
- Utils.close(entryStream);
- if (options.verbose) {
- e.printStackTrace();
- System.out.println("Warning: Problem reading " + modifiedFile.getPath() + ".");
- }
- }
- entryStream = null;
- } else if (options.verbose) {
- System.out.println("Warning: " + modifiedFile.getPath() + " not found.");
- }
- }
- }
- if (extractedFile.exists()) {
- try {
- entryStream = new FileInputStream(extractedFile);
- } catch (IOException e) {
- if (options.verbose) {
- e.printStackTrace();
- System.out.println("Warning: Problem reading " + extractedFile.getPath() + ".");
- }
- }
- }
-
- if (options.verbose && entryStream != null) {
- System.out.println("Adding " + name + " to " + outputFile.getPath()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
- if (entryStream != null) {
- ZipEntry newEntry = new ZipEntry(name);
- try {
- zipOut.putNextEntry(newEntry);
- Utils.transferStreams(entryStream, zipOut, false);
- zipOut.closeEntry();
- } catch (ZipException e) {
- if (options.verbose) {
- System.out.println("Warning: " + name + " already exists in " + outputFile.getName() + ". Skipping.");
- }
- }
- entryStream.close();
- }
-
- if (extractedFile != null)
- Utils.clear(extractedFile);
-
- if (options.verbose) {
- System.out.println();
- System.out.println("Processing " + zipFile.getPath()); //$NON-NLS-1$
- }
- }
- }
- zipOut.close();
- zip.close();
-
- File finalFile = new File(getWorkingDirectory(), zipFile.getName());
- if (finalFile.exists())
- finalFile.delete();
- outputFile.renameTo(finalFile);
- Utils.clear(tempDir);
- }
-
- private void initialize(ZipFile zip) {
- ZipEntry entry = zip.getEntry("pack.properties"); //$NON-NLS-1$
- properties = new Properties();
- if (entry != null) {
- InputStream stream = null;
- try {
- stream = zip.getInputStream(entry);
- properties.load(stream);
- } catch (IOException e) {
- if (options.verbose)
- e.printStackTrace();
- } finally {
- Utils.close(stream);
- }
- }
-
- packExclusions = Utils.getPackExclusions(properties);
- signExclusions = Utils.getSignExclusions(properties);
-
- if (executor == null)
- executor = new JarProcessorExecutor();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/pack-readme.html b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/pack-readme.html
deleted file mode 100644
index ef5fe5e0b..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/pack-readme.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Eclipse update packing tool readme</title>
-</head>
-<body>
-<h1>Eclipse update packing tool</h1>
-
-<h3>Overview</h3>
-The update packing tool processes a hierarchy of arbitrarily nested
-JARs and ZIP files. It is a generic utility that performs a depth first traversal of
-a nested hierarchy of ZIPs and JARs, performs various commands on
-each of the JARs in the hierarchy, and then rebuilds the same hierarchy
-of ZIPs and JARs again. Currently its main functions are:
-<ul>
- <li>Packing JARs using the Java 1.5 <a href="http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/pack200.html">pack200</a>
- command.</li>
- <li>Unpacking PACK.GZs using the Java 1.5 <a href="http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/unpack200.html">unpack200</a>
- command.</li>
- <li>Normalizing JARs for future compression by pack200. This is accomplished
- by running the pack200 command with the <tt>--repack</tt> command line argument.</li>
- <li>Signing JARs to allow for authentication of the origin of JARs. This is accomplished by
- running a supplied command (typically the command will just be a wrapper around
- the Java <a href="http://java.sun.com/j2se/1.3/docs/tooldocs/win32/jarsigner.html">jarsigner</a> tool).</li>
-</ul>
-The packing tool is used in the following contexts:
-<ul>
- <li>During a PDE build, to prepare JARs for uploading to an Eclipse
- update site. In this usage, it is used to both nomalize JAR contents
- (pack200 -repack), and sign JARs.</li>
- <li>On an update site, to convert traditional JAR content into the
- compressed pack200 format.</li>
- <li>From an Eclipse client application during update, to convert
- compressed pack200 format content into executable JAR files.</li>
-</ul>
-<h3>Tool usage</h3>
-To run the packing tool, you need a 1.5 JRE installed. The tool is run
-by invoking Java as follows:
-
-<pre>
- java jarprocessor.jar [options] input
-</pre>
-
-Where <tt>input</tt> is either a zip file, a directory, or a JAR (or a pack.gz file). All files ending
-in ".jar" or ".pack.gz" in the provided zip or directory hierarchy
-will be processed.
-The following additional command line arguments are supported:
-<ul>
-<li>-repack : Normalize the jars using pack200 <tt>--repack</tt></li>
-<li>-sign &lt;cmd&gt; : signs the jars by executing the provided command.
-The command will be provided a single argument that will be the full path of the JAR to process.
-</li>
-<li>-pack : for each input in JAR form, produce a corresponding output
-in packed form. For an input "a.jar", the output is a.jar.pack.gz.
-</li>
-<li>-unpack : for each input in packed form, produce a corresponding output
-in unpacked form. For an input "a.jar.pack.gz", the output is "a.jar". -unpack is mutually exclusive with -repack, -pack and -sign.</li>
-<li>-outputDir &lt;dir&gt; : The directory to put the tool's output into. If the input was a zip file, then an output zip file will be
-created containg all the output files. If the input was a directory, for each input file there is a corresponding output file in the output directory. By default the current working directory is used. If the input is in the same
-directory as the output, the input files may be overwritten.</li>
-</ul>
-
-Additionally, when the input is a zip file, it may contain a file called
-<tt>pack.properties</tt>. The pack.properties file supports the following values:
-<ul>
-<li>pack.excludes = jarName[, jarName]* : A comma-delimited list of JARs that should not be packed or repacked.
-</li>
-<li>sign.excludes = jarName[, jarName]* : A comma-delimited list of JARs that should not be signed.
-</li>
-<li>&lt;jarname&gt;.pack.args = option[, option]* : A comma-delimited list of additional arguments that should
-be passed to pack200 when packing any jar with name &lt;jarname&gt;.
-</ul>
-</p>
-<p>
-<font size=-1>
-Copyright (c) IBM Corporation and others 2006. All rights reserved. This program and the accompanying materials
-are made available under the terms of the
-<a href="http://www.eclipse.org/legal/epl-v10.html">Eclipse Public License v1.0</a>.
-</font>
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/unsigner/UnsignCommand.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/unsigner/UnsignCommand.java
deleted file mode 100644
index 30a9e852b..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/unsigner/UnsignCommand.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor.unsigner;
-
-import java.io.File;
-import java.util.List;
-import java.util.Properties;
-import org.eclipse.equinox.internal.p2.jarprocessor.SignCommandStep;
-
-public class UnsignCommand extends SignCommandStep {
-
- public UnsignCommand(Properties options, String command, boolean verbose) {
- super(options, command, verbose);
- }
-
- public File postProcess(File input, File workingDirectory, List containers) {
- if (command != null && input != null && shouldSign(input, containers)) {
- execute(input);
- }
- return null;
- }
-
- private void execute(File input) {
- Unsigner jarUnsigner = new Unsigner();
- jarUnsigner.setJar(input);
- jarUnsigner.setKeepManifestEntries(false);
- jarUnsigner.execute();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/unsigner/Unsigner.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/unsigner/Unsigner.java
deleted file mode 100644
index 6e8ca82b1..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/unsigner/Unsigner.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor.unsigner;
-import java.io.*;
-import java.util.Enumeration;
-import java.util.jar.JarFile;
-import java.util.jar.Manifest;
-import java.util.zip.*;
-
-/**
- * This class removes the signature files from a jar and clean up the manifest.
- */
-public class Unsigner {
- private static final String META_INF = "META-INF"; //$NON-NLS-1$
- private static final String DSA_EXT = ".DSA"; //$NON-NLS-1$
- private static final String RSA_EXT = ".RSA"; //$NON-NLS-1$
- private static final String SF_EXT = ".SF"; //$NON-NLS-1$
- private static final String META_INF_PREFIX = META_INF + '/';
-
- private String[] signers;
- private File jarFile;
- private boolean keepManifestContent = false;
-
- private boolean isSigned(File file) {
- ZipFile jar = null;
- try {
- jar = new ZipFile(file);
-
- if (signers != null) {
- for (int i = 0; i < signers.length; i++) {
- if (jar.getEntry((META_INF_PREFIX + signers[i] + SF_EXT).toUpperCase()) != null)
- return true;
- }
- } else {
- Enumeration entries = jar.entries();
- while (entries.hasMoreElements()) {
- ZipEntry entry = (ZipEntry) entries.nextElement();
- String entryName = entry.getName();
- if(entryName.endsWith(SF_EXT) && entryName.startsWith(META_INF))
- return true;
- }
- }
- return false;
- } catch (ZipException e) {
- return false;
- } catch (IOException e) {
- return false;
- } finally {
- if (jar != null)
- try {
- jar.close();
- } catch (IOException e) {
- //Ignore
- }
- }
- }
-
- public void execute() {
- processJar(jarFile);
- }
-
- private void processJar(File inputFile) {
- if (!isSigned(inputFile))
- return;
-
- try {
- ZipInputStream input = new ZipInputStream(new BufferedInputStream(new FileInputStream(inputFile)));
- File outputFile = File.createTempFile("removing.", ".signature", inputFile.getParentFile()); //$NON-NLS-1$ //$NON-NLS-2$
- ZipOutputStream output = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(outputFile)));
-
- ZipEntry inputZe = input.getNextEntry();
- byte[] b = new byte[8192];
- while (inputZe != null) {
- byte remove = shouldRemove(inputZe);
- if (remove == 2) {
- inputZe = input.getNextEntry();
- continue;
- }
-
- //copy the file or modify the manifest.mf
- if (remove == 1) {
- output.putNextEntry(new ZipEntry(inputZe.getName()));
- Manifest m = new Manifest();
- m.read(input);
- m.getEntries().clear(); //This is probably not subtle enough
- m.write(output);
- } else {
- output.putNextEntry(inputZe);
- while (input.available() != 0) {
- int read = input.read(b);
- if (read != -1)
- output.write(b, 0, read);
- }
- }
- output.closeEntry();
- input.closeEntry();
-
- inputZe = input.getNextEntry();
- }
- output.close();
- input.close();
- inputFile.delete();
- outputFile.renameTo(inputFile);
- } catch (FileNotFoundException e) {
- //this can't happen we have checked before
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- private byte shouldRemove(ZipEntry entry) {
- String entryName = entry.getName();
- if(keepManifestContent == false && entryName.equalsIgnoreCase(JarFile.MANIFEST_NAME)) {
- return 1;
- }
- if (signers != null) {
- for (int i = 0; i < signers.length; i++) {
- if (entryName.equalsIgnoreCase(META_INF_PREFIX + signers[i] + SF_EXT) || entryName.equalsIgnoreCase(META_INF_PREFIX + signers[i] + RSA_EXT) || entryName.equalsIgnoreCase(META_INF_PREFIX + signers[i] + DSA_EXT))
- return 2;
- }
- } else {
- if (entryName.startsWith(META_INF) && (entryName.endsWith(SF_EXT) || entryName.endsWith(RSA_EXT) || entryName.endsWith(DSA_EXT)))
- return 2;
- }
- return 0;
- }
-
- public void setRemoveSigners(String[] fileName) {
- signers = fileName;
- }
-
- public void setJar(File file) {
- jarFile = file;
- }
-
- public void setKeepManifestEntries(boolean keep) {
- keepManifestContent = keep;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/Verifier.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/Verifier.java
deleted file mode 100644
index 322d77905..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/Verifier.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.jarprocessor.verifier;
-
-import java.io.*;
-import java.util.Iterator;
-import java.util.Properties;
-import org.eclipse.equinox.internal.p2.jarprocessor.UnpackStep;
-import org.eclipse.equinox.internal.p2.jarprocessor.Utils;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor;
-
-public class Verifier extends JarProcessorExecutor {
-
- private static void printUsage() {
- System.out.println("This tool verifies that unpacking a pack.gz file with the jarprocessor results in a valid jar file."); //$NON-NLS-1$
- System.out.println("Usage: java -cp jarprocessor.jar org.eclipse.update.internal.jarprocessor.verifier.Verifier -dir <workingDirectory> input [input]"); //$NON-NLS-1$
- System.out.println(""); //$NON-NLS-1$
- System.out.println("-dir : specifies a working directory where pack.gz files can be temporarily unpacked"); //$NON-NLS-1$
- System.out.println("input : a list of directories and/or pack.gz files to verify."); //$NON-NLS-1$
-
- }
-
- public static void main(String[] args) {
- if (!VerifyStep.canVerify()) {
- System.out.println("Can't find jarsigner. Please adjust your system path or use a jdk."); //$NON-NLS-1$
- printUsage();
- return;
- }
-
- String workingDirectory = null;
- String[] input;
-
- if (args.length == 0) {
- workingDirectory = "."; //$NON-NLS-1$
- input = new String[] {"."}; //$NON-NLS-1$
- } else {
- int idx = 0;
- if (args[0] == "-help") { //$NON-NLS-1$
- printUsage();
- return;
- }
- if (args[idx] == "-dir") { //$NON-NLS-1$
- workingDirectory = args[++idx];
- idx++;
- } else {
- workingDirectory = "temp"; //$NON-NLS-1$
- }
-
- input = new String[args.length - idx];
- System.arraycopy(args, idx, input, 0, args.length - idx);
- }
-
- File workingDir = new File(workingDirectory);
- boolean clear = false;
- if (workingDir.exists()) {
- workingDir = new File(workingDir, "jarprocessor.verifier.temp"); //$NON-NLS-1$
- clear = true;
- }
-
- Verifier verifier = new Verifier();
- verifier.verify(workingDir, input);
-
- if (clear)
- workingDir.deleteOnExit();
- }
-
- public void verify(final File workingDirectory, String[] input) {
- options = new Options();
- options.verbose = false;
- options.repack = true; // We first unpack first during repack/sign phase
- options.pack = true; // then we are verifying during the pack phase.
- options.outputDir = workingDirectory.toString();
-
- Properties properties = new Properties();
-
- /* There is no need to use a full processor to do the verification unless we want to verify nested jars as well.
- * So for now, use a custom processor to just call the verify step directly.
- */
- final VerifyStep verifyStep = new VerifyStep(properties, false);
- JarProcessor verifier = new JarProcessor() {
- public File processJar(File inputFile) throws IOException {
- Iterator iterator = getStepIterator();
- if (iterator.hasNext() && iterator.next() instanceof VerifyStep)
- return verifyStep.postProcess(inputFile, workingDirectory, null);
- //else we are unpacking, call super
- return super.processJar(inputFile);
- }
- };
- verifier.setWorkingDirectory(workingDirectory.getAbsolutePath());
-
- for (int i = 0; i < input.length; i++) {
- File inputFile = new File(input[i]);
- if (inputFile.exists()) {
- try {
- process(inputFile, Utils.PACK_GZ_FILTER, true, verifier, properties);
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- }
- }
- }
- Utils.clear(workingDirectory);
- }
-
- public void addPackStep(JarProcessor processor, Properties properties, JarProcessorExecutor.Options processOptions) {
- processor.addProcessStep(new VerifyStep(properties, processOptions.verbose));
- }
-
- public void addPackUnpackStep(JarProcessor processor, Properties properties, Options processOptions) {
- processor.addProcessStep(new UnpackStep(properties, processOptions.verbose));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/VerifyStep.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/VerifyStep.java
deleted file mode 100644
index f9b19351e..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/VerifyStep.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.jarprocessor.verifier;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-import java.util.Properties;
-import org.eclipse.equinox.internal.p2.jarprocessor.CommandStep;
-import org.eclipse.equinox.internal.p2.jarprocessor.Utils;
-
-public class VerifyStep extends CommandStep {
-
- static String verifyCommand = "jarsigner"; //$NON-NLS-1$
- static Boolean canVerify = null;
-
- public static boolean canVerify() {
- if (canVerify != null)
- return canVerify.booleanValue();
-
- String javaHome = System.getProperty("java.home"); //$NON-NLS-1$
- String command = javaHome + "/../bin/jarsigner"; //$NON-NLS-1$
- int result = execute(new String[] {command});
- if (result < 0) {
- command = "jarsigner"; //$NON-NLS-1$
- result = execute(new String[] {command});
- if (result < 0) {
- canVerify = Boolean.FALSE;
- return false;
- }
- }
- verifyCommand = command;
- canVerify = Boolean.TRUE;
- return true;
- }
-
- public VerifyStep(Properties options, boolean verbose) {
- super(options, verifyCommand, ".jar", verbose); //$NON-NLS-1$
- }
-
- public String getStepName() {
- return "Verify"; //$NON-NLS-1$
- }
-
- public File postProcess(File input, File workingDirectory, List containers) {
- if (canVerify() && verifyCommand != null) {
- try {
- System.out.print("Verifying " + input.getName() + ": "); //$NON-NLS-1$ //$NON-NLS-2$
- String[] cmd = new String[] {verifyCommand, "-verify", input.getCanonicalPath()}; //$NON-NLS-1$
- int result = execute(cmd, true);
- if (result != 0 && verbose)
- System.out.println("Error: " + result + " was returned from command: " + Utils.concat(cmd)); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (IOException e) {
- if (verbose)
- e.printStackTrace();
- return null;
- }
- return input;
- }
- return null;
- }
-
- public File preProcess(File input, File workingDirectory, List containers) {
- return null;
- }
-
- public String recursionEffect(String entryName) {
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/IProcessStep.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/IProcessStep.java
deleted file mode 100644
index 1479c4c32..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/IProcessStep.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.internal.provisional.equinox.p2.jarprocessor;
-
-import java.io.File;
-import java.util.List;
-import java.util.Properties;
-
-/**
- * @author aniefer@ca.ibm.com
- *
- */
-public interface IProcessStep {
-
- /**
- * The effect of this processing step if the JarProcessor was to recurse on this entry.
- * Return null if this step will not do anything with this entry.
- * Return the new entryName if this step will modify this entry on recursion.
- * @param entryName
- * @return The new entry name, or <code>null</code>
- */
- public String recursionEffect(String entryName);
-
- /**
- * Perform some processing on the input file before the JarProcessor considers the entries for recursion.
- * @param input
- * @param workingDirectory
- * @param containers inf properties for containing jars, innermost jar is first on the list
- * @return the file containing the result of the processing
- */
- public File preProcess(File input, File workingDirectory, List containers);
-
- /**
- * Perform some processing on the input file after the JarProcessor returns from recursion.
- *
- * @param input
- * @param workingDirectory
- * @param containers inf properties for containing jars, innermost jar is first on the list
- * @return the file containing the result of the processing
- */
- public File postProcess(File input, File workingDirectory, List containers);
-
- /**
- * Return the name of this process step
- * @return the name of this process step
- */
- public String getStepName();
-
- /**
- * Adjust any properties in the eclipse.inf as appropriate for this step
- * @param input
- * @param inf
- * @param containers inf properties for containing jars, innermost jar is first on the list
- */
- public void adjustInf(File input, Properties inf, List containers);
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java
deleted file mode 100644
index b22bc8e9b..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java
+++ /dev/null
@@ -1,398 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.internal.provisional.equinox.p2.jarprocessor;
-
-import java.io.*;
-import java.util.*;
-import java.util.jar.*;
-import org.eclipse.equinox.internal.p2.jarprocessor.*;
-
-public class JarProcessor {
- public static final String PACKED_SUFFIX = "pack.gz"; //$NON-NLS-1$
-
- private List steps = new ArrayList();
- private String workingDirectory = ""; //$NON-NLS-1$
- private int depth = -1;
- private boolean verbose = false;
- private boolean processAll = false;
- private LinkedList containingInfs = new LinkedList();
-
- static public JarProcessor getUnpackProcessor(Properties properties) {
- if (!canPerformUnpack())
- throw new UnsupportedOperationException();
- JarProcessor processor = new JarProcessor();
- processor.addProcessStep(new UnpackStep(properties));
- return processor;
- }
-
- static public JarProcessor getPackProcessor(Properties properties) {
- if (!canPerformPack())
- throw new UnsupportedOperationException();
- JarProcessor processor = new JarProcessor();
- processor.addProcessStep(new PackStep(properties));
- return processor;
- }
-
- static public boolean canPerformPack() {
- return PackStep.canPack();
- }
-
- static public boolean canPerformUnpack() {
- return UnpackStep.canUnpack();
- }
-
- public String getWorkingDirectory() {
- return workingDirectory;
- }
-
- public void setWorkingDirectory(String dir) {
- if (dir != null)
- workingDirectory = dir;
- }
-
- public void setVerbose(boolean verbose) {
- this.verbose = verbose;
- }
-
- public void setProcessAll(boolean all) {
- this.processAll = all;
- }
-
- public void addProcessStep(IProcessStep step) {
- steps.add(step);
- }
-
- public void clearProcessSteps() {
- steps.clear();
- }
-
- public Iterator getStepIterator() {
- return steps.iterator();
- }
-
- /**
- * Recreate a jar file. The replacements map specifies entry names to be replaced, the replacements are
- * expected to be found in directory.
- *
- * @param jar - The input jar
- * @param outputJar - the output
- * @param replacements - map of entryName -> new entryName
- * @param directory - location to find file for new entryName
- * @throws IOException
- */
- private void recreateJar(JarFile jar, JarOutputStream outputJar, Map replacements, File directory, Properties inf) throws IOException {
- InputStream in = null;
- boolean marked = false;
- try {
- Enumeration entries = jar.entries();
- for (JarEntry entry = (JarEntry) entries.nextElement(); entry != null; entry = entries.hasMoreElements() ? (JarEntry) entries.nextElement() : null) {
- File replacement = null;
- JarEntry newEntry = null;
- if (replacements.containsKey(entry.getName())) {
- String name = (String) replacements.get(entry.getName());
- replacement = new File(directory, name);
- if (name != null) {
- if (replacement.exists()) {
- try {
- in = new BufferedInputStream(new FileInputStream(replacement));
- newEntry = new JarEntry(name);
- } catch (Exception e) {
- if (verbose) {
- e.printStackTrace();
- System.out.println("Warning: Problem reading " + replacement.getPath() + ", using " + jar.getName() + File.separator + entry.getName() + " instead."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
- } else if (verbose) {
- System.out.println("Warning: " + replacement.getPath() + " not found, using " + jar.getName() + File.separator + entry.getName() + " instead."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
- }
- if (newEntry == null) {
- try {
- in = new BufferedInputStream(jar.getInputStream(entry));
- newEntry = new JarEntry(entry.getName());
- } catch (Exception e) {
- if (verbose) {
- e.printStackTrace();
- System.out.println("ERROR: problem reading " + entry.getName() + " from " + jar.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- continue;
- }
- }
- newEntry.setTime(entry.getTime());
- outputJar.putNextEntry(newEntry);
- if (entry.getName().equals(Utils.MARK_FILE_NAME)) {
- //The eclipse.inf file was read in earlier, don't need to reread it, just write it out now
- Utils.storeProperties(inf, outputJar);
- marked = true;
- } else {
- Utils.transferStreams(in, outputJar, false);
- }
- outputJar.closeEntry();
- in.close();
-
- //delete the nested jar file
- if (replacement != null) {
- replacement.delete();
- }
- }
- if (!marked) {
- JarEntry entry = new JarEntry(Utils.MARK_FILE_NAME);
- outputJar.putNextEntry(entry);
- Utils.storeProperties(inf, outputJar);
- outputJar.closeEntry();
- }
- } finally {
- Utils.close(outputJar);
- Utils.close(jar);
- Utils.close(in);
- }
- }
-
- private String recursionEffect(String entryName) {
- String result = null;
- for (Iterator iter = steps.iterator(); iter.hasNext();) {
- IProcessStep step = (IProcessStep) iter.next();
-
- result = step.recursionEffect(entryName);
- if (result != null)
- entryName = result;
- }
- return result;
- }
-
- private void extractEntries(JarFile jar, File tempDir, Map data, Properties inf) throws IOException {
- if (inf != null) {
- //skip if excluding children
- if (inf.containsKey(Utils.MARK_EXCLUDE_CHILDREN)) {
- String excludeChildren = inf.getProperty(Utils.MARK_EXCLUDE_CHILDREN);
- if (Boolean.valueOf(excludeChildren).booleanValue())
- if (verbose) {
- for (int i = 0; i <= depth; i++)
- System.out.print(" "); //$NON-NLS-1$
- System.out.println("Children of " + jar.getName() + "are excluded from processing."); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return;
- }
- }
-
- Enumeration entries = jar.entries();
- if (entries.hasMoreElements()) {
- for (JarEntry entry = (JarEntry) entries.nextElement(); entry != null; entry = entries.hasMoreElements() ? (JarEntry) entries.nextElement() : null) {
- String name = entry.getName();
- String newName = recursionEffect(name);
- if (newName != null) {
- if (verbose) {
- for (int i = 0; i <= depth; i++)
- System.out.print(" "); //$NON-NLS-1$
- System.out.println("Processing nested file: " + name); //$NON-NLS-1$
- }
- //extract entry to temp directory
- File extracted = new File(tempDir, name);
- File parentDir = extracted.getParentFile();
- if (!parentDir.exists())
- parentDir.mkdirs();
-
- InputStream in = null;
- OutputStream out = null;
- try {
- in = jar.getInputStream(entry);
- out = new BufferedOutputStream(new FileOutputStream(extracted));
- Utils.transferStreams(in, out, true); //this will close both streams
- } finally {
- Utils.close(in);
- Utils.close(out);
- }
- extracted.setLastModified(entry.getTime());
-
- //recurse
- String dir = getWorkingDirectory();
- try {
- containingInfs.addFirst(inf);
- setWorkingDirectory(parentDir.getCanonicalPath());
- File result = processJar(extracted);
- newName = name.substring(0, name.length() - extracted.getName().length()) + result.getName();
- data.put(name, newName);
- } finally {
- setWorkingDirectory(dir);
- containingInfs.removeFirst();
- }
-
- //delete the extracted item leaving the recursion result
- if (!name.equals(newName))
- extracted.delete();
- }
- }
- }
- }
-
- private File preProcess(File input, File tempDir) {
- File result = null;
- for (Iterator iter = steps.iterator(); iter.hasNext();) {
- IProcessStep step = (IProcessStep) iter.next();
- result = step.preProcess(input, tempDir, containingInfs);
- if (result != null)
- input = result;
- }
- return input;
- }
-
- private File postProcess(File input, File tempDir) {
- File result = null;
- for (Iterator iter = steps.iterator(); iter.hasNext();) {
- IProcessStep step = (IProcessStep) iter.next();
- result = step.postProcess(input, tempDir, containingInfs);
- if (result != null)
- input = result;
- }
- return input;
- }
-
- private void adjustInf(File input, Properties inf) {
- for (Iterator iter = steps.iterator(); iter.hasNext();) {
- IProcessStep step = (IProcessStep) iter.next();
- step.adjustInf(input, inf, containingInfs);
- }
- }
-
- public File processJar(File input) throws IOException {
- File tempDir = null;
- ++depth;
- try {
- long lastModified = input.lastModified();
- File workingDir = new File(getWorkingDirectory());
- if (!workingDir.exists())
- workingDir.mkdirs();
-
- boolean skip = Utils.shouldSkipJar(input, processAll, verbose);
- if (depth == 0 && verbose) {
- if (skip)
- System.out.println("Skipping " + input.getPath()); //$NON-NLS-1$
- else {
- System.out.print("Running "); //$NON-NLS-1$
- for (Iterator iter = steps.iterator(); iter.hasNext();) {
- IProcessStep step = (IProcessStep) iter.next();
- System.out.print(step.getStepName() + " "); //$NON-NLS-1$
- }
- System.out.println("on " + input.getPath()); //$NON-NLS-1$
- }
- }
-
- if (skip) {
- //This jar was not marked as conditioned, and we are only processing conditioned jars, so do nothing
- return input;
- }
-
- //pre
- File workingFile = preProcess(input, workingDir);
-
- //Extract entries from jar and recurse on them
- if (depth == 0) {
- tempDir = new File(workingDir, "temp." + workingFile.getName()); //$NON-NLS-1$
- } else {
- File parent = workingDir.getParentFile();
- tempDir = new File(parent, "temp_" + depth + '_' + workingFile.getName()); //$NON-NLS-1$
- }
-
- JarFile jar = new JarFile(workingFile, false);
- Map replacements = new HashMap();
- Properties inf = Utils.getEclipseInf(workingFile, verbose);
- extractEntries(jar, tempDir, replacements, inf);
-
- if (inf != null)
- adjustInf(workingFile, inf);
-
- //Recreate the jar with replacements.
- //TODO: This is not strictly necessary if we didn't change the inf file and didn't change any content
- File tempJar = null;
- tempJar = new File(tempDir, workingFile.getName());
- File parent = tempJar.getParentFile();
- if (!parent.exists())
- parent.mkdirs();
- JarOutputStream jarOut = new JarOutputStream(new BufferedOutputStream(new FileOutputStream(tempJar)));
- recreateJar(jar, jarOut, replacements, tempDir, inf);
-
- jar.close();
- if (tempJar != null) {
- if (!workingFile.equals(input)) {
- workingFile.delete();
- }
- workingFile = tempJar;
- }
-
- //post
- File result = postProcess(workingFile, workingDir);
-
- //have to normalize after the post steps
- normalize(result, workingDir);
-
- if (!result.equals(workingFile) && !workingFile.equals(input))
- workingFile.delete();
- if (!result.getParentFile().equals(workingDir)) {
- File finalFile = new File(workingDir, result.getName());
- if (finalFile.exists())
- finalFile.delete();
- result.renameTo(finalFile);
- result = finalFile;
- }
-
- result.setLastModified(lastModified);
- return result;
- } finally {
- --depth;
- if (tempDir != null && tempDir.exists())
- Utils.clear(tempDir);
- }
- }
-
- private void normalize(File input, File directory) {
- if (input.getName().endsWith(JarProcessor.PACKED_SUFFIX)) {
- //not a jar
- return;
- }
- try {
- File tempJar = new File(directory, "temp_" + input.getName()); //$NON-NLS-1$
- JarFile jar = null;
- try {
- jar = new JarFile(input, false);
- } catch (JarException e) {
- //not a jar
- return;
- }
- JarOutputStream jarOut = new JarOutputStream(new BufferedOutputStream(new FileOutputStream(tempJar)));
- InputStream in = null;
- try {
- Enumeration entries = jar.entries();
- for (JarEntry entry = (JarEntry) entries.nextElement(); entry != null; entry = entries.hasMoreElements() ? (JarEntry) entries.nextElement() : null) {
- JarEntry newEntry = new JarEntry(entry.getName());
- newEntry.setTime(entry.getTime());
- in = new BufferedInputStream(jar.getInputStream(entry));
- jarOut.putNextEntry(newEntry);
- Utils.transferStreams(in, jarOut, false);
- jarOut.closeEntry();
- in.close();
- }
- } finally {
- Utils.close(jarOut);
- Utils.close(jar);
- Utils.close(in);
- }
- tempJar.setLastModified(input.lastModified());
- input.delete();
- tempJar.renameTo(input);
- } catch (IOException e) {
- if (verbose) {
- System.out.println("Error normalizing jar " + input.getName()); //$NON-NLS-1$
- e.printStackTrace();
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessorExecutor.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessorExecutor.java
deleted file mode 100644
index 332333f05..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessorExecutor.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.internal.provisional.equinox.p2.jarprocessor;
-
-import java.io.*;
-import java.util.Properties;
-import java.util.Set;
-import java.util.zip.ZipException;
-import org.eclipse.equinox.internal.p2.jarprocessor.*;
-
-public class JarProcessorExecutor {
- public static class Options {
- public String outputDir = "."; //$NON-NLS-1$
- public String signCommand = null;
- public boolean pack = false;
- public boolean repack = false;
- public boolean unpack = false;
- public boolean verbose = false;
- public boolean processAll = false;
- public File input = null;
- }
-
- protected Options options = null;
- private Set packExclusions = null;
- private Set signExclusions = null;
-
- public void runJarProcessor(Options processOptions) {
- this.options = processOptions;
- if (options.input.isFile() && options.input.getName().endsWith(".zip")) { //$NON-NLS-1$
- ZipProcessor processor = new ZipProcessor();
- processor.setWorkingDirectory(options.outputDir);
- processor.setOptions(options);
- processor.setExecutor(this);
- try {
- processor.processZip(options.input);
- } catch (ZipException e) {
- if (options.verbose)
- e.printStackTrace();
- } catch (IOException e) {
- if (options.verbose)
- e.printStackTrace();
- }
- } else {
- JarProcessor processor = new JarProcessor();
-
- processor.setWorkingDirectory(options.outputDir);
- processor.setProcessAll(options.processAll);
- processor.setVerbose(options.verbose);
-
- //load options file
- Properties properties = new Properties();
- if (options.input.isDirectory()) {
- File packProperties = new File(options.input, "pack.properties"); //$NON-NLS-1$
- if (packProperties.exists() && packProperties.isFile()) {
- InputStream in = null;
- try {
- in = new BufferedInputStream(new FileInputStream(packProperties));
- properties.load(in);
- } catch (IOException e) {
- if (options.verbose)
- e.printStackTrace();
- } finally {
- Utils.close(in);
- }
- }
-
- packExclusions = Utils.getPackExclusions(properties);
- signExclusions = Utils.getSignExclusions(properties);
- }
-
- try {
- FileFilter filter = createFileFilter(options);
- process(options.input, filter, options.verbose, processor, properties);
- } catch (FileNotFoundException e) {
- if (options.verbose)
- e.printStackTrace();
- }
- }
- }
-
- protected FileFilter createFileFilter(Options processOptions) {
- return processOptions.unpack ? Utils.PACK_GZ_FILTER : Utils.JAR_FILTER;
- }
-
- protected String getRelativeName(File file) {
- if (options.input == null)
- return file.toString();
- try {
- File input = options.input.getCanonicalFile();
- File subFile = file.getCanonicalFile();
-
- if (input.isFile())
- return subFile.getName();
-
- if (!subFile.toString().startsWith(input.toString())) {
- // the file is not under the base folder.
- return file.toString();
- }
-
- File parent = subFile.getParentFile();
- String result = subFile.getName();
- while (!parent.equals(input)) {
- result = parent.getName() + '/' + result;
- parent = parent.getParentFile();
- }
- return result;
-
- } catch (IOException e) {
- return file.getName();
- }
- }
-
- private boolean shouldPack(String name) {
- if (!options.pack)
- return false;
- return packExclusions == null ? true : !packExclusions.contains(name);
- }
-
- private boolean shouldSign(String name) {
- if (options.signCommand == null)
- return false;
- return signExclusions == null ? true : !signExclusions.contains(name);
- }
-
- private boolean shouldRepack(String name) {
- if (shouldSign(name) && shouldPack(name))
- return true;
- if (!options.repack)
- return false;
- return packExclusions == null ? true : !packExclusions.contains(name);
- }
-
- protected void process(File input, FileFilter filter, boolean verbose, JarProcessor processor, Properties packProperties) throws FileNotFoundException {
- if (!input.exists())
- throw new FileNotFoundException();
-
- File[] files = null;
- if (input.isDirectory()) {
- files = input.listFiles();
- } else if (filter.accept(input)) {
- files = new File[] {input};
- } else
- return;
- for (int i = 0; i < files.length; i++) {
- if (files[i].isDirectory()) {
- processDirectory(files[i], filter, verbose, processor, packProperties);
- } else if (filter.accept(files[i])) {
- try {
- processor.clearProcessSteps();
- if (options.unpack) {
- addUnpackStep(processor, packProperties, options);
- processor.processJar(files[i]);
- } else {
- String name = getRelativeName(files[i]);
- boolean sign = shouldSign(name);
- boolean repack = shouldRepack(name);
-
- if (repack || sign) {
- processor.clearProcessSteps();
- if (repack)
- addPackUnpackStep(processor, packProperties, options);
- if (sign)
- addSignStep(processor, packProperties, options);
- files[i] = processor.processJar(files[i]);
- }
-
- if (shouldPack(name)) {
- processor.clearProcessSteps();
- addPackStep(processor, packProperties, options);
- processor.processJar(files[i]);
- }
- }
- } catch (IOException e) {
- if (verbose)
- e.printStackTrace();
- }
- }
- }
- }
-
- protected void processDirectory(File input, FileFilter filter, boolean verbose, JarProcessor processor, Properties packProperties) throws FileNotFoundException {
- if (!input.isDirectory())
- return;
- String dir = processor.getWorkingDirectory();
- processor.setWorkingDirectory(dir + "/" + input.getName()); //$NON-NLS-1$
- process(input, filter, verbose, processor, packProperties);
- processor.setWorkingDirectory(dir);
- }
-
- public void addPackUnpackStep(JarProcessor processor, Properties properties, JarProcessorExecutor.Options processOptions) {
- processor.addProcessStep(new PackUnpackStep(properties, processOptions.verbose));
- }
-
- public void addSignStep(JarProcessor processor, Properties properties, JarProcessorExecutor.Options processOptions) {
- processor.addProcessStep(new SignCommandStep(properties, processOptions.signCommand, processOptions.verbose));
- }
-
- public void addPackStep(JarProcessor processor, Properties properties, JarProcessorExecutor.Options processOptions) {
- processor.addProcessStep(new PackStep(properties, processOptions.verbose));
- }
-
- public void addUnpackStep(JarProcessor processor, Properties properties, JarProcessorExecutor.Options processOptions) {
- processor.addProcessStep(new UnpackStep(properties, processOptions.verbose));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntBasedProcessorExecutor.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntBasedProcessorExecutor.java
deleted file mode 100644
index 763926245..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntBasedProcessorExecutor.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor.ant;
-
-import java.io.*;
-import java.util.*;
-import org.apache.tools.ant.Project;
-import org.eclipse.equinox.internal.p2.jarprocessor.unsigner.UnsignCommand;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor;
-
-public class AntBasedProcessorExecutor extends JarProcessorExecutor {
- private final Project project;
- private final Properties signArguments;
- private final String antTaskName;
- private List inputFiles;
- private HashSet filterSet = null;
- private FileFilter baseFilter = null;
-
- public AntBasedProcessorExecutor(Properties signArguments, Project project, String antTaskName) {
- this.signArguments = signArguments;
- this.project = project;
- this.antTaskName = antTaskName;
- }
-
- protected FileFilter createFileFilter(Options options) {
- baseFilter = super.createFileFilter(options);
- if (inputFiles == null || inputFiles.size() == 0)
- return baseFilter;
-
- filterSet = new HashSet();
- filterSet.addAll(inputFiles);
- return new FileFilter() {
- public boolean accept(File pathname) {
- return getFilterSet().contains(pathname);
- }
- };
- }
-
- protected HashSet getFilterSet() {
- return filterSet;
- }
-
- protected void processDirectory(File input, FileFilter filter, boolean verbose, JarProcessor processor, Properties packProperties) throws FileNotFoundException {
- if (filterSet != null && filterSet.contains(input)) {
- File[] files = input.listFiles();
- for (int i = 0; i < files.length; i++) {
- if (files[i].isDirectory() || baseFilter.accept(files[i]))
- filterSet.add(files[i]);
- }
- }
- super.processDirectory(input, filter, verbose, processor, packProperties);
- }
-
- public void addSignStep(JarProcessor processor, Properties properties, Options options) {
- if (signArguments.get(JarProcessorTask.UNSIGN) != null)
- processor.addProcessStep(new UnsignCommand(properties, options.signCommand, options.verbose));
- if (signArguments.get(JarProcessorTask.SIGN) != null)
- processor.addProcessStep(new AntSignCommand(properties, signArguments, project, antTaskName, options.signCommand, options.verbose));
- }
-
- public void setInputFiles(List inputFiles) {
- this.inputFiles = inputFiles;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntSignCommand.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntSignCommand.java
deleted file mode 100644
index 591cf8c72..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntSignCommand.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor.ant;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-import java.util.Properties;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.taskdefs.SignJar;
-import org.eclipse.equinox.internal.p2.jarprocessor.SignCommandStep;
-
-public class AntSignCommand extends SignCommandStep {
- private final Project project;
- private final Properties jarSignerArguments;
- private final String antTaskName;
-
- public AntSignCommand(Properties options, Properties signArguments, Project project, String antTaskName, String command, boolean verbose) {
- super(options, command, verbose);
- this.project = project;
- this.jarSignerArguments = signArguments;
- this.antTaskName = antTaskName;
- }
-
- public File postProcess(File input, File workingDirectory, List containers) {
- if (command != null && input != null && shouldSign(input, containers)) {
- execute(input);
- }
- return null;
- }
-
- private void execute(File input) {
- try {
- SignJar jarSigner = new SignJar();
- jarSigner.setJar(input);
- jarSigner.setAlias(jarSignerArguments.getProperty(JarProcessorTask.ALIAS));
- jarSigner.setKeystore(jarSignerArguments.getProperty(JarProcessorTask.KEYSTORE));
- jarSigner.setStorepass(jarSignerArguments.getProperty(JarProcessorTask.STOREPASS));
- jarSigner.setKeypass(jarSignerArguments.getProperty(JarProcessorTask.KEYPASS));
- jarSigner.setProject(project);
- jarSigner.setTaskName(antTaskName);
- jarSigner.execute();
- } catch (BuildException e) {
- if (e.getCause() instanceof IOException) {
- throw new BuildException("The jarsigner could not be found. Make sure to run with the build with a JDK.", e); //$NON-NLS-1$
- }
- throw e;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/JarProcessorTask.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/JarProcessorTask.java
deleted file mode 100644
index c8cfbfad1..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/JarProcessorTask.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor.ant;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Properties;
-import org.apache.tools.ant.*;
-import org.apache.tools.ant.types.FileSet;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor.Options;
-
-/**
- * This task provides massaging facilities for jar files.
- * It supports: signing, unsigning, normalization, packing
- * -
- */
-public class JarProcessorTask extends Task {
- private final Options options = new Options();
- private final Properties signArgs = new Properties();
- private final ArrayList inputFiles = new ArrayList();
-
- public static final String ALIAS = "alias"; //$NON-NLS-1$
- public static final String KEYSTORE = "keystore"; //$NON-NLS-1$
- public static final String STOREPASS = "storepass"; //$NON-NLS-1$
- public static final String KEYPASS = "keypass"; //$NON-NLS-1$
- public static final String UNSIGN = "unsign"; //$NON-NLS-1$
- public static final String SIGN = "sign"; //$NON-NLS-1$
-
- private static final String FAKE_COMMAND = "fake"; //$NON-NLS-1$
-
- public void setAlias(String alias) {
- signArgs.setProperty(ALIAS, alias);
- }
-
- public void setKeystore(String keystore) {
- signArgs.setProperty(KEYSTORE, keystore);
- }
-
- public void setJar(File jar) {
- options.input = jar;
- options.outputDir = jar.getParentFile().getAbsolutePath();
- }
-
- public void setInputFolder(File folder) {
- options.input = folder;
- options.outputDir = folder.getAbsolutePath();
- }
-
- public void setStorepass(String storepass) {
- signArgs.setProperty(STOREPASS, storepass);
- }
-
- public void setKeypass(String keypass) {
- if (keypass != null && keypass.length() > 0 && !keypass.startsWith("${")) //$NON-NLS-1$
- signArgs.setProperty(KEYPASS, keypass);
- }
-
- public void setPack(boolean pack) {
- options.pack = pack;
- }
-
- public void setNormalize(boolean normalize) {
- options.repack = normalize;
- }
-
- public void setUnsign(boolean unsign) {
- if (unsign) {
- signArgs.put(UNSIGN, Boolean.TRUE.toString());
- options.signCommand = FAKE_COMMAND;
- }
- }
-
- public void setSign(boolean sign) {
- if (sign) {
- signArgs.put(SIGN, Boolean.TRUE.toString());
- options.signCommand = FAKE_COMMAND;
- }
- }
-
- private void adjustAndValidateConfiguration() {
- //Sign and pack implies a normalization
- if (options.signCommand != null && options.pack)
- options.repack = true;
-
- //Check that alias, and storepass are set
- if (options.signCommand != null && signArgs.getProperty(UNSIGN) == null) {
- if (signArgs.getProperty(ALIAS) == null)
- throw new BuildException("Alias must be set"); //$NON-NLS-1$
-
- if (signArgs.getProperty(STOREPASS) == null)
- throw new BuildException("Storepass must be set"); //$NON-NLS-1$
- }
- }
-
- public void execute() {
- options.processAll = true;
- adjustAndValidateConfiguration();
- AntBasedProcessorExecutor executor = new AntBasedProcessorExecutor(signArgs, getProject(), getTaskName());
- if (inputFiles.size() > 0)
- executor.setInputFiles(inputFiles);
- executor.runJarProcessor(options);
- }
-
- public void setVerbose(boolean verbose) {
- options.verbose = verbose;
- }
-
- public void addInputFile(File file) {
- inputFiles.add(file);
- }
-
- public void addConfiguredFile(FileSet fileset) {
- DirectoryScanner scanner = fileset.getDirectoryScanner(getProject());
- String [] included = scanner.getIncludedFiles();
- for (int i = 0; i < included.length; i++) {
- addInputFile(new File(scanner.getBasedir(), included[i]));
- }
- included = scanner.getIncludedDirectories();
- for (int i = 0; i < included.length; i++) {
- addInputFile(new File(scanner.getBasedir(), included[i]));
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/.classpath b/bundles/org.eclipse.equinox.p2.metadata.generator/.classpath
deleted file mode 100644
index ef379494d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" output="bin_ant" path="src_ant"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/.cvsignore b/bundles/org.eclipse.equinox.p2.metadata.generator/.cvsignore
deleted file mode 100644
index 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 435691891..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1255396900634_19&quot; label=&quot;working set&quot; name=&quot;working set&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.equinox.p2.metadata.generator&quot; type=&quot;4&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.metadata.generator"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/.project b/bundles/org.eclipse.equinox.p2.metadata.generator/.project
deleted file mode 100644
index f1612ddce..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/.project
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.metadata.generator</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value>&lt;project&gt;/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index ce58f5ebf..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,353 +0,0 @@
-#Fri Mar 12 16:58:17 EST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index f8738689b..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,60 +0,0 @@
-#Thu Jan 24 12:13:40 EST 2008
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/CDC-1.0_Foundation-1.0.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/CDC-1.0_Foundation-1.0.profile
deleted file mode 100644
index dde120a4d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/CDC-1.0_Foundation-1.0.profile
+++ /dev/null
@@ -1,24 +0,0 @@
-###############################################################################
-# Copyright (c) 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.microedition.io
-org.osgi.framework.bootdelegation = \
- javax.microedition.io
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- CDC-1.0/Foundation-1.0
-osgi.java.profile.name = CDC-1.0/Foundation-1.0
-org.eclipse.jdt.core.compiler.compliance=1.3
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/CDC-1.1_Foundation-1.1.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/CDC-1.1_Foundation-1.1.profile
deleted file mode 100644
index 67b20c7ef..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/CDC-1.1_Foundation-1.1.profile
+++ /dev/null
@@ -1,30 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.microedition.io,\
- javax.microedition.pki,\
- javax.security.auth.x500
-org.osgi.framework.bootdelegation = \
- javax.microedition.io,\
- javax.microedition.pki,\
- javax.security.auth.x500
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2,\
- CDC-1.0/Foundation-1.0,\
- CDC-1.1/Foundation-1.1
-osgi.java.profile.name = CDC-1.1/Foundation-1.1
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.2.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.2.profile
deleted file mode 100644
index ab98b6707..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.2.profile
+++ /dev/null
@@ -1,47 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- org.omg.CORBA,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextPackage
-org.osgi.framework.bootdelegation = \
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- JRE-1.1,\
- J2SE-1.2
-osgi.java.profile.name = J2SE-1.2
-org.eclipse.jdt.core.compiler.compliance=1.2
-org.eclipse.jdt.core.compiler.source=1.2
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.3.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.3.profile
deleted file mode 100644
index da3538e6e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.3.profile
+++ /dev/null
@@ -1,68 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.naming,\
- javax.naming.directory,\
- javax.naming.event,\
- javax.naming.ldap,\
- javax.naming.spi,\
- javax.rmi,\
- javax.rmi.CORBA,\
- javax.sound.midi,\
- javax.sound.midi.spi,\
- javax.sound.sampled,\
- javax.sound.sampled.spi,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- javax.transaction,\
- org.omg.CORBA,\
- org.omg.CORBA_2_3,\
- org.omg.CORBA_2_3.portable,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextPackage,\
- org.omg.SendingContext,\
- org.omg.stub.java.rmi
-org.osgi.framework.bootdelegation = \
- javax.*,\
- org.omg.*,\
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- JRE-1.1,\
- J2SE-1.2,\
- J2SE-1.3
-osgi.java.profile.name = J2SE-1.3
-org.eclipse.jdt.core.compiler.compliance=1.3
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.4.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.4.profile
deleted file mode 100644
index abaa0c3d6..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.4.profile
+++ /dev/null
@@ -1,129 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.crypto,\
- javax.crypto.interfaces,\
- javax.crypto.spec,\
- javax.imageio,\
- javax.imageio.event,\
- javax.imageio.metadata,\
- javax.imageio.plugins.jpeg,\
- javax.imageio.spi,\
- javax.imageio.stream,\
- javax.naming,\
- javax.naming.directory,\
- javax.naming.event,\
- javax.naming.ldap,\
- javax.naming.spi,\
- javax.net,\
- javax.net.ssl,\
- javax.print,\
- javax.print.attribute,\
- javax.print.attribute.standard,\
- javax.print.event,\
- javax.rmi,\
- javax.rmi.CORBA,\
- javax.security.auth,\
- javax.security.auth.callback,\
- javax.security.auth.kerberos,\
- javax.security.auth.login,\
- javax.security.auth.spi,\
- javax.security.auth.x500,\
- javax.security.cert,\
- javax.sound.midi,\
- javax.sound.midi.spi,\
- javax.sound.sampled,\
- javax.sound.sampled.spi,\
- javax.sql,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- javax.transaction,\
- javax.transaction.xa,\
- javax.xml.parsers,\
- javax.xml.transform,\
- javax.xml.transform.dom,\
- javax.xml.transform.sax,\
- javax.xml.transform.stream,\
- org.ietf.jgss,\
- org.omg.CORBA,\
- org.omg.CORBA_2_3,\
- org.omg.CORBA_2_3.portable,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextExtPackage,\
- org.omg.CosNaming.NamingContextPackage,\
- org.omg.Dynamic,\
- org.omg.DynamicAny,\
- org.omg.DynamicAny.DynAnyFactoryPackage,\
- org.omg.DynamicAny.DynAnyPackage,\
- org.omg.IOP,\
- org.omg.IOP.CodecFactoryPackage,\
- org.omg.IOP.CodecPackage,\
- org.omg.Messaging,\
- org.omg.PortableInterceptor,\
- org.omg.PortableInterceptor.ORBInitInfoPackage,\
- org.omg.PortableServer,\
- org.omg.PortableServer.CurrentPackage,\
- org.omg.PortableServer.POAManagerPackage,\
- org.omg.PortableServer.POAPackage,\
- org.omg.PortableServer.portable,\
- org.omg.PortableServer.ServantLocatorPackage,\
- org.omg.SendingContext,\
- org.omg.stub.java.rmi,\
- org.w3c.dom,\
- org.w3c.dom.css,\
- org.w3c.dom.events,\
- org.w3c.dom.html,\
- org.w3c.dom.stylesheets,\
- org.w3c.dom.views ,\
- org.xml.sax,\
- org.xml.sax.ext,\
- org.xml.sax.helpers
-org.osgi.framework.bootdelegation = \
- javax.*,\
- org.ietf.jgss,\
- org.omg.*,\
- org.w3c.*,\
- org.xml.*,\
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2,\
- JRE-1.1,\
- J2SE-1.2,\
- J2SE-1.3,\
- J2SE-1.4
-osgi.java.profile.name = J2SE-1.4
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.5.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.5.profile
deleted file mode 100644
index e56a9293d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.5.profile
+++ /dev/null
@@ -1,157 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.activity,\
- javax.crypto,\
- javax.crypto.interfaces,\
- javax.crypto.spec,\
- javax.imageio,\
- javax.imageio.event,\
- javax.imageio.metadata,\
- javax.imageio.plugins.bmp,\
- javax.imageio.plugins.jpeg,\
- javax.imageio.spi,\
- javax.imageio.stream,\
- javax.management,\
- javax.management.loading,\
- javax.management.modelmbean,\
- javax.management.monitor,\
- javax.management.openmbean,\
- javax.management.relation,\
- javax.management.remote,\
- javax.management.remote.rmi,\
- javax.management.timer,\
- javax.naming,\
- javax.naming.directory,\
- javax.naming.event,\
- javax.naming.ldap,\
- javax.naming.spi,\
- javax.net,\
- javax.net.ssl,\
- javax.print,\
- javax.print.attribute,\
- javax.print.attribute.standard,\
- javax.print.event,\
- javax.rmi,\
- javax.rmi.CORBA,\
- javax.rmi.ssl,\
- javax.security.auth,\
- javax.security.auth.callback,\
- javax.security.auth.kerberos,\
- javax.security.auth.login,\
- javax.security.auth.spi,\
- javax.security.auth.x500,\
- javax.security.cert,\
- javax.security.sasl,\
- javax.sound.midi,\
- javax.sound.midi.spi,\
- javax.sound.sampled,\
- javax.sound.sampled.spi,\
- javax.sql,\
- javax.sql.rowset,\
- javax.sql.rowset.serial,\
- javax.sql.rowset.spi,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.plaf.synth,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- javax.transaction,\
- javax.transaction.xa,\
- javax.xml,\
- javax.xml.datatype,\
- javax.xml.namespace,\
- javax.xml.parsers,\
- javax.xml.transform,\
- javax.xml.transform.dom,\
- javax.xml.transform.sax,\
- javax.xml.transform.stream,\
- javax.xml.validation,\
- javax.xml.xpath,\
- org.ietf.jgss,\
- org.omg.CORBA,\
- org.omg.CORBA_2_3,\
- org.omg.CORBA_2_3.portable,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextExtPackage,\
- org.omg.CosNaming.NamingContextPackage,\
- org.omg.Dynamic,\
- org.omg.DynamicAny,\
- org.omg.DynamicAny.DynAnyFactoryPackage,\
- org.omg.DynamicAny.DynAnyPackage,\
- org.omg.IOP,\
- org.omg.IOP.CodecFactoryPackage,\
- org.omg.IOP.CodecPackage,\
- org.omg.Messaging,\
- org.omg.PortableInterceptor,\
- org.omg.PortableInterceptor.ORBInitInfoPackage,\
- org.omg.PortableServer,\
- org.omg.PortableServer.CurrentPackage,\
- org.omg.PortableServer.POAManagerPackage,\
- org.omg.PortableServer.POAPackage,\
- org.omg.PortableServer.portable,\
- org.omg.PortableServer.ServantLocatorPackage,\
- org.omg.SendingContext,\
- org.omg.stub.java.rmi,\
- org.w3c.dom,\
- org.w3c.dom.bootstrap,\
- org.w3c.dom.css,\
- org.w3c.dom.events,\
- org.w3c.dom.html,\
- org.w3c.dom.ls,\
- org.w3c.dom.ranges,\
- org.w3c.dom.stylesheets,\
- org.w3c.dom.traversal,\
- org.w3c.dom.views ,\
- org.xml.sax,\
- org.xml.sax.ext,\
- org.xml.sax.helpers
-org.osgi.framework.bootdelegation = \
- javax.*,\
- org.ietf.jgss,\
- org.omg.*,\
- org.w3c.*,\
- org.xml.*,\
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2,\
- JRE-1.1,\
- J2SE-1.2,\
- J2SE-1.3,\
- J2SE-1.4,\
- J2SE-1.5
-osgi.java.profile.name = J2SE-1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/JRE-1.1.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/JRE-1.1.profile
deleted file mode 100644
index 7bb8b46de..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/JRE-1.1.profile
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages =
-org.osgi.framework.bootdelegation = \
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- JRE-1.1
-osgi.java.profile.name = JRE-1.1
-org.eclipse.jdt.core.compiler.compliance=1.1
-org.eclipse.jdt.core.compiler.source=1.1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/JavaSE-1.6.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/JavaSE-1.6.profile
deleted file mode 100644
index 68e811f69..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/JavaSE-1.6.profile
+++ /dev/null
@@ -1,194 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.activation,\
- javax.activity,\
- javax.annotation,\
- javax.annotation.processing,\
- javax.crypto,\
- javax.crypto.interfaces,\
- javax.crypto.spec,\
- javax.imageio,\
- javax.imageio.event,\
- javax.imageio.metadata,\
- javax.imageio.plugins.bmp,\
- javax.imageio.plugins.jpeg,\
- javax.imageio.spi,\
- javax.imageio.stream,\
- javax.jws,\
- javax.jws.soap,\
- javax.lang.model,\
- javax.lang.model.element,\
- javax.lang.model.type,\
- javax.lang.model.util,\
- javax.management,\
- javax.management.loading,\
- javax.management.modelmbean,\
- javax.management.monitor,\
- javax.management.openmbean,\
- javax.management.relation,\
- javax.management.remote,\
- javax.management.remote.rmi,\
- javax.management.timer,\
- javax.naming,\
- javax.naming.directory,\
- javax.naming.event,\
- javax.naming.ldap,\
- javax.naming.spi,\
- javax.net,\
- javax.net.ssl,\
- javax.print,\
- javax.print.attribute,\
- javax.print.attribute.standard,\
- javax.print.event,\
- javax.rmi,\
- javax.rmi.CORBA,\
- javax.rmi.ssl,\
- javax.script,\
- javax.security.auth,\
- javax.security.auth.callback,\
- javax.security.auth.kerberos,\
- javax.security.auth.login,\
- javax.security.auth.spi,\
- javax.security.auth.x500,\
- javax.security.cert,\
- javax.security.sasl,\
- javax.sound.midi,\
- javax.sound.midi.spi,\
- javax.sound.sampled,\
- javax.sound.sampled.spi,\
- javax.sql,\
- javax.sql.rowset,\
- javax.sql.rowset.serial,\
- javax.sql.rowset.spi,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.plaf.synth,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- javax.tools,\
- javax.transaction,\
- javax.transaction.xa,\
- javax.xml,\
- javax.xml.bind,\
- javax.xml.bind.annotation,\
- javax.xml.bind.annotation.adapters,\
- javax.xml.bind.attachment,\
- javax.xml.bind.helpers,\
- javax.xml.bind.util,\
- javax.xml.crypto,\
- javax.xml.crypto.dom,\
- javax.xml.crypto.dsig,\
- javax.xml.crypto.dsig.dom,\
- javax.xml.crypto.dsig.keyinfo,\
- javax.xml.crypto.dsig.spec,\
- javax.xml.datatype,\
- javax.xml.namespace,\
- javax.xml.parsers,\
- javax.xml.soap,\
- javax.xml.stream,\
- javax.xml.stream.events,\
- javax.xml.stream.util,\
- javax.xml.transform,\
- javax.xml.transform.dom,\
- javax.xml.transform.sax,\
- javax.xml.transform.stax,\
- javax.xml.transform.stream,\
- javax.xml.validation,\
- javax.xml.ws,\
- javax.xml.ws.handler,\
- javax.xml.ws.handler.soap,\
- javax.xml.ws.http,\
- javax.xml.ws.soap,\
- javax.xml.ws.spi,\
- javax.xml.ws.wsaddressing,\
- javax.xml.xpath,\
- org.ietf.jgss,\
- org.omg.CORBA,\
- org.omg.CORBA_2_3,\
- org.omg.CORBA_2_3.portable,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextExtPackage,\
- org.omg.CosNaming.NamingContextPackage,\
- org.omg.Dynamic,\
- org.omg.DynamicAny,\
- org.omg.DynamicAny.DynAnyFactoryPackage,\
- org.omg.DynamicAny.DynAnyPackage,\
- org.omg.IOP,\
- org.omg.IOP.CodecFactoryPackage,\
- org.omg.IOP.CodecPackage,\
- org.omg.Messaging,\
- org.omg.PortableInterceptor,\
- org.omg.PortableInterceptor.ORBInitInfoPackage,\
- org.omg.PortableServer,\
- org.omg.PortableServer.CurrentPackage,\
- org.omg.PortableServer.POAManagerPackage,\
- org.omg.PortableServer.POAPackage,\
- org.omg.PortableServer.portable,\
- org.omg.PortableServer.ServantLocatorPackage,\
- org.omg.SendingContext,\
- org.omg.stub.java.rmi,\
- org.w3c.dom,\
- org.w3c.dom.bootstrap,\
- org.w3c.dom.css,\
- org.w3c.dom.events,\
- org.w3c.dom.html,\
- org.w3c.dom.ls,\
- org.w3c.dom.ranges,\
- org.w3c.dom.stylesheets,\
- org.w3c.dom.traversal,\
- org.w3c.dom.views,\
- org.w3c.dom.xpath,\
- org.xml.sax,\
- org.xml.sax.ext,\
- org.xml.sax.helpers
-org.osgi.framework.bootdelegation = \
- javax.*,\
- org.ietf.jgss,\
- org.omg.*,\
- org.w3c.*,\
- org.xml.*,\
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2,\
- JRE-1.1,\
- J2SE-1.2,\
- J2SE-1.3,\
- J2SE-1.4,\
- J2SE-1.5,\
- JavaSE-1.6
-osgi.java.profile.name = JavaSE-1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.source=1.6
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.metadata.generator/META-INF/MANIFEST.MF
deleted file mode 100644
index d6b8e49bc..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,44 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.metadata.generator;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.metadata.generator.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.metadata.generator;x-internal:=true,
- org.eclipse.equinox.internal.p2.metadata.generator.features;x-friends:="org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.p2.directorywatcher,org.eclipse.equinox.p2.extensionlocation",
- org.eclipse.equinox.internal.provisional.p2.metadata.generator;
- x-friends:="org.eclipse.equinox.p2.ui.sdk,
- org.eclipse.equinox.p2.touchpoint.eclipse,
- org.eclipse.equinox.p2.directorywatcher,
- org.eclipse.equinox.p2.extensionlocation,
- org.eclipse.equinox.p2.updatesite"
-Require-Bundle: org.eclipse.equinox.p2.core,
- org.eclipse.osgi,
- org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.equinox.p2.repository
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Bundle-ActivationPolicy: lazy
-Import-Package: javax.xml.parsers,
- org.eclipse.equinox.app;version="1.0.0",
- org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.internal.frameworkadmin.equinox,
- org.eclipse.equinox.internal.frameworkadmin.utils,
- org.eclipse.equinox.internal.p2.metadata,
- org.eclipse.equinox.internal.p2.metadata.query,
- org.eclipse.equinox.internal.p2.metadata.repository,
- org.eclipse.equinox.internal.p2.repository.helpers,
- org.eclipse.equinox.internal.provisional.frameworkadmin,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing,
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.simpleconfigurator.manipulator;version="[2.0.0,3.0.0)",
- org.w3c.dom,
- org.xml.sax,
- org.xml.sax.helpers
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator Plugins and Features.launch b/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator Plugins and Features.launch
deleted file mode 100644
index 5464e6492..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator Plugins and Features.launch
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Metadata Generator Plugins and Features"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console &#13;&#10;-consolelog&#13;&#10;-application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator&#13;&#10;-metadataRepository file:C:/equinox.p2/servers/&#13;&#10;-artifactRepository file:C:/equinox.p2/servers/&#13;&#10;-source d:/tmp/orbit/eclipse&#13;&#10;-publishArtifacts&#13;&#10;-append&#13;&#10;-noDefaultIUs"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.ant.core@default:default,org.eclipse.osgi.services@default:default,org.eclipse.equinox.app@default:default,org.eclipse.core.jobs@default:default,org.eclipse.equinox.common@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.core.variables@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.runtime@default:true"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.simpleconfigurator@default:true,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.ecf@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator SDK.launch b/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator SDK.launch
deleted file mode 100644
index 2fd1986a7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator SDK.launch
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Metadata Generator SDK"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/j2sdk1.4.2_08"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console &#13;&#10;-consolelog&#13;&#10;-application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator&#13;&#10;-metadataRepository file:C:/equinox.p2/servers/&#13;&#10;-artifactRepository file:C:/equinox.p2/servers/&#13;&#10;-source c:\eclipse\latest\eclipse&#13;&#10;-root sdk&#13;&#10;-rootVersion 3.4.0.I20080212withcopyrightlicensechanges&#13;&#10;-flavor tooling&#13;&#10;-publishArtifacts&#13;&#10;-append"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="com.ibm.icu@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net@default:default,org.eclipse.core.runtime@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.variables@default:default,org.eclipse.equinox.app@default:true,org.eclipse.equinox.common@default:default,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.launcher.win32.win32.x86@default:false,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.osgi@:,org.eclipse.osgi.services@default:default,org.eclipse.update.configurator@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.eclipse.ecf@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:true,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.download@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.metadata.repository@default:default"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator Update Site.launch b/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator Update Site.launch
deleted file mode 100644
index bb6ef0e78..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator Update Site.launch
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Metadata Generator Update Site"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console &#13;&#10;-consolelog&#13;&#10;-application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator&#13;&#10;-updateSite d:/ganymedeM5/&#13;&#10;-site file:d:/ganymedeM5/site.xml&#13;&#10;-metadataRepository file:d:/ganymedeM5/&#13;&#10;-metadataRepositoryName &quot;Ganymede Update Site&quot;&#13;&#10;-artifactRepository file:d:/ganymedeM5/&#13;&#10;-artifactRepositoryName &quot;Ganymede Artifacts&quot;&#13;&#10;-append&#13;&#10;-compress&#13;&#10;-reusePack200Files"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.core.runtime.compatibility.registry*3.2.200.v20070717@default:false,org.eclipse.equinox.common*3.4.0.v20080407@default:default,com.ibm.icu*3.8.1.v20080304@default:default,org.eclipse.osgi.services*3.1.200.v20071203@default:default,org.eclipse.equinox.launcher*1.0.100.v20080407@default:default,org.eclipse.equinox.preferences*3.2.200.v20080201@default:default,org.eclipse.update.configurator*3.2.200.v20080404@default:default,org.eclipse.equinox.launcher.win32.win32.x86*1.0.100.v20080407@default:false,org.eclipse.equinox.app*1.0.100.v20080331@default:true,org.eclipse.osgi*3.4.0.v20080407@:,org.eclipse.core.runtime.compatibility.auth*3.2.100.v20070502@default:default,org.eclipse.equinox.security.win32.x86*1.0.0.v20080324@default:false,org.eclipse.core.jobs*3.4.0.v20080310@default:default,org.eclipse.equinox.registry*3.4.0.v20080316@default:default,org.eclipse.equinox.security*1.0.0.v20080407@default:default,org.eclipse.core.variables*3.2.100.v20080324-1600@default:default,org.eclipse.core.runtime*3.4.0.v20080324-1725@default:default,org.eclipse.core.contenttype*3.3.0.v20080407@default:default,org.eclipse.ant.core*3.2.0.v20080319@default:default,org.eclipse.core.net*1.0.100.I20080322@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.p2.metadata.generator*0.1.0.qualifier@default:default,org.eclipse.equinox.p2.metadata*0.1.0.qualifier@default:default,org.eclipse.ecf.provider.filetransfer*2.0.0.qualifier@default:default,org.eclipse.ecf*2.0.0.qualifier@default:default,org.eclipse.equinox.p2.artifact.repository*0.1.0.qualifier@default:default,org.eclipse.ecf.filetransfer*2.0.0.qualifier@default:default,org.eclipse.equinox.frameworkadmin*0.1.0.qualifier@default:default,org.eclipse.equinox.p2.core*0.1.0.qualifier@default:default,org.eclipse.equinox.p2.engine*0.1.0.qualifier@default:default,org.eclipse.ecf.identity*2.0.0.qualifier@default:default,org.eclipse.equinox.frameworkadmin.equinox*0.1.0.qualifier@default:true,org.eclipse.equinox.p2.metadata.repository*0.1.0.qualifier@default:default"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.0.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.0.profile
deleted file mode 100644
index 773501a52..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.0.profile
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages =
-org.osgi.framework.bootdelegation = \
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0
-osgi.java.profile.name = OSGi/Minimum-1.0
-org.eclipse.jdt.core.compiler.compliance=1.3
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.1.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.1.profile
deleted file mode 100644
index 5031392b7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.1.profile
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages =
-org.osgi.framework.bootdelegation = \
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1
-osgi.java.profile.name = OSGi/Minimum-1.1
-org.eclipse.jdt.core.compiler.compliance=1.3
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.2.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.2.profile
deleted file mode 100644
index 601b37379..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.2.profile
+++ /dev/null
@@ -1,24 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.security.auth.x500
-org.osgi.framework.bootdelegation = \
- javax.security.auth.x500
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2
-osgi.java.profile.name = OSGi/Minimum-1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/about.html b/bundles/org.eclipse.equinox.p2.metadata.generator/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/build.properties b/bundles/org.eclipse.equinox.p2.metadata.generator/build.properties
deleted file mode 100644
index ca56ce627..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/build.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-source.ant_tasks/generator-ant.jar=src_ant/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- OSGi_Minimum-1.1.profile,\
- OSGi_Minimum-1.0.profile,\
- JavaSE-1.6.profile,\
- JRE-1.1.profile,\
- J2SE-1.5.profile,\
- J2SE-1.4.profile,\
- J2SE-1.3.profile,\
- J2SE-1.2.profile,\
- CDC-1.1_Foundation-1.1.profile,\
- CDC-1.0_Foundation-1.0.profile,\
- plugin.xml,\
- ant_tasks/generator-ant.jar,\
- plugin.properties
-src.includes = about.html
-jars.compile.order=.,ant_tasks/generator-ant.jar
-extra.ant_tasks/generator-ant.jar = platform:/plugin/org.apache.ant
-jars.extra.classpath = platform:/plugin/org.apache.ant/lib/ant.jar
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/config.ini b/bundles/org.eclipse.equinox.p2.metadata.generator/config.ini
deleted file mode 100644
index ec1329813..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/config.ini
+++ /dev/null
@@ -1,57 +0,0 @@
-# Eclipse runtime configuration file
-# This file contains a number of key/value pairs that are merged into the
-# System properties on system startup. The values control the way the
-# runtime is structured and runs.
-
-# Note: Only platform:/base/ and file: URLs are supported. In general the
-# URLs given may include a version number (e.g., .../location_1.2.3).
-# If a version is not specified, the system binds
-# to the location which matches exactly or to the versioned location with the
-# latest version number. If a version number is given then only exact matches
-# are considered.
-
-# The URL for the runtime entry point. The default value is
-# platform:/base/plugins/org.eclipse.osgi
-#osgi.framework=platform:/base/plugins/org.eclipse.osgi
-
-# The classpath for the framework found at the osgi.framework location. This
-# comma-separated list contains either URLs or simple element names. Simple
-# names are assumed to be relative to the framework's install directory.
-# Typically this value need not be set as it is initialized by the framework itself.
-# Version match searching is not done for URLs listed here.
-#osgi.frameworkClassPath =
-
-# The comma-separated list of locations to search for the splash screen file (splash.bmp).
-# For each list element a subdirectory structure based on the pattern nl/<locale> is searched.
-# The system binds to the first matching file. There is no default value.
-#osgi.splashPath=
-
-# The location of the splash screen file. If this value is set at system startup it is used
-# in favour of the osgi.splashPath searching outlined above. If the value is not set
-# the searching is done and this key is bound to the result of the search.
-#osgi.splashLocation =
-
-# The comma-separated list of bundles which are automatically installed and optionally started
-# once the system is up and running. Each entry if of the form
-# <URL | simple bundle location>[@ [<startlevel>] [":start"]]
-# If the startlevel is omitted then the framework will use the default start level for the bundle.
-# If the "start" tag is added then the bundle will be marked as started after being installed.
-# Simple bundle locations are interepreted as relative to the framework's parent directory.
-# The startlevel indicates the OSGi start level at which the bundle should run.
-osgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@3:start, org.eclipse.core.runtime@start,org.eclipse.equinox.frameworkadmin.equinox@start
-
-# The product to run. A given Eclipse configuration may contain many products.
-# The product identified will supply the branding (window icons, title bar text) etc
-# as well as define the default application to run.
-#eclipse.product=
-
-# The application to run. The value specified here is the id of the application extension
-# the runtime will find, instantiate and execute once the system is up. Note that typically
-# the identified eclipse.product defines the default application to run.
-#eclipse.application=
-
-# The build identifier
-eclipse.buildId=@build@
-
-# End of file marker - must be here
-eof=eof \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/generator.product b/bundles/org.eclipse.equinox.p2.metadata.generator/generator.product
deleted file mode 100644
index 1e313cd49..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/generator.product
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.1"?>
-
-<product name="Equinox Provisioning Metadata Generator" id="org.eclipse.equinox.p2.metadata.generator.product" application="org.eclipse.equinox.p2.metadata.generator.EclipseGenerator" useFeatures="true">
-
- <configIni use="custom" path="/org.eclipse.equinox.p2.metadata.generator/config.ini"/>
-
- <launcherArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <launcher name="eclipse">
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- </plugins>
-
- <features>
- <feature id="org.eclipse.equinox.p2.generator.feature" version="0.0.0"/>
- <feature id="org.eclipse.rcp" version="0.0.0"/>
- </features>
-
-</product>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/p2-izer update site.launch b/bundles/org.eclipse.equinox.p2.metadata.generator/p2-izer update site.launch
deleted file mode 100644
index 7ad55f2eb..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/p2-izer update site.launch
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/p2-izer update site"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console &#13;&#10;-consolelog&#13;&#10;-application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator&#13;&#10;-metadataRepository file:d:/ganymedeM5/&#13;&#10;-artifactRepository file:d:/ganymedeM5/&#13;&#10;-updateSite d:/ganymedeM5/&#13;&#10;-site file:d:/ganymedeM5/site.xml&#13;&#10;-flavor tooling&#13;&#10;-append&#13;&#10;-reusePack200Files&#13;&#10;-compress"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.equinox.app*1.0.100.v20080303@default:true,org.eclipse.equinox.preferences*3.2.200.v20080201@default:default,org.eclipse.update.configurator*3.2.200.v20080107@default:default,org.eclipse.core.runtime.compatibility.registry*3.2.200.v20070717@default:false,org.eclipse.core.runtime*3.4.0.v20080303@default:default,org.eclipse.core.jobs*3.3.100.v20080224@default:default,org.eclipse.equinox.launcher.win32.win32.x86*1.0.100.v20080201a@default:false,com.ibm.icu*3.8.1.v20080103@default:default,org.eclipse.equinox.launcher*1.0.100.v20080303@default:default,org.eclipse.equinox.common*3.4.0.v20080201@default:default,org.eclipse.osgi.services*3.1.200.v20071203@default:default,org.eclipse.osgi*3.4.0.v20080304@:,org.eclipse.equinox.launcher.win32.win32.x86*1.0.100.v20080201a@default:false,org.eclipse.equinox.registry*3.4.0.v20080201@default:default,org.eclipse.equinox.launcher*1.0.100.v20080303@default:default,org.eclipse.core.contenttype*3.3.0.v20080201@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.p2.metadata.generator*0.1.0.qualifier@default:default,org.eclipse.equinox.frameworkadmin*0.1.0.qualifier@default:default,org.eclipse.equinox.p2.core*0.1.0.qualifier@default:default,org.eclipse.equinox.p2.metadata*0.1.0.qualifier@default:default,org.eclipse.ecf*1.4.0.qualifier@default:default,org.eclipse.equinox.p2.artifact.repository*0.1.0.qualifier@default:default,org.eclipse.equinox.frameworkadmin.equinox*0.1.0.qualifier@default:true,org.eclipse.equinox.p2.metadata.repository*0.1.0.qualifier@default:default,org.eclipse.equinox.p2.engine*0.1.0.qualifier@default:default,org.eclipse.ecf.filetransfer*2.0.0.qualifier@default:default,org.eclipse.ecf.identity*1.3.0.qualifier@default:default"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/plugin.properties b/bundles/org.eclipse.equinox.p2.metadata.generator/plugin.properties
deleted file mode 100644
index 0c0840432..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Equinox Provisioning Metadata Generator
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/plugin.xml b/bundles/org.eclipse.equinox.p2.metadata.generator/plugin.xml
deleted file mode 100644
index a0e52900a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/plugin.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension
- id="EclipseGenerator"
- point="org.eclipse.core.runtime.applications">
- <application
- cardinality="1"
- thread="main"
- visible="true">
- <run
- class="org.eclipse.equinox.internal.p2.metadata.generator.EclipseGeneratorApplication">
- </run>
- </application>
- </extension>
- <extension
- id="product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.eclipse.equinox.p2.metadata.generator.EclipseGenerator"
- name="Equinox Provisioning Metadata Generator">
- </product>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/pom.xml b/bundles/org.eclipse.equinox.p2.metadata.generator/pom.xml
deleted file mode 100644
index 53585eb04..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.metadata.generator</artifactId>
- <version>1.0.200.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml b/bundles/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml
deleted file mode 100644
index b5700604c..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="org.eclipse.equinox.p2.metadata.generator" default="default" basedir="..">
-
- <target name="init" depends="properties">
- <property name="plugin" value="org.eclipse.equinox.p2.metadata.generator"/>
- <property name="temp.folder" value="${basedir}/temp.folder"/>
- <property name="plugin.destination" value="${basedir}"/>
- <property name="build.result.folder" value="${basedir}/ant_tasks"/>
- <property name="version.suffix" value="_3.1.0"/>
- </target>
-
- <target name="properties" if="eclipse.running">
- <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
- </target>
-
- <target name="buildScripts" depends="init" description="Build from generated scripts">
- <tstamp/>
- <eclipse.buildScript elements="plugin@${plugin}"
- buildDirectory="${buildDirectory}"
- configInfo="*,*,*"
- baseLocation="${baseLocation}"
- buildingOSGi="true"
- outputUpdateJars="false"
- pluginpath="${basedir}"
- forceContextQualifier="z${DSTAMP}${TSTAMP}"
- />
- <delete file="${basedir}/ant_tasks/generator-ant.jar" failonerror="false"/>
- <ant antfile="${basedir}/build.xml" target="ant_tasks/generator-ant.jar"/>
- </target>
-
- <target name="default" description="Jar up the binaries that were compiled by the jdt builder" >
- <mkdir dir="${basedir}/ant_tasks" />
- <delete file="${basedir}/ant_tasks/generator-ant.jar" failonerror="false"/>
- <jar destfile="${basedir}/ant_tasks/generator-ant.jar" basedir="bin_ant"/>
- </target>
-</project> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java
deleted file mode 100644
index 3d2dd9f6f..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java
+++ /dev/null
@@ -1,422 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.EclipseInstallGeneratorInfoProvider;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.Generator;
-import org.eclipse.equinox.p2.core.*;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.ServiceReference;
-
-public class EclipseGeneratorApplication implements IApplication {
-
- // The mapping rules for in-place generation need to construct paths into the structure
- // of an eclipse installation; in the future the default artifact mapping declared in
- // SimpleArtifactRepository may change, for example, to not have a 'bundles' directory
- // instead of a 'plugins' directory, so a separate constant is defined and used here.
- static final private String[][] INPLACE_MAPPING_RULES = { {"(& (classifier=osgi.bundle) (format=packed)", "${repoUrl}/features/${id}_${version}.jar.pack.gz"}, //$NON-NLS-1$//$NON-NLS-2$
- {"(& (classifier=org.eclipse.update.feature))", "${repoUrl}/features/${id}_${version}.jar"}, //$NON-NLS-1$//$NON-NLS-2$
- {"(& (classifier=osgi.bundle))", "${repoUrl}/plugins/${id}_${version}.jar"}, //$NON-NLS-1$//$NON-NLS-2$
- {"(& (classifier=binary))", "${repoUrl}/binary/${id}_${version}"}}; //$NON-NLS-1$//$NON-NLS-2$
-
- static final public String PUBLISH_PACK_FILES_AS_SIBLINGS = "publishPackFilesAsSiblings"; //$NON-NLS-1$
-
- private Generator.GeneratorResult incrementalResult = null;
- private boolean generateRootIU = true;
- private URI metadataLocation;
- private String metadataRepoName;
- private URI artifactLocation;
- private String artifactRepoName;
- private String operation;
- private String argument;
- private String features;
- private String bundles;
- private String base;
- //whether repository xml files should be compressed
- private String compress = "false"; //$NON-NLS-1$
-
- private ServiceReference agentRef;
- private IProvisioningAgent agent;
-
- private File getExecutableName(String base, EclipseInstallGeneratorInfoProvider provider) {
- File location = provider.getExecutableLocation();
- if (location == null)
- return new File(base, EclipseInstallGeneratorInfoProvider.getDefaultExecutableName(null));
- if (location.isAbsolute())
- return location;
- return new File(base, location.getPath());
- }
-
- private void initialize(EclipseInstallGeneratorInfoProvider provider) throws ProvisionException {
- if ("-source".equalsIgnoreCase(operation)) //$NON-NLS-1$
- provider.initialize(new File(argument));
- else if ("-inplace".equalsIgnoreCase(operation)) { //$NON-NLS-1$
- provider.initialize(new File(argument));
- initializeForInplace(provider);
- } else if ("-config".equalsIgnoreCase(operation)) { //$NON-NLS-1$
- provider.initialize(new File(argument), new File(argument, "configuration"), getExecutableName(argument, provider), null, null); //$NON-NLS-1$
- } else if ("-updateSite".equalsIgnoreCase(operation)) { //$NON-NLS-1$
- provider.setAddDefaultIUs(false);
- provider.initialize(new File(argument), null, null, new File[] {new File(argument, "plugins")}, new File(argument, "features")); //$NON-NLS-1$ //$NON-NLS-2$
- initializeForInplace(provider);
- } else {
- // base is set but we expect everything else to have been set using
- // explicit args. Note that if we are coming in via an Ant task, we have
- // to ensure all the values are passed in
- if (base != null) {
- File[] bundlesLocation = bundles == null ? null : new File[] {new File(bundles)};
- File featuresLocation = features == null ? null : new File(features);
- provider.initialize(new File(base), null, null, bundlesLocation, featuresLocation);
- }
- }
- initializeRepositories(provider);
- }
-
- private void initializeArtifactRepository(EclipseInstallGeneratorInfoProvider provider) throws ProvisionException {
- if (artifactLocation == null)
- return;
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- URI location = artifactLocation;
-
- String repositoryName = (artifactRepoName != null && artifactRepoName.length() > 0) ? artifactRepoName : artifactLocation + " - artifacts"; //$NON-NLS-1$
- Map properties = new HashMap(1);
- properties.put(IRepository.PROP_COMPRESSED, compress);
- if (provider.reuseExistingPack200Files())
- properties.put(PUBLISH_PACK_FILES_AS_SIBLINGS, Boolean.TRUE.toString());
- IArtifactRepository result = null;
- try {
- result = manager.createRepository(location, repositoryName, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
- manager.removeRepository(location);
- provider.setArtifactRepository(result);
- return;
- } catch (ProvisionException e) {
- //fall through a load existing repo
- }
-
- IArtifactRepository repository = manager.loadRepository(location, null);
- if (repository != null) {
- manager.removeRepository(location);
- if (!repository.isModifiable())
- throw new IllegalArgumentException(NLS.bind(Messages.exception_artifactRepoNotWritable, location));
- provider.setArtifactRepository(repository);
- if (provider.reuseExistingPack200Files())
- repository.setProperty(PUBLISH_PACK_FILES_AS_SIBLINGS, "true"); //$NON-NLS-1$
- if (!provider.append()) {
- File repoLocation = URIUtil.toFile(location);
- if (repoLocation.isFile())
- repoLocation = repoLocation.getParentFile();
- if (repoLocation.equals(provider.getBaseLocation()))
- throw new IllegalArgumentException(NLS.bind(Messages.exception_artifactRepoNoAppendDestroysInput, location));
-
- repository.removeAll();
- }
- }
- return;
- }
-
- public void initializeForInplace(EclipseInstallGeneratorInfoProvider provider) {
- File location = provider.getBaseLocation();
- if (location == null)
- location = provider.getBundleLocations()[0];
- metadataLocation = location.toURI();
- artifactLocation = location.toURI();
- provider.setPublishArtifactRepository(true);
- provider.setPublishArtifacts(false);
- provider.setAppend(true);
- provider.setMappingRules(INPLACE_MAPPING_RULES);
- }
-
- private void initializeMetadataRepository(EclipseInstallGeneratorInfoProvider provider) throws ProvisionException {
- if (metadataLocation == null)
- return;
- URI location = metadataLocation;
-
- // First try to create a simple repo, this will fail if one already exists
- // We try creating a repo first instead of just loading what is there because we don't want a repo based
- // on a site.xml if there is one there.
-
- String repositoryName = (metadataRepoName == null || metadataRepoName.length() == 0) ? metadataLocation + " - metadata" : metadataRepoName; //$NON-NLS-1$
- Map properties = new HashMap(1);
- properties.put(IRepository.PROP_COMPRESSED, compress);
-
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- try {
- IMetadataRepository result = manager.createRepository(location, repositoryName, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
- manager.removeRepository(location);
- provider.setMetadataRepository(result);
- return;
- } catch (ProvisionException e) {
- //fall through and load the existing repo
- }
-
- IMetadataRepository repository = manager.loadRepository(location, null);
- if (repository != null) {
- manager.removeRepository(location);
- // don't set the compress flag here because we don't want to change the format
- // of an already existing repository
- if (!repository.isModifiable())
- throw new IllegalArgumentException(NLS.bind(Messages.exception_metadataRepoNotWritable, location));
- provider.setMetadataRepository(repository);
- if (!provider.append())
- repository.removeAll();
- return;
- }
- }
-
- private void initializeRepositories(EclipseInstallGeneratorInfoProvider provider) throws ProvisionException {
- initializeArtifactRepository(provider);
- initializeMetadataRepository(provider);
- }
-
- public void setCompress(String value) {
- if (Boolean.valueOf(value).booleanValue())
- compress = "true"; //$NON-NLS-1$
- }
-
- public void processCommandLineArguments(String[] args, EclipseInstallGeneratorInfoProvider provider) throws Exception {
- if (args == null)
- return;
- for (int i = 0; i < args.length; i++) {
- // check for args without parameters (i.e., a flag arg)
-
- if (args[i].equalsIgnoreCase("-publishArtifacts") || args[i].equalsIgnoreCase("-pa")) //$NON-NLS-1$ //$NON-NLS-2$
- provider.setPublishArtifacts(true);
-
- if (args[i].equalsIgnoreCase("-publishArtifactRepository") || args[i].equalsIgnoreCase("-par")) //$NON-NLS-1$ //$NON-NLS-2$
- provider.setPublishArtifactRepository(true);
-
- if (args[i].equalsIgnoreCase("-append")) //$NON-NLS-1$
- provider.setAppend(true);
-
- if (args[i].equalsIgnoreCase("-noDefaultIUs")) //$NON-NLS-1$
- provider.setAddDefaultIUs(false);
-
- if (args[i].equalsIgnoreCase("-compress")) //$NON-NLS-1$
- compress = "true"; //$NON-NLS-1$
-
- if (args[i].equalsIgnoreCase("-reusePack200Files")) //$NON-NLS-1$
- provider.reuseExistingPack200Files(true);
-
- // check for args with parameters. If we are at the last argument or if the next one
- // has a '-' as the first character, then we can't have an arg with a parm so continue.
- if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
- continue;
- String arg = args[++i];
-
- if (args[i - 1].equalsIgnoreCase("-source")) { //$NON-NLS-1$
- operation = args[i - 1];
- argument = arg;
- }
-
- if (args[i - 1].equalsIgnoreCase("-inplace")) { //$NON-NLS-1$
- operation = args[i - 1];
- argument = arg;
- }
-
- if (args[i - 1].equalsIgnoreCase("-config")) { //$NON-NLS-1$
- operation = args[i - 1];
- argument = arg;
- }
- if (args[i - 1].equalsIgnoreCase("-updateSite")) { //$NON-NLS-1$
- operation = args[i - 1];
- argument = arg;
- }
-
- if (args[i - 1].equalsIgnoreCase("-exe")) //$NON-NLS-1$
- provider.setExecutableLocation(arg);
-
- if (args[i - 1].equalsIgnoreCase("-launcherConfig")) //$NON-NLS-1$
- provider.setLauncherConfig(arg);
-
- if (args[i - 1].equalsIgnoreCase("-metadataRepositoryName")) //$NON-NLS-1$
- metadataRepoName = arg;
-
- try {
- if (args[i - 1].equalsIgnoreCase("-metadataRepository") || args[i - 1].equalsIgnoreCase("-mr")) //$NON-NLS-1$ //$NON-NLS-2$
- metadataLocation = URIUtil.fromString(arg);
-
- if (args[i - 1].equalsIgnoreCase("-artifactRepository") | args[i - 1].equalsIgnoreCase("-ar")) //$NON-NLS-1$ //$NON-NLS-2$
- artifactLocation = URIUtil.fromString(arg);
-
- if (args[i - 1].equalsIgnoreCase("-site")) //$NON-NLS-1$
- provider.setSiteLocation(URIUtil.fromString(arg));
- } catch (URISyntaxException e) {
- throw new IllegalArgumentException("Repository location (" + arg + ") must be a URL."); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if (args[i - 1].equalsIgnoreCase("-artifactRepositoryName")) //$NON-NLS-1$
- artifactRepoName = arg;
-
- if (args[i - 1].equalsIgnoreCase("-flavor")) //$NON-NLS-1$
- provider.setFlavor(arg);
-
- if (args[i - 1].equalsIgnoreCase("-productFile")) //$NON-NLS-1$
- provider.setProductFile(arg);
-
- if (args[i - 1].equalsIgnoreCase("-features")) //$NON-NLS-1$
- features = arg;
-
- if (args[i - 1].equalsIgnoreCase("-bundles")) //$NON-NLS-1$
- bundles = arg;
-
- if (args[i - 1].equalsIgnoreCase("-base")) //$NON-NLS-1$
- base = arg;
-
- if (args[i - 1].equalsIgnoreCase("-root")) //$NON-NLS-1$
- provider.setRootId(arg);
-
- if (args[i - 1].equalsIgnoreCase("-rootVersion")) //$NON-NLS-1$
- provider.setRootVersion(arg);
-
- if (args[i - 1].equalsIgnoreCase("-p2.os")) //$NON-NLS-1$
- provider.setOS(arg);
-
- }
- }
-
- public Object run(String args[]) throws Exception {
- EclipseInstallGeneratorInfoProvider provider = new EclipseInstallGeneratorInfoProvider();
- processCommandLineArguments(args, provider);
- Object result = run(provider);
- if (result != IApplication.EXIT_OK)
- for (int i = 0; i < args.length; i++)
- System.out.println(args[i]);
- return result;
- }
-
- public Object run(EclipseInstallGeneratorInfoProvider provider) throws Exception {
- initializeAgent();
- initialize(provider);
-
- if (provider.getBaseLocation() == null && provider.getProductFile() == null && !generateRootIU) {
- System.out.println(Messages.exception_baseLocationNotSpecified);
- return new Integer(-1);
- }
-
- // if we asked for artifacts to be published in some form, there must be a repo given
- if ((provider.publishArtifactRepository() || provider.publishArtifacts()) && provider.getArtifactRepository() == null) {
- System.out.println(Messages.exception_artifactRepoNotSpecified);
- return new Integer(-1);
- }
-
- if (provider.getMetadataRepository() == null) {
- System.out.println(Messages.exception_metadataRepoNotSpecified);
- return new Integer(-1);
- }
-
- System.out.println(NLS.bind(Messages.message_generatingMetadata, provider.getBaseLocation()));
-
- long before = System.currentTimeMillis();
- IStatus result = generate(provider);
-
- long after = System.currentTimeMillis();
- if (result.isOK()) {
- System.out.println(NLS.bind(Messages.message_generationCompleted, String.valueOf((after - before) / 1000)));
- return IApplication.EXIT_OK;
- }
- System.out.println(result);
- return new Integer(1);
- }
-
- private void initializeAgent() throws ProvisionException {
- agentRef = Activator.getContext().getServiceReference(IProvisioningAgent.SERVICE_NAME);
- if (agentRef != null) {
- agent = (IProvisioningAgent) Activator.getContext().getService(agentRef);
- if (agent != null)
- return;
- }
- ServiceReference providerRef = Activator.getContext().getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);
- if (providerRef == null)
- throw new RuntimeException("No provisioning agent provider is available"); //$NON-NLS-1$
- IProvisioningAgentProvider provider = (IProvisioningAgentProvider) Activator.getContext().getService(providerRef);
- if (provider == null)
- throw new RuntimeException("No provisioning agent provider is available"); //$NON-NLS-1$
- //obtain agent for currently running system
- agent = provider.createAgent(null);
- Activator.getContext().ungetService(providerRef);
- }
-
- protected IStatus generate(EclipseInstallGeneratorInfoProvider provider) {
- Generator generator = new Generator(provider);
- if (incrementalResult != null)
- generator.setIncrementalResult(incrementalResult);
- generator.setGenerateRootIU(generateRootIU);
- IStatus result = generator.generate();
- incrementalResult = null;
- return result;
- }
-
- public Object start(IApplicationContext context) throws Exception {
- return run((String[]) context.getArguments().get("application.args")); //$NON-NLS-1$
- }
-
- public void stop() {
- if (agentRef != null) {
- Activator.getContext().ungetService(agentRef);
- agentRef = null;
- }
- }
-
- public void setBase(String base) {
- this.base = base;
- }
-
- public void setArtifactLocation(URI location) {
- this.artifactLocation = location;
- }
-
- public void setBundles(String bundles) {
- this.bundles = bundles;
- }
-
- public void setOperation(String operation, String argument) {
- this.operation = operation;
- this.argument = argument;
- }
-
- public void setFeatures(String features) {
- this.features = features;
- }
-
- public void setMetadataLocation(URI location) {
- this.metadataLocation = location;
- }
-
- public void setMetadataRepositoryName(String name) {
- this.metadataRepoName = name;
- }
-
- public void setArtifactRepositoryName(String name) {
- this.artifactRepoName = name;
- }
-
- public void setIncrementalResult(Generator.GeneratorResult ius) {
- this.incrementalResult = ius;
- }
-
- public void setGeneratorRootIU(boolean b) {
- this.generateRootIU = b;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/LocalizationHelper.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/LocalizationHelper.java
deleted file mode 100644
index deeae27c0..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/LocalizationHelper.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator;
-
-import java.io.*;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.*;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-
-/**
- * Helper functions supporting the processing of localized
- * property files.
- *
- */
-public final class LocalizationHelper {
-
- private static final String PROPERTIES_FILE_EXTENSION = ".properties"; //$NON-NLS-1$
- private static final Locale DEFAULT_LOCALE = new Locale("df", "LT"); //$NON-NLS-1$//$NON-NLS-2$
- private static LocalizationHelper instance = new LocalizationHelper();
-
- // Extract the locale string from the properties file with the given filename
- // where the locale string follows the given prefix. For example, return "zh_HK"
- // from filename == "plugin_zh_HK.properties" and prefix == "plugin".
- static public String getLocaleString(String filename, String prefix) {
- String localeString = null;
- if (filename.startsWith(prefix) && filename.endsWith(PROPERTIES_FILE_EXTENSION)) {
- if (filename.length() > prefix.length() + PROPERTIES_FILE_EXTENSION.length()) {
- localeString = filename.substring(prefix.length() + 1, filename.length() - PROPERTIES_FILE_EXTENSION.length());
- } else {
- localeString = ""; //$NON-NLS-1$
- }
- }
- return localeString;
- }
-
- // Get the locale corresponding to the given locale string
- static public Locale getLocale(String localeString) {
- Locale locale = DEFAULT_LOCALE;
- if (localeString.length() == 5 && localeString.indexOf('_') == 2) {
- locale = new Locale(localeString.substring(0, 2), localeString.substring(3, 5));
- } else if (localeString.length() == 2) {
- locale = new Locale(localeString.substring(0, 2));
- }
- return locale;
- }
-
- // For the given root directory and path to localization files within that directory
- // get a map from locale to property set for the localization property files.
- public static Map getDirPropertyLocalizations(File root, String localizationPath, Locale defaultLocale, String[] propertyKeys) {
- File fullPath = new File(root, localizationPath);
- File localizationDir = fullPath.getParentFile();
- final String localizationFile = fullPath.getName();
- String[] localizationFiles = LocalizationHelper.getLocalizationFiles(localizationDir, localizationFile);
-
- HashMap localizations = null;
-
- if (localizationFiles != null) {
- localizations = new HashMap(localizationFiles.length);
- for (int i = 0; i < localizationFiles.length; i++) {
- String nextFile = localizationFiles[i];
- Locale nextLocale = getLocale(LocalizationHelper.getLocaleString(nextFile, localizationFile));
-
- try {
- Properties properties = loadProperties(root, nextFile);
- Properties localizedStrings = getLocalizedProperties(propertyKeys, properties);
- if (localizedStrings.size() > 0) {
- localizations.put(nextLocale, localizedStrings);
- if (DEFAULT_LOCALE.equals(nextLocale) && defaultLocale != null) {
- localizations.put(nextLocale, localizedStrings);
- }
- }
- } catch (IOException ioe) {
- ioe.printStackTrace();
- }
- }
- }
-
- return localizations;
- }
-
- public static Map getJarPropertyLocalizations(File root, String localizationPath, Locale defaultLocale, String[] propertyKeys) {
- ZipFile jarFile = null;
- Map localizations = new HashMap(4);
- try {
- jarFile = new ZipFile(root, ZipFile.OPEN_READ);
- for (Enumeration entries = jarFile.entries(); entries.hasMoreElements();) {
- ZipEntry nextEntry = (ZipEntry) entries.nextElement();
- String nextName = nextEntry.getName();
- String localeString = LocalizationHelper.getLocaleString(nextName, localizationPath);
-
- if (!nextEntry.isDirectory() && localeString != null) {
- Locale nextLocale = LocalizationHelper.getLocale(localeString);
- InputStream stream = null;
- try {
- stream = jarFile.getInputStream(nextEntry);
- Properties properties = new Properties();
- properties.load(stream);
- Properties localizedStrings = LocalizationHelper.getLocalizedProperties(propertyKeys, properties);
- if (localizedStrings.size() > 0) {
- localizations.put(nextLocale, localizedStrings);
- if (DEFAULT_LOCALE.equals(nextLocale) && defaultLocale != null) {
- localizations.put(nextLocale, localizedStrings);
- }
- }
- } finally {
- if (stream != null)
- stream.close();
- }
- }
- }
- } catch (IOException ioe) {
- ioe.printStackTrace();
- } finally {
- if (jarFile != null) {
- try {
- jarFile.close();
- } catch (IOException ioe) {
- // do nothing
- }
- }
- }
-
- return localizations;
- }
-
- // Load a property set from given root and file with the given name
- private static Properties loadProperties(File root, String propertyFilename) throws IOException {
- Properties result = new Properties();
- InputStream propertyStream = null;
- try {
- try {
- if (root.isDirectory())
- propertyStream = new FileInputStream(new File(root, propertyFilename));
- else {
- URLConnection connection = new URL("jar:" + root.toURL().toExternalForm() + "!/" + propertyFilename).openConnection(); //$NON-NLS-1$ //$NON-NLS-2$
- connection.setUseCaches(false);
- propertyStream = connection.getInputStream();
- }
- } catch (FileNotFoundException e) {
- // if there is no messages file then just return;
- return result;
- }
- result.load(propertyStream);
- } finally {
- if (propertyStream != null)
- propertyStream.close();
- }
- return result;
- }
-
- // Given a list of keys and the corresponding localized property set,
- // return a new property set with those keys and the localized values.
- static public Properties getLocalizedProperties(String[] propertyKeys, Properties properties) {
- Properties localizedProperties = new Properties();
- for (int i = 0; i < propertyKeys.length; i++) {
- String key = propertyKeys[i];
- if (key != null) {
- String localizedValue = properties.getProperty(key);
- if (localizedValue != null)
- localizedProperties.put(key, localizedValue);
- }
- }
- return localizedProperties;
- }
-
- public static String[] getLocalizationFiles(File localizationDir, final String filenamePrefix) {
- return localizationDir.list(instance.new FileFilter() {
- public boolean accept(File directory, String filename) {
- return (getLocaleString(filename, filenamePrefix) != null ? true : false);
- }
- });
- }
-
- private abstract class FileFilter implements FilenameFilter {
-
- public FileFilter() {
- // Nothing to do
- }
-
- /* (non-Javadoc)
- * @see java.io.FilenameFilter#accept(java.io.File, java.lang.String)
- */
- public abstract boolean accept(File directory, String filename);
- }
-
- private LocalizationHelper() {
- //
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Messages.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Messages.java
deleted file mode 100644
index 8663c54ed..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Messages.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.metadata.generator.messages";//$NON-NLS-1$
-
- public static String exception_errorConverting;
- public static String exception_errorParsingUpdateSite;
- public static String exception_stateAddition;
- public static String exception_sourceDirectoryInvalid;
- public static String exception_artifactRepoNotWritable;
- public static String exception_artifactRepoNotSpecified;
- public static String exception_metadataRepoNotWritable;
- public static String exception_metadataRepoNotSpecified;
- public static String exception_baseLocationNotSpecified;
- public static String exception_artifactRepoNoAppendDestroysInput;
-
- public static String message_generatingMetadata;
- public static String message_generationCompleted;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/ProductQuery.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/ProductQuery.java
deleted file mode 100644
index 6e9a293e5..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/ProductQuery.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator;
-
-import java.io.*;
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.generator.features.ProductFile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.Generator.GeneratorResult;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.MetadataGeneratorHelper;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.query.MatchQuery;
-
-public class ProductQuery extends MatchQuery {
- private static final String EQUINOX_LAUNCHER = "org.eclipse.equinox.launcher"; //$NON-NLS-1$
-
- private final ProductFile product;
- private final String flavor;
- private final Map children = new HashMap();
- private final String versionAdvice;
-
- public ProductQuery(ProductFile product, String flavor, Map configIUs, String versionAdvice) {
- this.product = product;
- this.flavor = flavor;
- this.versionAdvice = versionAdvice;
- initialize(configIUs);
- }
-
- private Properties loadVersions(String location) {
- Properties properties = new Properties();
- if (location == null)
- return properties;
- File file = new File(location);
- if (file.exists()) {
- InputStream stream = null;
- try {
- stream = new BufferedInputStream(new FileInputStream(file));
- properties.load(stream);
- } catch (IOException e) {
- // nothing
- } finally {
- if (stream != null)
- try {
- stream.close();
- } catch (IOException e) {
- //nothing
- }
- }
- }
- return properties;
- }
-
- private void initialize(Map configIUs) {
- boolean features = product.useFeatures();
- Properties versions = loadVersions(versionAdvice);
-
- List contents = features ? product.getFeatures() : product.getPlugins();
- for (Iterator iterator = contents.iterator(); iterator.hasNext();) {
- String item = (String) iterator.next();
-
- VersionRange range = VersionRange.emptyRange;
- if (versions.containsKey(item)) {
- Version value = Version.create(versions.getProperty(item));
- range = new VersionRange(value, true, value, true);
- }
-
- if (features) // for features we want the group
- item = MetadataGeneratorHelper.getTransformedId(item, false, true);
-
- children.put(item, range);
- if (configIUs.containsKey(item)) {
- for (Iterator ius = ((Set) configIUs.get(item)).iterator(); ius.hasNext();) {
- IInstallableUnit object = (IInstallableUnit) ius.next();
- children.put(object.getId(), new VersionRange(object.getVersion(), true, object.getVersion(), true));
- }
- }
- }
-
- //also include the launcher CU fragments as a workaround to bug 218890
- String launcherPrefix = product.getId() + ".launcher"; //$NON-NLS-1$
- if (configIUs.containsKey(launcherPrefix)) {
- for (Iterator ius = ((Set) configIUs.get(launcherPrefix)).iterator(); ius.hasNext();) {
- IInstallableUnit object = (IInstallableUnit) ius.next();
- children.put(object.getId(), new VersionRange(object.getVersion(), true, object.getVersion(), true));
- }
- }
-
- //also add the launcher.jar
- if (!children.containsKey(EQUINOX_LAUNCHER)) {
- children.put(EQUINOX_LAUNCHER, VersionRange.emptyRange);
- children.put(flavor + EQUINOX_LAUNCHER, VersionRange.emptyRange);
- }
-
- // and launcher fragment CUs
- if (configIUs.containsKey(EQUINOX_LAUNCHER)) {
- for (Iterator ius = ((Set) configIUs.get(EQUINOX_LAUNCHER)).iterator(); ius.hasNext();) {
- IInstallableUnit object = (IInstallableUnit) ius.next();
- children.put(object.getId(), new VersionRange(object.getVersion(), true, object.getVersion(), true));
- }
- }
-
- // feature based product, individual bundle config CUs are under CONFIGURATION_CUS for convenience
- if (features && configIUs.containsKey(GeneratorResult.CONFIGURATION_CUS)) {
- for (Iterator ius = ((Set) configIUs.get(GeneratorResult.CONFIGURATION_CUS)).iterator(); ius.hasNext();) {
- IInstallableUnit object = (IInstallableUnit) ius.next();
- children.put(object.getId(), new VersionRange(object.getVersion(), true, object.getVersion(), true));
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.query.Query#isMatch(java.lang.Object)
- */
- public boolean isMatch(Object object) {
- if (!(object instanceof IInstallableUnit))
- return false;
-
- IInstallableUnit candidate = (IInstallableUnit) object;
- VersionRange range = (VersionRange) children.get(candidate.getId());
- if (range != null) {
- return range.isIncluded(candidate.getVersion());
- }
-
- return false;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/DefaultSiteParser.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/DefaultSiteParser.java
deleted file mode 100644
index 6552f5629..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/DefaultSiteParser.java
+++ /dev/null
@@ -1,731 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator.features;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.xml.parsers.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.p2.metadata.repository.Activator;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.URLEntry;
-import org.eclipse.osgi.util.NLS;
-import org.w3c.dom.*;
-import org.xml.sax.*;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Parses a site.xml file.
- * This class was initially copied from org.eclipse.update.core.model.DefaultSiteParser.
- */
-public class DefaultSiteParser extends DefaultHandler {
-
- private static final String ARCHIVE = "archive"; //$NON-NLS-1$
- private static final String CATEGORY = "category"; //$NON-NLS-1$
- private static final String CATEGORY_DEF = "category-def"; //$NON-NLS-1$
-
- private static final String ASSOCIATE_SITES_URL = "associateSitesURL"; //$NON-NLS-1$
- private static final String ASSOCIATE_SITE = "associateSite"; //$NON-NLS-1$
- private static final String DEFAULT_INFO_URL = "index.html"; //$NON-NLS-1$
- private static final String DESCRIPTION = "description"; //$NON-NLS-1$
- private static final String FEATURE = "feature"; //$NON-NLS-1$
- private static final String FEATURES = "features/"; //$NON-NLS-1$
- private final static SAXParserFactory parserFactory = SAXParserFactory.newInstance();
- private static final String PLUGIN_ID = Activator.ID;
- private static final String SITE = "site"; //$NON-NLS-1$
-
- private static final int STATE_ARCHIVE = 3;
- private static final int STATE_CATEGORY = 4;
- private static final int STATE_CATEGORY_DEF = 5;
- private static final int STATE_DESCRIPTION_CATEGORY_DEF = 7;
- private static final int STATE_DESCRIPTION_SITE = 6;
- private static final int STATE_FEATURE = 2;
- private static final int STATE_IGNORED_ELEMENT = -1;
- private static final int STATE_INITIAL = 0;
- private static final int STATE_SITE = 1;
-
- private int currentState;
-
- private boolean DESCRIPTION_SITE_ALREADY_SEEN = false;
- // Current object stack (used to hold the current object we are
- // populating in this plugin descriptor
- Stack objectStack = new Stack();
-
- private SAXParser parser;
-
- // Current State Information
- Stack stateStack = new Stack();
-
- // List of string keys for translated strings
- private final List messageKeys = new ArrayList(4);
-
- private MultiStatus status;
-
- /*
- *
- */
- private static void debug(String s) {
- Tracing.debug("DefaultSiteParser: " + s); //$NON-NLS-1$
- }
-
- private static URLEntry[] getAssociateSites(String associateSitesURL) {
-
- try {
- DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
- DocumentBuilder builder = domFactory.newDocumentBuilder();
- Document document = builder.parse(associateSitesURL);
- if (document == null)
- return null;
- NodeList mirrorNodes = document.getElementsByTagName(ASSOCIATE_SITE);
- URLEntry[] mirrors = new URLEntry[mirrorNodes.getLength()];
- for (int i = 0; i < mirrorNodes.getLength(); i++) {
- Element mirrorNode = (Element) mirrorNodes.item(i);
- mirrors[i] = new URLEntry();
- String infoURL = mirrorNode.getAttribute("url"); //$NON-NLS-1$
- String label = mirrorNode.getAttribute("label"); //$NON-NLS-1$
- mirrors[i].setURL(infoURL);
- mirrors[i].setAnnotation(label);
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("Processed mirror: url:" + infoURL + " label:" + label); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return mirrors;
- } catch (Exception e) {
- // log if absolute url
- if (associateSitesURL != null && (associateSitesURL.startsWith("http://") //$NON-NLS-1$
- || associateSitesURL.startsWith("https://") //$NON-NLS-1$
- || associateSitesURL.startsWith("file://") //$NON-NLS-1$
- || associateSitesURL.startsWith("ftp://") //$NON-NLS-1$
- || associateSitesURL.startsWith("jar://"))) //$NON-NLS-1$
- log(Messages.DefaultSiteParser_mirrors, e);
- return null;
- }
- }
-
- static void log(Exception e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Internal Error", e)); //$NON-NLS-1$
- }
-
- static void log(String message) {
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, message, null));
- }
-
- static void log(String message, Exception e) {
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, message, e));
- }
-
- /**
- * Constructs a site parser.
- */
- public DefaultSiteParser() {
- super();
- stateStack = new Stack();
- objectStack = new Stack();
- status = null;
- DESCRIPTION_SITE_ALREADY_SEEN = false;
- try {
- parserFactory.setNamespaceAware(true);
- this.parser = parserFactory.newSAXParser();
- } catch (ParserConfigurationException e) {
- log(e);
- } catch (SAXException e) {
- log(e);
- }
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("Created"); //$NON-NLS-1$
- }
-
- /**
- * Handle character text
- * @see DefaultHandler#characters(char[], int, int)
- * @since 2.0
- */
- public void characters(char[] ch, int start, int length) {
- String text = new String(ch, start, length);
- //only push if description
- int state = ((Integer) stateStack.peek()).intValue();
- if (state == STATE_DESCRIPTION_SITE || state == STATE_DESCRIPTION_CATEGORY_DEF)
- objectStack.push(text);
-
- }
-
- /**
- * Handle end of element tags
- * @see DefaultHandler#endElement(String, String, String)
- * @since 2.0
- */
- public void endElement(String uri, String localName, String qName) {
-
- String text = null;
- URLEntry info = null;
-
- int state = ((Integer) stateStack.peek()).intValue();
- switch (state) {
- case STATE_IGNORED_ELEMENT :
- case STATE_ARCHIVE :
- case STATE_CATEGORY :
- stateStack.pop();
- break;
-
- case STATE_INITIAL :
- internalError(Messages.DefaultSiteParser_ParsingStackBackToInitialState);
- break;
-
- case STATE_SITE :
- stateStack.pop();
- if (objectStack.peek() instanceof String) {
- text = (String) objectStack.pop();
- SiteModel site = (SiteModel) objectStack.peek();
- site.getDescription().setAnnotation(text);
- }
- //do not pop the object
- break;
-
- case STATE_FEATURE :
- stateStack.pop();
- objectStack.pop();
- break;
-
- case STATE_CATEGORY_DEF :
- stateStack.pop();
- if (objectStack.peek() instanceof String) {
- text = (String) objectStack.pop();
- SiteCategory category = (SiteCategory) objectStack.peek();
- category.setDescription(text);
- }
- objectStack.pop();
- break;
-
- case STATE_DESCRIPTION_SITE :
- stateStack.pop();
- text = ""; //$NON-NLS-1$
- while (objectStack.peek() instanceof String) {
- // add text, preserving at most one space between text fragments
- String newText = (String) objectStack.pop();
- if (trailingSpace(newText) && !leadingSpace(text)) {
- text = " " + text; //$NON-NLS-1$
- }
- text = newText.trim() + text;
- if (leadingSpace(newText) && !leadingSpace(text)) {
- text = " " + text; //$NON-NLS-1$
- }
- }
- text = text.trim();
-
- info = (URLEntry) objectStack.pop();
- if (text != null)
- info.setAnnotation(text);
-
- SiteModel siteModel = (SiteModel) objectStack.peek();
- // override description.
- // do not raise error as previous description may be default one
- // when parsing site tag
- if (DESCRIPTION_SITE_ALREADY_SEEN)
- debug(NLS.bind(Messages.DefaultSiteParser_ElementAlreadySet, (new String[] {getState(state)})));
- siteModel.setDescription(info);
- DESCRIPTION_SITE_ALREADY_SEEN = true;
- break;
-
- case STATE_DESCRIPTION_CATEGORY_DEF :
- stateStack.pop();
- text = ""; //$NON-NLS-1$
- while (objectStack.peek() instanceof String) {
- // add text, preserving at most one space between text fragments
- String newText = (String) objectStack.pop();
- if (trailingSpace(newText) && !leadingSpace(text)) {
- text = " " + text; //$NON-NLS-1$
- }
- text = newText.trim() + text;
- if (leadingSpace(newText) && !leadingSpace(text)) {
- text = " " + text; //$NON-NLS-1$
- }
- }
- text = text.trim();
-
- info = (URLEntry) objectStack.pop();
- if (text != null)
- info.setAnnotation(text);
-
- SiteCategory category = (SiteCategory) objectStack.peek();
- if (category.getDescription() != null)
- internalError(NLS.bind(Messages.DefaultSiteParser_ElementAlreadySet, (new String[] {getState(state), category.getLabel()})));
- else
- category.setDescription(info.getAnnotation());
- break;
-
- default :
- internalError(NLS.bind(Messages.DefaultSiteParser_UnknownEndState, (new String[] {getState(state)})));
- break;
- }
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End Element:" + uri + ":" + localName + ":" + qName);//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- /*
- * Handles an error state specified by the status. The collection of all logged status
- * objects can be accessed using <code>getStatus()</code>.
- *
- * @param error a status detailing the error condition
- */
- private void error(IStatus error) {
-
- if (status == null) {
- status = new MultiStatus(PLUGIN_ID, 0, Messages.DefaultSiteParser_ErrorParsingSite, null);
- }
-
- status.add(error);
- if (Tracing.DEBUG_GENERATOR_PARSING)
- LogHelper.log(error);
- }
-
- /**
- * Handle errors
- * @see DefaultHandler#error(SAXParseException)
- * @since 2.0
- */
- public void error(SAXParseException ex) {
- logStatus(ex);
- }
-
- /**
- * Handle fatal errors
- * @see DefaultHandler#fatalError(SAXParseException)
- * @exception SAXException
- * @since 2.0
- */
- public void fatalError(SAXParseException ex) throws SAXException {
- logStatus(ex);
- throw ex;
- }
-
- /*
- * return the state as String
- */
- private String getState(int state) {
-
- switch (state) {
- case STATE_IGNORED_ELEMENT :
- return "Ignored"; //$NON-NLS-1$
-
- case STATE_INITIAL :
- return "Initial"; //$NON-NLS-1$
-
- case STATE_SITE :
- return "Site"; //$NON-NLS-1$
-
- case STATE_FEATURE :
- return "Feature"; //$NON-NLS-1$
-
- case STATE_ARCHIVE :
- return "Archive"; //$NON-NLS-1$
-
- case STATE_CATEGORY :
- return "Category"; //$NON-NLS-1$
-
- case STATE_CATEGORY_DEF :
- return "Category Def"; //$NON-NLS-1$
-
- case STATE_DESCRIPTION_CATEGORY_DEF :
- return "Description / Category Def"; //$NON-NLS-1$
-
- case STATE_DESCRIPTION_SITE :
- return "Description / Site"; //$NON-NLS-1$
-
- default :
- return Messages.DefaultSiteParser_UnknownState;
- }
- }
-
- /**
- * Returns all status objects accumulated by the parser.
- *
- * @return multi-status containing accumulated status, or <code>null</code>.
- * @since 2.0
- */
- public MultiStatus getStatus() {
- return status;
- }
-
- private void handleCategoryDefState(String elementName, Attributes attributes) {
- if (elementName.equals(FEATURE)) {
- stateStack.push(new Integer(STATE_FEATURE));
- processFeature(attributes);
- } else if (elementName.equals(ARCHIVE)) {
- stateStack.push(new Integer(STATE_ARCHIVE));
- processArchive(attributes);
- } else if (elementName.equals(CATEGORY_DEF)) {
- stateStack.push(new Integer(STATE_CATEGORY_DEF));
- processCategoryDef(attributes);
- } else if (elementName.equals(DESCRIPTION)) {
- stateStack.push(new Integer(STATE_DESCRIPTION_CATEGORY_DEF));
- processInfo(attributes);
- } else
- internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState)})));
- }
-
- private void handleCategoryState(String elementName, Attributes attributes) {
- if (elementName.equals(DESCRIPTION)) {
- stateStack.push(new Integer(STATE_DESCRIPTION_SITE));
- processInfo(attributes);
- } else if (elementName.equals(FEATURE)) {
- stateStack.push(new Integer(STATE_FEATURE));
- processFeature(attributes);
- } else if (elementName.equals(ARCHIVE)) {
- stateStack.push(new Integer(STATE_ARCHIVE));
- processArchive(attributes);
- } else if (elementName.equals(CATEGORY_DEF)) {
- stateStack.push(new Integer(STATE_CATEGORY_DEF));
- processCategoryDef(attributes);
- } else if (elementName.equals(CATEGORY)) {
- stateStack.push(new Integer(STATE_CATEGORY));
- processCategory(attributes);
- } else
- internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState)})));
- }
-
- private void handleFeatureState(String elementName, Attributes attributes) {
- if (elementName.equals(DESCRIPTION)) {
- stateStack.push(new Integer(STATE_DESCRIPTION_SITE));
- processInfo(attributes);
- } else if (elementName.equals(FEATURE)) {
- stateStack.push(new Integer(STATE_FEATURE));
- processFeature(attributes);
- } else if (elementName.equals(ARCHIVE)) {
- stateStack.push(new Integer(STATE_ARCHIVE));
- processArchive(attributes);
- } else if (elementName.equals(CATEGORY_DEF)) {
- stateStack.push(new Integer(STATE_CATEGORY_DEF));
- processCategoryDef(attributes);
- } else if (elementName.equals(CATEGORY)) {
- stateStack.push(new Integer(STATE_CATEGORY));
- processCategory(attributes);
- } else
- internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState)})));
- }
-
- private void handleInitialState(String elementName, Attributes attributes) throws SAXException {
- if (elementName.equals(SITE)) {
- stateStack.push(new Integer(STATE_SITE));
- processSite(attributes);
- } else {
- internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState)})));
- // what we received was not a site.xml, no need to continue
- throw new SAXException(Messages.DefaultSiteParser_InvalidXMLStream);
- }
-
- }
-
- private void handleSiteState(String elementName, Attributes attributes) {
- if (elementName.equals(DESCRIPTION)) {
- stateStack.push(new Integer(STATE_DESCRIPTION_SITE));
- processInfo(attributes);
- } else if (elementName.equals(FEATURE)) {
- stateStack.push(new Integer(STATE_FEATURE));
- processFeature(attributes);
- } else if (elementName.equals(ARCHIVE)) {
- stateStack.push(new Integer(STATE_ARCHIVE));
- processArchive(attributes);
- } else if (elementName.equals(CATEGORY_DEF)) {
- stateStack.push(new Integer(STATE_CATEGORY_DEF));
- processCategoryDef(attributes);
- } else
- internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState)})));
- }
-
- /*
- *
- */
- private void internalError(String message) {
- error(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, message, null));
- }
-
- /*
- *
- */
- private void internalErrorUnknownTag(String msg) {
- stateStack.push(new Integer(STATE_IGNORED_ELEMENT));
- internalError(msg);
- }
-
- private boolean leadingSpace(String str) {
- if (str.length() <= 0) {
- return false;
- }
- return Character.isWhitespace(str.charAt(0));
- }
-
- /*
- *
- */
- private void logStatus(SAXParseException ex) {
- String name = ex.getSystemId();
- if (name == null)
- name = ""; //$NON-NLS-1$
- else
- name = name.substring(1 + name.lastIndexOf("/")); //$NON-NLS-1$
-
- String msg;
- if (name.equals("")) //$NON-NLS-1$
- msg = NLS.bind(Messages.DefaultSiteParser_ErrorParsing, (new String[] {ex.getMessage()}));
- else {
- String[] values = new String[] {name, Integer.toString(ex.getLineNumber()), Integer.toString(ex.getColumnNumber()), ex.getMessage()};
- msg = NLS.bind(Messages.DefaultSiteParser_ErrorlineColumnMessage, values);
- }
- error(new Status(IStatus.ERROR, PLUGIN_ID, msg, ex));
- }
-
- /**
- * Parses the specified input steam and constructs a site model.
- * The input stream is not closed as part of this operation.
- *
- * @param in input stream
- * @return site model
- * @exception SAXException
- * @exception IOException
- * @since 2.0
- */
- public SiteModel parse(InputStream in) throws SAXException, IOException {
- stateStack.push(new Integer(STATE_INITIAL));
- currentState = ((Integer) stateStack.peek()).intValue();
- parser.parse(new InputSource(in), this);
- if (objectStack.isEmpty())
- throw new SAXException(Messages.DefaultSiteParser_NoSiteTag);
- if (objectStack.peek() instanceof SiteModel) {
- SiteModel site = (SiteModel) objectStack.pop();
- site.setMessageKeys(messageKeys);
- return site;
- }
- String stack = ""; //$NON-NLS-1$
- Iterator iter = objectStack.iterator();
- while (iter.hasNext()) {
- stack = stack + iter.next().toString() + "\r\n"; //$NON-NLS-1$
- }
- throw new SAXException(NLS.bind(Messages.DefaultSiteParser_WrongParsingStack, (new String[] {stack})));
- }
-
- /*
- * process archive info
- */
- private void processArchive(Attributes attributes) {
- URLEntry archive = new URLEntry();
- String id = attributes.getValue("path"); //$NON-NLS-1$
- if (id == null || id.trim().equals("")) { //$NON-NLS-1$
- internalError(NLS.bind(Messages.DefaultSiteParser_Missing, (new String[] {"path", getState(currentState)}))); //$NON-NLS-1$
- }
-
- archive.setAnnotation(id);
-
- String url = attributes.getValue("url"); //$NON-NLS-1$
- if (url == null || url.trim().equals("")) { //$NON-NLS-1$
- internalError(NLS.bind(Messages.DefaultSiteParser_Missing, (new String[] {"archive", getState(currentState)}))); //$NON-NLS-1$
- } else {
- archive.setURL(url);
-
- SiteModel site = (SiteModel) objectStack.peek();
- site.addArchive(archive);
- }
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End processing Archive: path:" + id + " url:" + url);//$NON-NLS-1$ //$NON-NLS-2$
-
- }
-
- /*
- * process the Category info
- */
- private void processCategory(Attributes attributes) {
- String category = attributes.getValue("name"); //$NON-NLS-1$
- SiteFeature feature = (SiteFeature) objectStack.peek();
- feature.addCategoryName(category);
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End processing Category: name:" + category); //$NON-NLS-1$
- }
-
- /*
- * process category def info
- */
- private void processCategoryDef(Attributes attributes) {
- SiteCategory category = new SiteCategory();
- String name = attributes.getValue("name"); //$NON-NLS-1$
- String label = attributes.getValue("label"); //$NON-NLS-1$
- checkTranslated(label);
- category.setName(name);
- category.setLabel(label);
-
- SiteModel site = (SiteModel) objectStack.peek();
- site.addCategory(category);
- objectStack.push(category);
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End processing CategoryDef: name:" + name + " label:" + label); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /*
- * process feature info
- */
- private void processFeature(Attributes attributes) {
- SiteFeature feature = new SiteFeature();
-
- // feature location on the site
- String urlInfo = attributes.getValue("url"); //$NON-NLS-1$
- // identifier and version
- String id = attributes.getValue("id"); //$NON-NLS-1$
- String ver = attributes.getValue("version"); //$NON-NLS-1$
-
- boolean noURL = (urlInfo == null || urlInfo.trim().equals("")); //$NON-NLS-1$
- boolean noId = (id == null || id.trim().equals("")); //$NON-NLS-1$
- boolean noVersion = (ver == null || ver.trim().equals("")); //$NON-NLS-1$
-
- // We need to have id and version, or the url, or both.
- if (noURL) {
- if (noId || noVersion)
- internalError(NLS.bind(Messages.DefaultSiteParser_Missing, (new String[] {"url", getState(currentState)}))); //$NON-NLS-1$
- else
- // default url
- urlInfo = FEATURES + id + '_' + ver; //
- }
-
- feature.setURLString(urlInfo);
-
- // if one is null, and not the other
- if (noId ^ noVersion) {
- String[] values = new String[] {id, ver, getState(currentState)};
- log(NLS.bind(Messages.DefaultFeatureParser_IdOrVersionInvalid, values));
- } else {
- feature.setFeatureIdentifier(id);
- feature.setFeatureVersion(ver);
- }
-
- SiteModel site = (SiteModel) objectStack.peek();
- site.addFeature(feature);
-
- objectStack.push(feature);
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End Processing DefaultFeature Tag: url:" + urlInfo); //$NON-NLS-1$
-
- }
-
- /*
- * process URL info with element text
- */
- private void processInfo(Attributes attributes) {
- URLEntry inf = new URLEntry();
- String infoURL = attributes.getValue("url"); //$NON-NLS-1$
- inf.setURL(infoURL);
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("Processed Info: url:" + infoURL); //$NON-NLS-1$
-
- objectStack.push(inf);
- }
-
- /*
- * process site info
- */
- private void processSite(Attributes attributes) {
- // create site map
- SiteModel site = new SiteModel();
-
- // provide default description URL
- // If <description> is specified, for the site, it takes precedence
- URLEntry description = new URLEntry();
- description.setURL(DEFAULT_INFO_URL);
- site.setDescription(description);
-
- // get mirrors, if any
- String mirrorsURL = attributes.getValue("mirrorsURL"); //$NON-NLS-1$
- if (mirrorsURL != null && mirrorsURL.trim().length() > 0) {
- site.setMirrorsURLString(mirrorsURL);
- }
-
- if (attributes.getValue(ASSOCIATE_SITES_URL) != null)
- site.setAssociateSites(getAssociateSites(attributes.getValue(ASSOCIATE_SITES_URL)));
-
- objectStack.push(site);
- }
-
- /**
- * Handle start of element tags
- * @see DefaultHandler#startElement(String, String, String, Attributes)
- * @since 2.0
- */
- public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
-
- if (Tracing.DEBUG_GENERATOR_PARSING) {
- debug("State: " + currentState); //$NON-NLS-1$
- debug("Start Element: uri:" + uri + " local Name:" + localName + " qName:" + qName);//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- switch (currentState) {
- case STATE_IGNORED_ELEMENT :
- internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {localName, getState(currentState)})));
- break;
- case STATE_INITIAL :
- handleInitialState(localName, attributes);
- break;
-
- case STATE_SITE :
- handleSiteState(localName, attributes);
- break;
-
- case STATE_FEATURE :
- handleFeatureState(localName, attributes);
- break;
-
- case STATE_ARCHIVE :
- handleSiteState(localName, attributes);
- break;
-
- case STATE_CATEGORY :
- handleCategoryState(localName, attributes);
- break;
-
- case STATE_CATEGORY_DEF :
- handleCategoryDefState(localName, attributes);
- break;
-
- case STATE_DESCRIPTION_SITE :
- handleSiteState(localName, attributes);
- break;
-
- case STATE_DESCRIPTION_CATEGORY_DEF :
- handleSiteState(localName, attributes);
- break;
-
- default :
- internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownStartState, (new String[] {getState(currentState)})));
- break;
- }
- int newState = ((Integer) stateStack.peek()).intValue();
- if (newState != STATE_IGNORED_ELEMENT)
- currentState = newState;
-
- }
-
- private boolean trailingSpace(String str) {
- if (str.length() <= 0) {
- return false;
- }
- return Character.isWhitespace(str.charAt(str.length() - 1));
- }
-
- // Add translatable strings from the site.xml
- // to the list of message keys.
- private void checkTranslated(String value) {
- if (value != null && value.length() > 1 && value.startsWith("%")) //$NON-NLS-1$
- messageKeys.add(value.substring(1));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/FeatureParser.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/FeatureParser.java
deleted file mode 100644
index c6a06273e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/FeatureParser.java
+++ /dev/null
@@ -1,363 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator.features;
-
-import java.io.*;
-import java.net.URL;
-import java.util.*;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-import javax.xml.parsers.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.metadata.generator.Activator;
-import org.eclipse.equinox.internal.p2.metadata.generator.LocalizationHelper;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.Feature;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.FeatureEntry;
-import org.eclipse.osgi.util.NLS;
-import org.xml.sax.*;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Default feature parser.
- * Parses the feature manifest file as defined by the platform.
- *
- * @since 3.0
- */
-public class FeatureParser extends DefaultHandler {
-
- private final static SAXParserFactory parserFactory = SAXParserFactory.newInstance();
- private SAXParser parser;
- protected Feature result;
- private URL url;
- private StringBuffer characters = null;
-
- private Properties messages = null;
- private List messageKeys = null;
-
- public FeatureParser() {
- this(true);
- }
-
- protected FeatureParser(boolean createParser) {
- super();
- if (!createParser)
- return;
- try {
- parserFactory.setNamespaceAware(true);
- this.parser = parserFactory.newSAXParser();
- } catch (ParserConfigurationException e) {
- System.out.println(e);
- } catch (SAXException e) {
- System.out.println(e);
- }
- }
-
- public void characters(char[] ch, int start, int length) throws SAXException {
- if (characters == null)
- return;
- characters.append(ch, start, length);
- }
-
- protected Feature createFeature(String id, String version) {
- return new Feature(id, version);
- }
-
- public void endElement(String uri, String localName, String qName) throws SAXException {
- if (characters == null)
- return;
- if ("description".equals(localName)) { //$NON-NLS-1$
- result.setDescription(localize(characters.toString().trim()));
- } else if ("license".equals(localName)) { //$NON-NLS-1$
- result.setLicense(localize(characters.toString().trim()));
- } else if ("copyright".equals(localName)) { //$NON-NLS-1$
- result.setCopyright(localize(characters.toString().trim()));
- }
- characters = null;
- }
-
- private void loadProperties(File directory, Properties properties) {
- //skip directories that don't contain a feature.properties file
- File file = new File(directory, "feature.properties"); //$NON-NLS-1$
- if (!file.exists())
- return;
- try {
- InputStream input = new BufferedInputStream(new FileInputStream(file));
- try {
- properties.load(input);
- } finally {
- if (input != null)
- input.close();
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- private void loadProperties(JarFile jar, Properties properties) {
- JarEntry entry = jar.getJarEntry("feature.properties"); //$NON-NLS-1$
- if (entry == null)
- return;
- try {
- InputStream input = new BufferedInputStream(jar.getInputStream(entry));
- try {
- properties.load(input);
- } finally {
- if (input != null)
- input.close();
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- private String localize(String value) {
- if (messages == null || value == null)
- return value;
- if (!value.startsWith("%")) //$NON-NLS-1$
- return value;
- String key = value.substring(1);
- messageKeys.add(key);
- return value;
- }
-
- /**
- * Parses the specified location and constructs a feature. The given location
- * should be either the location of the feature JAR or the directory containing
- * the feature.
- *
- * @param location the location of the feature to parse.
- */
- public Feature parse(File location) {
- if (!location.exists())
- return null;
-
- Feature feature = null;
- Properties properties = new Properties();
-
- if (location.isDirectory()) {
- //skip directories that don't contain a feature.xml file
- File file = new File(location, "feature.xml"); //$NON-NLS-1$
- if (!file.exists())
- return null;
- loadProperties(location, properties);
- try {
- InputStream input = new BufferedInputStream(new FileInputStream(file));
- feature = parse(input, properties);
- if (feature != null) {
- String[] keyStrings = (String[]) messageKeys.toArray(new String[messageKeys.size()]);
- feature.setLocalizations(LocalizationHelper.getDirPropertyLocalizations(location, "feature", null, keyStrings)); //$NON-NLS-1$
- }
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- }
- } else if (location.getName().endsWith(".jar")) { //$NON-NLS-1$
- JarFile jar = null;
- try {
- jar = new JarFile(location);
- loadProperties(jar, properties);
- JarEntry entry = jar.getJarEntry("feature.xml"); //$NON-NLS-1$
- if (entry == null)
- return null;
- InputStream input = new BufferedInputStream(jar.getInputStream(entry));
- feature = parse(input, properties);
- if (feature != null) {
- String[] keyStrings = (String[]) messageKeys.toArray(new String[messageKeys.size()]);
- feature.setLocalizations(LocalizationHelper.getJarPropertyLocalizations(location, "feature", null, keyStrings)); //$NON-NLS-1$
- }
- } catch (IOException e) {
- e.printStackTrace();
- } catch (SecurityException e) {
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Exception parsing feature: " + location.getAbsolutePath(), e)); //$NON-NLS-1$
- } finally {
- try {
- if (jar != null)
- jar.close();
- } catch (IOException e) {
- //
- }
- }
- }
- return feature;
- }
-
- /**
- * Parse the given input stream and return a feature object
- * or null. This method closes the input stream.
- */
- public Feature parse(InputStream in, Properties messages) {
- this.messages = messages;
- this.messageKeys = new ArrayList(messages.size());
- result = null;
- try {
- parser.parse(new InputSource(in), this);
- } catch (SAXException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- } finally {
- try {
- in.close();
- } catch (IOException e1) {
- // Utils.log(e1.getLocalizedMessage());
- }
- }
- return result;
- }
-
- private void processCopyright(Attributes attributes) {
- result.setCopyrightURL(attributes.getValue("url")); //$NON-NLS-1$
- characters = new StringBuffer();
- }
-
- private void processDescription(Attributes attributes) {
- result.setDescriptionURL(attributes.getValue("url")); //$NON-NLS-1$
- characters = new StringBuffer();
- }
-
- private void processDiscoverySite(Attributes attributes) {
- //ignore discovery sites of type 'web'
- if ("web".equals(attributes.getValue("type"))) //$NON-NLS-1$ //$NON-NLS-2$
- return;
- result.addDiscoverySite(attributes.getValue("label"), attributes.getValue("url")); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- protected void processFeature(Attributes attributes) {
- String id = attributes.getValue("id"); //$NON-NLS-1$
- String ver = attributes.getValue("version"); //$NON-NLS-1$
-
- if (id == null || id.trim().equals("") //$NON-NLS-1$
- || ver == null || ver.trim().equals("")) { //$NON-NLS-1$
- // System.out.println(NLS.bind(Messages.FeatureParser_IdOrVersionInvalid, (new String[] { id, ver})));
- } else {
- result = createFeature(id, ver);
- result.setApplication(attributes.getValue("application")); //$NON-NLS-1$
- result.setPlugin(attributes.getValue("plugin")); //$NON-NLS-1$
- result.setExclusive(Boolean.valueOf(attributes.getValue("exclusive")).booleanValue()); //$NON-NLS-1$
- result.setPrimary(Boolean.valueOf(attributes.getValue("primary")).booleanValue()); //$NON-NLS-1$
-
- //TODO rootURLs
- if (url != null && "file".equals(url.getProtocol())) { //$NON-NLS-1$
- File f = new File(url.getFile().replace('/', File.separatorChar));
- result.setURL("features" + "/" + f.getParentFile().getName() + "/");// + f.getName()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- } else {
- // externalized URLs might be in relative form, ensure they are absolute
- // feature.setURL(Utils.makeAbsolute(Utils.getInstallURL(), url).toExternalForm());
- }
-
- result.setProviderName(localize(attributes.getValue("provider-name"))); //$NON-NLS-1$
- result.setLabel(localize(attributes.getValue("label"))); //$NON-NLS-1$
-
- // Utils.debug("End process DefaultFeature tag: id:" +id + " ver:" +ver + " url:" + feature.getURL()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- private void processImport(Attributes attributes) {
- String id = attributes.getValue("feature"); //$NON-NLS-1$
- FeatureEntry entry = null;
- if (id != null) {
- if ("true".equalsIgnoreCase(attributes.getValue("patch"))) { //$NON-NLS-1$ //$NON-NLS-2$
- entry = FeatureEntry.createRequires(id, attributes.getValue("version"), "perfect", attributes.getValue("filter"), false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- entry.setPatch(true);
- } else {
- entry = FeatureEntry.createRequires(id, attributes.getValue("version"), attributes.getValue("match"), attributes.getValue("filter"), false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- } else {
- id = attributes.getValue("plugin"); //$NON-NLS-1$
- entry = FeatureEntry.createRequires(id, attributes.getValue("version"), attributes.getValue("match"), attributes.getValue("filter"), true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- result.addEntry(entry);
- }
-
- private void processIncludes(Attributes attributes) {
- FeatureEntry entry = new FeatureEntry(attributes.getValue("id"), attributes.getValue("version"), false); //$NON-NLS-1$ //$NON-NLS-2$
- String flag = attributes.getValue("optional"); //$NON-NLS-1$
- if (flag != null)
- entry.setOptional(Boolean.valueOf(flag).booleanValue());
- setEnvironment(attributes, entry);
- result.addEntry(entry);
- }
-
- private void processInstallHandler(Attributes attributes) {
- result.setInstallHandler(attributes.getValue("handler")); //$NON-NLS-1$
- result.setInstallHandlerLibrary(attributes.getValue("library")); //$NON-NLS-1$
- result.setInstallHandlerURL(attributes.getValue("url")); //$NON-NLS-1$
- }
-
- private void processLicense(Attributes attributes) {
- result.setLicenseURL(attributes.getValue("url")); //$NON-NLS-1$
- characters = new StringBuffer();
- }
-
- private void processPlugin(Attributes attributes) {
- String id = attributes.getValue("id"); //$NON-NLS-1$
- String version = attributes.getValue("version"); //$NON-NLS-1$
-
- if (id == null || id.trim().equals("") || version == null || version.trim().equals("")) { //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println(NLS.bind("FeatureParser#processPlugin, ID {0} or version {1} invalid", (new String[] {id, version}))); //$NON-NLS-1$
- } else {
- FeatureEntry plugin = new FeatureEntry(id, version, true);
- setEnvironment(attributes, plugin);
- String unpack = attributes.getValue("unpack"); //$NON-NLS-1$
- if (unpack != null)
- plugin.setUnpack(Boolean.valueOf(unpack).booleanValue());
- String fragment = attributes.getValue("fragment"); //$NON-NLS-1$
- if (fragment != null)
- plugin.setFragment(Boolean.valueOf(fragment).booleanValue());
- String filter = attributes.getValue("filter"); //$NON-NLS-1$
- if (filter != null)
- plugin.setFilter(filter);
- result.addEntry(plugin);
-
- // Utils.debug("End process DefaultFeature tag: id:" + id + " ver:" + ver + " url:" + feature.getURL()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- private void processUpdateSite(Attributes attributes) {
- result.setUpdateSiteLabel(attributes.getValue("label")); //$NON-NLS-1$
- result.setUpdateSiteURL(attributes.getValue("url")); //$NON-NLS-1$
- }
-
- private void setEnvironment(Attributes attributes, FeatureEntry entry) {
- String os = attributes.getValue("os"); //$NON-NLS-1$
- String ws = attributes.getValue("ws"); //$NON-NLS-1$
- String nl = attributes.getValue("nl"); //$NON-NLS-1$
- String arch = attributes.getValue("arch"); //$NON-NLS-1$
- entry.setEnvironment(os, ws, arch, nl);
- }
-
- public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
- // Utils.debug("Start Element: uri:" + uri + " local Name:" + localName + " qName:" + qName); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if ("plugin".equals(localName)) { //$NON-NLS-1$
- processPlugin(attributes);
- } else if ("description".equals(localName)) { //$NON-NLS-1$
- processDescription(attributes);
- } else if ("license".equals(localName)) { //$NON-NLS-1$
- processLicense(attributes);
- } else if ("copyright".equals(localName)) { //$NON-NLS-1$
- processCopyright(attributes);
- } else if ("feature".equals(localName)) { //$NON-NLS-1$
- processFeature(attributes);
- } else if ("import".equals(localName)) { //$NON-NLS-1$
- processImport(attributes);
- } else if ("includes".equals(localName)) { //$NON-NLS-1$
- processIncludes(attributes);
- } else if ("install-handler".equals(localName)) { //$NON-NLS-1$
- processInstallHandler(attributes);
- } else if ("update".equals(localName)) { //$NON-NLS-1$
- processUpdateSite(attributes);
- } else if ("discovery".equals(localName)) { //$NON-NLS-1$
- processDiscoverySite(attributes);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/Messages.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/Messages.java
deleted file mode 100644
index dce8bba54..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/Messages.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator.features;
-
-import org.eclipse.osgi.util.NLS;
-
-public final class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.metadata.generator.features.messages";//$NON-NLS-1$
-
- public static String DefaultFeatureParser_IdOrVersionInvalid;
- public static String DefaultSiteParser_NoSiteTag;
- public static String DefaultSiteParser_WrongParsingStack;
- public static String DefaultSiteParser_UnknownElement;
- public static String DefaultSiteParser_UnknownStartState;
- public static String DefaultSiteParser_Missing;
- public static String DefaultSiteParser_ParsingStackBackToInitialState;
- public static String DefaultSiteParser_ElementAlreadySet;
- public static String DefaultSiteParser_UnknownEndState;
- public static String DefaultSiteParser_ErrorParsing;
- public static String DefaultSiteParser_ErrorlineColumnMessage;
- public static String DefaultSiteParser_ErrorParsingSite;
- public static String DefaultSiteParser_UnknownState;
- public static String DefaultSiteParser_InvalidXMLStream;
- public static String DefaultSiteParser_mirrors;
- static {
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- // Do not instantiate
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/ProductFile.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/ProductFile.java
deleted file mode 100644
index fd1e55017..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/ProductFile.java
+++ /dev/null
@@ -1,514 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.metadata.generator.features;
-
-import java.io.*;
-import java.util.*;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- *
- * @since 3.1
- */
-public class ProductFile extends DefaultHandler {
- private final static SAXParserFactory parserFactory = SAXParserFactory.newInstance();
-
- private static final String PROGRAM_ARGS = "programArgs"; //$NON-NLS-1$
- private static final String PROGRAM_ARGS_LINUX = "programArgsLin"; //$NON-NLS-1$
- private static final String PROGRAM_ARGS_MAC = "programArgsMac"; //$NON-NLS-1$
- private static final String PROGRAM_ARGS_SOLARIS = "programArgsSol"; //$NON-NLS-1$
- private static final String PROGRAM_ARGS_WIN = "programArgsWin"; //$NON-NLS-1$
- private static final String VM_ARGS = "vmArgs"; //$NON-NLS-1$
- private static final String VM_ARGS_LINUX = "vmArgsLin"; //$NON-NLS-1$
- private static final String VM_ARGS_MAC = "vmArgsMac"; //$NON-NLS-1$
- private static final String VM_ARGS_SOLARIS = "vmArgsSol"; //$NON-NLS-1$
- private static final String VM_ARGS_WIN = "vmArgsWin"; //$NON-NLS-1$
-
- private static final String SOLARIS_LARGE = "solarisLarge"; //$NON-NLS-1$
- private static final String SOLARIS_MEDIUM = "solarisMedium"; //$NON-NLS-1$
- private static final String SOLARIS_SMALL = "solarisSmall"; //$NON-NLS-1$
- private static final String SOLARIS_TINY = "solarisTiny"; //$NON-NLS-1$
- private static final String WIN32_16_LOW = "winSmallLow"; //$NON-NLS-1$
- private static final String WIN32_16_HIGH = "winSmallHigh"; //$NON-NLS-1$
- private static final String WIN32_24_LOW = "win24Low"; //$NON-NLS-1$
- private static final String WIN32_32_LOW = "winMediumLow"; //$NON-NLS-1$
- private static final String WIN32_32_HIGH = "winMediumHigh"; //$NON-NLS-1$
- private static final String WIN32_48_LOW = "winLargeLow"; //$NON-NLS-1$
- private static final String WIN32_48_HIGH = "winLargeHigh"; //$NON-NLS-1$
-
- private static final String OS_WIN32 = "win32";//$NON-NLS-1$
- private static final String OS_LINUX = "linux";//$NON-NLS-1$
- private static final String OS_SOLARIS = "solaris";//$NON-NLS-1$
- private static final String OS_MACOSX = "macosx";//$NON-NLS-1$
-
- private static final String PRODUCT = "product"; //$NON-NLS-1$
- private static final String CONFIG_INI = "configIni"; //$NON-NLS-1$
- private static final String LAUNCHER = "launcher"; //$NON-NLS-1$
- private static final String LAUNCHER_ARGS = "launcherArgs"; //$NON-NLS-1$
- private static final String PLUGINS = "plugins"; //$NON-NLS-1$
- private static final String FEATURES = "features"; //$NON-NLS-1$
- private static final String P_USE_ICO = "useIco"; //$NON-NLS-1$
-
- //These constants form a small state machine to parse the .product file
- private static final int STATE_START = 0;
- private static final int STATE_PRODUCT = 1;
- private static final int STATE_LAUNCHER = 2;
- private static final int STATE_LAUNCHER_ARGS = 3;
- private static final int STATE_PLUGINS = 4;
- private static final int STATE_FEATURES = 5;
- private static final int STATE_PROGRAM_ARGS = 6;
- private static final int STATE_PROGRAM_ARGS_LINUX = 7;
- private static final int STATE_PROGRAM_ARGS_MAC = 8;
- private static final int STATE_PROGRAM_ARGS_SOLARIS = 9;
- private static final int STATE_PROGRAM_ARGS_WIN = 10;
- private static final int STATE_VM_ARGS = 11;
- private static final int STATE_VM_ARGS_LINUX = 12;
- private static final int STATE_VM_ARGS_MAC = 13;
- private static final int STATE_VM_ARGS_SOLARIS = 14;
- private static final int STATE_VM_ARGS_WIN = 15;
- private static final int STATE_CONFIG_INI = 16;
-
- private int state = STATE_START;
-
- private final SAXParser parser;
- private String currentOS = null;
- private boolean useIco = false;
- private final ArrayList result = new ArrayList(6);
- private final Map platformSpecificConfigPaths = new HashMap();
- private String configPlatform = null;
- private String platformConfigPath = null;
- private String launcherName = null;
- private String id = null;
- private String uid = null;
- private boolean useFeatures = false;
- private List plugins = null;
- private List fragments = null;
- private List features = null;
- private String productName = null;
- private String version = null;
-
- private Properties launcherArgs = new Properties();
-
- private static String normalize(String text) {
- if (text == null || text.trim().length() == 0)
- return ""; //$NON-NLS-1$
-
- text = text.replaceAll("\\r|\\n|\\f|\\t", " "); //$NON-NLS-1$ //$NON-NLS-2$
- return text.replaceAll("\\s+", " "); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Constructs a feature parser.
- */
- public ProductFile(String location, String os) throws Exception {
- super();
- this.currentOS = os;
-
- parserFactory.setNamespaceAware(true);
- parser = parserFactory.newSAXParser();
- InputStream in = new BufferedInputStream(new FileInputStream(location));
- try {
- parser.parse(new InputSource(in), this);
- } finally {
- if (in != null)
- in.close();
- }
- }
-
- public List getPlugins() {
- return getPlugins(true);
- }
-
- public List getPlugins(boolean includeFragments) {
- List p = plugins != null ? plugins : Collections.EMPTY_LIST;
- if (!includeFragments)
- return p;
-
- List f = fragments != null ? fragments : Collections.EMPTY_LIST;
- int size = p.size() + f.size();
- if (size == 0)
- return Collections.EMPTY_LIST;
-
- List both = new ArrayList(size);
- both.addAll(p);
- both.addAll(f);
- return both;
- }
-
- public List getFeatures() {
- if (features == null)
- return Collections.EMPTY_LIST;
- return features;
- }
-
- public String getId() {
- if (uid != null)
- return uid;
- return id;
- }
-
- public String getProductId() {
- return id;
- }
-
- public String getProductName() {
- return productName;
- }
-
- public boolean useFeatures() {
- return useFeatures;
- }
-
- public String getVersion() {
- return (version == null || version.length() == 0) ? "0.0.0" : version; //$NON-NLS-1$
- }
-
- public String getLauncherName() {
- return launcherName;
- }
-
- public String getVMArguments(String os) {
- String key = null;
- if (os.equals(OS_WIN32)) {
- key = VM_ARGS_WIN;
- } else if (os.equals(OS_LINUX)) {
- key = VM_ARGS_LINUX;
- } else if (os.equals(OS_MACOSX)) {
- key = VM_ARGS_MAC;
- } else if (os.equals(OS_SOLARIS)) {
- key = VM_ARGS_SOLARIS;
- }
-
- String prefix = launcherArgs.getProperty(VM_ARGS);
- String platform = null, args = null;
- if (key != null)
- platform = launcherArgs.getProperty(key);
- if (prefix != null)
- args = platform != null ? prefix + " " + platform : prefix; //$NON-NLS-1$
- else
- args = platform != null ? platform : ""; //$NON-NLS-1$
- return normalize(args);
- }
-
- public String getProgramArguments(String os) {
- String key = null;
- if (os.equals(OS_WIN32)) {
- key = PROGRAM_ARGS_WIN;
- } else if (os.equals(OS_LINUX)) {
- key = PROGRAM_ARGS_LINUX;
- } else if (os.equals(OS_MACOSX)) {
- key = PROGRAM_ARGS_MAC;
- } else if (os.equals(OS_SOLARIS)) {
- key = PROGRAM_ARGS_SOLARIS;
- }
-
- String prefix = launcherArgs.getProperty(PROGRAM_ARGS);
- String platform = null, args = null;
- if (key != null)
- platform = launcherArgs.getProperty(key);
- if (prefix != null)
- args = platform != null ? prefix + " " + platform : prefix; //$NON-NLS-1$
- else
- args = platform != null ? platform : ""; //$NON-NLS-1$
- return normalize(args);
- }
-
- public void startElement(String uri, String localName, String qName, Attributes attributes) {
- switch (state) {
- case STATE_START :
- if (PRODUCT.equals(localName)) {
- processProduct(attributes);
- state = STATE_PRODUCT;
- }
- break;
-
- case STATE_PRODUCT :
- if (CONFIG_INI.equals(localName)) {
- processConfigIni(attributes);
- state = STATE_CONFIG_INI;
- } else if (LAUNCHER.equals(localName)) {
- processLauncher(attributes);
- state = STATE_LAUNCHER;
- } else if (PLUGINS.equals(localName)) {
- state = STATE_PLUGINS;
- } else if (FEATURES.equals(localName)) {
- state = STATE_FEATURES;
- } else if (LAUNCHER_ARGS.equals(localName)) {
- state = STATE_LAUNCHER_ARGS;
- }
- break;
-
- case STATE_CONFIG_INI :
- processConfigIniPlatform(localName, true);
- break;
-
- case STATE_LAUNCHER :
- if (OS_SOLARIS.equals(localName)) {
- processSolaris(attributes);
- } else if ("win".equals(localName)) { //$NON-NLS-1$
- processWin(attributes);
- } else if (OS_LINUX.equals(localName)) {
- processLinux(attributes);
- } else if (OS_MACOSX.equals(localName)) {
- processMac(attributes);
- }
- if ("ico".equals(localName)) { //$NON-NLS-1$
- processIco(attributes);
- } else if ("bmp".equals(localName)) { //$NON-NLS-1$
- processBmp(attributes);
- }
- break;
-
- case STATE_LAUNCHER_ARGS :
- if (PROGRAM_ARGS.equals(localName)) {
- state = STATE_PROGRAM_ARGS;
- } else if (PROGRAM_ARGS_LINUX.equals(localName)) {
- state = STATE_PROGRAM_ARGS_LINUX;
- } else if (PROGRAM_ARGS_MAC.equals(localName)) {
- state = STATE_PROGRAM_ARGS_MAC;
- } else if (PROGRAM_ARGS_SOLARIS.equals(localName)) {
- state = STATE_PROGRAM_ARGS_SOLARIS;
- } else if (PROGRAM_ARGS_WIN.equals(localName)) {
- state = STATE_PROGRAM_ARGS_WIN;
- } else if (VM_ARGS.equals(localName)) {
- state = STATE_VM_ARGS;
- } else if (VM_ARGS_LINUX.equals(localName)) {
- state = STATE_VM_ARGS_LINUX;
- } else if (VM_ARGS_MAC.equals(localName)) {
- state = STATE_VM_ARGS_MAC;
- } else if (VM_ARGS_SOLARIS.equals(localName)) {
- state = STATE_VM_ARGS_SOLARIS;
- } else if (VM_ARGS_WIN.equals(localName)) {
- state = STATE_VM_ARGS_WIN;
- }
- break;
-
- case STATE_PLUGINS :
- if ("plugin".equals(localName)) { //$NON-NLS-1$
- processPlugin(attributes);
- }
- break;
-
- case STATE_FEATURES :
- if ("feature".equals(localName)) { //$NON-NLS-1$
- processFeature(attributes);
- }
- break;
- }
- }
-
- public void endElement(String uri, String localName, String qName) {
- switch (state) {
- case STATE_PLUGINS :
- if (PLUGINS.equals(localName))
- state = STATE_PRODUCT;
- break;
- case STATE_FEATURES :
- if (FEATURES.equals(localName))
- state = STATE_PRODUCT;
- break;
- case STATE_LAUNCHER_ARGS :
- if (LAUNCHER_ARGS.equals(localName))
- state = STATE_PRODUCT;
- break;
- case STATE_LAUNCHER :
- if (LAUNCHER.equals(localName))
- state = STATE_PRODUCT;
- break;
-
- case STATE_PROGRAM_ARGS :
- case STATE_PROGRAM_ARGS_LINUX :
- case STATE_PROGRAM_ARGS_MAC :
- case STATE_PROGRAM_ARGS_SOLARIS :
- case STATE_PROGRAM_ARGS_WIN :
- case STATE_VM_ARGS :
- case STATE_VM_ARGS_LINUX :
- case STATE_VM_ARGS_MAC :
- case STATE_VM_ARGS_SOLARIS :
- case STATE_VM_ARGS_WIN :
- state = STATE_LAUNCHER_ARGS;
- break;
-
- case STATE_CONFIG_INI :
- if (CONFIG_INI.equals(localName))
- state = STATE_PRODUCT;
- else
- processConfigIniPlatform(localName, false);
- break;
- }
- }
-
- public void characters(char[] ch, int start, int length) {
- switch (state) {
- case STATE_PROGRAM_ARGS :
- addLaunchArgumentToMap(PROGRAM_ARGS, String.valueOf(ch, start, length));
- break;
- case STATE_PROGRAM_ARGS_LINUX :
- addLaunchArgumentToMap(PROGRAM_ARGS_LINUX, String.valueOf(ch, start, length));
- break;
- case STATE_PROGRAM_ARGS_MAC :
- addLaunchArgumentToMap(PROGRAM_ARGS_MAC, String.valueOf(ch, start, length));
- break;
- case STATE_PROGRAM_ARGS_SOLARIS :
- addLaunchArgumentToMap(PROGRAM_ARGS_SOLARIS, String.valueOf(ch, start, length));
- break;
- case STATE_PROGRAM_ARGS_WIN :
- addLaunchArgumentToMap(PROGRAM_ARGS_WIN, String.valueOf(ch, start, length));
- break;
- case STATE_VM_ARGS :
- addLaunchArgumentToMap(VM_ARGS, String.valueOf(ch, start, length));
- break;
- case STATE_VM_ARGS_LINUX :
- addLaunchArgumentToMap(VM_ARGS_LINUX, String.valueOf(ch, start, length));
- break;
- case STATE_VM_ARGS_MAC :
- addLaunchArgumentToMap(VM_ARGS_MAC, String.valueOf(ch, start, length));
- break;
- case STATE_VM_ARGS_SOLARIS :
- addLaunchArgumentToMap(VM_ARGS_SOLARIS, String.valueOf(ch, start, length));
- break;
- case STATE_VM_ARGS_WIN :
- addLaunchArgumentToMap(VM_ARGS_WIN, String.valueOf(ch, start, length));
- break;
- case STATE_CONFIG_INI :
- if (platformConfigPath != null)
- platformConfigPath += String.valueOf(ch, start, length);
- break;
- }
- }
-
- private void addLaunchArgumentToMap(String key, String value) {
- if (launcherArgs == null)
- launcherArgs = new Properties();
-
- String oldValue = launcherArgs.getProperty(key);
- if (oldValue != null)
- launcherArgs.setProperty(key, oldValue + value);
- else
- launcherArgs.setProperty(key, value);
- }
-
- private void processPlugin(Attributes attributes) {
- String fragment = attributes.getValue("fragment"); //$NON-NLS-1$
- if (fragment != null && new Boolean(fragment).booleanValue()) {
- if (fragments == null)
- fragments = new ArrayList();
- fragments.add(attributes.getValue("id")); //$NON-NLS-1$
- } else {
- if (plugins == null)
- plugins = new ArrayList();
- plugins.add(attributes.getValue("id")); //$NON-NLS-1$
- }
- }
-
- private void processFeature(Attributes attributes) {
- if (features == null)
- features = new ArrayList();
- features.add(attributes.getValue("id")); //$NON-NLS-1$
- }
-
- private void processProduct(Attributes attributes) {
- id = attributes.getValue("id"); //$NON-NLS-1$
- uid = attributes.getValue("uid"); //$NON-NLS-1$
- productName = attributes.getValue("name"); //$NON-NLS-1$
- String use = attributes.getValue("useFeatures"); //$NON-NLS-1$
- if (use != null)
- useFeatures = Boolean.valueOf(use).booleanValue();
- version = attributes.getValue("version"); //$NON-NLS-1$
- }
-
- private void processConfigIni(Attributes attributes) {
- String path = null;
- if ("custom".equals(attributes.getValue("use"))) { //$NON-NLS-1$//$NON-NLS-2$
- path = attributes.getValue("path"); //$NON-NLS-1$
- }
- String os = attributes.getValue("os"); //$NON-NLS-1$
- if (os != null && os.length() > 0) {
- // TODO should we allow a platform-specific default to over-ride a custom generic path?
- if (path != null)
- platformSpecificConfigPaths.put(os, path);
- } else if (path != null) {
- // configPath = path;
- }
- }
-
- private void processConfigIniPlatform(String key, boolean begin) {
- if (begin) {
- configPlatform = key;
- platformConfigPath = ""; //$NON-NLS-1$
- } else if (configPlatform.equals(key) && platformConfigPath.length() > 0) {
- platformSpecificConfigPaths.put(key, platformConfigPath);
- platformConfigPath = null;
- }
- }
-
- private void processLauncher(Attributes attributes) {
- launcherName = attributes.getValue("name"); //$NON-NLS-1$
- }
-
- private boolean osMatch(String os) {
- if (os == currentOS)
- return true;
- if (os == null)
- return false;
- return os.equals(currentOS);
- }
-
- private void processSolaris(Attributes attributes) {
- if (!osMatch(OS_SOLARIS))
- return;
- result.add(attributes.getValue(SOLARIS_LARGE));
- result.add(attributes.getValue(SOLARIS_MEDIUM));
- result.add(attributes.getValue(SOLARIS_SMALL));
- result.add(attributes.getValue(SOLARIS_TINY));
- }
-
- private void processWin(Attributes attributes) {
- if (!osMatch(OS_WIN32))
- return;
- useIco = Boolean.valueOf(attributes.getValue(P_USE_ICO)).booleanValue();
- }
-
- private void processIco(Attributes attributes) {
- if (!osMatch(OS_WIN32) || !useIco)
- return;
- result.add(attributes.getValue("path")); //$NON-NLS-1$
- }
-
- private void processBmp(Attributes attributes) {
- if (!osMatch(OS_WIN32) || useIco)
- return;
- result.add(attributes.getValue(WIN32_16_HIGH));
- result.add(attributes.getValue(WIN32_16_LOW));
- result.add(attributes.getValue(WIN32_24_LOW));
- result.add(attributes.getValue(WIN32_32_HIGH));
- result.add(attributes.getValue(WIN32_32_LOW));
- result.add(attributes.getValue(WIN32_48_HIGH));
- result.add(attributes.getValue(WIN32_48_LOW));
- }
-
- private void processLinux(Attributes attributes) {
- if (!osMatch(OS_LINUX))
- return;
- result.add(attributes.getValue("icon")); //$NON-NLS-1$
- }
-
- private void processMac(Attributes attributes) {
- if (!osMatch(OS_MACOSX))
- return;
- result.add(attributes.getValue("icon")); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteCategory.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteCategory.java
deleted file mode 100644
index 8acf12360..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteCategory.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator.features;
-
-import java.util.Map;
-
-/**
- * A category in an update site.
- *
- * Based on org.eclipse.update.core.model.CategoryModel.
- */
-public class SiteCategory {
-
- private String description;
- private String label;
- private String name;
- private Map localizations;
-
- /**
- * Creates an uninitialized model object.
- *
- * @since 2.0
- */
- public SiteCategory() {
- super();
- }
-
- /**
- * Compare two category models for equality.
- *
- * @see Object#equals(Object)
- * @since 2.0
- */
- public boolean equals(Object obj) {
- boolean result = false;
- if (obj instanceof SiteCategory) {
- SiteCategory otherCategory = (SiteCategory) obj;
- result = getName().equalsIgnoreCase(otherCategory.getName());
- }
- return result;
- }
-
- /**
- * Retrieve the detailed category description
- *
- * @return category description, or <code>null</code>.
- * @since 2.0
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * Retrieve the non-localized displayable label for the category.
- *
- * @return non-localized displayable label, or <code>null</code>.
- * @since 2.0
- */
- public String getLabel() {
- return label;
- }
-
- /**
- * Gets the localizations for the site as a map from locale
- * to the set of translated properties for that locale.
- *
- * @return a map from locale to property set
- * @since 3.4
- */
- public Map getLocalizations() {
- return this.localizations;
- }
-
- /**
- * Retrieve the name of the category.
- *
- * @return category name, or <code>null</code>.
- * @since 2.0
- */
- public String getName() {
- return name;
- }
-
- /**
- * Compute hash code for category model.
- *
- * @see Object#hashCode()
- * @since 2.0
- */
- public int hashCode() {
- return getName().hashCode();
- }
-
- /**
- * Sets the category description.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param description category description
- * @since 2.0
- */
- public void setDescription(String description) {
- this.description = description;
- }
-
- /**
- * Sets the category displayable label.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param label displayable label, or resource key
- * @since 2.0
- */
- public void setLabel(String label) {
- this.label = label;
- }
-
- /**
- * Sets the localizations for the site as a map from locale
- * to the set of translated properties for that locale.
- *
- * @param localizations as a map from locale to property set
- * @since 3.4
- */
- public void setLocalizations(Map localizations) {
- this.localizations = localizations;
- }
-
- /**
- * Sets the category name.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param name category name
- * @since 2.0
- */
- public void setName(String name) {
- this.name = name;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteFeature.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteFeature.java
deleted file mode 100644
index 589788197..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteFeature.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * James D Miles (IBM Corp.) - bug 191783, NullPointerException in FeatureDownloader
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator.features;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A reference to a feature in an update site.xml file.
- *
- * Based on org.eclipse.update.core.model.FeatureReferenceModel.
- */
-public class SiteFeature {
-
- // performance
- private URL base;
- private List /* of String*/categoryNames;
- private String featureId;
- private String featureVersion;
-
- private final boolean resolved = false;
- private URL url;
- private String urlString;
-
- /*
- * Compares two URL for equality
- * Return false if one of them is null
- */
- public static boolean sameURL(URL url1, URL url2) {
- if (url1 == url2)
- return true;
- if (url1 == null ^ url2 == null)
- return false;
-
- // check if URL are file: URL as we may
- // have 2 URL pointing to the same featureReference
- // but with different representation
- // (i.e. file:/C;/ and file:C:/)
- final boolean isFile1 = "file".equalsIgnoreCase(url1.getProtocol());//$NON-NLS-1$
- final boolean isFile2 = "file".equalsIgnoreCase(url2.getProtocol());//$NON-NLS-1$
- if (isFile1 && isFile2) {
- File file1 = new File(url1.getFile());
- File file2 = new File(url2.getFile());
- return file1.equals(file2);
- }
- // URL1 xor URL2 is a file, return false. (They either both need to be files, or neither)
- if (isFile1 ^ isFile2)
- return false;
- return getExternalForm(url1).equals(getExternalForm(url2));
- }
-
- /**
- * Gets the external form of this URL. In particular, it trims any white space,
- * removes a trailing slash and creates a lower case string.
- */
- private static String getExternalForm(URL url) {
- String externalForm = url.toExternalForm();
- if (externalForm == null)
- return ""; //$NON-NLS-1$
- externalForm = externalForm.trim();
- if (externalForm.endsWith("/")) { //$NON-NLS-1$
- // Remove the trailing slash
- externalForm = externalForm.substring(0, externalForm.length() - 1);
- }
- return externalForm.toLowerCase();
- }
-
- /**
- * Creates an uninitialized feature reference model object.
- */
- public SiteFeature() {
- super();
- }
-
- /**
- * Adds the name of a category this feature belongs to.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param categoryName category name
- */
- public void addCategoryName(String categoryName) {
- if (this.categoryNames == null)
- this.categoryNames = new ArrayList();
- if (!this.categoryNames.contains(categoryName))
- this.categoryNames.add(categoryName);
- }
-
- private void delayedResolve() {
-
- // PERF: delay resolution
- if (resolved)
- return;
-
- // resolve local elements
- try {
- url = new URL(base, urlString);
- } catch (MalformedURLException e) {
- // UpdateCore.warn("", e); //$NON-NLS-1$
- }
- }
-
- /**
- * Compares 2 feature reference models for equality
- *
- * @param object feature reference model to compare with
- * @return <code>true</code> if the two models are equal,
- * <code>false</code> otherwise
- */
- public boolean equals(Object object) {
- if (object == null)
- return false;
- if (!(object instanceof SiteFeature))
- return false;
- SiteFeature that = (SiteFeature) object;
- if (this.featureId == null) {
- if (that.featureId != null)
- return false;
- } else if (!this.featureId.equals(that.featureId))
- return false;
- if (this.featureVersion == null) {
- if (that.featureVersion != null)
- return false;
- } else if (!this.featureVersion.equals(that.featureVersion))
- return false;
- return sameURL(this.getURL(), that.getURL());
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + (featureId == null ? 0 : featureId.hashCode());
- result = prime * result + (featureVersion == null ? 0 : featureVersion.hashCode());
- if (this.getURL() == null)
- return result;
-
- if ("file".equalsIgnoreCase(getURL().getProtocol())) {//$NON-NLS-1$
- // If the URL is a file, then create the HashCode from the file
- File f = new File(getURL().getFile());
- if (f != null)
- result = prime * result + f.hashCode();
- } else
- // Otherwise create it from the External form of the URL (in lower case)
- result = prime * result + getExternalForm(this.getURL()).hashCode();
- return result;
- }
-
- /**
- * Returns the names of categories the referenced feature belongs to.
- *
- * @return an array of names, or an empty array.
- */
- public String[] getCategoryNames() {
- if (categoryNames == null)
- return new String[0];
-
- return (String[]) categoryNames.toArray(new String[0]);
- }
-
- /**
- * Returns the feature identifier as a string
- *
- * @return feature identifier
- */
- public String getFeatureIdentifier() {
- return featureId;
- }
-
- /**
- * Returns the feature version as a string
- *
- * @return feature version
- */
- public String getFeatureVersion() {
- return featureVersion;
- }
-
- /**
- * Returns the resolved URL for the feature reference.
- *
- * @return url string
- */
- public URL getURL() {
- delayedResolve();
- return url;
- }
-
- /**
- * Sets the feature identifier.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param featureId feature identifier
- */
- public void setFeatureIdentifier(String featureId) {
- this.featureId = featureId;
- }
-
- /**
- * Sets the feature version.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param featureVersion feature version
- */
- public void setFeatureVersion(String featureVersion) {
- this.featureVersion = featureVersion;
- }
-
- /**
- * Sets the unresolved URL for the feature reference.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param urlString unresolved URL string
- */
- public void setURLString(String urlString) {
- this.urlString = urlString;
- this.url = null;
- }
-
- /**
- * @see Object#toString()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append(getClass().toString() + " :"); //$NON-NLS-1$
- buffer.append(" at "); //$NON-NLS-1$
- if (url != null)
- buffer.append(url.toExternalForm());
- return buffer.toString();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteModel.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteModel.java
deleted file mode 100644
index 8b784ea3b..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteModel.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator.features;
-
-import java.util.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.URLEntry;
-
-/**
- * A model of an update site.
- *
- * Copied from org.eclipse.update.core.model.SiteModel.
- */
-public class SiteModel {
-
- private List /*of ArchiveReferenceModel*/archiveReferences;
- /**
- * Map of String (category id) -> SiteCategory
- */
- private Map categories;
- private URLEntry description;
- /**
- * Map of String (feature id) -> SiteFeature
- */
- private List features;
- private String mirrorsURLString;
- private URLEntry[] associateSites;
- private List messageKeys;
- private Map localizations;
-
- /**
- * Creates an uninitialized site model object.
- *
- * @since 2.0
- */
- public SiteModel() {
- super();
- }
-
- /**
- * Adds an archive reference model to site.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param archiveReference archive reference model
- * @since 2.0
- */
- public void addArchive(URLEntry archiveReference) {
- if (this.archiveReferences == null)
- this.archiveReferences = new ArrayList();
- if (!this.archiveReferences.contains(archiveReference))
- this.archiveReferences.add(archiveReference);
- }
-
- /**
- * Adds a category to the site.
- *
- * @param category category model
- */
- public void addCategory(SiteCategory category) {
- if (categories == null)
- categories = new HashMap();
- if (!categories.containsKey(category.getName())) {
- categories.put(category.getName(), category);
- if (localizations != null && !localizations.isEmpty())
- category.setLocalizations(localizations);
- }
- }
-
- /**
- * Adds a feature reference model to site.
- *
- * @param featureReference feature reference model
- */
- public void addFeature(SiteFeature featureReference) {
- if (this.features == null)
- this.features = new ArrayList();
- this.features.add(featureReference);
- }
-
- public URLEntry[] getAssociatedSites() {
- return associateSites;
- }
-
- /**
- * Returns the category with the given name.
- * @return the category with the given name, or <code>null</code>
- */
- public SiteCategory getCategory(String name) {
- return (SiteCategory) (categories == null ? null : categories.get(name));
- }
-
- /**
- * Returns the site description.
- *
- * @return site description, or <code>null</code>.
- */
- public URLEntry getDescription() {
- return description;
- }
-
- /**
- * Returns an array of feature reference models on this site.
- *
- * @return an array of feature reference models, or an empty array.
- */
- public SiteFeature[] getFeatures() {
- if (features == null || features.size() == 0)
- return new SiteFeature[0];
- return (SiteFeature[]) features.toArray(new SiteFeature[0]);
- }
-
- /**
- * Return the keys for translatable strings
- *
- * @return the list of keys for translatable strings; may be null
- * @since 3.4
- */
- public List getMessageKeys() {
- return messageKeys;
- }
-
- /**
- * Returns the URL from which the list of mirrors of this site can be retrieved.
- *
- * @since org.eclipse.equinox.p2.metadata.generator 1.0
- */
- public String getMirrorsURL() {
- return mirrorsURLString;
- }
-
- /**
- * Sets the site description.
- *
- * @param description site description
- * @since 2.0
- */
- public void setDescription(URLEntry description) {
- this.description = description;
- }
-
- /**
- * Sets the localizations for the site as a map from locale
- * to the set of translated properties for that locale.
- *
- * @param localizations as a map from locale to property set
- * @since 3.4
- */
- public void setLocalizations(Map localizations) {
- this.localizations = localizations;
- if (localizations != null && !localizations.isEmpty() && //
- categories != null && !categories.isEmpty()) {
- for (Iterator catIter = categories.entrySet().iterator(); catIter.hasNext();) {
- Map.Entry entry = (Map.Entry) catIter.next();
- SiteCategory category = (SiteCategory) entry.getValue();
- category.setLocalizations(localizations);
- }
- }
- }
-
- /**
- * Sets keys for translatable strings
- *
- * @param keys for translatable strings
- * @since 3.4
- */
- public void setMessageKeys(List keys) {
- this.messageKeys = keys;
- }
-
- /**
- * Sets the mirrors url. Mirror sites will then be obtained from this mirror url later.
- * This method is complementary to setMirrorsiteEntryModels(), and only one of these
- * methods should be called.
- *
- * @param mirrorsURL additional update site mirrors
- * @since 3.1
- */
- public void setMirrorsURLString(String mirrorsURL) {
- this.mirrorsURLString = mirrorsURL;
- }
-
- /**
- * Sets the associated sites for this update site.
- *
- * @param associateSites the associated sites
- */
- public void setAssociateSites(URLEntry[] associateSites) {
- this.associateSites = associateSites;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/messages.properties b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/messages.properties
deleted file mode 100644
index 78bd8ff21..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/messages.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# Install Update Core Properties File
-#
-
-DefaultFeatureParser_IdOrVersionInvalid= Error parsing feature stream. The unique identifier or the version is null or empty for the State: \"{2}\": unique identifier=\"{0}\" version=\"{1}\".
-DefaultSiteParser_NoSiteTag= Error parsing site stream. Unable to find root element \"site\" in the stream.
-DefaultSiteParser_WrongParsingStack= Internal Error parsing site stream. Unexpected Parsing Stack: \"{0}\"
-DefaultSiteParser_UnknownElement= Error parsing site stream. Unknown element \"{0}\" in parsing state \"{1}\". Check the validity of the XML file.
-DefaultSiteParser_UnknownStartState= Internal Error parsing site stream. Unknown start state \"{0}\".
-DefaultSiteParser_Missing= Error parsing site stream. The \"{0}\" tag of the element \"{1}\" is null or empty. Value is required.
-DefaultSiteParser_ParsingStackBackToInitialState= Internal Error parsing site stream. Parsing stack back to Initial State.
-DefaultSiteParser_ElementAlreadySet= Error parsing site stream. Element: \"{0}\" already set for the Site.
-DefaultSiteParser_UnknownEndState= Internal Error parsing site stream. Unknown end state \"{0}\".
-DefaultSiteParser_ErrorParsing= Error Parsing site stream. Error: \"{0}\"
-DefaultSiteParser_ErrorlineColumnMessage= Error Parsing site stream. Element \"{0}\" line: \"{1}\" column:\"{2}\". Error: \"{3}\".
-DefaultSiteParser_ErrorParsingSite= Error Parsing site stream.
-DefaultSiteParser_UnknownState= Unknown State \"{0}\".
-DefaultSiteParser_InvalidXMLStream= The XML stream is not a valid default \"site.xml\" file. The root tag is not site.
-DefaultSiteParser_mirrors = Error processing update site mirror.
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/messages.properties b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/messages.properties
deleted file mode 100644
index 348bc1ed8..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/messages.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-exception_errorConverting = An error occurred while generating manifest for {0}.
-exception_errorParsingUpdateSite = Error parsing update site: {0}.
-exception_stateAddition = An error has occurred while adding the bundle {0}.
-exception_sourceDirectoryInvalid = Source directory is invalid: {0}.
-exception_artifactRepoNotWritable = Artifact repository is not writable: {0}.
-exception_artifactRepoNotSpecified = An artifact repository was not specified.
-exception_metadataRepoNotWritable = Metadata repository not writable: {0}.
-exception_metadataRepoNotSpecified = A metadata repository location was not specified.
-exception_baseLocationNotSpecified = Eclipse base location not specified.
-exception_artifactRepoNoAppendDestroysInput = Not appending to artifact repository ({0}) will destroy input files.
-message_generatingMetadata = Generating metadata for {0}.
-message_generationCompleted = Generation completed with success [{0} seconds].
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/BundleDescriptionFactory.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/BundleDescriptionFactory.java
deleted file mode 100644
index 218c6fe6e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/BundleDescriptionFactory.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-
-import java.io.*;
-import java.util.*;
-import java.util.jar.JarFile;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.generator.Activator;
-import org.eclipse.equinox.internal.p2.metadata.generator.Messages;
-import org.eclipse.osgi.service.pluginconversion.PluginConversionException;
-import org.eclipse.osgi.service.pluginconversion.PluginConverter;
-import org.eclipse.osgi.service.resolver.*;
-import org.eclipse.osgi.util.ManifestElement;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleException;
-
-/**
- * @deprecated All of the function here has moved to BundlesAction static methods
- */
-public class BundleDescriptionFactory {
- static final String DIR = "dir"; //$NON-NLS-1$
- static final String JAR = "jar"; //$NON-NLS-1$
- private static final String FEATURE_FILENAME_DESCRIPTOR = "feature.xml"; //$NON-NLS-1$
- private static final String PLUGIN_FILENAME_DESCRIPTOR = "plugin.xml"; //$NON-NLS-1$
- private static final String FRAGMENT_FILENAME_DESCRIPTOR = "fragment.xml"; //$NON-NLS-1$
-
- static String BUNDLE_FILE_KEY = "eclipse.p2.bundle.format"; //$NON-NLS-1$
-
- // static final String DEFAULT_BUNDLE_LOCALIZATION = "plugin"; //$NON-NLS-1$
- // static final String PROPERTIES_FILE_EXTENSION = ".properties"; //$NON-NLS-1$
- // static final String MANIFEST_LOCALIZATIONS = "eclipse.p2.manifest.localizations"; //$NON-NLS-1$
- //
- // static final Locale DEFAULT_LOCALE = new Locale("df", "LT"); //$NON-NLS-1$//$NON-NLS-2$
- // static final Locale PSEUDO_LOCALE = new Locale("zz", "ZZ"); //$NON-NLS-1$//$NON-NLS-2$
-
- StateObjectFactory factory;
- State state;
-
- public BundleDescriptionFactory(StateObjectFactory factory, State state) {
- this.factory = factory;
- this.state = state;
- //TODO find a state and a factory when not provided
- }
-
- private PluginConverter acquirePluginConverter() {
- return (PluginConverter) ServiceHelper.getService(Activator.getContext(), PluginConverter.class.getName());
- }
-
- private Dictionary convertPluginManifest(File bundleLocation, boolean logConversionException) {
- PluginConverter converter;
- try {
- converter = acquirePluginConverter();
- if (converter == null) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Unable to aquire PluginConverter service during generation for: " + bundleLocation));
- return null;
- }
- return converter.convertManifest(bundleLocation, false, null, true, null);
- } catch (PluginConversionException convertException) {
- // only log the exception if we had a plugin.xml or fragment.xml and we failed conversion
- if (bundleLocation.getName().equals(FEATURE_FILENAME_DESCRIPTOR))
- return null;
- if (!new File(bundleLocation, PLUGIN_FILENAME_DESCRIPTOR).exists() && !new File(bundleLocation, FRAGMENT_FILENAME_DESCRIPTOR).exists())
- return null;
- if (logConversionException) {
- IStatus status = new Status(IStatus.WARNING, Activator.ID, 0, NLS.bind(Messages.exception_errorConverting, bundleLocation.getAbsolutePath()), convertException);
- LogHelper.log(status);
- }
- return null;
- }
- }
-
- public BundleDescription getBundleDescription(Dictionary enhancedManifest, File bundleLocation) {
- try {
- BundleDescription descriptor = factory.createBundleDescription(state, enhancedManifest, bundleLocation != null ? bundleLocation.getAbsolutePath() : null, 1); //TODO Do we need to have a real bundle id
- descriptor.setUserObject(enhancedManifest);
- return descriptor;
- } catch (BundleException e) {
- String message = NLS.bind(Messages.exception_stateAddition, bundleLocation == null ? null : bundleLocation.getAbsoluteFile());
- IStatus status = new Status(IStatus.WARNING, Activator.ID, message, e);
- LogHelper.log(status);
- return null;
- }
- }
-
- public BundleDescription getBundleDescription(File bundleLocation) {
- Dictionary manifest = loadManifest(bundleLocation);
- if (manifest == null)
- return null;
- return getBundleDescription(manifest, bundleLocation);
- }
-
- public BundleDescription getBundleDescription(InputStream manifestStream, File bundleLocation) {
- Hashtable entries = new Hashtable();
- try {
- ManifestElement.parseBundleManifest(manifestStream, entries);
- return getBundleDescription(entries, bundleLocation);
- } catch (IOException e) {
- String message = "An error occurred while reading the bundle description " + (bundleLocation == null ? "" : bundleLocation.getAbsolutePath() + '.'); //$NON-NLS-1$ //$NON-NLS-2$
- IStatus status = new Status(IStatus.ERROR, Activator.ID, message, e);
- LogHelper.log(status);
- } catch (BundleException e) {
- String message = "An error occurred while reading the bundle description " + (bundleLocation == null ? "" : bundleLocation.getAbsolutePath() + '.'); //$NON-NLS-1$ //$NON-NLS-2$
- IStatus status = new Status(IStatus.ERROR, Activator.ID, message, e);
- LogHelper.log(status);
- }
- return null;
- }
-
- public Dictionary loadManifest(File bundleLocation) {
- InputStream manifestStream = null;
- ZipFile jarFile = null;
- try {
- if ("jar".equalsIgnoreCase(new Path(bundleLocation.getName()).getFileExtension()) && bundleLocation.isFile()) { //$NON-NLS-1$
- jarFile = new ZipFile(bundleLocation, ZipFile.OPEN_READ);
- ZipEntry manifestEntry = jarFile.getEntry(JarFile.MANIFEST_NAME);
- if (manifestEntry != null) {
- manifestStream = jarFile.getInputStream(manifestEntry);
- }
- } else {
- File manifestFile = new File(bundleLocation, JarFile.MANIFEST_NAME);
- if (manifestFile.exists())
- manifestStream = new BufferedInputStream(new FileInputStream(manifestFile));
- }
- } catch (IOException e) {
- //ignore but log
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "An error occurred while loading the bundle manifest " + bundleLocation, e)); //$NON-NLS-1$
- }
-
- Dictionary manifest = null;
- if (manifestStream != null) {
- try {
- Map manifestMap = ManifestElement.parseBundleManifest(manifestStream, null);
- // TODO temporary hack. We are reading a Map but everyone wants a Dictionary so convert.
- // real answer is to have people expect a Map but that is a wider change.
- manifest = new Hashtable(manifestMap);
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "An error occurred while loading the bundle manifest " + bundleLocation, e)); //$NON-NLS-1$
- return null;
- } catch (BundleException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "An error occurred while loading the bundle manifest " + bundleLocation, e)); //$NON-NLS-1$
- return null;
- } finally {
- try {
- if (jarFile != null)
- jarFile.close();
- } catch (IOException e2) {
- //Ignore
- }
- }
- } else {
- manifest = convertPluginManifest(bundleLocation, true);
- }
-
- if (manifest == null)
- return null;
-
- //Deal with the pre-3.0 plug-in shape who have a default jar manifest.mf
- if (manifest.get(org.osgi.framework.Constants.BUNDLE_SYMBOLICNAME) == null)
- manifest = convertPluginManifest(bundleLocation, true);
-
- if (manifest == null)
- return null;
-
- manifest.put(BUNDLE_FILE_KEY, bundleLocation.isDirectory() ? DIR : JAR);
- return manifest;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/EclipseInstallGeneratorInfoProvider.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/EclipseInstallGeneratorInfoProvider.java
deleted file mode 100644
index 3b63dbf58..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/EclipseInstallGeneratorInfoProvider.java
+++ /dev/null
@@ -1,539 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.*;
-import java.util.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.generator.Activator;
-import org.eclipse.equinox.internal.p2.metadata.generator.Messages;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.*;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * @deprecated The function in this class has been refactored into more focused locations
- * such as IPublisherAction and IPublishingAdvice classes. See the individual method deprecations
- * for more information on where the code has moved.
- */
-public class EclipseInstallGeneratorInfoProvider implements IGeneratorInfo {
- private final static String FILTER_OBJECTCLASS = "(" + Constants.OBJECTCLASS + "=" + FrameworkAdmin.class.getName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- private final static String filterFwName = "(" + FrameworkAdmin.SERVICE_PROP_KEY_FW_NAME + "=Equinox)"; //$NON-NLS-1$ //$NON-NLS-2$
- //String filterFwVersion = "(" + FrameworkAdmin.SERVICE_PROP_KEY_FW_VERSION + "=" + props.getProperty("equinox.fw.version") + ")";
- private final static String filterLauncherName = "(" + FrameworkAdmin.SERVICE_PROP_KEY_LAUNCHER_NAME + "=Eclipse.exe)"; //$NON-NLS-1$ //$NON-NLS-2$
- //String filterLauncherVersion = "(" + FrameworkAdmin.SERVICE_PROP_KEY_LAUNCHER_VERSION + "=" + props.getProperty("equinox.launcher.version") + ")";
- private final static String frameworkAdminFillter = "(&" + FILTER_OBJECTCLASS + filterFwName + filterLauncherName + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- private static final String ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR = "org.eclipse.equinox.simpleconfigurator"; //$NON-NLS-1$
- private static final String ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL = "org.eclipse.equinox.simpleconfigurator.configUrl"; //$NON-NLS-1$
- private static final String ORG_ECLIPSE_EQUINOX_P2_RECONCILER_DROPINS = "org.eclipse.equinox.p2.reconciler.dropins"; //$NON-NLS-1$
-
- private String os;
-
- /**
- * Returns a default name for the executable.
- * @param providedOS The operating system to return the executable for. If null,
- * the operating system is determined from the current runtime environment.
- */
- public static String getDefaultExecutableName(String providedOS) {
- String theOS = providedOS;
- if (theOS == null) {
- EnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName());
- theOS = info.getOS();
- }
- if (theOS.equalsIgnoreCase("win32")) //$NON-NLS-1$
- return "eclipse.exe"; //$NON-NLS-1$
- if (theOS.equalsIgnoreCase("macosx")) //$NON-NLS-1$
- return "Eclipse.app"; //$NON-NLS-1$
- //FIXME Is this a reasonable default for all non-Windows platforms?
- return "eclipse"; //$NON-NLS-1$
- }
-
- private boolean addDefaultIUs = true;
-
- private boolean append = false;
- private IArtifactRepository artifactRepository;
- private File baseLocation;
- private File[] bundleLocations;
- private File configLocation;
- private ArrayList defaultIUs;
- private List otherIUs;
- private File executableLocation;
- private File featuresLocation;
- private String flavor;
- private ServiceTracker frameworkAdminTracker;
- private Manipulator manipulator;
- private IMetadataRepository metadataRepository;
- private boolean publishArtifactRepo = false;
- private boolean publishArtifacts = false;
- private String rootId;
- private String rootVersion;
- private String productFile = null;
- private String launcherConfig;
- private String versionAdvice;
-
- private URI siteLocation;
-
- private boolean reuseExistingPack200Files = false;
-
- public EclipseInstallGeneratorInfoProvider() {
- super();
- }
-
- public boolean addDefaultIUs() {
- return addDefaultIUs;
- }
-
- public boolean append() {
- return append;
- }
-
- /**
- * @deprecated moved to DefaultCUsAction
- */
- protected GeneratorBundleInfo createDefaultConfigurationBundleInfo() {
- GeneratorBundleInfo result = new GeneratorBundleInfo();
- result.setSymbolicName("defaultConfigure"); //$NON-NLS-1$
- result.setVersion("1.0.0"); //$NON-NLS-1$
- result.setStartLevel(4);
- // These should just be in the install section now
- // result.setSpecialConfigCommands("installBundle(bundle:${artifact});");
- return result;
- }
-
- /**
- * @deprecated moved to DefaultCUsAction
- */
- protected GeneratorBundleInfo createDefaultUnconfigurationBundleInfo() {
- GeneratorBundleInfo result = new GeneratorBundleInfo();
- result.setSymbolicName("defaultUnconfigure"); //$NON-NLS-1$
- result.setVersion("1.0.0"); //$NON-NLS-1$
- // These should just be in the uninstall section now
- // result.setSpecialConfigCommands("uninstallBundle(bundle:${artifact});");
- return result;
- }
-
- /**
- * Obtains the framework manipulator instance. Throws an exception
- * if it could not be created.
- * @deprecated see DataLoader
- */
- private void createFrameworkManipulator() {
- FrameworkAdmin admin = getFrameworkAdmin();
- if (admin == null)
- throw new RuntimeException("Framework admin service not found"); //$NON-NLS-1$
- manipulator = admin.getManipulator();
- if (manipulator == null)
- throw new RuntimeException("Framework manipulator not found"); //$NON-NLS-1$
- }
-
- /**
- * @deprecated moved to EquinoxLauncherData
- */
- public static GeneratorBundleInfo createLauncher() {
- GeneratorBundleInfo result = new GeneratorBundleInfo();
- result.setSymbolicName("org.eclipse.equinox.launcher"); //$NON-NLS-1$
- result.setVersion("0.0.0"); //$NON-NLS-1$
- //result.setSpecialConfigCommands("manipulator.addProgramArgument('-startup'); manipulator.addProgramArgument(artifact);");
- result.setSpecialConfigCommands("addProgramArg(programArg:-startup);addProgramArg(programArg:@artifact);"); //$NON-NLS-1$
- result.setSpecialUnconfigCommands("removeProgramArg(programArg:-startup);removeProgramArg(programArg:@artifact);"); //$NON-NLS-1$
- return result;
- }
-
- /**
- * @deprecated moved to EquinoxLauncherCUAction
- */
- private Collection createLauncherBundleInfo(Set ius) {
- Collection result = new HashSet();
- Collection launchers = getIUs(ius, "org.eclipse.equinox.launcher."); //$NON-NLS-1$
- if (launchers.size() > 0) {
- for (Iterator iterator = launchers.iterator(); iterator.hasNext();) {
- IInstallableUnit object = (IInstallableUnit) iterator.next();
- if (object.getId().endsWith(".source")) //$NON-NLS-1$
- continue;
- GeneratorBundleInfo temp = new GeneratorBundleInfo();
- temp.setSymbolicName(object.getId());
- temp.setVersion(object.getVersion().toString());
- temp.setSpecialConfigCommands("addProgramArg(programArg:--launcher.library);addProgramArg(programArg:@artifact);"); //$NON-NLS-1$
- temp.setSpecialUnconfigCommands("removeProgramArg(programArg:--launcher.library);removeProgramArg(programArg:@artifact);"); //$NON-NLS-1$
- result.add(temp);
- }
- } else if (launcherConfig != null) {
- String[] config = Generator.parseConfigSpec(launcherConfig);
- //we want ws.os.arch
- GeneratorBundleInfo temp = new GeneratorBundleInfo();
- temp.setSymbolicName("org.eclipse.equinox.launcher." + config[1] + '.' + config[0] + '.' + config[2]); //$NON-NLS-1$
- temp.setSpecialConfigCommands("addProgramArg(programArg:--launcher.library);addProgramArg(programArg:@artifact);"); //$NON-NLS-1$
- temp.setSpecialUnconfigCommands("removeProgramArg(programArg:--launcher.library);removeProgramArg(programArg:@artifact);"); //$NON-NLS-1$
- result.add(temp);
- }
- return result;
- }
-
- /**
- * @deprecated moved to EclipseInstallAction (perhaps it will be somewhere more general...)
- */
- private GeneratorBundleInfo createSimpleConfiguratorBundleInfo() {
- GeneratorBundleInfo result = new GeneratorBundleInfo();
- result.setSymbolicName(ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR);
- result.setVersion("0.0.0"); //$NON-NLS-1$
- result.setStartLevel(1);
- result.setMarkedAsStarted(true);
- return result;
- }
-
- /**
- * @deprecated moved to EclipseInstallAction (perhaps it will be somewhere more general...)
- */
- private GeneratorBundleInfo createDropinsReconcilerBundleInfo() {
- GeneratorBundleInfo result = new GeneratorBundleInfo();
- result.setSymbolicName(ORG_ECLIPSE_EQUINOX_P2_RECONCILER_DROPINS);
- result.setVersion("0.0.0"); //$NON-NLS-1$
- result.setMarkedAsStarted(true);
- result.setSpecialConfigCommands("mkdir(path:${installFolder}/dropins)"); //$NON-NLS-1$
- 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).openStream(), null);
- data.setBundles(bundleInfos);
- } catch (MalformedURLException e1) {
- // ignore
- } catch (IOException e1) {
- // ignore
- }
-
- try {
- data.setProperty(ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL, EquinoxManipulatorImpl.makeRelative(value, configLocation.toURL()));
- } catch (MalformedURLException e) {
- //ignore
- }
- }
-
- return data;
- }
-
- /**
- * @deprecated logic moved to EclipseInstallAction (and related actions)
- */
- public ArrayList getDefaultIUs(Set ius) {
- if (defaultIUs != null)
- return defaultIUs;
- defaultIUs = new ArrayList(5);
- if (addDefaultIUs) {
- defaultIUs.addAll(createLauncherBundleInfo(ius));
- defaultIUs.add(createLauncher());
- defaultIUs.add(createSimpleConfiguratorBundleInfo());
- defaultIUs.add(createDropinsReconcilerBundleInfo());
- // defaultIUs.add(createDefaultConfigurationBundleInfo());
- // defaultIUs.add(createDefaultUnconfigurationBundleInfo());
- }
- return defaultIUs;
- }
-
- // TODO: This is kind of ugly. It's purpose is to allow us to craft CUs that we know about and need for our build
- // We should try to replace this with something more generic prior to release
- /**
- * @deprecated this has been replaced with RootIUAdvice and related things
- */
- public Collection getOtherIUs() {
- if (otherIUs != null)
- return otherIUs;
- otherIUs = new ArrayList();
- otherIUs.add(createDropinsReconcilerBundleInfo());
- return otherIUs;
- }
-
- public File getExecutableLocation() {
- return executableLocation;
- }
-
- public File getFeaturesLocation() {
- return featuresLocation;
- }
-
- public String getFlavor() {
- //use 'tooling' as default flavor since we are not actively using flavors yet
- return flavor == null ? "tooling" : flavor; //$NON-NLS-1$
- }
-
- /**
- * @deprecated moved to DataLoader
- */
- private FrameworkAdmin getFrameworkAdmin() {
- if (frameworkAdminTracker == null) {
- try {
- Filter filter = Activator.getContext().createFilter(frameworkAdminFillter);
- frameworkAdminTracker = new ServiceTracker(Activator.getContext(), filter, null);
- frameworkAdminTracker.open();
- } catch (InvalidSyntaxException e) {
- // never happens
- e.printStackTrace();
- }
- }
-
- return (FrameworkAdmin) frameworkAdminTracker.getService();
- }
-
- private Collection getIUs(Set ius, String prefix) {
- Set result = new HashSet();
- for (Iterator iterator = ius.iterator(); iterator.hasNext();) {
- IInstallableUnit tmp = (IInstallableUnit) iterator.next();
- if (tmp.getId().startsWith(prefix))
- result.add(tmp);
- }
- return result;
- }
-
- public File getJRELocation() {
- //assume JRE is relative to install location
- if (executableLocation == null)
- return null;
- return new File(executableLocation.getParentFile(), "jre"); //$NON-NLS-1$
- }
-
- public String getLauncherConfig() {
- return launcherConfig;
- }
-
- public LauncherData getLauncherData() {
- return manipulator == null ? null : manipulator.getLauncherData();
- }
-
- public IMetadataRepository getMetadataRepository() {
- return metadataRepository;
- }
-
- public String getRootId() {
- return rootId;
- }
-
- public String getRootVersion() {
- if (rootVersion == null || rootVersion.length() == 0)
- return "0.0.0"; //$NON-NLS-1$
- return rootVersion;
- }
-
- public String getProductFile() {
- return productFile;
- }
-
- public URI getSiteLocation() {
- return siteLocation;
- }
-
- public void initialize(File base) {
- // if the various locations are set in self, use them. Otherwise compute defaults
- File[] bundles = bundleLocations == null ? new File[] {new File(base, "plugins")} : bundleLocations; //$NON-NLS-1$
- File features = featuresLocation == null ? new File(base, "features") : featuresLocation; //$NON-NLS-1$
- File executable = executableLocation == null ? new File(base, getDefaultExecutableName(os)) : executableLocation;
- File configuration = configLocation == null ? new File(base, "configuration") : configLocation; //$NON-NLS-1$
-
- initialize(base, configuration, executable, bundles, features);
- }
-
- public void initialize(File base, File config, File executable, File[] bundles, File features) {
- if (base == null || !base.exists())
- throw new RuntimeException(NLS.bind(Messages.exception_sourceDirectoryInvalid, base == null ? "null" : base.getAbsolutePath())); //$NON-NLS-1$
- this.baseLocation = base;
- if (config == null || config.exists())
- this.configLocation = config;
- if (executable == null || executable.exists())
- this.executableLocation = executable;
- if (bundles != null)
- bundleLocations = bundles;
- if (features != null)
- featuresLocation = features;
- expandBundleLocations();
-
- // if the config or exe are not set then we cannot be generating any data related to the config so
- // don't bother setting up the manipulator. In fact, the manipulator will likely be invalid without
- // these locations.
- if (configLocation == null || executableLocation == null)
- return;
-
- createFrameworkManipulator();
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwPersistentDataLocation(configLocation, true);
- launcherData.setLauncher(executableLocation);
- try {
- manipulator.load();
- } catch (IllegalStateException e2) {
- // TODO Auto-generated catch block
- e2.printStackTrace();
- } catch (FrameworkAdminRuntimeException e2) {
- // TODO Auto-generated catch block
- e2.printStackTrace();
- } catch (IOException e2) {
- // TODO Auto-generated catch block
- e2.printStackTrace();
- }
- }
-
- public boolean publishArtifactRepository() {
- return publishArtifactRepo;
- }
-
- public boolean publishArtifacts() {
- return publishArtifacts;
- }
-
- public boolean reuseExistingPack200Files() {
- return reuseExistingPack200Files;
- }
-
- public void reuseExistingPack200Files(boolean publishPack) {
- reuseExistingPack200Files = publishPack;
- }
-
- public void setAddDefaultIUs(boolean value) {
- addDefaultIUs = value;
- }
-
- public void setAppend(boolean value) {
- append = value;
- }
-
- public void setArtifactRepository(IArtifactRepository value) {
- artifactRepository = value;
- }
-
- public void setExecutableLocation(String value) {
- executableLocation = new File(value);
- }
-
- public void setFlavor(String value) {
- flavor = value;
- }
-
- public void setLauncherConfig(String value) {
- launcherConfig = value;
- }
-
- public void setMappingRules(String[][] value) {
- }
-
- public void setMetadataRepository(IMetadataRepository value) {
- metadataRepository = value;
- }
-
- public void setOS(String os) {
- this.os = os;
- }
-
- public void setPublishArtifactRepository(boolean value) {
- publishArtifactRepo = value;
- }
-
- public void setPublishArtifacts(boolean value) {
- publishArtifacts = value;
- }
-
- public void setRootId(String value) {
- rootId = value;
- }
-
- public void setRootVersion(String value) {
- rootVersion = value;
- }
-
- public void setProductFile(String file) {
- productFile = file;
- }
-
- /**
- * Sets the location of site.xml if applicable.
- */
- public void setSiteLocation(URI location) {
- this.siteLocation = location;
- }
-
- public String getVersionAdvice() {
- return versionAdvice;
- }
-
- public void setVersionAdvice(String advice) {
- this.versionAdvice = advice;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Feature.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Feature.java
deleted file mode 100644
index e27ff87dd..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Feature.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-
-import java.util.ArrayList;
-import java.util.Map;
-
-/**
- *
- * Feature information
- */
-public class Feature {
-
- private final String id;
- private final String version;
- private String label;
- private String pluginId;
- private boolean primary = false;
- private boolean exclusive = false;
- private String application;
-
- private URLEntry description;
- private URLEntry license;
- private URLEntry copyright;
-
- private String installHandler;
- private String installHandlerURL;
- private String installHandlerLibrary;
-
- private URLEntry updateSite;
- private ArrayList discoverySites;
-
- private ArrayList entries;
- private String providerName;
-
- private String location;
-
- private Map localizations;
-
- public Feature(String id, String version) {
- if (id == null)
- throw new IllegalArgumentException();
- this.id = id;
- this.version = version;
- }
-
- public void addDiscoverySite(String siteLabel, String url) {
- if (siteLabel == null && url == null)
- return;
-
- if (this.discoverySites == null)
- this.discoverySites = new ArrayList();
-
- URLEntry entry = new URLEntry(url, siteLabel);
- this.discoverySites.add(entry);
- }
-
- public void addEntry(FeatureEntry plugin) {
- if (entries == null)
- entries = new ArrayList();
- entries.add(plugin);
- }
-
- public String getApplication() {
- return application;
- }
-
- public String getCopyright() {
- if (copyright != null)
- return copyright.getAnnotation();
- return null;
- }
-
- public String getCopyrightURL() {
- if (copyright != null)
- return copyright.getURL();
- return null;
- }
-
- public String getDescription() {
- if (description != null)
- return description.getAnnotation();
- return null;
- }
-
- public String getDescriptionURL() {
- if (description != null)
- return description.getURL();
- return null;
- }
-
- public URLEntry[] getDiscoverySites() {
- if (discoverySites == null)
- return new URLEntry[0];
- return (URLEntry[]) discoverySites.toArray(new URLEntry[discoverySites.size()]);
- }
-
- public FeatureEntry[] getEntries() {
- if (entries == null)
- return new FeatureEntry[0];
- return (FeatureEntry[]) entries.toArray(new FeatureEntry[entries.size()]);
- }
-
- public String getId() {
- return id;
- }
-
- public String getInstallHandler() {
- return installHandler;
- }
-
- public String getInstallHandlerLibrary() {
- return installHandlerLibrary;
- }
-
- public String getInstallHandlerURL() {
- return installHandlerURL;
- }
-
- public String getLabel() {
- return label;
- }
-
- public String getLicense() {
- if (license != null)
- return license.getAnnotation();
- return null;
- }
-
- public String getLicenseURL() {
- if (license != null)
- return license.getURL();
- return null;
- }
-
- public Map getLocalizations() {
- return this.localizations;
- }
-
- public String getLocation() {
- return this.location;
- }
-
- public String getPlugin() {
- return pluginId;
- }
-
- public String getProviderName() {
- return providerName;
- }
-
- public URLEntry getUpdateSite() {
- return updateSite;
- }
-
- public String getVersion() {
- return version;
- }
-
- public boolean isExclusive() {
- return exclusive;
- }
-
- public boolean isPrimary() {
- return primary;
- }
-
- public void setApplication(String application) {
- this.application = application;
- }
-
- public void setCopyright(String copyright) {
- if (this.copyright == null)
- this.copyright = new URLEntry();
- this.copyright.setAnnotation(copyright);
- }
-
- public void setCopyrightURL(String copyrightURL) {
- if (this.copyright == null)
- this.copyright = new URLEntry();
- this.copyright.setURL(copyrightURL);
- }
-
- public void setDescription(String description) {
- if (this.description == null)
- this.description = new URLEntry();
- this.description.setAnnotation(description);
- }
-
- public void setDescriptionURL(String descriptionURL) {
- if (this.description == null)
- this.description = new URLEntry();
- this.description.setURL(descriptionURL);
- }
-
- public void setExclusive(boolean exclusive) {
- this.exclusive = exclusive;
- }
-
- public void setInstallHandler(String installHandler) {
- this.installHandler = installHandler;
- }
-
- public void setInstallHandlerLibrary(String installHandlerLibrary) {
- this.installHandlerLibrary = installHandlerLibrary;
- }
-
- public void setInstallHandlerURL(String installHandlerURL) {
- this.installHandlerURL = installHandlerURL;
- }
-
- public void setLabel(String label) {
- this.label = label;
- }
-
- public void setLicense(String license) {
- if (this.license == null)
- this.license = new URLEntry();
- this.license.setAnnotation(license);
- }
-
- public void setLicenseURL(String licenseURL) {
- if (this.license == null)
- this.license = new URLEntry();
- this.license.setURL(licenseURL);
- }
-
- public void setLocalizations(Map localizations) {
- this.localizations = localizations;
- }
-
- public void setLocation(String location) {
- this.location = location;
- }
-
- public void setPlugin(String pluginId) {
- this.pluginId = pluginId;
- }
-
- public void setPrimary(boolean primary) {
- this.primary = primary;
- }
-
- public void setProviderName(String value) {
- providerName = value;
- }
-
- public void setUpdateSiteLabel(String updateSiteLabel) {
- if (this.updateSite == null)
- this.updateSite = new URLEntry();
- this.updateSite.setAnnotation(updateSiteLabel);
- }
-
- public void setUpdateSiteURL(String updateSiteURL) {
- if (this.updateSite == null)
- this.updateSite = new URLEntry();
- this.updateSite.setURL(updateSiteURL);
- }
-
- public void setURL(String value) {
- //
- }
-
- /**
- * For debugging purposes only.
- */
- public String toString() {
- return "Feature " + id + " version: " + version; //$NON-NLS-1$ //$NON-NLS-2$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/FeatureEntry.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/FeatureEntry.java
deleted file mode 100644
index 870a3b6f2..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/FeatureEntry.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-
-import org.eclipse.equinox.p2.metadata.Version;
-
-/**
- */
-public class FeatureEntry {
- private final String id;
- private final String version;
- private String os;
- private String ws;
- private String arch;
- private String nl;
- private String match;
- private final boolean isPlugin;
- private boolean isFragment = false;
- private boolean isRequires = false;
- private boolean unpack = true;
- private boolean optional = false;
- private boolean isPatch = false;
-
- /**
- * Temporary field to add provisioning filters to features
- */
- private String filter;
-
- public static FeatureEntry createRequires(String id, String version, String match, String filter, boolean isPlugin) {
- FeatureEntry result = new FeatureEntry(id, version, isPlugin);
- result.match = match;
- result.isRequires = true;
- if (filter != null)
- result.setFilter(filter);
- return result;
- }
-
- public FeatureEntry(String id, String version, boolean isPlugin) {
- this.id = id;
- this.version = Version.parseVersion(version).toString();
- this.isPlugin = isPlugin;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- final FeatureEntry other = (FeatureEntry) obj;
- if (id == null) {
- if (other.id != null)
- return false;
- } else if (!id.equals(other.id))
- return false;
- if (version == null) {
- if (other.version != null)
- return false;
- } else if (!version.equals(other.version))
- return false;
- return true;
- }
-
- public String getArch() {
- return arch;
- }
-
- /**
- * Temporary method to add provisioning filters to features
- */
- public String getFilter() {
- return filter;
- }
-
- public String getId() {
- return id;
- }
-
- public String getMatch() {
- return match;
- }
-
- public String getNL() {
- return nl;
- }
-
- public String getOS() {
- return os;
- }
-
- public String getVersion() {
- return version;
- }
-
- public String getWS() {
- return ws;
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((id == null) ? 0 : id.hashCode());
- result = prime * result + ((version == null) ? 0 : version.hashCode());
- return result;
- }
-
- public boolean isFragment() {
- return isFragment;
- }
-
- public boolean isOptional() {
- return optional;
- }
-
- public boolean isPlugin() {
- return isPlugin;
- }
-
- public boolean isRequires() {
- return isRequires;
- }
-
- public boolean isUnpack() {
- return unpack;
- }
-
- public void setEnvironment(String os, String ws, String arch, String nl) {
- this.os = os;
- this.ws = ws;
- this.arch = arch;
- this.nl = nl;
- }
-
- /**
- * Temporary method to add provisioning filters to features
- */
- public void setFilter(String filter) {
- this.filter = filter;
-
- }
-
- public void setFragment(boolean value) {
- isFragment = value;
- }
-
- public void setOptional(boolean value) {
- optional = value;
- }
-
- public void setUnpack(boolean value) {
- unpack = value;
- }
-
- public String toString() {
- StringBuffer result = new StringBuffer();
-
- result.append(isPlugin ? "Plugin: " : "Feature: "); //$NON-NLS-1$ //$NON-NLS-2$
- result.append(id != null ? id.toString() : ""); //$NON-NLS-1$
- result.append(version != null ? " " + version.toString() : ""); //$NON-NLS-1$ //$NON-NLS-2$
- return result.toString();
- }
-
- public boolean isPatch() {
- return isPatch;
- }
-
- public void setPatch(boolean patch) {
- this.isPatch = patch;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java
deleted file mode 100644
index f40635685..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java
+++ /dev/null
@@ -1,1402 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxConstants;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.metadata.generator.*;
-import org.eclipse.equinox.internal.p2.metadata.generator.Messages;
-import org.eclipse.equinox.internal.p2.metadata.generator.features.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.spi.RepositoryReference;
-import org.eclipse.osgi.service.environment.Constants;
-import org.eclipse.osgi.service.resolver.*;
-import org.eclipse.osgi.util.NLS;
-
-public class Generator {
- /**
- * Captures the output of an execution of the generator.
- */
- public static class GeneratorResult {
- public static final String CONFIGURATION_CUS = "CONFIGURATION_CUS"; //$NON-NLS-1$
-
- final public Map pluginShape = new HashMap();
-
- /**
- * The set of generated IUs that will be children of the root IU
- */
- final public Set rootIUs = new HashSet();
- /**
- * The set of generated IUs that will not be children of the root IU
- */
- final public Set nonRootIUs = new HashSet();
-
- /**
- * Map of symbolic name to a set of generated CUs for that IU
- */
- final public Map configurationIUs = new HashMap();
-
- /**
- * Map launcherConfig to config.ini ConfigData
- */
- final public Map configData = new HashMap();
-
- /**
- * Returns all IUs generated during this execution of the generator.
- */
- public Set allGeneratedIUs() {
- HashSet all = new HashSet();
- all.addAll(rootIUs);
- all.addAll(nonRootIUs);
- return all;
- }
-
- /**
- * Returns the IU in this result with the given id.
- */
- public IInstallableUnit getInstallableUnit(String id) {
- for (Iterator iterator = rootIUs.iterator(); iterator.hasNext();) {
- IInstallableUnit tmp = (IInstallableUnit) iterator.next();
- if (tmp.getId().equals(id))
- return tmp;
- }
- for (Iterator iterator = nonRootIUs.iterator(); iterator.hasNext();) {
- IInstallableUnit tmp = (IInstallableUnit) iterator.next();
- if (tmp.getId().equals(id))
- return tmp;
- }
- return null;
-
- }
-
- public Map getPluginShapeInfo() {
- return pluginShape;
- }
- }
-
- private static final String ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR = "org.eclipse.equinox.simpleconfigurator"; //$NON-NLS-1$
- private static final String ORG_ECLIPSE_UPDATE_CONFIGURATOR = "org.eclipse.update.configurator"; //$NON-NLS-1$
- private static final String ORG_ECLIPSE_EQUINOX_LAUNCHER = "org.eclipse.equinox.launcher"; //$NON-NLS-1$
-
- private static final String PRODUCT_CONFIG_SUFFIX = ".config"; //$NON-NLS-1$
- private static final String PRODUCT_INI_SUFFIX = ".ini"; //$NON-NLS-1$
- private static final String PRODUCT_LAUCHER_SUFFIX = ".launcher"; //$NON-NLS-1$
- private static final String CONFIG_ANY = "ANY"; //$NON-NLS-1$
-
- private static final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
-
- protected final IGeneratorInfo info;
-
- private GeneratorResult incrementalResult = null;
- private ProductFile productFile = null;
- private boolean generateRootIU = true;
-
- /**
- * Short term fix to ensure IUs that have no corresponding category are not lost.
- * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=211521.
- */
- protected final Set rootCategory = new HashSet();
-
- private StateObjectFactory stateObjectFactory;
-
- /**
- * Convert a list of tokens into an array. The list separator has to be
- * specified.
- */
- public static String[] getArrayFromString(String list, String separator) {
- if (list == null || list.trim().equals("")) //$NON-NLS-1$
- return new String[0];
- List result = new ArrayList();
- for (StringTokenizer tokens = new StringTokenizer(list, separator); tokens.hasMoreTokens();) {
- String token = tokens.nextToken().trim();
- if (!token.equals("")) //$NON-NLS-1$
- result.add(token);
- }
- return (String[]) result.toArray(new String[result.size()]);
- }
-
- public static String[] parseConfigSpec(String config) {
- String[] parsed = getArrayFromString(config, "_"); //$NON-NLS-1$
- for (int i = 0; i < parsed.length; i++) {
- if (parsed[i].equals("*")) //$NON-NLS-1$
- parsed[i] = "ANY"; //$NON-NLS-1$
- }
- if (parsed.length > 3) {
- String[] adjusted = new String[] {parsed[0], parsed[1], parsed[2] + '_' + parsed[3]};
- return adjusted;
- }
- return parsed;
- }
-
- public Generator(IGeneratorInfo infoProvider) {
- this.info = infoProvider;
- // TODO need to figure a better way of configuring the generator...
- PlatformAdmin platformAdmin = (PlatformAdmin) ServiceHelper.getService(Activator.getContext(), PlatformAdmin.class.getName());
- if (platformAdmin != null) {
- stateObjectFactory = platformAdmin.getFactory();
- }
- }
-
- public void setIncrementalResult(GeneratorResult result) {
- this.incrementalResult = result;
- }
-
- private String getProductVersion() {
- String version = "1.0.0"; //$NON-NLS-1$
- if (productFile != null && !productFile.getVersion().equals("0.0.0")) //$NON-NLS-1$
- version = productFile.getVersion();
- else if (!info.getRootVersion().equals("0.0.0")) //$NON-NLS-1$
- version = info.getRootVersion();
- return version;
- }
-
- /**
- * @deprecated moved to ProductAction
- */
- protected IInstallableUnit createProductIU(GeneratorResult result) {
- generateProductConfigCUs(result);
-
- GeneratorResult productContents = new GeneratorResult();
-
- ProductQuery productQuery = new ProductQuery(productFile, info.getFlavor(), result.configurationIUs, info.getVersionAdvice());
- IQuery query = QueryUtil.createLatestQuery(productQuery);
- IQueryResult queryResult = info.getMetadataRepository().query(query, null);
- for (Iterator iterator = queryResult.iterator(); iterator.hasNext();) {
- productContents.rootIUs.add(iterator.next());
- }
-
- String version = getProductVersion();
- VersionRange range = new VersionRange(Version.create(version), true, Version.create(version), true);
- ArrayList requires = new ArrayList(1);
- requires.add(MetadataFactory.createRequirement(info.getFlavor() + productFile.getId(), productFile.getId() + PRODUCT_LAUCHER_SUFFIX, range, null, false, true));
- requires.add(MetadataFactory.createRequirement(info.getFlavor() + productFile.getId(), productFile.getId() + PRODUCT_INI_SUFFIX, range, null, false, false));
- requires.add(MetadataFactory.createRequirement(info.getFlavor() + productFile.getId(), productFile.getId() + PRODUCT_CONFIG_SUFFIX, range, null, false, false));
-
- //default CUs
- requires.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, MetadataGeneratorHelper.createDefaultConfigUnitId(MetadataGeneratorHelper.OSGI_BUNDLE_CLASSIFIER, info.getFlavor()), VersionRange.emptyRange, null, false, false));
- requires.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, MetadataGeneratorHelper.createDefaultConfigUnitId("source", info.getFlavor()), VersionRange.emptyRange, null, false, false)); //$NON-NLS-1$
- if (productFile.useFeatures())
- requires.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, MetadataGeneratorHelper.createDefaultConfigUnitId(MetadataGeneratorHelper.ECLIPSE_FEATURE_CLASSIFIER, info.getFlavor()), VersionRange.emptyRange, MetadataGeneratorHelper.INSTALL_FEATURES_FILTER, true, false));
-
- InstallableUnitDescription root = createTopLevelIUDescription(productContents, productFile.getId(), version, productFile.getProductName(), requires, false);
- return MetadataFactory.createInstallableUnit(root);
- }
-
- /**
- * @deprecated moved to RootIUAction
- */
- protected IInstallableUnit createTopLevelIU(GeneratorResult result, String configurationIdentification, String configurationVersion) {
- // TODO, bit of a hack but for now set the name of the IU to the ID.
- InstallableUnitDescription root = createTopLevelIUDescription(result, configurationIdentification, configurationVersion, configurationIdentification, null, true);
- return MetadataFactory.createInstallableUnit(root);
- }
-
- /**
- * @deprecated moved to RootIUAction
- */
- protected InstallableUnitDescription createTopLevelIUDescription(GeneratorResult result, String configurationIdentification, String configurationVersion, String configurationName, List requires, boolean configureLauncherData) {
- InstallableUnitDescription root = new MetadataFactory.InstallableUnitDescription();
- root.setSingleton(true);
- root.setId(configurationIdentification);
- root.setVersion(Version.create(configurationVersion));
- root.setProperty(IInstallableUnit.PROP_NAME, configurationName);
-
- ArrayList reqsConfigurationUnits = new ArrayList(result.rootIUs.size());
- for (Iterator iterator = result.rootIUs.iterator(); iterator.hasNext();) {
- IInstallableUnit iu = (IInstallableUnit) iterator.next();
- VersionRange range = new VersionRange(iu.getVersion(), true, iu.getVersion(), true);
- // boolean isOptional = checkOptionalRootDependency(iu);
- reqsConfigurationUnits.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, iu.getFilter(), false, false));
- }
- if (requires != null)
- reqsConfigurationUnits.addAll(requires);
- root.setRequirements((IRequirement[]) reqsConfigurationUnits.toArray(new IRequirement[reqsConfigurationUnits.size()]));
- root.setArtifacts(new IArtifactKey[0]);
-
- root.setProperty("lineUp", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- root.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(configurationIdentification, VersionRange.emptyRange, IUpdateDescriptor.NORMAL, null));
- root.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString());
- root.setCapabilities(new IProvidedCapability[] {MetadataGeneratorHelper.createSelfCapability(configurationIdentification, Version.create(configurationVersion))});
- root.setTouchpointType(MetadataGeneratorHelper.TOUCHPOINT_OSGI);
- Map touchpointData = new HashMap();
-
- // Publisher refactor - the configdata stuff moved to a distinct IU added by the ConfigCUsAction
- String configurationData = ""; //$NON-NLS-1$
- String unconfigurationData = ""; //$NON-NLS-1$
-
- ConfigData configData = info.getConfigData();
- if (configData != null) {
- String[] dataStrings = getConfigurationStrings(configData);
- configurationData += dataStrings[0];
- unconfigurationData += dataStrings[1];
- }
-
- if (configureLauncherData) {
- LauncherData launcherData = info.getLauncherData();
- if (launcherData != null) {
- String[] dataStrings = getLauncherConfigStrings(launcherData.getJvmArgs(), launcherData.getProgramArgs());
- configurationData += dataStrings[0];
- unconfigurationData += dataStrings[1];
- }
- }
- touchpointData.put("configure", configurationData); //$NON-NLS-1$
- touchpointData.put("unconfigure", unconfigurationData); //$NON-NLS-1$
- //look for additional touchpoint instructions in a p2.inf file
- final String productFileLocation = info.getProductFile();
- if (productFileLocation != null) {
- File productFilePath = new File(productFileLocation);
- if (productFilePath.exists()) {
- Map advice = MetadataGeneratorHelper.getBundleAdvice(productFilePath.getParent(), "p2.inf");//$NON-NLS-1$
- if (advice != null)
- MetadataGeneratorHelper.mergeInstructionsAdvice(touchpointData, advice);
- }
- }
-
- root.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- return root;
- }
-
- /**
- * @deprecated moved to ConfigCUsAction
- */
- private String[] getConfigurationStrings(ConfigData configData) {
- String configurationData = ""; //$NON-NLS-1$
- String unconfigurationData = ""; //$NON-NLS-1$
- for (Iterator iterator = configData.getProperties().entrySet().iterator(); iterator.hasNext();) {
- Entry aProperty = (Entry) iterator.next();
- String key = ((String) aProperty.getKey());
- if (key.equals("osgi.frameworkClassPath") || key.equals("osgi.framework") || key.equals("osgi.bundles") || key.equals("eof")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- continue;
- configurationData += "setProgramProperty(propName:" + key + ", propValue:" + ((String) aProperty.getValue()) + ");"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- unconfigurationData += "setProgramProperty(propName:" + key + ", propValue:);"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- for (Iterator iterator = configData.getProperties().entrySet().iterator(); iterator.hasNext();) {
- Entry aProperty = (Entry) iterator.next();
- String key = ((String) aProperty.getKey());
- if (key.equals("osgi.frameworkClassPath") || key.equals("osgi.framework") || key.equals("osgi.bundles") || key.equals("eof")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- continue;
- configurationData += "setProgramProperty(propName:" + key + ", propValue:" + ((String) aProperty.getValue()) + ");"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- unconfigurationData += "setProgramProperty(propName:" + key + ", propValue:);"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- return new String[] {configurationData, unconfigurationData};
- }
-
- /**
- * @deprecated moved to ConfigCUsAction
- */
- private String[] getLauncherConfigStrings(final String[] jvmArgs, final String[] programArgs) {
- String configurationData = ""; //$NON-NLS-1$
- String unconfigurationData = ""; //$NON-NLS-1$
-
- for (int i = 0; i < jvmArgs.length; i++) {
- configurationData += "addJvmArg(jvmArg:" + jvmArgs[i] + ");"; //$NON-NLS-1$ //$NON-NLS-2$
- unconfigurationData += "removeJvmArg(jvmArg:" + jvmArgs[i] + ");"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- for (int i = 0; i < programArgs.length; i++) {
- String programArg = programArgs[i];
- if (programArg.equals("--launcher.library") || programArg.equals("-startup") || programArg.equals("-configuration")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- i++;
- configurationData += "addProgramArg(programArg:" + programArg + ");"; //$NON-NLS-1$ //$NON-NLS-2$
- unconfigurationData += "removeProgramArg(programArg:" + programArg + ");"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- return new String[] {configurationData, unconfigurationData};
- }
-
- public IStatus generate() {
- GeneratorResult result = incrementalResult != null ? incrementalResult : new GeneratorResult();
-
- if (info.getProductFile() != null) {
- try {
- productFile = new ProductFile(info.getProductFile(), null);
- } catch (Exception e) {
- //TODO
- }
- }
-
- Feature[] features = getFeatures(info.getFeaturesLocation());
- generateFeatureIUs(features, result, info.getArtifactRepository());
-
- BundleDescription[] bundles = getBundleDescriptions(info.getBundleLocations());
- generateBundleIUs(bundles, result, info.getArtifactRepository());
-
- generateNativeIUs(info.getExecutableLocation(), result, info.getArtifactRepository());
-
- generateConfigIUs(result);
-
- if (info.addDefaultIUs())
- generateDefaultConfigIU(result.rootIUs);
-
- if (generateRootIU)
- generateRootIU(result, info.getRootId(), info.getRootVersion());
-
- // persistence.setMappingRules(info.getMappingRules() == null ? defaultMappingRules : info.getMappingRules());
- // if (info.publishArtifacts() || info.publishArtifactRepository()) {
- // persistence.saveArtifactRepository();
- // }
- IMetadataRepository metadataRepository = info.getMetadataRepository();
- if (metadataRepository != null) {
- Set allGeneratedUnits = result.allGeneratedIUs();
- metadataRepository.addInstallableUnits(allGeneratedUnits);
- }
-
- return Status.OK_STATUS;
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- protected void generateBundleIUs(BundleDescription[] bundles, GeneratorResult result, IArtifactRepository destination) {
- // Computing the path for localized property files in a NL fragment bundle
- // requires the BUNDLE_LOCALIZATION property from the manifest of the host bundle,
- // so a first pass is done over all the bundles to cache this value as well as the tags
- // from the manifest for the localizable properties.
- final int CACHE_PHASE = 0;
- final int GENERATE_PHASE = 1;
- Map bundleLocalizationMap = new HashMap(bundles.length);
- Set localizationIUs = new HashSet(32);
- for (int phase = CACHE_PHASE; phase <= GENERATE_PHASE; phase++) {
- for (int i = 0; i < bundles.length; i++) {
- BundleDescription bd = bundles[i];
- // A bundle may be null if the associated plug-in does not have a manifest file -
- // for example, org.eclipse.jdt.launching.j9
- if (bd != null && bd.getSymbolicName() != null && bd.getVersion() != null) {
- Map bundleManifest = (Map) bd.getUserObject();
-
- if (phase == CACHE_PHASE) {
- if (bundleManifest != null) {
- String[] cachedValues = MetadataGeneratorHelper.getManifestCachedValues(bundleManifest);
- bundleLocalizationMap.put(makeSimpleKey(bd), cachedValues);
- }
- } else {
- String format = (String) result.getPluginShapeInfo().get(bd.getSymbolicName() + '_' + bd.getVersion());
- if (format == null)
- format = (String) bundleManifest.get(BundleDescriptionFactory.BUNDLE_FILE_KEY);
- boolean isDir = (format != null && format.equals(BundleDescriptionFactory.DIR) ? true : false);
-
- IArtifactKey key = new ArtifactKey(MetadataGeneratorHelper.OSGI_BUNDLE_CLASSIFIER, bd.getSymbolicName(), Version.create(bd.getVersion().toString()));
- IArtifactDescriptor ad = MetadataGeneratorHelper.createArtifactDescriptor(key, new File(bd.getLocation()), true, false);
- ((ArtifactDescriptor) ad).setProperty(IArtifactDescriptor.DOWNLOAD_CONTENTTYPE, IArtifactDescriptor.TYPE_ZIP);
- File bundleFile = new File(bd.getLocation());
- if (bundleFile.isDirectory())
- publishArtifact(ad, bundleFile.listFiles(), destination, false, bundleFile);
- else
- publishArtifact(ad, new File[] {bundleFile}, destination, true);
- if (info.reuseExistingPack200Files() && !info.publishArtifacts()) {
- File packFile = new Path(bd.getLocation()).addFileExtension("pack.gz").toFile(); //$NON-NLS-1$
- if (packFile.exists()) {
- IArtifactDescriptor ad200 = MetadataGeneratorHelper.createPack200ArtifactDescriptor(key, packFile, ad.getProperty(IArtifactDescriptor.ARTIFACT_SIZE));
- publishArtifact(ad200, new File[] {packFile}, destination, true);
- }
- }
-
- IInstallableUnit bundleIU = MetadataGeneratorHelper.createBundleIU(bd, bundleManifest, isDir, key, true);
-
- if (isFragment(bd)) {
- // TODO: Can NL fragments be multi-host? What special handling
- // is required for multi-host fragments in general?
- String hostId = bd.getHost().getName();
- String hostKey = makeSimpleKey(hostId);
- String[] cachedValues = (String[]) bundleLocalizationMap.get(hostKey);
-
- if (cachedValues != null) {
- MetadataGeneratorHelper.createHostLocalizationFragment(bundleIU, bd, hostId, cachedValues, localizationIUs);
- }
- }
-
- result.rootIUs.add(bundleIU);
- result.nonRootIUs.addAll(localizationIUs);
- localizationIUs.clear();
- }
- }
- }
- }
- }
-
- private static boolean isFragment(BundleDescription bd) {
- return (bd.getHost() != null ? true : false);
- }
-
- private static String makeSimpleKey(BundleDescription bd) {
- // TODO: can't use the bundle version in the key for the BundleLocalization
- // property map since the host specification for a fragment has a
- // version range, not a version. Hence, this mechanism for finding
- // manifest localization property files may break under changes
- // to the BundleLocalization property of a bundle.
- return makeSimpleKey(bd.getSymbolicName() /*, bd.getVersion() */);
- }
-
- private static String makeSimpleKey(String id /*, Version version */) {
- return id; // + '_' + version.toString();
- }
-
- /**
- * Generates IUs corresponding to update site categories.
- * @param categoriesToFeatures Map of SiteCategory ->Set (Feature IUs in that category).
- * @param result The generator result being built
- * @deprecated moved to SiteXMLAction
- */
- protected void generateCategoryIUs(Map categoriesToFeatures, GeneratorResult result) {
- for (Iterator it = categoriesToFeatures.keySet().iterator(); it.hasNext();) {
- SiteCategory category = (SiteCategory) it.next();
- result.nonRootIUs.add(MetadataGeneratorHelper.createCategoryIU(category, (Set) categoriesToFeatures.get(category), null));
- }
- }
-
- /**
- * @deprecated moved to ConfigCUsAction
- */
- private void storeConfigData(GeneratorResult result) {
- if (result.configData.containsKey(info.getLauncherConfig()))
- return; //been here, done this
-
- LauncherData launcherData = info.getLauncherData();
- if (launcherData == null)
- return;
-
- File fwConfigFile = new File(launcherData.getFwConfigLocation(), EquinoxConstants.CONFIG_INI);
- if (fwConfigFile.exists()) {
- if (info instanceof EclipseInstallGeneratorInfoProvider) {
- ((EclipseInstallGeneratorInfoProvider) info).loadConfigData(fwConfigFile);
- ConfigData data = info.getConfigData();
- result.configData.put(info.getLauncherConfig(), data);
- }
- }
- }
-
- /**
- * @deprecated moved to ConfigCUsAction
- */
- protected GeneratorBundleInfo createGeneratorBundleInfo(BundleInfo bundleInfo, GeneratorResult result) {
- if (bundleInfo.getLocation() != null)
- return new GeneratorBundleInfo(bundleInfo);
-
- String name = bundleInfo.getSymbolicName();
-
- //easy case: do we have a matching IU?
- IInstallableUnit iu = result.getInstallableUnit(name);
- if (iu != null) {
- bundleInfo.setVersion(iu.getVersion().toString());
- return new GeneratorBundleInfo(bundleInfo);
- }
-
- //harder: try id_version
- int i = name.indexOf('_');
- while (i > -1) {
- Version version = null;
- try {
- version = Version.create(name.substring(i));
- bundleInfo.setSymbolicName(name.substring(0, i));
- bundleInfo.setVersion(version.toString());
- return new GeneratorBundleInfo(bundleInfo);
- } catch (IllegalArgumentException e) {
- // the '_' found was probably part of the symbolic id
- i = name.indexOf('_', i);
- }
- }
-
- //Query the repo
- IQuery query = QueryUtil.createIUQuery(name);
- Iterator matches = info.getMetadataRepository().query(query, null).iterator();
- //pick the newest match
- IInstallableUnit newest = null;
- while (matches.hasNext()) {
- IInstallableUnit candidate = (IInstallableUnit) matches.next();
- if (newest == null || (newest.getVersion().compareTo(candidate.getVersion()) < 0))
- newest = candidate;
- }
- if (newest != null) {
- bundleInfo.setVersion(newest.getVersion().toString());
- return new GeneratorBundleInfo(bundleInfo);
- }
-
- return null;
- }
-
- /**
- * @deprecated moved to ConfigCUsAction
- */
- protected void generateBundleConfigIUs(BundleInfo[] infos, GeneratorResult result, String launcherConfig, int defaultStartLevel) {
- if (infos == null)
- return;
-
- String cuIdPrefix = ""; //$NON-NLS-1$
- String filter = null;
- if (launcherConfig != null) {
- //launcher config is os_ws_arch, we want suffix ws.os.arch
- String[] config = parseConfigSpec(launcherConfig);
- cuIdPrefix = config[1] + '.' + config[0] + '.' + config[2];
-
- filter = "(& (osgi.ws=" + config[1] + ") (osgi.os=" + config[0] + ") (osgi.arch=" + config[2] + "))"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
-
- List allCUs = new ArrayList();
- for (int i = 0; i < infos.length; i++) {
- GeneratorBundleInfo bundle = createGeneratorBundleInfo(infos[i], result);
- if (bundle == null)
- continue;
-
- if (bundle.getSymbolicName().equals(ORG_ECLIPSE_EQUINOX_LAUNCHER)) {
- bundle = EclipseInstallGeneratorInfoProvider.createLauncher();
- } else if (bundle.getSymbolicName().startsWith(ORG_ECLIPSE_EQUINOX_LAUNCHER + '.')) {
- //launcher fragments will be handled by generateDefaultConfigIU(Set) for --launcher.library.
- //they don't need to be started so skip them here to avoid having to merge config commands
- continue;
- }
- if (bundle.getSymbolicName().equals(ORG_ECLIPSE_UPDATE_CONFIGURATOR)) {
- bundle.setStartLevel(BundleInfo.NO_LEVEL);
- bundle.setMarkedAsStarted(false);
- bundle.setSpecialConfigCommands("setProgramProperty(propName:org.eclipse.update.reconcile, propValue:false);"); //$NON-NLS-1$
- bundle.setSpecialUnconfigCommands("setProgramProperty(propName:org.eclipse.update.reconcile, propValue:);"); //$NON-NLS-1$
- } else if ((bundle.getStartLevel() == BundleInfo.NO_LEVEL || bundle.getStartLevel() == defaultStartLevel) && !bundle.isMarkedAsStarted()) {
- // this bundle does not require any particular configuration, the plug-in default IU will handle installing it
- continue;
- }
-
- IInstallableUnit cu = MetadataGeneratorHelper.createBundleConfigurationUnit(bundle.getSymbolicName(), Version.create(bundle.getVersion()), false, bundle, info.getFlavor() + cuIdPrefix, filter);
- if (cu != null) {
- allCUs.add(cu);
- result.rootIUs.add(cu);
- String key = (productFile != null && productFile.useFeatures()) ? GeneratorResult.CONFIGURATION_CUS : bundle.getSymbolicName();
- if (result.configurationIUs.containsKey(key)) {
- ((Set) result.configurationIUs.get(key)).add(cu);
- } else {
- Set set = new HashSet();
- set.add(cu);
- result.configurationIUs.put(key, set);
- }
- }
- }
- IMetadataRepository metadataRepository = info.getMetadataRepository();
- if (metadataRepository != null && !allCUs.isEmpty()) {
- // Product Query will run against the repo later in createProductIU, make sure these CUs are in before then
- metadataRepository.addInstallableUnits(allCUs);
- }
-
- }
-
- /**
- * @deprecated moved to ConfigCUsAction (and perhaps a couple other places...)
- */
- protected void generateConfigIUs(GeneratorResult result) {
- ConfigData data = info.getConfigData();
- if ((data == null || data.getBundles().length == 0) && info.getLauncherConfig() != null) {
- //We have the config.ini but not necessarily all the needed bundle IUs, remember for later
- storeConfigData(result);
- } else if (data != null) {
- // generation against an eclipse install (config.ini + bundles)
- generateBundleConfigIUs(data.getBundles(), result, info.getLauncherConfig(), data.getInitialBundleStartLevel());
- } else if (result.configData.size() > 0 && generateRootIU) {
- // generation from remembered config.ini's
- // we have N platforms, generate a CU for each
- // TODO try and find common properties across platforms
- for (Iterator iterator = result.configData.keySet().iterator(); iterator.hasNext();) {
- String launcherConfig = (String) iterator.next();
- data = (ConfigData) result.configData.get(launcherConfig);
- generateBundleConfigIUs(data.getBundles(), result, launcherConfig, data.getInitialBundleStartLevel());
- }
- }
-
- List bundleInfoList = new ArrayList();
- List defaults = new ArrayList();
- if (info.addDefaultIUs())
- bundleInfoList.addAll(info.getDefaultIUs(result.rootIUs));
-
- bundleInfoList.addAll(info.getOtherIUs());
-
- for (Iterator iterator = bundleInfoList.iterator(); iterator.hasNext();) {
- GeneratorBundleInfo bundle = (GeneratorBundleInfo) iterator.next();
- IInstallableUnit configuredIU = result.getInstallableUnit(bundle.getSymbolicName());
- if (configuredIU == null) {
- if (!generateRootIU && data == null)
- continue;
- IQuery query = QueryUtil.createIUQuery(bundle.getSymbolicName());
- IMetadataRepository metadataRepository = info.getMetadataRepository();
- if (metadataRepository == null)
- continue;
- Iterator matches = metadataRepository.query(query, null).iterator();
- //pick the newest match
- IInstallableUnit newest = null;
- while (matches.hasNext()) {
- IInstallableUnit candidate = (IInstallableUnit) matches.next();
- if (newest == null || (newest.getVersion().compareTo(candidate.getVersion()) < 0))
- newest = candidate;
- }
- if (newest != null) {
- configuredIU = newest;
- } else {
- continue;
- }
- }
- bundle.setVersion(configuredIU.getVersion().toString());
- IMatchExpression filter = configuredIU == null ? null : configuredIU.getFilter();
- IInstallableUnit cu = MetadataGeneratorHelper.createBundleConfigurationUnit(bundle.getSymbolicName(), Version.create(bundle.getVersion()), false, bundle, info.getFlavor(), filter);
- //the configuration unit should share the same platform filter as the IU being configured.
- if (cu != null) {
- result.rootIUs.add(cu);
- defaults.add(cu);
- }
- String key = null;
- if (productFile != null && productFile.useFeatures())
- key = GeneratorResult.CONFIGURATION_CUS;
- else if (bundle.getSymbolicName().startsWith(ORG_ECLIPSE_EQUINOX_LAUNCHER + '.'))
- key = ORG_ECLIPSE_EQUINOX_LAUNCHER;
- else
- key = bundle.getSymbolicName();
- if (result.configurationIUs.containsKey(key)) {
- ((Set) result.configurationIUs.get(key)).add(cu);
- } else {
- Set set = new HashSet();
- set.add(cu);
- result.configurationIUs.put(key, set);
- }
- }
-
- IMetadataRepository metadataRepository = info.getMetadataRepository();
- if (metadataRepository != null && !defaults.isEmpty()) {
- // Product Query will run against the repo later in createProductIU, make sure these CUs are in before then
- metadataRepository.addInstallableUnits(defaults);
- }
- }
-
- /**
- * Short term fix to ensure IUs that have no corresponding category are not lost.
- * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=211521.
- * @deprecated moved to RootIUAction
- */
- private IInstallableUnit generateDefaultCategory(IInstallableUnit rootIU) {
- rootCategory.add(rootIU);
-
- InstallableUnitDescription cat = new MetadataFactory.InstallableUnitDescription();
- cat.setSingleton(true);
- String categoryId = rootIU.getId() + ".categoryIU"; //$NON-NLS-1$
- cat.setId(categoryId);
- cat.setVersion(Version.emptyVersion);
- cat.setProperty(IInstallableUnit.PROP_NAME, rootIU.getProperty(IInstallableUnit.PROP_NAME));
- cat.setProperty(IInstallableUnit.PROP_DESCRIPTION, rootIU.getProperty(IInstallableUnit.PROP_DESCRIPTION));
-
- ArrayList required = new ArrayList(rootCategory.size());
- for (Iterator iterator = rootCategory.iterator(); iterator.hasNext();) {
- IInstallableUnit iu = (IInstallableUnit) iterator.next();
- required.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), VersionRange.emptyRange, iu.getFilter(), false, false));
- }
- cat.setRequirements((IRequirement[]) required.toArray(new IRequirement[required.size()]));
- cat.setCapabilities(new IProvidedCapability[] {MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, categoryId, Version.emptyVersion)});
- cat.setArtifacts(new IArtifactKey[0]);
- cat.setProperty(InstallableUnitDescription.PROP_TYPE_CATEGORY, "true"); //$NON-NLS-1$
- return MetadataFactory.createInstallableUnit(cat);
- }
-
- /**
- * @deprecated moved to DefaultCUsAction
- */
- private void generateDefaultConfigIU(Set ius) {
- // TODO this is a bit of a hack. We need to have the default IU fragment generated with code that configures
- // and unconfigures. The Generator should be decoupled from any particular provider but it is not clear
- // that we should add the create* methods to IGeneratorInfo...
- // MockBundleDescription bd1 = new MockBundleDescription("defaultConfigure");
- // MockBundleDescription bd2 = new MockBundleDescription("defaultUnconfigure");
- EclipseInstallGeneratorInfoProvider provider = (EclipseInstallGeneratorInfoProvider) info;
- ius.add(MetadataGeneratorHelper.createDefaultBundleConfigurationUnit(provider.createDefaultConfigurationBundleInfo(), provider.createDefaultUnconfigurationBundleInfo(), info.getFlavor()));
- ius.add(MetadataGeneratorHelper.createDefaultFeatureConfigurationUnit(info.getFlavor()));
- ius.add(MetadataGeneratorHelper.createDefaultConfigurationUnitForSourceBundles(info.getFlavor()));
- }
-
- /**
- * This method generates IUs for the launchers found in the org.eclipse.executable feature, if present.
- * @return <code>true</code> if the executable feature was processed successfully,
- * and <code>false</code> otherwise.
- * @deprecated moved to ExecutablesDescriptor and EquinoxExecutableAction
- */
- private boolean generateExecutableFeatureIUs(GeneratorResult result, IArtifactRepository destination) {
- File parentDir = info.getFeaturesLocation();
- if (parentDir == null || !parentDir.exists())
- return false;
- File[] featureDirs = parentDir.listFiles();
- if (featureDirs == null)
- return false;
- File executableFeatureDir = null;
- final String featurePrefix = "org.eclipse.equinox.executable_"; //$NON-NLS-1$
- for (int i = 0; i < featureDirs.length; i++) {
- if (featureDirs[i].getName().startsWith(featurePrefix)) {
- executableFeatureDir = featureDirs[i];
- break;
- }
- }
- if (executableFeatureDir == null)
- return false;
- File binDir = new File(executableFeatureDir, "bin"); //$NON-NLS-1$
- if (!binDir.exists())
- return false;
- //the bin directory is dividing into a directory tree of the form /bin/ws/os/arch
- File[] wsDirs = binDir.listFiles();
- if (wsDirs == null)
- return false;
- String versionString = executableFeatureDir.getName().substring(featurePrefix.length());
- for (int wsIndex = 0; wsIndex < wsDirs.length; wsIndex++) {
- String ws = wsDirs[wsIndex].getName();
- File[] osDirs = wsDirs[wsIndex].listFiles();
- if (osDirs == null)
- continue;
- for (int osIndex = 0; osIndex < osDirs.length; osIndex++) {
- String os = osDirs[osIndex].getName();
- File[] archDirs = osDirs[osIndex].listFiles();
- if (archDirs == null)
- continue;
- for (int archIndex = 0; archIndex < archDirs.length; archIndex++) {
- String arch = archDirs[archIndex].getName();
- generateExecutableIUs(ws, os, arch, versionString, archDirs[archIndex], result, destination);
- }
- }
- }
- return true;
- }
-
- /**
- * Generates IUs and CUs for the files that make up the launcher for a given
- * ws/os/arch combination.
- * @deprecated moved to EquinoxExecutableAction
- */
- private void generateExecutableIUs(String ws, String os, final String arch, String version, File root, GeneratorResult result, IArtifactRepository destination) {
- if (root == null)
- return;
-
- //Create the IU
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- iu.setSingleton(true);
- String productNamespace = (productFile != null) ? productFile.getId() : "org.eclipse"; //$NON-NLS-1$
- String launcherIdPrefix = productNamespace + PRODUCT_LAUCHER_SUFFIX;
- String launcherId = launcherIdPrefix + '.' + ws + '.' + os + '.' + arch;
- iu.setId(launcherId);
- Version launcherVersion = Version.create(version);
- iu.setVersion(launcherVersion);
- iu.setSingleton(true);
- IMatchExpression filter = null;
- if (!ws.equals(CONFIG_ANY) && !os.equals(CONFIG_ANY) && !arch.equals(CONFIG_ANY)) {
- filter = InstallableUnit.parseFilter("(& (osgi.ws=" + ws + ") (osgi.os=" + os + ") (osgi.arch=" + arch + "))"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- iu.setFilter(filter);
- }
-
- IArtifactKey key = MetadataGeneratorHelper.createLauncherArtifactKey(launcherId, launcherVersion);
- iu.setArtifacts(new IArtifactKey[] {key});
- iu.setTouchpointType(MetadataGeneratorHelper.TOUCHPOINT_NATIVE);
- IProvidedCapability launcherCapability = MetadataFactory.createProvidedCapability(info.getFlavor() + productNamespace, launcherIdPrefix, launcherVersion);
- iu.setCapabilities(new IProvidedCapability[] {MetadataGeneratorHelper.createSelfCapability(launcherId, launcherVersion), launcherCapability});
-
- String launcherFragment = ORG_ECLIPSE_EQUINOX_LAUNCHER + '.' + ws + '.' + os;
- if (!(Constants.OS_MACOSX.equals(os) && !Constants.ARCH_X86_64.equals(arch)))
- launcherFragment += '.' + arch;
- iu.setRequirements(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, launcherFragment, VersionRange.emptyRange, filter, false, false)});
- result.rootIUs.add(MetadataFactory.createInstallableUnit(iu));
-
- //Create the CU
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configUnitId = info.getFlavor() + launcherId;
- cu.setId(configUnitId);
- cu.setVersion(launcherVersion);
- if (filter != null)
- cu.setFilter(filter);
- cu.setHost(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, launcherId, new VersionRange(launcherVersion, true, launcherVersion, true), null, false, false)});
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- //TODO bug 218890, would like the fragment to provide the launcher capability as well, but can't right now.
- cu.setCapabilities(new IProvidedCapability[] {MetadataGeneratorHelper.createSelfCapability(configUnitId, launcherVersion)});
-
- mungeLauncherFileNames(root);
-
- cu.setTouchpointType(MetadataGeneratorHelper.TOUCHPOINT_NATIVE);
- Map touchpointData = new HashMap();
- String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
-
- IInstallableUnit launcherNameIU = null;
-
- File executableLocation = info.getExecutableLocation();
- if (executableLocation != null) {
- if (!executableLocation.exists()) {
- if (Constants.OS_WIN32.equals(os) && !executableLocation.getName().endsWith(".exe")) { //$NON-NLS-1$
- executableLocation = new File(executableLocation.getParentFile(), executableLocation.getName() + ".exe"); //$NON-NLS-1$
- } else if (Constants.OS_MACOSX.equals(os)) {
- String name = executableLocation.getName();
- File parent = executableLocation.getParentFile();
- executableLocation = new File(parent, name + ".app/Contents/MacOS/" + name); //$NON-NLS-1$
- }
- }
-
- if (executableLocation.exists() && executableLocation.isFile())
- launcherNameIU = MetadataGeneratorHelper.generateLauncherSetter(executableLocation.getName(), launcherId, launcherVersion, os, ws, arch, result.rootIUs);
- }
-
- if (launcherNameIU == null && productFile != null && productFile.getLauncherName() != null) {
- launcherNameIU = MetadataGeneratorHelper.generateLauncherSetter(productFile.getLauncherName(), launcherId, launcherVersion, os, ws, arch, result.rootIUs);
- }
-
- if (Constants.OS_MACOSX.equals(os)) {
- File[] appFolders = root.listFiles(new FilenameFilter() {
- public boolean accept(File dir, String name) {
- return name.substring(name.length() - 4, name.length()).equalsIgnoreCase(".app"); //$NON-NLS-1$
- }
- });
- for (int i = 0; appFolders != null && i < appFolders.length; i++) {
- File macOSFolder = new File(appFolders[i], "Contents/MacOS"); //$NON-NLS-1$
- if (macOSFolder.exists()) {
- File[] launcherFiles = macOSFolder.listFiles();
- for (int j = 0; j < launcherFiles.length; j++) {
- configurationData += " chmod(targetDir:${installFolder}/" + appFolders[i].getName() + "/Contents/MacOS/, targetFile:" + launcherFiles[j].getName() + ", permissions:755);"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if (launcherNameIU == null && launcherFiles[i].isFile() && new Path(launcherFiles[j].getName()).getFileExtension() == null)
- launcherNameIU = MetadataGeneratorHelper.generateLauncherSetter(launcherFiles[j].getName(), launcherId, launcherVersion, os, ws, arch, result.rootIUs);
- }
- }
- }
- } else if (!Constants.OS_WIN32.equals(os)) {
- File[] launcherFiles = root.listFiles();
- for (int i = 0; launcherFiles != null && i < launcherFiles.length; i++) {
- configurationData += " chmod(targetDir:${installFolder}, targetFile:" + launcherFiles[i].getName() + ", permissions:755);"; //$NON-NLS-1$ //$NON-NLS-2$
- if (launcherNameIU == null && launcherFiles[i].isFile() && new Path(launcherFiles[i].getName()).getFileExtension() == null)
- launcherNameIU = MetadataGeneratorHelper.generateLauncherSetter(launcherFiles[i].getName(), launcherId, launcherVersion, os, ws, arch, result.rootIUs);
- }
- } else if (launcherNameIU == null) {
- //windows
- File[] launcherFiles = root.listFiles(new FilenameFilter() {
- public boolean accept(File parent, String name) {
- return name.endsWith(".exe"); //$NON-NLS-1$
- }
- });
- if (launcherFiles != null && launcherFiles.length > 0)
- launcherNameIU = MetadataGeneratorHelper.generateLauncherSetter(launcherFiles[0].getName(), launcherId, launcherVersion, os, ws, arch, result.rootIUs);
- }
- touchpointData.put("install", configurationData); //$NON-NLS-1$
- String unConfigurationData = "cleanupzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- touchpointData.put("uninstall", unConfigurationData); //$NON-NLS-1$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- IInstallableUnit unit = MetadataFactory.createInstallableUnit(cu);
- result.rootIUs.add(unit);
- //The Product Query will need to include the launcher CU fragments as a workaround to bug 218890
- if (result.configurationIUs.containsKey(launcherIdPrefix)) {
- ((Set) result.configurationIUs.get(launcherIdPrefix)).add(unit);
- if (launcherNameIU != null)
- ((Set) result.configurationIUs.get(launcherIdPrefix)).add(launcherNameIU);
- } else {
- Set set = new HashSet();
- set.add(unit);
- if (launcherNameIU != null)
- set.add(launcherNameIU);
- result.configurationIUs.put(launcherIdPrefix, set);
- }
-
- //Create the artifact descriptor
- IArtifactDescriptor descriptor = MetadataGeneratorHelper.createArtifactDescriptor(key, root, false, true);
- publishArtifact(descriptor, root.listFiles(), destination, false, root);
- }
-
- /**
- * For each platform, generate a CU containing the information for the config.ini
- * @deprecated moved to ProductAction and ConfigCUsAction
- */
- private void generateProductConfigCUs(GeneratorResult result) {
- for (Iterator iterator = result.configData.keySet().iterator(); iterator.hasNext();) {
- String launcherConfig = (String) iterator.next();
- String[] config = parseConfigSpec(launcherConfig);
- String ws = config[1];
- String os = config[0];
- String arch = config[2];
-
- ConfigData data = (ConfigData) result.configData.get(launcherConfig);
-
- InstallableUnitDescription cu = new MetadataFactory.InstallableUnitDescription();
- String configUnitId = info.getFlavor() + productFile.getId() + ".config." + ws + '.' + os + '.' + arch; //$NON-NLS-1$
-
- String version = getProductVersion();
- Version cuVersion = Version.create(version);
- cu.setId(configUnitId);
- cu.setVersion(cuVersion);
- cu.setSingleton(true);
- cu.setFilter("(& (osgi.ws=" + ws + ") (osgi.os=" + os + ") (osgi.arch=" + arch + "))"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- IProvidedCapability productConfigCapability = MetadataFactory.createProvidedCapability(info.getFlavor() + productFile.getId(), productFile.getId() + PRODUCT_CONFIG_SUFFIX, cuVersion);
- IProvidedCapability selfCapability = MetadataGeneratorHelper.createSelfCapability(configUnitId, cuVersion);
- cu.setCapabilities(new IProvidedCapability[] {selfCapability, productConfigCapability});
-
- cu.setTouchpointType(MetadataGeneratorHelper.TOUCHPOINT_OSGI);
- Map touchpointData = new HashMap();
- String[] dataStrings = getConfigurationStrings(data);
- touchpointData.put("configure", dataStrings[0]); //$NON-NLS-1$
- touchpointData.put("unconfigure", dataStrings[1]); //$NON-NLS-1$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
-
- result.rootIUs.add(MetadataFactory.createInstallableUnit(cu));
- }
- }
-
- /**
- * For the given platform (ws, os, arch) generate the CU that will populate the product.ini file
- * @deprecated moved to ProductAction and ConfigCUsAction
- */
- private void generateProductIniCU(String ws, String os, String arch, String version, GeneratorResult result) {
- if (productFile == null)
- return;
-
- //attempt to merge arguments from the launcher data and the product file
- Set jvmArgs = new LinkedHashSet();
- Set progArgs = new LinkedHashSet();
- LauncherData launcherData = info.getLauncherData();
- if (launcherData != null) {
- jvmArgs.addAll(Arrays.asList(launcherData.getJvmArgs()));
- progArgs.addAll(Arrays.asList(launcherData.getProgramArgs()));
- }
- progArgs.addAll(Arrays.asList(getArrayFromString(productFile.getProgramArguments(os), " "))); //$NON-NLS-1$
- jvmArgs.addAll(Arrays.asList(getArrayFromString(productFile.getVMArguments(os), " "))); //$NON-NLS-1$
-
- String[] dataStrings = getLauncherConfigStrings((String[]) jvmArgs.toArray(new String[jvmArgs.size()]), (String[]) progArgs.toArray(new String[progArgs.size()]));
- String configurationData = dataStrings[0];
- String unconfigurationData = dataStrings[1];
-
- InstallableUnitDescription cu = new MetadataFactory.InstallableUnitDescription();
- String configUnitId = info.getFlavor() + productFile.getId() + ".ini." + ws + '.' + os + '.' + arch; //$NON-NLS-1$
- Version cuVersion = Version.create(version);
- cu.setId(configUnitId);
- cu.setVersion(cuVersion);
- cu.setSingleton(true);
- cu.setFilter("(& (osgi.ws=" + ws + ") (osgi.os=" + os + ") (osgi.arch=" + arch + "))"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- IProvidedCapability productIniCapability = MetadataFactory.createProvidedCapability(info.getFlavor() + productFile.getId(), productFile.getId() + PRODUCT_INI_SUFFIX, cuVersion);
- IProvidedCapability selfCapability = MetadataGeneratorHelper.createSelfCapability(configUnitId, cuVersion);
- cu.setCapabilities(new IProvidedCapability[] {selfCapability, productIniCapability});
-
- cu.setTouchpointType(MetadataGeneratorHelper.TOUCHPOINT_OSGI);
- Map touchpointData = new HashMap();
- touchpointData.put("configure", configurationData); //$NON-NLS-1$
- touchpointData.put("unconfigure", unconfigurationData); //$NON-NLS-1$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
-
- result.rootIUs.add(MetadataFactory.createInstallableUnit(cu));
-
- }
-
- /**
- * Generates metadata for the given features.
- * @deprecated moved to FeaturesAction
- */
- protected void generateFeatureIUs(Feature[] features, GeneratorResult result, IArtifactRepository destination) {
- Map categoriesToFeatureIUs = new HashMap();
- Map featuresToCategories = getFeatureToCategoryMappings();
- //Build Feature IUs, and add them to any corresponding categories
- for (int i = 0; i < features.length; i++) {
- Feature feature = features[i];
- //publish feature site references
- URLEntry updateURL = feature.getUpdateSite();
- //don't enable feature update sites by default since this results in too many
- //extra sites being loaded and searched (Bug 234177)
- if (updateURL != null)
- generateSiteReference(updateURL.getURL(), updateURL.getAnnotation(), feature.getId(), false);
- URLEntry[] discoverySites = feature.getDiscoverySites();
- for (int j = 0; j < discoverySites.length; j++)
- generateSiteReference(discoverySites[j].getURL(), discoverySites[j].getAnnotation(), feature.getId(), false);
-
- //generate feature IU
- String location = feature.getLocation();
- boolean isExploded = (location.endsWith(".jar") ? false : true); //$NON-NLS-1$
- IInstallableUnit featureIU = MetadataGeneratorHelper.createFeatureJarIU(feature, true);
- Collection artifacts = featureIU.getArtifacts();
- storePluginShape(feature, result);
- for (Iterator iterator = artifacts.iterator(); iterator.hasNext();) {
- IArtifactDescriptor ad = MetadataGeneratorHelper.createArtifactDescriptor((IArtifactKey) iterator.next(), new File(location), true, false);
- if (isExploded)
- publishArtifact(ad, new File(location).listFiles(), destination, false, new File(location));
- else
- publishArtifact(ad, new File[] {new File(location)}, destination, true);
- }
- IInstallableUnit generated = MetadataGeneratorHelper.createGroupIU(feature, featureIU);
- result.rootIUs.add(generated);
- result.rootIUs.add(featureIU);
-
- // @deprecated moved to SiteXMLAction
- Set categories = getCategories(feature, featuresToCategories);
- if (categories != null) {
- for (Iterator it = categories.iterator(); it.hasNext();) {
- SiteCategory category = (SiteCategory) it.next();
- Set featureIUs = (Set) categoriesToFeatureIUs.get(category);
- if (featureIUs == null) {
- featureIUs = new HashSet();
- categoriesToFeatureIUs.put(category, featureIUs);
- }
- featureIUs.add(generated);
- }
- } else {
- rootCategory.add(generated);
- }
- }
- generateCategoryIUs(categoriesToFeatureIUs, result);
- }
-
- /**
- * @deprecated moved to FeaturesAction
- */
- private void storePluginShape(Feature feature, GeneratorResult result) {
- FeatureEntry[] entries = feature.getEntries();
- for (int i = 0; i < entries.length; i++) {
- if (entries[i].isPlugin() || entries[i].isFragment()) {
- result.getPluginShapeInfo().put(entries[i].getId() + '_' + entries[i].getVersion(), entries[i].isUnpack() ? BundleDescriptionFactory.DIR : BundleDescriptionFactory.JAR);
- }
- }
- }
-
- /**
- * @deprecated moved to various other places. mainly the aggregator actions (e.g., EclipseInstallAction)
- */
- protected void generateNativeIUs(File executableLocation, GeneratorResult result, IArtifactRepository destination) {
- //generate data for JRE
- File jreLocation = info.getJRELocation();
- IArtifactDescriptor artifact = MetadataGeneratorHelper.createJREData(jreLocation, result.rootIUs);
- publishArtifact(artifact, new File[] {jreLocation}, destination, false);
-
- if (info.getLauncherConfig() != null) {
- String[] config = parseConfigSpec(info.getLauncherConfig());
- String version = getProductVersion();
- File root = null;
- if (executableLocation != null)
- root = executableLocation.getParentFile();
- else if (info instanceof EclipseInstallGeneratorInfoProvider)
- root = ((EclipseInstallGeneratorInfoProvider) info).getBaseLocation();
- generateExecutableIUs(config[1], config[0], config[2], version, root, result, destination);
- generateProductIniCU(config[1], config[0], config[2], version, result);
- return;
- }
-
- //If the executable feature is present, use it to generate IUs for launchers
- if (generateExecutableFeatureIUs(result, destination) || executableLocation == null)
- return;
-
- //generate data for executable launcher
- artifact = MetadataGeneratorHelper.createLauncherIU(executableLocation, info.getFlavor(), result.rootIUs);
- File[] launcherFiles = null;
- //hard-coded name is ok, since console launcher is not branded, and appears on Windows only
- File consoleLauncher = new File(executableLocation.getParentFile(), "eclipsec.exe"); //$NON-NLS-1$
- if (consoleLauncher.exists())
- launcherFiles = new File[] {executableLocation, consoleLauncher};
- else
- launcherFiles = new File[] {executableLocation};
- publishArtifact(artifact, launcherFiles, destination, false);
- }
-
- /**
- * @deprecated moved to various other places. mainly the aggregator actions (e.g., EclipseInstallAction)
- */
- protected void generateRootIU(GeneratorResult result, String rootIUId, String rootIUVersion) {
- IInstallableUnit rootIU = null;
-
- if (info.getProductFile() != null)
- rootIU = createProductIU(result);
- else if (rootIUId != null)
- rootIU = createTopLevelIU(result, rootIUId, rootIUVersion);
-
- if (rootIU == null)
- return;
-
- result.nonRootIUs.add(rootIU);
- result.nonRootIUs.add(generateDefaultCategory(rootIU));
- }
-
- /**
- * Generates and publishes a reference to an update site location
- * @param location The update site location
- * @param featureId the identifier of the feature where the error occurred, or null
- * @param isEnabled Whether the site should be enabled by default
- * @deprecated moved to FeaturesAction
- */
- private void generateSiteReference(String location, String name, String featureId, boolean isEnabled) {
- IMetadataRepository metadataRepo = info.getMetadataRepository();
- try {
- URI associateLocation = URIUtil.fromString(location);
- int flags = isEnabled ? IRepository.ENABLED : IRepository.NONE;
- ArrayList refs = new ArrayList();
- refs.add(new RepositoryReference(associateLocation, name, IRepository.TYPE_METADATA, flags));
- refs.add(new RepositoryReference(associateLocation, name, IRepository.TYPE_ARTIFACT, flags));
- metadataRepo.addReferences(refs);
- } catch (URISyntaxException e) {
- String message = "Invalid site reference: " + location; //$NON-NLS-1$
- if (featureId != null)
- message = message + " in feature: " + featureId; //$NON-NLS-1$
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message));
- }
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- protected BundleDescription[] getBundleDescriptions(File[] bundleLocations) {
- if (bundleLocations == null)
- return new BundleDescription[0];
- boolean addSimpleConfigurator = false;
- boolean scIn = false;
- for (int i = 0; i < bundleLocations.length; i++) {
- if (!addSimpleConfigurator)
- addSimpleConfigurator = bundleLocations[i].toString().indexOf(ORG_ECLIPSE_UPDATE_CONFIGURATOR) > 0;
- if (!scIn) {
- scIn = bundleLocations[i].toString().indexOf(ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR) > 0;
- if (scIn)
- break;
- }
- }
- if (scIn)
- addSimpleConfigurator = false;
- BundleDescription[] result = new BundleDescription[bundleLocations.length + (addSimpleConfigurator ? 1 : 0)];
- BundleDescriptionFactory factory = getBundleFactory();
- for (int i = 0; i < bundleLocations.length; i++) {
- BundleDescription desc = factory.getBundleDescription(bundleLocations[i]);
- if (desc != null)
- result[i] = desc;
- }
- if (addSimpleConfigurator) {
- //Add simple configurator to the list of bundles
- try {
- File location = new File(FileLocator.toFileURL(Activator.getContext().getBundle().getEntry(ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR + ".jar")).getFile()); //$NON-NLS-1$
- result[result.length - 1] = factory.getBundleDescription(location);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- return result;
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- protected BundleDescriptionFactory getBundleFactory() {
- return new BundleDescriptionFactory(stateObjectFactory, null);
- }
-
- /**
- * Returns the categories corresponding to the given feature, or null if there
- * are no applicable categories.
- * @param feature The feature to return categories for
- * @param featuresToCategories A map of SiteFeature->Set<SiteCategory>
- * @return A Set<SiteCategory> of the categories corresponding to the feature, or <code>null</code>
- * @deprecated moved to SiteXMLAction
- */
- private Set getCategories(Feature feature, Map featuresToCategories) {
- //find the SiteFeature corresponding to the given feature
- for (Iterator it = featuresToCategories.keySet().iterator(); it.hasNext();) {
- SiteFeature siteFeature = (SiteFeature) it.next();
- String siteVersion = siteFeature.getFeatureVersion();
- if (!siteFeature.getFeatureIdentifier().equals(feature.getId()))
- continue;
- if (siteVersion.endsWith("qualifier")) { //$NON-NLS-1$
- String withoutQualifier = siteVersion.substring(0, siteVersion.lastIndexOf("qualifier")); //$NON-NLS-1$
- String featureVersion = feature.getVersion();
- if (featureVersion.length() >= withoutQualifier.length() && featureVersion.substring(0, withoutQualifier.length()).equals(withoutQualifier))
- return (Set) featuresToCategories.get(siteFeature);
- } else if (siteFeature.getFeatureVersion().equals(feature.getVersion())) {
- return (Set) featuresToCategories.get(siteFeature);
- }
- }
- return null;
- }
-
- /**
- * @deprecated moved to FeaturesAction
- */
- protected Feature[] getFeatures(File folder) {
- if (folder == null || !folder.exists())
- return new Feature[0];
- File[] locations = folder.listFiles();
- ArrayList result = new ArrayList(locations.length);
- for (int i = 0; i < locations.length; i++) {
- Feature feature = new FeatureParser().parse(locations[i]);
- if (feature != null) {
- feature.setLocation(locations[i].getAbsolutePath());
- result.add(feature);
- }
- }
- return (Feature[]) result.toArray(new Feature[result.size()]);
- }
-
- /**
- * Computes the mapping of features to categories as defined in the site.xml,
- * if available. Returns an empty map if there is not site.xml, or no categories.
- * @return A map of SiteFeature -> Set<SiteCategory>.
- */
- protected Map getFeatureToCategoryMappings() {
- HashMap mappings = new HashMap();
- URI siteLocation = info.getSiteLocation();
- if (siteLocation == null)
- return mappings;
- InputStream input;
- SiteModel site = null;
- try {
- input = new BufferedInputStream(URIUtil.toURL(siteLocation).openStream());
- site = new DefaultSiteParser().parse(input);
- } catch (FileNotFoundException e) {
- //don't complain if the update site is not present
- } catch (Exception e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.exception_errorParsingUpdateSite, siteLocation), e));
- }
- if (site == null)
- return mappings;
-
- //copy mirror information from update site to p2 repositories
- String mirrors = site.getMirrorsURL();
- if (mirrors != null) {
- //remove site.xml file reference
- int index = mirrors.indexOf("site.xml"); //$NON-NLS-1$
- if (index != -1)
- mirrors = mirrors.substring(0, index) + mirrors.substring(index + "site.xml".length()); //$NON-NLS-1$
- info.getMetadataRepository().setProperty(IRepository.PROP_MIRRORS_URL, mirrors);
- info.getArtifactRepository().setProperty(IRepository.PROP_MIRRORS_URL, mirrors);
- }
-
- //publish associate sites as repository references
- URLEntry[] associatedSites = site.getAssociatedSites();
- if (associatedSites != null)
- for (int i = 0; i < associatedSites.length; i++)
- generateSiteReference(associatedSites[i].getURL(), associatedSites[i].getAnnotation(), null, true);
-
- if (PROTOCOL_FILE.equals(siteLocation.getScheme())) {
- File siteFile = URIUtil.toFile(siteLocation);
- if (siteFile.exists()) {
- File siteParent = siteFile.getParentFile();
-
- List messageKeys = site.getMessageKeys();
- if (siteParent.isDirectory()) {
- String[] keyStrings = (String[]) messageKeys.toArray(new String[messageKeys.size()]);
- site.setLocalizations(LocalizationHelper.getDirPropertyLocalizations(siteParent, "site", null, keyStrings)); //$NON-NLS-1$
- } else if (siteFile.getName().endsWith(".jar")) { //$NON-NLS-1$
- String[] keyStrings = (String[]) messageKeys.toArray(new String[messageKeys.size()]);
- site.setLocalizations(LocalizationHelper.getJarPropertyLocalizations(siteParent, "site", null, keyStrings)); //$NON-NLS-1$
- }
- }
- }
-
- SiteFeature[] features = site.getFeatures();
- for (int i = 0; i < features.length; i++) {
- //add a mapping for each category this feature belongs to
- String[] categoryNames = features[i].getCategoryNames();
- for (int j = 0; j < categoryNames.length; j++) {
- SiteCategory category = site.getCategory(categoryNames[j]);
- if (category != null) {
- Set categories = (Set) mappings.get(features[i]);
- if (categories == null) {
- categories = new HashSet();
- mappings.put(features[i], categories);
- }
- categories.add(category);
- }
- }
- }
- return mappings;
- }
-
- /**
- * @TODO This method is a temporary hack to rename the launcher.exe files
- * to eclipse.exe (or "launcher" to "eclipse"). Eventually we will either hand-craft
- * metadata/artifacts for launchers, or alter the delta pack to contain eclipse-branded
- * launchers.
- * @deprecated moved to EquinoxExecutableAction
- */
- private void mungeLauncherFileNames(File root) {
- if (root.isDirectory()) {
- File[] children = root.listFiles();
- for (int i = 0; i < children.length; i++) {
- mungeLauncherFileNames(children[i]);
- }
- } else if (root.isFile()) {
- if (root.getName().equals("launcher")) //$NON-NLS-1$
- root.renameTo(new File(root.getParentFile(), "eclipse")); //$NON-NLS-1$
- else if (root.getName().equals("launcher.exe")) //$NON-NLS-1$
- root.renameTo(new File(root.getParentFile(), "eclipse.exe")); //$NON-NLS-1$
- }
- }
-
- protected void publishArtifact(IArtifactDescriptor descriptor, File[] files, IArtifactRepository destination, boolean asIs) {
- publishArtifact(descriptor, files, destination, asIs, null);
- }
-
- // Put the artifact on the server
- /**
- * @deprecated moved to AbstractPublishingAction
- */
- protected void publishArtifact(IArtifactDescriptor descriptor, File[] files, IArtifactRepository destination, boolean asIs, File root) {
- if (descriptor == null || destination == null)
- return;
- if (!info.publishArtifacts()) {
- destination.addDescriptor(descriptor);
- return;
- }
- if (asIs && files.length == 1) {
- try {
- if (!destination.contains(descriptor)) {
- if (destination instanceof IFileArtifactRepository) {
- //if the file is already in the same location the repo will put it, just add the descriptor and exit
- File descriptorFile = ((IFileArtifactRepository) destination).getArtifactFile(descriptor);
- if (files[0].equals(descriptorFile)) {
- destination.addDescriptor(descriptor);
- return;
- }
- }
- OutputStream output = new BufferedOutputStream(destination.getOutputStream(descriptor));
- FileUtils.copyStream(new BufferedInputStream(new FileInputStream(files[0])), true, output, true);
- }
- } catch (ProvisionException e) {
- LogHelper.log(e.getStatus());
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error publishing artifacts", e)); //$NON-NLS-1$
- }
- } else {
- File tempFile = null;
- try {
- tempFile = File.createTempFile("p2.generator", ""); //$NON-NLS-1$ //$NON-NLS-2$
- IPathComputer computer = null;
- if (root != null)
- computer = FileUtils.createRootPathComputer(root);
- else
- computer = FileUtils.createDynamicPathComputer(1);
- FileUtils.zip(files, null, tempFile, computer);
- if (!destination.contains(descriptor)) {
- destination.setProperty(IArtifactDescriptor.DOWNLOAD_CONTENTTYPE, IArtifactDescriptor.TYPE_ZIP);
- OutputStream output = new BufferedOutputStream(destination.getOutputStream(descriptor));
- FileUtils.copyStream(new BufferedInputStream(new FileInputStream(tempFile)), true, output, true);
- }
- } catch (ProvisionException e) {
- LogHelper.log(e.getStatus());
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error publishing artifacts", e)); //$NON-NLS-1$
- } finally {
- if (tempFile != null)
- tempFile.delete();
- }
- }
- }
-
- public void setGenerateRootIU(boolean generateRootIU) {
- this.generateRootIU = generateRootIU;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/GeneratorBundleInfo.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/GeneratorBundleInfo.java
deleted file mode 100644
index fdfef7d10..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/GeneratorBundleInfo.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-
-public class GeneratorBundleInfo extends BundleInfo {
- // public static final int NO_LEVEL = -1;
-
- // private String symbolicName;
- // private String version;
- // private String location;
- // private int expectedState;
- // private int startLevel = NO_LEVEL;
- // private String manifest;
-
- private String specialConfigCommands;
- private String specialUnconfigCommands;
-
- public GeneratorBundleInfo(BundleInfo bInfo) {
- super.setBundleId(bInfo.getBundleId());
- super.setLocation(bInfo.getLocation());
- super.setManifest(bInfo.getManifest());
- super.setMarkedAsStarted(bInfo.isMarkedAsStarted());
- super.setResolved(bInfo.isResolved());
- super.setStartLevel(bInfo.getStartLevel());
- super.setSymbolicName(bInfo.getSymbolicName());
- super.setVersion(bInfo.getVersion());
- }
-
- public GeneratorBundleInfo() {
- // TODO Auto-generated constructor stub
- }
-
- // /* (non-Javadoc)
- // * @see java.lang.Object#hashCode()
- // */
- // public int hashCode() {
- // int result = symbolicName == null ? 0 : symbolicName.hashCode();
- // result = result + (version == null ? 0 : version.hashCode());
- // result = result + (location == null ? 0 : location.hashCode());
- // return result;
- // }
- //
- // public String getSymbolicName() {
- // return symbolicName;
- // }
- //
- // public String getVersion() {
- // return version;
- // }
- //
- // public int expectedState() {
- // return expectedState;
- // }
- //
- // public int getStartLevel() {
- // return startLevel;
- // }
- //
- // public String getLocation() {
- // return location;
- // }
- //
- // public void setSymbolicName(String id) {
- // symbolicName = id;
- // }
- //
- // public void setVersion(String version) {
- // this.version = version;
- // }
- //
- // public void setExpectedState(int state) {
- // expectedState = state;
- // }
- //
- // public void setStartLevel(int level) {
- // this.startLevel = level;
- // }
- //
- // public void setLocation(String location) {
- // this.location = location;
- // }
- //
- // public void setManifest(String manifest) {
- // this.manifest = manifest;
- // }
- //
- // public String getManifest() {
- // return manifest;
- // }
- //
- public String getSpecialConfigCommands() {
- return specialConfigCommands;
- }
-
- public void setSpecialConfigCommands(String specialConfigCommands) {
- this.specialConfigCommands = specialConfigCommands;
- }
-
- public String getSpecialUnconfigCommands() {
- return specialUnconfigCommands;
- }
-
- public void setSpecialUnconfigCommands(String specialUnconfigCommands) {
- this.specialUnconfigCommands = specialUnconfigCommands;
- }
-
- // /* (non-Javadoc)
- // * @see java.lang.Object#equals(java.lang.Object)
- // */
- // public boolean equals(Object toCompare) {
- // if (toCompare instanceof GeneratorBundleInfo) {
- // GeneratorBundleInfo info = (GeneratorBundleInfo) toCompare;
- // if (info.symbolicName.equals(symbolicName) && info.version.equals(version) && (info.location == null || location == null ? true : info.location.equals(location)))
- // return true;
- // }
- // return false;
- // }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- String superSt = super.toString();
- if (superSt.length() > 0)
- buffer.append(superSt.substring(0, superSt.length() - 1));
- buffer.append(", this.specialConfigCommands="); //$NON-NLS-1$
- buffer.append(this.specialConfigCommands);
- buffer.append(')');
- return buffer.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IGeneratorInfo.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IGeneratorInfo.java
deleted file mode 100644
index 21dd8e27a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IGeneratorInfo.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-
-import java.io.File;
-import java.net.URI;
-import java.util.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-
-public interface IGeneratorInfo {
-
- /**
- * Returns whether or not to add the default IUs to the published result.
- * The default IUs are typically used to configure bundles, features and
- * source bundles.
- * @return whether or not to publish default IUs
- */
- public boolean addDefaultIUs();
-
- /**
- * Returns whether or not to append to existing repositories or overwrite.
- * @return whether or not to append to existing repositories or overwrite.
- */
- public boolean append();
-
- /**
- * Returns the artifact repository into which any publishable artifacts are published
- * or <code>null</code> if none.
- * @return a destination artifact repository or <code>null</code>
- */
- public IArtifactRepository getArtifactRepository();
-
- /**
- * Returns a list of locations in which bundles may be found. The locations may
- * be directories to search or actual bundle files.
- * @return the list of locations holding bundles to process.
- */
- public File[] getBundleLocations();
-
- /**
- * Return the configuration data to use during publishing or <code>null</code>
- * if none. The configuration data details the framework and launcher setup.
- *
- * @return the configuration data or <code>null</code>
- */
- public ConfigData getConfigData();
-
- public ArrayList getDefaultIUs(Set ius);
-
- public File getExecutableLocation();
-
- public File getFeaturesLocation();
-
- public String getFlavor();
-
- public File getJRELocation();
-
- /**
- * The platform for the data this location
- * @return Returns a pde.build style platform config in the form os_ws_arch
- */
- public String getLauncherConfig();
-
- public LauncherData getLauncherData();
-
- public IMetadataRepository getMetadataRepository();
-
- public String getRootId();
-
- public String getRootVersion();
-
- public String getProductFile();
-
- public String getVersionAdvice();
-
- /**
- * Returns the location of the site.xml file, or <code>null</code> if not
- * generating for an update site.
- * @return The location of site.xml, or <code>null</code>
- */
- public URI getSiteLocation();
-
- public boolean publishArtifactRepository();
-
- public boolean publishArtifacts();
-
- public boolean reuseExistingPack200Files();
-
- public void reuseExistingPack200Files(boolean publishPack);
-
- public void setArtifactRepository(IArtifactRepository value);
-
- public void setFlavor(String value);
-
- public void setMetadataRepository(IMetadataRepository value);
-
- public void setPublishArtifacts(boolean value);
-
- public void setRootId(String value);
-
- public void setVersionAdvice(String advice);
-
- // TODO: This is kind of ugly. It's purpose is to allow us to craft CUs that we know about and need for our build
- // We should try to replace this with something more generic prior to release
- public Collection getOtherIUs();
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IncrementalGenerator.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IncrementalGenerator.java
deleted file mode 100644
index cb90025f1..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IncrementalGenerator.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-
-import org.eclipse.equinox.internal.p2.metadata.generator.EclipseGeneratorApplication;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.Generator.GeneratorResult;
-
-/**
- * A class to enable carrying GeneratorResults across multiple invocations of the Generator.
- * Done here in the bundle instead of in GeneratorTask because of the way org.eclipse.ant.core.AntRunner uses class loaders.
- * @since 1.0
- */
-
-public class IncrementalGenerator {
- private static String MODE_INCREMENTAL = "incremental"; //$NON-NLS-1$
- private String mode = null;
- static private GeneratorResult result = null;
-
- public void setMode(String mode) {
- this.mode = mode;
- }
-
- public void run(EclipseGeneratorApplication generator, EclipseInstallGeneratorInfoProvider provider) throws Exception {
- if (MODE_INCREMENTAL.equals(mode)) {
- if (result == null)
- result = new GeneratorResult();
- generator.setIncrementalResult(result);
- generator.setGeneratorRootIU(false);
- } else if ("final".equals(mode) && result != null) { //$NON-NLS-1$
- generator.setIncrementalResult(result);
- generator.setGeneratorRootIU(true);
- }
-
- generator.run(provider);
-
- if (!MODE_INCREMENTAL.equals(mode)) {
- result = null;
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java
deleted file mode 100644
index 53efbdb07..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java
+++ /dev/null
@@ -1,1434 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Genuitec, LLC - added license support
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.*;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.*;
-import org.eclipse.equinox.internal.p2.metadata.generator.Activator;
-import org.eclipse.equinox.internal.p2.metadata.generator.LocalizationHelper;
-import org.eclipse.equinox.internal.p2.metadata.generator.features.SiteCategory;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitPatchDescription;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-import org.eclipse.osgi.service.resolver.*;
-import org.eclipse.osgi.util.ManifestElement;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.Constants;
-
-/**
- * @deprecated this class has been renamed to PublisherHelper and the vast majority
- * of the function has been deprecated and moved elsewhere. See the deprecation notices there
- * for more information.
- */
-public class MetadataGeneratorHelper {
- /**
- * A capability namespace representing the type of Eclipse resource (bundle, feature, source bundle, etc)
- * @see IProvidedCapability#getNamespace()
- */
- public static final String NAMESPACE_ECLIPSE_TYPE = "org.eclipse.equinox.p2.eclipse.type"; //$NON-NLS-1$
-
- /**
- * A capability name in the {@link #NAMESPACE_ECLIPSE_TYPE} namespace
- * representing and OSGi bundle resource
- * @see IProvidedCapability#getName()
- */
- public static final String TYPE_ECLIPSE_BUNDLE = "bundle"; //$NON-NLS-1$
- /**
- * A capability name in the {@link #NAMESPACE_ECLIPSE_TYPE} namespace
- * representing a feature
- */
- public static final String TYPE_ECLIPSE_FEATURE = "feature"; //$NON-NLS-1$
-
- /**
- * A capability name in the {@link #NAMESPACE_ECLIPSE_TYPE} namespace
- * representing a source bundle
- */
- public static final String TYPE_ECLIPSE_SOURCE = "source"; //$NON-NLS-1$
-
- /**
- * A capability namespace representing the localization (translation)
- * of strings from a specified IU in a specified locale
- * @see IProvidedCapability#getNamespace()
- * TODO: this should be in API, probably in IInstallableUnit
- */
- public static final String NAMESPACE_IU_LOCALIZATION = "org.eclipse.equinox.p2.localization"; //$NON-NLS-1$
-
- // Only certain properties in the bundle manifest are assumed to be localized.
- public static final String[] BUNDLE_LOCALIZED_PROPERTIES = {Constants.BUNDLE_NAME, Constants.BUNDLE_DESCRIPTION, Constants.BUNDLE_VENDOR, Constants.BUNDLE_CONTACTADDRESS, Constants.BUNDLE_DOCURL, Constants.BUNDLE_UPDATELOCATION};
- public static final int BUNDLE_LOCALIZATION_INDEX = BUNDLE_LOCALIZED_PROPERTIES.length;
-
- private static final String[] BUNDLE_IU_PROPERTY_MAP = {Constants.BUNDLE_NAME, IInstallableUnit.PROP_NAME, Constants.BUNDLE_DESCRIPTION, IInstallableUnit.PROP_DESCRIPTION, Constants.BUNDLE_VENDOR, IInstallableUnit.PROP_PROVIDER, Constants.BUNDLE_CONTACTADDRESS, IInstallableUnit.PROP_CONTACT, Constants.BUNDLE_DOCURL, IInstallableUnit.PROP_DOC_URL};
-
- private static final String CAPABILITY_NS_JAVA_PACKAGE = "java.package"; //$NON-NLS-1$
- private static final String CAPABILITY_NS_OSGI_BUNDLE = "osgi.bundle"; //$NON-NLS-1$
- private static final String CAPABILITY_NS_OSGI_FRAGMENT = "osgi.fragment"; //$NON-NLS-1$
-
- private static final String CAPABILITY_NS_UPDATE_FEATURE = "org.eclipse.update.feature"; //$NON-NLS-1$
-
- private static final Version DEFAULT_JRE_VERSION = Version.create("1.6"); //$NON-NLS-1$
-
- public static final String ECLIPSE_FEATURE_CLASSIFIER = "org.eclipse.update.feature"; //$NON-NLS-1$
- public static final String OSGI_BUNDLE_CLASSIFIER = "osgi.bundle"; //$NON-NLS-1$
- public static final String BINARY_ARTIFACT_CLASSIFIER = "binary"; //$NON-NLS-1$
-
- public static final IMatchExpression INSTALL_FEATURES_FILTER = InstallableUnit.parseFilter("(org.eclipse.update.install.features=true)"); //$NON-NLS-1$
-
- private static final String IU_NAMESPACE = IInstallableUnit.NAMESPACE_IU_ID;
-
- private static final String LAUNCHER_ID_PREFIX = "org.eclipse.launcher"; //$NON-NLS-1$
-
- private static final String ECLIPSE_INSTALL_HANDLER_PROP = "org.eclipse.update.installHandler"; //$NON-NLS-1$
- private static final String UPDATE_FEATURE_APPLICATION_PROP = "org.eclipse.update.feature.application"; //$NON-NLS-1$
- private static final String UPDATE_FEATURE_PLUGIN_PROP = "org.eclipse.update.feature.plugin"; //$NON-NLS-1$
- private static final String UPDATE_FEATURE_EXCLUSIVE_PROP = "org.eclipse.update.feature.exclusive"; //$NON-NLS-1$
- private static final String UPDATE_FEATURE_PRIMARY_PROP = "org.eclipse.update.feature.primary"; //$NON-NLS-1$
-
- //TODO - need to come up with a way to infer launcher version
- private static final Version LAUNCHER_VERSION = Version.createOSGi(1, 0, 0);
-
- public static final ITouchpointType TOUCHPOINT_NATIVE = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.native", Version.createOSGi(1, 0, 0)); //$NON-NLS-1$
- public static final ITouchpointType TOUCHPOINT_OSGI = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.osgi", Version.createOSGi(1, 0, 0)); //$NON-NLS-1$
-
- public static final IProvidedCapability BUNDLE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, Version.createOSGi(1, 0, 0));
- public static final IProvidedCapability FEATURE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_FEATURE, Version.createOSGi(1, 0, 0));
- public static final IProvidedCapability SOURCE_BUNDLE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_SOURCE, Version.createOSGi(1, 0, 0));
-
- static final String DEFAULT_BUNDLE_LOCALIZATION = "plugin"; //$NON-NLS-1$
-
- static final String BUNDLE_ADVICE_FILE = "META-INF/p2.inf"; //$NON-NLS-1$
- static final String ADVICE_INSTRUCTIONS_PREFIX = "instructions."; //$NON-NLS-1$
-
- static final String NAMESPACE_FLAVOR = "org.eclipse.equinox.p2.flavor"; //$NON-NLS-1$"
-
- public static IArtifactDescriptor createArtifactDescriptor(IArtifactKey key, File pathOnDisk, boolean asIs, boolean recur) {
- //TODO this size calculation is bogus
- ArtifactDescriptor result = new ArtifactDescriptor(key);
- if (pathOnDisk != null) {
- result.setProperty(IArtifactDescriptor.ARTIFACT_SIZE, Long.toString(pathOnDisk.length()));
- // TODO - this is wrong but I'm testing a work-around for bug 205842
- result.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, Long.toString(pathOnDisk.length()));
- }
- if (asIs) {
- String md5 = computeMD5(pathOnDisk);
- if (md5 != null)
- result.setProperty(IArtifactDescriptor.DOWNLOAD_MD5, md5);
- }
- return result;
- }
-
- private static String computeMD5(File file) {
- if (file == null || file.isDirectory() || !file.exists())
- return null;
- MessageDigest md5Checker;
- try {
- md5Checker = MessageDigest.getInstance("MD5"); //$NON-NLS-1$
- } catch (NoSuchAlgorithmException e) {
- return null;
- }
- InputStream fis = null;
- try {
- fis = new BufferedInputStream(new FileInputStream(file));
- int read = -1;
- while ((read = fis.read()) != -1) {
- md5Checker.update((byte) read);
- }
- byte[] digest = md5Checker.digest();
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < digest.length; i++) {
- if ((digest[i] & 0xFF) < 0x10)
- buf.append('0');
- buf.append(Integer.toHexString(digest[i] & 0xFF));
- }
- return buf.toString();
- } catch (FileNotFoundException e) {
- return null;
- } catch (IOException e) {
- return null;
- } finally {
- if (fis != null)
- try {
- fis.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-
- /**
- * @deprecated moved to AbstractPublishingAction
- */
- public static IArtifactDescriptor createPack200ArtifactDescriptor(IArtifactKey key, File pathOnDisk, String installSize) {
- //TODO this size calculation is bogus
- ArtifactDescriptor result = new ArtifactDescriptor(key);
- if (pathOnDisk != null) {
- result.setProperty(IArtifactDescriptor.ARTIFACT_SIZE, installSize);
- // TODO - this is wrong but I'm testing a work-around for bug 205842
- result.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, Long.toString(pathOnDisk.length()));
- }
- IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
- result.setProcessingSteps(steps);
- result.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
- return result;
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- public static IInstallableUnit createBundleConfigurationUnit(String iuId, Version iuVersion, boolean isBundleFragment, GeneratorBundleInfo configInfo, String configurationFlavor, String ldapFilter) {
- IMatchExpression filter = ldapFilter == null ? null : InstallableUnit.parseFilter(ldapFilter);
- return createBundleConfigurationUnit(iuId, iuVersion, isBundleFragment, configInfo, configurationFlavor, filter);
- }
-
- public static IInstallableUnit createBundleConfigurationUnit(String iuId, Version iuVersion, boolean isBundleFragment, GeneratorBundleInfo configInfo, String configurationFlavor, IMatchExpression filter) {
- if (configInfo == null)
- return null;
-
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configUnitId = configurationFlavor + iuId;
- cu.setId(configUnitId);
- cu.setVersion(iuVersion);
-
- //Indicate the IU to which this CU apply
- cu.setHost(new IRequirement[] { //
- MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, iuId, new VersionRange(iuVersion, true, Version.MAX_VERSION, true), null, false, false, true), //
- MetadataFactory.createRequirement(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, new VersionRange(Version.createOSGi(1, 0, 0), true, Version.createOSGi(2, 0, 0), false), null, false, false, false)});
-
- //Adds capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, iuVersion), MetadataFactory.createProvidedCapability(NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
-
- Map touchpointData = new HashMap();
- touchpointData.put("install", "installBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
- touchpointData.put("uninstall", "uninstallBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
- touchpointData.put("configure", createConfigScript(configInfo, isBundleFragment)); //$NON-NLS-1$
- touchpointData.put("unconfigure", createUnconfigScript(configInfo, isBundleFragment)); //$NON-NLS-1$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- cu.setFilter(filter);
- return MetadataFactory.createInstallableUnit(cu);
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- public static IInstallableUnit createBundleIU(BundleDescription bd, Map manifest, boolean isFolderPlugin, IArtifactKey key, boolean useNestedAdvice) {
- Map manifestLocalizations = null;
- if (manifest != null && bd.getLocation() != null) {
- manifestLocalizations = getManifestLocalizations(manifest, new File(bd.getLocation()));
- }
-
- return createBundleIU(bd, manifest, isFolderPlugin, key, manifestLocalizations, useNestedAdvice);
- }
-
- private static VersionRange computeUpdateRange(org.osgi.framework.Version base) {
- VersionRange updateRange = null;
- if (!base.equals(org.osgi.framework.Version.emptyVersion)) {
- updateRange = new VersionRange(Version.emptyVersion, true, fromOSGiVersion(base), false);
- } else {
- updateRange = VersionRange.emptyRange;
- }
- return updateRange;
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- public static IInstallableUnit createBundleIU(BundleDescription bd, Map manifest, boolean isFolderPlugin, IArtifactKey key, Map manifestLocalizations, boolean useNestedAdvice) {
- boolean isBinaryBundle = true;
- if (manifest != null && manifest.containsKey("Eclipse-SourceBundle")) { //$NON-NLS-1$
- isBinaryBundle = false;
- }
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- iu.setSingleton(bd.isSingleton());
- iu.setId(bd.getSymbolicName());
- iu.setVersion(fromOSGiVersion(bd.getVersion()));
- iu.setFilter(bd.getPlatformFilter());
-
- iu.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(bd.getSymbolicName(), computeUpdateRange(bd.getVersion()), IUpdateDescriptor.NORMAL, null));
-
- boolean isFragment = bd.getHost() != null;
- // boolean requiresAFragment = isFragment ? false : requireAFragment(bd, manifest);
-
- //Process the required bundles
- BundleSpecification requiredBundles[] = bd.getRequiredBundles();
- ArrayList reqsDeps = new ArrayList();
- // if (requiresAFragment)
- // reqsDeps.add(MetadataFactory.createRequiredCapability(CAPABILITY_TYPE_OSGI_FRAGMENTS, bd.getSymbolicName(), VersionRange.emptyRange, null, false, false));
- if (isFragment)
- reqsDeps.add(MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, bd.getHost().getName(), fromOSGiVersionRange(bd.getHost().getVersionRange()), null, false, false));
- for (int j = 0; j < requiredBundles.length; j++)
- reqsDeps.add(MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, requiredBundles[j].getName(), fromOSGiVersionRange(requiredBundles[j].getVersionRange()), null, requiredBundles[j].isOptional(), false));
-
- // Process the import packages
- ImportPackageSpecification osgiImports[] = bd.getImportPackages();
- for (int i = 0; i < osgiImports.length; i++) {
- // TODO we need to sort out how we want to handle wild-carded dynamic imports - for now we ignore them
- ImportPackageSpecification importSpec = osgiImports[i];
- String importPackageName = importSpec.getName();
- if (importPackageName.indexOf('*') != -1)
- continue;
-
- VersionRange versionRange = fromOSGiVersionRange(importSpec.getVersionRange());
-
- //TODO this needs to be refined to take into account all the attribute handled by imports
- reqsDeps.add(MetadataFactory.createRequirement(CAPABILITY_NS_JAVA_PACKAGE, importPackageName, versionRange, null, isOptional(importSpec), false));
- }
- iu.setRequirements((IRequirement[]) reqsDeps.toArray(new IRequirement[reqsDeps.size()]));
-
- // Create set of provided capabilities
- ArrayList providedCapabilities = new ArrayList();
- providedCapabilities.add(createSelfCapability(bd.getSymbolicName(), fromOSGiVersion(bd.getVersion())));
- providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_OSGI_BUNDLE, bd.getSymbolicName(), fromOSGiVersion(bd.getVersion())));
-
- // Process the export package
- ExportPackageDescription exports[] = bd.getExportPackages();
- for (int i = 0; i < exports.length; i++) {
- //TODO make sure that we support all the refinement on the exports
- providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_JAVA_PACKAGE, exports[i].getName(), fromOSGiVersion(exports[i].getVersion())));
- }
- // Here we add a bundle capability to identify bundles
- if (isBinaryBundle)
- providedCapabilities.add(BUNDLE_CAPABILITY);
- else
- providedCapabilities.add(SOURCE_BUNDLE_CAPABILITY);
-
- if (isFragment)
- providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_OSGI_FRAGMENT, bd.getHost().getName(), fromOSGiVersion(bd.getVersion())));
-
- if (manifestLocalizations != null) {
- for (Iterator iter = manifestLocalizations.keySet().iterator(); iter.hasNext();) {
- Locale locale = (Locale) iter.next();
- Properties translatedStrings = (Properties) manifestLocalizations.get(locale);
- Enumeration propertyKeys = translatedStrings.propertyNames();
- while (propertyKeys.hasMoreElements()) {
- String nextKey = (String) propertyKeys.nextElement();
- iu.setProperty(locale.toString() + '.' + nextKey, translatedStrings.getProperty(nextKey));
- }
- providedCapabilities.add(makeTranslationCapability(bd.getSymbolicName(), locale));
- }
- }
-
- iu.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
-
- iu.setArtifacts(new IArtifactKey[] {key});
-
- iu.setTouchpointType(TOUCHPOINT_OSGI);
-
- // Set certain properties from the manifest header attributes as IU properties.
- // The values of these attributes may be localized (strings starting with '%')
- // with the translated values appearing in the localization IU fragments
- // associated with the bundle IU.
- if (manifest != null) {
- int i = 0;
- while (i < BUNDLE_IU_PROPERTY_MAP.length) {
- if (manifest.containsKey(BUNDLE_IU_PROPERTY_MAP[i])) {
- String value = (String) manifest.get(BUNDLE_IU_PROPERTY_MAP[i]);
- if (value != null && value.length() > 0) {
- iu.setProperty(BUNDLE_IU_PROPERTY_MAP[i + 1], value);
- }
- }
- i += 2;
- }
- }
-
- // Define the immutable metadata for this IU. In this case immutable means
- // that this is something that will not impact the configuration.
- Map touchpointData = new HashMap();
- if (isFolderPlugin)
- touchpointData.put("zipped", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- touchpointData.put("manifest", toManifestString(manifest)); //$NON-NLS-1$
-
- if (useNestedAdvice)
- mergeInstructionsAdvice(touchpointData, getBundleAdvice(bd.getLocation(), BUNDLE_ADVICE_FILE));
-
- iu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
-
- return MetadataFactory.createInstallableUnit(iu);
- }
-
- /**
- * @deprecated moved to AdviceFileAdvice
- */
- public static void mergeInstructionsAdvice(Map touchpointData, Map bundleAdvice) {
- if (touchpointData == null || bundleAdvice == null)
- return;
-
- for (Iterator iterator = bundleAdvice.keySet().iterator(); iterator.hasNext();) {
- String key = (String) iterator.next();
- if (key.startsWith(ADVICE_INSTRUCTIONS_PREFIX)) {
- String phase = key.substring(ADVICE_INSTRUCTIONS_PREFIX.length());
- String instructions = touchpointData.containsKey(phase) ? (String) touchpointData.get(phase) : ""; //$NON-NLS-1$
- if (instructions.length() > 0)
- instructions += ";"; //$NON-NLS-1$
- instructions += ((String) bundleAdvice.get(key)).trim();
- touchpointData.put(phase, instructions);
- }
- }
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- public static void createHostLocalizationFragment(IInstallableUnit bundleIU, BundleDescription bd, String hostId, String[] hostBundleManifestValues, Set localizationIUs) {
- Map hostLocalizations = getHostLocalizations(new File(bd.getLocation()), hostBundleManifestValues);
- if (hostLocalizations != null) {
- IInstallableUnitFragment localizationFragment = createLocalizationFragmentOfHost(bd, hostId, hostBundleManifestValues, hostLocalizations);
- localizationIUs.add(localizationFragment);
- }
- }
-
- /*
- * @param hostId
- * @param bd
- * @param locale
- * @param localizedStrings
- * @return installableUnitFragment
- */
- /**
- * @deprecated moved to BundlesAction
- */
- private static IInstallableUnitFragment createLocalizationFragmentOfHost(BundleDescription bd, String hostId, String[] hostManifestValues, Map hostLocalizations) {
- InstallableUnitFragmentDescription fragment = new MetadataFactory.InstallableUnitFragmentDescription();
- String fragmentId = makeHostLocalizationFragmentId(bd.getSymbolicName());
- fragment.setId(fragmentId);
- fragment.setVersion(fromOSGiVersion(bd.getVersion())); // TODO: is this a meaningful version?
-
- HostSpecification hostSpec = bd.getHost();
- IRequirement[] hostReqs = new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, hostSpec.getName(), fromOSGiVersionRange(hostSpec.getVersionRange()), null, false, false, false)};
- fragment.setHost(hostReqs);
-
- fragment.setSingleton(true);
- fragment.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
-
- // Create a provided capability for each locale and add the translated properties.
- ArrayList providedCapabilities = new ArrayList(hostLocalizations.keySet().size());
- for (Iterator iter = hostLocalizations.keySet().iterator(); iter.hasNext();) {
- Locale locale = (Locale) iter.next();
- Properties translatedStrings = (Properties) hostLocalizations.get(locale);
-
- Enumeration propertyKeys = translatedStrings.propertyNames();
- while (propertyKeys.hasMoreElements()) {
- String nextKey = (String) propertyKeys.nextElement();
- fragment.setProperty(locale.toString() + '.' + nextKey, translatedStrings.getProperty(nextKey));
- }
- providedCapabilities.add(makeTranslationCapability(hostId, locale));
- }
- fragment.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
-
- return MetadataFactory.createInstallableUnitFragment(fragment);
- }
-
- /**
- * @param id
- * @return the id for the iu fragment containing the localized properties
- * for the bundle with the given id
- */
- // private static String makeBundleLocalizationFragmentId(String id) {
- // return id + ".translated_properties"; //$NON-NLS-1$
- // }
- /**
- * @param id
- * @return the id for the iu fragment containing localized properties
- * for the fragment with the given id.
- */
- /**
- * @deprecated moved to BundlesAction
- */
- private static String makeHostLocalizationFragmentId(String id) {
- return id + ".translated_host_properties"; //$NON-NLS-1$
- }
-
- private static IProvidedCapability makeTranslationCapability(String hostId, Locale locale) {
- return MetadataFactory.createProvidedCapability(NAMESPACE_IU_LOCALIZATION, locale.toString(), Version.createOSGi(1, 0, 0));
- }
-
- /**
- * Creates an IU corresponding to an update site category
- * @param category The category descriptor
- * @param featureIUs The IUs of the features that belong to the category
- * @param parentCategory The parent category, or <code>null</code>
- * @return an IU representing the category
- * @deprecated moved to SiteXMLAction
- */
- public static IInstallableUnit createCategoryIU(SiteCategory category, Set featureIUs, IInstallableUnit parentCategory) {
- InstallableUnitDescription cat = new MetadataFactory.InstallableUnitDescription();
- cat.setSingleton(true);
- String categoryId = category.getName();
- cat.setId(categoryId);
- cat.setVersion(Version.emptyVersion);
- cat.setProperty(IInstallableUnit.PROP_NAME, category.getLabel());
- cat.setProperty(IInstallableUnit.PROP_DESCRIPTION, category.getDescription());
-
- ArrayList reqsConfigurationUnits = new ArrayList(featureIUs.size());
- for (Iterator iterator = featureIUs.iterator(); iterator.hasNext();) {
- IInstallableUnit iu = (IInstallableUnit) iterator.next();
- VersionRange range = new VersionRange(iu.getVersion(), true, iu.getVersion(), true);
- reqsConfigurationUnits.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, iu.getFilter() == null ? null : iu.getFilter(), false, false));
- }
- //note that update sites don't currently support nested categories, but it may be useful to add in the future
- if (parentCategory != null) {
- reqsConfigurationUnits.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, parentCategory.getId(), VersionRange.emptyRange, parentCategory.getFilter() == null ? null : parentCategory.getFilter(), false, false));
- }
- cat.setRequirements((IRequirement[]) reqsConfigurationUnits.toArray(new IRequirement[reqsConfigurationUnits.size()]));
-
- // Create set of provided capabilities
- ArrayList providedCapabilities = new ArrayList();
- providedCapabilities.add(createSelfCapability(categoryId, Version.emptyVersion));
-
- Map localizations = category.getLocalizations();
- if (localizations != null) {
- for (Iterator iter = localizations.keySet().iterator(); iter.hasNext();) {
- Locale locale = (Locale) iter.next();
- Properties translatedStrings = (Properties) localizations.get(locale);
- Enumeration propertyKeys = translatedStrings.propertyNames();
- while (propertyKeys.hasMoreElements()) {
- String nextKey = (String) propertyKeys.nextElement();
- cat.setProperty(locale.toString() + '.' + nextKey, translatedStrings.getProperty(nextKey));
- }
- providedCapabilities.add(makeTranslationCapability(categoryId, locale));
- }
- }
-
- cat.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
-
- cat.setArtifacts(new IArtifactKey[0]);
- cat.setProperty(InstallableUnitDescription.PROP_TYPE_CATEGORY, "true"); //$NON-NLS-1$
- return MetadataFactory.createInstallableUnit(cat);
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- private static String createConfigScript(GeneratorBundleInfo configInfo, boolean isBundleFragment) {
- if (configInfo == null)
- return ""; //$NON-NLS-1$
-
- String configScript = "";//$NON-NLS-1$
- if (!isBundleFragment && configInfo.getStartLevel() != BundleInfo.NO_LEVEL) {
- configScript += "setStartLevel(startLevel:" + configInfo.getStartLevel() + ");"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (!isBundleFragment && configInfo.isMarkedAsStarted()) {
- configScript += "markStarted(started: true);"; //$NON-NLS-1$
- }
-
- if (configInfo.getSpecialConfigCommands() != null) {
- configScript += configInfo.getSpecialConfigCommands();
- }
-
- return configScript;
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- private static String createDefaultBundleConfigScript(GeneratorBundleInfo configInfo) {
- return createConfigScript(configInfo, false);
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- public static IInstallableUnit createDefaultBundleConfigurationUnit(GeneratorBundleInfo configInfo, GeneratorBundleInfo unconfigInfo, String configurationFlavor) {
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configUnitId = createDefaultConfigUnitId(OSGI_BUNDLE_CLASSIFIER, configurationFlavor);
- cu.setId(configUnitId);
- Version configUnitVersion = Version.createOSGi(1, 0, 0);
- cu.setVersion(configUnitVersion);
-
- // Add capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
-
- // Create a required capability on bundles
- IRequirement[] reqs = new IRequirement[] {MetadataFactory.createRequirement(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, VersionRange.emptyRange, null, false, true, false)};
- cu.setHost(reqs);
- Map touchpointData = new HashMap();
-
- touchpointData.put("install", "installBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
- touchpointData.put("uninstall", "uninstallBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
- touchpointData.put("configure", createDefaultBundleConfigScript(configInfo)); //$NON-NLS-1$
- touchpointData.put("unconfigure", createDefaultBundleUnconfigScript(unconfigInfo)); //$NON-NLS-1$
-
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- return MetadataFactory.createInstallableUnit(cu);
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- private static String createDefaultBundleUnconfigScript(GeneratorBundleInfo unconfigInfo) {
- return createUnconfigScript(unconfigInfo, false);
- }
-
- public static String createDefaultConfigUnitId(String classifier, String configurationFlavor) {
- return configurationFlavor + "." + classifier + ".default"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public static IInstallableUnit createDefaultFeatureConfigurationUnit(String configurationFlavor) {
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configUnitId = createDefaultConfigUnitId(ECLIPSE_FEATURE_CLASSIFIER, configurationFlavor);
- cu.setId(configUnitId);
- Version configUnitVersion = Version.createOSGi(1, 0, 0);
- cu.setVersion(configUnitVersion);
-
- // Add capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
-
- // Create a required capability on features
- IRequirement[] reqs = new IRequirement[] {MetadataFactory.createRequirement(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_FEATURE, VersionRange.emptyRange, null, true, true, false)};
- cu.setHost(reqs);
-
- cu.setFilter(INSTALL_FEATURES_FILTER);
- Map touchpointData = new HashMap();
- touchpointData.put("install", "installFeature(feature:${artifact},featureId:default,featureVersion:default)"); //$NON-NLS-1$//$NON-NLS-2$
- touchpointData.put("uninstall", "uninstallFeature(feature:${artifact},featureId:default,featureVersion:default)"); //$NON-NLS-1$//$NON-NLS-2$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
-
- return MetadataFactory.createInstallableUnit(cu);
- }
-
- public static IInstallableUnit createDefaultConfigurationUnitForSourceBundles(String configurationFlavor) {
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configUnitId = createDefaultConfigUnitId("source", configurationFlavor); //$NON-NLS-1$
- cu.setId(configUnitId);
- Version configUnitVersion = Version.createOSGi(1, 0, 0);
- cu.setVersion(configUnitVersion);
-
- // Add capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
-
- // Create a required capability on source providers
- IRequirement[] reqs = new IRequirement[] {MetadataFactory.createRequirement(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_SOURCE, VersionRange.emptyRange, null, true, true, false)};
- cu.setHost(reqs);
- Map touchpointData = new HashMap();
-
- touchpointData.put("install", "addSourceBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
- touchpointData.put("uninstall", "removeSourceBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- return MetadataFactory.createInstallableUnit(cu);
- }
-
- /**
- * @deprecated moved to FeaturesAction
- */
- public static IArtifactKey createFeatureArtifactKey(String fsn, String version) {
- return new ArtifactKey(ECLIPSE_FEATURE_CLASSIFIER, fsn, Version.create(version));
- }
-
- /**
- * @deprecated moved to FeaturesAction
- */
- public static IInstallableUnit createFeatureJarIU(Feature feature, boolean isExploded) {
- return createFeatureJarIU(feature, isExploded, null);
- }
-
- /**
- * @deprecated moved to FeaturesAction
- */
- public static IInstallableUnit createFeatureJarIU(Feature feature, boolean isExploded, Properties extraProperties) {
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- String id = getTransformedId(feature.getId(), /*isPlugin*/false, /*isGroup*/false);
- iu.setId(id);
- Version version = fromOSGiVersion(new org.osgi.framework.Version(feature.getVersion()));
- iu.setVersion(version);
- iu.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, computeUpdateRange(new org.osgi.framework.Version(feature.getVersion())), IUpdateDescriptor.NORMAL, null));
- iu.setProperty(IInstallableUnit.PROP_NAME, feature.getLabel());
- if (feature.getDescription() != null)
- iu.setProperty(IInstallableUnit.PROP_DESCRIPTION, feature.getDescription());
- if (feature.getDescriptionURL() != null)
- iu.setProperty(IInstallableUnit.PROP_DESCRIPTION_URL, feature.getDescriptionURL());
- if (feature.getProviderName() != null)
- iu.setProperty(IInstallableUnit.PROP_PROVIDER, feature.getProviderName());
- if (feature.getLicense() != null)
- iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense())});
- if (feature.getCopyright() != null)
- iu.setCopyright(MetadataFactory.createCopyright(toURIOrNull(feature.getCopyrightURL()), feature.getCopyright()));
- if (feature.getApplication() != null)
- iu.setProperty(UPDATE_FEATURE_APPLICATION_PROP, feature.getApplication());
- if (feature.getPlugin() != null)
- iu.setProperty(UPDATE_FEATURE_PLUGIN_PROP, feature.getPlugin());
- if (feature.isExclusive())
- iu.setProperty(UPDATE_FEATURE_EXCLUSIVE_PROP, Boolean.TRUE.toString());
- if (feature.isPrimary())
- iu.setProperty(UPDATE_FEATURE_PRIMARY_PROP, Boolean.TRUE.toString());
-
- // The required capabilities are not specified at this level because we don't want the feature jar to be attractive to install.
-
- iu.setTouchpointType(TOUCHPOINT_OSGI);
- iu.setFilter(INSTALL_FEATURES_FILTER);
- iu.setSingleton(true);
-
- if (feature.getInstallHandler() != null && feature.getInstallHandler().trim().length() > 0) {
- String installHandlerProperty = "handler=" + feature.getInstallHandler(); //$NON-NLS-1$
-
- if (feature.getInstallHandlerLibrary() != null)
- installHandlerProperty += ", library=" + feature.getInstallHandlerLibrary(); //$NON-NLS-1$
-
- if (feature.getInstallHandlerURL() != null)
- installHandlerProperty += ", url=" + feature.getInstallHandlerURL(); //$NON-NLS-1$
-
- iu.setProperty(ECLIPSE_INSTALL_HANDLER_PROP, installHandlerProperty);
- }
-
- // Create set of provided capabilities
- ArrayList providedCapabilities = new ArrayList();
- providedCapabilities.add(createSelfCapability(id, version));
- providedCapabilities.add(FEATURE_CAPABILITY);
- providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_UPDATE_FEATURE, feature.getId(), version));
-
- iu.setArtifacts(new IArtifactKey[] {createFeatureArtifactKey(feature.getId(), version.toString())});
-
- if (isExploded) {
- // Define the immutable metadata for this IU. In this case immutable means
- // that this is something that will not impact the configuration.
- Map touchpointData = new HashMap();
- touchpointData.put("zipped", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- iu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- }
-
- Map localizations = feature.getLocalizations();
- if (localizations != null) {
- for (Iterator iter = localizations.keySet().iterator(); iter.hasNext();) {
- Locale locale = (Locale) iter.next();
- Properties translatedStrings = (Properties) localizations.get(locale);
- Enumeration propertyKeys = translatedStrings.propertyNames();
- while (propertyKeys.hasMoreElements()) {
- String nextKey = (String) propertyKeys.nextElement();
- iu.setProperty(locale.toString() + '.' + nextKey, translatedStrings.getProperty(nextKey));
- }
- providedCapabilities.add(makeTranslationCapability(id, locale));
- }
- }
-
- iu.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
-
- if (extraProperties != null) {
- Enumeration e = extraProperties.propertyNames();
- while (e.hasMoreElements()) {
- String name = (String) e.nextElement();
- iu.setProperty(name, extraProperties.getProperty(name));
- }
- }
-
- return MetadataFactory.createInstallableUnit(iu);
- }
-
- /**
- * @deprecated moved to FeaturesAction
- */
- public static IInstallableUnit createGroupIU(Feature feature, IInstallableUnit featureIU) {
- return createGroupIU(feature, featureIU, null, true);
- }
-
- public static IInstallableUnit createGroupIU(Feature feature, IInstallableUnit featureIU, Properties extraProperties, boolean transformIds) {
- if (isPatch(feature))
- return createPatchIU(feature, featureIU, extraProperties);
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- String id = feature.getId();
- if (transformIds)
- id = getTransformedId(id, /*isPlugin*/false, /*isGroup*/true);
- iu.setId(id);
- Version version = fromOSGiVersion(new org.osgi.framework.Version(feature.getVersion()));
- iu.setVersion(version);
- iu.setProperty(IInstallableUnit.PROP_NAME, feature.getLabel());
- if (feature.getDescription() != null)
- iu.setProperty(IInstallableUnit.PROP_DESCRIPTION, feature.getDescription());
- if (feature.getDescriptionURL() != null)
- iu.setProperty(IInstallableUnit.PROP_DESCRIPTION_URL, feature.getDescriptionURL());
- if (feature.getProviderName() != null)
- iu.setProperty(IInstallableUnit.PROP_PROVIDER, feature.getProviderName());
- if (feature.getLicense() != null)
- iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense())});
- if (feature.getCopyright() != null)
- iu.setCopyright(MetadataFactory.createCopyright(toURIOrNull(feature.getCopyrightURL()), feature.getCopyright()));
- iu.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, computeUpdateRange(new org.osgi.framework.Version(feature.getVersion())), IUpdateDescriptor.NORMAL, null));
-
- FeatureEntry entries[] = feature.getEntries();
- IRequirement[] required = new IRequirement[entries.length + (featureIU == null ? 0 : 1)];
- for (int i = 0; i < entries.length; i++) {
- VersionRange range = getVersionRange(entries[i]);
- String requiredId = entries[i].getId();
- if (transformIds)
- requiredId = getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true);
- required[i] = MetadataFactory.createRequirement(IU_NAMESPACE, requiredId, range, getFilter(entries[i]), entries[i].isOptional(), false);
- }
- // the feature IU could be null if we are just generating a feature structure rather than
- // actual features.
- if (featureIU != null)
- required[entries.length] = MetadataFactory.createRequirement(IU_NAMESPACE, featureIU.getId(), new VersionRange(featureIU.getVersion(), true, featureIU.getVersion(), true), INSTALL_FEATURES_FILTER, false, false);
- iu.setRequirements(required);
- iu.setTouchpointType(ITouchpointType.NONE);
- iu.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString());
- // TODO: shouldn't the filter for the group be constructed from os, ws, arch, nl
- // of the feature?
- // iu.setFilter(filter);
-
- // Create set of provided capabilities
- ArrayList providedCapabilities = new ArrayList();
- providedCapabilities.add(createSelfCapability(id, version));
-
- Map localizations = feature.getLocalizations();
- if (localizations != null) {
- for (Iterator iter = localizations.keySet().iterator(); iter.hasNext();) {
- Locale locale = (Locale) iter.next();
- Properties translatedStrings = (Properties) localizations.get(locale);
- Enumeration propertyKeys = translatedStrings.propertyNames();
- while (propertyKeys.hasMoreElements()) {
- String nextKey = (String) propertyKeys.nextElement();
- iu.setProperty(locale.toString() + '.' + nextKey, translatedStrings.getProperty(nextKey));
- }
- providedCapabilities.add(makeTranslationCapability(id, locale));
- }
- }
-
- iu.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
-
- if (extraProperties != null) {
- Enumeration e = extraProperties.propertyNames();
- while (e.hasMoreElements()) {
- String name = (String) e.nextElement();
- iu.setProperty(name, extraProperties.getProperty(name));
- }
- }
-
- return MetadataFactory.createInstallableUnit(iu);
- }
-
- public static IInstallableUnit createPatchIU(Feature feature, IInstallableUnit featureIU, Properties extraProperties) {
- InstallableUnitPatchDescription iu = new MetadataFactory.InstallableUnitPatchDescription();
- String id = getTransformedId(feature.getId(), /*isPlugin*/false, /*isGroup*/true);
- iu.setId(id);
- Version version = fromOSGiVersion(new org.osgi.framework.Version(feature.getVersion()));
- iu.setVersion(version);
- iu.setProperty(IInstallableUnit.PROP_NAME, feature.getLabel());
- if (feature.getDescription() != null)
- iu.setProperty(IInstallableUnit.PROP_DESCRIPTION, feature.getDescription());
- if (feature.getDescriptionURL() != null)
- iu.setProperty(IInstallableUnit.PROP_DESCRIPTION_URL, feature.getDescriptionURL());
- if (feature.getProviderName() != null)
- iu.setProperty(IInstallableUnit.PROP_PROVIDER, feature.getProviderName());
- if (feature.getLicense() != null)
- iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense())});
- if (feature.getCopyright() != null)
- iu.setCopyright(MetadataFactory.createCopyright(toURIOrNull(feature.getCopyrightURL()), feature.getCopyright()));
- iu.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, computeUpdateRange(new org.osgi.framework.Version(feature.getVersion())), IUpdateDescriptor.NORMAL, null));
-
- FeatureEntry entries[] = feature.getEntries();
- ArrayList applicabilityScope = new ArrayList();
- ArrayList patchRequirements = new ArrayList();
- ArrayList requirementChanges = new ArrayList();
- for (int i = 0; i < entries.length; i++) {
- VersionRange range = getVersionRange(entries[i]);
- IRequirement req = MetadataFactory.createRequirement(IU_NAMESPACE, getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true), range, getFilter(entries[i]), entries[i].isOptional(), false);
- if (entries[i].isRequires()) {
- applicabilityScope.add(req);
- if (applicabilityScope.size() == 1) {
- iu.setLifeCycle(MetadataFactory.createRequirement(IU_NAMESPACE, getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true), range, null, false, false, false));
- }
- continue;
- }
- if (entries[i].isPlugin()) {
- IRequirement from = MetadataFactory.createRequirement(IU_NAMESPACE, getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true), VersionRange.emptyRange, getFilter(entries[i]), entries[i].isOptional(), false);
- requirementChanges.add(MetadataFactory.createRequirementChange(from, req));
- continue;
- }
- patchRequirements.add(req);
- }
- //Always add a requirement on the IU containing the feature jar
- patchRequirements.add(MetadataFactory.createRequirement(IU_NAMESPACE, featureIU.getId(), new VersionRange(featureIU.getVersion(), true, featureIU.getVersion(), true), INSTALL_FEATURES_FILTER, false, false));
- iu.setRequirements((IRequirement[]) patchRequirements.toArray(new IRequirement[patchRequirements.size()]));
- iu.setApplicabilityScope(new IRequirement[][] {(IRequirement[]) applicabilityScope.toArray(new IRequirement[applicabilityScope.size()])});
- iu.setRequirementChanges((IRequirementChange[]) requirementChanges.toArray(new IRequirementChange[requirementChanges.size()]));
-
- //Generate lifecycle
- // IRequirement lifeCycle = null;
- // if (applicabilityScope.size() > 0) {
- // IRequirement req = (IRequirement) applicabilityScope.get(0);
- // }
-
- iu.setTouchpointType(ITouchpointType.NONE);
- iu.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString());
- iu.setProperty(InstallableUnitDescription.PROP_TYPE_PATCH, Boolean.TRUE.toString());
- // TODO: shouldn't the filter for the group be constructed from os, ws, arch, nl
- // of the feature?
- // iu.setFilter(filter);
-
- // Create set of provided capabilities
- ArrayList providedCapabilities = new ArrayList();
- providedCapabilities.add(createSelfCapability(id, version));
-
- Map localizations = feature.getLocalizations();
- if (localizations != null) {
- for (Iterator iter = localizations.keySet().iterator(); iter.hasNext();) {
- Locale locale = (Locale) iter.next();
- Properties translatedStrings = (Properties) localizations.get(locale);
- Enumeration propertyKeys = translatedStrings.propertyNames();
- while (propertyKeys.hasMoreElements()) {
- String nextKey = (String) propertyKeys.nextElement();
- iu.setProperty(locale.toString() + '.' + nextKey, translatedStrings.getProperty(nextKey));
- }
- providedCapabilities.add(makeTranslationCapability(id, locale));
- }
- }
-
- iu.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
-
- if (extraProperties != null) {
- Enumeration e = extraProperties.propertyNames();
- while (e.hasMoreElements()) {
- String name = (String) e.nextElement();
- iu.setProperty(name, extraProperties.getProperty(name));
- }
- }
-
- return MetadataFactory.createInstallableUnitPatch(iu);
- }
-
- private static boolean isPatch(Feature feature) {
- FeatureEntry[] entries = feature.getEntries();
- for (int i = 0; i < entries.length; i++) {
- if (entries[i].isPatch())
- return true;
- }
- return false;
- }
-
- /**
- * Creates IUs and artifact descriptors for the JRE. The resulting IUs are added
- * to the given set, and the resulting artifact descriptor, if any, is returned.
- * If the jreLocation is <code>null</code>, default information is generated.
- */
- /**
- * @deprecated moved to JREAction
- */
- public static IArtifactDescriptor createJREData(File jreLocation, Set resultantIUs) {
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- iu.setSingleton(false);
- String id = "a.jre"; //$NON-NLS-1$
- Version version = DEFAULT_JRE_VERSION;
- iu.setId(id);
- iu.setVersion(version);
- iu.setTouchpointType(TOUCHPOINT_NATIVE);
-
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configId = "config." + id;//$NON-NLS-1$
- cu.setId(configId);
- cu.setVersion(version);
- cu.setHost(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, id, new VersionRange(version, true, Version.MAX_VERSION, true), null, false, false)});
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configId, version)});
- cu.setTouchpointType(TOUCHPOINT_NATIVE);
- Map touchpointData = new HashMap();
-
- if (jreLocation == null || !jreLocation.exists()) {
- //set some reasonable defaults
- iu.setVersion(version);
- iu.setCapabilities(generateJRECapability(id, version, null));
- resultantIUs.add(MetadataFactory.createInstallableUnit(iu));
-
- touchpointData.put("install", ""); //$NON-NLS-1$ //$NON-NLS-2$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- resultantIUs.add(MetadataFactory.createInstallableUnit(cu));
- return null;
- }
- generateJREIUData(iu, id, version, jreLocation);
-
- //Generate artifact for JRE
- IArtifactKey key = new ArtifactKey(BINARY_ARTIFACT_CLASSIFIER, id, version);
- iu.setArtifacts(new IArtifactKey[] {key});
- resultantIUs.add(MetadataFactory.createInstallableUnit(iu));
-
- //Create config info for the CU
- String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- touchpointData.put("install", configurationData); //$NON-NLS-1$
- String unConfigurationData = "cleanupzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- touchpointData.put("uninstall", unConfigurationData); //$NON-NLS-1$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- resultantIUs.add(MetadataFactory.createInstallableUnit(cu));
-
- //Create the artifact descriptor
- return createArtifactDescriptor(key, jreLocation, false, true);
- }
-
- public static ArtifactKey createLauncherArtifactKey(String id, Version version) {
- return new ArtifactKey(BINARY_ARTIFACT_CLASSIFIER, id, version);
- }
-
- /**
- * Creates IUs and artifacts for the Launcher executable. The resulting IUs are added
- * to the given set, and the resulting artifact descriptor is returned.
- * @deprecated use the EquinoxExecutablesAction instead
- */
- public static IArtifactDescriptor createLauncherIU(File launcher, String configurationFlavor, Set resultantIUs) {
- if (launcher == null || !launcher.exists())
- return null;
-
- //Create the IU
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- iu.setSingleton(true);
- String launcherId = LAUNCHER_ID_PREFIX + '_' + launcher.getName();
- iu.setId(launcherId);
- iu.setVersion(LAUNCHER_VERSION);
-
- IArtifactKey key = createLauncherArtifactKey(launcherId, LAUNCHER_VERSION);
- iu.setArtifacts(new IArtifactKey[] {key});
- iu.setCapabilities(new IProvidedCapability[] {createSelfCapability(launcherId, LAUNCHER_VERSION)});
- iu.setTouchpointType(TOUCHPOINT_NATIVE);
- resultantIUs.add(MetadataFactory.createInstallableUnit(iu));
-
- //Create the CU
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configUnitId = configurationFlavor + launcherId;
- cu.setId(configUnitId);
- cu.setVersion(LAUNCHER_VERSION);
- cu.setHost(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, launcherId, new VersionRange(LAUNCHER_VERSION, true, Version.MAX_VERSION, true), null, false, false)});
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, LAUNCHER_VERSION)});
- cu.setTouchpointType(TOUCHPOINT_NATIVE);
- Map touchpointData = new HashMap();
- String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- EnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName());
- if (!info.getOS().equals(org.eclipse.osgi.service.environment.Constants.OS_WIN32)) {
- if (info.getOS().equals(org.eclipse.osgi.service.environment.Constants.OS_MACOSX)) {
- configurationData += " chmod(targetDir:${installFolder}/Eclipse.app/Contents/MacOS, targetFile:eclipse, permissions:755);"; //$NON-NLS-1$
- generateLauncherSetter("Eclipse", launcherId, LAUNCHER_VERSION, "macosx", null, null, resultantIUs); //$NON-NLS-1$//$NON-NLS-2$
- } else
- configurationData += " chmod(targetDir:${installFolder}, targetFile:" + launcher.getName() + ", permissions:755);"; //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- generateLauncherSetter("eclipse", launcherId, LAUNCHER_VERSION, "win32", null, null, resultantIUs); //$NON-NLS-1$ //$NON-NLS-2$
- }
- touchpointData.put("install", configurationData); //$NON-NLS-1$
- String unConfigurationData = "cleanupzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- touchpointData.put("uninstall", unConfigurationData); //$NON-NLS-1$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- resultantIUs.add(MetadataFactory.createInstallableUnitFragment(cu));
-
- //Create the artifact descriptor
- return createArtifactDescriptor(key, launcher, false, true);
- }
-
- /**
- * @deprecated moved to EquinoxExecutablesAction
- */
- public static IInstallableUnit generateLauncherSetter(String launcherName, String iuId, Version version, String os, String ws, String arch, Set result) {
- InstallableUnitDescription iud = new MetadataFactory.InstallableUnitDescription();
- iud.setId(iuId + '.' + launcherName);
- iud.setVersion(version);
- iud.setTouchpointType(MetadataGeneratorHelper.TOUCHPOINT_OSGI);
- iud.setCapabilities(new IProvidedCapability[] {createSelfCapability(iuId + '.' + launcherName, version)});
-
- if (os != null || ws != null || arch != null) {
- String filterOs = os != null ? "(osgi.os=" + os + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- String filterWs = ws != null ? "(osgi.ws=" + ws + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- String filterArch = arch != null ? "(osgi.arch=" + arch + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- iud.setFilter("(& " + filterOs + filterWs + filterArch + ")"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- Map touchpointData = new HashMap();
- touchpointData.put("configure", "setLauncherName(name:" + launcherName + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- touchpointData.put("unconfigure", "setLauncherName()"); //$NON-NLS-1$ //$NON-NLS-2$
- iud.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
-
- IInstallableUnit iu = MetadataFactory.createInstallableUnit(iud);
- result.add(iu);
- return iu;
- }
-
- public static IProvidedCapability createSelfCapability(String installableUnitId, Version installableUnitVersion) {
- return MetadataFactory.createProvidedCapability(IU_NAMESPACE, installableUnitId, installableUnitVersion);
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- private static String createUnconfigScript(GeneratorBundleInfo unconfigInfo, boolean isBundleFragment) {
- if (unconfigInfo == null)
- return ""; //$NON-NLS-1$
- String unconfigScript = "";//$NON-NLS-1$
- if (!isBundleFragment && unconfigInfo.getStartLevel() != BundleInfo.NO_LEVEL) {
- unconfigScript += "setStartLevel(startLevel:" + BundleInfo.NO_LEVEL + ");"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (!isBundleFragment && unconfigInfo.isMarkedAsStarted()) {
- unconfigScript += "markStarted(started: false);"; //$NON-NLS-1$
- }
-
- if (unconfigInfo.getSpecialUnconfigCommands() != null) {
- unconfigScript += unconfigInfo.getSpecialUnconfigCommands();
- }
- return unconfigScript;
-
- }
-
- /**
- * @deprecated moved to JREAction
- */
- private static IProvidedCapability[] generateJRECapability(String installableUnitId, Version installableUnitVersion, InputStream profileStream) {
- if (profileStream == null) {
- //use the 1.6 profile stored in the generator bundle
- try {
- profileStream = Activator.getContext().getBundle().getEntry("JavaSE-1.6.profile").openStream(); //$NON-NLS-1$
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
- Properties p = new Properties();
- try {
- p.load(profileStream);
- ManifestElement[] jrePackages = ManifestElement.parseHeader("org.osgi.framework.system.packages", (String) p.get("org.osgi.framework.system.packages")); //$NON-NLS-1$ //$NON-NLS-2$
- IProvidedCapability[] exportedPackageAsCapabilities = new IProvidedCapability[jrePackages.length + 1];
- exportedPackageAsCapabilities[0] = createSelfCapability(installableUnitId, installableUnitVersion);
- for (int i = 1; i <= jrePackages.length; i++) {
- exportedPackageAsCapabilities[i] = MetadataFactory.createProvidedCapability(CAPABILITY_NS_JAVA_PACKAGE, jrePackages[i - 1].getValue(), null);
- }
- return exportedPackageAsCapabilities;
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (BundleException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } finally {
- if (profileStream != null) {
- try {
- profileStream.close();
- } catch (IOException e) {
- //ignore secondary failure
- }
- }
- }
- return new IProvidedCapability[0];
- }
-
- /**
- * @deprecated moved to JREAction
- */
- private static void generateJREIUData(InstallableUnitDescription iu, String installableUnitId, Version installableUnitVersion, File jreLocation) {
- //Look for a JRE profile file to set version and capabilities
- File[] profiles = jreLocation.listFiles(new FileFilter() {
- public boolean accept(File pathname) {
- return pathname.getAbsolutePath().endsWith(".profile"); //$NON-NLS-1$
- }
- });
- if (profiles.length != 1) {
- iu.setVersion(DEFAULT_JRE_VERSION);
- iu.setCapabilities(generateJRECapability(installableUnitId, installableUnitVersion, null));
- return;
- }
- String profileName = profiles[0].getAbsolutePath().substring(profiles[0].getAbsolutePath().lastIndexOf('/'));
- Version version = DEFAULT_JRE_VERSION;
- //TODO Find a better way to determine JRE version
- if (profileName.indexOf("1.6") > 0) { //$NON-NLS-1$
- version = Version.create("1.6"); //$NON-NLS-1$
- } else if (profileName.indexOf("1.5") > 0) { //$NON-NLS-1$
- version = Version.create("1.5"); //$NON-NLS-1$
- } else if (profileName.indexOf("1.4") > 0) { //$NON-NLS-1$
- version = Version.create("1.4"); //$NON-NLS-1$
- }
- iu.setVersion(version);
- try {
- iu.setCapabilities(generateJRECapability(installableUnitId, installableUnitVersion, new FileInputStream(profiles[0])));
- } catch (FileNotFoundException e) {
- //Shouldn't happen, but ignore and fall through to use default
- }
- }
-
- /**
- * @deprecated moved to FeaturesAction
- */
- public static IMatchExpression getFilter(FeatureEntry entry) {
- StringBuffer result = new StringBuffer();
- result.append("(&"); //$NON-NLS-1$
- if (entry.getFilter() != null)
- result.append(entry.getFilter());
- if (entry.getOS() != null)
- result.append("(osgi.os=" + entry.getOS() + ')');//$NON-NLS-1$
- if (entry.getWS() != null)
- result.append("(osgi.ws=" + entry.getWS() + ')');//$NON-NLS-1$
- if (entry.getArch() != null)
- result.append("(osgi.arch=" + entry.getArch() + ')');//$NON-NLS-1$
- if (entry.getNL() != null)
- result.append("(osgi.nl=" + entry.getNL() + ')');//$NON-NLS-1$
- if (result.length() == 2)
- return null;
- result.append(')');
- return InstallableUnit.parseFilter(result.toString());
- }
-
- /**
- * @deprecated moved to FeaturesAction
- */
- public static String getTransformedId(String original, boolean isPlugin, boolean isGroup) {
- return (isPlugin ? original : original + (isGroup ? ".feature.group" : ".feature.jar")); //$NON-NLS-1$//$NON-NLS-2$
- }
-
- /**
- * @deprecated moved to FeaturesAction
- */
- public static VersionRange getVersionRange(FeatureEntry entry) {
- String versionSpec = entry.getVersion();
- if (versionSpec == null)
- return VersionRange.emptyRange;
- Version version = Version.create(versionSpec);
- if (version.equals(Version.emptyVersion))
- return VersionRange.emptyRange;
- if (!entry.isRequires())
- return new VersionRange(version, true, version, true);
- String match = entry.getMatch();
-
- org.osgi.framework.Version osgiVersion = toOSGiVersion(version);
- if (match == null || match.equals("compatible")) { //$NON-NLS-1$
- Version upper = Version.createOSGi(osgiVersion.getMajor() + 1, 0, 0);
- return new VersionRange(version, true, upper, false);
- }
- if (match.equals("perfect")) //$NON-NLS-1$
- return new VersionRange(version, true, version, true);
- if (match.equals("equivalent")) { //$NON-NLS-1$
- Version upper = Version.createOSGi(osgiVersion.getMajor(), osgiVersion.getMinor() + 1, 0);
- return new VersionRange(version, true, upper, false);
- }
- if (match.equals("greaterOrEqual")) //$NON-NLS-1$
- return new VersionRange(version, true, new VersionRange(null).getMaximum(), true);
- return null;
- }
-
- /**
- * @deprecated moved to AdviceFileAdvice
- */
- public static Map getBundleAdvice(String bundleLocation, String suffixLocation) {
- if (bundleLocation == null)
- return Collections.EMPTY_MAP;
-
- File bundle = new File(bundleLocation);
- if (!bundle.exists())
- return Collections.EMPTY_MAP;
-
- ZipFile jar = null;
- InputStream stream = null;
- if (bundle.isDirectory()) {
- File adviceFile = new File(bundle, suffixLocation);
- if (adviceFile.exists()) {
- try {
- stream = new BufferedInputStream(new FileInputStream(adviceFile));
- } catch (IOException e) {
- return Collections.EMPTY_MAP;
- }
- }
- } else if (bundle.isFile()) {
- try {
- jar = new ZipFile(bundle);
- ZipEntry entry = jar.getEntry(suffixLocation);
- if (entry != null)
- stream = new BufferedInputStream(jar.getInputStream(entry));
- } catch (IOException e) {
- if (jar != null)
- try {
- jar.close();
- } catch (IOException e1) {
- //boo
- }
- return Collections.EMPTY_MAP;
- }
- }
-
- Properties advice = null;
- if (stream != null) {
- try {
- advice = new Properties();
- advice.load(stream);
- } catch (IOException e) {
- return Collections.EMPTY_MAP;
- } finally {
- try {
- stream.close();
- } catch (IOException e) {
- //boo
- }
- }
- }
-
- if (jar != null) {
- try {
- jar.close();
- } catch (IOException e) {
- // boo
- }
- }
-
- return advice != null ? advice : Collections.EMPTY_MAP;
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- private static boolean isOptional(ImportPackageSpecification importedPackage) {
- if (importedPackage.getDirective(Constants.RESOLUTION_DIRECTIVE).equals(ImportPackageSpecification.RESOLUTION_DYNAMIC) || importedPackage.getDirective(Constants.RESOLUTION_DIRECTIVE).equals(ImportPackageSpecification.RESOLUTION_OPTIONAL))
- return true;
- return false;
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- private static String toManifestString(Map p) {
- if (p == null)
- return null;
- Collection properties = p.entrySet();
- StringBuffer result = new StringBuffer();
- for (Iterator iterator = properties.iterator(); iterator.hasNext();) {
- Map.Entry aProperty = (Map.Entry) iterator.next();
- if (aProperty.getKey().equals(BundleDescriptionFactory.BUNDLE_FILE_KEY))
- continue;
- result.append(aProperty.getKey()).append(": ").append(aProperty.getValue()).append('\n'); //$NON-NLS-1$
- }
- return result.toString();
- }
-
- /**
- * Returns a URI corresponding to the given URL in string form, or null
- * if a well formed URI could not be created.
- */
- private static URI toURIOrNull(String url) {
- if (url == null)
- return null;
- try {
- return URIUtil.fromString(url);
- } catch (URISyntaxException e) {
- return null;
- }
- }
-
- // Return a map from locale to property set for the manifest localizations
- // from the given bundle directory and given bundle localization path/name
- // manifest property value.
- /**
- * @deprecated moved to BundlesAction
- */
- private static Map getManifestLocalizations(Map manifest, File bundleLocation) {
- Map localizations;
- Locale defaultLocale = null; // = Locale.ENGLISH; // TODO: get this from GeneratorInfo
- String[] bundleManifestValues = getManifestCachedValues(manifest);
- String bundleLocalization = bundleManifestValues[BUNDLE_LOCALIZATION_INDEX];
-
- if ("jar".equalsIgnoreCase(new Path(bundleLocation.getName()).getFileExtension()) && //$NON-NLS-1$
- bundleLocation.isFile()) {
- localizations = LocalizationHelper.getJarPropertyLocalizations(bundleLocation, bundleLocalization, defaultLocale, bundleManifestValues);
- //localizations = getJarManifestLocalization(bundleLocation, bundleLocalization, defaultLocale, bundleManifestValues);
- } else {
- localizations = LocalizationHelper.getDirPropertyLocalizations(bundleLocation, bundleLocalization, defaultLocale, bundleManifestValues);
- // localizations = getDirManifestLocalization(bundleLocation, bundleLocalization, defaultLocale, bundleManifestValues);
- }
-
- return localizations;
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- public static String[] getManifestCachedValues(Map manifest) {
- String[] cachedValues = new String[BUNDLE_LOCALIZED_PROPERTIES.length + 1];
- for (int j = 0; j < MetadataGeneratorHelper.BUNDLE_LOCALIZED_PROPERTIES.length; j++) {
- String value = (String) manifest.get(BUNDLE_LOCALIZED_PROPERTIES[j]);
- if (value != null && value.length() > 1 && value.charAt(0) == '%') {
- cachedValues[j] = value.substring(1);
- }
- }
- String localizationFile = (String) manifest.get(org.osgi.framework.Constants.BUNDLE_LOCALIZATION);
- cachedValues[BUNDLE_LOCALIZATION_INDEX] = (localizationFile != null ? localizationFile : DEFAULT_BUNDLE_LOCALIZATION);
- return cachedValues;
- }
-
- // Return a map from locale to property set for the manifest localizations
- // from the given bundle directory and given bundle localization path/name
- // manifest property value.
- /**
- * @deprecated moved to BundlesAction
- */
- public static Map getHostLocalizations(File bundleLocation, String[] hostBundleManifestValues) {
- Map localizations;
- Locale defaultLocale = null; // = Locale.ENGLISH; // TODO: get this from GeneratorInfo
- String hostBundleLocalization = hostBundleManifestValues[BUNDLE_LOCALIZATION_INDEX];
-
- if ("jar".equalsIgnoreCase(new Path(bundleLocation.getName()).getFileExtension()) && //$NON-NLS-1$
- bundleLocation.isFile()) {
- localizations = LocalizationHelper.getJarPropertyLocalizations(bundleLocation, hostBundleLocalization, defaultLocale, hostBundleManifestValues);
- //localizations = getJarManifestLocalization(bundleLocation, hostBundleLocalization, defaultLocale, hostBundleManifestValues);
- } else {
- localizations = LocalizationHelper.getDirPropertyLocalizations(bundleLocation, hostBundleLocalization, defaultLocale, hostBundleManifestValues);
- // localizations = getDirManifestLocalization(bundleLocation, hostBundleLocalization, defaultLocale, hostBundleManifestValues);
- }
-
- return localizations;
- }
-
- /**
- * Convert <code>version</code> into its OSGi equivalent if possible.
- *
- * @param version The version to convert. Can be <code>null</code>
- * @return The converted version or <code>null</code> if the argument was <code>null</code>
- * @throws UnsupportedOperationException if the version could not be converted into an OSGi version
- */
- public static org.osgi.framework.Version toOSGiVersion(Version version) {
- if (version == null)
- return null;
- if (version == Version.emptyVersion)
- return org.osgi.framework.Version.emptyVersion;
- if (version == Version.MAX_VERSION)
- return new org.osgi.framework.Version(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE);
-
- BasicVersion bv = (BasicVersion) version;
- return new org.osgi.framework.Version(bv.getMajor(), bv.getMinor(), bv.getMicro(), bv.getQualifier());
- }
-
- /**
- * Create an omni version from an OSGi <code>version</code>.
- * @param version The OSGi version. Can be <code>null</code>.
- * @return The created omni version
- */
- public static Version fromOSGiVersion(org.osgi.framework.Version version) {
- if (version == null)
- return null;
- if (version.getMajor() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE)
- return Version.MAX_VERSION;
- return Version.createOSGi(version.getMajor(), version.getMinor(), version.getMicro(), version.getQualifier());
- }
-
- public static org.eclipse.osgi.service.resolver.VersionRange toOSGiVersionRange(VersionRange range) {
- if (range.equals(VersionRange.emptyRange))
- return org.eclipse.osgi.service.resolver.VersionRange.emptyRange;
- return new org.eclipse.osgi.service.resolver.VersionRange(toOSGiVersion(range.getMinimum()), range.getIncludeMinimum(), toOSGiVersion(range.getMaximum()), range.getIncludeMinimum());
- }
-
- public static VersionRange fromOSGiVersionRange(org.eclipse.osgi.service.resolver.VersionRange range) {
- if (range.equals(org.eclipse.osgi.service.resolver.VersionRange.emptyRange))
- return VersionRange.emptyRange;
- return new VersionRange(fromOSGiVersion(range.getMinimum()), range.getIncludeMinimum(), fromOSGiVersion(range.getMaximum()), range.getIncludeMaximum());
- }
-};
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/URLEntry.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/URLEntry.java
deleted file mode 100644
index 8e928f65c..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/URLEntry.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-
-public class URLEntry {
- private String annotation;
- private String url;
-
- public URLEntry() {
- }
-
- public URLEntry(String url, String annotation) {
- this.url = url;
- this.annotation = annotation;
- }
-
- public void setAnnotation(String annotation) {
- this.annotation = annotation;
- }
-
- public String getAnnotation() {
- return annotation;
- }
-
- public void setURL(String url) {
- this.url = url;
- }
-
- public String getURL() {
- return url;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/GeneratorTask.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/GeneratorTask.java
deleted file mode 100644
index 3301c3885..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/GeneratorTask.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator.ant;
-
-import java.net.URISyntaxException;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.metadata.generator.EclipseGeneratorApplication;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.EclipseInstallGeneratorInfoProvider;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.IncrementalGenerator;
-
-/**
- * An Ant task to call the p2 Metadata Generator application.
- *
- * @since 1.0
- */
-public class GeneratorTask extends Task {
-
- protected EclipseInstallGeneratorInfoProvider provider = null;
- protected EclipseGeneratorApplication generator = null;
-
- private String mode;
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() throws BuildException {
- try {
- IncrementalGenerator incremental = new IncrementalGenerator();
- incremental.setMode(mode);
- incremental.run(generator, provider);
-
- if (!"incremental".equals(mode)) { //$NON-NLS-1$
- provider = null;
- generator = null;
- }
- } catch (Exception e) {
- throw new BuildException(TaskMessages.exception_errorOccurredCallingGenerator, e);
- }
- }
-
- public void setAppend(String value) {
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setAppend(Boolean.valueOf(value).booleanValue());
- }
-
- public void setArtifactRepository(String location) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- try {
- generator.setArtifactLocation(URIUtil.fromString(location));
- } catch (URISyntaxException e) {
- throw new IllegalArgumentException("Specified artifact repository location (" + location + ") is not a valid URI. ");
- }
- }
-
- public void setArtifactRepositoryName(String name) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- generator.setArtifactRepositoryName(name);
- }
-
- public void setBase(String value) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- generator.setBase(value);
- }
-
- public void setBundles(String value) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- generator.setBundles(value);
- }
-
- public void setCompress(String value) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- generator.setCompress(value);
- }
-
- public void setConfig(String value) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- generator.setOperation("-config", value); //$NON-NLS-1$
- }
-
- public void setInplace(String value) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- generator.setOperation("-inplace", value); //$NON-NLS-1$
- }
-
- public void setSource(String location) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- generator.setOperation("-source", location); //$NON-NLS-1$
- }
-
- public void setUpdateSite(String value) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- generator.setOperation("-updateSite", value); //$NON-NLS-1$
- }
-
- public void setExe(String value) {
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setExecutableLocation(value);
- }
-
- public void setFeatures(String value) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- generator.setFeatures(value);
- }
-
- public void setFlavor(String flavor) {
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setFlavor(flavor);
- }
-
- public void setLauncherConfig(String launcherConfig) {
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setLauncherConfig(launcherConfig);
- }
-
- public void setMetadataRepository(String location) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- try {
- generator.setMetadataLocation(URIUtil.fromString(location));
- } catch (URISyntaxException e) {
- throw new IllegalArgumentException("Specified metadata repository location (" + location + ") is not a valid URI. ");
- }
- }
-
- public void setMetadataRepositoryName(String name) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- generator.setMetadataRepositoryName(name);
- }
-
- public void setNoDefaultIUs(String value) {
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setAddDefaultIUs(!Boolean.valueOf(value).booleanValue());
- }
-
- public void setP2OS(String value) {
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setOS(value);
- }
-
- public void setProductFile(String file) {
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setProductFile(file);
- }
-
- public void setPublishArtifactRepository(String value) {
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setPublishArtifactRepository(Boolean.valueOf(value).booleanValue());
- }
-
- public void setPublishArtifacts(String value) {
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setPublishArtifacts(Boolean.valueOf(value).booleanValue());
- }
-
- public void setRoot(String root) {
- if (root == null || root.startsWith("${")) //$NON-NLS-1$
- return;
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setRootId(root);
- }
-
- public void setRootVersion(String rootVersion) {
- if (rootVersion == null || rootVersion.startsWith("${")) //$NON-NLS-1$
- return;
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setRootVersion(rootVersion);
- }
-
- public void setMode(String mode) {
- this.mode = mode;
- }
-
- public void setVersionAdvice(String advice) {
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setVersionAdvice(advice);
- }
-
- public void setSite(String site) {
- if (site == null || site.startsWith("${")) //$NON-NLS-1$
- return;
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- try {
- provider.setSiteLocation(URIUtil.fromString(site));
- } catch (URISyntaxException e) {
- throw new IllegalArgumentException("The specified location (" + site + ") is not a valid URI."); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/TaskMessages.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/TaskMessages.java
deleted file mode 100644
index b9fb84991..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/TaskMessages.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator.ant;
-
-import org.eclipse.osgi.util.NLS;
-
-public class TaskMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.metadata.generator.ant.messages";//$NON-NLS-1$
-
- public static String exception_errorOccurredCallingGenerator;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, TaskMessages.class);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/messages.properties b/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/messages.properties
deleted file mode 100644
index d43b9040b..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/messages.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-exception_errorOccurredCallingGenerator = An error occurred when calling generator.
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/.classpath b/bundles/org.eclipse.equinox.p2.metadata.repository/.classpath
deleted file mode 100644
index 834ea833e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" output="bin_ant" path="src_ant"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/.cvsignore b/bundles/org.eclipse.equinox.p2.metadata.repository/.cvsignore
deleted file mode 100644
index 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 d3596d85e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/.externalToolBuilders/org.eclipse.equinox.p2.metadata.reposiroy buildAntTasks.xml.launch
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.metadata.repository"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.metadata.repository"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.metadata.repository/buildAntTasks.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-</launchConfiguration> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/.project b/bundles/org.eclipse.equinox.p2.metadata.repository/.project
deleted file mode 100644
index 920d1f26a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/.project
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.metadata.repository</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value>&lt;project&gt;/.externalToolBuilders/org.eclipse.equinox.p2.metadata.reposiroy buildAntTasks.xml.launch</value>
- </dictionary>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 6a7984c9b..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,329 +0,0 @@
-#Mon Dec 28 00:17:37 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 6b7580c4a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:58:22 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.metadata.repository/META-INF/MANIFEST.MF
deleted file mode 100644
index 6bf168c13..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,50 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.metadata.repository;singleton:=true
-Bundle-Version: 1.1.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.metadata.repository.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.metadata.repository;
- x-friends:="org.eclipse.equinox.p2.engine,
- org.eclipse.equinox.p2.metadata.generator,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.reconciler.dropins,
- org.eclipse.equinox.p2.ui,
- org.eclipse.equinox.p2.updatesite,
- org.eclipse.equinox.p2.extensionlocation,
- org.eclipse.equinox.p2.repository.tools",
- org.eclipse.equinox.internal.p2.metadata.repository.io;x-friends:="org.eclipse.equinox.p2.engine"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.equinox.registry,
- org.eclipse.ecf.filetransfer;bundle-version="2.0.0"
-Import-Package: javax.xml.parsers,
- org.eclipse.ecf.core.util,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.metadata,
- org.eclipse.equinox.internal.p2.metadata.index,
- org.eclipse.equinox.internal.p2.persistence,
- org.eclipse.equinox.internal.p2.repository,
- org.eclipse.equinox.internal.p2.repository.helpers,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.core.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata.index;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.spi;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.service.prefs;version="1.1.1",
- org.xml.sax
-Service-Component: OSGI-INF/repositoryManager.xml
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/OSGI-INF/repositoryManager.xml b/bundles/org.eclipse.equinox.p2.metadata.repository/OSGI-INF/repositoryManager.xml
deleted file mode 100644
index fdf2579b5..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/OSGI-INF/repositoryManager.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.metadata.repository">
- <implementation class="org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryComponent"/>
- <service>
- <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
- </service>
- <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager"/>
-</scr:component> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/about.html b/bundles/org.eclipse.equinox.p2.metadata.repository/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/build.properties b/bundles/org.eclipse.equinox.p2.metadata.repository/build.properties
deleted file mode 100644
index ffda85291..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/build.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.xml,\
- plugin.properties,\
- ant_tasks/metadataRepository-ant.jar,\
- OSGI-INF/
-src.includes = about.html,\
- schema/
-jars.extra.classpath = platform:/plugin/org.apache.ant/lib/ant.jar
-jars.compile.order = .,\
- ant_tasks/metadataRepository-ant.jar
-source.ant_tasks/metadataRepository-ant.jar = src_ant/
-output.ant_tasks/metadataRepository-ant.jar = bin_ant/
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/buildAntTasks.xml b/bundles/org.eclipse.equinox.p2.metadata.repository/buildAntTasks.xml
deleted file mode 100644
index d59add568..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/buildAntTasks.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="org.eclipse.equinox.p2.metadata.repository" default="default" basedir=".">
-
- <target name="default" description="Compile ant tasks" >
- <mkdir dir="${basedir}/ant_tasks" />
- <delete file="${basedir}/ant_tasks/metadataRepository-ant.jar" failonerror="false"/>
- <jar destfile="${basedir}/ant_tasks/metadataRepository-ant.jar" basedir="${basedir}/bin_ant"/>
- </target>
-</project> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/plugin.properties b/bundles/org.eclipse.equinox.p2.metadata.repository/plugin.properties
deleted file mode 100644
index ee478c241..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# henrik.lindberg@cloudsmith.com
-###############################################################################
-pluginName = Equinox Provisioning Metadata Repository
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/plugin.xml b/bundles/org.eclipse.equinox.p2.metadata.repository/plugin.xml
deleted file mode 100644
index 3deee9519..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/plugin.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension-point id="metadataRepositories" name="Metadata Repositories" schema="schema/metadataRepositories.exsd"/>
- <extension id="simpleRepository" point="org.eclipse.equinox.p2.metadata.repository.metadataRepositories">
- <filter suffix="content.xml"/>
- <factory class="org.eclipse.equinox.internal.p2.metadata.repository.SimpleMetadataRepositoryFactory"/>
- </extension>
-
- <extension id="compositeRepository" point="org.eclipse.equinox.p2.metadata.repository.metadataRepositories">
- <filter suffix="compositeContent.xml"/>
- <factory class="org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepositoryFactory"/>
- </extension>
-
- <extension point="org.eclipse.ant.core.antTasks">
- <antTask
- library="ant_tasks/metadataRepository-ant.jar"
- name="p2.composite.metadata.repository.add"
- class="org.eclipse.equinox.internal.p2.metadata.repository.ant.AddChildTask">
- </antTask>
-
- <antTask
- library="ant_tasks/metadataRepository-ant.jar"
- name="p2.composite.metadata.repository.create"
- class="org.eclipse.equinox.internal.p2.metadata.repository.ant.CreateCompositeMetadataRepositoryTask">
- </antTask>
-
- <antTask
- library="ant_tasks/metadataRepository-ant.jar"
- name="p2.composite.metadata.repository.remove"
- class="org.eclipse.equinox.internal.p2.metadata.repository.ant.RemoveChildTask">
- </antTask>
-
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/pom.xml b/bundles/org.eclipse.equinox.p2.metadata.repository/pom.xml
deleted file mode 100644
index af77333e7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/pom.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version>
- <relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.metadata.repository</artifactId>
- <version>1.1.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>maven-osgi-compiler-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <extraClasspathElements>
- <extraClasspathElement>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- <version>1.7.1</version>
- </extraClasspathElement>
- </extraClasspathElements>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- <version>1.7.1</version>
- </dependency>
-
- </dependencies>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/schema/metadataRepositories.exsd b/bundles/org.eclipse.equinox.p2.metadata.repository/schema/metadataRepositories.exsd
deleted file mode 100644
index 20624c4f2..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/schema/metadataRepositories.exsd
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.equinox.p2.metadata.repository" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.equinox.p2.metadata.repository" id="metadataRepositories" name="Metadata Repositories"/>
- </appInfo>
- <documentation>
- This extension point is used to provide metadata repository implementations
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appInfo>
- <meta.element />
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="factory"/>
- <element ref="filter"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="factory">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- the fully-qualified name of a class which implements
-&lt;samp&gt;org.eclipse.equinox.p2.artifact.repository.IArtifactRepository&lt;/samp&gt;.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.equinox.p2.artifact.repository.IArtifactRepository"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="filter">
- <complexType>
- <attribute name="suffix" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- org.eclipse.equinox.p2.metadata.repository 1.0.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- The value of the class attribute must represent an
-implementor of &lt;tt&gt;org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory&lt;/tt&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- This bundle provides an artifact repository factory for the IMetadataRepositoryManager#TYPE_SIMPLE_REPOSITORY repository type.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2007, 2008 IBM Corporation and others.&lt;br&gt;
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at &lt;a
-href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java
deleted file mode 100644
index 1d92ba70f..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Cloudsmith Inc - additional implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
- public static final String ID = "org.eclipse.equinox.p2.metadata.repository"; //$NON-NLS-1$
- public static final String REPO_PROVIDER_XPT = ID + '.' + "metadataRepositories"; //$NON-NLS-1$
-
- private static BundleContext bundleContext;
-
- public static BundleContext getContext() {
- return bundleContext;
- }
-
- public void start(BundleContext aContext) throws Exception {
- bundleContext = aContext;
- }
-
- public void stop(BundleContext aContext) throws Exception {
- bundleContext = null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/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 0e4eba8e5..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CacheManager.java
+++ /dev/null
@@ -1,430 +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 org.eclipse.equinox.p2.core.ProvisionException;
-
-import java.io.*;
-import java.net.URI;
-import java.util.*;
-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.repository.*;
-import org.eclipse.equinox.internal.p2.repository.Activator;
-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.repository.IStateful;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.repository.IRepository;
-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 {
- /**
- * Service name for the internal cache manager service.
- */
- public static final String SERVICE_NAME = CacheManager.class.getName();
-
- private final IAgentLocation agentLocation;
-
- /**
- * 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;
- }
-
- }
-
- public CacheManager(IAgentLocation agentLocation) {
- this.agentLocation = agentLocation;
- }
-
- 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<String> knownPrefixes = new HashSet<String>(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 (String prefix : knownPrefixes) {
- 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() {
- return URIUtil.toFile(agentLocation.getDataArea(Activator.ID + "/cache/")); //$NON-NLS-1$
- }
-
- /**
- * 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();
- }
-
- private 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.
- */
- private void registerRepoEventListener(IProvisioningEventBus eventBus) {
- 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;
- }
-
- public void setEventBus(IProvisioningEventBus newBus) {
- registerRepoEventListener(newBus);
- }
-
- public void unsetEventBus(IProvisioningEventBus oldBus) {
- unregisterRepoEventListener(oldBus);
- }
-
- /**
- * Removes the {@link SynchronousProvisioningListener} that cleans up the
- * cache file from the event bus.
- */
- private void unregisterRepoEventListener(IProvisioningEventBus bus) {
- if (bus != null && busListener != null)
- bus.removeListener(busListener);
- }
-
- 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 f10a0a088..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java
+++ /dev/null
@@ -1,374 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import java.util.jar.JarEntry;
-import java.util.jar.JarOutputStream;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.persistence.CompositeRepositoryIO;
-import org.eclipse.equinox.internal.p2.persistence.CompositeRepositoryState;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.*;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;
-import org.eclipse.osgi.util.NLS;
-
-public class CompositeMetadataRepository extends AbstractMetadataRepository implements ICompositeRepository<IInstallableUnit>, IIndexProvider<IInstallableUnit> {
-
- static final public String REPOSITORY_TYPE = CompositeMetadataRepository.class.getName();
- public static final String PI_REPOSITORY_TYPE = "compositeMetadataRepository"; //$NON-NLS-1$
- static final private Integer REPOSITORY_VERSION = new Integer(1);
- static final public String XML_EXTENSION = ".xml"; //$NON-NLS-1$
- static final private String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
-
- // keep a list of the child URIs. they can be absolute or relative. they may or may not point
- // to a valid reachable repo
- private List<URI> childrenURIs = new ArrayList<URI>();
- // keep a list of the repositories that we have successfully loaded
- private List<IMetadataRepository> loadedRepos = new ArrayList<IMetadataRepository>();
- private IMetadataRepositoryManager manager;
-
- /**
- * Create a Composite repository in memory.
- * @return the repository or null if unable to create one
- */
- public static CompositeMetadataRepository createMemoryComposite(IProvisioningAgent agent) {
- if (agent == null)
- return null;
- IMetadataRepositoryManager repoManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (repoManager == null)
- return null;
- try {
- //create a unique opaque URI
- long time = System.currentTimeMillis();
- URI repositoryURI = new URI("memory:" + String.valueOf(time)); //$NON-NLS-1$
- while (repoManager.contains(repositoryURI))
- repositoryURI = new URI("memory:" + String.valueOf(++time)); //$NON-NLS-1$
-
- CompositeMetadataRepository result = (CompositeMetadataRepository) repoManager.createRepository(repositoryURI, repositoryURI.toString(), IMetadataRepositoryManager.TYPE_COMPOSITE_REPOSITORY, null);
- repoManager.removeRepository(repositoryURI);
- return result;
- } catch (ProvisionException e) {
- // just return null
- LogHelper.log(e);
- } catch (URISyntaxException e) {
- // just return null
- }
- return null;
- }
-
- private IMetadataRepositoryManager getManager() {
- return manager;
- }
-
- private boolean isLocal() {
- return "file".equalsIgnoreCase(getLocation().getScheme()); //$NON-NLS-1$
- }
-
- public boolean isModifiable() {
- return isLocal();
- }
-
- CompositeMetadataRepository(IMetadataRepositoryManager manager, URI location, String name, Map<String, String> properties) {
- super(manager.getAgent(), name == null ? (location != null ? location.toString() : "") : name, REPOSITORY_TYPE, REPOSITORY_VERSION.toString(), location, null, null, properties); //$NON-NLS-1$
- this.manager = manager;
- //when creating a repository, we must ensure it exists on disk so a subsequent load will succeed
- save();
- }
-
- /*
- * This is only called by the parser when loading a repository.
- */
- CompositeMetadataRepository(IMetadataRepositoryManager manager, CompositeRepositoryState state) {
- super(manager.getAgent(), state.getName(), state.getType(), state.getVersion(), state.getLocation(), state.getDescription(), state.getProvider(), state.getProperties());
- this.manager = manager;
- for (int i = 0; i < state.getChildren().length; i++)
- addChild(state.getChildren()[i], false);
- }
-
- /*
- * Create and return a new repository state object which represents this repository.
- * It will be used while persisting the repository to disk.
- */
- public CompositeRepositoryState toState() {
- CompositeRepositoryState result = new CompositeRepositoryState();
- result.setName(getName());
- result.setType(getType());
- result.setVersion(getVersion());
- result.setLocation(getLocation());
- result.setDescription(getDescription());
- result.setProvider(getProvider());
- result.setProperties(getProperties());
- // it is important to directly access the field so we have the relative URIs
- result.setChildren(childrenURIs.toArray(new URI[childrenURIs.size()]));
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.query.IQueryable#query(org.eclipse.equinox.p2.query.IQuery, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- if (monitor == null)
- monitor = new NullProgressMonitor();
- try {
- // Query all the all the repositories this composite repo contains
- IQueryable<IInstallableUnit> queryable = QueryUtil.compoundQueryable(loadedRepos);
- return queryable.query(query, monitor);
- } finally {
- if (monitor != null)
- monitor.done();
- }
- }
-
- private void addChild(URI childURI, boolean save) {
- URI absolute = URIUtil.makeAbsolute(childURI, getLocation());
- if (childrenURIs.contains(childURI) || childrenURIs.contains(absolute))
- return;
- // always add the URI to the list of child URIs (even if we can't load it later)
- childrenURIs.add(childURI);
- if (save)
- save();
- try {
- boolean currentLoaded = getManager().contains(absolute);
- IMetadataRepository currentRepo = getManager().loadRepository(absolute, null);
- if (!currentLoaded) {
- //set enabled to false so repositories do not polled twice
- getManager().setEnabled(absolute, false);
- //set repository to system to hide from users
- getManager().setRepositoryProperty(absolute, IRepository.PROP_SYSTEM, String.valueOf(true));
- }
- // we successfully loaded the repo so remember it
- loadedRepos.add(currentRepo);
- } catch (ProvisionException e) {
- //repository failed to load. fall through
- LogHelper.log(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.ICompositeRepository#addChild(java.net.URI)
- */
- public void addChild(URI childURI) {
- addChild(childURI, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.ICompositeRepository#removeChild(java.net.URI)
- */
- public void removeChild(URI childURI) {
- boolean removed = childrenURIs.remove(childURI);
- // if the child wasn't there make sure and try the other permutation
- // (absolute/relative) to see if it really is in the list.
- URI other = childURI.isAbsolute() ? URIUtil.makeRelative(childURI, getLocation()) : URIUtil.makeAbsolute(childURI, getLocation());
- if (!removed)
- removed = childrenURIs.remove(other);
-
- if (removed) {
- // we removed the child from the list so remove the associated repo object as well
- IMetadataRepository found = null;
- for (IMetadataRepository current : loadedRepos) {
- URI repoLocation = current.getLocation();
- if (URIUtil.sameURI(childURI, repoLocation) || URIUtil.sameURI(other, repoLocation)) {
- found = current;
- break;
- }
- }
- if (found != null)
- loadedRepos.remove(found);
- save();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.ICompositeRepository#removeAllChildren()
- */
- public void removeAllChildren() {
- childrenURIs.clear();
- loadedRepos.clear();
- save();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#addInstallableUnits(java.util.Collection)
- */
- @Override
- public void addInstallableUnits(Collection<IInstallableUnit> installableUnits) {
- throw new UnsupportedOperationException("Cannot add IUs to a composite repository"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#removeAll()
- */
- @Override
- public synchronized void removeAll() {
- throw new UnsupportedOperationException("Cannot remove IUs from a composite repository"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#removeInstallableUnits(java.util.Collection)
- */
- @Override
- public boolean removeInstallableUnits(Collection<IInstallableUnit> installableUnits) {
- throw new UnsupportedOperationException("Cannot remove IUs from a composite repository"); //$NON-NLS-1$
- }
-
- private static File getActualLocation(URI location, String extension) {
- File spec = URIUtil.toFile(location);
- String path = spec.getAbsolutePath();
- if (path.endsWith(CompositeMetadataRepositoryFactory.CONTENT_FILENAME + extension)) {
- //todo this is the old code that doesn't look right
- // return new File(spec + extension);
- return spec;
- }
- if (path.endsWith("/")) //$NON-NLS-1$
- path += CompositeMetadataRepositoryFactory.CONTENT_FILENAME;
- else
- path += "/" + CompositeMetadataRepositoryFactory.CONTENT_FILENAME; //$NON-NLS-1$
- return new File(path + extension);
- }
-
- public static File getActualLocation(URI location) {
- return getActualLocation(location, XML_EXTENSION);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#addReferences(java.util.Collection)
- */
- public synchronized void addReferences(Collection<? extends IRepositoryReference> references) {
- throw new UnsupportedOperationException("Cannot add References to a composite repository"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#getReferences()
- */
- public Collection<IRepositoryReference> getReferences() {
- HashSet<IRepositoryReference> allRefs = new HashSet<IRepositoryReference>();
- for (IMetadataRepository child : loadedRepos)
- allRefs.addAll(child.getReferences());
- return allRefs;
- }
-
- // caller should be synchronized
- private void save() {
- if (!isModifiable())
- return;
- File file = getActualLocation(getLocation());
- File jarFile = getActualLocation(getLocation(), JAR_EXTENSION);
- boolean compress = "true".equalsIgnoreCase(getProperty(PROP_COMPRESSED)); //$NON-NLS-1$
- try {
- OutputStream output = null;
- if (!compress) {
- if (jarFile.exists()) {
- jarFile.delete();
- }
- if (!file.exists()) {
- if (!file.getParentFile().exists())
- file.getParentFile().mkdirs();
- file.createNewFile();
- }
- output = new FileOutputStream(file);
- } else {
- if (file.exists()) {
- file.delete();
- }
- if (!jarFile.exists()) {
- if (!jarFile.getParentFile().exists())
- jarFile.getParentFile().mkdirs();
- jarFile.createNewFile();
- }
- JarEntry jarEntry = new JarEntry(file.getName());
- JarOutputStream jOutput = new JarOutputStream(new FileOutputStream(jarFile));
- jOutput.putNextEntry(jarEntry);
- output = jOutput;
- }
- super.setProperty(IRepository.PROP_TIMESTAMP, Long.toString(System.currentTimeMillis()));
- new CompositeRepositoryIO().write(toState(), output, PI_REPOSITORY_TYPE);
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_WRITE, NLS.bind(Messages.io_failedWrite, getLocation()), e));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.ICompositeRepository#getChildren()
- */
- public List<URI> getChildren() {
- List<URI> result = new ArrayList<URI>();
- for (URI childURI : childrenURIs)
- result.add(URIUtil.makeAbsolute(childURI, getLocation()));
- return result;
- }
-
- public static URI getActualLocationURI(URI base, String extension) {
- if (extension == null)
- extension = XML_EXTENSION;
- return URIUtil.append(base, CompositeMetadataRepositoryFactory.CONTENT_FILENAME + extension);
- }
-
- //TODO this should never be called. What do we do?
- public void initialize(RepositoryState state) {
- setName(state.Name);
- setType(state.Type);
- setVersion(state.Version.toString());
- setProvider(state.Provider);
- setDescription(state.Description);
- setLocation(state.Location);
- setProperties(state.Properties);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.metadata.index.IIndexProvider#getIndex(java.lang.String)
- */
- @SuppressWarnings("unchecked")
- public IIndex<IInstallableUnit> getIndex(String memberName) {
- IQueryable<IInstallableUnit> queryable = QueryUtil.compoundQueryable(loadedRepos);
- if (queryable instanceof IIndexProvider<?>) {
- return ((IIndexProvider<IInstallableUnit>) queryable).getIndex(memberName);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.metadata.index.IIndexProvider#everything()
- */
- @SuppressWarnings("unchecked")
- public Iterator<IInstallableUnit> everything() {
- IQueryable<IInstallableUnit> queryable = QueryUtil.compoundQueryable(loadedRepos);
- if (queryable instanceof IIndexProvider<?>) {
- return ((IIndexProvider<IInstallableUnit>) queryable).everything();
- }
- return Collections.EMPTY_LIST.iterator();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.metadata.index.IIndexProvider#getManagedProperty(java.lang.Object, java.lang.String, java.lang.Object)
- */
- @SuppressWarnings("unchecked")
- public Object getManagedProperty(Object client, String memberName, Object key) {
- IQueryable<IInstallableUnit> queryable = QueryUtil.compoundQueryable(loadedRepos);
- if (queryable instanceof IIndexProvider<?>) {
- return ((IIndexProvider<IInstallableUnit>) queryable).getManagedProperty(client, memberName, key);
- }
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepositoryFactory.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepositoryFactory.java
deleted file mode 100644
index bcfa455bc..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepositoryFactory.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
- *******************************************************************************/
-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.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory;
-import org.eclipse.osgi.util.NLS;
-
-public class CompositeMetadataRepositoryFactory extends MetadataRepositoryFactory {
-
- private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
- private static final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
- private static final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
- public static final String CONTENT_FILENAME = "compositeContent"; //$NON-NLS-1$
-
- public IMetadataRepository create(URI location, String name, String type, Map<String, String> properties) {
- return new CompositeMetadataRepository(getManager(), location, name, properties);
- }
-
- private IMetadataRepositoryManager getManager() {
- if (getAgent() != null)
- return (IMetadataRepositoryManager) getAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
- return null;
- }
-
- /**
- * Returns a file in the local file system that contains the contents of the
- * metadata repository at the given location.
- */
- private File getLocalFile(URI location, IProgressMonitor monitor) throws IOException, ProvisionException {
- File localFile = null;
- URI jarLocation = CompositeMetadataRepository.getActualLocationURI(location, JAR_EXTENSION);
- URI xmlLocation = CompositeMetadataRepository.getActualLocationURI(location, XML_EXTENSION);
- // If the repository is local, we can return the repository file directly
- if (PROTOCOL_FILE.equals(xmlLocation.getScheme())) {
- //look for a compressed local file
- localFile = URIUtil.toFile(jarLocation);
- if (localFile.exists())
- return localFile;
- //look for an uncompressed local file
- localFile = URIUtil.toFile(xmlLocation);
- if (localFile.exists())
- return localFile;
- String msg = NLS.bind(Messages.io_failedRead, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, null));
- }
- //file is not local, create a cache of the repository metadata
- CacheManager cache = (CacheManager) getAgent().getService(CacheManager.SERVICE_NAME);
- if (cache == null)
- throw new IllegalArgumentException("Cache manager service not available"); //$NON-NLS-1$
- localFile = cache.createCache(location, CONTENT_FILENAME, monitor);
- if (localFile == null) {
- //there is no remote file in either form
- String msg = NLS.bind(Messages.io_failedRead, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, null));
- }
- return localFile;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory#load(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IMetadataRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
- long time = 0;
- final String debugMsg = "Validating and loading metadata repository "; //$NON-NLS-1$
- if (Tracing.DEBUG_METADATA_PARSING) {
- Tracing.debug(debugMsg + location);
- time = -System.currentTimeMillis();
- }
- SubMonitor sub = SubMonitor.convert(monitor, 400);
- try {
- //non local repos are not modifiable
- if (!PROTOCOL_FILE.equals(location.getScheme()) && (flags & IRepositoryManager.REPOSITORY_HINT_MODIFIABLE) > 0)
- return null;
-
- File localFile = getLocalFile(location, sub.newChild(300));
- InputStream inStream = new BufferedInputStream(new FileInputStream(localFile));
- JarInputStream jarStream = null;
- try {
- //if reading from a jar, obtain a stream on the entry with the actual contents
- if (localFile.getAbsolutePath().endsWith(JAR_EXTENSION)) {
- jarStream = new JarInputStream(inStream);
- JarEntry jarEntry = jarStream.getNextJarEntry();
- String entryName = CONTENT_FILENAME + CompositeMetadataRepository.XML_EXTENSION;
- while (jarEntry != null && (!entryName.equals(jarEntry.getName()))) {
- jarEntry = jarStream.getNextJarEntry();
- }
- //if there is a jar but the entry is missing or invalid, treat this as an invalid repository
- if (jarEntry == null)
- throw new IOException(NLS.bind(Messages.repoMan_invalidLocation, location));
- }
- //parse the repository descriptor file
- sub.setWorkRemaining(100);
- InputStream descriptorStream = jarStream != null ? jarStream : inStream;
- CompositeRepositoryIO io = new CompositeRepositoryIO();
- CompositeRepositoryState resultState = io.read(localFile.toURL(), descriptorStream, CompositeMetadataRepository.PI_REPOSITORY_TYPE, sub.newChild(100));
- if (resultState.getLocation() == null)
- resultState.setLocation(location);
- CompositeMetadataRepository result = new CompositeMetadataRepository(getManager(), resultState);
- if (Tracing.DEBUG_METADATA_PARSING) {
- time += System.currentTimeMillis();
- Tracing.debug(debugMsg + "time (ms): " + time); //$NON-NLS-1$
- }
- return result;
- } finally {
- safeClose(jarStream);
- safeClose(inStream);
- }
- } catch (FileNotFoundException e) {
- String msg = NLS.bind(Messages.io_failedRead, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, e));
- } catch (IOException e) {
- String msg = NLS.bind(Messages.io_failedRead, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, msg, e));
- } finally {
- if (monitor != null)
- monitor.done();
- }
- }
-
- /**
- * Closes a stream, ignoring any secondary exceptions
- */
- private void safeClose(InputStream stream) {
- if (stream == null)
- return;
- try {
- stream.close();
- } catch (IOException e) {
- //ignore
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java
deleted file mode 100644
index 534681f51..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Prashant Deva - Bug 194674 [prov] Provide write access to metadata repository
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
-
-import java.io.*;
-import java.net.URI;
-import java.util.*;
-import java.util.jar.JarEntry;
-import java.util.jar.JarOutputStream;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.metadata.*;
-import org.eclipse.equinox.internal.p2.metadata.index.*;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.KeyWithLocale;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.IRepositoryReference;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;
-
-/**
- * A metadata repository that resides in the local file system. If the repository
- * location is a directory, this implementation will traverse the directory structure
- * and combine any metadata repository files that are found.
- */
-public class LocalMetadataRepository extends AbstractMetadataRepository implements IIndexProvider<IInstallableUnit> {
-
- static final private String CONTENT_FILENAME = "content"; //$NON-NLS-1$
- static final private String REPOSITORY_TYPE = LocalMetadataRepository.class.getName();
- static final private Integer REPOSITORY_VERSION = new Integer(1);
- static final private String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
- static final private String XML_EXTENSION = ".xml"; //$NON-NLS-1$
-
- protected IUMap units = new IUMap();
- protected HashSet<IRepositoryReference> repositories = new HashSet<IRepositoryReference>();
- private IIndex<IInstallableUnit> idIndex;
- private IIndex<IInstallableUnit> capabilityIndex;
- private TranslationSupport translationSupport;
- private boolean snapshotNeeded = false;
-
- private static File getActualLocation(URI location, String extension) {
- File spec = URIUtil.toFile(location);
- String path = spec.getAbsolutePath();
- if (path.endsWith(CONTENT_FILENAME + extension)) {
- //todo this is the old code that doesn't look right
- // return new File(spec + extension);
- return spec;
- }
- if (path.endsWith("/")) //$NON-NLS-1$
- path += CONTENT_FILENAME;
- else
- path += "/" + CONTENT_FILENAME; //$NON-NLS-1$
- return new File(path + extension);
- }
-
- public static File getActualLocation(URI location) {
- return getActualLocation(location, XML_EXTENSION);
- }
-
- /**
- * This no argument constructor is called when restoring an existing repository.
- */
- public LocalMetadataRepository(IProvisioningAgent agent) {
- super(agent);
- }
-
- /**
- * This constructor is used when creating a new local repository.
- * @param location The location of the repository
- * @param name The name of the repository
- */
- public LocalMetadataRepository(IProvisioningAgent agent, URI location, String name, Map<String, String> properties) {
- super(agent, name == null ? (location != null ? location.toString() : "") : name, REPOSITORY_TYPE, REPOSITORY_VERSION.toString(), location, null, null, properties); //$NON-NLS-1$
- if (!location.getScheme().equals("file")) //$NON-NLS-1$
- throw new IllegalArgumentException("Invalid local repository location: " + location); //$NON-NLS-1$
- //when creating a repository, we must ensure it exists on disk so a subsequent load will succeed
- save();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#addInstallableUnits(java.util.Collection)
- */
- @Override
- public synchronized void addInstallableUnits(Collection<IInstallableUnit> installableUnits) {
- if (installableUnits == null || installableUnits.isEmpty())
- return;
- if (snapshotNeeded) {
- units = units.clone();
- idIndex = null; // Backed by units
- snapshotNeeded = false;
- }
- units.addAll(installableUnits);
- capabilityIndex = null; // Generated, not backed by units
- save();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#addReferences(java.util.Collection)
- */
- @Override
- public void addReferences(Collection<? extends IRepositoryReference> references) {
- assertModifiable();
- repositories.addAll(references);
- save();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#getReferences()
- */
- public Collection<IRepositoryReference> getReferences() {
- return Collections.unmodifiableCollection(repositories);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.metadata.index.IIndexProvider#getIndex(java.lang.String)
- */
- public synchronized IIndex<IInstallableUnit> getIndex(String memberName) {
- if (InstallableUnit.MEMBER_ID.equals(memberName)) {
- snapshotNeeded = true;
- if (idIndex == null)
- idIndex = new IdIndex(units);
- return idIndex;
- }
-
- if (InstallableUnit.MEMBER_PROVIDED_CAPABILITIES.equals(memberName)) {
- snapshotNeeded = true;
- if (capabilityIndex == null)
- capabilityIndex = new CapabilityIndex(units.iterator());
- return capabilityIndex;
- }
- return null;
- }
-
- public synchronized Object getManagedProperty(Object client, String memberName, Object key) {
- if (!(client instanceof IInstallableUnit))
- return null;
- IInstallableUnit iu = (IInstallableUnit) client;
- if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(memberName)) {
- if (translationSupport == null)
- translationSupport = new TranslationSupport(this);
- return key instanceof KeyWithLocale ? translationSupport.getIUProperty(iu, (KeyWithLocale) key) : translationSupport.getIUProperty(iu, key.toString());
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#initialize(org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository.RepositoryState)
- */
- @Override
- public void initialize(RepositoryState state) {
- synchronized (this) {
- setName(state.Name);
- setType(state.Type);
- setVersion(state.Version.toString());
- setProvider(state.Provider);
- setDescription(state.Description);
- setLocation(state.Location);
- setProperties(state.Properties);
- this.units.addAll(state.Units);
- this.repositories.addAll(Arrays.asList(state.Repositories));
- }
- publishRepositoryReferences();
- }
-
- /**
- * Broadcast discovery events for all repositories referenced by this repository.
- */
- public void publishRepositoryReferences() {
- IProvisioningEventBus bus = (IProvisioningEventBus) getProvisioningAgent().getService(IProvisioningEventBus.SERVICE_NAME);
- if (bus == null)
- return;
-
- List<IRepositoryReference> repositoriesSnapshot = createRepositoriesSnapshot();
- for (IRepositoryReference reference : repositoriesSnapshot) {
- boolean isEnabled = (reference.getOptions() & IRepository.ENABLED) != 0;
- bus.publishEvent(new RepositoryEvent(reference.getLocation(), reference.getType(), RepositoryEvent.DISCOVERED, isEnabled));
- }
- }
-
- private synchronized List<IRepositoryReference> createRepositoriesSnapshot() {
- if (repositories.isEmpty())
- return CollectionUtils.emptyList();
- return new ArrayList<IRepositoryReference>(repositories);
- }
-
- // use this method to setup any transient fields etc after the object has been restored from a stream
- public synchronized void initializeAfterLoad(URI aLocation) {
- setLocation(aLocation);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.spi.AbstractRepository#isModifiable()
- */
- @Override
- public boolean isModifiable() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.query.IQueryable#query(org.eclipse.equinox.p2.query.IQuery, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- return IndexProvider.query(this, query, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.metadata.index.IIndexProvider#everything()
- */
- public synchronized Iterator<IInstallableUnit> everything() {
- snapshotNeeded = true;
- return units.iterator();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#removeAll()
- */
- @Override
- public synchronized void removeAll() {
- if (snapshotNeeded) {
- units = new IUMap();
- idIndex = null; // Backed by units
- snapshotNeeded = false;
- } else
- units.clear();
- capabilityIndex = null; // Generated, not backed by units.
- save();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#removeInstallableUnits(java.util.Collection)
- */
- @Override
- public synchronized boolean removeInstallableUnits(Collection<IInstallableUnit> installableUnits) {
- boolean changed = false;
- if (installableUnits != null && !installableUnits.isEmpty()) {
- changed = true;
- if (snapshotNeeded) {
- units = units.clone();
- idIndex = null; // Backed by units
- snapshotNeeded = false;
- }
- units.removeAll(installableUnits);
- capabilityIndex = null; // Generated, not backed by units.
- }
- if (changed)
- save();
- return changed;
- }
-
- // caller should be synchronized
- private void save() {
- File file = getActualLocation(getLocation());
- File jarFile = getActualLocation(getLocation(), JAR_EXTENSION);
- boolean compress = "true".equalsIgnoreCase(getProperty(PROP_COMPRESSED)); //$NON-NLS-1$
- try {
- OutputStream output = null;
- if (!compress) {
- if (jarFile.exists()) {
- jarFile.delete();
- }
- if (!file.exists()) {
- if (!file.getParentFile().exists())
- file.getParentFile().mkdirs();
- file.createNewFile();
- }
- output = new FileOutputStream(file);
- } else {
- if (file.exists()) {
- file.delete();
- }
- if (!jarFile.exists()) {
- if (!jarFile.getParentFile().exists())
- jarFile.getParentFile().mkdirs();
- jarFile.createNewFile();
- }
- JarEntry jarEntry = new JarEntry(file.getName());
- JarOutputStream jOutput = new JarOutputStream(new FileOutputStream(jarFile));
- jOutput.putNextEntry(jarEntry);
- output = jOutput;
- }
- super.setProperty(IRepository.PROP_TIMESTAMP, Long.toString(System.currentTimeMillis()));
- new MetadataRepositoryIO(getProvisioningAgent()).write(this, output);
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_WRITE, "Error saving metadata repository: " + getLocation(), e)); //$NON-NLS-1$
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.spi.AbstractRepository#setProperty(java.lang.String, java.lang.String)
- */
- @Override
- public String setProperty(String key, String newValue) {
- String oldValue = null;
- synchronized (this) {
- oldValue = super.setProperty(key, newValue);
- if (oldValue == newValue || (oldValue != null && oldValue.equals(newValue)))
- return oldValue;
- save();
- }
- //force repository manager to reload this repository because it caches properties
- MetadataRepositoryManager manager = (MetadataRepositoryManager) getProvisioningAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager.removeRepository(getLocation()))
- manager.addRepository(this);
- return oldValue;
- }
-
-}
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 d243483ba..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Messages.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.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 no_provisioning_agent;
-
- public static String repo_loading;
-
- public static String repoMan_internalError;
- public static String repoMan_invalidLocation;
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryComponent.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryComponent.java
deleted file mode 100644
index b89db69c9..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryComponent.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.internal.p2.metadata.repository;
-
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-
-/**
- * Service factory for creating {@link IMetadataRepositoryManager} instances.
- */
-public class MetadataRepositoryComponent implements IAgentServiceFactory {
-
- public Object createService(IProvisioningAgent agent) {
- MetadataRepositoryManager manager = new MetadataRepositoryManager(agent);
- final IProvisioningEventBus eventBus = (IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME);
- CacheManager cache = new CacheManager((IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME));
- cache.setEventBus(eventBus);
- agent.registerService(CacheManager.SERVICE_NAME, cache);
- return manager;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryIO.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryIO.java
deleted file mode 100644
index afd6a7c4f..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryIO.java
+++ /dev/null
@@ -1,344 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Prashant Deva - Bug 194674 [prov] Provide write access to metadata repository
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
-
-import org.eclipse.equinox.p2.repository.IRepositoryReference;
-
-import org.eclipse.equinox.p2.query.QueryUtil;
-
-
-import java.io.*;
-import java.lang.reflect.Constructor;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Iterator;
-import java.util.Set;
-import javax.xml.parsers.ParserConfigurationException;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
-import org.eclipse.equinox.internal.p2.metadata.repository.io.MetadataParser;
-import org.eclipse.equinox.internal.p2.metadata.repository.io.MetadataWriter;
-import org.eclipse.equinox.internal.p2.persistence.XMLWriter;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository.RepositoryState;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-import org.xml.sax.*;
-
-/**
- * This class reads and writes provisioning metadata.
- */
-public class MetadataRepositoryIO {
-
- protected final IProvisioningAgent agent;
-
- public MetadataRepositoryIO(IProvisioningAgent agent) {
- this.agent = agent;
- }
-
- /**
- * Reads metadata from the given stream, and returns the contained array
- * of abstract metadata repositories.
- * This method performs buffering, and closes the stream when finished.
- */
- public IMetadataRepository read(URL location, InputStream input, IProgressMonitor monitor) throws ProvisionException {
- BufferedInputStream bufferedInput = null;
- try {
- try {
- bufferedInput = new BufferedInputStream(input);
-
- Parser repositoryParser = new Parser(Activator.getContext(), Activator.ID);
- repositoryParser.parse(input, monitor);
- IStatus result = repositoryParser.getStatus();
- switch (result.getSeverity()) {
- case IStatus.CANCEL :
- throw new OperationCanceledException();
- case IStatus.ERROR :
- throw new ProvisionException(result);
- case IStatus.WARNING :
- case IStatus.INFO :
- LogHelper.log(result);
- }
- return repositoryParser.getRepository();
- } finally {
- if (bufferedInput != null)
- bufferedInput.close();
- }
- } catch (IOException ioe) {
- String msg = NLS.bind(Messages.io_failedRead, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, msg, ioe));
- }
- }
-
- /**
- *
- */
- public void write(IMetadataRepository repository, OutputStream output) throws IOException {
- OutputStream bufferedOutput = null;
- try {
- bufferedOutput = new BufferedOutputStream(output);
- Writer repositoryWriter = new Writer(bufferedOutput, repository.getClass());
- repositoryWriter.write(repository);
- } finally {
- if (bufferedOutput != null) {
- bufferedOutput.close();
- }
- }
- }
-
- private interface XMLConstants extends org.eclipse.equinox.internal.p2.metadata.repository.io.XMLConstants {
-
- // Constants defining the structure of the XML for a MetadataRepository
-
- // A format version number for metadata repository XML.
- public static final Version COMPATIBLE_VERSION = Version.createOSGi(1, 0, 0);
- public static final Version CURRENT_VERSION = Version.createOSGi(1, 1, 0);
- public static final VersionRange XML_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, Version.createOSGi(2, 0, 0), false);
-
- // Constants for processing Instructions
- public static final String PI_REPOSITORY_TARGET = "metadataRepository"; //$NON-NLS-1$
-
- // Constants for metadata repository elements
- public static final String REPOSITORY_ELEMENT = "repository"; //$NON-NLS-1$
-
- }
-
- protected XMLWriter.ProcessingInstruction[] createPI(Class<?> repositoryClass) {
- //TODO We should remove this processing instruction, but currently old clients rely on this. See bug 210450.
- return new XMLWriter.ProcessingInstruction[] {XMLWriter.ProcessingInstruction.makeTargetVersionInstruction(XMLConstants.PI_REPOSITORY_TARGET, XMLConstants.CURRENT_VERSION)};
- }
-
- // XML writer for a IMetadataRepository
- protected class Writer extends MetadataWriter implements XMLConstants {
-
- public Writer(OutputStream output, Class<? extends IMetadataRepository> repositoryClass) throws IOException {
- super(output, createPI(repositoryClass));
- }
-
- /**
- * Write the given metadata repository to the output stream.
- */
- public void write(IMetadataRepository repository) {
- start(REPOSITORY_ELEMENT);
- attribute(NAME_ATTRIBUTE, repository.getName());
- attribute(TYPE_ATTRIBUTE, repository.getType());
- attribute(VERSION_ATTRIBUTE, repository.getVersion());
- attributeOptional(PROVIDER_ATTRIBUTE, repository.getProvider());
- attributeOptional(DESCRIPTION_ATTRIBUTE, repository.getDescription()); // TODO: could be cdata?
-
- writeProperties(repository.getProperties());
- if (repository instanceof LocalMetadataRepository) {
- Set<IRepositoryReference> references = ((LocalMetadataRepository) repository).repositories;
- writeRepositoryReferences(references.iterator(), references.size());
- }
- // The size attribute is a problematic since it forces the use of a collection.
- Set<IInstallableUnit> units = repository.query(QueryUtil.createIUAnyQuery(), null).toUnmodifiableSet();
- writeInstallableUnits(units.iterator(), units.size());
-
- end(REPOSITORY_ELEMENT);
- flush();
- }
-
- /**
- * Writes a list of {@link IRepositoryReference}.
- * @param references An Iterator of {@link IRepositoryReference}.
- * @param size The number of references to write
- */
- protected void writeRepositoryReferences(Iterator<IRepositoryReference> references, int size) {
- if (size == 0)
- return;
- start(REPOSITORY_REFERENCES_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, size);
- while (references.hasNext())
- writeRepositoryReference(references.next());
- end(REPOSITORY_REFERENCES_ELEMENT);
- }
-
- private void writeRepositoryReference(IRepositoryReference reference) {
- start(REPOSITORY_REFERENCE_ELEMENT);
- attribute(URI_ATTRIBUTE, reference.getLocation().toString());
-
- try {
- // we write the URL attribute for backwards compatibility with 3.4.x
- // this attribute should be removed if we make a breaking format change.
- attribute(URL_ATTRIBUTE, URIUtil.toURL(reference.getLocation()).toExternalForm());
- } catch (MalformedURLException e) {
- attribute(URL_ATTRIBUTE, reference.getLocation().toString());
- }
-
- attribute(TYPE_ATTRIBUTE, Integer.toString(reference.getType()));
- attribute(OPTIONS_ATTRIBUTE, Integer.toString(reference.getOptions()));
- end(REPOSITORY_REFERENCE_ELEMENT);
- }
- }
-
- /*
- * Parser for the contents of a metadata repository,
- * as written by the Writer class.
- */
- private class Parser extends MetadataParser implements XMLConstants {
-
- private IMetadataRepository theRepository = null;
-
- public Parser(BundleContext context, String bundleId) {
- super(context, bundleId);
- }
-
- public synchronized void parse(InputStream stream, IProgressMonitor monitor) throws IOException {
- this.status = null;
- setProgressMonitor(monitor);
- monitor.beginTask(Messages.repo_loading, IProgressMonitor.UNKNOWN);
- try {
- // TODO: currently not caching the parser since we make no assumptions
- // or restrictions on concurrent parsing
- getParser();
- RepositoryHandler repositoryHandler = new RepositoryHandler();
- xmlReader.setContentHandler(new RepositoryDocHandler(REPOSITORY_ELEMENT, repositoryHandler));
- xmlReader.parse(new InputSource(stream));
- if (isValidXML()) {
- theRepository = repositoryHandler.getRepository();
- }
- } catch (SAXException e) {
- if (!(e.getException() instanceof OperationCanceledException))
- throw new IOException(e.getMessage());
- } catch (ParserConfigurationException e) {
- throw new IOException(e.getMessage());
- } finally {
- monitor.done();
- stream.close();
- }
- }
-
- public IMetadataRepository getRepository() {
- return theRepository;
- }
-
- protected Object getRootObject() {
- return theRepository;
- }
-
- private final class RepositoryDocHandler extends DocHandler {
-
- public RepositoryDocHandler(String rootName, RootHandler rootHandler) {
- super(rootName, rootHandler);
- }
-
- public void processingInstruction(String target, String data) throws SAXException {
- if (PI_REPOSITORY_TARGET.equals(target)) {
- Version repositoryVersion = extractPIVersion(target, data);
- if (!MetadataRepositoryIO.XMLConstants.XML_TOLERANCE.isIncluded(repositoryVersion)) {
- throw new SAXException(NLS.bind(Messages.io_IncompatibleVersion, repositoryVersion, MetadataRepositoryIO.XMLConstants.XML_TOLERANCE));
- }
- }
- }
-
- }
-
- private final class RepositoryHandler extends RootHandler {
-
- private final String[] required = new String[] {NAME_ATTRIBUTE, TYPE_ATTRIBUTE, VERSION_ATTRIBUTE};
- private final String[] optional = new String[] {DESCRIPTION_ATTRIBUTE, PROVIDER_ATTRIBUTE};
-
- private InstallableUnitsHandler unitsHandler = null;
- private PropertiesHandler propertiesHandler = null;
- private RepositoryReferencesHandler repositoryReferencesHandler = null;
-
- private AbstractMetadataRepository repository = null;
-
- private RepositoryState state = new RepositoryState();
-
- public RepositoryHandler() {
- super();
- }
-
- public IMetadataRepository getRepository() {
- return repository;
- }
-
- protected void handleRootAttributes(Attributes attributes) {
- String[] values = parseAttributes(attributes, required, optional);
- Version version = checkVersion(this.elementHandled, VERSION_ATTRIBUTE, values[2]);
- state.Name = values[0];
- state.Type = values[1];
- state.Version = version;
- state.Description = values[3];
- state.Provider = values[4];
- state.Location = null;
- }
-
- public void startElement(String name, Attributes attributes) {
- checkCancel();
- if (PROPERTIES_ELEMENT.equals(name)) {
- if (propertiesHandler == null) {
- propertiesHandler = new PropertiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (INSTALLABLE_UNITS_ELEMENT.equals(name)) {
- if (unitsHandler == null) {
- unitsHandler = new InstallableUnitsHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (REPOSITORY_REFERENCES_ELEMENT.equals(name)) {
- if (repositoryReferencesHandler == null) {
- repositoryReferencesHandler = new RepositoryReferencesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else {
- invalidElement(name, attributes);
- }
- }
-
- protected void finished() {
- if (isValidXML()) {
- state.Properties = (propertiesHandler == null ? new OrderedProperties(0) //
- : propertiesHandler.getProperties());
- state.Units = (unitsHandler == null ? new IInstallableUnit[0] //
- : unitsHandler.getUnits());
- state.Repositories = repositoryReferencesHandler == null ? new IRepositoryReference[0] : repositoryReferencesHandler.getReferences();
- Object repositoryObject = null;
- //can't create repository if missing type - this is already logged when parsing attributes
- if (state.Type == null)
- return;
- try {
- Class<?> clazz = Class.forName(state.Type);
- Constructor<?> ctor = clazz.getConstructor(IProvisioningAgent.class);
- repositoryObject = ctor.newInstance(agent);
- } catch (Exception e) {
- // TODO: Throw a SAXException
- e.printStackTrace();
- }
- if (repositoryObject instanceof AbstractMetadataRepository) {
- repository = (AbstractMetadataRepository) repositoryObject;
- repository.initialize(state);
- }
- }
- }
- }
-
- protected String getErrorMessage() {
- return Messages.io_parseError;
- }
-
- public String toString() {
- // TODO:
- return null;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryManager.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryManager.java
deleted file mode 100644
index e1afa910c..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryManager.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager;
-import org.eclipse.equinox.internal.p2.repository.helpers.LocationProperties;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory;
-
-/**
- * Default implementation of {@link IMetadataRepositoryManager}.
- */
-public class MetadataRepositoryManager extends AbstractRepositoryManager<IInstallableUnit> implements IMetadataRepositoryManager {
-
- public MetadataRepositoryManager(IProvisioningAgent agent) {
- super(agent);
- }
-
- public void addRepository(IMetadataRepository repository) {
- super.addRepository(repository, true, null);
- }
-
- public IMetadataRepository createRepository(URI location, String name, String type, Map<String, String> properties) throws ProvisionException {
- return (IMetadataRepository) doCreateRepository(location, name, type, properties);
- }
-
- protected IRepository<IInstallableUnit> factoryCreate(URI location, String name, String type, Map<String, String> properties, IExtension extension) throws ProvisionException {
- MetadataRepositoryFactory factory = (MetadataRepositoryFactory) createExecutableExtension(extension, EL_FACTORY);
- if (factory == null)
- return null;
- factory.setAgent(agent);
- return factory.create(location, name, type, properties);
- }
-
- protected IRepository<IInstallableUnit> factoryLoad(URI location, IExtension extension, int flags, SubMonitor monitor) throws ProvisionException {
- MetadataRepositoryFactory factory = (MetadataRepositoryFactory) createExecutableExtension(extension, EL_FACTORY);
- if (factory == null)
- return null;
- factory.setAgent(agent);
- return factory.load(location, flags, monitor.newChild(10));
- }
-
- protected String getBundleId() {
- return Activator.ID;
- }
-
- protected String getDefaultSuffix() {
- return "content.xml"; //$NON-NLS-1$
- }
-
- public IMetadataRepository getRepository(URI location) {
- return (IMetadataRepository) basicGetRepository(location);
- }
-
- protected String getRepositoryProviderExtensionPointId() {
- return Activator.REPO_PROVIDER_XPT;
- }
-
- protected String[] getPreferredRepositorySearchOrder(LocationProperties properties) {
- return properties.getMetadataFactorySearchOrder();
- }
-
- /**
- * Restores metadata repositories specified as system properties.
- */
- protected String getRepositorySystemProperty() {
- return "eclipse.p2.metadataRepository"; //$NON-NLS-1$
- }
-
- protected int getRepositoryType() {
- return IRepository.TYPE_METADATA;
- }
-
- public IMetadataRepository loadRepository(URI location, IProgressMonitor monitor) throws ProvisionException {
- return loadRepository(location, 0, monitor);
- }
-
- public IMetadataRepository loadRepository(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
- return (IMetadataRepository) loadRepository(location, monitor, null, flags);
- }
-
- public IMetadataRepository refreshRepository(URI location, IProgressMonitor monitor) throws ProvisionException {
- return (IMetadataRepository) basicRefreshRepository(location, monitor);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/SimpleMetadataRepositoryFactory.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/SimpleMetadataRepositoryFactory.java
deleted file mode 100644
index ee5c3e21c..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/SimpleMetadataRepositoryFactory.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and 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.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory;
-import org.eclipse.osgi.util.NLS;
-
-public class SimpleMetadataRepositoryFactory extends MetadataRepositoryFactory {
-
- private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
- private static final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
- private static final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
-
- public IMetadataRepository create(URI location, String name, String type, Map<String, String> properties) {
- if (location.getScheme().equals("file")) //$NON-NLS-1$
- return new LocalMetadataRepository(getAgent(), location, name, properties);
- return new URLMetadataRepository(getAgent(), location, name, properties);
- }
-
- /**
- * Returns a file in the local file system that contains the contents of the
- * metadata repository at the given location.
- */
- private File getLocalFile(URI location, IProgressMonitor monitor) throws IOException, ProvisionException {
- File localFile = null;
- URI jarLocation = URLMetadataRepository.getActualLocation(location, JAR_EXTENSION);
- URI xmlLocation = URLMetadataRepository.getActualLocation(location, XML_EXTENSION);
- // If the repository is local, we can return the repository file directly
- if (PROTOCOL_FILE.equals(xmlLocation.getScheme())) {
- //look for a compressed local file
- localFile = URIUtil.toFile(jarLocation);
- if (localFile.exists())
- return localFile;
- //look for an uncompressed local file
- localFile = URIUtil.toFile(xmlLocation);
- if (localFile.exists())
- return localFile;
- String msg = NLS.bind(Messages.io_failedRead, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, null));
- }
- // file is not local, create a cache of the repository metadata
- CacheManager cache = (CacheManager) getAgent().getService(CacheManager.SERVICE_NAME);
- if (cache == null)
- throw new IllegalArgumentException("Cache manager service not available"); //$NON-NLS-1$
- localFile = cache.createCache(location, URLMetadataRepository.CONTENT_FILENAME, monitor);
- if (localFile == null) {
- // there is no remote file in either form - this should not really happen as
- // createCache should bail out with exception if something is wrong. This is an internal
- // error.
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, Messages.repoMan_internalError, null));
- }
- return localFile;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory#load(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IMetadataRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
- long time = 0;
- final String debugMsg = "Validating and loading metadata repository "; //$NON-NLS-1$
- if (Tracing.DEBUG_METADATA_PARSING) {
- Tracing.debug(debugMsg + location);
- time = -System.currentTimeMillis();
- }
- SubMonitor sub = SubMonitor.convert(monitor, 400);
- try {
- File localFile = getLocalFile(location, sub.newChild(300));
- InputStream inStream = new BufferedInputStream(new FileInputStream(localFile));
- JarInputStream jarStream = null;
- try {
- //if reading from a jar, obtain a stream on the entry with the actual contents
- if (localFile.getAbsolutePath().endsWith(JAR_EXTENSION)) {
- jarStream = new JarInputStream(inStream);
- JarEntry jarEntry = jarStream.getNextJarEntry();
- String entryName = URLMetadataRepository.CONTENT_FILENAME + URLMetadataRepository.XML_EXTENSION;
- while (jarEntry != null && (!entryName.equals(jarEntry.getName()))) {
- jarEntry = jarStream.getNextJarEntry();
- }
- //if there is a jar but the entry is missing or invalid, treat this as an invalid repository
- if (jarEntry == null)
- throw new IOException(NLS.bind(Messages.repoMan_invalidLocation, location));
- }
- //parse the repository descriptor file
- sub.setWorkRemaining(100);
- InputStream descriptorStream = jarStream != null ? jarStream : inStream;
- IMetadataRepository result = new MetadataRepositoryIO(getAgent()).read(localFile.toURL(), descriptorStream, sub.newChild(100));
- if (result != null && (flags & IRepositoryManager.REPOSITORY_HINT_MODIFIABLE) > 0 && !result.isModifiable())
- return null;
- if (result instanceof LocalMetadataRepository)
- ((LocalMetadataRepository) result).initializeAfterLoad(location);
- if (result instanceof URLMetadataRepository)
- ((URLMetadataRepository) result).initializeAfterLoad(location);
- if (Tracing.DEBUG_METADATA_PARSING) {
- time += System.currentTimeMillis();
- Tracing.debug(debugMsg + "time (ms): " + time); //$NON-NLS-1$
- }
- return result;
- } finally {
- safeClose(jarStream);
- safeClose(inStream);
- }
- } catch (FileNotFoundException e) {
- String msg = NLS.bind(Messages.io_failedRead, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, e));
- } catch (IOException e) {
- String msg = NLS.bind(Messages.io_failedRead, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, msg, e));
- } finally {
- if (monitor != null)
- monitor.done();
- }
- }
-
- /**
- * Closes a stream, ignoring any secondary exceptions
- */
- private void safeClose(InputStream stream) {
- if (stream == null)
- return;
- try {
- stream.close();
- } catch (IOException e) {
- //ignore
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/URLMetadataRepository.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/URLMetadataRepository.java
deleted file mode 100644
index c07bf3bb7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/URLMetadataRepository.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Prashant Deva - Bug 194674 [prov] Provide write access to metadata repository
- * Cloudsmith Inc. - query indexes
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
-
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.metadata.*;
-import org.eclipse.equinox.internal.p2.metadata.index.*;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.KeyWithLocale;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.repository.IRepositoryReference;
-import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;
-
-/**
- * A metadata repository backed by an arbitrary URL.
- */
-public class URLMetadataRepository extends AbstractMetadataRepository implements IIndexProvider<IInstallableUnit> {
-
- public static final String CONTENT_FILENAME = "content"; //$NON-NLS-1$
- protected Collection<IRepositoryReference> references;
- public static final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
- private static final String REPOSITORY_TYPE = URLMetadataRepository.class.getName();
- private static final Integer REPOSITORY_VERSION = new Integer(1);
-
- transient protected URI content;
- protected IUMap units = new IUMap();
- private IIndex<IInstallableUnit> idIndex;
- private IIndex<IInstallableUnit> capabilityIndex;
- private TranslationSupport translationSupport;
-
- public static URI getActualLocation(URI base) {
- return getActualLocation(base, XML_EXTENSION);
- }
-
- public static URI getActualLocation(URI base, String extension) {
- if (extension == null)
- extension = XML_EXTENSION;
- return URIUtil.append(base, CONTENT_FILENAME + extension);
- }
-
- public URLMetadataRepository(IProvisioningAgent agent) {
- super(agent);
- }
-
- public URLMetadataRepository(IProvisioningAgent agent, URI location, String name, Map<String, String> properties) {
- super(agent, name == null ? (location != null ? location.toString() : "") : name, REPOSITORY_TYPE, REPOSITORY_VERSION.toString(), location, null, null, properties); //$NON-NLS-1$
- content = getActualLocation(location);
- }
-
- // this is synchronized because content can be initialized in initializeAfterLoad
- protected synchronized URI getContentURL() {
- return content;
- }
-
- public synchronized void initialize(RepositoryState state) {
- setName(state.Name);
- setType(state.Type);
- setVersion(state.Version.toString());
- setProvider(state.Provider);
- setDescription(state.Description);
- setLocation(state.Location);
- setProperties(state.Properties);
- this.units.addAll(state.Units);
- this.references = CollectionUtils.unmodifiableList(state.Repositories);
- }
-
- // Use this method to setup any transient fields etc after the object has been restored from a stream
- public synchronized void initializeAfterLoad(URI repoLocation) {
- setLocation(repoLocation);
- content = getActualLocation(repoLocation);
- }
-
- public Collection<IRepositoryReference> getReferences() {
- return references;
- }
-
- public boolean isModifiable() {
- return false;
- }
-
- public synchronized IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- return IndexProvider.query(this, query, monitor);
- }
-
- public synchronized IIndex<IInstallableUnit> getIndex(String memberName) {
- if (InstallableUnit.MEMBER_ID.equals(memberName)) {
- if (idIndex == null)
- idIndex = new IdIndex(units);
- return idIndex;
- }
-
- if (InstallableUnit.MEMBER_PROVIDED_CAPABILITIES.equals(memberName)) {
- if (capabilityIndex == null)
- capabilityIndex = new CapabilityIndex(units.iterator());
- return capabilityIndex;
- }
- return null;
- }
-
- public synchronized Object getManagedProperty(Object client, String memberName, Object key) {
- if (!(client instanceof IInstallableUnit))
- return null;
- IInstallableUnit iu = (IInstallableUnit) client;
- if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(memberName)) {
- if (translationSupport == null)
- translationSupport = new TranslationSupport(this);
- return key instanceof KeyWithLocale ? translationSupport.getIUProperty(iu, (KeyWithLocale) key) : translationSupport.getIUProperty(iu, key.toString());
- }
- return null;
- }
-
- public Iterator<IInstallableUnit> everything() {
- return units.iterator();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java
deleted file mode 100644
index 050e09152..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java
+++ /dev/null
@@ -1,902 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Genuitec, LLC - added license support
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository.io;
-
-import java.net.URI;
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.persistence.XMLParser;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitPatchDescription;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.repository.IRepositoryReference;
-import org.eclipse.equinox.p2.repository.spi.RepositoryReference;
-import org.osgi.framework.BundleContext;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-
-public abstract class MetadataParser extends XMLParser implements XMLConstants {
- static final ILicense[] NO_LICENSES = new ILicense[0];
-
- public MetadataParser(BundleContext context, String bundleId) {
- super(context, bundleId);
- }
-
- protected abstract class AbstractMetadataHandler extends AbstractHandler {
-
- public AbstractMetadataHandler(ContentHandler parentHandler, String elementHandled) {
- super(parentHandler, elementHandled);
- }
-
- int getOptionalSize(Attributes attributes, int dflt) {
- String sizeStr = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- return sizeStr != null ? Integer.parseInt(sizeStr) : dflt;
- }
- }
-
- protected class RepositoryReferencesHandler extends AbstractMetadataHandler {
- private HashSet<IRepositoryReference> references;
-
- public RepositoryReferencesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, REPOSITORY_REFERENCES_ELEMENT);
- references = new HashSet<IRepositoryReference>(getOptionalSize(attributes, 4));
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(REPOSITORY_REFERENCE_ELEMENT)) {
- new RepositoryReferenceHandler(this, attributes, references);
- } else {
- invalidElement(name, attributes);
- }
- }
-
- public IRepositoryReference[] getReferences() {
- return references.toArray(new IRepositoryReference[references.size()]);
- }
- }
-
- protected class RepositoryReferenceHandler extends AbstractHandler {
-
- private final String[] required = new String[] {TYPE_ATTRIBUTE, OPTIONS_ATTRIBUTE};
-
- public RepositoryReferenceHandler(AbstractHandler parentHandler, Attributes attributes, Set<IRepositoryReference> references) {
- super(parentHandler, REPOSITORY_REFERENCE_ELEMENT);
- String[] values = parseRequiredAttributes(attributes, required);
- String name = parseOptionalAttribute(attributes, NAME_ATTRIBUTE);
- int type = checkInteger(elementHandled, TYPE_ATTRIBUTE, values[0]);
- int options = checkInteger(elementHandled, OPTIONS_ATTRIBUTE, values[1]);
- URI location = parseURIAttribute(attributes, true);
- if (location != null)
- references.add(new RepositoryReference(location, name, type, options));
- }
-
- public void startElement(String name, Attributes attributes) {
- invalidElement(name, attributes);
- }
- }
-
- protected class InstallableUnitsHandler extends AbstractMetadataHandler {
- private ArrayList<InstallableUnitDescription> units;
-
- public InstallableUnitsHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, INSTALLABLE_UNITS_ELEMENT);
- units = new ArrayList<InstallableUnitDescription>(getOptionalSize(attributes, 4));
- }
-
- public IInstallableUnit[] getUnits() {
- int size = units.size();
- IInstallableUnit[] result = new IInstallableUnit[size];
- int i = 0;
- for (InstallableUnitDescription desc : units)
- result[i++] = MetadataFactory.createInstallableUnit(desc);
- return result;
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(INSTALLABLE_UNIT_ELEMENT)) {
- new InstallableUnitHandler(this, attributes, units);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class InstallableUnitHandler extends AbstractHandler {
-
- InstallableUnitDescription currentUnit = null;
-
- private PropertiesHandler propertiesHandler = null;
- private ProvidedCapabilitiesHandler providedCapabilitiesHandler = null;
- private RequiredCapabilitiesHandler requiredCapabilitiesHandler = null;
- private HostRequiredCapabilitiesHandler hostRequiredCapabilitiesHandler = null;
- private MetaRequiredCapabilitiesHandler metaRequiredCapabilitiesHandler = null;
- private TextHandler filterHandler = null;
- private ArtifactsHandler artifactsHandler = null;
- private TouchpointTypeHandler touchpointTypeHandler = null;
- private TouchpointDataHandler touchpointDataHandler = null;
- private UpdateDescriptorHandler updateDescriptorHandler = null;
- private LicensesHandler licensesHandler = null;
- private CopyrightHandler copyrightHandler = null;
- private RequirementsChangeHandler requirementChangesHandler = null;
- private ApplicabilityScopesHandler applicabilityScopeHandler = null;
- private LifeCycleHandler lifeCycleHandler;
-
- private String id;
- private Version version;
- private boolean singleton;
-
- private List<InstallableUnitDescription> units;
-
- public InstallableUnitHandler(AbstractHandler parentHandler, Attributes attributes, List<InstallableUnitDescription> units) {
- super(parentHandler, INSTALLABLE_UNIT_ELEMENT);
- String[] values = parseAttributes(attributes, REQUIRED_IU_ATTRIBUTES, OPTIONAL_IU_ATTRIBUTES);
- this.units = units;
- //skip entire IU if the id is missing
- if (values[0] == null)
- return;
-
- id = values[0];
- version = checkVersion(INSTALLABLE_UNIT_ELEMENT, VERSION_ATTRIBUTE, values[1]);
- singleton = checkBoolean(INSTALLABLE_UNIT_ELEMENT, SINGLETON_ATTRIBUTE, values[2], true).booleanValue();
- }
-
- public IInstallableUnit getInstallableUnit() {
- return MetadataFactory.createInstallableUnit(currentUnit);
- }
-
- public void startElement(String name, Attributes attributes) {
- checkCancel();
- if (PROPERTIES_ELEMENT.equals(name)) {
- if (propertiesHandler == null) {
- propertiesHandler = new PropertiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (PROVIDED_CAPABILITIES_ELEMENT.equals(name)) {
- if (providedCapabilitiesHandler == null) {
- providedCapabilitiesHandler = new ProvidedCapabilitiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (REQUIREMENTS_ELEMENT.equals(name)) {
- if (requiredCapabilitiesHandler == null) {
- requiredCapabilitiesHandler = new RequiredCapabilitiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (HOST_REQUIREMENTS_ELEMENT.equals(name)) {
- if (hostRequiredCapabilitiesHandler == null) {
- hostRequiredCapabilitiesHandler = new HostRequiredCapabilitiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (META_REQUIREMENTS_ELEMENT.equals(name)) {
- if (metaRequiredCapabilitiesHandler == null) {
- metaRequiredCapabilitiesHandler = new MetaRequiredCapabilitiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (IU_FILTER_ELEMENT.equals(name)) {
- if (filterHandler == null) {
- filterHandler = new TextHandler(this, IU_FILTER_ELEMENT, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (ARTIFACT_KEYS_ELEMENT.equals(name)) {
- if (artifactsHandler == null) {
- artifactsHandler = new ArtifactsHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (TOUCHPOINT_TYPE_ELEMENT.equals(name)) {
- if (touchpointTypeHandler == null) {
- touchpointTypeHandler = new TouchpointTypeHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (TOUCHPOINT_DATA_ELEMENT.equals(name)) {
- if (touchpointDataHandler == null) {
- touchpointDataHandler = new TouchpointDataHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (UPDATE_DESCRIPTOR_ELEMENT.equals(name)) {
- if (updateDescriptorHandler == null)
- updateDescriptorHandler = new UpdateDescriptorHandler(this, attributes);
- else {
- duplicateElement(this, name, attributes);
- }
- } else if (LICENSES_ELEMENT.equals(name)) {
- if (licensesHandler == null) {
- licensesHandler = new LicensesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (REQUIREMENT_CHANGES.equals(name)) {
- if (requirementChangesHandler == null) {
- requirementChangesHandler = new RequirementsChangeHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (APPLICABILITY_SCOPE.equals(name)) {
- if (applicabilityScopeHandler == null) {
- applicabilityScopeHandler = new ApplicabilityScopesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (LIFECYCLE.equals(name)) {
- if (lifeCycleHandler == null) {
- lifeCycleHandler = new LifeCycleHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (COPYRIGHT_ELEMENT.equals(name)) {
- if (copyrightHandler == null) {
- copyrightHandler = new CopyrightHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else {
- invalidElement(name, attributes);
- }
- }
-
- protected void finished() {
- if (isValidXML()) {
- if (requirementChangesHandler != null) {
- currentUnit = new MetadataFactory.InstallableUnitPatchDescription();
- ((InstallableUnitPatchDescription) currentUnit).setRequirementChanges(requirementChangesHandler.getRequirementChanges().toArray(new IRequirementChange[requirementChangesHandler.getRequirementChanges().size()]));
- if (applicabilityScopeHandler != null)
- ((InstallableUnitPatchDescription) currentUnit).setApplicabilityScope(applicabilityScopeHandler.getScope());
- if (lifeCycleHandler != null)
- ((InstallableUnitPatchDescription) currentUnit).setLifeCycle(lifeCycleHandler.getLifeCycleRequirement());
- } else if (hostRequiredCapabilitiesHandler == null || hostRequiredCapabilitiesHandler.getHostRequiredCapabilities().length == 0) {
- currentUnit = new InstallableUnitDescription();
- } else {
- currentUnit = new MetadataFactory.InstallableUnitFragmentDescription();
- ((InstallableUnitFragmentDescription) currentUnit).setHost(hostRequiredCapabilitiesHandler.getHostRequiredCapabilities());
- }
- currentUnit.setId(id);
- currentUnit.setVersion(version);
- currentUnit.setSingleton(singleton);
- OrderedProperties properties = (propertiesHandler == null ? new OrderedProperties(0) : propertiesHandler.getProperties());
- String updateFrom = null;
- VersionRange updateRange = null;
- for (Entry<String, String> e : properties.entrySet()) {
- String key = e.getKey();
- String value = e.getValue();
- //Backward compatibility
- if (key.equals("equinox.p2.update.from")) { //$NON-NLS-1$
- updateFrom = value;
- continue;
- }
- if (key.equals("equinox.p2.update.range")) { //$NON-NLS-1$
- updateRange = new VersionRange(value);
- continue;
- }
- //End of backward compatibility
- currentUnit.setProperty(key, value);
- }
- //Backward compatibility
- if (updateFrom != null && updateRange != null)
- currentUnit.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(updateFrom, updateRange, IUpdateDescriptor.NORMAL, null));
- //End of backward compatibility
-
- if (licensesHandler != null) {
- currentUnit.setLicenses(licensesHandler.getLicenses());
- }
-
- if (copyrightHandler != null) {
- ICopyright copyright = copyrightHandler.getCopyright();
- currentUnit.setCopyright(copyright);
- }
-
- IProvidedCapability[] providedCapabilities = (providedCapabilitiesHandler == null ? new IProvidedCapability[0] : providedCapabilitiesHandler.getProvidedCapabilities());
- currentUnit.setCapabilities(providedCapabilities);
- IRequirement[] requiredCapabilities = (requiredCapabilitiesHandler == null ? new IRequirement[0] : requiredCapabilitiesHandler.getRequiredCapabilities());
- currentUnit.setRequirements(requiredCapabilities);
- IRequirement[] metaRequiredCapabilities = (metaRequiredCapabilitiesHandler == null ? new IRequirement[0] : metaRequiredCapabilitiesHandler.getMetaRequiredCapabilities());
- currentUnit.setMetaRequirements(metaRequiredCapabilities);
- if (filterHandler != null) {
- currentUnit.setFilter(filterHandler.getText());
- }
- IArtifactKey[] artifacts = (artifactsHandler == null ? new IArtifactKey[0] : artifactsHandler.getArtifactKeys());
- currentUnit.setArtifacts(artifacts);
- if (touchpointTypeHandler != null) {
- currentUnit.setTouchpointType(touchpointTypeHandler.getTouchpointType());
- } else {
- // TODO: create an error
- }
- ITouchpointData[] touchpointData = (touchpointDataHandler == null ? new ITouchpointData[0] : touchpointDataHandler.getTouchpointData());
- for (int i = 0; i < touchpointData.length; i++)
- currentUnit.addTouchpointData(touchpointData[i]);
- if (updateDescriptorHandler != null)
- currentUnit.setUpdateDescriptor(updateDescriptorHandler.getUpdateDescriptor());
- units.add(currentUnit);
- }
- }
- }
-
- protected class ApplicabilityScopesHandler extends AbstractMetadataHandler {
- private List<IRequirement[]> scopes;
-
- public ApplicabilityScopesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, APPLICABILITY_SCOPE);
- scopes = new ArrayList<IRequirement[]>(getOptionalSize(attributes, 4));
- }
-
- public void startElement(String name, Attributes attributes) {
- if (APPLY_ON.equals(name)) {
- new ApplicabilityScopeHandler(this, attributes, scopes);
- } else {
- duplicateElement(this, name, attributes);
- }
- }
-
- public IRequirement[][] getScope() {
- return scopes.toArray(new IRequirement[scopes.size()][]);
- }
- }
-
- protected class ApplicabilityScopeHandler extends AbstractHandler {
- private RequiredCapabilitiesHandler children;
- private List<IRequirement[]> scopes;
-
- public ApplicabilityScopeHandler(AbstractHandler parentHandler, Attributes attributes, List<IRequirement[]> scopes) {
- super(parentHandler, APPLY_ON);
- this.scopes = scopes;
- }
-
- public void startElement(String name, Attributes attributes) {
- if (REQUIREMENTS_ELEMENT.equals(name)) {
- children = new RequiredCapabilitiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- }
-
- protected void finished() {
- if (children != null) {
- scopes.add(children.getRequiredCapabilities());
- }
- }
- }
-
- protected class RequirementsChangeHandler extends AbstractMetadataHandler {
- private List<IRequirementChange> requirementChanges;
-
- public RequirementsChangeHandler(InstallableUnitHandler parentHandler, Attributes attributes) {
- super(parentHandler, REQUIREMENT_CHANGES);
- requirementChanges = new ArrayList<IRequirementChange>(getOptionalSize(attributes, 4));
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(REQUIREMENT_CHANGE)) {
- new RequirementChangeHandler(this, attributes, requirementChanges);
- } else {
- invalidElement(name, attributes);
- }
- }
-
- public List<IRequirementChange> getRequirementChanges() {
- return requirementChanges;
- }
- }
-
- protected class RequirementChangeHandler extends AbstractHandler {
- private List<IRequirement> from;
- private List<IRequirement> to;
- private List<IRequirementChange> requirementChanges;
-
- public RequirementChangeHandler(AbstractHandler parentHandler, Attributes attributes, List<IRequirementChange> requirementChanges) {
- super(parentHandler, REQUIREMENT_CHANGE);
- from = new ArrayList<IRequirement>(1);
- to = new ArrayList<IRequirement>(1);
- this.requirementChanges = requirementChanges;
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(REQUIREMENT_FROM)) {
- new RequirementChangeEltHandler(this, REQUIREMENT_FROM, attributes, from);
- return;
- }
-
- if (name.equals(REQUIREMENT_TO)) {
- new RequirementChangeEltHandler(this, REQUIREMENT_TO, attributes, to);
- return;
- }
- invalidElement(name, attributes);
- }
-
- protected void finished() {
- requirementChanges.add(MetadataFactory.createRequirementChange(from.size() == 0 ? null : (IRequirement) from.get(0), to.size() == 0 ? null : (IRequirement) to.get(0)));
- }
- }
-
- protected class RequirementChangeEltHandler extends AbstractHandler {
- private List<IRequirement> requirement;
-
- public RequirementChangeEltHandler(AbstractHandler parentHandler, String parentId, Attributes attributes, List<IRequirement> from) {
- super(parentHandler, parentId);
- requirement = from;
- }
-
- public void startElement(String name, Attributes attributes) {
- if (REQUIREMENT_ELEMENT.equals(name))
- new RequirementHandler(this, attributes, requirement);
- else {
- invalidElement(name, attributes);
- }
- }
-
- }
-
- protected class LifeCycleHandler extends AbstractHandler {
- private List<IRequirement> lifeCycleRequirement;
-
- public LifeCycleHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, LIFECYCLE);
- lifeCycleRequirement = new ArrayList<IRequirement>(1);
- }
-
- public IRequirement getLifeCycleRequirement() {
- if (lifeCycleRequirement.size() == 0)
- return null;
- return lifeCycleRequirement.get(0);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (REQUIREMENT_ELEMENT.equals(name)) {
- new RequirementHandler(this, attributes, lifeCycleRequirement);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class ProvidedCapabilitiesHandler extends AbstractMetadataHandler {
- private List<IProvidedCapability> providedCapabilities;
-
- public ProvidedCapabilitiesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, PROVIDED_CAPABILITIES_ELEMENT);
- providedCapabilities = new ArrayList<IProvidedCapability>(getOptionalSize(attributes, 4));
- }
-
- public IProvidedCapability[] getProvidedCapabilities() {
- return providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(PROVIDED_CAPABILITY_ELEMENT)) {
- new ProvidedCapabilityHandler(this, attributes, providedCapabilities);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class ProvidedCapabilityHandler extends AbstractHandler {
-
- public ProvidedCapabilityHandler(AbstractHandler parentHandler, Attributes attributes, List<IProvidedCapability> capabilities) {
- super(parentHandler, PROVIDED_CAPABILITY_ELEMENT);
- String[] values = parseRequiredAttributes(attributes, REQUIRED_PROVIDED_CAPABILITY_ATTRIBUTES);
- Version version = checkVersion(PROVIDED_CAPABILITY_ELEMENT, VERSION_ATTRIBUTE, values[2]);
- capabilities.add(MetadataFactory.createProvidedCapability(values[0], values[1], version));
- }
-
- public void startElement(String name, Attributes attributes) {
- invalidElement(name, attributes);
- }
- }
-
- protected class HostRequiredCapabilitiesHandler extends AbstractMetadataHandler {
- private List<IRequirement> requiredCapabilities;
-
- public HostRequiredCapabilitiesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, HOST_REQUIREMENTS_ELEMENT);
- requiredCapabilities = new ArrayList<IRequirement>(getOptionalSize(attributes, 4));
- }
-
- public IRequirement[] getHostRequiredCapabilities() {
- return requiredCapabilities.toArray(new IRequirement[requiredCapabilities.size()]);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(REQUIREMENT_ELEMENT)) {
- new RequirementHandler(this, attributes, requiredCapabilities);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class MetaRequiredCapabilitiesHandler extends AbstractMetadataHandler {
- private List<IRequirement> requiredCapabilities;
-
- public MetaRequiredCapabilitiesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, META_REQUIREMENTS_ELEMENT);
- requiredCapabilities = new ArrayList<IRequirement>(getOptionalSize(attributes, 4));
- }
-
- public IRequirement[] getMetaRequiredCapabilities() {
- return requiredCapabilities.toArray(new IRequirement[requiredCapabilities.size()]);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(REQUIREMENT_ELEMENT)) {
- new RequirementHandler(this, attributes, requiredCapabilities);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class RequiredCapabilitiesHandler extends AbstractMetadataHandler {
- private List<IRequirement> requiredCapabilities;
-
- public RequiredCapabilitiesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, REQUIREMENTS_ELEMENT);
- requiredCapabilities = new ArrayList<IRequirement>(getOptionalSize(attributes, 4));
- }
-
- public IRequirement[] getRequiredCapabilities() {
- return requiredCapabilities.toArray(new IRequirement[requiredCapabilities.size()]);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(REQUIREMENT_ELEMENT)) {
- new RequirementHandler(this, attributes, requiredCapabilities);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class RequirementHandler extends AbstractHandler {
- private List<IRequirement> capabilities;
-
- private String match;
- private String matchParams;
- private String namespace;
- private String name;
- private VersionRange range;
- private int min;
- private int max;
- private boolean greedy;
-
- private TextHandler filterHandler = null;
- private TextHandler descriptionHandler = null;
-
- public RequirementHandler(AbstractHandler parentHandler, Attributes attributes, List<IRequirement> capabilities) {
- super(parentHandler, REQUIREMENT_ELEMENT);
- this.capabilities = capabilities;
- if (attributes.getIndex(NAMESPACE_ATTRIBUTE) >= 0) {
- String[] values = parseAttributes(attributes, REQIURED_CAPABILITY_ATTRIBUTES, OPTIONAL_CAPABILITY_ATTRIBUTES);
- namespace = values[0];
- name = values[1];
- range = checkVersionRange(REQUIREMENT_ELEMENT, VERSION_RANGE_ATTRIBUTE, values[2]);
- boolean isOptional = checkBoolean(REQUIREMENT_ELEMENT, CAPABILITY_OPTIONAL_ATTRIBUTE, values[3], false).booleanValue();
- min = isOptional ? 0 : 1;
- boolean isMultiple = checkBoolean(REQUIREMENT_ELEMENT, CAPABILITY_MULTIPLE_ATTRIBUTE, values[4], false).booleanValue();
- max = isMultiple ? Integer.MAX_VALUE : 1;
- greedy = checkBoolean(REQUIREMENT_ELEMENT, CAPABILITY_GREED_ATTRIBUTE, values[5], true).booleanValue();
- } else {
- // Expression based requirement
- String[] values = parseAttributes(attributes, REQIUREMENT_ATTRIBUTES, OPTIONAL_REQUIREMENT_ATTRIBUTES);
- match = values[0];
- matchParams = values[1];
- min = values[2] == null ? 1 : checkInteger(REQUIREMENT_ELEMENT, MIN_ATTRIBUTE, values[2]);
- max = values[3] == null ? 1 : checkInteger(REQUIREMENT_ELEMENT, MAX_ATTRIBUTE, values[3]);
- greedy = checkBoolean(REQUIREMENT_ELEMENT, CAPABILITY_GREED_ATTRIBUTE, values[4], true).booleanValue();
- }
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(CAPABILITY_FILTER_ELEMENT)) {
- filterHandler = new TextHandler(this, CAPABILITY_FILTER_ELEMENT, attributes);
- } else if (name.equals(REQUIREMENT_DESCRIPTION_ELEMENT)) {
- descriptionHandler = new TextHandler(this, REQUIREMENT_DESCRIPTION_ELEMENT, attributes);
- } else {
- invalidElement(name, attributes);
- }
- }
-
- protected void finished() {
- if (!isValidXML())
- return;
- IMatchExpression<IInstallableUnit> filter = null;
- if (filterHandler != null) {
- try {
- filter = InstallableUnit.parseFilter(filterHandler.getText());
- } catch (ExpressionParseException e) {
- if (removeWhiteSpace(filterHandler.getText()).equals("(&(|)(|)(|))")) {//$NON-NLS-1$
- // We could log this I guess
- } else {
- throw e;
- }
- }
- }
- String description = descriptionHandler == null ? null : descriptionHandler.getText();
- IRequirement requirement;
- if (match != null) {
- IExpressionFactory factory = ExpressionUtil.getFactory();
- IExpression expr = ExpressionUtil.parse(match);
- Object[] params;
- if (matchParams == null)
- params = new Object[0];
- else {
- IExpression[] arrayExpr = ExpressionUtil.getOperands(ExpressionUtil.parse(matchParams));
- params = new Object[arrayExpr.length];
- for (int idx = 0; idx < arrayExpr.length; ++idx)
- params[idx] = arrayExpr[idx].evaluate(null);
- }
- IMatchExpression<IInstallableUnit> matchExpr = factory.matchExpression(expr, params);
- requirement = MetadataFactory.createRequirement(matchExpr, filter, min, max, greedy, description);
- } else
- requirement = MetadataFactory.createRequirement(namespace, name, range, filter, min, max, greedy, description);
- capabilities.add(requirement);
- }
-
- private String removeWhiteSpace(String s) {
- if (s == null)
- return ""; //$NON-NLS-1$
- StringBuffer builder = new StringBuffer();
- for (int i = 0; i < s.length(); i++) {
- if (s.charAt(i) != ' ')
- builder.append(s.charAt(i));
- }
- return builder.toString();
- }
- }
-
- protected class ArtifactsHandler extends AbstractHandler {
-
- private List<IArtifactKey> artifacts;
-
- public ArtifactsHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, ARTIFACT_KEYS_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- artifacts = (size != null ? new ArrayList<IArtifactKey>(new Integer(size).intValue()) : new ArrayList<IArtifactKey>(4));
- }
-
- public IArtifactKey[] getArtifactKeys() {
- return artifacts.toArray(new IArtifactKey[artifacts.size()]);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(ARTIFACT_KEY_ELEMENT)) {
- new ArtifactHandler(this, attributes, artifacts);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class ArtifactHandler extends AbstractHandler {
-
- private final String[] required = new String[] {CLASSIFIER_ATTRIBUTE, ID_ATTRIBUTE, VERSION_ATTRIBUTE};
-
- public ArtifactHandler(AbstractHandler parentHandler, Attributes attributes, List<IArtifactKey> artifacts) {
- super(parentHandler, ARTIFACT_KEY_ELEMENT);
- String[] values = parseRequiredAttributes(attributes, required);
- Version version = checkVersion(ARTIFACT_KEY_ELEMENT, VERSION_ATTRIBUTE, values[2]);
- artifacts.add(new ArtifactKey(values[0], values[1], version));
- }
-
- public void startElement(String name, Attributes attributes) {
- invalidElement(name, attributes);
- }
- }
-
- protected class TouchpointTypeHandler extends AbstractHandler {
-
- private final String[] required = new String[] {ID_ATTRIBUTE, VERSION_ATTRIBUTE};
-
- ITouchpointType touchpointType = null;
-
- public TouchpointTypeHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, TOUCHPOINT_TYPE_ELEMENT);
- String[] values = parseRequiredAttributes(attributes, required);
- Version version = checkVersion(TOUCHPOINT_TYPE_ELEMENT, VERSION_ATTRIBUTE, values[1]);
- touchpointType = MetadataFactory.createTouchpointType(values[0], version);
- }
-
- public ITouchpointType getTouchpointType() {
- return touchpointType;
- }
-
- public void startElement(String name, Attributes attributes) {
- invalidElement(name, attributes);
- }
- }
-
- protected class TouchpointDataHandler extends AbstractHandler {
-
- ITouchpointData touchpointData = null;
-
- List<TouchpointInstructionsHandler> data = null;
-
- public TouchpointDataHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, TOUCHPOINT_DATA_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- data = (size != null ? new ArrayList<TouchpointInstructionsHandler>(new Integer(size).intValue()) : new ArrayList<TouchpointInstructionsHandler>(4));
- }
-
- public ITouchpointData[] getTouchpointData() {
- ITouchpointData[] result = new ITouchpointData[data.size()];
- for (int i = 0; i < result.length; i++)
- result[i] = data.get(i).getTouchpointData();
- return result;
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT)) {
- data.add(new TouchpointInstructionsHandler(this, attributes, data));
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class TouchpointInstructionsHandler extends AbstractHandler {
-
- Map<String, ITouchpointInstruction> instructions = null;
-
- public TouchpointInstructionsHandler(AbstractHandler parentHandler, Attributes attributes, List<TouchpointInstructionsHandler> data) {
- super(parentHandler, TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- instructions = (size != null ? new LinkedHashMap<String, ITouchpointInstruction>(new Integer(size).intValue()) : new LinkedHashMap<String, ITouchpointInstruction>(4));
- }
-
- public ITouchpointData getTouchpointData() {
- return MetadataFactory.createTouchpointData(instructions);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(TOUCHPOINT_DATA_INSTRUCTION_ELEMENT)) {
- new TouchpointInstructionHandler(this, attributes, instructions);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class TouchpointInstructionHandler extends TextHandler {
-
- private final String[] required = new String[] {TOUCHPOINT_DATA_INSTRUCTION_KEY_ATTRIBUTE};
- private final String[] optional = new String[] {TOUCHPOINT_DATA_INSTRUCTION_IMPORT_ATTRIBUTE};
-
- Map<String, ITouchpointInstruction> instructions = null;
- String key = null;
- String qualifier = null;
-
- public TouchpointInstructionHandler(AbstractHandler parentHandler, Attributes attributes, Map<String, ITouchpointInstruction> instructions) {
- super(parentHandler, TOUCHPOINT_DATA_INSTRUCTION_ELEMENT);
- String[] values = parseAttributes(attributes, required, optional);
- key = values[0];
- qualifier = values[1];
- this.instructions = instructions;
- }
-
- protected void finished() {
- if (isValidXML()) {
- if (key != null) {
- instructions.put(key, MetadataFactory.createTouchpointInstruction(getText(), qualifier));
- }
- }
- }
- }
-
- protected class UpdateDescriptorHandler extends TextHandler {
- private final String[] 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(REQUIREMENT_ELEMENT, VERSION_RANGE_ATTRIBUTE, values[1]);
- int severity = new Integer(values[2]).intValue();
- URI location = parseURIAttribute(attributes, false);
- descriptor = MetadataFactory.createUpdateDescriptor(values[0], range, severity, values[3], location);
- }
-
- public IUpdateDescriptor getUpdateDescriptor() {
- return descriptor;
- }
- }
-
- /**
- * Handler for a list of licenses.
- */
- protected class LicensesHandler extends AbstractHandler {
-
- // Note this handler is set up to handle multiple license elements, but for now
- // the API for IInstallableUnit only reflects one.
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=216911
- private List<ILicense> licenses;
-
- public LicensesHandler(ContentHandler parentHandler, Attributes attributes) {
- super(parentHandler, LICENSES_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- licenses = (size != null ? new ArrayList<ILicense>(new Integer(size).intValue()) : new ArrayList<ILicense>(2));
- }
-
- public ILicense[] getLicenses() {
- if (licenses.size() == 0)
- return NO_LICENSES;
- return licenses.toArray(new ILicense[licenses.size()]);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(LICENSE_ELEMENT)) {
- new LicenseHandler(this, attributes, licenses);
- } else {
- invalidElement(name, attributes);
- }
- }
-
- }
-
- /**
- * Handler for a license in an list of licenses.
- */
- protected class LicenseHandler extends TextHandler {
-
- URI location = null;
-
- private final List<ILicense> licenses;
-
- public LicenseHandler(AbstractHandler parentHandler, Attributes attributes, List<ILicense> licenses) {
- super(parentHandler, LICENSE_ELEMENT);
- location = parseURIAttribute(attributes, false);
- this.licenses = licenses;
- }
-
- protected void finished() {
- if (isValidXML()) {
- licenses.add(MetadataFactory.createLicense(location, getText()));
- }
- }
- }
-
- /**
- * Handler for a copyright.
- */
- protected class CopyrightHandler extends TextHandler {
-
- URI location = null;
- private ICopyright copyright;
-
- public CopyrightHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, COPYRIGHT_ELEMENT);
- location = parseURIAttribute(attributes, false);
- }
-
- protected void finished() {
- if (isValidXML()) {
- copyright = MetadataFactory.createCopyright(location, getText());
- }
- }
-
- public ICopyright getCopyright() {
- return copyright;
- }
- }
-}
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 36492a9db..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java
+++ /dev/null
@@ -1,361 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Genuitec, LLC - added license support
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository.io;
-
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.MalformedURLException;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.metadata.RequiredCapability;
-import org.eclipse.equinox.internal.p2.metadata.repository.Activator;
-import org.eclipse.equinox.internal.p2.persistence.XMLWriter;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-
-public abstract class MetadataWriter extends XMLWriter implements XMLConstants {
-
- public MetadataWriter(OutputStream output, ProcessingInstruction[] piElements) throws UnsupportedEncodingException {
- super(output, piElements);
- // TODO: add a processing instruction for the metadata version
- }
-
- /**
- * Writes a list of {@link IInstallableUnit}.
- * @param units An Iterator of {@link IInstallableUnit}.
- * @param size The number of units to write
- */
- protected void writeInstallableUnits(Iterator<IInstallableUnit> units, int size) {
- if (size == 0)
- return;
- start(INSTALLABLE_UNITS_ELEMENT);
-
- // The size is a bummer. Is it really needed? It forces the use of a collect
- attribute(COLLECTION_SIZE_ATTRIBUTE, size);
- while (units.hasNext())
- writeInstallableUnit(units.next());
- end(INSTALLABLE_UNITS_ELEMENT);
- }
-
- protected void writeInstallableUnit(IInstallableUnit resolvedIU) {
- IInstallableUnit iu = resolvedIU.unresolved();
- start(INSTALLABLE_UNIT_ELEMENT);
- attribute(ID_ATTRIBUTE, iu.getId());
- attribute(VERSION_ATTRIBUTE, iu.getVersion());
- attribute(SINGLETON_ATTRIBUTE, iu.isSingleton(), true);
- // attribute(FRAGMENT_ATTRIBUTE, iu.isFragment(), false);
-
- boolean simpleRequirements = hasOnlySimpleRequirements(iu);
- if (!simpleRequirements)
- attribute(GENERATION_ATTRIBUTE, 2);
-
- if (iu instanceof IInstallableUnitFragment) {
- IInstallableUnitFragment fragment = (IInstallableUnitFragment) iu;
- writeHostRequirements(fragment.getHost());
- }
-
- if (iu instanceof IInstallableUnitPatch) {
- IInstallableUnitPatch patch = (IInstallableUnitPatch) iu;
- writeApplicabilityScope(patch.getApplicabilityScope());
- writeRequirementsChange(patch.getRequirementsChange());
- writeLifeCycle(patch.getLifeCycle());
- }
-
- writeUpdateDescriptor(resolvedIU, resolvedIU.getUpdateDescriptor());
- writeProperties(iu.getProperties());
- writeMetaRequirements(iu.getMetaRequirements());
- writeProvidedCapabilities(iu.getProvidedCapabilities());
- writeRequirements(iu.getRequirements());
- writeTrimmedCdata(IU_FILTER_ELEMENT, iu.getFilter() == null ? null : iu.getFilter().getParameters()[0].toString());
-
- writeArtifactKeys(iu.getArtifacts());
- writeTouchpointType(iu.getTouchpointType());
- writeTouchpointData(iu.getTouchpointData());
- writeLicenses(iu.getLicenses());
- writeCopyright(iu.getCopyright());
-
- end(INSTALLABLE_UNIT_ELEMENT);
- }
-
- private boolean hasOnlySimpleRequirements(IInstallableUnit iu) {
- for (IRequirement r : iu.getRequirements())
- if (!RequiredCapability.isSimpleRequirement(r.getMatches()))
- return false;
-
- for (IRequirement r : iu.getMetaRequirements())
- if (!RequiredCapability.isSimpleRequirement(r.getMatches()))
- return false;
-
- if (iu instanceof IInstallableUnitFragment) {
- for (IRequirement r : ((IInstallableUnitFragment) iu).getHost())
- if (!RequiredCapability.isSimpleRequirement(r.getMatches()))
- return false;
- }
-
- if (iu instanceof IInstallableUnitPatch) {
- IInstallableUnitPatch iuPatch = (IInstallableUnitPatch) iu;
- for (IRequirement[] rArr : iuPatch.getApplicabilityScope())
- for (IRequirement r : rArr)
- if (!RequiredCapability.isSimpleRequirement(r.getMatches()))
- return false;
-
- IRequirement lifeCycle = iuPatch.getLifeCycle();
- if (lifeCycle != null && !RequiredCapability.isSimpleRequirement(lifeCycle.getMatches()))
- return false;
- }
- return true;
- }
-
- protected void writeLifeCycle(IRequirement capability) {
- if (capability == null)
- return;
- start(LIFECYCLE);
- writeRequirement(capability);
- end(LIFECYCLE);
- }
-
- protected void writeHostRequirements(Collection<IRequirement> hostRequirements) {
- if (hostRequirements != null && hostRequirements.size() > 0) {
- start(HOST_REQUIREMENTS_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, hostRequirements.size());
- for (IRequirement req : hostRequirements) {
- writeRequirement(req);
- }
- end(HOST_REQUIREMENTS_ELEMENT);
- }
- }
-
- protected void writeProvidedCapabilities(Collection<IProvidedCapability> capabilities) {
- if (capabilities != null && capabilities.size() > 0) {
- start(PROVIDED_CAPABILITIES_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, capabilities.size());
- for (IProvidedCapability capability : capabilities) {
- start(PROVIDED_CAPABILITY_ELEMENT);
- attribute(NAMESPACE_ATTRIBUTE, capability.getNamespace());
- attribute(NAME_ATTRIBUTE, capability.getName());
- attribute(VERSION_ATTRIBUTE, capability.getVersion());
- end(PROVIDED_CAPABILITY_ELEMENT);
- }
- end(PROVIDED_CAPABILITIES_ELEMENT);
- }
- }
-
- protected void writeMetaRequirements(Collection<IRequirement> metaRequirements) {
- if (metaRequirements != null && metaRequirements.size() > 0) {
- start(META_REQUIREMENTS_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, metaRequirements.size());
- for (IRequirement req : metaRequirements) {
- writeRequirement(req);
- }
- end(META_REQUIREMENTS_ELEMENT);
- }
- }
-
- protected void writeRequirements(Collection<IRequirement> requirements) {
- if (requirements != null && requirements.size() > 0) {
- start(REQUIREMENTS_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, requirements.size());
- for (IRequirement req : requirements) {
- writeRequirement(req);
- }
- end(REQUIREMENTS_ELEMENT);
- }
- }
-
- protected void writeUpdateDescriptor(IInstallableUnit iu, IUpdateDescriptor descriptor) {
- if (descriptor == null)
- return;
-
- if (descriptor.getIUsBeingUpdated().size() > 1)
- throw new IllegalStateException();
- IMatchExpression<IInstallableUnit> singleUD = descriptor.getIUsBeingUpdated().iterator().next();
- start(UPDATE_DESCRIPTOR_ELEMENT);
- attribute(ID_ATTRIBUTE, RequiredCapability.extractName(singleUD));
- attribute(VERSION_RANGE_ATTRIBUTE, RequiredCapability.extractRange(singleUD));
- attribute(UPDATE_DESCRIPTOR_SEVERITY, descriptor.getSeverity());
- attribute(DESCRIPTION_ATTRIBUTE, descriptor.getDescription());
- end(UPDATE_DESCRIPTOR_ELEMENT);
- }
-
- protected void writeApplicabilityScope(IRequirement[][] capabilities) {
- start(APPLICABILITY_SCOPE);
- for (int i = 0; i < capabilities.length; i++) {
- start(APPLY_ON);
- writeRequirements(Arrays.asList(capabilities[i]));
- end(APPLY_ON);
- }
- end(APPLICABILITY_SCOPE);
- }
-
- protected void writeRequirementsChange(List<IRequirementChange> changes) {
- start(REQUIREMENT_CHANGES);
- for (int i = 0; i < changes.size(); i++) {
- writeRequirementChange(changes.get(i));
- }
- end(REQUIREMENT_CHANGES);
- }
-
- protected void writeRequirementChange(IRequirementChange change) {
- start(REQUIREMENT_CHANGE);
- if (change.applyOn() != null) {
- start(REQUIREMENT_FROM);
- writeRequirement(change.applyOn());
- end(REQUIREMENT_FROM);
- }
- if (change.newValue() != null) {
- start(REQUIREMENT_TO);
- writeRequirement(change.newValue());
- end(REQUIREMENT_TO);
- }
- end(REQUIREMENT_CHANGE);
- }
-
- protected void writeRequirement(IRequirement requirement) {
- start(REQUIREMENT_ELEMENT);
- IMatchExpression<IInstallableUnit> match = requirement.getMatches();
- if (RequiredCapability.isSimpleRequirement(match)) {
- attribute(NAMESPACE_ATTRIBUTE, RequiredCapability.extractNamespace(match));
- attribute(NAME_ATTRIBUTE, RequiredCapability.extractName(match));
- attribute(VERSION_RANGE_ATTRIBUTE, RequiredCapability.extractRange(match));
- attribute(CAPABILITY_OPTIONAL_ATTRIBUTE, requirement.getMin() == 0, false);
- attribute(CAPABILITY_MULTIPLE_ATTRIBUTE, requirement.getMax() > 1, false);
- } else {
- attribute(MATCH_ATTRIBUTE, ExpressionUtil.getOperand(match));
- Object[] params = match.getParameters();
- if (params.length > 0) {
- IExpressionFactory factory = ExpressionUtil.getFactory();
- IExpression[] constantArray = new IExpression[params.length];
- for (int idx = 0; idx < params.length; ++idx)
- constantArray[idx] = factory.constant(params[idx]);
- attribute(MATCH_PARAMETERS_ATTRIBUTE, factory.array(constantArray));
- }
- if (requirement.getMin() != 1)
- attribute(MIN_ATTRIBUTE, requirement.getMin());
- if (requirement.getMax() != 1)
- attribute(MAX_ATTRIBUTE, requirement.getMax());
- }
- attribute(CAPABILITY_GREED_ATTRIBUTE, requirement.isGreedy(), true);
- if (requirement.getFilter() != null)
- writeTrimmedCdata(CAPABILITY_FILTER_ELEMENT, requirement.getFilter().getParameters()[0].toString());
- if (requirement.getDescription() != null)
- writeTrimmedCdata(REQUIREMENT_DESCRIPTION_ELEMENT, requirement.getDescription());
- end(REQUIREMENT_ELEMENT);
- }
-
- protected void writeArtifactKeys(Collection<IArtifactKey> artifactKeys) {
- if (artifactKeys != null && artifactKeys.size() > 0) {
- start(ARTIFACT_KEYS_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, artifactKeys.size());
- for (IArtifactKey artifactKey : artifactKeys) {
- start(ARTIFACT_KEY_ELEMENT);
- attribute(ARTIFACT_KEY_CLASSIFIER_ATTRIBUTE, artifactKey.getClassifier());
- attribute(ID_ATTRIBUTE, artifactKey.getId());
- attribute(VERSION_ATTRIBUTE, artifactKey.getVersion());
- end(ARTIFACT_KEY_ELEMENT);
- }
- end(ARTIFACT_KEYS_ELEMENT);
- }
- }
-
- protected void writeTouchpointType(ITouchpointType touchpointType) {
- start(TOUCHPOINT_TYPE_ELEMENT);
- attribute(ID_ATTRIBUTE, touchpointType.getId());
- attribute(VERSION_ATTRIBUTE, touchpointType.getVersion());
- end(TOUCHPOINT_TYPE_ELEMENT);
- }
-
- protected void writeTouchpointData(Collection<ITouchpointData> touchpointData) {
- if (touchpointData != null && touchpointData.size() > 0) {
- start(TOUCHPOINT_DATA_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, touchpointData.size());
- for (ITouchpointData nextData : touchpointData) {
- Map<String, ITouchpointInstruction> instructions = nextData.getInstructions();
- if (instructions.size() > 0) {
- start(TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, instructions.size());
- for (Map.Entry<String, ITouchpointInstruction> entry : instructions.entrySet()) {
- start(TOUCHPOINT_DATA_INSTRUCTION_ELEMENT);
- attribute(TOUCHPOINT_DATA_INSTRUCTION_KEY_ATTRIBUTE, entry.getKey());
- ITouchpointInstruction instruction = entry.getValue();
- if (instruction.getImportAttribute() != null)
- attribute(TOUCHPOINT_DATA_INSTRUCTION_IMPORT_ATTRIBUTE, instruction.getImportAttribute());
- cdata(instruction.getBody(), true);
- end(TOUCHPOINT_DATA_INSTRUCTION_ELEMENT);
- }
- end(TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT);
- }
- }
- end(TOUCHPOINT_DATA_ELEMENT);
- }
- }
-
- private void writeTrimmedCdata(String element, String filter) {
- String trimmed;
- if (filter != null && (trimmed = filter.trim()).length() > 0) {
- start(element);
- cdata(trimmed);
- end(element);
- }
- }
-
- private void writeLicenses(Collection<ILicense> licenses) {
- if (licenses != null && licenses.size() > 0) {
- // In the future there may be more than one license, so we write this
- // as a collection of one.
- // See bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=216911
- start(LICENSES_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, licenses.size());
- for (ILicense license : licenses) {
- if (license == null)
- continue;
- start(LICENSE_ELEMENT);
- if (license.getLocation() != null) {
- attribute(URI_ATTRIBUTE, license.getLocation().toString());
-
- try {
- // we write the URL attribute for backwards compatibility with 3.4.x
- // this attribute should be removed if we make a breaking format change.
- attribute(URL_ATTRIBUTE, URIUtil.toURL(license.getLocation()).toExternalForm());
- } catch (MalformedURLException e) {
- attribute(URL_ATTRIBUTE, license.getLocation().toString());
- }
- }
- cdata(license.getBody(), true);
- end(LICENSE_ELEMENT);
- }
- end(LICENSES_ELEMENT);
- }
- }
-
- private void writeCopyright(ICopyright copyright) {
- if (copyright != null) {
- start(COPYRIGHT_ELEMENT);
- try {
- if (copyright.getLocation() != null) {
- attribute(URI_ATTRIBUTE, copyright.getLocation().toString());
- try {
- // we write the URL attribute for backwards compatibility with 3.4.x
- // this attribute should be removed if we make a breaking format change.
- attribute(URL_ATTRIBUTE, URIUtil.toURL(copyright.getLocation()).toExternalForm());
- } catch (MalformedURLException e) {
- attribute(URL_ATTRIBUTE, copyright.getLocation().toString());
- }
- }
- } catch (IllegalStateException ise) {
- LogHelper.log(new Status(IStatus.INFO, Activator.ID, "Error writing the copyright URL: " + copyright.getLocation())); //$NON-NLS-1$
- }
- cdata(copyright.getBody(), true);
- end(COPYRIGHT_ELEMENT);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/XMLConstants.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/XMLConstants.java
deleted file mode 100644
index 014f1b831..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/XMLConstants.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository.io;
-
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
-public interface XMLConstants extends org.eclipse.equinox.internal.p2.persistence.XMLConstants {
-
- // Constants defining the structure of the XML for metadata objects
-
- // A format version number for metadata XML.
- public static final Version CURRENT_VERSION = Version.createOSGi(0, 0, 1);
- public static final VersionRange XML_TOLERANCE = new VersionRange(CURRENT_VERSION, true, Version.createOSGi(2, 0, 0), false);
-
- // Constants for processing Instructions
- public static final String PI_METADATA_TARGET = "metadata"; //$NON-NLS-1$
-
- // Constants for metadata elements
- public static final String INSTALLABLE_UNITS_ELEMENT = "units"; //$NON-NLS-1$
- public static final String INSTALLABLE_UNIT_ELEMENT = "unit"; //$NON-NLS-1$
-
- //Constants for repository references
- public static final String REPOSITORY_REFERENCES_ELEMENT = "references"; //$NON-NLS-1$
- public static final String REPOSITORY_REFERENCE_ELEMENT = "repository"; //$NON-NLS-1$
- public static final String OPTIONS_ATTRIBUTE = "options"; //$NON-NLS-1$
-
- // Constants for sub-elements of an installable unit element
- public static final String ARTIFACT_KEYS_ELEMENT = "artifacts"; //$NON-NLS-1$
- public static final String ARTIFACT_KEY_ELEMENT = "artifact"; //$NON-NLS-1$
- public static final String REQUIREMENTS_ELEMENT = "requires"; //$NON-NLS-1$
- public static final String HOST_REQUIREMENTS_ELEMENT = "hostRequirements"; //$NON-NLS-1$
- public static final String META_REQUIREMENTS_ELEMENT = "metaRequirements"; //$NON-NLS-1$
- public static final String REQUIREMENT_ELEMENT = "required"; //$NON-NLS-1$
- public static final String PROVIDED_CAPABILITIES_ELEMENT = "provides"; //$NON-NLS-1$
- public static final String PROVIDED_CAPABILITY_ELEMENT = "provided"; //$NON-NLS-1$
- public static final String[] REQUIRED_PROVIDED_CAPABILITY_ATTRIBUTES = new String[] {NAMESPACE_ATTRIBUTE, NAME_ATTRIBUTE, VERSION_ATTRIBUTE};
- public static final String TOUCHPOINT_TYPE_ELEMENT = "touchpoint"; //$NON-NLS-1$
- public static final String TOUCHPOINT_DATA_ELEMENT = "touchpointData"; //$NON-NLS-1$
- public static final String IU_FILTER_ELEMENT = "filter"; //$NON-NLS-1$
- public static final String UPDATE_DESCRIPTOR_ELEMENT = "update"; //$NON-NLS-1$
-
- public static final String APPLICABILITY_SCOPE = "patchScope"; //$NON-NLS-1$
- public static final String APPLY_ON = "scope"; //$NON-NLS-1$
- public static final String REQUIREMENT_CHANGES = "changes"; //$NON-NLS-1$
- public static final String REQUIREMENT_CHANGE = "change"; //$NON-NLS-1$
- public static final String REQUIREMENT_FROM = "from"; //$NON-NLS-1$
- public static final String REQUIREMENT_TO = "to"; //$NON-NLS-1$
- public static final String LIFECYCLE = "lifeCycle"; //$NON-NLS-1$
-
- // Constants for attributes of an installable unit element
- public static final String SINGLETON_ATTRIBUTE = "singleton"; //$NON-NLS-1$
- public static final String FRAGMENT_ATTRIBUTE = "fragment"; //$NON-NLS-1$
- public static final String[] REQUIRED_IU_ATTRIBUTES = new String[] {ID_ATTRIBUTE, VERSION_ATTRIBUTE};
- public static final String[] OPTIONAL_IU_ATTRIBUTES = new String[] {SINGLETON_ATTRIBUTE};
- public static final String GENERATION_ATTRIBUTE = "generation"; //$NON-NLS-1$
-
- // Constants for sub-elements of a required capability element
- public static final String CAPABILITY_FILTER_ELEMENT = "filter"; //$NON-NLS-1$
- public static final String REQUIREMENT_DESCRIPTION_ELEMENT = "description"; //$NON-NLS-1$
-
- // Constants for attributes of a required capability element
- public static final String CAPABILITY_OPTIONAL_ATTRIBUTE = "optional"; //$NON-NLS-1$
- public static final String CAPABILITY_MULTIPLE_ATTRIBUTE = "multiple"; //$NON-NLS-1$
- public static final String CAPABILITY_GREED_ATTRIBUTE = "greedy"; //$NON-NLS-1$
- public static final String[] REQIURED_CAPABILITY_ATTRIBUTES = new String[] {NAMESPACE_ATTRIBUTE, NAME_ATTRIBUTE, VERSION_RANGE_ATTRIBUTE};
- public static final String[] REQIUREMENT_ATTRIBUTES = new String[] {MATCH_ATTRIBUTE};
- public static final String[] OPTIONAL_CAPABILITY_ATTRIBUTES = new String[] {CAPABILITY_OPTIONAL_ATTRIBUTE, CAPABILITY_MULTIPLE_ATTRIBUTE, CAPABILITY_GREED_ATTRIBUTE};
- public static final String[] OPTIONAL_REQUIREMENT_ATTRIBUTES = new String[] {MATCH_PARAMETERS_ATTRIBUTE, MIN_ATTRIBUTE, MAX_ATTRIBUTE, CAPABILITY_GREED_ATTRIBUTE};
-
- // Constants for attributes of an artifact key element
- public static final String ARTIFACT_KEY_CLASSIFIER_ATTRIBUTE = "classifier"; //$NON-NLS-1$
-
- // Constants for sub-elements of a touchpoint data element
- public static final String TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT = "instructions"; //$NON-NLS-1$
- public static final String TOUCHPOINT_DATA_INSTRUCTION_ELEMENT = "instruction"; //$NON-NLS-1$
-
- // Constants for attributes of an a touchpoint data instruction element
- public static final String TOUCHPOINT_DATA_INSTRUCTION_KEY_ATTRIBUTE = "key"; //$NON-NLS-1$
- public static final String TOUCHPOINT_DATA_INSTRUCTION_IMPORT_ATTRIBUTE = "import"; //$NON-NLS-1$
-
- // Constants for attributes of an update descriptor
- public static final String UPDATE_DESCRIPTOR_SEVERITY = "severity"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/messages.properties b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/messages.properties
deleted file mode 100644
index 01aff0899..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/messages.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-io_failedRead=Unable to read repository at {0}.
-io_failedWrite=Error occurred while writing repository at {0}.
-io_IncompatibleVersion=Metadata repository has incompatible version {0}; expected {1}.
-io_parseError=Error parsing metadata repository
-repo_loading = Loading the repository {0}.
-no_provisioning_agent=Unable to acquire provisioning agent service.
-repoMan_internalError=Internal error.
-repoMan_invalidLocation={0} is not a valid repository location.
-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_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AbstractMDRTask.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AbstractMDRTask.java
deleted file mode 100644
index 0ba8f6a4a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AbstractMDRTask.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository.ant;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.repository.Messages;
-import org.eclipse.equinox.internal.p2.repository.Activator;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-
-public class AbstractMDRTask extends Task {
- /*
- * Return the provisioning agent. Throw an exception if it cannot be obtained.
- */
- public static IProvisioningAgent getAgent() throws BuildException {
- IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(Activator.getContext(), IProvisioningAgent.SERVICE_NAME);
- if (agent == null)
- throw new BuildException(Messages.no_provisioning_agent);
- return agent;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AddChildTask.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AddChildTask.java
deleted file mode 100644
index 96c140057..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AddChildTask.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository.ant;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.apache.tools.ant.BuildException;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-
-/**
- * Ant task for adding a child repository to a composite metadata repository.
- */
-public class AddChildTask extends AbstractMDRTask {
-
- URI location; // location of the composite repository
- URI child; // address of the child to add
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() {
- validate();
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) getAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager == null)
- throw new BuildException("Unable to aquire metadata repository manager service.");
-
- // load the composite repository
- CompositeMetadataRepository repo = null;
- try {
- repo = (CompositeMetadataRepository) manager.loadRepository(location, null);
- } catch (ClassCastException e) {
- throw new BuildException("Repository at location: " + location + " is not a composite metadata repository.");
- } catch (ProvisionException e) {
- throw new BuildException("Error occurred while loading repository.", e);
- }
-
- // add the child
- repo.addChild(child);
- manager.removeRepository(location);
- }
-
- /*
- * Validate user input to ensure we have enough information to go forward.
- */
- private void validate() {
- if (location == null)
- throw new BuildException("Need to specify the composite repository location.");
- if (child == null)
- throw new BuildException("Need to specify the child repository location.");
- }
-
- /*
- * Set the location of the composite repository.
- */
- public void setLocation(String value) throws URISyntaxException {
- location = URIUtil.fromString(value);
- }
-
- /*
- * Set the location of the child repository.
- */
- public void setChild(String value) throws URISyntaxException {
- child = URIUtil.fromString(value);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/CreateCompositeMetadataRepositoryTask.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/CreateCompositeMetadataRepositoryTask.java
deleted file mode 100644
index 10260fafd..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/CreateCompositeMetadataRepositoryTask.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository.ant;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.tools.ant.BuildException;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-
-/**
- * Ant task for creating a new composite metadata repository.
- */
-public class CreateCompositeMetadataRepositoryTask extends AbstractMDRTask {
-
- URI location; // desired location of the composite repository
- String name = "Composite Metadata Repository";
- boolean compressed = true; // compress by default
- boolean failOnExists = false; // should we fail if one already exists?
- Map<String, String> properties = new HashMap<String, String>();
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) getAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager == null)
- throw new BuildException("Unable to aquire metadata repository manager service.");
-
- // remove the repo first.
- manager.removeRepository(location);
-
- // first try and load to see if one already exists at that location.
- // if we have an already existing repository at that location, then throw an error
- // if the user told us to
- try {
- IMetadataRepository repository = manager.loadRepository(location, null);
- if (repository instanceof CompositeMetadataRepository) {
- if (failOnExists)
- throw new BuildException("Composite repository already exists at location: " + location);
- return;
- } else {
- // we have a non-composite repo at this location. that is ok because we can co-exist.
- }
- } catch (ProvisionException e) {
- // re-throw the exception if we got anything other than "repo not found"
- if (e.getStatus().getCode() != ProvisionException.REPOSITORY_NOT_FOUND)
- throw new BuildException("Exception while trying to read repository at: " + location, e);
- }
-
- // create the properties
- if (compressed)
- properties.put(IRepository.PROP_COMPRESSED, Boolean.toString(true));
-
- // create the repository
- try {
- manager.createRepository(location, name, IMetadataRepositoryManager.TYPE_COMPOSITE_REPOSITORY, properties);
- } catch (ProvisionException e) {
- throw new BuildException("Error occurred while creating composite metadata repository.", e);
- }
- }
-
- /*
- * Set the name of the composite repository.
- */
- public void setName(String value) {
- name = value;
- }
-
- /*
- * Set the repository location.
- */
- public void setLocation(String value) throws URISyntaxException {
- location = URIUtil.fromString(value);
- }
-
- /*
- * Set whether or not this repository should be compressed.
- */
- public void setCompressed(boolean value) {
- compressed = value;
- }
-
- /*
- * Set whether or not we should fail the operation if a repository
- * already exists at the location.
- */
- public void setFailOnExists(boolean value) {
- failOnExists = value;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/RemoveChildTask.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/RemoveChildTask.java
deleted file mode 100644
index 31f6f1c5e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/RemoveChildTask.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository.ant;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.apache.tools.ant.BuildException;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-
-/**
- * Ant task to remove a specific child repository (or all the children repositories)
- * from a composite metadata repository.
- */
-public class RemoveChildTask extends AbstractMDRTask {
-
- URI location; // location of the composite repository
- URI child; // address of the child to be removed
- boolean allChildren; // should we remove all the children?
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) getAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager == null)
- throw new BuildException("Unable to aquire metadata repository manager service.");
-
- CompositeMetadataRepository repo;
- try {
- repo = (CompositeMetadataRepository) manager.loadRepository(location, null);
- } catch (ProvisionException e) {
- throw new BuildException("Error occurred while loading repository.", e);
- }
-
- // remove all the children repositories if requested, otherwise
- // just remove the specific child
- if (allChildren)
- repo.removeAllChildren();
- else
- repo.removeChild(child);
- }
-
- /*
- * Set the location of the composite repository.
- */
- public void setLocation(String value) throws URISyntaxException {
- location = URIUtil.fromString(value);
- }
-
- /*
- * Set the location of the child repository to remove.
- */
- public void setChild(String value) throws URISyntaxException {
- child = URIUtil.fromString(value);
- }
-
- /*
- * Set whether or not we should remove all the children.
- */
- public void setAllChildren(String value) {
- allChildren = Boolean.valueOf(value).booleanValue();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/.classpath b/bundles/org.eclipse.equinox.p2.metadata/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.metadata/.project b/bundles/org.eclipse.equinox.p2.metadata/.project
deleted file mode 100644
index e81f675e0..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/.project
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.metadata</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.metadata/.settings/.api_filters b/bundles/org.eclipse.equinox.p2.metadata/.settings/.api_filters
deleted file mode 100644
index d8f48e5c2..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/.settings/.api_filters
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.equinox.p2.metadata" version="2">
- <resource path="src/org/eclipse/equinox/p2/query/CompoundQueryable.java" type="org.eclipse.equinox.p2.query.CompoundQueryable">
- <filter id="576720909">
- <message_arguments>
- <message_argument value="IndexProvider&lt;T&gt;"/>
- <message_argument value="CompoundQueryable&lt;T&gt;"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
diff --git a/bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 1ffc4aa80..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,345 +0,0 @@
-#Mon Dec 21 22:17:52 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 38d7fa95e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Mon Nov 05 17:01:21 EST 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.metadata/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.metadata/META-INF/MANIFEST.MF
deleted file mode 100644
index dd1c72040..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,90 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.metadata;singleton:=true
-Bundle-Version: 2.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.metadata.MetadataActivator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.metadata;
- x-friends:="org.eclipse.equinox.p2.artifact.optimizers,
- org.eclipse.equinox.p2.artifact.processors,
- org.eclipse.equinox.p2.artifact.repository,
- org.eclipse.equinox.p2.director,
- org.eclipse.equinox.p2.director.app,
- org.eclipse.equinox.p2.engine,
- org.eclipse.equinox.p2.installer,
- org.eclipse.equinox.p2.metadata.generator,
- org.eclipse.equinox.p2.metadata.repository,
- org.eclipse.equinox.p2.operations,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.ql,
- org.eclipse.equinox.p2.ui",
- org.eclipse.equinox.internal.p2.metadata.expression;
- x-friends:="org.eclipse.equinox.p2.artifact.repository,
- org.eclipse.equinox.p2.directorywatcher,
- org.eclipse.equinox.p2.engine,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.ql",
- org.eclipse.equinox.internal.p2.metadata.expression.parser;x-friends:="org.eclipse.equinox.p2.ql",
- org.eclipse.equinox.internal.p2.metadata.index;
- x-friends:="org.eclipse.equinox.p2.artifact.repository,
- org.eclipse.equinox.p2.director,
- org.eclipse.equinox.p2.engine,
- org.eclipse.equinox.p2.director.app,
- org.eclipse.equinox.p2.directorywatcher,
- org.eclipse.equinox.p2.engine,
- org.eclipse.equinox.p2.metadata.repository,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.ql,
- org.eclipse.equinox.p2.ui,
- org.eclipse.equinox.p2.operations,
- org.eclipse.equinox.p2.tests,
- org.eclipse.equinox.p2.touchpoint.eclipse",
- org.eclipse.equinox.internal.p2.metadata.query;
- x-friends:="org.eclipse.equinox.p2.artifact.optimizers,
- org.eclipse.equinox.p2.artifact.processors,
- org.eclipse.equinox.p2.artifact.repository,
- org.eclipse.equinox.p2.console,
- org.eclipse.equinox.p2.core,
- org.eclipse.equinox.p2.director,
- org.eclipse.equinox.p2.director.app,
- org.eclipse.equinox.p2.directorywatcher,
- org.eclipse.equinox.p2.engine,
- org.eclipse.equinox.p2.exemplarysetup,
- org.eclipse.equinox.p2.extensionlocation,
- org.eclipse.equinox.p2.garbagecollector,
- org.eclipse.equinox.p2.installer,
- org.eclipse.equinox.p2.jarprocessor,
- org.eclipse.equinox.p2.metadata,
- org.eclipse.equinox.p2.metadata.generator,
- org.eclipse.equinox.p2.metadata.repository,
- org.eclipse.equinox.p2.operations,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.ql,
- org.eclipse.equinox.p2.reconciler.dropins,
- org.eclipse.equinox.p2.repository.tools,
- org.eclipse.equinox.p2.touchpoint.eclipse,
- org.eclipse.equinox.p2.touchpoint.natives,
- org.eclipse.equinox.p2.ui,
- org.eclipse.equinox.p2.ui.admin,
- org.eclipse.equinox.p2.ui.admin.rcp,
- org.eclipse.equinox.p2.ui.sdk,
- org.eclipse.equinox.p2.ui.sdk.scheduler,
- org.eclipse.equinox.p2.updatechecker,
- org.eclipse.equinox.p2.updatesite,
- org.eclipse.pde.core,
- org.eclipse.pde.ui",
- org.eclipse.equinox.p2.metadata;version="2.0.0",
- org.eclipse.equinox.p2.metadata.expression;version="2.0.0",
- org.eclipse.equinox.p2.metadata.index;version="2.0.0",
- org.eclipse.equinox.p2.query;version="2.0.0"
-Require-Bundle: org.eclipse.equinox.common,
- org.eclipse.equinox.p2.core;bundle-version="[2.0.0,3.0.0)"
-Import-Package: org.eclipse.osgi.service.localization;version="1.0.0",
- org.eclipse.osgi.util,
- org.osgi.framework;version="1.3.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
diff --git a/bundles/org.eclipse.equinox.p2.metadata/about.html b/bundles/org.eclipse.equinox.p2.metadata/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/build.properties b/bundles/org.eclipse.equinox.p2.metadata/build.properties
deleted file mode 100644
index 0feab6a85..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties,\
- OSGI-INF/
-src.includes = about.html,\
- OSGI-INF/
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.metadata/plugin.properties b/bundles/org.eclipse.equinox.p2.metadata/plugin.properties
deleted file mode 100644
index 7dc6c1d22..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Equinox Provisioning Metadata
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.metadata/pom.xml b/bundles/org.eclipse.equinox.p2.metadata/pom.xml
deleted file mode 100644
index 7e143b390..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.metadata</artifactId>
- <version>2.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ArtifactKey.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ArtifactKey.java
deleted file mode 100644
index c2021b28d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ArtifactKey.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.util.ArrayList;
-import java.util.StringTokenizer;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.expression.IMemberProvider;
-
-/**
- * The concrete type for representing IArtifactKey's.
- * <p>
- * See {link IArtifact for a description of the lifecycle of artifact keys)
- */
-public class ArtifactKey implements IArtifactKey, IMemberProvider {
- private static final String SEPARATOR = ","; //$NON-NLS-1$
-
- public static final String MEMBER_ID = "id"; //$NON-NLS-1$
- public static final String MEMBER_CLASSIFIER = "classifier"; //$NON-NLS-1$
- public static final String MEMBER_VERSION = "version"; //$NON-NLS-1$
-
- private final String id;
- private final String classifier;
- private final Version version;
-
- private static String[] getArrayFromList(String stringList, String separator) {
- if (stringList == null || stringList.trim().length() == 0)
- return new String[0];
- ArrayList<String> list = new ArrayList<String>();
- boolean separatorSeen = true;
- StringTokenizer tokens = new StringTokenizer(stringList, separator, true);
- while (tokens.hasMoreTokens()) {
- String token = tokens.nextToken().trim();
- if (token.equals(separator)) {
- if (separatorSeen)
- list.add(""); //$NON-NLS-1$
- separatorSeen = true;
- } else {
- separatorSeen = false;
- if (token.length() != 0)
- list.add(token);
- }
- }
- if (separatorSeen)
- list.add(""); //$NON-NLS-1$
- return list.toArray(new String[list.size()]);
- }
-
- public static IArtifactKey parse(String specification) {
- String[] parts = getArrayFromList(specification, SEPARATOR);
- if (parts.length < 2 || parts.length > 3)
- throw new IllegalArgumentException("Unexpected number of parts in artifact key: " + specification); //$NON-NLS-1$
- Version version = Version.emptyVersion;
- if (parts.length == 3 && parts[2].trim().length() > 0)
- version = Version.parseVersion(parts[2]);
- try {
- return new ArtifactKey(parts[0], parts[1], version);
- } catch (IllegalArgumentException e) {
- throw (IllegalArgumentException) new IllegalArgumentException("Wrong version syntax in artifact key: " + specification).initCause(e); //$NON-NLS-1$
- }
- }
-
- public ArtifactKey(String classifier, String id, Version version) {
- super();
- Assert.isNotNull(classifier);
- Assert.isNotNull(id);
- Assert.isNotNull(version);
- if (classifier.indexOf(SEPARATOR) != -1)
- throw new IllegalArgumentException("comma not allowed in classifier"); //$NON-NLS-1$
- if (id.indexOf(SEPARATOR) != -1)
- throw new IllegalArgumentException("comma not allowed in id"); //$NON-NLS-1$
- this.classifier = classifier;
- this.id = id;
- this.version = version;
- }
-
- public ArtifactKey(IArtifactKey artifactKey) {
- this.classifier = artifactKey.getClassifier();
- this.id = artifactKey.getId();
- this.version = artifactKey.getVersion();
- }
-
- public String getClassifier() {
- return classifier;
- }
-
- public Version getVersion() {
- return version;
- }
-
- public int hashCode() {
- int hash = id.hashCode();
- hash = 17 * hash + getVersion().hashCode();
- hash = 17 * hash + classifier.hashCode();
- return hash;
- }
-
- public String toString() {
- return classifier + SEPARATOR + id + SEPARATOR + getVersion();
- }
-
- public boolean equals(Object obj) {
- if (!(obj instanceof IArtifactKey))
- return false;
- IArtifactKey ak = (IArtifactKey) obj;
- return ak.getId().equals(id) && ak.getVersion().equals(getVersion()) && ak.getClassifier().equals(classifier);
- }
-
- public String getId() {
- return id;
- }
-
- public String toExternalForm() {
- StringBuffer data = new StringBuffer(classifier).append(SEPARATOR);
- data.append(id).append(SEPARATOR);
- data.append(version.toString());
- return data.toString();
- }
-
- public Object getMember(String memberName) {
- // It is OK to use identity comparisons here since
- // a) All constant valued strings are always interned
- // b) The Member constructor always interns the name
- //
- if (MEMBER_ID == memberName)
- return id;
- if (MEMBER_VERSION == memberName)
- return version;
- if (MEMBER_CLASSIFIER == memberName)
- return classifier;
- throw new IllegalArgumentException("No such member: " + memberName); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/BasicVersion.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/BasicVersion.java
deleted file mode 100644
index 0514284f0..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/BasicVersion.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import org.eclipse.equinox.p2.metadata.Version;
-
-/**
- * The abstract BasicVersion class adds the methods necessary to to compare and serialize
- * versions in version ranges. The class is not intended as public API.
- */
-public abstract class BasicVersion extends Version {
- private static final long serialVersionUID = -2983093417537485027L;
-
- /**
- * Returns the OSGi major component of this version identifier.
- *
- * @return The major component.
- * @throws UnsupportedOperationException if the first element in the
- * vector is not a number.
- * @see #isOSGiCompatible()
- */
- public abstract int getMajor();
-
- /**
- * Returns the OSGi micro component of this version identifier.
- *
- * @return The micro component.
- * @throws UnsupportedOperationException if the third element in the
- * vector is not a number.
- * @see #isOSGiCompatible()
- */
- public abstract int getMicro();
-
- /**
- * Returns the OSGi minor component of this version identifier.
- *
- * @return The minor component.
- * @throws UnsupportedOperationException if the second element in the
- * vector is not a number.
- * @see #isOSGiCompatible()
- */
- public abstract int getMinor();
-
- /**
- * Returns the OSGi qualifier component of this version identifier.
- *
- * @return The qualifier component or <code>null</code> if not set.
- * @throws UnsupportedOperationException if the fourth element in the
- * vector is set to something other then a string.
- * @see #isOSGiCompatible()
- */
- public abstract String getQualifier();
-
- /**
- * Appends the original for this version onto the <code>sb</code> StringBuffer
- * if present.
- * @param sb The buffer that will receive the raw string format
- * @param rangeSafe Set to <code>true</code> if range delimiters should be escaped
- */
- public abstract void originalToString(StringBuffer sb, boolean rangeSafe);
-
- /**
- * Appends the raw format for this version onto the <code>sb</code> StringBuffer.
- * @param sb The buffer that will receive the raw string format
- * @param rangeSafe Set to <code>true</code> if range delimiters should be escaped
- */
- public abstract void rawToString(StringBuffer sb, boolean rangeSafe);
-
- /**
- * This method is package protected since it violates the immutable
- * contract.
- * @return The raw vector. Must be treated as read-only
- */
- abstract Comparable<?>[] getVector();
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Copyright.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Copyright.java
deleted file mode 100644
index b56578830..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Copyright.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.net.URI;
-import org.eclipse.equinox.p2.metadata.ICopyright;
-
-/**
- * The <code>Copyright</code> class represents a software copyright. A copyright has
- * required body text which may be the full text or a summary. An optional location field can be specified
- * which links to full text.
- */
-public class Copyright implements ICopyright {
- /**
- * The <code>body</code> contains the descriptive text for the copyright. This may
- * be a summary for a copyright specified in a URL.
- */
- private final String body;
-
- /**
- * The <code>location</code> is the location of a document containing a copyright notice.
- */
- private URI location;
-
- /**
- * Creates a new copyright. The body must contain the full text of the copyright.
- *
- * @param location the location of a document containing the copyright notice, or <code>null</code>
- * @param body the copyright body, cannot be <code>null</code>
- * @throws IllegalArgumentException when the <code>body</code> is <code>null</code>
- */
- public Copyright(URI location, String body) {
- if (body == null)
- throw new IllegalArgumentException("body cannot be null"); //$NON-NLS-1$
- this.location = location;
- this.body = body;
- }
-
- /**
- * Returns the location of a document containing the copyright notice.
- *
- * @return The location of the copyright notice, or <code>null</code>
- */
- public URI getLocation() {
- return location;
- }
-
- /**
- * Returns the license body.
- *
- * @return the license body, never <code>null</code>
- */
- public String getBody() {
- return body;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IRequiredCapability.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IRequiredCapability.java
deleted file mode 100644
index ef92ee045..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IRequiredCapability.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import org.eclipse.equinox.p2.metadata.*;
-
-/**
- * A required capability represents some external constraint on an {@link IInstallableUnit}.
- * Each capability represents something an {@link IInstallableUnit} needs that
- * it expects to be provided by another {@link IInstallableUnit}. Capabilities are
- * entirely generic, and are intended to be capable of representing anything that
- * an {@link IInstallableUnit} may need either at install time, or at runtime.
- * <p>
- * Capabilities are segmented into namespaces. Anyone can introduce new
- * capability namespaces. Some well-known namespaces are introduced directly
- * by the provisioning framework.
- *
- * @see IInstallableUnit#NAMESPACE_IU_ID
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IRequiredCapability extends IRequirement {
-
- // public String getFilter();
-
- public String getName();
-
- public String getNamespace();
-
- /**
- * Returns the range of versions that satisfy this required capability. Returns
- * an empty version range ({@link VersionRange#emptyRange} if any version
- * will satisfy the capability.
- * @return the range of versions that satisfy this required capability.
- */
- public VersionRange getRange();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IUMap.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IUMap.java
deleted file mode 100644
index e3af9283d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IUMap.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Cloudsmith Inc. - rewrite for smaller memory footprint
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.query.*;
-
-/**
- * A map that stores {@link IInstallableUnit} instances in a way that is efficient to query
- */
-public class IUMap implements Cloneable {
- /**
- * Iterator over all the {@link IInstallableUnit} instances in the map.
- */
- public class MapIterator implements Iterator<IInstallableUnit> {
- //iterator over the keys in UIMap
- private final Iterator<Object> unitIterator;
- private IInstallableUnit[] currentBucket;
- private int bucketIndex = 0;
- private IInstallableUnit nextElement = null;
-
- MapIterator() {
- super();
- unitIterator = units.values().iterator();
- }
-
- public boolean hasNext() {
- return positionNext();
- }
-
- public IInstallableUnit next() {
- if (!positionNext())
- throw new NoSuchElementException();
-
- IInstallableUnit nxt = nextElement;
- nextElement = null;
- return nxt;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- private boolean positionNext() {
- if (nextElement != null)
- return true;
-
- if (currentBucket != null) {
- nextElement = currentBucket[bucketIndex];
- if (++bucketIndex == currentBucket.length) {
- currentBucket = null;
- bucketIndex = -1;
- }
- return true;
- }
-
- if (!unitIterator.hasNext())
- return false;
-
- Object val = unitIterator.next();
- if (val instanceof IInstallableUnit)
- nextElement = (IInstallableUnit) val;
- else {
- currentBucket = (IInstallableUnit[]) val;
- nextElement = currentBucket[0];
- bucketIndex = 1;
- }
- return true;
- }
- }
-
- /**
- * Map<String,Object> mapping IU id to either arrays of iu's or a single iu with that id.
- */
- final Map<String, Object> units = new HashMap<String, Object>();
-
- public IUMap() {
- //
- }
-
- private IUMap(IUMap cloneSource) {
- units.putAll(cloneSource.units);
- }
-
- public void add(IInstallableUnit unit) {
- String key = unit.getId();
- Object matching = units.get(key);
- if (matching == null) {
- units.put(key, unit);
- return;
- }
-
- // We already had something at this key position. It must be
- // preserved.
- if (matching.getClass().isArray()) {
- // Entry is an array. Add unique
- IInstallableUnit[] iuArr = (IInstallableUnit[]) matching;
- int idx = iuArr.length;
- while (--idx >= 0)
- if (iuArr[idx].equals(unit))
- // This unit has already been added
- return;
-
- IInstallableUnit[] iuArrPlus = new IInstallableUnit[iuArr.length + 1];
- System.arraycopy(iuArr, 0, iuArrPlus, 0, iuArr.length);
- iuArrPlus[iuArr.length] = unit;
- units.put(unit.getId(), iuArrPlus);
- } else {
- IInstallableUnit old = (IInstallableUnit) matching;
- if (!old.equals(unit))
- units.put(key, new IInstallableUnit[] {old, unit});
- }
- }
-
- public void addAll(IInstallableUnit[] toAdd) {
- for (int i = 0; i < toAdd.length; i++)
- add(toAdd[i]);
- }
-
- public void addAll(Collection<IInstallableUnit> toAdd) {
- for (IInstallableUnit unit : toAdd) {
- add(unit);
- }
- }
-
- public void clear() {
- units.clear();
- }
-
- @Override
- public IUMap clone() {
- return new IUMap(this);
- }
-
- public Iterator<IInstallableUnit> iterator() {
- return new MapIterator();
- }
-
- public boolean contains(IInstallableUnit unit) {
- return !internalGet(unit.getId(), unit.getVersion()).isEmpty();
- }
-
- /**
- * Returns a collection of units that has the given <code>id</code>.
- * @param id The id of the desired units. Must not be <code>null</code>.
- * @return The units corresponding to the given <code>id</code>.
- */
- public Collection<IInstallableUnit> getUnits(String id) {
- Object bucket = units.get(id);
- if (bucket == null)
- return CollectionUtils.emptyList();
- return bucket.getClass().isArray() ? CollectionUtils.unmodifiableList((IInstallableUnit[]) bucket) : Collections.<IInstallableUnit> singletonList((IInstallableUnit) bucket);
- }
-
- public IQueryResult<IInstallableUnit> get(String id) {
- return internalGet(id, null);
- }
-
- private IQueryResult<IInstallableUnit> internalGet(String id, Version version) {
- if (id == null) {
- IQuery<IInstallableUnit> query = version == null ? QueryUtil.createIUAnyQuery() : QueryUtil.createIUQuery(null, version);
- return query.perform(iterator());
- }
-
- Collection<IInstallableUnit> idUnits = getUnits(id);
- if (idUnits.isEmpty())
- return Collector.emptyCollector();
- return version == null ? new CollectionResult<IInstallableUnit>(idUnits) : QueryUtil.createIUQuery(id, version).perform(idUnits.iterator());
- }
-
- public IInstallableUnit get(String id, Version version) {
- IQueryResult<IInstallableUnit> result = internalGet(id, version);
- return result.isEmpty() ? null : result.iterator().next();
- }
-
- public void remove(IInstallableUnit unit) {
- String key = unit.getId();
- Object matching = units.get(key);
- if (matching == null)
- return;
-
- if (matching instanceof IInstallableUnit && matching.equals(unit)) {
- units.remove(key);
- return;
- }
-
- IInstallableUnit[] array = (IInstallableUnit[]) matching;
- int idx = array.length;
- while (--idx >= 0) {
- if (unit.equals(array[idx])) {
- if (array.length == 2) {
- // We no longer need this array. Replace it with the
- // entry that we keep.
- units.put(key, idx == 0 ? array[1] : array[0]);
- break;
- }
-
- // Shrink the array
- IInstallableUnit[] newArray = new IInstallableUnit[array.length - 1];
- if (idx > 0)
- System.arraycopy(array, 0, newArray, 0, idx);
- if (idx + 1 < array.length)
- System.arraycopy(array, idx + 1, newArray, idx, array.length - (idx + 1));
- units.put(key, newArray);
- break;
- }
- }
- }
-
- public void removeAll(Collection<IInstallableUnit> toRemove) {
- for (IInstallableUnit iu : toRemove)
- remove(iu);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java
deleted file mode 100644
index 8d564e0b5..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Genuitec, LLC - added license support
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-
-public class InstallableUnit implements IInstallableUnit, IMemberProvider {
- @SuppressWarnings("serial")
- private static final Map<IFilterExpression, IMatchExpression<IInstallableUnit>> filterCache = new LinkedHashMap<IFilterExpression, IMatchExpression<IInstallableUnit>>() {
- public boolean removeEldestEntry(Map.Entry<IFilterExpression, IMatchExpression<IInstallableUnit>> expr) {
- return size() > 64;
- }
- };
-
- private static final OrderedProperties NO_PROPERTIES = new OrderedProperties();
- private static final IProvidedCapability[] NO_PROVIDES = new IProvidedCapability[0];
- private static final IRequirement[] NO_REQUIRES = new IRequirement[0];
- private static final IArtifactKey[] NO_ARTIFACTS = new IArtifactKey[0];
- private static final ITouchpointData[] NO_TOUCHPOINT_DATA = new ITouchpointData[0];
- private static final ILicense[] NO_LICENSE = new ILicense[0];
-
- private static final IExpression filterWrap;
-
- public static final String MEMBER_PROVIDED_CAPABILITIES = "providedCapabilities"; //$NON-NLS-1$
- public static final String MEMBER_ID = "id"; //$NON-NLS-1$
- public static final String MEMBER_VERSION = "version"; //$NON-NLS-1$
- public static final String MEMBER_PROPERTIES = "properties"; //$NON-NLS-1$
- public static final String MEMBER_FILTER = "filter"; //$NON-NLS-1$
- public static final String MEMBER_ARTIFACTS = "artifacts"; //$NON-NLS-1$
- public static final String MEMBER_REQUIREMENTS = "requirements"; //$NON-NLS-1$
- public static final String MEMBER_LICENSES = "licenses"; //$NON-NLS-1$
- public static final String MEMBER_COPYRIGHT = "copyright"; //$NON-NLS-1$
- public static final String MEMBER_TOUCHPOINT_DATA = "touchpointData"; //$NON-NLS-1$
- public static final String MEMBER_TOUCHPOINT_TYPE = "touchpointType"; //$NON-NLS-1$
- public static final String MEMBER_UPDATE_DESCRIPTOR = "updateDescriptor"; //$NON-NLS-1$
- public static final String MEMBER_SINGLETON = "singleton"; //$NON-NLS-1$
-
- static {
- IExpressionFactory factory = ExpressionUtil.getFactory();
- filterWrap = factory.matches(factory.member(factory.thisVariable(), MEMBER_PROPERTIES), factory.indexedParameter(0));
- }
-
- private IArtifactKey[] artifacts = NO_ARTIFACTS;
- private IMatchExpression<IInstallableUnit> filter;
-
- private String id;
-
- private OrderedProperties properties;
- private OrderedProperties localizedProperties;
- IProvidedCapability[] providedCapabilities = NO_PROVIDES;
- private IRequirement[] requires = NO_REQUIRES;
- private IRequirement[] metaRequires = NO_REQUIRES;
-
- private boolean singleton;
-
- private ITouchpointData[] touchpointData = NO_TOUCHPOINT_DATA;
-
- private ITouchpointType touchpointType;
-
- private Version version = Version.emptyVersion;
-
- private IUpdateDescriptor updateInfo;
- private ILicense[] licenses = NO_LICENSE;
- private ICopyright copyright;
- public static final String MEMBER_TRANSLATED_PROPERTIES = "translatedProperties"; //$NON-NLS-1$
- public static final String MEMBER_PROFILE_PROPERTIES = "profileProperties"; //$NON-NLS-1$
-
- public InstallableUnit() {
- super();
- }
-
- public void addTouchpointData(ITouchpointData newData) {
- int tl = touchpointData.length;
- if (tl == 0)
- touchpointData = new ITouchpointData[] {newData};
- else {
- ITouchpointData[] newDatas = new ITouchpointData[tl + 1];
- System.arraycopy(touchpointData, 0, newDatas, 0, tl);
- newDatas[tl] = newData;
- touchpointData = newDatas;
- }
- }
-
- public int compareTo(IInstallableUnit other) {
- int cmp = getId().compareTo(other.getId());
- if (cmp == 0)
- cmp = getVersion().compareTo(other.getVersion());
- return cmp;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof IInstallableUnit))
- return false;
- final IInstallableUnit other = (IInstallableUnit) obj;
- if (id == null) {
- if (other.getId() != null)
- return false;
- } else if (!id.equals(other.getId()))
- return false;
- if (getVersion() == null) {
- if (other.getVersion() != null)
- return false;
- } else if (!getVersion().equals(other.getVersion()))
- return false;
- return true;
- }
-
- public Collection<IArtifactKey> getArtifacts() {
- return CollectionUtils.unmodifiableList(artifacts);
- }
-
- public IMatchExpression<IInstallableUnit> getFilter() {
- return filter;
- }
-
- public Collection<IInstallableUnitFragment> getFragments() {
- return CollectionUtils.emptyList();
- }
-
- public String getId() {
- return id;
- }
-
- /**
- * Get an <i>unmodifiable copy</i> of the properties
- * associated with the installable unit.
- *
- * @return an <i>unmodifiable copy</i> of the IU properties.
- */
- public Map<String, String> getProperties() {
- return OrderedProperties.unmodifiableProperties(properties());
- }
-
- /*
- * Helper method to cache localized properties
- */
- public String getLocalizedProperty(String key) {
- String result = null;
- if (localizedProperties != null)
- result = localizedProperties.getProperty(key);
- return result;
- }
-
- public String getProperty(String key) {
- return properties().getProperty(key);
- }
-
- public Collection<IProvidedCapability> getProvidedCapabilities() {
- return CollectionUtils.unmodifiableList(providedCapabilities);
- }
-
- public String getProperty(String key, String locale) {
- return TranslationSupport.getInstance().getIUProperty(this, key, locale);
- }
-
- public List<IRequirement> getRequirements() {
- return CollectionUtils.unmodifiableList(requires);
-
- }
-
- public Collection<ITouchpointData> getTouchpointData() {
- return CollectionUtils.unmodifiableList(touchpointData);
- }
-
- public ITouchpointType getTouchpointType() {
- return touchpointType != null ? touchpointType : ITouchpointType.NONE;
- }
-
- public Version getVersion() {
- return version;
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((id == null) ? 0 : id.hashCode());
- result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode());
- return result;
- }
-
- public boolean isResolved() {
- return false;
- }
-
- public boolean isSingleton() {
- return singleton;
- }
-
- private OrderedProperties properties() {
- return (properties != null ? properties : NO_PROPERTIES);
- }
-
- public void setArtifacts(IArtifactKey[] value) {
- if (value == null || value.length == 0)
- artifacts = NO_ARTIFACTS;
- else
- artifacts = value;
- }
-
- public void setCapabilities(IProvidedCapability[] newCapabilities) {
- if (newCapabilities == null || newCapabilities.length == 0)
- providedCapabilities = NO_PROVIDES;
- else
- providedCapabilities = newCapabilities;
- }
-
- public void setFilter(IMatchExpression<IInstallableUnit> filter) {
- this.filter = filter;
- }
-
- public void setFilter(String filter) {
- setFilter(parseFilter(filter));
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public static IMatchExpression<IInstallableUnit> parseFilter(String filterStr) {
- IFilterExpression filter = ExpressionUtil.parseLDAP(filterStr);
- if (filter == null)
- return null;
-
- synchronized (filterCache) {
- IMatchExpression<IInstallableUnit> matchExpr = filterCache.get(filter);
- if (matchExpr != null)
- return matchExpr;
-
- matchExpr = ExpressionUtil.getFactory().<IInstallableUnit> matchExpression(filterWrap, filter);
- filterCache.put(filter, matchExpr);
- return matchExpr;
- }
- }
-
- /*
- * Helper method to cache localized properties
- */
- public String setLocalizedProperty(String key, String value) {
- if (localizedProperties == null)
- localizedProperties = new OrderedProperties();
- return localizedProperties.put(key, value);
- }
-
- public String setProperty(String key, String value) {
- if (value == null)
- return (properties != null ? (String) properties.remove(key) : null);
- if (properties == null)
- properties = new OrderedProperties();
- return (String) properties.setProperty(key, value);
- }
-
- public void setRequiredCapabilities(IRequirement[] capabilities) {
- if (capabilities.length == 0) {
- this.requires = NO_REQUIRES;
- } else {
- //copy array for safety
- this.requires = capabilities.clone();
- }
- }
-
- public void setSingleton(boolean singleton) {
- this.singleton = singleton;
- }
-
- public void setTouchpointType(ITouchpointType type) {
- this.touchpointType = (type != ITouchpointType.NONE ? type : null);
- }
-
- public void setVersion(Version newVersion) {
- this.version = (newVersion != null ? newVersion : Version.emptyVersion);
- }
-
- public String toString() {
- return id + ' ' + getVersion();
- }
-
- public IInstallableUnit unresolved() {
- return this;
- }
-
- public IUpdateDescriptor getUpdateDescriptor() {
- return updateInfo;
- }
-
- public void setUpdateDescriptor(IUpdateDescriptor updateInfo) {
- this.updateInfo = updateInfo;
- }
-
- public void setLicenses(ILicense[] license) {
- this.licenses = license == null ? NO_LICENSE : license;
- }
-
- public Collection<ILicense> getLicenses() {
- return CollectionUtils.unmodifiableList(licenses);
- }
-
- public Collection<ILicense> getLicenses(String locale) {
- return CollectionUtils.unmodifiableList(TranslationSupport.getInstance().getLicenses(this, locale));
- }
-
- public void setCopyright(ICopyright copyright) {
- this.copyright = copyright;
- }
-
- public ICopyright getCopyright() {
- return copyright;
- }
-
- public ICopyright getCopyright(String locale) {
- return TranslationSupport.getInstance().getCopyright(this, locale);
- }
-
- public boolean satisfies(IRequirement candidate) {
- return candidate.isMatch(this);
- }
-
- public Collection<IRequirement> getMetaRequirements() {
- return CollectionUtils.unmodifiableList(metaRequires);
- }
-
- public void setMetaRequiredCapabilities(IRequirement[] metaReqs) {
- if (metaReqs.length == 0) {
- this.metaRequires = NO_REQUIRES;
- } else {
- //copy array for safety
- this.metaRequires = metaReqs.clone();
- }
- }
-
- public Object getMember(String memberName) {
- // It is OK to use identity comparisons here since
- // a) All constant valued strings are always interned
- // b) The Member constructor always interns the name
- //
- if (MEMBER_PROVIDED_CAPABILITIES == memberName)
- return providedCapabilities;
- if (MEMBER_ID == memberName)
- return id;
- if (MEMBER_VERSION == memberName)
- return version;
- if (MEMBER_PROPERTIES == memberName)
- return properties;
- if (MEMBER_FILTER == memberName)
- return filter;
- if (MEMBER_ARTIFACTS == memberName)
- return artifacts;
- if (MEMBER_REQUIREMENTS == memberName)
- return requires;
- if (MEMBER_LICENSES == memberName)
- return licenses;
- if (MEMBER_COPYRIGHT == memberName)
- return copyright;
- if (MEMBER_TOUCHPOINT_DATA == memberName)
- return touchpointData;
- if (MEMBER_TOUCHPOINT_TYPE == memberName)
- return touchpointType;
- if (MEMBER_UPDATE_DESCRIPTOR == memberName)
- return updateInfo;
- if (MEMBER_SINGLETON == memberName)
- return Boolean.valueOf(singleton);
- throw new IllegalArgumentException("No such member: " + memberName); //$NON-NLS-1$
- }
-
- public static IInstallableUnit contextIU(String ws, String os, String arch) {
- InstallableUnit ctxIU = new InstallableUnit();
- ctxIU.setId("org.eclipse.equinox.p2.context.iu"); //$NON-NLS-1$
- ctxIU.setProperty("osgi.ws", ws); //$NON-NLS-1$
- ctxIU.setProperty("osgi.os", os); //$NON-NLS-1$
- ctxIU.setProperty("osgi.arch", arch); //$NON-NLS-1$
- return ctxIU;
- }
-
- public static IInstallableUnit contextIU(Map<String, String> environment) {
- InstallableUnit ctxIU = new InstallableUnit();
- ctxIU.setId("org.eclipse.equinox.p2.context.iu"); //$NON-NLS-1$
- for (Map.Entry<String, String> entry : environment.entrySet())
- ctxIU.setProperty(entry.getKey(), entry.getValue());
- return ctxIU;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitFragment.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitFragment.java
deleted file mode 100644
index 72dd2b3d1..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitFragment.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.util.Collection;
-import java.util.List;
-import org.eclipse.equinox.p2.metadata.IInstallableUnitFragment;
-import org.eclipse.equinox.p2.metadata.IRequirement;
-
-public class InstallableUnitFragment extends InstallableUnit implements IInstallableUnitFragment {
-
- private Collection<IRequirement> hostRequirements;
-
- public InstallableUnitFragment() {
- super();
- }
-
- public void setHost(Collection<IRequirement> hostRequirements) {
- if (hostRequirements == null)
- return;
- this.hostRequirements = hostRequirements;
- addRequiredCapability(hostRequirements);
- }
-
- private void addRequiredCapability(Collection<IRequirement> toAdd) {
- List<IRequirement> current = super.getRequirements();
- int currSize = current.size();
- IRequirement[] result = new IRequirement[currSize + toAdd.size()];
- int i = 0;
- for (; i < currSize; ++i)
- result[i] = current.get(i);
- for (IRequirement requirement : toAdd)
- result[i++] = requirement;
- setRequiredCapabilities(result);
- }
-
- public Collection<IRequirement> getHost() {
- return hostRequirements;
- }
-
- public Object getMember(String memberName) {
- return "host".equals(memberName) ? hostRequirements : super.getMember(memberName); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitPatch.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitPatch.java
deleted file mode 100644
index 6b097910d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitPatch.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.util.List;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.metadata.*;
-
-public class InstallableUnitPatch extends InstallableUnit implements IInstallableUnitPatch {
- public static final String MEMBER_APPLICABILITY_SCOPE = "applicabilityScope"; //$NON-NLS-1$
- public static final String MEMBER_LIFECYCLE = "lifeCycle"; //$NON-NLS-1$
- public static final String MEMBER_REQUIREMENTS_CHANGE = "requirementsChange"; //$NON-NLS-1$
-
- private IRequirementChange[] changes;
- private IRequirement lifeCycle;
- private IRequirement[][] scope;
-
- private void addRequiredCapability(IRequirement[] toAdd) {
- List<IRequirement> current = super.getRequirements();
- int currSize = current.size();
- IRequirement[] result = new IRequirement[currSize + toAdd.length];
- for (int i = 0; i < currSize; ++i)
- result[i] = current.get(i);
- System.arraycopy(toAdd, 0, result, current.size(), toAdd.length);
- setRequiredCapabilities(result);
- }
-
- public IRequirement[][] getApplicabilityScope() {
- return scope;
- }
-
- public IRequirement getLifeCycle() {
- return lifeCycle;
- }
-
- public List<IRequirementChange> getRequirementsChange() {
- return CollectionUtils.unmodifiableList(changes);
- }
-
- public void setApplicabilityScope(IRequirement[][] applyTo) {
- scope = applyTo;
- }
-
- public void setLifeCycle(IRequirement lifeCycle) {
- if (lifeCycle == null)
- return;
- this.lifeCycle = lifeCycle;
- addRequiredCapability(new IRequirement[] {lifeCycle});
- }
-
- public void setRequirementsChange(IRequirementChange[] changes) {
- this.changes = changes;
- }
-
- public Object getMember(String memberName) {
- if (MEMBER_APPLICABILITY_SCOPE == memberName)
- return scope;
- if (MEMBER_LIFECYCLE == memberName)
- return lifeCycle;
- if (MEMBER_REQUIREMENTS_CHANGE == memberName)
- return changes;
- return super.getMember(memberName);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/License.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/License.java
deleted file mode 100644
index 38c62c1b1..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/License.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Genuitec, LLC and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Genuitec, LLC - initial API and implementation
- * IBM Corporation - ongoing development
- * EclipseSource - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.io.UnsupportedEncodingException;
-import java.math.BigInteger;
-import java.net.URI;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import org.eclipse.equinox.p2.metadata.ILicense;
-
-/**
- * The <code>License</code> class represents a software license. A license has required body text
- * which may be the full text or an annotation. An optional URL field can be specified
- * which links to full text. Licenses can be easily compared using their digests.
- */
-public class License implements ILicense {
- /**
- * The <code>body</code> contains the descriptive text for the license. This may
- * be a summary for a full license specified in a URL.
- */
- private final String body;
-
- /**
- * The <code>location</code> is the URL of the license.
- */
- private URI location;
-
- /**
- * The <code>digest</code> is the cached message digest of the normalized body
- */
- private String digest;
-
- /**
- * Creates a new license object which is identified by users using the <code>body</code> field.
- * The body should contain either the full text of the license or an summary for a license
- * fully specified in the given location.
- *
- * @param location the location of a document containing the full license, or <code>null</code>
- * @param body the license body, cannot be <code>null</code>
- * @throws IllegalArgumentException when the <code>body</code> is <code>null</code>
- */
- public License(URI location, String body, String uuid) {
- if (body == null)
- throw new IllegalArgumentException("body cannot be null"); //$NON-NLS-1$
- this.body = body;
- this.location = location;
- this.digest = uuid;
- }
-
- /**
- * Returns the location of a document containing the full license.
- *
- * @return the location of the license document, or <code>null</code>
- */
- public URI getLocation() {
- return location;
- }
-
- /**
- * Returns the license body.
- * @return the license body, never <code>null</code>
- */
- public String getBody() {
- return body;
- }
-
- /**
- * Returns the message digest of the license body. The digest is calculated on a normalized
- * version of the license where all whitespace has been reduced to one space.
- * @return the message digest as a <code>BigInteger</code>, never <code>null</code>
- */
- public synchronized String getUUID() {
- if (digest == null)
- digest = calculateLicenseDigest().toString(16);
-
- return digest;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (obj == this)
- return true;
- if (obj == null)
- return false;
- if (obj instanceof ILicense) {
- ILicense other = (ILicense) obj;
- if (other.getUUID().equals(getUUID()))
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return getUUID().hashCode();
- }
-
- private BigInteger calculateLicenseDigest() {
- String message = normalize(getBody());
- try {
- MessageDigest algorithm = MessageDigest.getInstance("MD5"); //$NON-NLS-1$
- algorithm.reset();
- algorithm.update(message.getBytes("UTF-8")); //$NON-NLS-1$
- byte[] digestBytes = algorithm.digest();
- return new BigInteger(1, digestBytes);
- } catch (NoSuchAlgorithmException e) {
- throw new RuntimeException(e);
- } catch (UnsupportedEncodingException e) {
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Replace all sequences of whitespace with a single whitespace character.
- */
- private String normalize(String license) {
- String text = license.trim();
- StringBuffer result = new StringBuffer();
- int length = text.length();
- for (int i = 0; i < length; i++) {
- char c = text.charAt(i);
- boolean foundWhitespace = false;
- while (Character.isWhitespace(c) && i < length) {
- foundWhitespace = true;
- c = text.charAt(++i);
- }
- if (foundWhitespace)
- result.append(' ');
- if (i < length)
- result.append(c);
- }
- return result.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Messages.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Messages.java
deleted file mode 100644
index 654d4c0aa..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Messages.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.internal.p2.metadata;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * TODO Shouldn't be a public class in an API package.
- */
-public class Messages extends NLS {
-
- public static String _0_is_not_a_valid_qualifier_in_osgi_1;
-
- public static String array_can_not_be_empty;
-
- public static String array_can_not_have_character_group;
-
- public static String auto_can_not_have_pad_value;
-
- public static String cannot_combine_ignore_with_other_instruction;
-
- public static String cannot_combine_range_upper_bound_with_pad_value;
-
- public static String character_group_defined_more_then_once;
-
- public static String colon_expected_before_original_version_0;
-
- public static String default_defined_more_then_once;
-
- public static String delimiter_can_not_be_ignored;
-
- public static String delimiter_can_not_have_default_value;
-
- public static String delimiter_can_not_have_pad_value;
-
- public static String delimiter_can_not_have_range;
-
- public static String EOS_after_escape;
-
- public static String expected_orignal_after_colon_0;
-
- public static String expected_orignal_after_slash_0;
-
- public static String expected_slash_after_raw_vector_0;
-
- public static String filter_trailing_characters;
-
- public static String filter_missing_leftparen;
-
- public static String filter_missing_rightparen;
-
- public static String filter_invalid_operator;
-
- public static String filter_missing_attr;
-
- public static String filter_invalid_value;
-
- public static String filter_missing_value;
-
- public static String filter_premature_end;
-
- public static String format_0_unable_to_parse_1;
-
- public static String format_0_unable_to_parse_empty_version;
-
- public static String format_is_empty;
-
- public static String format_must_be_delimited_by_colon_0;
-
- public static String group_can_not_be_empty;
-
- public static String ignore_defined_more_then_once;
-
- public static String illegal_character_encountered_ascii_0;
-
- public static String missing_comma_in_range_0;
-
- public static String negative_character_range;
-
- public static String neither_raw_vector_nor_format_specified_0;
-
- public static String number_can_not_have_pad_value;
-
- public static String only_format_specified_0;
-
- public static String only_max_and_empty_string_defaults_can_have_translations;
-
- public static String original_must_start_with_colon_0;
-
- public static String original_stated_but_missing_0;
-
- public static String pad_defined_more_then_once;
-
- public static String performing_subquery;
-
- public static String premature_end_of_format;
-
- public static String premature_end_of_format_expected_0;
-
- public static String premature_EOS_0;
-
- public static String range_boundaries_0_and_1_cannot_have_different_formats;
-
- public static String range_defined_more_then_once;
-
- public static String range_max_cannot_be_less_then_range_min;
-
- public static String range_max_cannot_be_zero;
-
- public static String range_min_0_is_not_less_then_range_max_1;
-
- public static String raw_and_original_must_use_same_range_inclusion_0;
-
- public static String raw_element_can_not_have_pad_value;
-
- public static String raw_element_expected_0;
-
- public static String string_can_not_have_pad_value;
-
- public static String syntax_error_in_version_format_0_1_2;
-
- public static String syntax_error_in_version_format_0_1_found_2_expected_3;
-
- public static String unbalanced_format_parenthesis;
-
- public static String no_expression_factory;
-
- public static String no_expression_parser;
-
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.metadata.messages"; //$NON-NLS-1$
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- // Prevent instance creation
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/MetadataActivator.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/MetadataActivator.java
deleted file mode 100644
index 94677c600..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/MetadataActivator.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class MetadataActivator implements BundleActivator {
- public static final String PI_METADATA = "org.eclipse.equinox.p2.metadata"; //$NON-NLS-1$
-
- public static MetadataActivator instance;
-
- private BundleContext context;
-
- public static BundleContext getContext() {
- MetadataActivator activator = instance;
- return activator == null ? null : activator.context;
- }
-
- public void start(BundleContext aContext) throws Exception {
- context = aContext;
- instance = this;
- }
-
- public void stop(BundleContext aContext) throws Exception {
- instance = null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OSGiVersion.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OSGiVersion.java
deleted file mode 100644
index 5704d4da3..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OSGiVersion.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.util.List;
-import org.eclipse.equinox.p2.metadata.IVersionFormat;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @Immutable
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class OSGiVersion extends BasicVersion {
-
- private static final long serialVersionUID = -4530178927569560877L;
-
- private static final boolean[] allowedOSGiChars;
-
- private final int major;
-
- private final int minor;
-
- private final int micro;
-
- private final Comparable<?> qualifier;
-
- static {
- allowedOSGiChars = new boolean[128];
- for (int c = '0'; c <= '9'; ++c)
- allowedOSGiChars[c] = true;
- for (int c = 'A'; c <= 'Z'; ++c)
- allowedOSGiChars[c] = true;
- for (int c = 'a'; c <= 'z'; ++c)
- allowedOSGiChars[c] = true;
- allowedOSGiChars['_'] = true;
- allowedOSGiChars['-'] = true;
- }
-
- public static boolean isValidOSGiQualifier(Comparable<?> e) {
- if (e == VersionVector.MAXS_VALUE)
- return true;
-
- if (!(e instanceof String))
- return false;
-
- String s = (String) e;
- int idx = s.length();
- boolean[] allowed = allowedOSGiChars;
- while (--idx >= 0) {
- int c = s.charAt(idx);
- if (c < '-' || c > 'z' || !allowed[c])
- return false;
- }
- return true;
- }
-
- static BasicVersion fromVector(List<Comparable<?>> vector) {
- int vtop = vector.size() - 1;
- Comparable<?> pad = vector.get(vtop);
- if (vtop != 4) {
- if (vtop == 0) {
- if (pad == null)
- return (BasicVersion) emptyVersion;
- if (pad == VersionVector.MAX_VALUE)
- return (BasicVersion) MAX_VERSION;
- }
- throw new IllegalArgumentException();
- }
- int major = ((Integer) vector.get(0)).intValue();
- int minor = ((Integer) vector.get(1)).intValue();
- int micro = ((Integer) vector.get(2)).intValue();
- Comparable<?> qualifier = vector.get(3);
- return (major == 0 && minor == 0 && micro == 0 && qualifier == VersionVector.MINS_VALUE) ? (BasicVersion) emptyVersion : new OSGiVersion(major, minor, micro, qualifier);
- }
-
- public OSGiVersion(int major, int minor, int micro, Comparable<? extends Object> qualifier) {
- this.major = major;
- this.minor = minor;
- this.micro = micro;
- if (!isValidOSGiQualifier(qualifier))
- throw new IllegalArgumentException(NLS.bind(Messages._0_is_not_a_valid_qualifier_in_osgi_1, "qualifier", this)); //$NON-NLS-1$
- //intern the qualifier string to avoid duplication
- if (qualifier instanceof String)
- qualifier = ((String) qualifier).intern();
- this.qualifier = qualifier;
- }
-
- public int compareTo(Version v) {
- int result;
- if (!(v instanceof OSGiVersion)) {
- BasicVersion ov = (BasicVersion) v;
- result = VersionVector.compare(getVector(), null, ov.getVector(), ov.getPad());
- } else {
- OSGiVersion ov = (OSGiVersion) v;
- result = major - ov.major;
- if (result == 0) {
- result = minor - ov.minor;
- if (result == 0) {
- result = micro - ov.micro;
- if (result == 0)
- result = VersionVector.compareSegments(qualifier, ov.qualifier);
- }
- }
- }
- return result;
- }
-
- public boolean equals(Object object) {
- if (object == this)
- return true;
-
- if (!(object instanceof OSGiVersion)) {
- if (object instanceof BasicVersion) {
- BasicVersion ov = (BasicVersion) object;
- return VersionVector.equals(getVector(), null, ov.getVector(), ov.getPad());
- }
- return false;
- }
-
- OSGiVersion other = (OSGiVersion) object;
- return micro == other.micro && minor == other.minor && major == other.major && qualifier.equals(other.qualifier);
- }
-
- public IVersionFormat getFormat() {
- return VersionFormat.OSGI_FORMAT;
- }
-
- public int getMajor() {
- return major;
- }
-
- public int getMicro() {
- return micro;
- }
-
- public int getMinor() {
- return minor;
- }
-
- public String getOriginal() {
- return toString();
- }
-
- public String getQualifier() {
- return qualifier == VersionVector.MAXS_VALUE ? IVersionFormat.DEFAULT_MAX_STRING_TRANSLATION : (String) qualifier;
- }
-
- public int hashCode() {
- return (major << 24) + (minor << 16) + (micro << 8) + qualifier.hashCode();
- }
-
- public boolean isOSGiCompatible() {
- return true;
- }
-
- public void originalToString(StringBuffer sb, boolean rangeSafe) {
- toString(sb);
- }
-
- public void rawToString(StringBuffer sb, boolean rangeSafe) {
- sb.append(major);
- sb.append('.');
- sb.append(minor);
- sb.append('.');
- sb.append(micro);
- sb.append('.');
- sb.append('\'');
- sb.append(qualifier);
- sb.append('\'');
- }
-
- public void toString(StringBuffer sb) {
- sb.append(major);
- sb.append('.');
- sb.append(minor);
- sb.append('.');
- sb.append(micro);
- if (qualifier != VersionVector.MINS_VALUE) {
- sb.append('.');
- sb.append(getQualifier());
- }
- }
-
- public Comparable<?>[] getVector() {
- return new Comparable[] {VersionParser.valueOf(major), VersionParser.valueOf(minor), VersionParser.valueOf(micro), qualifier};
- }
-
- public Comparable<?> getPad() {
- return null;
- }
-
- public Comparable<?> getSegment(int index) {
- switch (index) {
- case 0 :
- return VersionParser.valueOf(major);
- case 1 :
- return VersionParser.valueOf(minor);
- case 2 :
- return VersionParser.valueOf(micro);
- case 3 :
- return qualifier;
- }
- throw new ArrayIndexOutOfBoundsException(index); // Not in the imaginary vector array
- }
-
- public int getSegmentCount() {
- return 4;
- }
-
- private Object readResolve() {
- OSGiVersion v = this;
- // Preserve the empty string singleton.
- if (qualifier.equals(VersionVector.MINS_VALUE))
- v = new OSGiVersion(major, minor, micro, VersionVector.MINS_VALUE);
- return v;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OmniVersion.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OmniVersion.java
deleted file mode 100644
index 48ca355e9..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OmniVersion.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.util.Collections;
-import java.util.List;
-import org.eclipse.equinox.p2.metadata.IVersionFormat;
-import org.eclipse.equinox.p2.metadata.Version;
-
-/**
- * <p>The Generic Omni Version is composed of a vector of Comparable objects and a pad value. The pad
- * might be <code>null</code>. The vector can contain integers, strings, {@link VersionVector}
- * instances, or one of the special objects {@link VersionVector#MAX_VALUE MAX_VALUE},
- * {@link VersionVector#MAXS_VALUE MAXS_VALUE}, or {@link VersionVector#MIN_VALUE MIN_VALUE}.</p>
- *
- * <p>When two versions are compared, they are always considered padded to infinity by their
- * pad value or by {@link VersionVector#MIN_VALUE MIN_VALUE} in case the pad value is
- * <code>null</code>. The comparison is type sensitive so that:</p><pre>
- * MAX_VALUE &gt; Integer &gt; VersionVector &gt; MAXS_VALUE &gt; String &gt; MIN_VALUE<br/>
- * </pre>
- *
- * @Immutable
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class OmniVersion extends BasicVersion {
- private static final long serialVersionUID = 1996212688810048879L;
-
- private static OmniVersion minimumVersion;
-
- private static OmniVersion maximumVersion;
-
- private static final Comparable<?>[] emptyVector = new Comparable<?>[0];
-
- private final Comparable<?>[] vector;
-
- private final Comparable<?> padValue;
-
- /**
- * The optional format
- */
- private final IVersionFormat format;
-
- /**
- * The optional original string
- */
- private final String original;
-
- static BasicVersion fromVector(List<Comparable<?>> vector, IVersionFormat format, String original) {
- int vtop = vector.size() - 1;
- Comparable<?> padValue = vector.get(vtop);
- if (vtop == 0) {
- if (padValue == null)
- return (BasicVersion) emptyVersion;
- if (padValue == VersionVector.MAX_VALUE)
- return (BasicVersion) MAX_VERSION;
- }
- if (vtop == 3 && padValue == null && vector.get(0) == VersionParser.ZERO_INT && vector.get(1) == VersionParser.ZERO_INT && vector.get(2) == VersionParser.ZERO_INT)
- return (BasicVersion) emptyVersion;
-
- return new OmniVersion(vector, format, original);
- }
-
- public static Version createMinVersion() {
- if (minimumVersion == null)
- minimumVersion = new OmniVersion(Collections.<Comparable<?>> singletonList(null), null, null);
- return minimumVersion;
- }
-
- public static Version createMaxVersion() {
- if (maximumVersion == null)
- maximumVersion = new OmniVersion(Collections.<Comparable<?>> singletonList(VersionVector.MAX_VALUE), null, null);
- return maximumVersion;
- }
-
- private OmniVersion(List<Comparable<?>> vector, IVersionFormat format, String original) {
- int vtop = vector.size() - 1;
- if (vtop > 0) {
- Comparable<?>[] v = new Comparable<?>[vtop];
- for (int idx = 0; idx < vtop; ++idx)
- v[idx] = vector.get(idx);
- this.vector = v;
- } else
- this.vector = emptyVector;
- this.padValue = vector.get(vtop);
- this.format = format;
- this.original = original;
- }
-
- public boolean equals(Object o) {
- if (o == this)
- return true;
-
- if (!(o instanceof BasicVersion))
- return false;
-
- BasicVersion ov = (BasicVersion) o;
- return VersionVector.equals(vector, padValue, ov.getVector(), ov.getPad());
- }
-
- public IVersionFormat getFormat() {
- return format;
- }
-
- public int getMajor() {
- return getIntElement(0);
- }
-
- public int getMicro() {
- return getIntElement(2);
- }
-
- public int getMinor() {
- return getIntElement(1);
- }
-
- public String getOriginal() {
- return original;
- }
-
- public String getQualifier() {
- if (vector.length == 3)
- return VersionVector.MINS_VALUE;
-
- if (vector.length != 4)
- throw new UnsupportedOperationException();
-
- Comparable<?> qualifier = vector[3];
- if (qualifier == VersionVector.MAXS_VALUE)
- return IVersionFormat.DEFAULT_MAX_STRING_TRANSLATION;
- if (!(qualifier instanceof String))
- throw new UnsupportedOperationException();
- return (String) qualifier;
- }
-
- public int hashCode() {
- return VersionVector.hashCode(vector, padValue);
- }
-
- /**
- * Checks if this version is in compliance with the OSGi version spec.
- * @return A flag indicating whether the version is OSGi compatible or not.
- */
- public boolean isOSGiCompatible() {
- if (vector.length < 3 || vector.length > 4)
- return (this == emptyVersion || this == MAX_VERSION);
-
- if (getPad() != null)
- return false;
-
- for (int i = 0; i < 3; ++i) {
- Object e = vector[i];
- if (!(e instanceof Integer && ((Integer) e).intValue() >= 0))
- return false;
- }
-
- if (vector.length == 3)
- return true; // No qualifier. Still compatible
- return OSGiVersion.isValidOSGiQualifier(vector[3]);
- }
-
- /**
- * Appends the original for this version onto the <code>sb</code> StringBuffer
- * if present.
- * @param sb The buffer that will receive the raw string format
- * @param rangeSafe Set to <code>true</code> if range delimiters should be escaped
- */
- public void originalToString(StringBuffer sb, boolean rangeSafe) {
- if (original != null) {
- if (rangeSafe) {
- // Escape all range delimiters while appending
- String s = original;
- int end = s.length();
- for (int idx = 0; idx < end; ++idx) {
- char c = s.charAt(idx);
- if (c == '\\' || c == '[' || c == '(' || c == ']' || c == ')' || c == ',' || c <= ' ')
- sb.append('\\');
- sb.append(c);
- }
- } else
- sb.append(original);
- }
- }
-
- /**
- * Appends the raw format for this version onto the <code>sb</code> StringBuffer.
- * @param sb The buffer that will receive the raw string format
- * @param rangeSafe Set to <code>true</code> if range delimiters should be escaped
- */
- public void rawToString(StringBuffer sb, boolean rangeSafe) {
- VersionVector.toString(sb, vector, padValue, rangeSafe);
- }
-
- /**
- * Appends the string representation of this version onto the
- * <code>sb</code> StringBuffer.
- * @param sb The buffer that will receive the version string
- */
- public void toString(StringBuffer sb) {
- if (this == emptyVersion)
- sb.append("0.0.0"); //$NON-NLS-1$
- else {
- sb.append(RAW_PREFIX);
- VersionVector.toString(sb, vector, padValue, false);
- if (format != null || original != null) {
- sb.append('/');
- if (format != null)
- format.toString(sb);
- if (original != null) {
- sb.append(':');
- originalToString(sb, false);
- }
- }
- }
- }
-
- private int getIntElement(int i) {
- if (!(vector.length > i && vector[i] instanceof Integer))
- throw new UnsupportedOperationException();
- return ((Integer) vector[i]).intValue();
- }
-
- // Preserve singletons during deserialization
- private Object readResolve() {
- Version v = this;
- if (equals(MAX_VERSION))
- v = MAX_VERSION;
- else if (equals(emptyVersion))
- v = emptyVersion;
- return v;
- }
-
- public Comparable<?> getPad() {
- return padValue;
- }
-
- public Comparable<?> getSegment(int index) {
- return vector[index];
- }
-
- public int getSegmentCount() {
- return vector.length;
- }
-
- Comparable<?>[] getVector() {
- return vector;
- }
-
- public int compareTo(Version v) {
- BasicVersion ov = (BasicVersion) v;
- return VersionVector.compare(vector, padValue, ov.getVector(), ov.getPad());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ProvidedCapability.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ProvidedCapability.java
deleted file mode 100644
index eec34bfe2..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ProvidedCapability.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.p2.metadata.IProvidedCapability;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.expression.IMemberProvider;
-
-/**
- * Describes a capability as exposed or required by an installable unit
- */
-public class ProvidedCapability implements IProvidedCapability, IMemberProvider {
- public static final String MEMBER_NAME = "name"; //$NON-NLS-1$
- public static final String MEMBER_VERSION = "version"; //$NON-NLS-1$
- public static final String MEMBER_NAMESPACE = "namespace"; //$NON-NLS-1$
-
- private final String name;
- private final String namespace;
- private final Version version;
-
- public ProvidedCapability(String namespace, String name, Version version) {
- Assert.isNotNull(namespace);
- Assert.isNotNull(name);
- this.namespace = namespace;
- this.name = name;
- this.version = version == null ? Version.emptyVersion : version;
- }
-
- public boolean equals(Object other) {
- if (other == null)
- return false;
- if (!(other instanceof IProvidedCapability))
- return false;
- IProvidedCapability otherCapability = (IProvidedCapability) other;
- if (!(namespace.equals(otherCapability.getNamespace())))
- return false;
- if (!(name.equals(otherCapability.getName())))
- return false;
- return version.equals(otherCapability.getVersion());
- }
-
- public String getName() {
- return name;
- }
-
- public String getNamespace() {
- return namespace;
- }
-
- public Version getVersion() {
- return version;
- }
-
- public int hashCode() {
- return namespace.hashCode() * name.hashCode() * version.hashCode();
- }
-
- public String toString() {
- return namespace + '/' + name + '/' + version;
- }
-
- public Object getMember(String memberName) {
- // It is OK to use identity comparisons here since
- // a) All constant valued strings are always interned
- // b) The Member constructor always interns the name
- //
- if (MEMBER_NAME == memberName)
- return name;
- if (MEMBER_VERSION == memberName)
- return version;
- if (MEMBER_NAMESPACE == memberName)
- return namespace;
- throw new IllegalArgumentException("No such member: " + memberName); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java
deleted file mode 100644
index 9829dc71b..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-
-/**
- * A required capability represents some external constraint on an {@link IInstallableUnit}.
- * Each capability represents something an {@link IInstallableUnit} needs that
- * it expects to be provided by another {@link IInstallableUnit}. Capabilities are
- * entirely generic, and are intended to be capable of representing anything that
- * an {@link IInstallableUnit} may need either at install time, or at runtime.
- * <p>
- * Capabilities are segmented into namespaces. Anyone can introduce new
- * capability namespaces. Some well-known namespaces are introduced directly
- * by the provisioning framework.
- *
- * @see IInstallableUnit#NAMESPACE_IU_ID
- */
-public class RequiredCapability implements IRequiredCapability, IMemberProvider {
- private final IMatchExpression<IInstallableUnit> filter;
- private final IMatchExpression<IInstallableUnit> matchExpression;
-
- public static final String MEMBER_FILTER = "filter"; //$NON-NLS-1$
- public static final String MEMBER_MIN = "min"; //$NON-NLS-1$
- public static final String MEMBER_MAX = "max"; //$NON-NLS-1$
- public static final String MEMBER_GREEDY = "greedy"; //$NON-NLS-1$
- public static final String MEMBER_MATCH = "match"; //$NON-NLS-1$
-
- private final boolean greedy;
- private final int min;
- private final int max;
- private String description;
-
- private static final IExpression allVersionsExpression;
- private static final IExpression range_II_Expression;
- private static final IExpression range_IN_Expression;
- private static final IExpression range_NI_Expression;
- private static final IExpression range_NN_Expression;
- private static final IExpression strictVersionExpression;
- private static final IExpression openEndedExpression;
- private static final IExpression openEndedNonInclusiveExpression;
-
- static {
- IExpressionFactory factory = ExpressionUtil.getFactory();
- IExpression xVar = factory.variable("x"); //$NON-NLS-1$
- IExpression nameEqual = factory.equals(factory.member(xVar, ProvidedCapability.MEMBER_NAME), factory.indexedParameter(0));
- IExpression namespaceEqual = factory.equals(factory.member(xVar, ProvidedCapability.MEMBER_NAMESPACE), factory.indexedParameter(1));
-
- IExpression versionMember = factory.member(xVar, ProvidedCapability.MEMBER_VERSION);
-
- IExpression versionCmpLow = factory.indexedParameter(2);
- IExpression versionEqual = factory.equals(versionMember, versionCmpLow);
- IExpression versionGt = factory.greater(versionMember, versionCmpLow);
- IExpression versionGtEqual = factory.greaterEqual(versionMember, versionCmpLow);
-
- IExpression versionCmpHigh = factory.indexedParameter(3);
- IExpression versionLt = factory.less(versionMember, versionCmpHigh);
- IExpression versionLtEqual = factory.lessEqual(versionMember, versionCmpHigh);
-
- IExpression pvMember = factory.member(factory.thisVariable(), InstallableUnit.MEMBER_PROVIDED_CAPABILITIES);
- allVersionsExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual)));
- strictVersionExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionEqual)));
- openEndedExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGtEqual)));
- openEndedNonInclusiveExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGt)));
- range_II_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGtEqual, versionLtEqual)));
- range_IN_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGtEqual, versionLt)));
- range_NI_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGt, versionLtEqual)));
- range_NN_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGt, versionLt)));
- }
-
- /**
- * TODO replace booleans with int options flag.
- */
- public RequiredCapability(String namespace, String name, VersionRange range, String filter, boolean optional, boolean multiple) {
- this(namespace, name, range, filter, optional, multiple, true);
- }
-
- public RequiredCapability(IMatchExpression<IInstallableUnit> requirement, IMatchExpression<IInstallableUnit> filter, int min, int max, boolean greedy, String description) {
- this.matchExpression = requirement;
- this.filter = filter;
- this.min = min;
- this.max = max;
- this.greedy = greedy;
- this.description = description;
- }
-
- public RequiredCapability(String namespace, String name, VersionRange range, String filter, boolean optional, boolean multiple, boolean greedy) {
- this(namespace, name, range, filter == null ? (IMatchExpression<IInstallableUnit>) null : InstallableUnit.parseFilter(filter), optional ? 0 : 1, multiple ? Integer.MAX_VALUE : 1, greedy, null);
- }
-
- public RequiredCapability(String namespace, String name, VersionRange range, IMatchExpression<IInstallableUnit> filter, int min, int max, boolean greedy, String description) {
- Assert.isNotNull(namespace);
- Assert.isNotNull(name);
- IExpressionFactory factory = ExpressionUtil.getFactory();
- if (range == null || range.equals(VersionRange.emptyRange)) {
- matchExpression = factory.matchExpression(allVersionsExpression, name, namespace);
- } else {
- if (range.getMinimum().equals(range.getMaximum())) {
- // Explicit version appointed
- matchExpression = factory.matchExpression(strictVersionExpression, name, namespace, range.getMinimum());
- } else {
- if (range.getMaximum().equals(Version.MAX_VERSION)) {
- // Open ended
- matchExpression = factory.matchExpression(range.getIncludeMinimum() ? openEndedExpression : openEndedNonInclusiveExpression, name, namespace, range.getMinimum());
- } else {
- matchExpression = factory.matchExpression(//
- range.getIncludeMinimum() ? (range.getIncludeMaximum() ? range_II_Expression : range_IN_Expression) //
- : (range.getIncludeMaximum() ? range_NI_Expression : range_NN_Expression), //
- name, namespace, range.getMinimum(), range.getMaximum());
- }
- }
- }
- this.min = min;
- this.max = max;
- this.greedy = greedy;
- this.filter = filter;
- this.description = description;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
-
- if (!(obj instanceof IRequirement))
- return false;
-
- IRequirement other = (IRequirement) obj;
- if (filter == null) {
- if (other.getFilter() != null)
- return false;
- } else if (!filter.equals(other.getFilter()))
- return false;
-
- return min == other.getMin() && max == other.getMax() && greedy == other.isGreedy() && matchExpression.equals(other.getMatches());
- }
-
- public String getName() {
- return (String) matchExpression.getParameters()[0];
- }
-
- public String getNamespace() {
- return (String) matchExpression.getParameters()[1];
- }
-
- /**
- * Returns the range of versions that satisfy this required capability. Returns
- * an empty version range ({@link VersionRange#emptyRange} if any version
- * will satisfy the capability.
- * @return the range of versions that satisfy this required capability.
- */
- public VersionRange getRange() {
- return extractRange(matchExpression);
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((filter == null) ? 0 : filter.hashCode());
- result = prime * result + matchExpression.hashCode();
- return result;
- }
-
- public boolean isGreedy() {
- return greedy;
- }
-
- public String toString() {
- StringBuffer result = new StringBuffer();
- if (matchExpression.getParameters().length == 0)
- return matchExpression.toString();
- if (IInstallableUnit.NAMESPACE_IU_ID.equals(getNamespace())) {
- //print nothing for an IU id dependency because this is the default (most common) case
- result.append(""); //$NON-NLS-1$
- } else if ("osgi.bundle".equals(getNamespace())) { //$NON-NLS-1$
- result.append("bundle"); //$NON-NLS-1$
- } else if ("java.package".equals(getNamespace())) { //$NON-NLS-1$
- result.append("package"); //$NON-NLS-1$
- } else {
- result.append(getNamespace());
- }
- if (result.length() > 0)
- result.append(' ');
- result.append(getName());
- result.append(' ');
- VersionRange range = getRange();
- //for an exact version match, print a simpler expression
- if (range.getMinimum().equals(range.getMaximum()))
- result.append('[').append(range.getMinimum()).append(']');
- else
- result.append(range);
- return result.toString();
- }
-
- public int getMin() {
- return min;
- }
-
- public int getMax() {
- return max;
- }
-
- public IMatchExpression<IInstallableUnit> getMatches() {
- return matchExpression;
- }
-
- public IMatchExpression<IInstallableUnit> getFilter() {
- return filter;
- }
-
- public boolean isMatch(IInstallableUnit candidate) {
- return matchExpression.isMatch(candidate);
- }
-
- public static boolean isVersionStrict(IMatchExpression<IInstallableUnit> matchExpression) {
- return ExpressionUtil.getOperand(matchExpression) == strictVersionExpression;
- }
-
- public static String extractName(IMatchExpression<IInstallableUnit> matchExpression) {
- assertValid(matchExpression);
- return (String) matchExpression.getParameters()[0];
- }
-
- public static String extractNamespace(IMatchExpression<IInstallableUnit> matchExpression) {
- assertValid(matchExpression);
- return (String) matchExpression.getParameters()[1];
- }
-
- public static VersionRange extractRange(IMatchExpression<IInstallableUnit> matchExpression) {
- IExpression expr = assertValid(matchExpression);
- Object[] params = matchExpression.getParameters();
- if (params.length < 3)
- return VersionRange.emptyRange;
- Version v = (Version) params[2];
- if (params.length < 4) {
- if (expr.equals(strictVersionExpression))
- return new VersionRange(v, true, v, true);
- return new VersionRange(v, expr.equals(openEndedExpression), Version.MAX_VERSION, true);
- }
- Version h = (Version) params[3];
- return new VersionRange(v, expr.equals(range_II_Expression) || expr.equals(range_IN_Expression), h, expr.equals(range_II_Expression) || expr.equals(range_NI_Expression));
- }
-
- public static boolean isSimpleRequirement(IMatchExpression<IInstallableUnit> matchExpression) {
- return isPredefined(ExpressionUtil.getOperand(matchExpression));
- }
-
- private static IExpression assertValid(IMatchExpression<IInstallableUnit> matchExpression) {
- IExpression expr = ExpressionUtil.getOperand(matchExpression);
- if (!isPredefined(expr))
- throw new IllegalArgumentException();
- return expr;
- }
-
- private static boolean isPredefined(IExpression expr) {
- return expr.equals(allVersionsExpression) || expr.equals(range_II_Expression) || expr.equals(range_IN_Expression) || expr.equals(range_NI_Expression) || expr.equals(range_NN_Expression) || expr.equals(strictVersionExpression) || expr.equals(openEndedExpression) || expr.equals(openEndedNonInclusiveExpression);
- }
-
- public Object getMember(String memberName) {
- // It is OK to use identity comparisons here since
- // a) All constant valued strings are always interned
- // b) The Member constructor always interns the name
- //
- if (MEMBER_FILTER == memberName)
- return filter;
- if (MEMBER_MIN == memberName)
- return new Integer(min);
- if (MEMBER_MAX == memberName)
- return new Integer(max);
- if (MEMBER_GREEDY == memberName)
- return Boolean.valueOf(greedy);
- if (MEMBER_MATCH == memberName)
- return matchExpression;
- throw new IllegalArgumentException("No such member: " + memberName); //$NON-NLS-1$
- }
-
- public String getDescription() {
- return description;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequirementChange.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequirementChange.java
deleted file mode 100644
index d67a1ca39..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequirementChange.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import org.eclipse.equinox.p2.metadata.IRequirementChange;
-
-public class RequirementChange implements IRequirementChange {
- private IRequiredCapability applyOn;
- private IRequiredCapability newValue;
-
- public RequirementChange(IRequiredCapability applyOn2, IRequiredCapability newValue2) {
- if (applyOn2 == null && newValue2 == null)
- throw new IllegalArgumentException();
- this.applyOn = applyOn2;
- this.newValue = newValue2;
- }
-
- public IRequiredCapability applyOn() {
- return applyOn;
- }
-
- public IRequiredCapability newValue() {
- return newValue;
- }
-
- public boolean matches(IRequiredCapability toMatch) {
- if (!toMatch.getNamespace().equals(applyOn.getNamespace()))
- return false;
- if (!toMatch.getName().equals(applyOn.getName()))
- return false;
- if (toMatch.getRange().equals(applyOn.getRange()))
- return true;
-
- return toMatch.getRange().intersect(applyOn.getRange()) != null;
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((applyOn == null) ? 0 : applyOn.hashCode());
- result = prime * result + ((newValue == null) ? 0 : newValue.hashCode());
- return result;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof IRequirementChange))
- return false;
- final IRequirementChange other = (IRequirementChange) obj;
- if (applyOn == null) {
- if (other.applyOn() != null)
- return false;
- } else if (!applyOn.equals(other.applyOn()))
- return false;
- if (newValue == null) {
- if (other.newValue() != null)
- return false;
- } else if (!newValue.equals(other.newValue()))
- return false;
- return true;
- }
-
- public String toString() {
- return applyOn + " --> " + newValue; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java
deleted file mode 100644
index bc508ec89..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Genuitec, LLC - added license support
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-
-public class ResolvedInstallableUnit implements IInstallableUnit {
- private static IInstallableUnitFragment[] NO_IU = new IInstallableUnitFragment[0];
-
- private final IInstallableUnitFragment[] fragments;
- protected final IInstallableUnit original;
-
- public ResolvedInstallableUnit(IInstallableUnit resolved) {
- this(resolved, null);
- }
-
- public ResolvedInstallableUnit(IInstallableUnit resolved, IInstallableUnitFragment[] fragments) {
- this.original = resolved;
- this.fragments = fragments == null ? NO_IU : fragments;
- }
-
- public Collection<IInstallableUnitFragment> getFragments() {
- int fcount = fragments.length;
- if (fcount == 0)
- return CollectionUtils.emptyList();
-
- ArrayList<IInstallableUnitFragment> result = new ArrayList<IInstallableUnitFragment>(fcount);
- result.addAll(Arrays.asList(fragments));
- for (int i = 0; i < fcount; i++) {
- IInstallableUnit fragment = fragments[i];
- if (fragment.isResolved())
- result.addAll(fragment.getFragments());
- }
- return result;
- }
-
- public Collection<IArtifactKey> getArtifacts() {
- return original.getArtifacts();
- }
-
- public IMatchExpression<IInstallableUnit> getFilter() {
- return original.getFilter();
- }
-
- public String getId() {
- return original.getId();
- }
-
- public String getProperty(String key) {
- return original.getProperty(key);
- }
-
- public Map<String, String> getProperties() {
- return original.getProperties();
- }
-
- public String getProperty(String key, String locale) {
- return original.getProperty(key, locale);
- }
-
- public Collection<IProvidedCapability> getProvidedCapabilities() {
- Collection<IProvidedCapability> originalCapabilities = original.getProvidedCapabilities();
- if (fragments.length == 0)
- return originalCapabilities;
-
- ArrayList<IProvidedCapability> result = new ArrayList<IProvidedCapability>(originalCapabilities);
- for (int i = 0; i < fragments.length; i++)
- result.addAll(fragments[i].getProvidedCapabilities());
- return result;
- }
-
- public Collection<IRequirement> getRequirements() {
- Collection<IRequirement> originalCapabilities = original.getRequirements();
- if (fragments.length == 0)
- return originalCapabilities;
-
- ArrayList<IRequirement> result = new ArrayList<IRequirement>(originalCapabilities);
- for (int i = 0; i < fragments.length; i++)
- result.addAll(fragments[i].getRequirements());
- return result;
- }
-
- public Collection<IRequirement> getMetaRequirements() {
- Collection<IRequirement> originalCapabilities = original.getMetaRequirements();
- if (fragments.length == 0)
- return originalCapabilities;
-
- ArrayList<IRequirement> result = new ArrayList<IRequirement>(originalCapabilities);
- for (int i = 0; i < fragments.length; i++)
- result.addAll(fragments[i].getMetaRequirements());
- return result;
- }
-
- public Collection<ITouchpointData> getTouchpointData() {
- Collection<ITouchpointData> originalTouchpointData = original.getTouchpointData();
- if (fragments.length == 0)
- return originalTouchpointData;
-
- ArrayList<ITouchpointData> result = new ArrayList<ITouchpointData>(originalTouchpointData);
- for (int i = 0; i < fragments.length; i++)
- result.addAll(fragments[i].getTouchpointData());
- return result;
- }
-
- public ITouchpointType getTouchpointType() {
- return original.getTouchpointType();
- }
-
- public Version getVersion() {
- return original.getVersion();
- }
-
- public boolean isSingleton() {
- return original.isSingleton();
- }
-
- public boolean equals(Object obj) {
- //TODO This is pretty ugly....
- boolean result = original.equals(obj);
- if (result)
- return true;
- if (obj instanceof ResolvedInstallableUnit)
- return original.equals(((ResolvedInstallableUnit) obj).original);
- return false;
- }
-
- public int hashCode() {
- // TODO Auto-generated method stub
- return original.hashCode();
- }
-
- public String toString() {
- return "[R]" + original.toString(); //$NON-NLS-1$
- }
-
- public IInstallableUnit getOriginal() {
- return original;
- }
-
- public int compareTo(IInstallableUnit other) {
- int cmp = getId().compareTo(other.getId());
- if (cmp == 0)
- cmp = getVersion().compareTo(other.getVersion());
- return cmp;
- }
-
- public boolean isResolved() {
- return true;
- }
-
- public IInstallableUnit unresolved() {
- return original.unresolved();
- }
-
- public IUpdateDescriptor getUpdateDescriptor() {
- return original.getUpdateDescriptor();
- }
-
- public Collection<ILicense> getLicenses() {
- return original.getLicenses();
- }
-
- public Collection<ILicense> getLicenses(String locale) {
- return original.getLicenses(locale);
- }
-
- public ICopyright getCopyright() {
- return original.getCopyright();
- }
-
- public ICopyright getCopyright(String locale) {
- return original.getCopyright(locale);
- }
-
- public boolean satisfies(IRequirement candidate) {
- return candidate.isMatch(this);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointData.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointData.java
deleted file mode 100644
index 7bcc16c60..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointData.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import org.eclipse.equinox.p2.metadata.MetadataFactory;
-
-import java.util.Collections;
-import java.util.Map;
-import java.util.Map.Entry;
-import org.eclipse.equinox.p2.metadata.ITouchpointData;
-import org.eclipse.equinox.p2.metadata.ITouchpointInstruction;
-
-/**
- * Touchpoint data instances contain the additional information needed by a touchpoint
- * to execute each engine phase it participates in. This includes the sequence of
- * instruction statements to be executed during each phase, and any additional
- * supporting data needed to perform the phase.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @see MetadataFactory#createTouchpointData(Map)
- */
-public class TouchpointData implements ITouchpointData {
-
- /**
- * Map of (String->TouchpointInstruction). The set
- * of keys supported is up to the touchpoint that will process these
- * instructions. This map is never null.
- */
- private Map<String, ITouchpointInstruction> instructions;
-
- public int hashCode() {
- return 31 * 1 + ((instructions == null) ? 0 : instructions.hashCode());
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof ITouchpointData))
- return false;
- final ITouchpointData other = (ITouchpointData) obj;
- if (instructions == null) {
- if (other.getInstructions() != null)
- return false;
- } else if (!instructions.equals(other.getInstructions()))
- return false;
- return true;
- }
-
- /**
- * Clients must use the factory method on {@link MetadataFactory}.
- */
- public TouchpointData(Map<String, ITouchpointInstruction> instructions) {
- this.instructions = instructions;
- }
-
- /**
- * Returns the touchpoint instruction corresponding to the given key.
- */
- public ITouchpointInstruction getInstruction(String instructionKey) {
- return instructions.get(instructionKey);
- }
-
- /**
- * Returns an unmodifiable map of the touchpoint instructions. The map
- * keys are strings, and the values are instances of {@link ITouchpointInstruction}.
- *
- * @return the touchpoint instructions
- */
- public Map<String, ITouchpointInstruction> getInstructions() {
- return Collections.unmodifiableMap(instructions);
- }
-
- /**
- * Returns a string representation of the touchpoint data for debugging purposes only.
- */
- public String toString() {
- StringBuffer result = new StringBuffer();
- for (Entry<String, ITouchpointInstruction> instruction : instructions.entrySet()) {
- result.append(instruction.getKey()).append(" -> ").append(instruction.getValue()).append('\n'); //$NON-NLS-1$
- }
- return result.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointInstruction.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointInstruction.java
deleted file mode 100644
index 44bbe1bb2..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointInstruction.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import org.eclipse.equinox.p2.metadata.MetadataFactory;
-
-import java.util.Map;
-import java.util.Map.Entry;
-import org.eclipse.equinox.p2.metadata.ITouchpointInstruction;
-
-/**
- * A touchpoint instruction contains either a sequence of instruction statements
- * to be executed during a particular engine phase, or some simple string value
- * that is needed by a touchpoint to execute its phases.
- * <p>
- * The format of a touchpoint instruction statement sequence is as follows:
- *
- * statement-sequence :
- * | statement ';'
- * | statement-sequence statement
- * ;
- *
- *Where a statement is of the format:
- *
- * statement :
- * | actionName '(' parameters ')'
- * ;
- *
- * parameters :
- * | // empty
- * | parameter
- * | parameters ',' parameter
- * ;
- *
- * parameter :
- * | paramName ':' paramValue
- * ;
- *
- * actionName, paramName, paramValue :
- * | String
- * ;
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @see MetadataFactory#createTouchpointInstruction(String, String)
- */
-public class TouchpointInstruction implements ITouchpointInstruction {
-
- private final String body;
- private final String importAttribute;
-
- /**
- * Encodes an action statement in string form. This method will
- * take care of escaping any illegal characters in function parameter values.
- *
- * @param actionName The name of the action.
- * @param parameters The function's parameters. This is a Map<String,String>
- * where the keys are parameter names, and the values are parameter values
- * @return An encoded touchpoint instruction statement
- */
- public static String encodeAction(String actionName, Map<String, String> parameters) {
- StringBuffer result = new StringBuffer(actionName);
- result.append('(');
- boolean first = true;
- for (Entry<String, String> entry : parameters.entrySet()) {
- if (first)
- first = false;
- else
- result.append(',');
- result.append(entry.getKey());
- result.append(':');
- appendEncoded(result, entry.getValue());
- }
- result.append(')').append(';');
- return result.toString();
- }
-
- /**
- * Append the given value to the given buffer, encoding any illegal characters
- * with appropriate escape sequences.
- */
- private static void appendEncoded(StringBuffer buf, String value) {
- char[] chars = value.toCharArray();
- for (int i = 0; i < chars.length; i++) {
- switch (chars[i]) {
- case '$' :
- case ',' :
- case ':' :
- case ';' :
- case '{' :
- case '}' :
- buf.append("${#").append(Integer.toString(chars[i])).append('}'); //$NON-NLS-1$
- break;
- default :
- buf.append(chars[i]);
- }
- }
- }
-
- /**
- * Clients must use the factory method on {@link MetadataFactory}.
- */
- public TouchpointInstruction(String body, String importAttribute) {
- this.body = body;
- this.importAttribute = importAttribute;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof ITouchpointInstruction))
- return false;
- ITouchpointInstruction other = (ITouchpointInstruction) obj;
- if (body == null) {
- if (other.getBody() != null)
- return false;
- } else if (!body.equals(other.getBody()))
- return false;
- if (importAttribute == null) {
- if (other.getImportAttribute() != null)
- return false;
- } else if (!importAttribute.equals(other.getImportAttribute()))
- return false;
- return true;
- }
-
- /**
- * Returns the body of this touchpoint instruction. The body is either a sequence
- * of instruction statements, or a simple string value.
- *
- * @return The body of this touchpoint instruction
- */
- public String getBody() {
- return body;
- }
-
- //TODO What is this? Please doc
- public String getImportAttribute() {
- return importAttribute;
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((body == null) ? 0 : body.hashCode());
- result = prime * result + ((importAttribute == null) ? 0 : importAttribute.hashCode());
- return result;
- }
-
- /**
- * Returns a string representation of this instruction for debugging purposes only.
- */
- public String toString() {
- return "Instruction[" + body + ',' + importAttribute + ']'; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointType.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointType.java
deleted file mode 100644
index 86bb05b87..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointType.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * EclipseSource - ongoing Development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import org.eclipse.equinox.p2.metadata.Version;
-
-import org.eclipse.equinox.p2.metadata.ITouchpointType;
-
-/**
- * Identifies a particular touchpoint. A touchpoint is identified by an id
- * and a version.
- */
-public class TouchpointType implements ITouchpointType {
- private String id;//never null
- private Version version;//never null
-
- public TouchpointType(String id, Version aVersion) {
- this.id = id;
- this.version = aVersion;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (super.equals(obj))
- return true;
- if (obj == null || !(obj instanceof ITouchpointType))
- return false;
- ITouchpointType other = (ITouchpointType) obj;
- return id.equals(other.getId()) && version.equals(other.getVersion());
- }
-
- public String getId() {
- return id;
- }
-
- public Version getVersion() {
- return version;
- }
-
- public int hashCode() {
- return 31 * id.hashCode() + version.hashCode();
- }
-
- public String toString() {
- return "Touchpoint: " + id + ' ' + getVersion(); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TranslationSupport.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TranslationSupport.java
deleted file mode 100644
index 571abd70d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TranslationSupport.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * EclipseSource - ongoing development
- * Cloudsmith Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.lang.ref.SoftReference;
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.osgi.service.localization.LocaleProvider;
-
-/**
- * TranslationSupport provides string translations for properties of an
- * IInstallableUnit. Clients can specify an {@link IQueryable} that should be used
- * to obtain the translation fragment IU's, as well as the locale that
- * should be used for translations.
- *
- * @since 2.0
- */
-public class TranslationSupport {
- // TODO: these constants should come from API, eg. IInstallableUnit or ???
- static final Locale DEFAULT_LOCALE = new Locale("df", "LT"); //$NON-NLS-1$//$NON-NLS-2$
- private static TranslationSupport instance;
-
- static final String NAMESPACE_IU_LOCALIZATION = "org.eclipse.equinox.p2.localization"; //$NON-NLS-1$
- private IQueryable<IInstallableUnit> fragmentSource;
-
- private static IExpression capabilityMatch = ExpressionUtil.parse("providedCapabilities.exists(x | x.namespace == $0 && $1.exists(n | x.name == n))"); //$NON-NLS-1$
- private static IExpression haveHostMatch = ExpressionUtil.parse("host.exists(h | $0 ~= h)"); //$NON-NLS-1$
-
- // Cache the IU fragments that provide localizations for a given locale.
- // Map<String,SoftReference<IQueryResult>>: locale => soft reference to a queryResult
- private final Map<String, SoftReference<IQueryResult<IInstallableUnit>>> localeCollectorCache = new HashMap<String, SoftReference<IQueryResult<IInstallableUnit>>>(2);
-
- private LocaleProvider localeProvider;
- private boolean loggedMissingSource = false;;
-
- public synchronized static TranslationSupport getInstance() {
- if (instance == null)
- instance = new TranslationSupport();
- return instance;
- }
-
- /**
- * Create an instance of TranslationSupport for the current locale.
- * Unless otherwise specified, the currently running profile will serve
- * as the source of the translation fragments.
- *
- * @since 2.0
- */
- public TranslationSupport() {
- super();
- }
-
- /**
- * Create an instance of TranslationSupport for the current locale.
- * using the <code>fragmentSource</code> as the source of the translation fragments.
- *
- * @since 2.0
- */
- public TranslationSupport(IQueryable<IInstallableUnit> fragmentSource) {
- this.fragmentSource = fragmentSource;
- }
-
- /**
- */
- private List<String> buildLocaleVariants(String locale) {
- ArrayList<String> result = new ArrayList<String>(4);
- int lastSeparator;
- while (true) {
- result.add(locale);
- lastSeparator = locale.lastIndexOf('_');
- if (lastSeparator == -1)
- break;
- locale = locale.substring(0, lastSeparator);
- }
- // Add the default locale (most general)
- result.add(DEFAULT_LOCALE.toString());
- return result;
- }
-
- /**
- * Cache the translated property value to optimize future retrieval of the same value.
- * Currently we just cache on the installable unit object in memory. In future
- * we should push support for localized property retrieval into IInstallableUnit
- * so we aren't required to reach around the API here.
- */
- private String cacheResult(IInstallableUnit iu, String localizedKey, String localizedValue) {
- if (iu instanceof InstallableUnit)
- ((InstallableUnit) iu).setLocalizedProperty(localizedKey, localizedValue);
- return localizedValue;
- }
-
- /**
- * Return the copyright for the specified IInstallableUnit,
- * localized for the receiver's locale.
- *
- * @param iu the IInstallableUnit in question
- * @return the localized copyright defined by the IInstallableUnit
- */
- public ICopyright getCopyright(IInstallableUnit iu, String locale) {
- if (locale == null)
- locale = getCurrentLocale();
- ICopyright copyright = iu.getCopyright();
- String body = (copyright != null ? copyright.getBody() : null);
- if (body == null || body.length() <= 1 || body.charAt(0) != '%')
- return copyright;
- final String actualKey = body.substring(1); // Strip off the %
- body = getLocalizedIUProperty(iu, actualKey, locale);
- return MetadataFactory.createCopyright(copyright.getLocation(), body);
- }
-
- private String getCurrentLocale() {
- if (localeProvider != null)
- return localeProvider.getLocale().toString();
- return Locale.getDefault().toString();
- }
-
- /**
- * Return the localized value for the specified IInstallableUnit
- * property.
- *
- * @param iu the IInstallableUnit in question
- * @param propertyKey the name of the property to be retrieved
- * @param locale The locale to return the property for
- * @return the localized property value, or <code>null</code> if no
- * such property is defined.
- */
- public String getIUProperty(IInstallableUnit iu, String propertyKey, String locale) {
- if (locale == null)
- locale = getCurrentLocale();
- String value = iu.getProperty(propertyKey);
- if (value == null || value.length() <= 1 || value.charAt(0) != '%')
- return value;
- // else have a localizable property
- final String actualKey = value.substring(1); // Strip off the %
- return getLocalizedIUProperty(iu, actualKey, locale);
- }
-
- /**
- * Return the localized value for the specified IInstallableUnit
- * property using the locale specified in the <code>propertyKey</code>.
- *
- * @param iu the IInstallableUnit in question
- * @param propertyKey the name and locale of the property to be retrieved
- * @return the localized property value, or <code>null</code> if no
- * such property is defined.
- */
- public String getIUProperty(IInstallableUnit iu, KeyWithLocale propertyKey) {
- return getIUProperty(iu, propertyKey.getKey(), propertyKey.getLocale().toString());
- }
-
- /**
- * Return the localized value for the specified IInstallableUnit
- * property using the default locale.
- *
- * @param iu the IInstallableUnit in question
- * @param propertyKey the name of the property to be retrieved
- * @return the localized property value, or <code>null</code> if no
- * such property is defined.
- */
- public String getIUProperty(IInstallableUnit iu, String propertyKey) {
- return getIUProperty(iu, propertyKey, null);
- }
-
- private ILicense getLicense(IInstallableUnit iu, ILicense license, String locale) {
- String body = (license != null ? license.getBody() : null);
- if (body == null || body.length() <= 1 || body.charAt(0) != '%')
- return license;
- final String actualKey = body.substring(1); // Strip off the %
- body = getLocalizedIUProperty(iu, actualKey, locale);
- return MetadataFactory.createLicense(license.getLocation(), body);
- }
-
- /**
- * Return an array of licenses for the specified IInstallableUnit,
- * localized for the receiver's locale.
- *
- * @param iu the IInstallableUnit in question
- * @return the localized licenses defined by the IInstallableUnit
- */
- public ILicense[] getLicenses(IInstallableUnit iu, String locale) {
- if (locale == null)
- locale = getCurrentLocale();
- Collection<ILicense> licenses = iu.getLicenses();
- ILicense[] translatedLicenses = new ILicense[licenses.size()];
- int i = 0;
- for (ILicense iLicense : licenses) {
- translatedLicenses[i++] = getLicense(iu, iLicense, locale);
- }
- return translatedLicenses;
- }
-
- /**
- * Return an update descriptor localized for the receiver's locale.
- *
- * @param iu the IInstallableUnit in question
- * @return the localized update descriptor defined by the IInstallableUnit
- */
- public IUpdateDescriptor getUpdateDescriptor(IInstallableUnit iu, String locale) {
- if (locale == null)
- locale = getCurrentLocale();
-
- IUpdateDescriptor descriptor = iu.getUpdateDescriptor();
- String body = (descriptor != null ? descriptor.getDescription() : null);
- if (body == null || body.length() <= 1 || body.charAt(0) != '%')
- return descriptor;
- final String actualKey = body.substring(1); // Strip off the %
- body = getLocalizedIUProperty(iu, actualKey, locale);
- return MetadataFactory.createUpdateDescriptor(descriptor.getIUsBeingUpdated(), descriptor.getSeverity(), body, descriptor.getLocation());
- }
-
- /**
- * Collects the installable unit fragments that contain locale data for the given locales.
- */
- private synchronized IQueryResult<IInstallableUnit> getLocalizationFragments(List<String> localeVariants, String locale) {
- if (fragmentSource == null) {
- if (!loggedMissingSource) {
- loggedMissingSource = true;
- LogHelper.log(new Status(IStatus.INFO, MetadataActivator.PI_METADATA, "No translation source unavailable. Default language will be used.")); //$NON-NLS-1$
- }
- return Collector.emptyCollector();
- }
-
- SoftReference<IQueryResult<IInstallableUnit>> queryResultReference = localeCollectorCache.get(locale);
- if (queryResultReference != null) {
- IQueryResult<IInstallableUnit> cached = queryResultReference.get();
- if (cached != null)
- return cached;
- }
-
- IQuery<IInstallableUnit> iuQuery = QueryUtil.<IInstallableUnit> createMatchQuery(IInstallableUnitFragment.class, capabilityMatch, NAMESPACE_IU_LOCALIZATION, localeVariants);
- IQueryResult<IInstallableUnit> collected = fragmentSource.query(iuQuery, null);
- localeCollectorCache.put(locale, new SoftReference<IQueryResult<IInstallableUnit>>(collected));
- return collected;
- }
-
- private String getLocalizedIUProperty(IInstallableUnit iu, String actualKey, String locale) {
- String localizedKey = makeLocalizedKey(actualKey, locale);
- String localizedValue = null;
-
- //first check for a cached localized value
- if (iu instanceof InstallableUnit)
- localizedValue = ((InstallableUnit) iu).getLocalizedProperty(localizedKey);
- //next check if the localized value is stored in the same IU (common case)
- if (localizedValue == null)
- localizedValue = iu.getProperty(localizedKey);
- if (localizedValue != null)
- return localizedValue;
-
- final List<String> locales = buildLocaleVariants(locale);
- final IInstallableUnit theUnit = iu;
-
- IQueryResult<IInstallableUnit> localizationFragments = getLocalizationFragments(locales, locale);
-
- IExpressionFactory factory = ExpressionUtil.getFactory();
- IQuery<IInstallableUnit> iuQuery = QueryUtil.<IInstallableUnit> createMatchQuery(IInstallableUnitFragment.class, factory.matchExpression(haveHostMatch, theUnit));
- IQueryResult<IInstallableUnit> collected = iuQuery.perform(localizationFragments.iterator());
- if (!collected.isEmpty()) {
- String translation = null;
- for (Iterator<IInstallableUnit> iter = collected.iterator(); iter.hasNext() && translation == null;) {
- IInstallableUnit localizationIU = iter.next();
- for (Iterator<String> jter = locales.iterator(); jter.hasNext();) {
- String localeKey = makeLocalizedKey(actualKey, jter.next());
- translation = localizationIU.getProperty(localeKey);
- if (translation != null)
- return cacheResult(iu, localizedKey, translation);
- }
- }
- }
-
- for (String nextLocale : locales) {
- String localeKey = makeLocalizedKey(actualKey, nextLocale);
- String nextValue = iu.getProperty(localeKey);
- if (nextValue != null)
- return cacheResult(iu, localizedKey, nextValue);
- }
-
- return cacheResult(iu, localizedKey, actualKey);
- }
-
- private String makeLocalizedKey(String actualKey, String localeImage) {
- return localeImage + '.' + actualKey;
- }
-
- /**
- * Set the locale that should be used when obtaining translations.
- * @param provider the locale for which translations should be retrieved.
- */
- public synchronized void setLocaleProvider(LocaleProvider provider) {
- if (provider != this.localeProvider) {
- this.localeProvider = provider;
- localeCollectorCache.clear();
- }
- }
-
- /**
- * Set the {@link IQueryable} that should be used to obtain translation fragment
- * IUs. Returns the previous translation source.
- *
- * @param queryable an {@link IQueryable} that can supply the appropriate NLS
- * translation fragments
- */
- public synchronized IQueryable<IInstallableUnit> setTranslationSource(IQueryable<IInstallableUnit> queryable) {
- IQueryable<IInstallableUnit> previous = fragmentSource;
- if (previous != queryable) {
- this.fragmentSource = queryable;
- localeCollectorCache.clear();
- }
- return previous;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/UpdateDescriptor.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/UpdateDescriptor.java
deleted file mode 100644
index eab12ed37..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/UpdateDescriptor.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.net.URI;
-import java.util.Collection;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IUpdateDescriptor;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-
-public class UpdateDescriptor implements IUpdateDescriptor {
- private Collection<IMatchExpression<IInstallableUnit>> descriptors;
-
- private String description;
- private int severity;
- private URI location;
-
- public UpdateDescriptor(Collection<IMatchExpression<IInstallableUnit>> descriptors, int severity, String description, URI location) {
- this.descriptors = descriptors;
- this.severity = severity;
- this.description = description;
- this.location = location;
- }
-
- public String getDescription() {
- return description;
- }
-
- public int getSeverity() {
- return severity;
- }
-
- public boolean isUpdateOf(IInstallableUnit iu) {
- return descriptors.iterator().next().isMatch(iu);
- }
-
- public Collection<IMatchExpression<IInstallableUnit>> getIUsBeingUpdated() {
- return descriptors;
- }
-
- public URI getLocation() {
- return location;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormat.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormat.java
deleted file mode 100644
index 98bee1a3d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormat.java
+++ /dev/null
@@ -1,340 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.io.Serializable;
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.VersionFormatParser.Fragment;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * <p>The VersionFormat represents the Omni Version Format in compiled form. It
- * is also a parser for versions of that format.</p>
- * <p>An instance of VersionFormat is immutable and thus thread safe. The parser
- * does not maintain any state.</p>
- *
- * @Immutable
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class VersionFormat implements IVersionFormat, Serializable {
-
- /**
- * The string representation of the Omni Version format used for parsing OSGi versions.
- */
- public static final String OSGI_FORMAT_STRING = "n[.n=0;[.n=0;[.S='';=[A-Za-z0-9_-];]]]"; //$NON-NLS-1$
-
- /**
- * The string representation of the Omni Version format used for parsing raw versions.
- */
- public static final String RAW_FORMAT_STRING = "r(.r)*p?"; //$NON-NLS-1$
-
- private static final long serialVersionUID = -5689435955091405520L;
-
- private static class StateInfo {
- Fragment fragment;
- int position;
- int segmentCount;
-
- StateInfo(int position, int segmentCount, Fragment fragment) {
- this.fragment = fragment;
- this.position = position;
- this.segmentCount = segmentCount;
- }
- }
-
- static class TreeInfo extends ArrayList<StateInfo> {
- private static final long serialVersionUID = 4474591345244587260L;
-
- private Comparable<?> padValue;
- private int top;
-
- TreeInfo(Fragment frag, int pos) {
- add(new StateInfo(pos, 0, frag));
- top = 0;
- }
-
- Comparable<?> getPadValue() {
- return padValue;
- }
-
- int getPosition() {
- return get(top).position;
- }
-
- void popState(List<Comparable<?>> segments, Fragment frag) {
- int idx = top;
- while (idx > 0) {
- StateInfo si = get(idx);
- if (si.fragment == frag) {
- int nsegs = segments.size();
- int segMax = si.segmentCount;
- while (nsegs > segMax)
- segments.remove(--nsegs);
- top = idx - 1;
- break;
- }
- }
- }
-
- void pushState(int segCount, Fragment fragment) {
- int pos = get(top).position;
- if (++top == size())
- add(new StateInfo(pos, segCount, fragment));
- else {
- StateInfo si = get(top);
- si.fragment = fragment;
- si.position = pos;
- si.segmentCount = segCount;
- }
- }
-
- void setPadValue(Comparable<?> pad) {
- padValue = pad;
- }
-
- void setPosition(int pos) {
- get(top).position = pos;
- }
- }
-
- private static final Map<String, VersionFormat> formatCache = Collections.synchronizedMap(new HashMap<String, VersionFormat>());
-
- /**
- * The predefined OSGi format that is used when parsing OSGi
- * versions.
- */
- public static final VersionFormat OSGI_FORMAT;
-
- /**
- * The predefined OSGi format that is used when parsing raw
- * versions.
- */
- public static final VersionFormat RAW_FORMAT;
-
- static {
- try {
- VersionFormatParser parser = new VersionFormatParser();
- OSGI_FORMAT = new VersionFormat(parser.compile(OSGI_FORMAT_STRING, 0, OSGI_FORMAT_STRING.length()));
- formatCache.put(OSGI_FORMAT_STRING, OSGI_FORMAT);
- RAW_FORMAT = new RawFormat(parser.compile(RAW_FORMAT_STRING, 0, RAW_FORMAT_STRING.length()));
- formatCache.put(RAW_FORMAT_STRING, RAW_FORMAT);
- } catch (VersionFormatException e) {
- // If this happens, something is wrong with the actual
- // implementation of the FormatCompiler.
- //
- throw new ExceptionInInitializerError(e);
- }
- }
-
- /**
- * Compile a version format string into a compiled format. This method is
- * shorthand for:<pre>CompiledFormat.compile(format, 0, format.length())</pre>.
- *
- * @param format The format to compile.
- * @return The compiled format
- * @throws VersionFormatException If the format could not be compiled
- */
- public static IVersionFormat compile(String format) throws VersionFormatException {
- return compile(format, 0, format.length());
- }
-
- /**
- * Compile a version format string into a compiled format. The parsing starts
- * at position start and ends at position end. The returned format is cached so
- * subsequent calls to this method using the same format string will yield the
- * same compiled format instance.
- *
- * @param format The format string to compile.
- * @param start Start position in the format string
- * @param end End position in the format string
- * @return The compiled format
- * @throws VersionFormatException If the format could not be compiled
- */
- public static VersionFormat compile(String format, int start, int end) throws VersionFormatException {
- String fmtString = format.substring(start, end).intern();
- synchronized (fmtString) {
- VersionFormat fmt = formatCache.get(fmtString);
- if (fmt == null) {
- VersionFormatParser parser = new VersionFormatParser();
- fmt = new VersionFormat(parser.compile(format, start, end));
- formatCache.put(fmtString, fmt);
- }
- return fmt;
- }
- }
-
- /**
- * Parse a version string using the {@link #RAW_FORMAT} parser.
- *
- * @param version The version to parse.
- * @param originalFormat The original format to assign to the created version. Can be <code>null</code>.
- * @param original The original version string to assign to the created version. Can be <code>null</code>.
- * @return A created version
- * @throws IllegalArgumentException If the version string could not be parsed.
- */
- public static BasicVersion parseRaw(String version, IVersionFormat originalFormat, String original) {
- List<Comparable<?>> vector = RAW_FORMAT.parse(version, 0, version.length());
- return (originalFormat == OSGI_FORMAT) ? OSGiVersion.fromVector(vector) : OmniVersion.fromVector(vector, originalFormat, original);
- }
-
- static void rawToString(StringBuffer sb, boolean forRange, Comparable<?> e) {
- if (e instanceof String) {
- writeQuotedString(sb, forRange, (String) e, '\'', 0, false);
- } else if (e instanceof VersionVector) {
- sb.append('<');
- ((VersionVector) e).toString(sb, forRange);
- sb.append('>');
- } else
- sb.append(e);
- }
-
- /**
- * Write a string within quotes. If the string is found to contain the quote, an attempt is made
- * to flip quote character (single quote becomes double quote and vice versa). A string that contains
- * both will be written as several adjacent quoted strings so that each string is quoted with a
- * quote character that it does not contain.
- * @param sb The buffer that will receive the string
- * @param rangeSafe Set to <code>true</code> if the resulting string will be used in a range string
- * and hence need to escape the range delimiter characters
- * @param s The string to be written
- * @param quote The quote character to start with. Must be the single or double quote character.
- * @param startPos The start position
- * @param didFlip True if the call is recursive and thus, cannot switch quotes in the first string.
- */
- private static void writeQuotedString(StringBuffer sb, boolean rangeSafe, String s, char quote, int startPos, boolean didFlip) {
- int quotePos = sb.length();
- sb.append(quote);
- boolean otherSeen = false;
- int top = s.length();
- for (int idx = startPos; idx < top; ++idx) {
- char c = s.charAt(idx);
- if (c == '\'' || c == '"') {
- if (c == quote) {
- char otherQuote = quote == '\'' ? '"' : '\'';
- if (didFlip || otherSeen) {
- // We can only flip once
- sb.append(quote);
- writeQuotedString(sb, rangeSafe, s, otherQuote, idx, true);
- return;
- }
- quote = otherQuote;
- sb.setCharAt(quotePos, quote);
- didFlip = true;
- } else
- otherSeen = true;
- }
- if (rangeSafe && (c == '\\' || c == '[' || c == '(' || c == ']' || c == ')' || c == ',' || c <= ' '))
- sb.append('\\');
- sb.append(c);
- }
- sb.append(quote);
- }
-
- private String fmtString;
-
- private final Fragment topFragment;
-
- VersionFormat(Fragment topFragment) {
- this.topFragment = topFragment;
- }
-
- TreeInfo createInfo(int start) {
- return new TreeInfo(topFragment, start);
- }
-
- public boolean equals(Object o) {
- return this == o || o instanceof VersionFormat && toString().equals(o.toString());
- }
-
- public int hashCode() {
- return 11 * toString().hashCode();
- }
-
- public Version parse(String version) {
- List<Comparable<?>> vector = parse(version, 0, version.length());
- return (this == OSGI_FORMAT) ? OSGiVersion.fromVector(vector) : OmniVersion.fromVector(vector, this, version);
- }
-
- List<Comparable<?>> parse(String version, int start, int maxPos) {
- if (start == maxPos)
- throw new IllegalArgumentException(NLS.bind(Messages.format_0_unable_to_parse_empty_version, this, version.substring(start, maxPos)));
- TreeInfo info = new TreeInfo(topFragment, start);
- ArrayList<Comparable<?>> entries = new ArrayList<Comparable<?>>(5);
- if (!(topFragment.parse(entries, version, maxPos, info) && info.getPosition() == maxPos))
- throw new IllegalArgumentException(NLS.bind(Messages.format_0_unable_to_parse_1, this, version.substring(start, maxPos)));
- entries.add(VersionParser.removeRedundantTrail(entries, info.getPadValue()));
- return entries;
- }
-
- // Preserve cache during deserialization
- private Object readResolve() {
- synchronized (formatCache) {
- String string = toString();
- string = string.substring(7, string.length() - 1); // Strip of "format(" and ")"
- VersionFormat fmt = formatCache.get(string);
- if (fmt == null) {
- fmt = this;
- formatCache.put(string, fmt);
- }
- return fmt;
- }
- }
-
- /**
- * Returns the string representation of this compiled format
- */
- public synchronized String toString() {
- if (fmtString == null) {
- StringBuffer sb = new StringBuffer();
- toString(sb);
- }
- return fmtString;
- }
-
- public synchronized void toString(StringBuffer sb) {
- if (fmtString != null)
- sb.append(fmtString);
- else {
- int start = sb.length();
- sb.append("format"); //$NON-NLS-1$
- if (topFragment.getPadValue() != null) {
- sb.append('(');
- topFragment.toString(sb);
- sb.append(')');
- } else
- topFragment.toString(sb);
- fmtString = sb.substring(start);
- }
- }
-}
-
-class RawFormat extends VersionFormat {
- private static final long serialVersionUID = -6070590518921019745L;
-
- RawFormat(Fragment topFragment) {
- super(topFragment);
- }
-
- /**
- * Parse but do not assign this format as the Version format nor the version
- * string as the original.
- */
- public Version parse(String version) {
- List<Comparable<?>> vector = parse(version, 0, version.length());
- return OmniVersion.fromVector(vector, null, null);
- }
-
- // Preserve singleton when deserialized
- private Object readResolve() {
- return RAW_FORMAT;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java
deleted file mode 100644
index 83170c9a7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java
+++ /dev/null
@@ -1,1548 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import org.eclipse.equinox.p2.metadata.VersionFormatException;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.equinox.internal.p2.metadata.VersionFormat.TreeInfo;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * This is the Omni Version Format parser. It will parse a version format in string form
- * into a group of {@link VersionFormatParser.Fragment} elements. That group, wrapped in a
- * {@link VersionFormat}, becomes the parser for versions corresponding to the format.
- *
- * The class is not intended to included in a public API. Instead VersionFormats should
- * be created using {@link VersionFormat#parse(String)}
- *
- */
-class VersionFormatParser {
-
- static class Instructions {
- char[] characters = null;
- Comparable<?> defaultValue = null;
- char oppositeTranslationChar = 0;
- int oppositeTranslationRepeat = 0;
- boolean ignore = false;
- boolean inverted = false;
- Comparable<?> padValue = null;
- int rangeMax = Integer.MAX_VALUE;
- int rangeMin = 0;
- }
-
- static final Qualifier EXACT_ONE_QUALIFIER = new Qualifier(1, 1);
-
- static final Qualifier ONE_OR_MANY_QUALIFIER = new Qualifier(1, Integer.MAX_VALUE);
-
- static final Qualifier ZERO_OR_MANY_QUALIFIER = new Qualifier(0, Integer.MAX_VALUE);
-
- static final Qualifier ZERO_OR_ONE_QUALIFIER = new Qualifier(0, 1);
-
- /**
- * Represents one fragment of a format (i.e. auto, number, string, delimiter, etc.)
- */
- static abstract class Fragment implements Serializable {
- private static final long serialVersionUID = 4109185333058622681L;
-
- private final Qualifier qualifier;
-
- Fragment(Qualifier qualifier) {
- this.qualifier = qualifier;
- }
-
- public final boolean equals(Object f) {
- return f == this || getClass().equals(f.getClass()) && qualifier.equals(((Fragment) f).qualifier);
- }
-
- public final int hashCode() {
- return 11 * qualifier.hashCode();
- }
-
- public boolean isGroup() {
- return false;
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- toString(sb);
- return sb.toString();
- }
-
- Comparable<?> getDefaultValue() {
- return null;
- }
-
- Fragment getFirstLeaf() {
- return this;
- }
-
- Comparable<?> getPadValue() {
- return null;
- }
-
- Qualifier getQualifier() {
- return qualifier;
- }
-
- boolean parse(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- return qualifier.parse(new Fragment[] {this}, 0, segments, version, maxPos, info);
- }
-
- abstract boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info);
-
- void setDefaults(List<Comparable<?>> segments) {
- // No-op at this level
- }
-
- void toString(StringBuffer sb) {
- if (!(qualifier == VersionFormatParser.EXACT_ONE_QUALIFIER || (qualifier == VersionFormatParser.ZERO_OR_ONE_QUALIFIER && this.isGroup())))
- qualifier.toString(sb);
- }
- }
-
- /**
- * Specifies the min and max occurrences of a fragment
- */
- static class Qualifier implements Serializable {
- private static final long serialVersionUID = 7494021832824671685L;
-
- private final int max;
- private final int min;
-
- Qualifier(int min, int max) {
- this.min = min;
- this.max = max;
- }
-
- public boolean equals(Object o) {
- if (o == this)
- return true;
- if (!(o instanceof Qualifier))
- return false;
- Qualifier oq = (Qualifier) o;
- return min == oq.min && max == oq.max;
- }
-
- public int hashCode() {
- return 31 * min + 67 * max;
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- toString(sb);
- return sb.toString();
- }
-
- int getMax() {
- return max;
- }
-
- int getMin() {
- return min;
- }
-
- boolean parse(Fragment[] fragments, int fragIdx, List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- Fragment fragment = fragments[fragIdx++];
- int idx = 0;
-
- // Do the required parsing. I.e. iterate this fragment
- // min number of times.
- //
- for (; idx < min; ++idx)
- if (!fragment.parseOne(segments, version, maxPos, info))
- return false;
-
- for (; idx < max; ++idx) {
- // We are greedy. Continue parsing until we get an exception
- // and remember the state before each parse is performed.
- //
- info.pushState(segments.size(), fragment);
- if (!fragment.parseOne(segments, version, maxPos, info)) {
- info.popState(segments, fragment);
- break;
- }
- }
- int maxParsed = idx;
-
- for (;;) {
- // Pad with default values unless the max is unbounded
- //
- if (idx < max) {
- if (max != Integer.MAX_VALUE) {
- for (; idx < max; ++idx)
- fragment.setDefaults(segments);
- }
- } else {
- if (fragment instanceof StringFragment) {
- // Check for translations if we default to for MINS or MAXS
- StringFragment stringFrag = (StringFragment) fragment;
- Comparable<?> opposite = stringFrag.getOppositeDefaultValue();
- if (opposite != null) {
- idx = segments.size() - 1;
- if (stringFrag.isOppositeTranslation(segments.get(idx)))
- segments.set(idx, opposite);
- }
- }
- }
-
- if (fragIdx == fragments.length)
- // We are the last segment
- //
- return true;
-
- // Try to parse the next segment. If it fails, pop the state of
- // this segment (or a child thereof) and try again
- //
- if (fragments[fragIdx].getQualifier().parse(fragments, fragIdx, segments, version, maxPos, info))
- return true;
-
- // Be less greedy, step back one position and try again.
- //
- if (maxParsed <= min)
- // We have no more states to pop. Tell previous that we failed.
- //
- return false;
-
- info.popState(segments, fragment);
- idx = --maxParsed; // segments now have room for one more default value
- }
- }
-
- void toString(StringBuffer sb) {
- if (min == 0) {
- if (max == 1)
- sb.append('?');
- else if (max == Integer.MAX_VALUE)
- sb.append('*');
- else {
- sb.append('{');
- sb.append(min);
- sb.append(',');
- sb.append(max);
- sb.append('}');
- }
- } else if (max == Integer.MAX_VALUE) {
- if (min == 1)
- sb.append('+');
- else {
- sb.append('{');
- sb.append(min);
- sb.append(",}"); //$NON-NLS-1$
- }
- } else {
- sb.append('{');
- sb.append(min);
- if (min != max) {
- sb.append(',');
- sb.append(max);
- }
- sb.append('}');
- }
- }
-
- // Preserve singleton when deserialized
- private Object readResolve() {
- Qualifier q = this;
- if (min == 0) {
- if (max == 1)
- q = VersionFormatParser.ZERO_OR_ONE_QUALIFIER;
- else if (max == Integer.MAX_VALUE)
- q = VersionFormatParser.ZERO_OR_MANY_QUALIFIER;
- } else if (min == 1) {
- if (max == 1)
- q = VersionFormatParser.EXACT_ONE_QUALIFIER;
- else if (max == Integer.MAX_VALUE)
- q = VersionFormatParser.ONE_OR_MANY_QUALIFIER;
- }
- return q;
- }
- }
-
- private static class AutoFragment extends RangeFragment {
- private static final long serialVersionUID = -1016534328164247755L;
-
- AutoFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
- super(instr, qualifier);
- }
-
- boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- int pos = info.getPosition();
- maxPos = checkRange(pos, maxPos);
- if (maxPos < 0)
- return false;
-
- char c = version.charAt(pos);
- if (VersionParser.isDigit(c) && isAllowed(c)) {
- // Parse to next non-digit
- //
- int start = pos;
- int value = c - '0';
- while (++pos < maxPos) {
- c = version.charAt(pos);
- if (!(VersionParser.isDigit(c) && isAllowed(c)))
- break;
- value *= 10;
- value += (c - '0');
- }
- int len = pos - start;
- if (rangeMin > len || len > rangeMax)
- return false;
-
- if (!isIgnored())
- segments.add(VersionParser.valueOf(value));
- info.setPosition(pos);
- return true;
- }
-
- if (!(VersionParser.isLetter(c) && isAllowed(c)))
- return false;
-
- // Parse to next non-letter or next delimiter
- //
- int start = pos++;
- for (; pos < maxPos; ++pos) {
- c = version.charAt(pos);
- if (!(VersionParser.isLetter(c) && isAllowed(c)))
- break;
- }
- int len = pos - start;
- if (rangeMin > len || len > rangeMax)
- return false;
-
- if (!isIgnored())
- segments.add(version.substring(start, pos));
- info.setPosition(pos);
- return true;
- }
-
- void toString(StringBuffer sb) {
- sb.append('a');
- super.toString(sb);
- }
- }
-
- private static class DelimiterFragment extends Fragment {
- private static final long serialVersionUID = 8173654376143370605L;
- private final char[] delimChars;
- private final boolean inverted;
-
- DelimiterFragment(VersionFormatParser.Instructions ep, Qualifier qualifier) {
- super(qualifier);
- if (ep == null) {
- delimChars = null;
- inverted = false;
- } else {
- inverted = ep.inverted;
- delimChars = ep.characters;
- }
- }
-
- boolean isMatch(String version, int pos) {
- char c = version.charAt(pos);
- if (delimChars != null) {
- for (int idx = 0; idx < delimChars.length; ++idx)
- if (c == delimChars[idx])
- return !inverted;
- return inverted;
- } else if (VersionParser.isLetterOrDigit(c))
- return false;
-
- return true;
- }
-
- boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- int pos = info.getPosition();
- if (pos < maxPos && isMatch(version, pos)) {
- // Just swallow, a delimiter does not contribute to the vector.
- //
- info.setPosition(pos + 1);
- return true;
- }
- return false;
- }
-
- void toString(StringBuffer sb) {
- sb.append('d');
- if (delimChars != null)
- appendCharacterRange(sb, delimChars, inverted);
- super.toString(sb);
- }
- }
-
- static void appendCharacterRange(StringBuffer sb, char[] range, boolean inverted) {
- sb.append('=');
- sb.append('[');
- if (inverted)
- sb.append('^');
- int top = range.length;
- for (int idx = 0; idx < top; ++idx) {
- char b = range[idx];
- if (b == '\\' || b == ']' || (b == '-' && idx + 1 < top))
- sb.append('\\');
-
- sb.append(b);
- int ndx = idx + 1;
- if (ndx + 2 < top) {
- char c = b;
- for (; ndx < top; ++ndx) {
- char n = range[ndx];
- if (c + 1 != n)
- break;
- c = n;
- }
- if (ndx <= idx + 3)
- continue;
-
- sb.append('-');
- if (c == '\\' || c == ']' || (c == '-' && idx + 1 < top))
- sb.append('\\');
- sb.append(c);
- idx = ndx - 1;
- }
- }
- sb.append(']');
- sb.append(';');
- }
-
- static Fragment createAutoFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
- return new AutoFragment(instr, qualifier);
- }
-
- static Fragment createDelimiterFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
- return new DelimiterFragment(instr, qualifier);
- }
-
- static Fragment createGroupFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, Fragment[] fragments, boolean array) {
- return new GroupFragment(instr, qualifier, fragments, array);
- }
-
- static Fragment createLiteralFragment(Qualifier qualifier, String literal) {
- return new LiteralFragment(qualifier, literal);
- }
-
- static Fragment createNumberFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, boolean signed) {
- return new NumberFragment(instr, qualifier, signed);
- }
-
- static Fragment createPadFragment(Qualifier qualifier) {
- return new PadFragment(qualifier);
- }
-
- static Fragment createQuotedFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
- return new QuotedFragment(instr, qualifier);
- }
-
- static Fragment createRawFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
- return new RawFragment(instr, qualifier);
- }
-
- static Fragment createStringFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, boolean unbound) {
- return new StringFragment(instr, qualifier, unbound);
- }
-
- static boolean equalsAllowNull(Object a, Object b) {
- return (a == null) ? (b == null) : (b != null && a.equals(b));
- }
-
- private static abstract class ElementFragment extends Fragment {
- private static final long serialVersionUID = -6834591415456539713L;
- private final Comparable<?> defaultValue;
- private final boolean ignored;
- private final Comparable<?> padValue;
-
- ElementFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
- super(qualifier);
- if (instr != null) {
- ignored = instr.ignore;
- defaultValue = instr.defaultValue;
- padValue = instr.padValue;
- } else {
- ignored = false;
- defaultValue = null;
- padValue = null;
- }
- }
-
- Comparable<?> getDefaultValue() {
- return defaultValue;
- }
-
- Comparable<?> getPadValue() {
- return padValue;
- }
-
- boolean isIgnored() {
- return ignored;
- }
-
- void setDefaults(List<Comparable<?>> segments) {
- Comparable<?> defaultVal = getDefaultValue();
- if (defaultVal != null)
- segments.add(defaultVal);
- }
-
- void toString(StringBuffer sb) {
- if (ignored) {
- sb.append('=');
- sb.append('!');
- sb.append(';');
- }
- if (defaultValue != null) {
- sb.append('=');
- VersionFormat.rawToString(sb, false, defaultValue);
- sb.append(';');
- }
- if (padValue != null) {
- sb.append('=');
- sb.append('p');
- VersionFormat.rawToString(sb, false, padValue);
- sb.append(';');
- }
- super.toString(sb);
- }
- }
-
- private static class GroupFragment extends ElementFragment {
- private static final long serialVersionUID = 9219978678087669699L;
- private final boolean array;
- private final Fragment[] fragments;
-
- GroupFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, Fragment[] fragments, boolean array) {
- super(instr, qualifier);
- this.fragments = fragments;
- this.array = array;
- }
-
- public boolean isGroup() {
- return !array;
- }
-
- Fragment getFirstLeaf() {
- return fragments[0].getFirstLeaf();
- }
-
- boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- if (array) {
- ArrayList<Comparable<?>> subSegs = new ArrayList<Comparable<?>>();
- boolean success = fragments[0].getQualifier().parse(fragments, 0, subSegs, version, maxPos, info);
- if (!success || subSegs.isEmpty())
- return false;
-
- Comparable<?> padValue = info.getPadValue();
- if (padValue != null)
- info.setPadValue(null); // Prevent outer group from getting this.
- else
- padValue = getPadValue();
-
- padValue = VersionParser.removeRedundantTrail(segments, padValue);
- segments.add(new VersionVector(subSegs.toArray(new Comparable[subSegs.size()]), padValue));
- return true;
- }
-
- if (fragments[0].getQualifier().parse(fragments, 0, segments, version, maxPos, info)) {
- Comparable<?> padValue = getPadValue();
- if (padValue != null)
- info.setPadValue(padValue);
- return true;
- }
- return false;
- }
-
- void setDefaults(List<Comparable<?>> segments) {
- Comparable<?> dflt = getDefaultValue();
- if (dflt != null) {
- // A group default overrides any defaults within the
- // group fragments
- super.setDefaults(segments);
- } else {
- // Assign defaults for all fragments
- for (int idx = 0; idx < fragments.length; ++idx)
- fragments[idx].setDefaults(segments);
- }
- }
-
- void toString(StringBuffer sb) {
- if (array) {
- sb.append('<');
- for (int idx = 0; idx < fragments.length; ++idx)
- fragments[idx].toString(sb);
- sb.append('>');
- } else {
- if (getQualifier() == VersionFormatParser.ZERO_OR_ONE_QUALIFIER) {
- sb.append('[');
- for (int idx = 0; idx < fragments.length; ++idx)
- fragments[idx].toString(sb);
- sb.append(']');
- } else {
- sb.append('(');
- for (int idx = 0; idx < fragments.length; ++idx)
- fragments[idx].toString(sb);
- sb.append(')');
- }
- }
- super.toString(sb);
- }
- }
-
- private static class LiteralFragment extends Fragment {
- private static final long serialVersionUID = 6210696245839471802L;
- private final String string;
-
- LiteralFragment(Qualifier qualifier, String string) {
- super(qualifier);
- this.string = string;
- }
-
- boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- int pos = info.getPosition();
- int litLen = string.length();
- if (pos + litLen > maxPos)
- return false;
-
- for (int idx = 0; idx < litLen; ++idx, ++pos) {
- if (string.charAt(idx) != version.charAt(pos))
- return false;
- }
- info.setPosition(pos);
- return true;
- }
-
- void toString(StringBuffer sb) {
- String str = string;
- if (str.length() != 1) {
- sb.append('\'');
- VersionFormatParser.toStringEscaped(sb, str, "\'"); //$NON-NLS-1$
- sb.append('\'');
- } else {
- char c = str.charAt(0);
- switch (c) {
- case '\'' :
- case '\\' :
- case '<' :
- case '[' :
- case '(' :
- case '{' :
- case '?' :
- case '*' :
- case '+' :
- case '=' :
- sb.append('\\');
- sb.append(c);
- break;
- default :
- if (VersionParser.isLetterOrDigit(c)) {
- sb.append('\\');
- sb.append(c);
- } else
- sb.append(c);
- }
- }
- super.toString(sb);
- }
- }
-
- private static class NumberFragment extends RangeFragment {
- private static final long serialVersionUID = -8552754381106711507L;
- private final boolean signed;
-
- NumberFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, boolean signed) {
- super(instr, qualifier);
- this.signed = signed;
- }
-
- boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- int pos = info.getPosition();
- maxPos = checkRange(pos, maxPos);
- if (maxPos < 0)
- return false;
-
- // Parse to next non-digit
- //
- int start = pos;
- int value;
-
- char c = version.charAt(pos);
- if (signed || characters != null) {
- boolean negate = false;
- if (signed && c == '-' && pos + 1 < maxPos) {
- negate = true;
- c = version.charAt(++pos);
- }
-
- if (!(c >= '0' && c <= '9' && isAllowed(c)))
- return false;
-
- // Parse to next non-digit
- //
- value = c - '0';
- while (++pos < maxPos) {
- c = version.charAt(pos);
- if (!(c >= '0' && c <= '9' && isAllowed(c)))
- break;
- value *= 10;
- value += (c - '0');
- }
- if (negate)
- value = -value;
- } else {
- if (c < '0' || c > '9')
- return false;
-
- // Parse to next non-digit
- //
- value = c - '0';
- while (++pos < maxPos) {
- c = version.charAt(pos);
- if (c < '0' || c > '9')
- break;
- value *= 10;
- value += (c - '0');
- }
- }
-
- int len = pos - start;
- if (rangeMin > len || len > rangeMax)
- return false;
-
- if (!isIgnored())
- segments.add(VersionParser.valueOf(value));
- info.setPosition(pos);
- return true;
- }
-
- void toString(StringBuffer sb) {
- sb.append(signed ? 'N' : 'n');
- super.toString(sb);
- }
- }
-
- private static class PadFragment extends ElementFragment {
- private static final long serialVersionUID = 5052010199974380170L;
-
- PadFragment(Qualifier qualifier) {
- super(null, qualifier);
- }
-
- boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- int pos = info.getPosition();
- if (pos >= maxPos || version.charAt(pos) != 'p')
- return false;
-
- int[] position = new int[] {++pos};
- Comparable<?> v = VersionParser.parseRawElement(version, position, maxPos);
- if (v == null)
- return false;
-
- if (!isIgnored())
- info.setPadValue(v);
- info.setPosition(position[0]);
- return true;
- }
-
- void toString(StringBuffer sb) {
- sb.append('p');
- super.toString(sb);
- }
- }
-
- private static class QuotedFragment extends RangeFragment {
- private static final long serialVersionUID = 6057751133533608969L;
-
- QuotedFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
- super(instr, qualifier);
- }
-
- boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- int pos = info.getPosition();
- if (pos >= maxPos)
- return false;
-
- char endQuote;
- char quote = version.charAt(pos);
- switch (quote) {
- case '<' :
- endQuote = '>';
- break;
- case '{' :
- endQuote = '}';
- break;
- case '(' :
- endQuote = ')';
- break;
- case '[' :
- endQuote = ']';
- break;
- case '>' :
- endQuote = '<';
- break;
- case '}' :
- endQuote = '{';
- break;
- case ')' :
- endQuote = '(';
- break;
- case ']' :
- endQuote = '[';
- break;
- default :
- if (VersionParser.isLetterOrDigit(quote))
- return false;
- endQuote = quote;
- }
- int start = ++pos;
- char c = version.charAt(pos);
- while (c != endQuote && isAllowed(c) && ++pos < maxPos)
- c = version.charAt(pos);
-
- if (c != endQuote || rangeMin > pos - start)
- // End quote not found
- return false;
-
- int len = pos - start;
- if (rangeMin > len || len > rangeMax)
- return false;
-
- if (!isIgnored())
- segments.add(version.substring(start, pos));
- info.setPosition(++pos); // Skip quote
- return true;
- }
-
- void toString(StringBuffer sb) {
- sb.append('q');
- super.toString(sb);
- }
- }
-
- private static abstract class RangeFragment extends ElementFragment {
- private static final long serialVersionUID = -6680402803630334708L;
- final char[] characters;
- final boolean inverted;
- final int rangeMax;
- final int rangeMin;
-
- RangeFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
- super(instr, qualifier);
- if (instr == null) {
- characters = null;
- inverted = false;
- rangeMin = 0;
- rangeMax = Integer.MAX_VALUE;
- } else {
- characters = instr.characters;
- inverted = instr.inverted;
- rangeMin = instr.rangeMin;
- rangeMax = instr.rangeMax;
- }
- }
-
- /**
- * Checks that pos is at a valid character position, that we
- * have at least the required minimum characters left, and
- * if a maximum number of characters is set, limits the
- * returned value to a maxPos that reflects that maximum.
- * @param pos the current position
- * @param maxPos the current maxPos
- * @return maxPos, possibly limited by rangeMax
- */
- int checkRange(int pos, int maxPos) {
- int check = pos;
- if (rangeMin == 0)
- check++; // Verify one character
- else
- check += rangeMin;
-
- if (check > maxPos)
- // Less then min characters left
- maxPos = -1;
- else {
- if (rangeMax != Integer.MAX_VALUE) {
- check = pos + rangeMax;
- if (check < maxPos)
- maxPos = check;
- }
- }
- return maxPos;
- }
-
- boolean isAllowed(char c) {
- char[] crs = characters;
- if (crs != null) {
- int idx = crs.length;
- while (--idx >= 0)
- if (c == crs[idx])
- return !inverted;
- return inverted;
- }
- return true;
- }
-
- void toString(StringBuffer sb) {
- if (characters != null)
- appendCharacterRange(sb, characters, inverted);
- if (rangeMin != 0 || rangeMax != Integer.MAX_VALUE) {
- sb.append('=');
- sb.append('{');
- sb.append(rangeMin);
- if (rangeMin != rangeMax) {
- sb.append(',');
- if (rangeMax != Integer.MAX_VALUE)
- sb.append(rangeMax);
- }
- sb.append('}');
- sb.append(';');
- }
- super.toString(sb);
- }
- }
-
- private static class RawFragment extends ElementFragment {
- private static final long serialVersionUID = 4107448125256042602L;
-
- RawFragment(VersionFormatParser.Instructions processing, Qualifier qualifier) {
- super(processing, qualifier);
- }
-
- boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- int[] position = new int[] {info.getPosition()};
- Comparable<?> v = VersionParser.parseRawElement(version, position, maxPos);
- if (v == null)
- return false;
-
- if (!isIgnored())
- segments.add(v);
- info.setPosition(position[0]);
- return true;
- }
-
- void toString(StringBuffer sb) {
- sb.append('r');
- super.toString(sb);
- }
- }
-
- private static class StringFragment extends RangeFragment {
- private static final long serialVersionUID = -2265924553606430164L;
- final boolean anyChar;
- private final char oppositeTranslationChar;
- private final int oppositeTranslationRepeat;
-
- StringFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, boolean noLimit) {
- super(instr, qualifier);
- anyChar = noLimit;
- char otc = 0;
- int otr = 0;
- if (instr != null) {
- otc = instr.oppositeTranslationChar;
- otr = instr.oppositeTranslationRepeat;
- if (instr.defaultValue == VersionVector.MINS_VALUE) {
- if (otc == 0)
- otc = 'z';
- if (otr == 0)
- otr = 3;
- } else if (instr.defaultValue == VersionVector.MAXS_VALUE) {
- if (otc == 0)
- otc = '-';
- otr = 1;
- }
- }
- oppositeTranslationChar = otc;
- oppositeTranslationRepeat = otr;
- }
-
- Comparable<?> getOppositeDefaultValue() {
- Comparable<?> dflt = getDefaultValue();
- return dflt == VersionVector.MAXS_VALUE ? VersionVector.MINS_VALUE : (dflt == VersionVector.MINS_VALUE ? VersionVector.MAXS_VALUE : null);
- }
-
- public boolean isOppositeTranslation(Object val) {
- if (val instanceof String) {
- String str = (String) val;
- int idx = oppositeTranslationRepeat;
- if (str.length() == idx) {
- while (--idx >= 0)
- if (str.charAt(idx) != oppositeTranslationChar)
- break;
- return idx < 0;
- }
- }
- return false;
- }
-
- boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- int pos = info.getPosition();
- maxPos = checkRange(pos, maxPos);
- if (maxPos < 0)
- return false;
-
- // Parse to next delimiter or end of string
- //
- int start = pos;
- if (characters != null) {
- if (anyChar) {
- // Swallow everything that matches the allowed characters
- for (; pos < maxPos; ++pos) {
- if (!isAllowed(version.charAt(pos)))
- break;
- }
- } else {
- // Swallow letters that matches the allowed characters
- for (; pos < maxPos; ++pos) {
- char c = version.charAt(pos);
- if (!(VersionParser.isLetter(c) && isAllowed(c)))
- break;
- }
- }
- } else {
- if (anyChar)
- // Swallow all characters
- pos = maxPos;
- else {
- // Swallow all letters
- for (; pos < maxPos; ++pos) {
- if (!VersionParser.isLetter(version.charAt(pos)))
- break;
- }
- }
- }
- int len = pos - start;
- if (len == 0 || rangeMin > len || len > rangeMax)
- return false;
-
- if (!isIgnored())
- segments.add(version.substring(start, pos));
- info.setPosition(pos);
- return true;
- }
-
- void toString(StringBuffer sb) {
- sb.append(anyChar ? 'S' : 's');
- super.toString(sb);
- }
- }
-
- private int current;
-
- private List<Fragment> currentList;
-
- private int eos;
-
- private String format;
-
- private int start;
-
- Fragment compile(String fmt, int pos, int maxPos) throws VersionFormatException {
- format = fmt;
- if (start >= maxPos)
- throw new VersionFormatException(Messages.format_is_empty);
-
- start = pos;
- current = pos;
- eos = maxPos;
- currentList = new ArrayList<Fragment>();
- while (current < eos)
- parseFragment();
-
- Fragment topFrag;
- switch (currentList.size()) {
- case 0 :
- throw new VersionFormatException(Messages.format_is_empty);
- case 1 :
- Fragment frag = currentList.get(0);
- if (frag.isGroup()) {
- topFrag = frag;
- break;
- }
- // Fall through to default
- default :
- topFrag = createGroupFragment(null, EXACT_ONE_QUALIFIER, currentList.toArray(new Fragment[currentList.size()]), false);
- }
- currentList = null;
- return topFrag;
- }
-
- private void assertChar(char expected) throws VersionFormatException {
- if (current >= eos)
- throw formatException(NLS.bind(Messages.premature_end_of_format_expected_0, new String(new char[] {expected})));
-
- char c = format.charAt(current);
- if (c != expected)
- throw formatException(c, new String(new char[] {expected}));
- ++current;
- }
-
- private VersionFormatException formatException(char found, String expected) {
- return formatException(new String(new char[] {found}), expected);
- }
-
- private VersionFormatException formatException(String message) {
- return new VersionFormatException(NLS.bind(Messages.syntax_error_in_version_format_0_1_2, new Object[] {format.substring(start, eos), new Integer(current), message}));
- }
-
- private VersionFormatException formatException(String found, String expected) {
- return new VersionFormatException(NLS.bind(Messages.syntax_error_in_version_format_0_1_found_2_expected_3, new Object[] {format.substring(start, eos), new Integer(current), found, expected}));
- }
-
- private VersionFormatException illegalControlCharacter(char c) {
- return formatException(NLS.bind(Messages.illegal_character_encountered_ascii_0, VersionParser.valueOf(c)));
- }
-
- private String parseAndConsiderEscapeUntil(char endChar) throws VersionFormatException {
- StringBuffer sb = new StringBuffer();
- while (current < eos) {
- char c = format.charAt(current++);
- if (c == endChar)
- break;
-
- if (c < 32)
- throw illegalControlCharacter(c);
-
- if (c == '\\') {
- if (current == eos)
- throw formatException(Messages.EOS_after_escape);
- c = format.charAt(current++);
- if (c < 32)
- throw illegalControlCharacter(c);
- }
- sb.append(c);
- }
- return sb.toString();
- }
-
- private void parseAuto() throws VersionFormatException {
- VersionFormatParser.Instructions ep = parseProcessing();
- if (ep != null) {
- if (ep.padValue != null)
- throw formatException(Messages.auto_can_not_have_pad_value);
- }
- currentList.add(createAutoFragment(ep, parseQualifier()));
- }
-
- private void parseBracketGroup() throws VersionFormatException {
- List<Fragment> saveList = currentList;
- currentList = new ArrayList<Fragment>();
- while (current < eos && format.charAt(current) != ']')
- parseFragment();
-
- if (current == eos)
- throw formatException(NLS.bind(Messages.premature_end_of_format_expected_0, "]")); //$NON-NLS-1$
-
- ++current;
- VersionFormatParser.Instructions ep = parseProcessing();
- saveList.add(createGroupFragment(ep, ZERO_OR_ONE_QUALIFIER, currentList.toArray(new Fragment[currentList.size()]), false));
- currentList = saveList;
- }
-
- private void parseCharacterGroup(VersionFormatParser.Instructions ep) throws VersionFormatException {
- assertChar('[');
-
- StringBuffer sb = new StringBuffer();
- outer: for (; current < eos; ++current) {
- char c = format.charAt(current);
- switch (c) {
- case '\\' :
- if (current + 1 < eos) {
- sb.append(format.charAt(++current));
- continue;
- }
- throw formatException(Messages.premature_end_of_format);
- case '^' :
- if (sb.length() == 0)
- ep.inverted = true;
- else
- sb.append(c);
- continue;
- case ']' :
- break outer;
- case '-' :
- if (sb.length() > 0 && current + 1 < eos) {
- char rangeEnd = format.charAt(++current);
- if (rangeEnd == ']') {
- // Use dash verbatim when last in range
- sb.append(c);
- break outer;
- }
-
- char rangeStart = sb.charAt(sb.length() - 1);
- if (rangeEnd < rangeStart)
- throw formatException(Messages.negative_character_range);
- while (++rangeStart <= rangeEnd)
- sb.append(rangeStart);
- continue;
- }
- // Fall through to default
- default :
- if (c < 32)
- throw illegalControlCharacter(c);
- sb.append(c);
- }
- }
- assertChar(']');
- int top = sb.length();
- char[] chars = new char[top];
- sb.getChars(0, top, chars, 0);
- ep.characters = chars;
- }
-
- private void parseDelimiter() throws VersionFormatException {
- VersionFormatParser.Instructions ep = parseProcessing();
- if (ep != null) {
- if (ep.rangeMin != 0 || ep.rangeMax != Integer.MAX_VALUE)
- throw formatException(Messages.delimiter_can_not_have_range);
- if (ep.ignore)
- throw formatException(Messages.delimiter_can_not_be_ignored);
- if (ep.defaultValue != null)
- throw formatException(Messages.delimiter_can_not_have_default_value);
- if (ep.padValue != null)
- throw formatException(Messages.delimiter_can_not_have_pad_value);
- }
- currentList.add(createDelimiterFragment(ep, parseQualifier()));
- }
-
- private void parseFragment() throws VersionFormatException {
- if (current == eos)
- throw formatException(Messages.premature_end_of_format);
- char c = format.charAt(current++);
- switch (c) {
- case '(' :
- parseGroup(false);
- break;
- case '<' :
- parseGroup(true);
- break;
- case '[' :
- parseBracketGroup();
- break;
- case 'a' :
- parseAuto();
- break;
- case 'r' :
- parseRaw();
- break;
- case 'n' :
- parseNumber(false);
- break;
- case 'N' :
- parseNumber(true);
- break;
- case 's' :
- parseString(false);
- break;
- case 'S' :
- parseString(true);
- break;
- case 'd' :
- parseDelimiter();
- break;
- case 'q' :
- parseQuotedString();
- break;
- case 'p' :
- parsePad();
- break;
- default :
- parseLiteral(c);
- }
- }
-
- private void parseGroup(boolean array) throws VersionFormatException {
- List<Fragment> saveList = currentList;
- currentList = new ArrayList<Fragment>();
- char expectedEnd = array ? '>' : ')';
- while (current < eos && format.charAt(current) != expectedEnd)
- parseFragment();
- assertChar(expectedEnd);
-
- VersionFormatParser.Instructions ep = parseProcessing();
- if (ep != null) {
- if (ep.characters != null)
- throw formatException(Messages.array_can_not_have_character_group);
- if (ep.rangeMax != Integer.MAX_VALUE && ep.padValue != null) {
- throw formatException(Messages.cannot_combine_range_upper_bound_with_pad_value);
- }
- }
-
- if (currentList.isEmpty())
- throw formatException(array ? Messages.array_can_not_be_empty : Messages.group_can_not_be_empty);
- saveList.add(createGroupFragment(ep, parseQualifier(), currentList.toArray(new Fragment[currentList.size()]), array));
- currentList = saveList;
- }
-
- private int parseIntegerLiteral() throws VersionFormatException {
- if (current == eos)
- throw formatException(NLS.bind(Messages.premature_end_of_format_expected_0, "<integer>")); //$NON-NLS-1$
-
- char c = format.charAt(current);
- if (!VersionParser.isDigit(c))
- throw formatException(c, "<integer>"); //$NON-NLS-1$
-
- int value = c - '0';
- while (++current < eos) {
- c = format.charAt(current);
- if (!VersionParser.isDigit(c))
- break;
- value *= 10;
- value += (c - '0');
- }
- return value;
- }
-
- private void parseLiteral(char c) throws VersionFormatException {
- String value;
- switch (c) {
- case '\'' :
- value = parseAndConsiderEscapeUntil(c);
- break;
- case ')' :
- case ']' :
- case '{' :
- case '}' :
- case '?' :
- case '*' :
- throw formatException(c, "<literal>"); //$NON-NLS-1$
- default :
- if (VersionParser.isLetterOrDigit(c))
- throw formatException(c, "<literal>"); //$NON-NLS-1$
-
- if (c < 32)
- throw illegalControlCharacter(c);
-
- if (c == '\\') {
- if (current == eos)
- throw formatException(Messages.EOS_after_escape);
- c = format.charAt(current++);
- if (c < 32)
- throw illegalControlCharacter(c);
- }
- value = new String(new char[] {c});
- }
- currentList.add(createLiteralFragment(parseQualifier(), value));
- }
-
- private int[] parseMinMax() throws VersionFormatException {
-
- int max = Integer.MAX_VALUE;
- ++current;
- int min = parseIntegerLiteral();
- char c = format.charAt(current);
- if (c == '}') {
- max = min;
- if (max == 0)
- throw formatException(Messages.range_max_cannot_be_zero);
- ++current;
- } else if (c == ',' && current + 1 < eos) {
- if (format.charAt(++current) != '}') {
- max = parseIntegerLiteral();
- if (max == 0)
- throw formatException(Messages.range_max_cannot_be_zero);
- if (max < min)
- throw formatException(Messages.range_max_cannot_be_less_then_range_min);
- }
- assertChar('}');
- } else
- throw formatException(c, "},"); //$NON-NLS-1$
- return new int[] {min, max};
- }
-
- private void parseNumber(boolean signed) throws VersionFormatException {
- VersionFormatParser.Instructions ep = parseProcessing();
- if (ep != null) {
- if (ep.padValue != null)
- throw formatException(Messages.number_can_not_have_pad_value);
- }
- currentList.add(createNumberFragment(ep, parseQualifier(), signed));
- }
-
- private void parsePad() throws VersionFormatException {
- currentList.add(createPadFragment(parseQualifier()));
- }
-
- private VersionFormatParser.Instructions parseProcessing() throws VersionFormatException {
- if (current >= eos)
- return null;
-
- char c = format.charAt(current);
- if (c != '=')
- return null;
-
- VersionFormatParser.Instructions ep = new VersionFormatParser.Instructions();
- do {
- current++;
- parseProcessingInstruction(ep);
- } while (current < eos && format.charAt(current) == '=');
- return ep;
- }
-
- private void parseProcessingInstruction(VersionFormatParser.Instructions processing) throws VersionFormatException {
- if (current == eos)
- throw formatException(Messages.premature_end_of_format);
-
- char c = format.charAt(current);
- if (c == 'p') {
- // =pad(<raw-element>);
- //
- if (processing.padValue != null)
- throw formatException(Messages.pad_defined_more_then_once);
- if (processing.ignore)
- throw formatException(Messages.cannot_combine_ignore_with_other_instruction);
- ++current;
- processing.padValue = parseRawElement();
- } else if (c == '!') {
- // =ignore;
- //
- if (processing.ignore)
- throw formatException(Messages.ignore_defined_more_then_once);
- if (processing.padValue != null || processing.characters != null || processing.rangeMin != 0 || processing.rangeMax != Integer.MAX_VALUE || processing.defaultValue != null)
- throw formatException(Messages.cannot_combine_ignore_with_other_instruction);
- ++current;
- processing.ignore = true;
- } else if (c == '[') {
- // =[<character group];
- //
- if (processing.characters != null)
- throw formatException(Messages.character_group_defined_more_then_once);
- if (processing.ignore)
- throw formatException(Messages.cannot_combine_ignore_with_other_instruction);
- parseCharacterGroup(processing);
- } else if (c == '{') {
- // ={min,max};
- //
- if (processing.rangeMin != 0 || processing.rangeMax != Integer.MAX_VALUE)
- throw formatException(Messages.range_defined_more_then_once);
- if (processing.ignore)
- throw formatException(Messages.cannot_combine_ignore_with_other_instruction);
- int[] minMax = parseMinMax();
- processing.rangeMin = minMax[0];
- processing.rangeMax = minMax[1];
- } else {
- // =<raw-element>;
- if (processing.defaultValue != null)
- throw formatException(Messages.default_defined_more_then_once);
- if (processing.ignore)
- throw formatException(Messages.cannot_combine_ignore_with_other_instruction);
- Comparable<?> dflt = parseRawElement();
- processing.defaultValue = dflt;
- if (current < eos && format.charAt(current) == '{') {
- // =m{<translated min char>}
- // =''{<translated max char>,<max char repeat>}
- if (++current == eos)
- throw formatException(Messages.premature_end_of_format);
- processing.oppositeTranslationChar = format.charAt(current++);
- if (current == eos)
- throw formatException(Messages.premature_end_of_format);
-
- if (dflt == VersionVector.MINS_VALUE) {
- processing.oppositeTranslationRepeat = 3;
- if (format.charAt(current) == ',') {
- ++current;
- processing.oppositeTranslationRepeat = parseIntegerLiteral();
- }
- } else if (dflt != VersionVector.MAXS_VALUE) {
- current -= 2;
- throw formatException(Messages.only_max_and_empty_string_defaults_can_have_translations);
- }
- assertChar('}');
- }
- }
- assertChar(';');
- }
-
- private Qualifier parseQualifier() throws VersionFormatException {
- if (current >= eos)
- return EXACT_ONE_QUALIFIER;
-
- char c = format.charAt(current);
- if (c == '?') {
- ++current;
- return ZERO_OR_ONE_QUALIFIER;
- }
-
- if (c == '*') {
- ++current;
- return ZERO_OR_MANY_QUALIFIER;
- }
-
- if (c == '+') {
- ++current;
- return ONE_OR_MANY_QUALIFIER;
- }
-
- if (c != '{')
- return EXACT_ONE_QUALIFIER;
-
- int[] minMax = parseMinMax();
- int min = minMax[0];
- int max = minMax[1];
-
- // Use singletons for commonly used ranges
- //
- if (min == 0) {
- if (max == 1)
- return ZERO_OR_ONE_QUALIFIER;
- if (max == Integer.MAX_VALUE)
- return ZERO_OR_MANY_QUALIFIER;
- } else if (min == 1) {
- if (max == 1)
- return EXACT_ONE_QUALIFIER;
- if (max == Integer.MAX_VALUE)
- return ONE_OR_MANY_QUALIFIER;
- }
- return new Qualifier(min, max);
- }
-
- private void parseQuotedString() throws VersionFormatException {
- VersionFormatParser.Instructions ep = parseProcessing();
- if (ep != null) {
- if (ep.padValue != null)
- throw formatException(Messages.string_can_not_have_pad_value);
- }
- currentList.add(createQuotedFragment(ep, parseQualifier()));
- }
-
- private void parseRaw() throws VersionFormatException {
- VersionFormatParser.Instructions ep = parseProcessing();
- if (ep != null) {
- if (ep.padValue != null)
- throw formatException(Messages.raw_element_can_not_have_pad_value);
- }
- currentList.add(createRawFragment(ep, parseQualifier()));
- }
-
- private Comparable<?> parseRawElement() throws VersionFormatException {
- int[] position = new int[] {current};
- Comparable<?> v = VersionParser.parseRawElement(format, position, eos);
- if (v == null)
- throw new VersionFormatException(NLS.bind(Messages.raw_element_expected_0, format));
- current = position[0];
- return v;
- }
-
- private void parseString(boolean unlimited) throws VersionFormatException {
- VersionFormatParser.Instructions ep = parseProcessing();
- if (ep != null) {
- if (ep.padValue != null)
- throw formatException(Messages.string_can_not_have_pad_value);
- }
- currentList.add(createStringFragment(ep, parseQualifier(), unlimited));
- }
-
- static void toStringEscaped(StringBuffer sb, String value, String escapes) {
- for (int idx = 0; idx < value.length(); ++idx) {
- char c = value.charAt(idx);
- if (c == '\\' || escapes.indexOf(c) >= 0)
- sb.append('\\');
- sb.append(c);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java
deleted file mode 100644
index 49cb0311d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java
+++ /dev/null
@@ -1,381 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionFormatException;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * The Omni Version parser. Not intended for public API. Instead use
- * {@link Version#create(String)} or {@link Version#parseVersion(String)}.
- *
- * The class also contains some general purpose parser support methods
- *
- * @noextend This class is not intended to be subclassed by clients.
- */
-public abstract class VersionParser {
- public static final Integer ZERO_INT = new Integer(0);
-
- public static final Integer MAX_INT_OBJ = new Integer(Integer.MAX_VALUE);
-
- private static final Integer cache[] = new Integer[100];
-
- static {
- cache[0] = ZERO_INT;
- for (int i = 1; i < cache.length; i++)
- cache[i] = new Integer(i);
- }
-
- public static Integer valueOf(int i) {
- if (i >= 0 && i < cache.length)
- return cache[i];
-
- return (i == Integer.MAX_VALUE) ? MAX_INT_OBJ : new Integer(i);
- }
-
- static Comparable<?> removeRedundantTrail(List<Comparable<?>> segments, Comparable<?> padValue) {
- Comparable<?> redundantTrail;
- if (padValue == null)
- redundantTrail = VersionVector.MIN_VALUE;
- else {
- redundantTrail = padValue;
- if (padValue == VersionVector.MIN_VALUE)
- padValue = null;
- }
-
- int idx = segments.size();
- while (--idx >= 0 && segments.get(idx).equals(redundantTrail))
- segments.remove(idx);
-
- return padValue;
- }
-
- private VersionParser() {
- // Prevent class from being instantiated
- }
-
- /**
- * Parse the <code>version</code> string and assing the parsed portions to the <code>receiver</code>.
- * This method is called from the version string constructor.
- *
- * @param version The string to be parsed
- * @param start Start position in the <code>version</code> string
- * @param maxPos End position in the <code>version</code> string
- * @returns a version if one indeed was parsed or <code>null</code> if the string
- * contained only whitespace.
- * @throws IllegalArgumentException if the version is malformed
- */
- public static Version parse(String version, int start, int maxPos) throws IllegalArgumentException {
- // trim leading and trailing whitespace
- int pos = skipWhite(version, start);
- maxPos = skipTrailingWhite(version, start, maxPos);
- if (pos == maxPos)
- return null;
-
- List<Comparable<?>> vector = null;
- VersionFormat fmt = null;
- char c = version.charAt(pos);
- if (isDigit(c)) {
- return OSGiVersion.fromVector(VersionFormat.OSGI_FORMAT.parse(version, pos, maxPos));
- }
-
- if (!isLetter(c))
- throw new IllegalArgumentException();
-
- if (version.startsWith(Version.RAW_PREFIX, pos)) {
- VersionFormat rawFmt = VersionFormat.RAW_FORMAT;
- pos += 4;
-
- // Find ending '/' that is neither quoted or escaped
- int end = maxPos;
- for (int idx = pos; idx < maxPos; ++idx) {
- c = version.charAt(idx);
- switch (c) {
- case '/' :
- end = idx;
- break;
- case '\\' :
- ++idx;
- continue;
- case '\'' :
- case '"' :
- for (++idx; idx < maxPos; ++idx) {
- char e = version.charAt(idx);
- if (e == c) {
- break;
- }
- if (e == '\\')
- ++idx;
- }
- // fall through to default
- default :
- continue;
- }
- break;
- }
-
- vector = rawFmt.parse(version, pos, end);
- pos = end;
- if (pos == maxPos)
- // This was a pure raw version
- //
- return OmniVersion.fromVector(vector, null, null);
-
- if (version.charAt(pos) != '/')
- throw new IllegalArgumentException(NLS.bind(Messages.expected_slash_after_raw_vector_0, version.substring(start, maxPos)));
- ++pos;
-
- if (pos == maxPos)
- throw new IllegalArgumentException(NLS.bind(Messages.expected_orignal_after_slash_0, version.substring(start, maxPos)));
- }
-
- if (version.startsWith("format(", pos)) { //$NON-NLS-1$
- // Parse the format
- //
- pos += 7;
- try {
- // Find matching ')' that is neither quoted or escaped
- //
- int end = findEndOfFormat(version, pos, maxPos);
- fmt = VersionFormat.compile(version, pos, end);
- pos = end + 1;
- } catch (VersionFormatException e) {
- throw new IllegalArgumentException(e.getMessage());
- }
- if (pos == maxPos) {
- // This was a raw version with format but no original
- //
- if (vector == null)
- throw new IllegalArgumentException(NLS.bind(Messages.only_format_specified_0, version.substring(start, maxPos)));
- return fmt == VersionFormat.OSGI_FORMAT ? OSGiVersion.fromVector(vector) : OmniVersion.fromVector(vector, fmt, null);
- }
- }
-
- if (fmt == null && vector == null)
- throw new IllegalArgumentException(NLS.bind(Messages.neither_raw_vector_nor_format_specified_0, version.substring(start, maxPos)));
-
- if (version.charAt(pos) != ':')
- throw new IllegalArgumentException(NLS.bind(Messages.colon_expected_before_original_version_0, version.substring(start, maxPos)));
-
- pos++;
- if (pos == maxPos)
- throw new IllegalArgumentException(NLS.bind(Messages.expected_orignal_after_colon_0, version.substring(start, maxPos)));
-
- if (vector == null) {
- // Vector and pad must be created by parsing the original
- //
- vector = fmt.parse(version, pos, maxPos);
- }
- return fmt == VersionFormat.OSGI_FORMAT ? OSGiVersion.fromVector(vector) : OmniVersion.fromVector(vector, fmt, version.substring(pos));
- }
-
- static boolean isDigit(char c) {
- return c >= '0' && c <= '9';
- }
-
- public static boolean isLetter(char c) {
- return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
- }
-
- static boolean isLetterOrDigit(char c) {
- return isDigit(c) || isLetter(c);
- }
-
- public static int findEndOfFormat(String string, int pos, int maxPos) {
- int end = -1;
- int depth = 1;
- for (int idx = pos; idx < maxPos; ++idx) {
- char c = string.charAt(idx);
- switch (c) {
- case ')' :
- if (--depth == 0) {
- end = idx;
- break;
- }
- continue;
- case '(' :
- ++depth;
- continue;
- case '\\' :
- ++idx;
- continue;
- case '\'' :
- case '"' :
- for (++idx; idx < maxPos; ++idx) {
- char e = string.charAt(idx);
- if (e == c) {
- break;
- }
- if (e == '\\')
- ++idx;
- }
- // fall through to default
- default :
- continue;
- }
- break;
- }
- if (depth != 0)
- throw new IllegalArgumentException(NLS.bind(Messages.unbalanced_format_parenthesis, string.substring(pos - 1, maxPos)));
- return end;
- }
-
- static Comparable<?> parseRawElement(String value, int[] position, int maxPos) {
- int current = position[0];
- if (current >= maxPos)
- return null;
-
- boolean negate = false;
- char c = value.charAt(current);
- Comparable<?> v;
- switch (c) {
- case '\'' :
- case '"' : {
- StringBuffer sb = new StringBuffer();
- for (;;) {
- char q = c;
- if (++current == maxPos)
- return null;
- c = value.charAt(current);
- while (c != q) {
- if (c < 32)
- return null;
- sb.append(c);
- if (++current == maxPos)
- return null;
- c = value.charAt(current);
- }
- if (++current == maxPos)
- break;
- c = value.charAt(current);
- if (c != '\'' && c != '"')
- break;
- }
- v = sb.length() == 0 ? VersionVector.MINS_VALUE : sb.toString();
- break;
- }
- case '<' : {
- if (++current == maxPos)
- return null;
-
- position[0] = current;
- v = parseRawVector(value, position, maxPos);
- if (v == null)
- return null;
- current = position[0];
- break;
- }
- case 'm' :
- v = VersionVector.MAXS_VALUE;
- ++current;
- break;
- case 'M' :
- v = VersionVector.MAX_VALUE;
- ++current;
- break;
- case '-' :
- if (++current >= maxPos)
- return null;
-
- c = value.charAt(current);
- if (c == 'M') {
- ++current;
- v = VersionVector.MIN_VALUE;
- break;
- }
- negate = true;
- // Fall through to default
- default : {
- if (isDigit(c)) {
- int start = current++;
- while (current < maxPos && isDigit(value.charAt(current)))
- ++current;
- int val = Integer.parseInt(value.substring(start, current));
- if (negate)
- val = -val;
- v = valueOf(val);
- break;
- }
- return null;
- }
- }
- position[0] = current;
- return v;
- }
-
- private static Comparable<?> parseRawVector(String value, int[] position, int maxPos) {
- int pos = position[0];
- if (pos >= maxPos)
- return null;
-
- char c = value.charAt(pos);
- if (c == '>')
- return null;
-
- ArrayList<Comparable<?>> rawList = new ArrayList<Comparable<?>>();
- boolean padMarkerSeen = (c == 'p');
- if (padMarkerSeen) {
- if (++pos >= maxPos)
- return null;
- position[0] = pos;
- }
-
- Comparable<?> pad = null;
- for (;;) {
- Comparable<?> elem = parseRawElement(value, position, maxPos);
- if (elem == null)
- return null;
-
- if (padMarkerSeen)
- pad = elem;
- else
- rawList.add(elem);
-
- pos = position[0];
- if (pos >= maxPos)
- return null;
-
- c = value.charAt(pos);
- position[0] = ++pos;
- if (c == '>')
- break;
-
- if (padMarkerSeen || pos >= maxPos)
- return null;
-
- if (c == 'p') {
- padMarkerSeen = true;
- continue;
- }
-
- if (c != '.')
- return null;
- }
- pad = removeRedundantTrail(rawList, pad);
- return new VersionVector(rawList.toArray(new Comparable[rawList.size()]), pad);
- }
-
- public static int skipWhite(String string, int pos) {
- int top = string.length();
- while (pos < top && string.charAt(pos) <= ' ')
- ++pos;
- return pos;
- }
-
- public static int skipTrailingWhite(String string, int start, int end) {
- while (end > start && string.charAt(end - 1) <= ' ')
- --end;
- return end;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionVector.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionVector.java
deleted file mode 100644
index 1d1e312d3..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionVector.java
+++ /dev/null
@@ -1,337 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.io.Serializable;
-
-/**
- * The VersionVector represents an array of Comparable objects. The array can be
- * nested since a VersionVector is Comparable in itself.
- *
- * @Immutable
- */
-public class VersionVector implements Comparable<VersionVector>, Serializable {
-
- interface MinMaxComparable extends Comparable<Object>, Serializable {
- //
- }
-
- private static final class MaxStringValue implements MinMaxComparable {
- private static final long serialVersionUID = -4936252230441132767L;
-
- MaxStringValue() {
- // Empty constructor
- }
-
- public int compareTo(Object o) {
- return o == this ? 0 : (o == MAX_VALUE || o instanceof Integer || o instanceof VersionVector ? -1 : 1);
- }
-
- // For singleton deserialization
- private Object readResolve() {
- return MAXS_VALUE;
- }
-
- public String toString() {
- return "m"; //$NON-NLS-1$
- }
- }
-
- private static final class MaxValue implements MinMaxComparable {
- private static final long serialVersionUID = -5889641741635253589L;
-
- MaxValue() {
- // Empty constructor
- }
-
- public int compareTo(Object o) {
- return o == this ? 0 : 1;
- }
-
- // For singleton deserialization
- private Object readResolve() {
- return MAX_VALUE;
- }
-
- public String toString() {
- return "M"; //$NON-NLS-1$
- }
- }
-
- private static class MinValue implements MinMaxComparable {
- private static final long serialVersionUID = -1066323980049812226L;
-
- MinValue() {
- // Empty constructor
- }
-
- public int compareTo(Object o) {
- return o == this ? 0 : -1;
- }
-
- private Object readResolve() {
- return MIN_VALUE;
- }
-
- public String toString() {
- return "-M"; //$NON-NLS-1$
- }
- }
-
- /**
- * A value that is greater then any other value
- */
- public static final Comparable<Object> MAX_VALUE = new MaxValue();
-
- /**
- * A value that is greater then any string but less then {@link #MAX_VALUE} and
- * any Integer or VersionVector.
- */
- public static final Comparable<Object> MAXS_VALUE = new MaxStringValue();
-
- /**
- * A value that is less then any other value
- */
- public static final Comparable<Object> MIN_VALUE = new MinValue();
-
- /**
- * A value that is greater then {@link #MIN_VALUE} and less then any string,
- * Integer, or VersionVector (a.k.a. empty_string)
- */
- public static final String MINS_VALUE = ""; //$NON-NLS-1$
-
- private static final long serialVersionUID = -8385373304298723744L;
-
- static int compare(Comparable<?>[] vectorA, Comparable<?> padA, Comparable<?>[] vectorB, Comparable<?> padB) {
- int top = vectorA.length;
- if (top > vectorB.length)
- top = vectorB.length;
-
- for (int idx = 0; idx < top; ++idx) {
- int cmp = compareSegments(vectorA[idx], vectorB[idx]);
- if (cmp != 0)
- return cmp;
- }
-
- // All elements compared equal up to this point. Check
- // pad values
- if (top < vectorA.length)
- return (padB == null) ? 1 : compareReminder(top, vectorA, padA, padB);
-
- if (top < vectorB.length)
- return (padA == null) ? -1 : -compareReminder(top, vectorB, padB, padA);
-
- // Lengths are equal. Compare pad values
- return padA == null ? (padB == null ? 0 : -1) : (padB == null ? 1 : compareSegments(padA, padB));
- }
-
- static boolean equals(Comparable<?>[] vectorA, Comparable<?> padValueA, Comparable<?>[] vectorB, Comparable<?> padValueB) {
- // We compare pad first since it is impossible for versions with
- // different pad to be equal (versions are padded to infinity)
- if (padValueA == null) {
- if (padValueB != null)
- return false;
- } else {
- if (padValueB == null || !padValueA.equals(padValueB))
- return false;
- }
-
- int idx = vectorA.length;
-
- // If the length of the vector differs, the versions cannot be equal
- // since segments equal to pad are stripped by the parser
- if (idx != vectorB.length)
- return false;
-
- while (--idx >= 0)
- if (!vectorA[idx].equals(vectorB[idx]))
- return false;
-
- return true;
- }
-
- static int hashCode(Comparable<?>[] vector, Comparable<?> padValue) {
- int hashCode = padValue == null ? 31 : padValue.hashCode();
- int idx = vector.length;
- while (--idx >= 0) {
- Object elem = vector[idx];
- if (elem != null)
- hashCode += elem.hashCode();
- hashCode = hashCode * 31;
- }
- return hashCode;
- }
-
- static void toString(StringBuffer sb, Comparable<?>[] vector, Comparable<?> padValue, boolean rangeSafe) {
- int top = vector.length;
- if (top == 0)
- // Write one pad value as explicit. It will be considered
- // redundant and removed by the parser but the raw format
- // does not allow zero elements
- VersionFormat.rawToString(sb, rangeSafe, padValue == null ? MIN_VALUE : padValue);
- else {
- for (int idx = 0; idx < top; ++idx) {
- if (idx > 0)
- sb.append('.');
- VersionFormat.rawToString(sb, rangeSafe, vector[idx]);
- }
- }
- if (padValue != null) {
- sb.append('p');
- VersionFormat.rawToString(sb, rangeSafe, padValue);
- }
- }
-
- private static int compareReminder(int idx, Comparable<?>[] vector, Comparable<?> padValue, Comparable<?> othersPad) {
- int cmp;
- for (cmp = 0; idx < vector.length && cmp == 0; ++idx)
- cmp = compareSegments(vector[idx], othersPad);
- if (cmp == 0)
- cmp = (padValue == null) ? -1 : compareSegments(padValue, othersPad);
- return cmp;
- }
-
- static int compareSegments(Comparable<?> a, Comparable<?> b) {
- if (a == b)
- return 0;
-
- if (a instanceof Integer && b instanceof Integer) {
- int ai = ((Integer) a).intValue();
- int bi = ((Integer) b).intValue();
- return ai > bi ? 1 : (ai < bi ? -1 : 0);
- }
-
- if (a instanceof String && b instanceof String)
- return ((String) a).compareTo((String) b);
-
- if (a == MAX_VALUE || a == MIN_VALUE || a == MAXS_VALUE)
- return ((MinMaxComparable) a).compareTo(b);
-
- if (b == MAX_VALUE || b == MIN_VALUE || b == MAXS_VALUE)
- return -((MinMaxComparable) b).compareTo(a);
-
- if (a instanceof Integer)
- return 1;
- if (b instanceof Integer)
- return -1;
- if (a instanceof VersionVector)
- return (b instanceof VersionVector) ? ((VersionVector) a).compareTo((VersionVector) b) : 1;
-
- if (b instanceof VersionVector)
- return -1;
-
- throw new IllegalArgumentException();
- }
-
- private final Comparable<?> padValue;
-
- private final Comparable<?>[] vector;
-
- public VersionVector(Comparable<?>[] vector, Comparable<?> pad) {
- this.vector = vector;
- this.padValue = (pad == MIN_VALUE) ? null : pad;
- }
-
- public int compareTo(VersionVector ov) {
- if (ov == this)
- return 0;
-
- return compare(vector, padValue, ov.vector, ov.padValue);
- }
-
- public boolean equals(Object o) {
- if (o == this)
- return true;
-
- if (!(o instanceof VersionVector))
- return false;
-
- VersionVector ov = (VersionVector) o;
- return equals(vector, padValue, ov.vector, ov.padValue);
- }
-
- /**
- * Returns the pad value used when comparing this versions to
- * versions that has a raw vector with a larger number of elements
- * @return The pad value or <code>null</code> if not set.
- */
- public Comparable<?> getPad() {
- return padValue;
- }
-
- /**
- * An element from the raw vector
- * @param index The zero based index of the desired element
- * @return An element from the raw vector
- */
- public Comparable<?> getSegment(int index) {
- return vector[index];
- }
-
- /**
- * Returns the number of elements in the raw vector
- * @return The element count
- */
- public int getSegmentCount() {
- return vector.length;
- }
-
- /**
- * This method is package protected since it violates the immutable
- * contract.
- * @return The raw vector. Must be treated as read-only
- */
- Comparable<?>[] getVector() {
- return vector;
- }
-
- public int hashCode() {
- return hashCode(vector, padValue);
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- toString(sb);
- return sb.toString();
- }
-
- /**
- * Append the string representation of this instance to the
- * <code>sb</code> buffer.
- * @param sb The buffer to append to
- */
- public void toString(StringBuffer sb) {
- toString(sb, vector, padValue, false);
- }
-
- /**
- * Append the string representation of this instance to the
- * <code>sb</code> buffer.
- * @param sb The buffer to append to
- * @param rangeSafe If <code>true</code>, the range delimiters will be escaped
- * with backslash.
- */
- void toString(StringBuffer sb, boolean rangeSafe) {
- toString(sb, vector, padValue, rangeSafe);
- }
-
- private Object readResolve() {
- VersionVector vv = this;
- // Preserve the emptyString singleton
- int idx = vector.length;
- while (--idx >= 0)
- if (MINS_VALUE.equals(vector[idx]))
- vector[idx] = MINS_VALUE;
- if (MINS_VALUE.equals(padValue))
- vv = new VersionVector(vector, MINS_VALUE);
- return vv;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/All.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/All.java
deleted file mode 100644
index 4de975525..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/All.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * A collection filter that yields true if the <code>filter</code> yields true for
- * all of the elements of the <code>collection</code>
- */
-final class All extends CollectionFilter {
- All(Expression collection, LambdaExpression lambda) {
- super(collection, lambda);
- }
-
- protected Object evaluate(IEvaluationContext context, Iterator<?> itor) {
- Variable variable = lambda.getItemVariable();
- while (itor.hasNext()) {
- variable.setValue(context, itor.next());
- if (lambda.evaluate(context) != Boolean.TRUE)
- return Boolean.FALSE;
- }
- return Boolean.TRUE;
- }
-
- public int getExpressionType() {
- return TYPE_ALL;
- }
-
- public String getOperator() {
- return KEYWORD_ALL;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/And.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/And.java
deleted file mode 100644
index 7e8adf20e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/And.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * n-ary AND operator. The full evaluation is <code>true</code> if all its operands evaluate to
- * <code>true</code>.
- */
-final class And extends NAry {
- And(Expression[] operands) {
- super(assertLength(operands, 2, OPERATOR_AND));
- }
-
- public Object evaluate(IEvaluationContext context) {
- for (int idx = 0; idx < operands.length; ++idx) {
- if (operands[idx].evaluate(context) != Boolean.TRUE)
- return Boolean.FALSE;
- }
- return Boolean.TRUE;
- }
-
- public int getExpressionType() {
- return TYPE_AND;
- }
-
- public String getOperator() {
- return OPERATOR_AND;
- }
-
- public int getPriority() {
- return PRIORITY_AND;
- }
-
- public void toLDAPString(StringBuffer buf) {
- buf.append("(&"); //$NON-NLS-1$
- for (int idx = 0; idx < operands.length; ++idx)
- operands[idx].toLDAPString(buf);
- buf.append(')');
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Array.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Array.java
deleted file mode 100644
index 9095f5522..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Array.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An array of expressions
- */
-final class Array extends NAry {
- final class ArrayIterator implements Iterator<Object> {
- private final IEvaluationContext context;
-
- private int pos = -1;
-
- public ArrayIterator(IEvaluationContext context) {
- this.context = context;
- }
-
- public boolean hasNext() {
- return pos + 1 < operands.length;
- }
-
- public Object next() {
- if (++pos >= operands.length) {
- --pos;
- throw new NoSuchElementException();
- }
- return operands[pos].evaluate(context);
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- }
-
- Array(Expression[] operands) {
- super(assertLength(operands, 0, OPERATOR_ARRAY));
- }
-
- public Object evaluate(IEvaluationContext context) {
- return evaluateAsIterator(context);
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- return new ArrayIterator(context);
- }
-
- public int getExpressionType() {
- return TYPE_ARRAY;
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- bld.append('[');
- elementsToString(bld, rootVariable, operands);
- bld.append(']');
- }
-
- public String getOperator() {
- return OPERATOR_ARRAY;
- }
-
- public int getPriority() {
- return PRIORITY_FUNCTION;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Assignment.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Assignment.java
deleted file mode 100644
index 130f1f531..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Assignment.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An expression representing a variable stack in the current thread.
- */
-class Assignment extends Binary {
- Assignment(Variable variable, Expression expression) {
- super(variable, expression);
- }
-
- public final Object evaluate(IEvaluationContext context) {
- Object value = rhs.evaluate(context);
- context.setValue(lhs, value);
- return value;
- }
-
- public int getExpressionType() {
- return TYPE_ASSIGNMENT;
- }
-
- public int getPriority() {
- return IExpressionConstants.PRIORITY_ASSIGNMENT;
- }
-
- public String getOperator() {
- return OPERATOR_ASSIGN;
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- Iterator<?> value = rhs.evaluateAsIterator(context);
- context.setValue(lhs, value);
- return value;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/At.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/At.java
deleted file mode 100644
index dddcdb9fb..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/At.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.metadata.expression.Member.DynamicMember;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-
-/**
- * This class represents indexed or keyed access to an indexed collection
- * or a map.
- */
-class At extends Binary {
- protected At(Expression lhs, Expression rhs) {
- super(lhs, rhs);
- }
-
- public Object evaluate(org.eclipse.equinox.p2.metadata.expression.IEvaluationContext context) {
- Object lval;
- if (lhs instanceof DynamicMember) {
- DynamicMember lm = (DynamicMember) lhs;
- Object instance = lm.operand.evaluate(context);
- if (instance instanceof IInstallableUnit) {
- String name = lm.getName();
- if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES == name || InstallableUnit.MEMBER_PROFILE_PROPERTIES == name) {
- IIndexProvider<?> indexProvider = context.getIndexProvider();
- if (indexProvider == null)
- throw new UnsupportedOperationException("No managed properties available to QL"); //$NON-NLS-1$
- return indexProvider.getManagedProperty(instance, name, rhs.evaluate(context));
- }
- if (InstallableUnit.MEMBER_PROPERTIES == name) {
- // Avoid full copy of the properties map just to get one member
- return ((IInstallableUnit) instance).getProperty((String) rhs.evaluate(context));
- }
- }
- lval = lm.invoke(instance);
- } else
- lval = lhs.evaluate(context);
-
- Object rval = rhs.evaluate(context);
- if (lval == null)
- throw new IllegalArgumentException("Unable to use [] on null"); //$NON-NLS-1$
-
- if (lval instanceof Map<?, ?>)
- return ((Map<?, ?>) lval).get(rval);
-
- if (rval instanceof Number) {
- if (lval instanceof List<?>)
- return ((List<?>) lval).get(((Number) rval).intValue());
- if (lval != null && lval.getClass().isArray())
- return ((Object[]) lval)[((Number) rval).intValue()];
- }
-
- if (lval instanceof Dictionary<?, ?>)
- return ((Dictionary<?, ?>) lval).get(rval);
-
- throw new IllegalArgumentException("Unable to use [] on a " + lval.getClass().getName()); //$NON-NLS-1$
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- Object value = evaluate(context);
- if (!(value instanceof Iterator<?>))
- value = RepeatableIterator.create(value);
- return (Iterator<?>) value;
- }
-
- public int getExpressionType() {
- return TYPE_AT;
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- appendOperand(bld, rootVariable, lhs, getPriority());
- bld.append('[');
- appendOperand(bld, rootVariable, rhs, PRIORITY_MAX);
- bld.append(']');
- }
-
- public String getOperator() {
- return OPERATOR_AT;
- }
-
- public int getPriority() {
- return PRIORITY_MEMBER;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Binary.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Binary.java
deleted file mode 100644
index f4f7da504..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Binary.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.internal.p2.metadata.expression.Member.DynamicMember;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.expression.IExpressionVisitor;
-
-/**
- * The abstract base class for all binary operations
- */
-public abstract class Binary extends Expression {
- public final Expression lhs;
-
- public final Expression rhs;
-
- protected Binary(Expression lhs, Expression rhs) {
- this.lhs = lhs;
- this.rhs = rhs;
- }
-
- public boolean accept(IExpressionVisitor visitor) {
- return super.accept(visitor) && lhs.accept(visitor) && rhs.accept(visitor);
- }
-
- public int compareTo(Expression e) {
- int cmp = super.compareTo(e);
- if (cmp == 0) {
- Binary be = (Binary) e;
- cmp = lhs.compareTo(be.lhs);
- if (cmp == 0)
- cmp = rhs.compareTo(be.rhs);
- }
- return cmp;
- }
-
- public boolean equals(Object o) {
- if (super.equals(o)) {
- Binary bo = (Binary) o;
- return lhs.equals(bo.lhs) && rhs.equals(bo.rhs);
- }
- return false;
- }
-
- public int getPriority() {
- return PRIORITY_BINARY; // Default priority
- }
-
- public int hashCode() {
- int result = 31 + lhs.hashCode();
- return 31 * result + rhs.hashCode();
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- appendOperand(bld, rootVariable, lhs, getPriority());
- bld.append(' ');
- bld.append(getOperator());
- bld.append(' ');
- appendOperand(bld, rootVariable, rhs, getPriority());
- }
-
- /**
- * Appends the LDAP filter attribute name from the lhs expression if
- * possible.
- * @throws UnsupportedOperationException when this expression does not conform to an
- * LDAP filter binary expression
- */
- void appendLDAPAttribute(StringBuffer buf) {
- if (lhs instanceof DynamicMember) {
- DynamicMember attr = (DynamicMember) lhs;
- if (attr.operand instanceof Variable) {
- buf.append(attr.getName());
- return;
- }
- }
- throw new UnsupportedOperationException();
- }
-
- private static char hexChar(int value) {
- return (char) (value < 10 ? ('0' + value) : ('a' + (value - 10)));
- }
-
- static void appendLDAPEscaped(StringBuffer bld, String str) {
- appendLDAPEscaped(bld, str, true);
- }
-
- static void appendLDAPEscaped(StringBuffer bld, String str, boolean escapeWild) {
- int top = str.length();
- for (int idx = 0; idx < top; ++idx) {
- char c = str.charAt(idx);
- if (!escapeWild) {
- if (c == '*') {
- bld.append(c);
- continue;
- } else if (c == '\\' && idx + 1 < top && str.charAt(idx + 1) == '*') {
- bld.append("\\2a"); //$NON-NLS-1$
- ++idx;
- continue;
- }
- }
- if (c == '(' || c == ')' || c == '*' || c == '\\' || c < ' ' || c > 127) {
- short cs = (short) c;
- bld.append('\\');
- bld.append(hexChar((cs & 0x00f0) >> 4));
- bld.append(hexChar(cs & 0x000f));
- } else
- bld.append(c);
- }
- }
-
- /**
- * Appends the LDAP filter value from the rhs expression if
- * possible.
- * @throws UnsupportedOperationException when this expression does not conform to an
- * LDAP filter binary expression
- */
- void appendLDAPValue(StringBuffer buf) {
- if (rhs instanceof Literal) {
- Object value = rhs.evaluate(null);
- if (value instanceof String || value instanceof Version) {
- appendLDAPEscaped(buf, value.toString());
- return;
- }
- }
- throw new UnsupportedOperationException();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/BooleanFunction.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/BooleanFunction.java
deleted file mode 100644
index 6749180f1..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/BooleanFunction.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-
-
-/**
- * A function that obtains a class based on a String
- */
-public final class BooleanFunction extends Function {
-
- public BooleanFunction(Expression[] operands) {
- super(assertLength(operands, 1, 1, KEYWORD_BOOLEAN));
- }
-
- boolean assertSingleArgumentClass(Object v) {
- return v instanceof String || v instanceof Boolean;
- }
-
- Object createInstance(Object arg) {
- if (arg instanceof String)
- return Boolean.valueOf("true".equalsIgnoreCase((String) arg)); //$NON-NLS-1$
- if (arg instanceof Boolean)
- return arg;
- return Boolean.FALSE;
- }
-
- public String getOperator() {
- return KEYWORD_BOOLEAN;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ClassFunction.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ClassFunction.java
deleted file mode 100644
index ddef52293..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ClassFunction.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-
-
-/**
- * A function that obtains a class based on a String
- */
-public final class ClassFunction extends Function {
-
- public ClassFunction(Expression[] operands) {
- super(assertLength(operands, 1, 1, KEYWORD_CLASS));
- }
-
- boolean assertSingleArgumentClass(Object v) {
- return v instanceof String;
- }
-
- Object createInstance(Object arg) {
- try {
- return Class.forName((String) arg);
- } catch (ClassNotFoundException e) {
- throw new IllegalArgumentException(e.getMessage());
- }
- }
-
- public String getOperator() {
- return KEYWORD_CLASS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java
deleted file mode 100644
index 6a017aea3..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java
+++ /dev/null
@@ -1,392 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Constructor;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.Comparator;
-import org.eclipse.equinox.internal.p2.metadata.MetadataActivator;
-import org.eclipse.equinox.p2.metadata.Version;
-
-/**
- * A comparator that performs coercion if needed before comparison.
- * @param <T> The type for the comparator.
- */
-public abstract class CoercingComparator<T> {
- static class BooleanCoercer extends CoercingComparator<Boolean> {
- public int compare(Boolean o1, Boolean o2) {
- return o1.booleanValue() == o2.booleanValue() ? 0 : (o1.booleanValue() ? 1 : -1);
- }
-
- @Override
- Boolean coerce(Object v) {
- if (v instanceof Boolean)
- return (Boolean) v;
- if (v instanceof String) {
- String sv = ((String) v).trim();
- if (sv.equalsIgnoreCase("true")) //$NON-NLS-1$
- return Boolean.TRUE;
- if (sv.equalsIgnoreCase("false")) //$NON-NLS-1$
- return Boolean.FALSE;
- }
- throw uncoercable(v);
- }
-
- @Override
- Class<Boolean> getCoerceClass() {
- return Boolean.class;
- }
-
- @Override
- int getCoercePrio() {
- return 7;
- }
- }
-
- static class ClassCoercer extends CoercingComparator<Class<?>> {
- public int compare(Class<?> o1, Class<?> o2) {
- return o1.getName().compareTo(o2.getName());
- }
-
- @Override
- Class<?> coerce(Object v) {
- if (v instanceof Class<?>)
- return (Class<?>) v;
- if (v instanceof String) {
- try {
- return MetadataActivator.getContext().getBundle().loadClass(((String) v).trim());
- } catch (Exception e) {
- //
- }
- }
- throw uncoercable(v);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- Class<Class<?>> getCoerceClass() {
- Class<?> cls = Class.class;
- return (Class<Class<?>>) cls;
- }
-
- @Override
- int getCoercePrio() {
- return 11;
- }
- }
-
- static class FromStringCoercer<T extends Comparable<Object>> extends CoercingComparator<T> {
- private final Class<T> coerceClass;
- private final Constructor<T> constructor;
-
- public FromStringCoercer(Class<T> coerceClass, Constructor<T> constructor) {
- this.coerceClass = coerceClass;
- this.constructor = constructor;
- }
-
- @Override
- T coerce(Object v) {
- if (v instanceof String) {
- try {
- return constructor.newInstance(new Object[] {((String) v).trim()});
- } catch (Exception e) {
- //
- }
- }
- throw uncoercable(v);
- }
-
- @Override
- int compare(T o1, T o2) {
- return o1.compareTo(o2);
- }
-
- @Override
- Class<T> getCoerceClass() {
- return coerceClass;
- }
-
- @Override
- int getCoercePrio() {
- return 0;
- }
- }
-
- static class IntegerCoercer extends CoercingComparator<Integer> {
- public int compare(Integer o1, Integer o2) {
- return o1.compareTo(o2);
- }
-
- @Override
- Integer coerce(Object v) {
- if (v instanceof Integer)
- return (Integer) v;
- if (v instanceof Number)
- return new Integer(((Number) v).intValue());
- if (v instanceof String) {
- try {
- return Integer.valueOf(((String) v).trim());
- } catch (NumberFormatException e) {
- //
- }
- }
- throw uncoercable(v);
- }
-
- @Override
- Class<Integer> getCoerceClass() {
- return Integer.class;
- }
-
- @Override
- int getCoercePrio() {
- return 6;
- }
- }
-
- static class LongCoercer extends CoercingComparator<Long> {
- public int compare(Long o1, Long o2) {
- return o1.compareTo(o2);
- }
-
- @Override
- Long coerce(Object v) {
- if (v instanceof Long)
- return (Long) v;
- if (v instanceof Number)
- return new Long(((Number) v).longValue());
- if (v instanceof String) {
- try {
- return Long.valueOf(((String) v).trim());
- } catch (NumberFormatException e) {
- //
- }
- }
- throw uncoercable(v);
- }
-
- @Override
- Class<Long> getCoerceClass() {
- return Long.class;
- }
-
- @Override
- int getCoercePrio() {
- return 5;
- }
- }
-
- static class StringCoercer extends CoercingComparator<String> {
- public int compare(String o1, String o2) {
- return o1.compareTo(o2);
- }
-
- @Override
- String coerce(Object v) {
- if (v instanceof Class<?>)
- return ((Class<?>) v).getName();
- return v.toString();
- }
-
- @Override
- Class<String> getCoerceClass() {
- return String.class;
- }
-
- @Override
- int getCoercePrio() {
- return 10;
- }
- }
-
- static class VersionCoercer extends CoercingComparator<Version> {
- public int compare(Version o1, Version o2) {
- return o1.compareTo(o2);
- }
-
- boolean canCoerceTo(Class<?> cls) {
- return Version.class.isAssignableFrom(cls);
- }
-
- @Override
- Version coerce(Object v) {
- if (v instanceof Version)
- return (Version) v;
- if (v instanceof String)
- return Version.create((String) v);
- if (v instanceof String) {
- try {
- return Version.create((String) v);
- } catch (NumberFormatException e) {
- //
- }
- }
- throw uncoercable(v);
- }
-
- @Override
- Class<Version> getCoerceClass() {
- return Version.class;
- }
-
- @Override
- int getCoercePrio() {
- return 1;
- }
- }
-
- private static class SetAccessibleAction implements PrivilegedAction<Object> {
- private final AccessibleObject accessible;
-
- SetAccessibleAction(AccessibleObject accessible) {
- this.accessible = accessible;
- }
-
- public Object run() {
- accessible.setAccessible(true);
- return null;
- }
- }
-
- private static CoercingComparator<?>[] coercers = {new ClassCoercer(), new BooleanCoercer(), new LongCoercer(), new IntegerCoercer(), new VersionCoercer(), new StringCoercer()};
-
- private static final Class<?>[] constructorType = new Class<?>[] {String.class};
-
- /**
- * Finds the comparator for <code>a</code> and <code>b</code> and delegates the coercion/comparison to the comparator
- * according to priority.
- * @param o1 the first object to be compared.
- * @param o2 the second object to be compared.
- * @return The result of the comparison
- * @throws IllegalArgumentException if no comparator was found or if coercion was impossible
- * @see Comparator#compare(Object, Object)
- */
- @SuppressWarnings({"unchecked", "rawtypes"})
- public static <TA extends Object, TB extends Object> int coerceAndCompare(TA o1, TB o2) throws IllegalArgumentException {
- if (o1 == null || o2 == null)
- throw new IllegalArgumentException("Cannot compare null to anything"); //$NON-NLS-1$
-
- if (o1 instanceof Comparable && o1.getClass().isAssignableFrom(o2.getClass()))
- return ((Comparable) o1).compareTo(o2);
-
- if (o2 instanceof Comparable && o2.getClass().isAssignableFrom(o1.getClass()))
- return -((Comparable) o2).compareTo(o1);
-
- CoercingComparator<TA> ca = getComparator(o1, o2);
- CoercingComparator<TB> cb = getComparator(o2, o1);
- return ca.getCoercePrio() <= cb.getCoercePrio() ? ca.compare(o1, ca.coerce(o2)) : cb.compare(cb.coerce(o1), o2);
- }
-
- /**
- * Finds the comparator for <code>a</code> and <code>b</code> and delegates the coercion/equal to the comparator
- * according to priority.
- * @param o1 the first object to be compared.
- * @param o2 the second object to be compared.
- * @return The result of the equality test
- * @throws IllegalArgumentException if no comparator was found or if coercion was impossible
- * @see Object#equals(Object)
- */
- public static <TA extends Object, TB extends Object> boolean coerceAndEquals(TA o1, TB o2) throws IllegalArgumentException {
- if (o1 == o2)
- return true;
-
- if (o1 == null || o2 == null)
- return false;
-
- if (o1.getClass() != o2.getClass()) {
- if (o1.getClass().isAssignableFrom(o2.getClass()))
- return o1.equals(o2);
- if (o2.getClass().isAssignableFrom(o1.getClass()))
- return o2.equals(o1);
- try {
- CoercingComparator<TA> ca = getComparator(o1, o2);
- CoercingComparator<TB> cb = getComparator(o2, o1);
- return ca.getCoercePrio() <= cb.getCoercePrio() ? o1.equals(ca.coerce(o2)) : o2.equals(cb.coerce(o1));
- } catch (IllegalArgumentException e) {
- //
- }
- }
- return o1.equals(o2);
- }
-
- /**
- * Obtains the coercing comparator for the given <code>value</code>.
- * @param value The value
- * @return The coercing comparator
- */
- @SuppressWarnings("unchecked")
- public static <V extends Object> CoercingComparator<V> getComparator(V value, Object v2) {
- Class<V> vClass = (Class<V>) value.getClass();
- CoercingComparator<?>[] carr = coercers;
- int idx = carr.length;
- while (--idx >= 0) {
- CoercingComparator<?> c = carr[idx];
- if (c.canCoerceTo(vClass)) {
- CoercingComparator<V> cv = (CoercingComparator<V>) c;
- return cv;
- }
- }
-
- if (value instanceof Comparable<?> && v2 instanceof String) {
- Class<Comparable<Object>> cClass = (Class<Comparable<Object>>) vClass;
- Constructor<Comparable<Object>> constructor;
- try {
- constructor = cClass.getConstructor(constructorType);
- if (!constructor.isAccessible())
- AccessController.doPrivileged(new SetAccessibleAction(constructor));
- synchronized (CoercingComparator.class) {
- int top = coercers.length;
- CoercingComparator<?>[] nc = new CoercingComparator<?>[top + 1];
- System.arraycopy(coercers, 0, nc, 1, top);
- CoercingComparator<V> cv = (CoercingComparator<V>) new FromStringCoercer<Comparable<Object>>(cClass, constructor);
- nc[0] = cv;
- coercers = nc;
- return cv;
- }
- } catch (Exception e) {
- //
- }
- }
- throw new IllegalArgumentException("No comparator for " + vClass.getName()); //$NON-NLS-1$
- }
-
- protected IllegalArgumentException uncoercable(Object v) {
- StringBuffer sb = new StringBuffer("Cannot coerce "); //$NON-NLS-1$
- if (v instanceof String) {
- sb.append('\'');
- sb.append(v);
- sb.append('\'');
- } else if (v instanceof Number) {
- sb.append("number "); //$NON-NLS-1$
- sb.append(v);
- } else {
- sb.append("an object of instance "); //$NON-NLS-1$
- sb.append(v.getClass().getName());
- }
- sb.append(" into a "); //$NON-NLS-1$
- sb.append(getCoerceClass().getName());
- return new IllegalArgumentException(sb.toString());
- }
-
- boolean canCoerceTo(Class<?> cls) {
- return cls == getCoerceClass();
- }
-
- abstract T coerce(Object v);
-
- abstract int compare(T o1, T o2);
-
- abstract Class<T> getCoerceClass();
-
- abstract int getCoercePrio();
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Collect.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Collect.java
deleted file mode 100644
index 5cd8a4177..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Collect.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-
-/**
- */
-final class Collect extends CollectionFilter {
- final class CollectIterator implements Iterator<Object> {
- private final IEvaluationContext context;
-
- private final IExpression variable;
-
- private final Iterator<?> innerIterator;
-
- public CollectIterator(IEvaluationContext context, Iterator<?> iterator) {
- this.context = context;
- this.variable = lambda.getItemVariable();
- this.innerIterator = iterator;
- }
-
- public boolean hasNext() {
- return innerIterator.hasNext();
- }
-
- public Object next() {
- context.setValue(variable, innerIterator.next());
- return lambda.evaluate(context);
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- }
-
- Collect(Expression collection, LambdaExpression lambda) {
- super(collection, lambda);
- }
-
- public Object evaluate(IEvaluationContext context, Iterator<?> itor) {
- return evaluateAsIterator(context, itor);
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context, Iterator<?> itor) {
- return new CollectIterator(context, itor);
- }
-
- public int getExpressionType() {
- return TYPE_COLLECT;
- }
-
- public String getOperator() {
- return KEYWORD_COLLECT;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CollectionFilter.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CollectionFilter.java
deleted file mode 100644
index f4d320149..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CollectionFilter.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpressionVisitor;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-
-/**
- * Some kind of operation that is performed for each element of a collection. I.e.
- * <code>x.&lt;operation&gt;(y | &lt;expression&rt;)</code>
- */
-public abstract class CollectionFilter extends Unary {
- public static void appendProlog(StringBuffer bld, Variable rootVariable, Expression lhs, String operator) {
- if (lhs != rootVariable) {
- appendOperand(bld, rootVariable, lhs, PRIORITY_COLLECTION);
- bld.append('.');
- }
- bld.append(operator);
- bld.append('(');
- }
-
- public final LambdaExpression lambda;
-
- protected CollectionFilter(Expression collection, LambdaExpression lambda) {
- super(collection);
- this.lambda = lambda;
- }
-
- public boolean accept(IExpressionVisitor visitor) {
- return super.accept(visitor) && lambda.accept(visitor);
- }
-
- public int compareTo(Expression e) {
- int cmp = super.compareTo(e);
- if (cmp == 0)
- cmp = lambda.compareTo(((CollectionFilter) e).lambda);
- return cmp;
- }
-
- public boolean equals(Object o) {
- return super.equals(o) && lambda.equals(((CollectionFilter) o).lambda);
- }
-
- public final Object evaluate(IEvaluationContext context) {
- Iterator<?> lval = getInnerIterator(context);
- context = lambda.prolog(context);
- return evaluate(context, lval);
- }
-
- public final Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- Iterator<?> lval = getInnerIterator(context);
- context = lambda.prolog(context);
- return evaluateAsIterator(context, lval);
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- appendProlog(bld, rootVariable, operand, getOperator());
- appendOperand(bld, rootVariable, lambda, PRIORITY_LAMBDA);
- bld.append(')');
- }
-
- public int hashCode() {
- int result = 31 + operand.hashCode();
- return 31 * result + lambda.hashCode();
- }
-
- public int getPriority() {
- return PRIORITY_COLLECTION;
- }
-
- protected abstract Object evaluate(final IEvaluationContext context, Iterator<?> iterator);
-
- protected Iterator<?> evaluateAsIterator(IEvaluationContext context, Iterator<?> iterator) {
- throw new UnsupportedOperationException();
- }
-
- private transient IIndexProvider<?> lastIndexProvider;
- private transient IIndex<?> lastIndex;
-
- private IIndex<?> getIndex(Class<?> elementClass, IIndexProvider<?> indexProvider) {
- if (lastIndexProvider == indexProvider)
- return lastIndex;
-
- for (String member : getIndexCandidateMembers(elementClass, lambda.getItemVariable(), lambda.getOperand())) {
- IIndex<?> index = indexProvider.getIndex(member);
- if (index != null)
- lastIndex = index;
- }
- lastIndexProvider = indexProvider;
- return lastIndex;
- }
-
- protected Iterator<?> getInnerIterator(IEvaluationContext context) {
- Object collection = operand.evaluate(context);
- if (collection instanceof Everything<?>) {
- // Try to find an index
- //
- IIndexProvider<?> indexProvider = context.getIndexProvider();
- if (indexProvider != null) {
- Class<?> elementClass = ((Everything<?>) collection).getElementClass();
- IIndex<?> index = getIndex(elementClass, indexProvider);
- if (index != null) {
- Iterator<?> indexed = index.getCandidates(context, lambda.getItemVariable(), lambda.getOperand());
- if (indexed != null)
- return indexed;
- }
- }
- }
-
- // No index. We need every element
- if (collection instanceof IRepeatableIterator<?>)
- return ((IRepeatableIterator<?>) collection).getCopy();
-
- Iterator<?> itor = RepeatableIterator.create(collection);
- if (operand instanceof Variable)
- ((Variable) operand).setValue(context, itor);
- return itor;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Compare.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Compare.java
deleted file mode 100644
index 7e958e41d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Compare.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * Comparisons for magnitude.
- */
-final class Compare extends Binary {
- static IllegalArgumentException uncomparable(Object lval, Object rval) {
- return new IllegalArgumentException("Cannot compare a " + lval.getClass().getName() + " to a " + rval.getClass().getName()); //$NON-NLS-1$//$NON-NLS-2$
- }
-
- final boolean compareLess;
-
- final boolean equalOK;
-
- Compare(Expression lhs, Expression rhs, boolean compareLess, boolean equalOK) {
- super(lhs, rhs);
- this.compareLess = compareLess;
- this.equalOK = equalOK;
- }
-
- public Object evaluate(IEvaluationContext context) {
- int cmpResult = CoercingComparator.coerceAndCompare(lhs.evaluate(context), rhs.evaluate(context));
- return Boolean.valueOf(cmpResult == 0 ? equalOK : (cmpResult < 0 ? compareLess : !compareLess));
- }
-
- public int getExpressionType() {
- return compareLess ? (equalOK ? TYPE_LESS_EQUAL : TYPE_LESS) : (equalOK ? TYPE_GREATER_EQUAL : TYPE_GREATER);
- }
-
- public String getOperator() {
- return compareLess ? (equalOK ? OPERATOR_LT_EQUAL : OPERATOR_LT) : (equalOK ? OPERATOR_GT_EQUAL : OPERATOR_GT);
- }
-
- public void toLDAPString(StringBuffer buf) {
- if (!equalOK)
- buf.append("(!"); //$NON-NLS-1$
- buf.append('(');
- appendLDAPAttribute(buf);
- if (equalOK)
- buf.append(compareLess ? OPERATOR_LT_EQUAL : OPERATOR_GT_EQUAL);
- else
- buf.append(compareLess ? OPERATOR_GT_EQUAL : OPERATOR_LT_EQUAL);
- appendLDAPValue(buf);
- buf.append(')');
- if (!equalOK)
- buf.append(')');
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CompoundIterator.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CompoundIterator.java
deleted file mode 100644
index 4aaf2a417..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CompoundIterator.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-/**
- * A CompoundIterator will assume that its contained iterator that will produce
- * elements that in turn can be represented as iterators. The elements of those
- * iterators will be returned in sequence, thus removing one iterator dimension.
- * Elements of the contained iterator that are not iterators will be coerced
- * into iterators using {@link RepeatableIterator#create(Object)}.
- */
-public class CompoundIterator<T> implements Iterator<T> {
- private static final Object NO_ELEMENT = new Object();
- private final Iterator<? extends Object> iteratorIterator;
- private Iterator<T> currentIterator;
-
- private T nextObject = noElement();
-
- /**
- * Creates a compound iterator that will iterated over the elements
- * of the provided <code>iterator</code>. Each element will be coerced
- * into an iterator and its elements in turn are returned
- * in succession by the compound iterator.
- *
- * @param iterator
- */
- public CompoundIterator(Iterator<? extends Object> iterator) {
- this.iteratorIterator = iterator;
- }
-
- public boolean hasNext() {
- return positionNext();
- }
-
- public T next() {
- if (!positionNext())
- throw new NoSuchElementException();
-
- T nxt = nextObject;
- nextObject = noElement();
- return nxt;
- }
-
- /**
- * Remove is not supported by this iterator so calling this method
- * will always yield an exception.
- * @throws UnsupportedOperationException
- */
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- @SuppressWarnings("unchecked")
- private boolean positionNext() {
- if (nextObject != NO_ELEMENT)
- return true;
-
- while (currentIterator == null || !currentIterator.hasNext()) {
- if (!iteratorIterator.hasNext())
- return false;
-
- Object nextItor = iteratorIterator.next();
- currentIterator = (nextItor instanceof Iterator<?>) ? (Iterator<T>) nextItor : RepeatableIterator.<T> create(nextItor);
- }
- nextObject = currentIterator.next();
- return true;
- }
-
- @SuppressWarnings("unchecked")
- private static <T> T noElement() {
- return (T) NO_ELEMENT;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Condition.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Condition.java
deleted file mode 100644
index a2b7cf224..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Condition.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * Comparisons for magnitude.
- */
-final class Condition extends Binary {
- final Expression ifFalse;
-
- Condition(Expression test, Expression ifTrue, Expression ifFalse) {
- super(test, ifTrue);
- this.ifFalse = ifFalse;
- }
-
- public boolean equals(Object o) {
- return super.equals(o) && ifFalse.equals(((Condition) o).ifFalse);
- }
-
- public Object evaluate(IEvaluationContext context) {
- return lhs.evaluate(context) == Boolean.TRUE ? rhs.evaluate(context) : ifFalse.evaluate(context);
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- return lhs.evaluate(context) == Boolean.TRUE ? rhs.evaluateAsIterator(context) : ifFalse.evaluateAsIterator(context);
- }
-
- public int hashCode() {
- return super.hashCode() * 31 + ifFalse.hashCode();
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- super.toString(bld, rootVariable);
- bld.append(' ');
- bld.append(OPERATOR_ELSE);
- bld.append(' ');
- appendOperand(bld, rootVariable, ifFalse, getPriority());
- }
-
- public int getExpressionType() {
- return TYPE_CONDITION;
- }
-
- public String getOperator() {
- return OPERATOR_IF;
- }
-
- public int getPriority() {
- return IExpressionConstants.PRIORITY_CONDITION;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ContextExpression.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ContextExpression.java
deleted file mode 100644
index f73dfe28e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ContextExpression.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.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-
-/**
- * The context expression is the top expression in context queries. It introduces the
- * variable 'everything' and initialized it with the iterator that represents all
- * available items.
- */
-public class ContextExpression<T> extends Unary implements IContextExpression<T> {
- private static final Object[] noParams = new Object[0];
- protected final Object[] parameters;
-
- public ContextExpression(Expression expression, Object[] parameters) {
- super(expression);
- this.parameters = parameters == null ? noParams : parameters;
- }
-
- public boolean accept(IExpressionVisitor visitor) {
- return super.accept(visitor) && operand.accept(visitor);
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- operand.toString(bld, rootVariable);
- }
-
- public IEvaluationContext createContext(Class<? extends T> elementClass, IIndexProvider<T> indexProvider) {
- Variable everything = ExpressionFactory.EVERYTHING;
- IEvaluationContext context = EvaluationContext.create(parameters, everything);
- context.setValue(everything, new Everything<T>(elementClass, indexProvider));
- context.setIndexProvider(indexProvider);
- return context;
- }
-
- public IEvaluationContext createContext(Class<? extends T> elementClass, Iterator<T> iterator) {
- Variable everything = ExpressionFactory.EVERYTHING;
- IEvaluationContext context = EvaluationContext.create(parameters, everything);
- context.setValue(everything, new Everything<T>(elementClass, iterator, operand));
- return context;
- }
-
- public int getExpressionType() {
- return 0;
- }
-
- public String getOperator() {
- throw new UnsupportedOperationException();
- }
-
- public int getPriority() {
- return operand.getPriority();
- }
-
- public Object[] getParameters() {
- return parameters;
- }
-
- public int hashCode() {
- return operand.hashCode();
- }
-
- @SuppressWarnings("unchecked")
- public Iterator<T> iterator(IEvaluationContext context) {
- return (Iterator<T>) evaluateAsIterator(context);
- }
-
- public void toString(StringBuffer bld) {
- toString(bld, ExpressionFactory.EVERYTHING);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CurryedLambdaExpression.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CurryedLambdaExpression.java
deleted file mode 100644
index fe01a945d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CurryedLambdaExpression.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpressionVisitor;
-
-/**
- * A function that executes some code
- */
-final class CurryedLambdaExpression extends LambdaExpression {
- private static final Assignment[] emptyAssignmentArray = new Assignment[0];
- private final Assignment[] assignments;
-
- CurryedLambdaExpression(Variable each, Assignment[] assignments, Expression body) {
- super(each, body);
- if (assignments == null)
- assignments = emptyAssignmentArray;
- this.assignments = assignments;
- }
-
- public boolean accept(IExpressionVisitor visitor) {
- if (super.accept(visitor) && each.accept(visitor)) {
- for (int idx = 0; idx < assignments.length; ++idx)
- if (!assignments[idx].accept(visitor))
- return false;
- return true;
- }
- return false;
- }
-
- public int compareTo(Expression e) {
- int cmp = super.compareTo(e);
- if (cmp == 0)
- cmp = compare(assignments, ((CurryedLambdaExpression) e).assignments);
- return cmp;
- }
-
- public boolean equals(Object o) {
- return super.equals(o) && equals(assignments, ((CurryedLambdaExpression) o).assignments);
- }
-
- public int hashCode() {
- return 31 * super.hashCode() + hashCode(assignments);
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- int top = assignments.length;
- if (top > 0) {
- for (int idx = 0; idx < top; ++idx) {
- appendOperand(bld, rootVariable, assignments[idx].rhs, IExpressionConstants.PRIORITY_COMMA);
- bld.append(", "); //$NON-NLS-1$
- }
- bld.append(OPERATOR_EACH);
- bld.append(", {"); //$NON-NLS-1$
- for (int idx = 0; idx < top; ++idx) {
- appendOperand(bld, rootVariable, assignments[idx].lhs, IExpressionConstants.PRIORITY_COMMA);
- bld.append(", "); //$NON-NLS-1$
- }
- }
- super.toString(bld, rootVariable);
- if (top > 0)
- bld.append('}');
- }
-
- public IEvaluationContext prolog(IEvaluationContext context) {
- IEvaluationContext lambdaContext;
- int top = assignments.length + 1;
- Variable[] vars = new Variable[top];
- vars[0] = getItemVariable();
- for (int idx = 1; idx < top; ++idx)
- vars[idx] = (Variable) assignments[idx - 1].lhs;
- lambdaContext = EvaluationContext.create(context, vars);
- for (int idx = 1; idx < top; ++idx)
- lambdaContext.setValue(vars[idx], assignments[idx - 1].rhs.evaluate(context));
- return lambdaContext;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Equals.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Equals.java
deleted file mode 100644
index 7452c3165..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Equals.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An expression that performs the == and != comparisons
- */
-final class Equals extends Binary {
- final boolean negate;
-
- Equals(Expression lhs, Expression rhs, boolean negate) {
- super(lhs, rhs);
- this.negate = negate;
- }
-
- public Object evaluate(IEvaluationContext context) {
- boolean result = CoercingComparator.coerceAndEquals(lhs.evaluate(context), rhs.evaluate(context));
- if (negate)
- result = !result;
- return Boolean.valueOf(result);
- }
-
- public int getExpressionType() {
- return negate ? TYPE_NOT_EQUALS : TYPE_EQUALS;
- }
-
- public String getOperator() {
- return negate ? OPERATOR_NOT_EQUALS : OPERATOR_EQUALS;
- }
-
- public void toLDAPString(StringBuffer buf) {
- if (negate)
- buf.append("(!"); //$NON-NLS-1$
- buf.append('(');
- appendLDAPAttribute(buf);
- buf.append('=');
- appendLDAPValue(buf);
- buf.append(')');
- if (negate)
- buf.append(')');
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/EvaluationContext.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/EvaluationContext.java
deleted file mode 100644
index 49e9bbcac..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/EvaluationContext.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-
-/**
- * Highly specialized evaluation contexts optimized for misc purposes
- */
-public class EvaluationContext implements IEvaluationContext {
- public static class SingleVariableContext extends EvaluationContext {
- private Object value;
-
- private final IExpression variable;
-
- public SingleVariableContext(EvaluationContext parentContext, IExpression variable, Object[] parameters) {
- super(parentContext, parameters);
- this.variable = variable;
- }
-
- public Object getValue(IExpression var) {
- return variable == var ? value : parentContext.getValue(var);
- }
-
- public void setValue(IExpression var, Object val) {
- if (variable == var)
- value = val;
- else
- parentContext.setValue(var, val);
- }
- }
-
- public static class MultiVariableContext extends EvaluationContext {
- private final Object[] values;
-
- public MultiVariableContext(EvaluationContext parentContext, IExpression[] variables, Object[] parameters) {
- super(parentContext, parameters);
- values = new Object[variables.length * 2];
- for (int idx = 0, ndx = 0; ndx < variables.length; ++ndx, idx += 2)
- values[idx] = variables[ndx];
- }
-
- public Object getValue(IExpression variable) {
- for (int idx = 0; idx < values.length; ++idx)
- if (values[idx++] == variable)
- return values[idx];
- return parentContext.getValue(variable);
- }
-
- public void setValue(IExpression variable, Object value) {
- for (int idx = 0; idx < values.length; ++idx)
- if (values[idx++] == variable) {
- values[idx] = value;
- return;
- }
- parentContext.setValue(variable, value);
- }
- }
-
- private static final Object[] noParameters = new Object[0];
-
- private static final EvaluationContext INSTANCE = new EvaluationContext(null, noParameters);
-
- public static IEvaluationContext create() {
- return INSTANCE;
- }
-
- public static IEvaluationContext create(IEvaluationContext parent, IExpression variable) {
- return new SingleVariableContext((EvaluationContext) parent, variable, ((EvaluationContext) parent).parameters);
- }
-
- public static IEvaluationContext create(IEvaluationContext parent, IExpression[] variables) {
- return create(parent, ((EvaluationContext) parent).parameters, variables);
- }
-
- public static IEvaluationContext create(IEvaluationContext parent, Object[] parameters, IExpression[] variables) {
- if (variables == null || variables.length == 0)
- return create(parent, parameters);
- if (parameters == null)
- parameters = noParameters;
- return variables.length == 1 ? new SingleVariableContext((EvaluationContext) parent, variables[0], parameters) : new MultiVariableContext((EvaluationContext) parent, variables, parameters);
- }
-
- public static IEvaluationContext create(IEvaluationContext parent, Object[] parameters) {
- if (parameters == null)
- parameters = noParameters;
- return new EvaluationContext((EvaluationContext) parent, parameters);
- }
-
- public static IEvaluationContext create(IExpression variable) {
- return new SingleVariableContext(INSTANCE, variable, noParameters);
- }
-
- public static IEvaluationContext create(IExpression[] variables) {
- return create(INSTANCE, noParameters, variables);
- }
-
- public static IEvaluationContext create(Object[] parameters, IExpression variable) {
- if (parameters == null)
- parameters = noParameters;
- return new SingleVariableContext(INSTANCE, variable, parameters);
- }
-
- public static IEvaluationContext create(Object[] parameters, IExpression[] variables) {
- return create(INSTANCE, parameters, variables);
- }
-
- final EvaluationContext parentContext;
-
- private final Object[] parameters;
-
- private IIndexProvider<?> indexProvider;
-
- EvaluationContext(EvaluationContext parentContext, Object[] parameters) {
- this.parentContext = parentContext;
- this.parameters = parameters;
- }
-
- public final Object getParameter(int position) {
- return parameters[position];
- }
-
- public Object getValue(IExpression variable) {
- if (parentContext == null)
- throw new IllegalArgumentException("No such variable: " + variable); //$NON-NLS-1$
- return parentContext.getValue(variable);
- }
-
- public void setValue(IExpression variable, Object value) {
- if (parentContext == null)
- throw new IllegalArgumentException("No such variable: " + variable); //$NON-NLS-1$
- parentContext.setValue(variable, value);
- }
-
- public IIndexProvider<?> getIndexProvider() {
- if (indexProvider == null) {
- if (parentContext == null)
- return null;
- return parentContext.getIndexProvider();
- }
- return indexProvider;
- }
-
- public void setIndexProvider(IIndexProvider<?> indexProvider) {
- this.indexProvider = indexProvider;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Everything.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Everything.java
deleted file mode 100644
index 00412c8b6..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Everything.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Collection;
-import java.util.Iterator;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-import org.eclipse.equinox.p2.metadata.expression.IExpressionVisitor;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-import org.eclipse.equinox.p2.query.IMatchQuery;
-
-/**
- * The immutable context used when evaluating an expression.
- */
-public final class Everything<T> extends MatchIteratorFilter<T> implements IRepeatableIterator<T> {
- private boolean atStart = true;
-
- private final Class<? extends T> elementClass;
-
- public Everything(Class<? extends T> elementClass, Collection<T> collection) {
- super(RepeatableIterator.<T> create(collection == null ? CollectionUtils.<T> emptyList() : collection));
- this.elementClass = elementClass;
- }
-
- public Everything(Class<? extends T> elementClass, Iterator<? extends T> iterator, Expression expression) {
- this(elementClass, iterator, needsRepeadedAccessToEverything(expression));
- }
-
- public Everything(Class<? extends T> elementClass, IIndexProvider<? extends T> indexProvider) {
- super(RepeatableIterator.<T> create(indexProvider));
- this.elementClass = elementClass;
- }
-
- Everything(Class<? extends T> elementClass, Iterator<? extends T> iterator, boolean needsRepeat) {
- super(needsRepeat ? RepeatableIterator.create(iterator) : iterator);
- this.elementClass = elementClass;
- }
-
- public IRepeatableIterator<T> getCopy() {
- Iterator<? extends T> iterator = getInnerIterator();
- if (iterator instanceof IRepeatableIterator<?>)
- return new Everything<T>(elementClass, ((IRepeatableIterator<? extends T>) iterator).getCopy(), false);
- if (atStart)
- return this;
- throw new UnsupportedOperationException();
- }
-
- public T next() {
- atStart = false;
- return super.next();
- }
-
- public Class<? extends T> getElementClass() {
- return elementClass;
- }
-
- public Object getIteratorProvider() {
- Iterator<? extends T> iterator = getInnerIterator();
- if (iterator instanceof IRepeatableIterator<?>)
- return ((IRepeatableIterator<?>) iterator).getIteratorProvider();
- return this;
- }
-
- protected boolean isMatch(T val) {
- return elementClass.isInstance(val);
- }
-
- /**
- * Checks if the expression will make repeated requests for the 'everything' iterator.
- * @return <code>true</code> if repeated requests will be made, <code>false</code> if not.
- */
- private static boolean needsRepeadedAccessToEverything(Expression expression) {
- final int[] accessCount = new int[] {0};
-
- expression.accept(new IExpressionVisitor() {
- int accessMultiplier = 1;
-
- public boolean visit(IExpression expr) {
- if (expr instanceof CollectionFilter) {
- CollectionFilter cf = (CollectionFilter) expr;
- if (cf.operand.accept(this)) {
- accessMultiplier++;
- cf.lambda.accept(this);
- --accessMultiplier;
- }
- return false;
- }
- if (expr == ExpressionFactory.EVERYTHING) {
- accessCount[0] += accessMultiplier;
- return false;
- }
- if (expr instanceof WrappedIQuery) {
- Expression queryArg = ((WrappedIQuery) expr).operands[0];
- if (!(queryArg instanceof Literal && ((Literal) queryArg).value instanceof IMatchQuery<?>))
- accessCount[0] += accessMultiplier;
- }
- return true;
- }
- });
- return accessCount[0] > 1;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Exists.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Exists.java
deleted file mode 100644
index 14fbc5df4..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Exists.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * A collection filter that yields true if the <code>filter</code> yields true for
- * any of the elements of the <code>collection</code>
- */
-final class Exists extends CollectionFilter {
- Exists(Expression collection, LambdaExpression lambda) {
- super(collection, lambda);
- }
-
- protected Object evaluate(IEvaluationContext context, Iterator<?> itor) {
- Variable variable = lambda.getItemVariable();
- while (itor.hasNext()) {
- variable.setValue(context, itor.next());
- if (lambda.evaluate(context) == Boolean.TRUE)
- return Boolean.TRUE;
- }
- return Boolean.FALSE;
- }
-
- public int getExpressionType() {
- return TYPE_EXISTS;
- }
-
- public String getOperator() {
- return KEYWORD_EXISTS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Expression.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Expression.java
deleted file mode 100644
index 66aeb47af..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Expression.java
+++ /dev/null
@@ -1,486 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.query.IQueryResult;
-
-/**
- * The base class of the expression tree.
- */
-public abstract class Expression implements IExpression, Comparable<Expression>, IExpressionConstants {
-
- static final Expression[] emptyArray = new Expression[0];
-
- public static void appendOperand(StringBuffer bld, Variable rootVariable, Expression operand, int priority) {
- if (priority < operand.getPriority()) {
- bld.append('(');
- operand.toString(bld, rootVariable);
- bld.append(')');
- } else
- operand.toString(bld, rootVariable);
- }
-
- public static Expression[] assertLength(Expression[] operands, int minLength, int maxLength, String operand) {
- if (operands == null)
- operands = emptyArray;
- if (operands.length < minLength)
- throw new IllegalArgumentException("Not enough operands for " + operand); //$NON-NLS-1$
- if (operands.length > maxLength)
- throw new IllegalArgumentException("Too many operands for " + operand); //$NON-NLS-1$
- return operands;
- }
-
- public static Expression[] assertLength(Expression[] operands, int length, String operand) {
- if (operands == null)
- operands = emptyArray;
- if (operands.length < length)
- throw new IllegalArgumentException("Not enough operands for " + operand); //$NON-NLS-1$
- return operands;
- }
-
- public static int compare(Expression[] arr1, Expression[] arr2) {
- int max = arr1.length;
- if (max > arr2.length)
- max = arr2.length;
- for (int idx = 0; idx < max; ++idx) {
- int cmp = arr1[idx].compareTo(arr2[idx]);
- if (cmp != 0)
- return cmp;
- }
- if (max == arr2.length) {
- if (max < arr1.length)
- return 1;
- return 0;
- }
- return -1;
- }
-
- public static boolean equals(Expression[] arr1, Expression[] arr2) {
- int idx = arr1.length;
- if (idx != arr2.length)
- return false;
- while (--idx >= 0)
- if (!arr1[idx].equals(arr2[idx]))
- return false;
- return true;
- }
-
- public static int hashCode(Expression[] arr) {
- int idx = arr.length;
- int result = 1;
- while (--idx >= 0)
- result = 31 * result + arr[idx].hashCode();
- return result;
- }
-
- public static void elementsToString(StringBuffer bld, Variable rootVariable, Expression[] elements) {
- int top = elements.length;
- if (top > 0) {
- elements[0].toString(bld, rootVariable);
- for (int idx = 1; idx < top; ++idx) {
- bld.append(", "); //$NON-NLS-1$
- appendOperand(bld, rootVariable, elements[idx], PRIORITY_MAX);
- }
- }
- }
-
- public static List<String> getIndexCandidateMembers(Class<?> elementClass, Variable itemVariable, Expression operand) {
- MembersFinder finder = new MembersFinder(elementClass, itemVariable);
- operand.accept(finder);
- return finder.getMembers();
- }
-
- /**
- * Let the visitor visit this instance and all expressions that this
- * instance contains.
- * @param visitor The visiting visitor.
- * @return <code>true</code> if the visitor should continue visiting, <code>false</code> otherwise.
- */
- public boolean accept(IExpressionVisitor visitor) {
- return visitor.visit(this);
- }
-
- public int compareTo(Expression e) {
- int cmp = getPriority() - e.getPriority();
- if (cmp == 0) {
- int e1 = getExpressionType();
- int e2 = e.getExpressionType();
- cmp = e1 > e2 ? 1 : (e1 == e2 ? 0 : -1);
- }
- return cmp;
- }
-
- public boolean equals(Object e) {
- if (e == this)
- return true;
- if (e == null || getClass() != e.getClass())
- return false;
- return getExpressionType() == ((Expression) e).getExpressionType();
- }
-
- /**
- * Evaluate this expression with given context and variables.
- * @param context The evaluation context
- * @return The result of the evaluation.
- */
- public abstract Object evaluate(IEvaluationContext context);
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- Object value = evaluate(context);
- if (!(value instanceof Iterator<?>))
- value = RepeatableIterator.create(value);
- return (Iterator<?>) value;
- }
-
- public abstract String getOperator();
-
- public abstract int getPriority();
-
- public boolean isReferenceTo(Variable variable) {
- return this == variable;
- }
-
- public final String toLDAPString() {
- StringBuffer bld = new StringBuffer();
- toLDAPString(bld);
- return bld.toString();
- }
-
- public void toLDAPString(StringBuffer buf) {
- throw new UnsupportedOperationException();
- }
-
- public final String toString() {
- StringBuffer bld = new StringBuffer();
- toString(bld);
- return bld.toString();
- }
-
- public void toString(StringBuffer bld) {
- toString(bld, ExpressionFactory.THIS);
- }
-
- public abstract void toString(StringBuffer bld, Variable rootVariable);
-
- private static class Compacter {
- private Expression base;
-
- private List<Expression> parts;
-
- private int op;
-
- Compacter(Expression base, int op) {
- this.base = base;
- this.op = op;
- }
-
- Expression getResultingFilter() {
- if (parts == null)
- return base;
-
- int partsOp = op == TYPE_AND ? TYPE_OR : TYPE_AND;
- return addFilter(base, normalize(parts, partsOp), op);
- }
-
- boolean merge(Expression b) {
- Expression[] aArr;
- Expression[] bArr;
- if (base.getExpressionType() == op)
- aArr = getFilterImpls(base);
- else
- aArr = new Expression[] {base};
-
- if (b.getExpressionType() == op)
- bArr = getFilterImpls(b);
- else
- bArr = new Expression[] {b};
-
- List<Expression> common = null;
- List<Expression> onlyA = null;
-
- int atop = aArr.length;
- int btop = bArr.length;
- int aidx;
- int bidx;
- for (aidx = 0; aidx < atop; ++aidx) {
- Expression af = aArr[aidx];
- for (bidx = 0; bidx < btop; ++bidx) {
- Expression bf = bArr[bidx];
- if (af.equals(bf)) {
- if (common == null)
- common = new ArrayList<Expression>();
- common.add(af);
- break;
- }
- }
- if (bidx == btop) {
- if (onlyA == null)
- onlyA = new ArrayList<Expression>();
- onlyA.add(af);
- }
- }
- if (common == null)
- // Nothing in common
- return false;
-
- if (onlyA == null && parts == null)
- return true;
-
- List<Expression> onlyB = null;
- for (bidx = 0; bidx < btop; ++bidx) {
- Expression bf = bArr[bidx];
- for (aidx = 0; aidx < atop; ++aidx)
- if (bf.equals(aArr[aidx]))
- break;
- if (aidx == atop) {
- if (onlyB == null)
- onlyB = new ArrayList<Expression>();
- onlyB.add(bf);
- }
- }
-
- if (onlyB == null && parts == null) {
- // All of B is already covered by base
- base = b;
- return true;
- }
-
- if (parts == null)
- parts = new ArrayList<Expression>();
-
- if (onlyA != null) {
- base = normalize(common, op);
- Expression af = normalize(onlyA, op);
- if (!parts.contains(af))
- parts.add(af);
- }
- Expression bf = normalize(onlyB, op);
- if (!parts.contains(bf))
- parts.add(bf);
- return true;
- }
- }
-
- public static class VariableFinder implements IExpressionVisitor {
- private boolean found = false;
- private final Variable variable;
-
- public VariableFinder(Variable variable) {
- this.variable = variable;
- }
-
- public boolean visit(IExpression expression) {
- if (((Expression) expression).isReferenceTo(variable))
- found = true;
- return !found;
- }
-
- public void reset() {
- found = false;
- }
-
- public boolean isFound() {
- return found;
- }
- }
-
- private static class MembersFinder implements IExpressionVisitor {
- private List<String> members;
- private final Class<?> elementClass;
- private final IExpression operand;
-
- MembersFinder(Class<?> elementClass, IExpression operand) {
- this.elementClass = elementClass;
- this.operand = operand;
- }
-
- public boolean visit(IExpression expression) {
- if (expression instanceof Matches) {
- if (IInstallableUnit.class.isAssignableFrom(elementClass)) {
- // This one is a bit special since an
- // IInstallableUnit ~= IRequirement often
- // means that we can reuse the requirement
- // expression.
- Matches matches = (Matches) expression;
- if (matches.lhs == operand) {
- if (members == null)
- members = new ArrayList<String>();
- if (!members.contains(InstallableUnit.MEMBER_PROVIDED_CAPABILITIES))
- members.add(InstallableUnit.MEMBER_PROVIDED_CAPABILITIES);
- }
- }
-
- // No point in scanning for more index candidates in a matches expression
- return false;
- }
-
- if (expression instanceof Member) {
- Member member = (Member) expression;
- if (member.getOperand() == operand) {
- String name = member.getName();
- if (members == null)
- members = new ArrayList<String>();
- if (!members.contains(name))
- members.add(member.getName());
- return false;
- }
- }
- return true;
- }
-
- List<String> getMembers() {
- return members == null ? CollectionUtils.<String> emptyList() : members;
- }
- }
-
- static Expression addFilter(Expression base, Expression subFilter, int expressionType) {
- if (base.equals(subFilter))
- return base;
-
- ArrayList<Expression> filters = new ArrayList<Expression>(2);
- filters.add(base);
- filters.add(subFilter);
- return normalize(filters, expressionType);
- }
-
- static Expression normalize(List<Expression> operands, int op) {
- int top = operands.size();
- if (top == 1)
- return operands.get(0);
-
- // a | (b | c) becomes a | b | c
- // a & (b & c) becomes a & b & c
- //
- for (int idx = 0; idx < top; ++idx) {
- Expression f = operands.get(idx);
- if (f.getExpressionType() != op)
- continue;
-
- Expression[] sfs = getFilterImpls(f);
- operands.remove(idx);
- --top;
- for (int ndx = 0; ndx < sfs.length; ++ndx) {
- Expression nf = sfs[ndx];
- if (!operands.contains(nf))
- operands.add(nf);
- }
- }
- top = operands.size();
- if (top == 1)
- return operands.get(0);
-
- Collections.sort(operands);
- List<Compacter> splits = new ArrayList<Compacter>();
- int reverseOp = op == TYPE_AND ? TYPE_OR : TYPE_AND;
-
- for (int idx = 0; idx < top; ++idx)
- merge(splits, operands.get(idx), reverseOp);
-
- operands.clear();
- top = splits.size();
- for (int idx = 0; idx < top; ++idx) {
- Expression filter = splits.get(idx).getResultingFilter();
- if (!operands.contains(filter))
- operands.add(filter);
- }
- top = operands.size();
- if (top == 1)
- return operands.get(0);
-
- Collections.sort(operands);
- Expression[] expArray = operands.toArray(new Expression[top]);
- return op == TYPE_AND ? new And(expArray) : new Or(expArray);
- }
-
- static void merge(List<Compacter> splits, Expression base, int op) {
- int top = splits.size();
- for (int idx = 0; idx < top; ++idx) {
- Compacter split = splits.get(idx);
- if (split.merge(base))
- return;
- }
- splits.add(new Compacter(base, op));
- }
-
- static Expression[] getFilterImpls(Expression expression) {
- if (expression instanceof NAry)
- return ((NAry) expression).operands;
- throw new IllegalArgumentException();
- }
-
- static Set<?> asSet(Object val, boolean forcePrivateCopy) {
- if (val == null)
- throw new IllegalArgumentException("Cannot convert null into an set"); //$NON-NLS-1$
-
- if (val instanceof IRepeatableIterator<?>) {
- Object provider = ((IRepeatableIterator<?>) val).getIteratorProvider();
- if (!forcePrivateCopy) {
- if (provider instanceof Set<?>)
- return (Set<?>) provider;
- if (provider instanceof IQueryResult<?>)
- return ((IQueryResult<?>) provider).toUnmodifiableSet();
- }
-
- if (provider instanceof Collection<?>)
- val = provider;
- } else {
- if (!forcePrivateCopy) {
- if (val instanceof Set<?>)
- return (Set<?>) val;
- if (val instanceof IQueryResult<?>)
- return ((IQueryResult<?>) val).toUnmodifiableSet();
- }
- }
-
- HashSet<Object> result;
- if (val instanceof Collection<?>)
- result = new HashSet<Object>((Collection<?>) val);
- else {
- result = new HashSet<Object>();
- Iterator<?> iterator = RepeatableIterator.create(val);
- while (iterator.hasNext())
- result.add(iterator.next());
- }
- return result;
- }
-
- private static class TranslationSupportFinder implements IExpressionVisitor {
- private boolean found;
-
- TranslationSupportFinder() { //
- }
-
- public boolean visit(IExpression expression) {
- if (expression.getExpressionType() == TYPE_MEMBER && InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(((Member) expression).getName()))
- found = true;
- return !found;
- }
-
- boolean isFound() {
- return found;
- }
- }
-
- /**
- * Checks if the expression will make repeated requests for the 'everything' iterator.
- * @return <code>true</code> if repeated requests will be made, <code>false</code> if not.
- */
- public boolean needsTranslationSupport() {
- TranslationSupportFinder tsFinder = new TranslationSupportFinder();
- accept(tsFinder);
- return tsFinder.isFound();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ExpressionFactory.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ExpressionFactory.java
deleted file mode 100644
index ec8abf2b1..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ExpressionFactory.java
+++ /dev/null
@@ -1,293 +0,0 @@
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.query.IQuery;
-
-public class ExpressionFactory implements IExpressionFactory, IExpressionConstants {
- public static final Variable EVERYTHING = new Variable(VARIABLE_EVERYTHING);
- protected static final Map<String, Constructor<?>> functionMap;
- public static final IExpressionFactory INSTANCE = new ExpressionFactory();
-
- public static final Variable THIS = new Variable(VARIABLE_THIS);
-
- static {
- Class<?>[] args = new Class[] {Expression[].class};
- Map<String, Constructor<?>> f = new HashMap<String, Constructor<?>>();
- try {
- f.put(KEYWORD_BOOLEAN, BooleanFunction.class.getConstructor(args));
- f.put(KEYWORD_FILTER, FilterFunction.class.getConstructor(args));
- f.put(KEYWORD_VERSION, VersionFunction.class.getConstructor(args));
- f.put(KEYWORD_RANGE, RangeFunction.class.getConstructor(args));
- f.put(KEYWORD_CLASS, ClassFunction.class.getConstructor(args));
- f.put(KEYWORD_SET, SetFunction.class.getConstructor(args));
- f.put(KEYWORD_IQUERY, WrappedIQuery.class.getConstructor(args));
- functionMap = Collections.unmodifiableMap(f);
- } catch (Exception e) {
- throw new ExceptionInInitializerError(e);
- }
- }
-
- protected static Expression[] convertArray(IExpression[] operands) {
- Expression[] ops = new Expression[operands.length];
- System.arraycopy(operands, 0, ops, 0, operands.length);
- return ops;
- }
-
- public IExpression all(IExpression collection, IExpression lambda) {
- return new All((Expression) collection, (LambdaExpression) lambda);
- }
-
- public IExpression and(IExpression... operands) {
- if (operands.length == 0)
- return Literal.TRUE_CONSTANT;
- if (operands.length == 1)
- return operands[0];
- return new And(convertArray(operands));
- }
-
- public IExpression array(IExpression... operands) {
- return new Array(convertArray(operands));
- }
-
- public IExpression assignment(IExpression variable, IExpression expression) {
- return new Assignment((Variable) variable, (Expression) expression);
- }
-
- public IExpression at(IExpression target, IExpression key) {
- return new At((Expression) target, (Expression) key);
- }
-
- public IExpression collect(IExpression collection, IExpression lambda) {
- return new Collect((Expression) collection, (LambdaExpression) lambda);
- }
-
- public IExpression condition(IExpression test, IExpression ifTrue, IExpression ifFalse) {
- return new Condition((Expression) test, (Expression) ifTrue, (Expression) ifFalse);
- }
-
- public IExpression constant(Object value) {
- return Literal.create(value);
- }
-
- @SuppressWarnings("unchecked")
- public <T> IContextExpression<T> contextExpression(IExpression expression, Object... parameters) {
-
- if (expression instanceof IContextExpression<?>) {
- if (parameters.length > 0)
- // Not good.
- throw new IllegalArgumentException("IContextExpression cannot be parameterized (it already is)"); //$NON-NLS-1$
- return (IContextExpression<T>) expression;
- }
- if (expression instanceof IMatchExpression<?>)
- throw new IllegalArgumentException("IMatchExpression cannot be turned into a context expression"); //$NON-NLS-1$
- return new ContextExpression<T>((Expression) expression, parameters);
- }
-
- public IEvaluationContext createContext(IExpression[] variables, Object... parameters) {
- return EvaluationContext.create(parameters, variables);
- }
-
- public IEvaluationContext createContext(Object... parameters) {
- return EvaluationContext.create(parameters, (Variable[]) null);
- }
-
- public IExpression equals(IExpression lhs, IExpression rhs) {
- return new Equals((Expression) lhs, (Expression) rhs, false);
- }
-
- public IExpression exists(IExpression collection, IExpression lambda) {
- return new Exists((Expression) collection, (LambdaExpression) lambda);
- }
-
- public IFilterExpression filterExpression(IExpression expression) {
- return new LDAPFilter((Expression) expression);
- }
-
- public IExpression first(IExpression collection, IExpression lambda) {
- return new First((Expression) collection, (LambdaExpression) lambda);
- }
-
- public IExpression flatten(IExpression collection) {
- return new Flatten((Expression) collection);
- }
-
- public IExpression function(Object function, IExpression... args) {
- try {
- return (IExpression) ((Constructor<?>) function).newInstance(new Object[] {convertArray(args)});
- } catch (IllegalArgumentException e) {
- throw e;
- } catch (InvocationTargetException e) {
- Throwable t = e.getCause();
- if (t instanceof RuntimeException)
- throw (RuntimeException) t;
- throw new RuntimeException(t);
- } catch (InstantiationException e) {
- throw new RuntimeException(e);
- } catch (IllegalAccessException e) {
- throw new RuntimeException(e);
- }
- }
-
- public Map<String, ? extends Object> getFunctionMap() {
- return functionMap;
- }
-
- public IExpression greater(IExpression lhs, IExpression rhs) {
- return new Compare((Expression) lhs, (Expression) rhs, false, false);
- }
-
- public IExpression greaterEqual(IExpression lhs, IExpression rhs) {
- return new Compare((Expression) lhs, (Expression) rhs, false, true);
- }
-
- public IExpression indexedParameter(int index) {
- return new Parameter(index);
- }
-
- public IExpression intersect(IExpression c1, IExpression c2) {
- return new Intersect((Expression) c1, (Expression) c2);
- }
-
- public IExpression lambda(IExpression variable, IExpression body) {
- return new LambdaExpression((Variable) variable, (Expression) body);
- }
-
- public IExpression lambda(IExpression variable, IExpression[] assignments, IExpression body) {
- if (assignments.length == 0)
- return lambda(variable, body);
- Assignment[] asgns = new Assignment[assignments.length];
- System.arraycopy(assignments, 0, asgns, 0, assignments.length);
- return new CurryedLambdaExpression((Variable) variable, asgns, (Expression) body);
- }
-
- public IExpression latest(IExpression collection) {
- return new Latest((Expression) collection);
- }
-
- public IExpression less(IExpression lhs, IExpression rhs) {
- return new Compare((Expression) lhs, (Expression) rhs, true, false);
- }
-
- public IExpression lessEqual(IExpression lhs, IExpression rhs) {
- return new Compare((Expression) lhs, (Expression) rhs, true, true);
- }
-
- public IExpression limit(IExpression collection, IExpression limit) {
- return new Limit((Expression) collection, (Expression) limit);
- }
-
- public IExpression limit(IExpression collection, int count) {
- return new Limit((Expression) collection, Literal.create(new Integer(count)));
- }
-
- public IExpression matches(IExpression lhs, IExpression rhs) {
- return new Matches((Expression) lhs, (Expression) rhs);
- }
-
- @SuppressWarnings("unchecked")
- public <T> IMatchExpression<T> matchExpression(IExpression expression, Object... parameters) {
- if (expression instanceof IMatchExpression<?>) {
- if (parameters.length > 0)
- // Not good.
- throw new IllegalArgumentException("IMatchExpression cannot be parameterized (it already is)"); //$NON-NLS-1$
- return (IMatchExpression<T>) expression;
- }
- if (expression instanceof IContextExpression<?>)
- throw new IllegalArgumentException("IContextExpression cannot be turned into a match expression"); //$NON-NLS-1$
- return new MatchExpression<T>((Expression) expression, parameters);
- }
-
- public IExpression member(IExpression target, String name) {
- if ("empty".equals(name)) //$NON-NLS-1$
- return new Member.EmptyMember((Expression) target);
- if ("length".equals(name)) //$NON-NLS-1$
- return new Member.LengthMember((Expression) target);
- return new Member.DynamicMember((Expression) target, name);
- }
-
- public IExpression memberCall(IExpression target, String name, IExpression... args) {
- if (args.length == 0)
- return member(target, name);
-
- Expression[] eargs = convertArray(args);
-
- // Insert functions that takes arguments here
-
- //
- StringBuffer bld = new StringBuffer();
- bld.append("Don't know how to do a member call with "); //$NON-NLS-1$
- bld.append(name);
- bld.append('(');
- Expression.elementsToString(bld, null, eargs);
- bld.append(')');
- throw new IllegalArgumentException(bld.toString());
- }
-
- @SuppressWarnings("unchecked")
- public IExpression normalize(List<? extends IExpression> operands, int expressionType) {
- return Expression.normalize((List<Expression>) operands, expressionType);
- }
-
- public IExpression not(IExpression operand) {
- if (operand instanceof Equals) {
- Equals eq = (Equals) operand;
- return new Equals(eq.lhs, eq.rhs, !eq.negate);
- }
- if (operand instanceof Compare) {
- Compare cmp = (Compare) operand;
- return new Compare(cmp.lhs, cmp.rhs, !cmp.compareLess, !cmp.equalOK);
- }
- if (operand instanceof Not)
- return ((Not) operand).operand;
-
- return new Not((Expression) operand);
- }
-
- public IExpression or(IExpression... operands) {
- if (operands.length == 0)
- return Literal.TRUE_CONSTANT;
- if (operands.length == 1)
- return operands[0];
- return new Or(convertArray(operands));
- }
-
- public IExpression pipe(IExpression... operands) {
- return Pipe.createPipe(convertArray(operands));
- }
-
- public IExpression select(IExpression collection, IExpression lambda) {
- return new Select((Expression) collection, (LambdaExpression) lambda);
- }
-
- public IExpression thisVariable() {
- return THIS;
- }
-
- public IExpression toExpression(IQuery<?> query) {
- Literal queryConstant = Literal.create(query);
- return new WrappedIQuery(new Expression[] {queryConstant});
- }
-
- public IExpression traverse(IExpression collection, IExpression lambda) {
- return new Traverse((Expression) collection, (LambdaExpression) lambda);
- }
-
- public IExpression union(IExpression c1, IExpression c2) {
- return new Union((Expression) c1, (Expression) c2);
- }
-
- public IExpression unique(IExpression collection, IExpression cache) {
- return new Unique((Expression) collection, (Expression) cache);
- }
-
- public IExpression variable(String name) {
- if (VARIABLE_EVERYTHING.equals(name))
- return EVERYTHING;
- if (VARIABLE_THIS.equals(name))
- return THIS;
- return new Variable(name);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/FilterFunction.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/FilterFunction.java
deleted file mode 100644
index 07fa92350..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/FilterFunction.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-
-import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
-
-/**
- * A function that creates an OSGi filter based on a String
- */
-public final class FilterFunction extends Function {
- public FilterFunction(Expression[] operands) {
- super(assertLength(operands, 1, 1, KEYWORD_FILTER));
- }
-
- boolean assertSingleArgumentClass(Object v) {
- return v instanceof String;
- }
-
- Object createInstance(Object arg) {
- return ExpressionUtil.parseLDAP((String) arg);
- }
-
- public String getOperator() {
- return KEYWORD_FILTER;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/First.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/First.java
deleted file mode 100644
index de5c8b51b..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/First.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * A collection filter that yields the first element of the <code>collection</code> for which
- * the <code>filter</code> yields <code>true</code>
- */
-final class First extends CollectionFilter {
- First(Expression collection, LambdaExpression lambda) {
- super(collection, lambda);
- }
-
- protected Object evaluate(IEvaluationContext context, Iterator<?> itor) {
- Variable variable = lambda.getItemVariable();
- while (itor.hasNext()) {
- Object each = itor.next();
- variable.setValue(context, each);
- if (lambda.evaluate(context) == Boolean.TRUE)
- return each;
- }
- return null;
- }
-
- public int getExpressionType() {
- return TYPE_FIRST;
- }
-
- public String getOperator() {
- return KEYWORD_FIRST;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Flatten.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Flatten.java
deleted file mode 100644
index 181caa24e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Flatten.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An expression that yields a new collection consisting of all elements of the
- * <code>collection</code> for which the <code>filter</code> yields <code>true</code>.
- */
-final class Flatten extends UnaryCollectionFilter {
- Flatten(Expression collection) {
- super(collection);
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- return new CompoundIterator<Object>(operand.evaluateAsIterator(context));
- }
-
- public int getExpressionType() {
- return TYPE_FLATTEN;
- }
-
- public String getOperator() {
- return IExpressionConstants.KEYWORD_FLATTEN;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Function.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Function.java
deleted file mode 100644
index 49908cb7f..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Function.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An expression that represents a function such as filter(&lt;expr&gt;) or version(&lt;expr&gt;)
- */
-public abstract class Function extends NAry {
-
- private Object instance;
-
- protected Function(Expression[] operands) {
- super(operands);
- }
-
- boolean assertSingleArgumentClass(Object v) {
- return true;
- }
-
- Object createInstance(Object arg) {
- throw new UnsupportedOperationException();
- }
-
- final Object createInstance(String arg) {
- throw new UnsupportedOperationException();
- }
-
- public Object evaluate(IEvaluationContext context) {
- if (instance != null)
- return instance;
-
- Expression operand = operands[0];
- Object arg = operand.evaluate(context);
- if (assertSingleArgumentClass(arg)) {
- Object result = createInstance(arg);
- if (operand instanceof Literal || operand instanceof Parameter)
- // operand won't change over time so we can cache this instance.
- instance = result;
- return result;
- }
- String what = arg == null ? "null" : ("a " + arg.getClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- throw new IllegalArgumentException("Cannot create a " + getOperator() + " from " + what); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- Object value = evaluate(context);
- if (!(value instanceof Iterator<?>))
- value = RepeatableIterator.create(value);
- return (Iterator<?>) value;
- }
-
- public int getExpressionType() {
- return TYPE_FUNCTION;
- }
-
- public int getPriority() {
- return PRIORITY_FUNCTION;
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- bld.append(getOperator());
- bld.append('(');
- elementsToString(bld, rootVariable, operands);
- bld.append(')');
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IExpressionConstants.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IExpressionConstants.java
deleted file mode 100644
index 033a5945a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IExpressionConstants.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-public interface IExpressionConstants {
- String KEYWORD_ALL = "all"; //$NON-NLS-1$
-
- String KEYWORD_BOOLEAN = "boolean"; //$NON-NLS-1$
- String KEYWORD_CLASS = "class"; //$NON-NLS-1$
- String KEYWORD_EXISTS = "exists"; //$NON-NLS-1$
- String KEYWORD_FALSE = "false"; //$NON-NLS-1$
- String KEYWORD_FILTER = "filter"; //$NON-NLS-1$
- String KEYWORD_NULL = "null"; //$NON-NLS-1$
- String KEYWORD_RANGE = "range"; //$NON-NLS-1$
- String KEYWORD_TRUE = "true"; //$NON-NLS-1$
- String KEYWORD_COLLECT = "collect"; //$NON-NLS-1$
- String KEYWORD_FIRST = "first"; //$NON-NLS-1$
- String KEYWORD_FLATTEN = "flatten"; //$NON-NLS-1$
- String KEYWORD_INTERSECT = "intersect"; //$NON-NLS-1$
- String KEYWORD_IQUERY = "iquery"; //$NON-NLS-1$
- String KEYWORD_LATEST = "latest"; //$NON-NLS-1$
- String KEYWORD_LIMIT = "limit"; //$NON-NLS-1$
- String KEYWORD_LOCALIZED_KEYS = "localizedKeys"; //$NON-NLS-1$
- String KEYWORD_LOCALIZED_MAP = "localizedMap"; //$NON-NLS-1$
- String KEYWORD_LOCALIZED_PROPERTY = "localizedProperty"; //$NON-NLS-1$
- String KEYWORD_SATISFIES_ALL = "satisfiesAll"; //$NON-NLS-1$
- String KEYWORD_SATISFIES_ANY = "satisfiesAny"; //$NON-NLS-1$
- String KEYWORD_SELECT = "select"; //$NON-NLS-1$
- String KEYWORD_SET = "set"; //$NON-NLS-1$
- String KEYWORD_TRAVERSE = "traverse"; //$NON-NLS-1$
- String KEYWORD_UNION = "union"; //$NON-NLS-1$
- String KEYWORD_UNIQUE = "unique"; //$NON-NLS-1$
- String KEYWORD_VERSION = "version"; //$NON-NLS-1$
-
- String OPERATOR_AND = "&&"; //$NON-NLS-1$
- String OPERATOR_AT = "[]"; //$NON-NLS-1$
- String OPERATOR_EQUALS = "=="; //$NON-NLS-1$
- String OPERATOR_GT = ">"; //$NON-NLS-1$
- String OPERATOR_GT_EQUAL = ">="; //$NON-NLS-1$
- String OPERATOR_LT = "<"; //$NON-NLS-1$
- String OPERATOR_LT_EQUAL = "<="; //$NON-NLS-1$
- String OPERATOR_MATCHES = "~="; //$NON-NLS-1$
- String OPERATOR_MEMBER = "."; //$NON-NLS-1$
- String OPERATOR_NOT = "!"; //$NON-NLS-1$
- String OPERATOR_NOT_EQUALS = "!="; //$NON-NLS-1$
- String OPERATOR_OR = "||"; //$NON-NLS-1$
- String OPERATOR_PARAMETER = "$"; //$NON-NLS-1$
- String OPERATOR_ARRAY = "[]"; //$NON-NLS-1$
- String OPERATOR_ASSIGN = "="; //$NON-NLS-1$
- String OPERATOR_EACH = "_"; //$NON-NLS-1$
- String OPERATOR_ELSE = ":"; //$NON-NLS-1$
- String OPERATOR_IF = "?"; //$NON-NLS-1$
-
- int PRIORITY_LITERAL = 1;
- int PRIORITY_VARIABLE = 1;
- int PRIORITY_FUNCTION = 2; // for extend query expressions
- int PRIORITY_MEMBER = 3;
- int PRIORITY_COLLECTION = 4;
- int PRIORITY_NOT = 5;
- int PRIORITY_BINARY = 6;
- int PRIORITY_AND = 7;
- int PRIORITY_OR = 8;
- int PRIORITY_CONDITION = 9;
- int PRIORITY_ASSIGNMENT = 10;
- int PRIORITY_LAMBDA = 11;
- int PRIORITY_COMMA = 12;
- int PRIORITY_MAX = 20;
-
- String VARIABLE_EVERYTHING = "everything"; //$NON-NLS-1$
- String VARIABLE_THIS = "this"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IRepeatableIterator.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IRepeatableIterator.java
deleted file mode 100644
index f20e266bf..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IRepeatableIterator.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-
-public interface IRepeatableIterator<T> extends Iterator<T> {
- /**
- * Returns a copy that will iterate over the same elements
- * as this iterator. The contents or position of this iterator
- * is left unchanged.
- * @return A re-initialized copy of this iterator.
- */
- IRepeatableIterator<T> getCopy();
-
- Object getIteratorProvider();
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Intersect.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Intersect.java
deleted file mode 100644
index 2ebbe0fef..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Intersect.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * n-ary <code>intersect</code> operator. The result is the set of elements that were found in all operands.
- */
-final class Intersect extends Binary {
- Intersect(Expression operand, Expression param) {
- super(operand, param);
- }
-
- public Object evaluate(IEvaluationContext context) {
- return evaluateAsIterator(context);
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- Set<?> resultSet = asSet(lhs.evaluate(context), false); // Safe since it will not be modified
- Iterator<?> itor = rhs.evaluateAsIterator(context);
- Set<Object> retained = new HashSet<Object>();
- while (itor.hasNext()) {
- Object value = itor.next();
- if (resultSet.contains(value))
- retained.add(value);
- }
- return RepeatableIterator.create(retained);
- }
-
- public int getExpressionType() {
- return TYPE_INTERSECT;
- }
-
- public String getOperator() {
- return KEYWORD_INTERSECT;
- }
-
- public int getPriority() {
- return PRIORITY_COLLECTION;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPApproximation.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPApproximation.java
deleted file mode 100644
index 291a6ef6c..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPApproximation.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.io.Serializable;
-
-/**
- * Map a string for an LDAP APPROX (~=) comparison.
- * This implementation removes white spaces and transforms everything to lower case.
- */
-public final class LDAPApproximation implements Serializable, Comparable<LDAPApproximation> {
- private static final long serialVersionUID = 4782295637798543587L;
- private final String pattern;
- private transient String approxPattern;
-
- public LDAPApproximation(String pattern) {
- this.pattern = pattern;
- }
-
- public int compareTo(LDAPApproximation o) {
- return pattern.compareTo(o.pattern);
- }
-
- public boolean equals(Object o) {
- return o == this || (o instanceof LDAPApproximation && ((LDAPApproximation) o).pattern.equals(pattern));
- }
-
- public int hashCode() {
- return 3 * pattern.hashCode();
- }
-
- /**
- * Matches the <code>value</code> with the compiled expression. The value
- * is considered matching if all characters are matched by the expression. A
- * partial match is not enough.
- * @param value The value to match
- * @return <code>true</code> if the value was a match.
- */
- public boolean isMatch(CharSequence value) {
- if (value == null)
- return false;
- if (approxPattern == null)
- approxPattern = approxString(pattern);
- return approxString(value).equals(approxPattern);
- }
-
- public String toString() {
- return pattern;
- }
-
- private static String approxString(CharSequence input) {
- boolean changed = false;
- char[] output = new char[input.length()];
- int cursor = 0;
- for (int i = 0, length = output.length; i < length; i++) {
- char c = input.charAt(i);
- if (Character.isWhitespace(c)) {
- changed = true;
- continue;
- }
- if (Character.isUpperCase(c)) {
- changed = true;
- c = Character.toLowerCase(c);
- }
- output[cursor++] = c;
- }
- return changed ? new String(output, 0, cursor) : input.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPFilter.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPFilter.java
deleted file mode 100644
index b81f1f55f..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPFilter.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Dictionary;
-import java.util.Map;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.osgi.framework.Filter;
-import org.osgi.framework.ServiceReference;
-
-public class LDAPFilter extends Unary implements IFilterExpression {
-
- LDAPFilter(Expression expression) {
- super(expression);
- }
-
- public boolean accept(IExpressionVisitor visitor) {
- return operand.accept(visitor);
- }
-
- public boolean equals(Object o) {
- return (o instanceof Filter && !(o instanceof LDAPFilter)) ? equals(ExpressionUtil.parseLDAP(o.toString())) : super.equals(o);
- }
-
- @Override
- public String getOperator() {
- return operand.getOperator();
- }
-
- @Override
- public int getPriority() {
- return operand.getPriority();
- }
-
- public int getExpressionType() {
- return 0;
- }
-
- public boolean match(Map<String, ? extends Object> map) {
- return isMatch(MemberProvider.create(map, true));
- }
-
- @SuppressWarnings("rawtypes")
- public boolean match(Dictionary dictionary) {
- return isMatch(dictionary == null ? MemberProvider.emptyProvider() : MemberProvider.create(dictionary, true));
- }
-
- public boolean isMatch(Object candidate) {
- Variable self = ExpressionFactory.THIS;
- IEvaluationContext ctx = EvaluationContext.create(self);
- self.setValue(ctx, candidate);
- return Boolean.TRUE == operand.evaluate(ctx);
- }
-
- public boolean match(ServiceReference reference) {
- return isMatch(reference == null ? MemberProvider.emptyProvider() : MemberProvider.create(reference, true));
- }
-
- public boolean matchCase(Map<String, ? extends Object> map) {
- return isMatch(map == null ? MemberProvider.emptyProvider() : MemberProvider.create(map, false));
- }
-
- @SuppressWarnings("rawtypes")
- public boolean matchCase(Dictionary dictionary) {
- return isMatch(dictionary == null ? MemberProvider.emptyProvider() : MemberProvider.create(dictionary, false));
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- operand.toLDAPString(bld);
- }
-
- @Override
- public Object evaluate(IEvaluationContext context) {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LambdaExpression.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LambdaExpression.java
deleted file mode 100644
index c5bacf0ab..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LambdaExpression.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpressionVisitor;
-
-/**
- * A function that executes some code
- */
-public class LambdaExpression extends Unary {
- protected final Variable each;
-
- protected LambdaExpression(Variable each, Expression body) {
- super(body);
- this.each = each;
- }
-
- public boolean accept(IExpressionVisitor visitor) {
- return super.accept(visitor) && each.accept(visitor);
- }
-
- public int compareTo(Expression e) {
- int cmp = super.compareTo(e);
- if (cmp == 0)
- cmp = each.compareTo(((LambdaExpression) e).each);
- return cmp;
- }
-
- public boolean equals(Object o) {
- return super.equals(o) && each.equals(((LambdaExpression) o).each);
- }
-
- public int hashCode() {
- int result = 31 + operand.hashCode();
- return 31 * result + each.hashCode();
- }
-
- public int getExpressionType() {
- return TYPE_LAMBDA;
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- each.toString(bld, rootVariable);
- bld.append(" | "); //$NON-NLS-1$
- appendOperand(bld, rootVariable, operand, IExpressionConstants.PRIORITY_COMMA);
- }
-
- public Variable getItemVariable() {
- return each;
- }
-
- public String getOperator() {
- return "|"; //$NON-NLS-1$
- }
-
- public int getPriority() {
- return IExpressionConstants.PRIORITY_LAMBDA;
- }
-
- public IEvaluationContext prolog(IEvaluationContext context) {
- return EvaluationContext.create(context, each);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Latest.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Latest.java
deleted file mode 100644
index cf96f0604..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Latest.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.IVersionedId;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An expression that is especially targeted towards {@link IVersionedId} instances. It will
- * reject any objects that is not an <code>IVersionedId</code> and it will ensure that the
- * resulting iterator only iterates over the latest version of any found id.
- */
-final class Latest extends UnaryCollectionFilter {
-
- Latest(Expression collection) {
- super(collection);
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- HashMap<String, IVersionedId> greatestIUVersion;
- if (operand instanceof Select) {
- // Inline element evaluation here so that we don't build a map that is
- // larger then it has to be
- Select select = (Select) operand;
- Iterator<?> iterator = select.operand.evaluateAsIterator(context);
- if (!iterator.hasNext())
- return Collections.EMPTY_SET.iterator();
-
- greatestIUVersion = new HashMap<String, IVersionedId>();
- LambdaExpression lambda = select.lambda;
- context = lambda.prolog(context);
- Variable variable = lambda.getItemVariable();
- while (iterator.hasNext()) {
- Object next = iterator.next();
- if (!(next instanceof IVersionedId))
- continue;
-
- variable.setValue(context, next);
- if (lambda.evaluate(context) != Boolean.TRUE)
- continue;
-
- IVersionedId versionedID = (IVersionedId) next;
- String id = versionedID.getId();
- IVersionedId prev = greatestIUVersion.put(id, versionedID);
- if (prev == null)
- continue;
- if (prev.getVersion().compareTo(versionedID.getVersion()) > 0)
- greatestIUVersion.put(id, prev);
- }
- } else {
- Iterator<?> iterator = operand.evaluateAsIterator(context);
- if (iterator == null)
- return null;
- if (!iterator.hasNext())
- return Collections.EMPTY_SET.iterator();
-
- greatestIUVersion = new HashMap<String, IVersionedId>();
- while (iterator.hasNext()) {
- Object next = iterator.next();
- if (!(next instanceof IVersionedId))
- continue;
-
- IVersionedId versionedID = (IVersionedId) next;
- String id = versionedID.getId();
-
- IVersionedId prev = greatestIUVersion.put(id, versionedID);
- if (prev == null)
- continue;
-
- if (prev.getVersion().compareTo(versionedID.getVersion()) > 0)
- greatestIUVersion.put(id, prev);
- }
- }
- return greatestIUVersion.values().iterator();
- }
-
- public int getExpressionType() {
- return TYPE_LATEST;
- }
-
- public String getOperator() {
- return IExpressionConstants.KEYWORD_LATEST;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Limit.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Limit.java
deleted file mode 100644
index d4776755b..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Limit.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * A collection filter that limits the number of entries in the collection
- */
-final class Limit extends Binary {
-
- /**
- * An iterator that stops iterating after a given number of iterations.
- */
- static final class CountingIterator<T> implements Iterator<T> {
- private final Iterator<? extends T> innerIterator;
- private int counter;
-
- public CountingIterator(Iterator<? extends T> iterator, int count) {
- this.innerIterator = iterator;
- this.counter = count;
- }
-
- public boolean hasNext() {
- return counter > 0 && innerIterator.hasNext();
- }
-
- public T next() {
- if (counter > 0) {
- --counter;
- return innerIterator.next();
- }
- throw new NoSuchElementException();
- }
-
- public void remove() {
- innerIterator.remove();
- }
- }
-
- Limit(Expression operand, Expression param) {
- super(operand, param);
- }
-
- Limit(Expression operand, int limit) {
- this(operand, (Expression) ExpressionFactory.INSTANCE.constant(new Integer(limit)));
- }
-
- public Object evaluate(IEvaluationContext context) {
- return evaluateAsIterator(context);
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- Object rval = rhs.evaluate(context);
- int limit = -1;
- if (rval instanceof Integer)
- limit = ((Integer) rval).intValue();
- if (limit < 0)
- throw new IllegalArgumentException("limit expression did not evalutate to a positive integer"); //$NON-NLS-1$
- return limit == 0 ? CollectionUtils.emptySet().iterator() : new CountingIterator<Object>(lhs.evaluateAsIterator(context), limit);
- }
-
- public int getExpressionType() {
- return TYPE_LIMIT;
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- CollectionFilter.appendProlog(bld, rootVariable, lhs, getOperator());
- appendOperand(bld, rootVariable, rhs, IExpressionConstants.PRIORITY_COMMA);
- bld.append(')');
- }
-
- public String getOperator() {
- return KEYWORD_LIMIT;
- }
-
- public int getPriority() {
- return PRIORITY_COLLECTION;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Literal.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Literal.java
deleted file mode 100644
index fffdf96a2..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Literal.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.SimplePattern;
-import org.osgi.framework.Filter;
-
-/**
- * An expression that represents a constant value.
- */
-public final class Literal extends Expression {
- public static final Literal FALSE_CONSTANT = new Literal(Boolean.FALSE);
-
- public static final Literal NULL_CONSTANT = new Literal(null);
-
- public static final Literal TRUE_CONSTANT = new Literal(Boolean.TRUE);
-
- public static Literal create(Object value) {
- if (value == null)
- return NULL_CONSTANT;
- if (value == Boolean.TRUE)
- return TRUE_CONSTANT;
- if (value == Boolean.FALSE)
- return FALSE_CONSTANT;
- return new Literal(value);
- }
-
- public final Object value;
-
- private Literal(Object value) {
- this.value = value;
- }
-
- @SuppressWarnings({"unchecked", "rawtypes"})
- public int compareTo(Expression e) {
- int cmp = super.compareTo(e);
- if (cmp != 0)
- return cmp;
-
- Object eValue = ((Literal) e).value;
- if (value == null)
- return eValue == null ? 0 : -1;
-
- if (eValue == null)
- return 1;
-
- if (eValue.getClass() == value.getClass())
- return ((Comparable) value).compareTo(eValue);
-
- return eValue.getClass().getName().compareTo(value.getClass().getName());
- }
-
- public boolean equals(Object o) {
- if (super.equals(o)) {
- Literal bo = (Literal) o;
- return value == null ? bo.value == null : value.equals(bo.value);
- }
- return false;
- }
-
- public Object evaluate(IEvaluationContext context) {
- return value;
- }
-
- public int getExpressionType() {
- return TYPE_LITERAL;
- }
-
- public String getOperator() {
- return "<literal>"; //$NON-NLS-1$
- }
-
- public int getPriority() {
- return PRIORITY_LITERAL;
- }
-
- public int hashCode() {
- return 31 + value.hashCode();
- }
-
- public void toLDAPString(StringBuffer buf) {
- if (!(value instanceof Filter))
- throw new UnsupportedOperationException();
- buf.append(value.toString());
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- appendValue(bld, value);
- }
-
- private static void appendValue(StringBuffer bld, Object value) {
- if (value == null)
- bld.append("null"); //$NON-NLS-1$
- else if (value == Boolean.TRUE)
- bld.append("true"); //$NON-NLS-1$
- else if (value == Boolean.FALSE)
- bld.append("false"); //$NON-NLS-1$
- else if (value instanceof String)
- appendQuotedString(bld, (String) value);
- else if (value instanceof Number)
- bld.append(value.toString());
- else if (value instanceof SimplePattern) {
- appendEscaped(bld, '/', value.toString());
- } else if (value instanceof Version) {
- bld.append("version("); //$NON-NLS-1$
- appendQuotedString(bld, value.toString());
- bld.append(')');
- } else if (value instanceof VersionRange) {
- bld.append("range("); //$NON-NLS-1$
- appendQuotedString(bld, value.toString());
- bld.append(')');
- } else if (value instanceof Class<?>) {
- bld.append("class("); //$NON-NLS-1$
- appendQuotedString(bld, value.toString());
- bld.append(')');
- } else if (value instanceof Filter) {
- bld.append("filter("); //$NON-NLS-1$
- appendQuotedString(bld, value.toString());
- bld.append(')');
- } else if (value instanceof Set<?>) {
- bld.append("set("); //$NON-NLS-1$
- appendLiteralCollection(bld, (Collection<?>) value);
- bld.append(')');
- } else if (value instanceof Collection<?>)
- appendLiteralCollection(bld, (Collection<?>) value);
- else
- bld.append(value);
-
- }
-
- private static void appendLiteralCollection(StringBuffer bld, Collection<?> collection) {
- bld.append('[');
- Iterator<?> iter = collection.iterator();
- if (iter.hasNext()) {
- appendValue(bld, iter.next());
- while (iter.hasNext()) {
- bld.append(',');
- appendValue(bld, iter.next());
- }
- }
- bld.append(']');
- }
-
- private static void appendQuotedString(StringBuffer bld, String str) {
- if (str.indexOf('\'') < 0) {
- bld.append('\'');
- bld.append(str);
- bld.append('\'');
- } else
- appendEscaped(bld, '"', str);
- }
-
- private static void appendEscaped(StringBuffer bld, char delimiter, String str) {
- bld.append(delimiter);
- int top = str.length();
- for (int idx = 0; idx < top; ++idx) {
- char c = str.charAt(idx);
- if (c == delimiter || c == '\\')
- bld.append('\\');
- bld.append(c);
- }
- bld.append(delimiter);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchExpression.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchExpression.java
deleted file mode 100644
index dfdf61999..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchExpression.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Arrays;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.metadata.expression.*;
-
-/**
- * The MatchExpression is a wrapper for an {@link IExpression} that is expected
- * to return a boolean value. The wrapper provides the evaluation context needed
- * to evaluate the expression.
- */
-public class MatchExpression<T> extends Unary implements IMatchExpression<T> {
- private static final Object[] noParams = new Object[0];
- private final Object[] parameters;
-
- MatchExpression(Expression expression, Object[] parameters) {
- super(expression);
- this.parameters = parameters == null ? noParams : parameters;
- }
-
- public boolean accept(IExpressionVisitor visitor) {
- return operand.accept(visitor);
- }
-
- public IEvaluationContext createContext() {
- return EvaluationContext.create(parameters, ExpressionFactory.THIS);
- }
-
- public boolean equals(Object o) {
- return super.equals(o) && Arrays.equals(parameters, ((MatchExpression<?>) o).parameters);
- }
-
- public Object evaluate(IEvaluationContext context) {
- return operand.evaluate(parameters.length == 0 ? context : EvaluationContext.create(context, parameters));
- }
-
- public int getExpressionType() {
- return 0;
- }
-
- public String getOperator() {
- throw new UnsupportedOperationException();
- }
-
- public Object[] getParameters() {
- return parameters;
- }
-
- /**
- * Returns the predicate expression that is used for the match
- * @return The predicate expression
- */
- IExpression getPredicate() {
- return operand;
- }
-
- public int getPriority() {
- return operand.getPriority();
- }
-
- public int hashCode() {
- return operand.hashCode() * 31 + CollectionUtils.hashCode(parameters);
- }
-
- public boolean isMatch(IEvaluationContext context, T value) {
- ExpressionFactory.THIS.setValue(context, value);
- return Boolean.TRUE == operand.evaluate(context);
- }
-
- public boolean isMatch(T value) {
- return isMatch(createContext(), value);
- }
-
- public void toLDAPString(StringBuffer bld) {
- operand.toLDAPString(bld);
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- operand.toString(bld, rootVariable);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchIteratorFilter.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchIteratorFilter.java
deleted file mode 100644
index 8d21ed8f7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchIteratorFilter.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-/**
- * An iterator filter using a boolean {@link #isMatch(Object)} method.
- */
-public abstract class MatchIteratorFilter<T> implements Iterator<T> {
- private static final Object NO_ELEMENT = new Object();
-
- private final Iterator<? extends T> innerIterator;
-
- private T nextObject = noElement();
-
- public MatchIteratorFilter(Iterator<? extends T> iterator) {
- this.innerIterator = iterator;
- }
-
- public boolean hasNext() {
- return positionNext();
- }
-
- public T next() {
- if (!positionNext())
- throw new NoSuchElementException();
-
- T nxt = nextObject;
- nextObject = noElement();
- return nxt;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- protected Iterator<? extends T> getInnerIterator() {
- return innerIterator;
- }
-
- protected abstract boolean isMatch(T val);
-
- private boolean positionNext() {
- if (nextObject != NO_ELEMENT)
- return true;
-
- while (innerIterator.hasNext()) {
- T nxt = innerIterator.next();
- if (isMatch(nxt)) {
- nextObject = nxt;
- return true;
- }
- }
- return false;
- }
-
- @SuppressWarnings("unchecked")
- private static <T> T noElement() {
- return (T) NO_ELEMENT;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Matches.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Matches.java
deleted file mode 100644
index 0c8f0ba21..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Matches.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.osgi.framework.Filter;
-
-/**
- * <p>A class that performs &quot;matching&quot; The actual algorithm used for
- * performing the match varies depending on the types of the items to match.</p>
- * <p>The following things can be matched:</p>
- * <table border="1" cellpadding="3">
- * <tr><th>LHS</th><th>RHS</th><th>Implemented as</th></tr>
- * <tr><td>{@link String}</td><td>{@link SimplePattern}</td><td>rhs.isMatch(lhs)</td></tr>
- * <tr><td>{@link String}</td><td>{@link LDAPApproximation}</td><td>rhs.isMatch(lhs)</td></tr>
- * <tr><td>&lt;any&gt;</td><td>{@link Class}</td><td>rhs.isInstance(lhs)</td></tr>
- * <tr><td>{@link Class}</td><td>{@link Class}</td><td>rhs.isAssignableFrom(lhs)</td></tr>
- * </table>
- */
-public class Matches extends Binary {
- protected Matches(Expression lhs, Expression rhs) {
- super(lhs, rhs);
- }
-
- public Object evaluate(IEvaluationContext context) {
- return Boolean.valueOf(match(lhs.evaluate(context), rhs.evaluate(context)));
- }
-
- protected boolean match(Object lval, Object rval) {
- if (lval == null || rval == null)
- return false;
-
- if (rval instanceof IRequirement) {
- IRequirement requirement = (IRequirement) rval;
- if (lval instanceof IInstallableUnit)
- return Boolean.valueOf(((IInstallableUnit) lval).satisfies(requirement));
- } else if (rval instanceof VersionRange) {
- VersionRange range = (VersionRange) rval;
- if (lval instanceof Version)
- return Boolean.valueOf(range.isIncluded((Version) lval));
- if (lval instanceof String)
- return range.isIncluded(Version.create((String) lval));
- } else if (rval instanceof SimplePattern) {
- if (lval instanceof CharSequence)
- return ((SimplePattern) rval).isMatch((CharSequence) lval);
- if (lval instanceof Character || lval instanceof Number || lval instanceof Boolean)
- return ((SimplePattern) rval).isMatch(lval.toString());
- } else if (rval instanceof LDAPFilter) {
- return ((LDAPFilter) rval).isMatch(MemberProvider.create(lval, true));
- } else if (rval instanceof Filter) {
- if (lval instanceof IInstallableUnit)
- return Boolean.valueOf(((Filter) rval).match(new Hashtable<String, String>(((IInstallableUnit) lval).getProperties())));
- if (lval instanceof Dictionary<?, ?>)
- return Boolean.valueOf(((Filter) rval).match((Dictionary<?, ?>) lval));
- if (lval instanceof Map<?, ?>)
- return Boolean.valueOf(((Filter) rval).match(new Hashtable<Object, Object>((Map<?, ?>) lval)));
- } else if (rval instanceof Locale) {
- if (lval instanceof String)
- return Boolean.valueOf(matchLocaleVariants((Locale) rval, (String) lval));
- } else if (rval instanceof IMatchExpression<?>) {
- @SuppressWarnings("unchecked")
- IMatchExpression<Object> me = (IMatchExpression<Object>) rval;
- return me.isMatch(lval);
- } else if (rval instanceof IUpdateDescriptor) {
- if (lval instanceof IInstallableUnit)
- return Boolean.valueOf(((IUpdateDescriptor) rval).isUpdateOf((IInstallableUnit) lval));
- } else if (rval instanceof LDAPApproximation) {
- if (lval instanceof CharSequence)
- return ((LDAPApproximation) rval).isMatch((CharSequence) lval);
- if (lval instanceof Character || lval instanceof Number || lval instanceof Boolean)
- return ((LDAPApproximation) rval).isMatch(lval.toString());
- } else if (rval instanceof Class<?>) {
- Class<?> rclass = (Class<?>) rval;
- return lval instanceof Class<?> ? rclass.isAssignableFrom((Class<?>) lval) : rclass.isInstance(lval);
- }
- throw new IllegalArgumentException("Cannot match a " + lval.getClass().getName() + " with a " + rval.getClass().getName()); //$NON-NLS-1$//$NON-NLS-2$
- }
-
- public int getExpressionType() {
- return TYPE_MATCHES;
- }
-
- public String getOperator() {
- return OPERATOR_MATCHES;
- }
-
- public void toLDAPString(StringBuffer buf) {
- if (!(rhs instanceof Literal))
- throw new UnsupportedOperationException();
-
- boolean escapeWild = true;
- Object val = rhs.evaluate(null);
- buf.append('(');
- appendLDAPAttribute(buf);
- if (val instanceof LDAPApproximation) {
- buf.append(getOperator());
- } else if (val instanceof SimplePattern) {
- buf.append('=');
- escapeWild = false;
- } else
- throw new UnsupportedOperationException();
- appendLDAPEscaped(buf, val.toString(), escapeWild);
- buf.append(')');
- }
-
- private static boolean equals(String a, String b, int startPos, int endPos) {
- if (endPos - startPos != b.length())
- return false;
-
- int bidx = 0;
- while (startPos < endPos)
- if (a.charAt(startPos++) != b.charAt(bidx++))
- return false;
- return true;
- }
-
- private static boolean matchLocaleVariants(Locale rval, String lval) {
- int uscore = lval.indexOf('_');
- if (uscore < 0)
- // No country and no variant. Just match language
- return lval.equals(rval.getLanguage());
-
- if (!equals(lval, rval.getLanguage(), 0, uscore))
- // Language part doesn't match. Give up.
- return false;
-
- // Check country and variant
- int countryStart = uscore + 1;
- uscore = lval.indexOf('_', countryStart);
- return uscore < 0 ? equals(lval, rval.getCountry(), countryStart, lval.length()) //
- : equals(lval, rval.getCountry(), countryStart, uscore) && equals(lval, rval.getVariant(), uscore + 1, lval.length());
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Member.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Member.java
deleted file mode 100644
index d9a975cd0..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Member.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.lang.reflect.*;
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-
-/**
- * <p>An expression that performs member calls to obtain some value
- * from some object instance. It uses standard bean semantics so
- * that an attempt to obtain &quot;value&quot; will cause an
- * attempt to call <code>getValue()</code> and if no such method
- * exists, <code>isValue()</code> and if that doesn't work either,
- * <code>value()</code>.</p>
- */
-public abstract class Member extends Unary {
-
- public static final class DynamicMember extends Member {
- private static final String GET_PREFIX = "get"; //$NON-NLS-1$
- private static final String IS_PREFIX = "is"; //$NON-NLS-1$
- private static final Class<?>[] NO_ARG_TYPES = new Class[0];
-
- private Class<?> lastClass;
-
- private transient Method method;
- private transient String methodName;
-
- DynamicMember(Expression operand, String name) {
- super(operand, name, Expression.emptyArray);
- }
-
- public Object evaluate(IEvaluationContext context) {
- return invoke(operand.evaluate(context));
- }
-
- public final Object invoke(Object self) {
- if (self instanceof IMemberProvider)
- return ((IMemberProvider) self).getMember(name);
-
- if (self == null)
- throw new IllegalArgumentException("Cannot access member \'" + name + "\' in null"); //$NON-NLS-1$//$NON-NLS-2$
-
- Class<?> c = self.getClass();
- synchronized (this) {
- if (methodName == null) {
- String n = name;
- if (!(n.startsWith(GET_PREFIX) || n.startsWith(IS_PREFIX)))
- n = GET_PREFIX + Character.toUpperCase(n.charAt(0)) + n.substring(1);
- methodName = n;
- }
- if (lastClass == null || !lastClass.isAssignableFrom(c)) {
- Method m;
- for (;;) {
- try {
- m = c.getMethod(methodName, NO_ARG_TYPES);
- if (!Modifier.isPublic(m.getModifiers()))
- throw new NoSuchMethodException();
- break;
- } catch (NoSuchMethodException e) {
- if (methodName.startsWith(GET_PREFIX))
- // Switch from using getXxx() to isXxx()
- methodName = IS_PREFIX + Character.toUpperCase(name.charAt(0)) + name.substring(1);
- else if (methodName.startsWith(IS_PREFIX))
- // Switch from using isXxx() to xxx()
- methodName = name;
- else
- throw new IllegalArgumentException("Cannot find a public member \'" + name + "\' in a " + self.getClass().getName()); //$NON-NLS-1$//$NON-NLS-2$
- }
- }
-
- // Since we already checked that it's public. This will speed
- // up the calls a bit.
- m.setAccessible(true);
- lastClass = c;
- method = m;
- }
-
- Exception checked;
- try {
- return method.invoke(self, NO_ARGS);
- } catch (IllegalArgumentException e) {
- throw e;
- } catch (IllegalAccessException e) {
- checked = e;
- } catch (InvocationTargetException e) {
- Throwable cause = e.getTargetException();
- if (cause instanceof RuntimeException)
- throw (RuntimeException) cause;
- if (cause instanceof Error)
- throw (Error) cause;
- checked = (Exception) cause;
- }
- throw new RuntimeException("Problem invoking " + methodName + " on a " + self.getClass().getName(), checked); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
-
- public static class LengthMember extends Member {
- private static final Integer ZERO = new Integer(0);
-
- LengthMember(Expression operand) {
- super(operand, "length", Expression.emptyArray); //$NON-NLS-1$
- }
-
- public Object evaluate(IEvaluationContext context) {
- int len = getLength(operand.evaluate(context));
- return len == 0 ? ZERO : new Integer(len);
- }
-
- int getLength(Object val) {
- if (val == null)
- return 0;
-
- if (val.getClass().isArray())
- return java.lang.reflect.Array.getLength(val);
-
- if (val instanceof Collection<?>)
- return ((Collection<?>) val).size();
-
- if (val instanceof String)
- return ((String) val).length();
-
- if (val instanceof Map<?, ?>)
- return ((Map<?, ?>) val).size();
-
- return 0;
- }
- }
-
- public static class EmptyMember extends LengthMember {
- EmptyMember(Expression operand) {
- super(operand);
- }
-
- public Object evaluate(IEvaluationContext context) {
- Object val = operand.evaluate(context);
- boolean empty = (val instanceof Iterator<?>) ? !((Iterator<?>) val).hasNext() : getLength(val) == 0;
- return Boolean.valueOf(empty);
- }
- }
-
- static final Object[] NO_ARGS = new Object[0];
-
- static Member createDynamicMember(Expression operand, String name) {
- return new DynamicMember(operand, name);
- }
-
- protected final Expression[] argExpressions;
-
- final String name;
-
- protected Member(Expression operand, String name, Expression[] args) {
- super(operand);
- this.name = name.intern();
- this.argExpressions = args;
- }
-
- public boolean accept(IExpressionVisitor visitor) {
- if (super.accept(visitor))
- for (int idx = 0; idx < argExpressions.length; ++idx)
- if (!argExpressions[idx].accept(visitor))
- return false;
- return true;
- }
-
- public int compareTo(Expression e) {
- int cmp = super.compareTo(e);
- if (cmp == 0) {
- cmp = name.compareTo(((Member) e).name);
- if (cmp == 0)
- cmp = compare(argExpressions, ((Member) e).argExpressions);
- }
- return cmp;
- }
-
- public boolean equals(Object o) {
- if (super.equals(o)) {
- Member mo = (Member) o;
- return name.equals(mo.name) && equals(argExpressions, mo.argExpressions);
- }
- return false;
- }
-
- public int getExpressionType() {
- return TYPE_MEMBER;
- }
-
- public String getName() {
- return name;
- }
-
- public String getOperator() {
- return OPERATOR_MEMBER;
- }
-
- public int getPriority() {
- return PRIORITY_MEMBER;
- }
-
- public int hashCode() {
- int result = 31 + name.hashCode();
- result = 31 * result + operand.hashCode();
- return 31 * result + hashCode(argExpressions);
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- if (operand != rootVariable) {
- appendOperand(bld, rootVariable, operand, getPriority());
- bld.append('.');
- }
- bld.append(name);
- if (argExpressions.length > 0) {
- bld.append('(');
- elementsToString(bld, rootVariable, argExpressions);
- bld.append(')');
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MemberProvider.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MemberProvider.java
deleted file mode 100644
index c466d99d8..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MemberProvider.java
+++ /dev/null
@@ -1,135 +0,0 @@
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.metadata.expression.IMemberProvider;
-import org.osgi.framework.ServiceReference;
-
-public abstract class MemberProvider implements IMemberProvider {
-
- static class DictionaryMemberProvider extends MemberProvider {
- private final Dictionary<String, ? extends Object> dictionary;
-
- public DictionaryMemberProvider(Dictionary<String, ? extends Object> dictionary) {
- this.dictionary = dictionary;
- }
-
- public Object getMember(String memberName) {
- return dictionary.get(memberName);
- }
- }
-
- static class CIDictionaryMemberProvider extends DictionaryMemberProvider {
- public CIDictionaryMemberProvider(Dictionary<String, ? extends Object> dictionary) {
- super(lowerCaseKeys(dictionary));
- }
-
- @Override
- public Object getMember(String memberName) {
- return super.getMember(memberName == null ? null : memberName.toLowerCase());
- }
-
- private static Dictionary<String, ? extends Object> lowerCaseKeys(Dictionary<String, ? extends Object> dictionary) {
- boolean hasUpperCase = false;
- for (Enumeration<String> keys = dictionary.keys(); keys.hasMoreElements();) {
- String key = keys.nextElement();
- if (key.toLowerCase() != key) {
- hasUpperCase = true;
- break;
- }
- }
- if (!hasUpperCase)
- return dictionary;
-
- Dictionary<String, Object> lcMap = new Hashtable<String, Object>(dictionary.size());
- for (Enumeration<String> keys = dictionary.keys(); keys.hasMoreElements();) {
- String key = keys.nextElement();
- if (lcMap.put(key.toLowerCase(), dictionary.get(key)) != null)
- throw new IllegalArgumentException("case variants of the same key name: '" + key + '\''); //$NON-NLS-1$
- }
- return lcMap;
- }
- }
-
- static class MapMemberProvider extends MemberProvider {
- private final Map<String, ? extends Object> map;
-
- public MapMemberProvider(Map<String, ? extends Object> map) {
- this.map = map;
- }
-
- public Object getMember(String memberName) {
- return map.get(memberName);
- }
- }
-
- static class CIMapMemberProvider extends MapMemberProvider {
- public CIMapMemberProvider(Map<String, ? extends Object> map) {
- super(lowerCaseKeys(map));
- }
-
- @Override
- public Object getMember(String memberName) {
- return super.getMember(memberName == null ? null : memberName.toLowerCase());
- }
-
- private static Map<String, ? extends Object> lowerCaseKeys(Map<String, ? extends Object> map) {
- boolean hasUpperCase = false;
- Set<? extends Entry<String, ? extends Object>> entrySet = map.entrySet();
- for (Entry<String, ?> entry : entrySet) {
- String key = entry.getKey();
- String lowKey = key.toLowerCase();
- if (key != lowKey) {
- hasUpperCase = true;
- break;
- }
- }
- if (!hasUpperCase)
- return map;
-
- Map<String, Object> lcMap = new HashMap<String, Object>(map.size());
- for (Entry<String, ?> entry : entrySet) {
- if (lcMap.put(entry.getKey().toLowerCase(), entry.getValue()) != null)
- throw new IllegalArgumentException("case variants of the same key name: '" + entry.getKey() + '\''); //$NON-NLS-1$
- }
- return lcMap;
- }
- }
-
- static class ServiceRefMemberProvider extends MemberProvider {
- private final ServiceReference serviceRef;
-
- public ServiceRefMemberProvider(ServiceReference serviceRef) {
- this.serviceRef = serviceRef;
- }
-
- public Object getMember(String memberName) {
- return serviceRef.getProperty(memberName);
- }
- }
-
- private static final MemberProvider emptyProvider = create(CollectionUtils.emptyMap(), false);
-
- /**
- * Create a new member provider on the given value. The value can be an instance of a {@link Map}, {@link Dictionary},
- * or {@link ServiceReference}.
- * @param value The value that provides the members
- * @param caseInsensitive <code>true</code> if the members should be retrievable in a case insensitive way.
- * @return A member provided that is backed by <code>value</code>.
- */
- @SuppressWarnings("unchecked")
- public static MemberProvider create(Object value, boolean caseInsensitive) {
- if (value instanceof Map<?, ?>)
- return caseInsensitive ? new CIMapMemberProvider((Map<String, ?>) value) : new MapMemberProvider((Map<String, ?>) value);
- if (value instanceof Dictionary<?, ?>)
- return caseInsensitive ? new CIDictionaryMemberProvider((Dictionary<String, ?>) value) : new DictionaryMemberProvider((Dictionary<String, ?>) value);
- if (value instanceof ServiceReference)
- return new ServiceRefMemberProvider((ServiceReference) value);
- throw new IllegalArgumentException();
- }
-
- public static MemberProvider emptyProvider() {
- return emptyProvider;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/NAry.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/NAry.java
deleted file mode 100644
index 805cff2ab..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/NAry.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IExpressionVisitor;
-
-/**
- * The abstract baseclass for all N-ary expressions
- */
-public abstract class NAry extends Expression {
- public final Expression[] operands;
-
- protected NAry(Expression[] operands) {
- this.operands = operands;
- }
-
- public boolean accept(IExpressionVisitor visitor) {
- if (super.accept(visitor))
- for (int idx = 0; idx < operands.length; ++idx)
- if (!operands[idx].accept(visitor))
- return false;
- return true;
- }
-
- public int compareTo(Expression e) {
- int cmp = super.compareTo(e);
- if (cmp == 0)
- cmp = compare(operands, ((NAry) e).operands);
- return cmp;
- }
-
- public boolean equals(Object o) {
- return super.equals(o) && equals(operands, ((NAry) o).operands);
- }
-
- public abstract String getOperator();
-
- public int hashCode() {
- return hashCode(operands);
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- appendOperand(bld, rootVariable, operands[0], getPriority());
- for (int idx = 1; idx < operands.length; ++idx) {
- bld.append(' ');
- bld.append(getOperator());
- bld.append(' ');
- appendOperand(bld, rootVariable, operands[idx], getPriority());
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Not.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Not.java
deleted file mode 100644
index 5246859a3..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Not.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An expression that yields <code>true</code> when its operand does not.
- */
-final class Not extends Unary {
- Not(Expression operand) {
- super(operand);
- }
-
- public Object evaluate(IEvaluationContext context) {
- return Boolean.valueOf(operand.evaluate(context) != Boolean.TRUE);
- }
-
- public int getExpressionType() {
- return TYPE_NOT;
- }
-
- public String getOperator() {
- return OPERATOR_NOT;
- }
-
- public int getPriority() {
- return PRIORITY_NOT;
- }
-
- public int hashCode() {
- return 3 * operand.hashCode();
- }
-
- public void toLDAPString(StringBuffer buf) {
- buf.append("(!"); //$NON-NLS-1$
- operand.toLDAPString(buf);
- buf.append(')');
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Or.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Or.java
deleted file mode 100644
index 32805042e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Or.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * n-ary OR operator. The full evaluation is <code>false</code> if none of its operands
- * evaluate to <code>true</code>.
- */
-final class Or extends NAry {
- public Or(Expression[] operands) {
- super(assertLength(operands, 2, OPERATOR_OR));
- }
-
- public Object evaluate(IEvaluationContext context) {
- for (int idx = 0; idx < operands.length; ++idx) {
- if (operands[idx].evaluate(context) == Boolean.TRUE)
- return Boolean.TRUE;
- }
- return Boolean.FALSE;
- }
-
- public int getExpressionType() {
- return TYPE_OR;
- }
-
- public String getOperator() {
- return OPERATOR_OR;
- }
-
- public int getPriority() {
- return PRIORITY_OR;
- }
-
- public void toLDAPString(StringBuffer buf) {
- buf.append("(|"); //$NON-NLS-1$
- for (int idx = 0; idx < operands.length; ++idx)
- operands[idx].toLDAPString(buf);
- buf.append(')');
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Parameter.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Parameter.java
deleted file mode 100644
index b4c56346e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Parameter.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * The abstract base class for the indexed and keyed parameters
- */
-public class Parameter extends Expression {
- final int position;
-
- Parameter(int position) {
- this.position = position;
- }
-
- public int compareTo(Expression e) {
- int cmp = super.compareTo(e);
- if (cmp == 0)
- cmp = position - ((Parameter) e).position;
- return cmp;
- }
-
- public boolean equals(Object o) {
- if (o == this)
- return true;
- if (o == null)
- return false;
- return getClass() == o.getClass() && position == ((Parameter) o).position;
- }
-
- public Object evaluate(IEvaluationContext context) {
- return context.getParameter(position);
- }
-
- public int getExpressionType() {
- return TYPE_PARAMETER;
- }
-
- public String getOperator() {
- return OPERATOR_PARAMETER;
- }
-
- public int getPriority() {
- return PRIORITY_VARIABLE;
- }
-
- public int hashCode() {
- return 31 * (1 + position);
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- bld.append('$');
- bld.append(position);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Pipe.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Pipe.java
deleted file mode 100644
index 679fd2ea0..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Pipe.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.KeyWithLocale;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-
-public class Pipe extends NAry {
-
- private class NoIndexProvider implements IIndexProvider<Object> {
- private final IIndexProvider<?> indexProvider;
- private Iterator<Object> everything;
-
- NoIndexProvider(IIndexProvider<?> indexProvider) { //
- this.indexProvider = indexProvider;
- }
-
- public IIndex<Object> getIndex(String memberName) {
- return null;
- }
-
- public Iterator<Object> everything() {
- return everything;
- }
-
- public Object getManagedProperty(Object client, String memberName, Object key) {
- if (indexProvider != null)
- return indexProvider.getManagedProperty(client, memberName, key);
- if (client instanceof IInstallableUnit && memberName.equals(InstallableUnit.MEMBER_TRANSLATED_PROPERTIES)) {
- IInstallableUnit iu = (IInstallableUnit) client;
- return key instanceof KeyWithLocale ? iu.getProperty(((KeyWithLocale) key).getKey()) : iu.getProperty(key.toString());
- }
- return null;
- }
-
- @SuppressWarnings("unchecked")
- void setEverything(Iterator<?> everything) {
- this.everything = (Iterator<Object>) everything;
- }
- }
-
- public static Expression createPipe(Expression[] operands) {
- // We expect two types of expressions. The ones that act on THIS
- // i.e. boolean match expressions or the ones that act EVERYTHING
- // by iterating a collection.
- //
- // Our task here is to convert all booleans into collections so
- // that:
- // <boolean expression> becomes select(x | <boolean expression)
- //
- // If we find consecutive boolean expressions, we can actually
- // make one more optimization:
- // <expr1>, <expr2> becomes select(x | <expr1> && <expr2>)
-
- IExpressionFactory factory = ExpressionUtil.getFactory();
- ArrayList<Expression> pipeables = new ArrayList<Expression>();
- ArrayList<Expression> booleans = new ArrayList<Expression>();
- VariableFinder finder = new VariableFinder(ExpressionFactory.EVERYTHING);
- for (int idx = 0; idx < operands.length; ++idx) {
- Expression operand = operands[idx];
- finder.reset();
- operand.accept(finder);
- if (finder.isFound()) {
- if (!booleans.isEmpty()) {
- // Concatenate all found booleans.
- pipeables.add(makePipeableOfBooleans(factory, booleans));
- booleans.clear();
- }
- pipeables.add(operand);
- } else
- booleans.add(operand);
- }
-
- if (!booleans.isEmpty()) {
- if (pipeables.isEmpty())
- return normalizeBoolean(factory, booleans);
- pipeables.add(makePipeableOfBooleans(factory, booleans));
- }
- int top = pipeables.size();
- if (top > 1)
- return new Pipe(pipeables.toArray(new Expression[top]));
- return (top == 1) ? pipeables.get(0) : Literal.TRUE_CONSTANT;
- }
-
- private static Expression normalizeBoolean(IExpressionFactory factory, ArrayList<Expression> booleans) {
- int top = booleans.size();
- Expression boolExpr;
- if (top > 1)
- boolExpr = (Expression) factory.and(booleans.toArray(new IExpression[top]));
- else if (top == 1)
- boolExpr = booleans.get(0);
- else
- boolExpr = Literal.TRUE_CONSTANT;
- return boolExpr;
- }
-
- private static Expression makePipeableOfBooleans(IExpressionFactory factory, ArrayList<Expression> booleans) {
- Expression boolExpr = normalizeBoolean(factory, booleans);
- return (Expression) factory.select(ExpressionFactory.EVERYTHING, factory.lambda(ExpressionFactory.THIS, boolExpr));
- }
-
- private Pipe(Expression[] operands) {
- super(operands);
- }
-
- public int getExpressionType() {
- return TYPE_PIPE;
- }
-
- @Override
- public String getOperator() {
- return "pipe"; //$NON-NLS-1$
- }
-
- @Override
- public Object evaluate(IEvaluationContext context) {
- return evaluateAsIterator(context);
- }
-
- @Override
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- Iterator<?> iterator = operands[0].evaluateAsIterator(context);
- if (operands.length == 0 || !iterator.hasNext())
- return iterator;
-
- Class<Object> elementClass = Object.class;
- Variable everything = ExpressionFactory.EVERYTHING;
- IEvaluationContext nextContext = EvaluationContext.create(context, everything);
- NoIndexProvider noIndexProvider = new NoIndexProvider(context.getIndexProvider());
- nextContext.setIndexProvider(noIndexProvider);
- for (int idx = 1; idx < operands.length; ++idx) {
- Expression expr = operands[idx];
- noIndexProvider.setEverything(iterator);
- everything.setValue(nextContext, new Everything<Object>(elementClass, noIndexProvider));
- iterator = expr.evaluateAsIterator(nextContext);
- if (!iterator.hasNext())
- break;
- }
- return iterator;
- }
-
- @Override
- public int getPriority() {
- return PRIORITY_COLLECTION;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/QueryResult.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/QueryResult.java
deleted file mode 100644
index 2c2619a01..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/QueryResult.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.lang.reflect.Array;
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.equinox.p2.query.IQueryResult;
-
-/**
- * A result optimized for dealing with iterators returned from
- * expression evaluation.
- */
-public class QueryResult<T> implements IQueryResult<T> {
-
- private final IRepeatableIterator<T> iterator;
- private boolean firstUse = true;
-
- /**
- * Create an QueryResult based on the given iterator. The <code>oneShot</code> parameter
- * can be set to <code>true</code> if the returned instance is expected to be perused
- * only once. This will allow some optimizations since the result of the iteration doesn't
- * need to be copied in preparation for a second iteration.
- *
- * @param iterator The iterator to use as the result iterator.
- */
- public QueryResult(Iterator<T> iterator) {
- this.iterator = (iterator instanceof IRepeatableIterator<?>) ? (IRepeatableIterator<T>) iterator : RepeatableIterator.create(iterator);
- }
-
- public QueryResult(Collection<T> collection) {
- this.iterator = RepeatableIterator.create(collection);
- }
-
- public boolean isEmpty() {
- return !iterator.hasNext();
- }
-
- public Iterator<T> iterator() {
- if (firstUse) {
- firstUse = false;
- return iterator;
- }
- return iterator.getCopy();
- }
-
- @SuppressWarnings("unchecked")
- public T[] toArray(Class<T> clazz) {
- Object provider = iterator.getIteratorProvider();
- if (provider.getClass().isArray())
- return (T[]) provider;
-
- Collection<T> c = toUnmodifiableSet();
- return c.toArray((T[]) Array.newInstance(clazz, c.size()));
- }
-
- @SuppressWarnings("unchecked")
- public Set<T> toSet() {
- Object provider = iterator.getIteratorProvider();
- if (provider instanceof Collection<?>)
- return new HashSet<T>((Collection<T>) provider);
- if (provider instanceof IIndexProvider<?>)
- return iteratorToSet(((IIndexProvider<T>) provider).everything());
- if (provider.getClass().isArray()) {
- T[] elems = (T[]) provider;
- int idx = elems.length;
- HashSet<T> copy = new HashSet<T>(idx);
- while (--idx >= 0)
- copy.add(elems[idx]);
- return copy;
- }
- if (provider instanceof Map<?, ?>)
- return new HashSet<T>((Set<T>) ((Map<?, ?>) provider).entrySet());
- return iteratorToSet(iterator());
- }
-
- public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor) {
- return query.perform(iterator());
- }
-
- @SuppressWarnings("unchecked")
- public Set<T> toUnmodifiableSet() {
- Object provider = iterator.getIteratorProvider();
- if (provider instanceof Set<?>)
- return Collections.unmodifiableSet((Set<T>) provider);
- if (provider instanceof Map<?, ?>)
- return Collections.unmodifiableSet((Set<T>) ((Map<?, ?>) provider).entrySet());
- return toSet();
- }
-
- private Set<T> iteratorToSet(Iterator<T> iter) {
- HashSet<T> set = new HashSet<T>();
- while (iter.hasNext())
- set.add(iter.next());
- return set;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RangeFunction.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RangeFunction.java
deleted file mode 100644
index 068dc13d0..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RangeFunction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
-/**
- * A function that creates a {@link VersionRange} from a String
- */
-public final class RangeFunction extends Function {
-
- public RangeFunction(Expression[] operands) {
- super(assertLength(operands, 1, 1, KEYWORD_RANGE));
- }
-
- boolean assertSingleArgumentClass(Object v) {
- return v instanceof String;
- }
-
- Object createInstance(Object arg) {
- return new VersionRange((String) arg);
- }
-
- public String getOperator() {
- return KEYWORD_RANGE;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RepeatableIterator.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RepeatableIterator.java
deleted file mode 100644
index 5f94dabd7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RepeatableIterator.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-import org.eclipse.equinox.p2.query.IQueryResult;
-
-public class RepeatableIterator<T> implements IRepeatableIterator<T> {
- private final Collection<T> values;
- private final Iterator<T> iterator;
-
- @SuppressWarnings("unchecked")
- public static <T> IRepeatableIterator<T> create(Object unknown) {
- if (unknown.getClass().isArray())
- return create((T[]) unknown);
- if (unknown instanceof Iterator<?>)
- return create((Iterator<T>) unknown);
- if (unknown instanceof List<?>)
- return create((List<T>) unknown);
- if (unknown instanceof Collection<?>)
- return create((Collection<T>) unknown);
- if (unknown instanceof Map<?, ?>)
- return create((Set<T>) ((Map<?, ?>) unknown).entrySet());
- if (unknown instanceof IQueryResult<?>)
- return create((IQueryResult<T>) unknown);
- if (unknown instanceof IIndexProvider<?>)
- return create((IIndexProvider<T>) unknown);
- throw new IllegalArgumentException("Cannot convert a " + unknown.getClass().getName() + " into an iterator"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public static <T> IRepeatableIterator<T> create(Iterator<T> iterator) {
- return iterator instanceof IRepeatableIterator<?> ? ((IRepeatableIterator<T>) iterator).getCopy() : new RepeatableIterator<T>(iterator);
- }
-
- public static <T> IRepeatableIterator<T> create(Collection<T> values) {
- return new RepeatableIterator<T>(values);
- }
-
- public static <T> IRepeatableIterator<T> create(IQueryResult<T> values) {
- return new QueryResultIterator<T>(values);
- }
-
- public static <T> IRepeatableIterator<T> create(T[] values) {
- return new ArrayIterator<T>(values);
- }
-
- public static <T> IRepeatableIterator<T> create(IIndexProvider<T> values) {
- return new IndexProviderIterator<T>(values);
- }
-
- RepeatableIterator(Iterator<T> iterator) {
- HashSet<T> v = new HashSet<T>();
- while (iterator.hasNext())
- v.add(iterator.next());
- values = v;
- this.iterator = v.iterator();
- }
-
- RepeatableIterator(Collection<T> values) {
- this.values = values;
- this.iterator = values.iterator();
- }
-
- public IRepeatableIterator<T> getCopy() {
- return new RepeatableIterator<T>(values);
- }
-
- public boolean hasNext() {
- return iterator.hasNext();
- }
-
- public T next() {
- return iterator.next();
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- public Object getIteratorProvider() {
- return values;
- }
-
- static class ArrayIterator<T> implements IRepeatableIterator<T> {
- private final T[] array;
- private int position = -1;
-
- public ArrayIterator(T[] array) {
- this.array = array;
- }
-
- public Object getIteratorProvider() {
- return array;
- }
-
- public boolean hasNext() {
- return position + 1 < array.length;
- }
-
- public T next() {
- if (++position >= array.length)
- throw new NoSuchElementException();
- return array[position];
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- public IRepeatableIterator<T> getCopy() {
- return new ArrayIterator<T>(array);
- }
- }
-
- static class IndexProviderIterator<T> implements IRepeatableIterator<T> {
- private final IIndexProvider<T> indexProvider;
- private final Iterator<T> iterator;
-
- IndexProviderIterator(IIndexProvider<T> indexProvider) {
- this.iterator = indexProvider.everything();
- this.indexProvider = indexProvider;
- }
-
- public IRepeatableIterator<T> getCopy() {
- return new IndexProviderIterator<T>(indexProvider);
- }
-
- public Object getIteratorProvider() {
- return indexProvider;
- }
-
- public boolean hasNext() {
- return iterator.hasNext();
- }
-
- public T next() {
- return iterator.next();
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- }
-
- static class QueryResultIterator<T> implements IRepeatableIterator<T> {
- private final IQueryResult<T> queryResult;
-
- private final Iterator<T> iterator;
-
- QueryResultIterator(IQueryResult<T> queryResult) {
- this.queryResult = queryResult;
- this.iterator = queryResult.iterator();
- }
-
- public IRepeatableIterator<T> getCopy() {
- return new QueryResultIterator<T>(queryResult);
- }
-
- public Object getIteratorProvider() {
- return queryResult;
- }
-
- public boolean hasNext() {
- return iterator.hasNext();
- }
-
- public T next() {
- return iterator.next();
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Select.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Select.java
deleted file mode 100644
index 771dfeb03..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Select.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An expression that yields a new collection consisting of all elements of the
- * <code>collection</code> for which the <code>filter</code> yields <code>true</code>.
- */
-final class Select extends CollectionFilter {
- Select(Expression collection, LambdaExpression lambda) {
- super(collection, lambda);
- }
-
- protected Object evaluate(IEvaluationContext context, Iterator<?> itor) {
- return evaluateAsIterator(context, itor);
- }
-
- protected Iterator<?> evaluateAsIterator(final IEvaluationContext context, Iterator<?> itor) {
- return new MatchIteratorFilter<Object>(itor) {
- protected boolean isMatch(Object val) {
- lambda.getItemVariable().setValue(context, val);
- return lambda.evaluate(context) == Boolean.TRUE;
- }
- };
- }
-
- public int getExpressionType() {
- return TYPE_SELECT;
- }
-
- public String getOperator() {
- return KEYWORD_SELECT;
- }
-
- boolean isCollection() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/SetFunction.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/SetFunction.java
deleted file mode 100644
index fc4bf5a19..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/SetFunction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.HashSet;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-public final class SetFunction extends Function {
-
- public SetFunction(Expression[] operands) {
- super(operands);
- }
-
- public Object evaluate(IEvaluationContext context) {
- HashSet<Object> result = new HashSet<Object>();
- for (int idx = 0; idx < operands.length; ++idx)
- result.add(operands[idx].evaluate(context));
- return result;
- }
-
- public String getOperator() {
- return KEYWORD_SET;
- }
-
- boolean isCollection() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Traverse.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Traverse.java
deleted file mode 100644
index a35e3c760..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Traverse.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An expression that will collect items recursively based on a <code>rule</code>.
- * The <code>rule</code> is applied for each item in the <code>collection</code> and
- * is supposed to create a new collection. The <code>rule</code> is then applied for each item
- * in the new collection. All items are collected into a set and items that are already
- * in that set will not be perused again. The set becomes the result of the traversal.
- */
-final class Traverse extends CollectionFilter {
-
- Traverse(Expression collection, LambdaExpression lambda) {
- super(collection, lambda);
- }
-
- public Object evaluate(IEvaluationContext context, Iterator<?> itor) {
- return evaluateAsIterator(context, itor);
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context, Iterator<?> iterator) {
- HashSet<Object> collector = new HashSet<Object>();
- while (iterator.hasNext())
- traverse(collector, iterator.next(), context);
- return collector.iterator();
- }
-
- public int getExpressionType() {
- return TYPE_TRAVERSE;
- }
-
- public String getOperator() {
- return KEYWORD_TRAVERSE;
- }
-
- void traverse(Set<Object> collector, Object parent, IEvaluationContext context) {
- if (collector.add(parent)) {
- Variable variable = lambda.getItemVariable();
- context = EvaluationContext.create(context, variable);
- variable.setValue(context, parent);
- Iterator<?> subIterator = lambda.evaluateAsIterator(context);
- while (subIterator.hasNext())
- traverse(collector, subIterator.next(), context);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unary.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unary.java
deleted file mode 100644
index 9c6b7d8a5..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unary.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpressionVisitor;
-
-/**
- * The abstract base class for all unary expressions
- */
-public abstract class Unary extends Expression {
- public final Expression operand;
-
- protected Unary(Expression operand) {
- this.operand = operand;
- }
-
- public boolean accept(IExpressionVisitor visitor) {
- return super.accept(visitor) && operand.accept(visitor);
- }
-
- public int compareTo(Expression e) {
- int cmp = super.compareTo(e);
- if (cmp == 0)
- cmp = operand.compareTo(((Unary) e).operand);
- return cmp;
- }
-
- public boolean equals(Object o) {
- return super.equals(o) && operand.equals(((Unary) o).operand);
- }
-
- public Object evaluate(IEvaluationContext context) {
- return operand.evaluate(context);
- }
-
- public int hashCode() {
- return operand.hashCode() * 3 + operand.getExpressionType();
- }
-
- public Expression getOperand() {
- return operand;
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- bld.append(getOperator());
- appendOperand(bld, rootVariable, operand, getPriority());
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/UnaryCollectionFilter.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/UnaryCollectionFilter.java
deleted file mode 100644
index dbf141b21..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/UnaryCollectionFilter.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-abstract class UnaryCollectionFilter extends Unary {
-
- UnaryCollectionFilter(Expression collection) {
- super(collection);
- }
-
- public int hashCode() {
- return 5 * operand.hashCode();
- }
-
- public Object evaluate(IEvaluationContext context) {
- return evaluateAsIterator(context);
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- if (operand instanceof Select) {
- Select select = (Select) operand;
- CollectionFilter.appendProlog(bld, rootVariable, select.operand, getOperator());
- appendOperand(bld, rootVariable, select.lambda, getPriority());
- } else
- CollectionFilter.appendProlog(bld, rootVariable, operand, getOperator());
- bld.append(')');
- }
-
- public int getPriority() {
- return PRIORITY_COLLECTION;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Union.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Union.java
deleted file mode 100644
index 8c731fd66..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Union.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import java.util.Set;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- */
-final class Union extends Binary {
- Union(Expression operand, Expression param) {
- super(operand, param);
- }
-
- public Object evaluate(IEvaluationContext context) {
- return evaluateAsIterator(context);
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- @SuppressWarnings("unchecked")
- Set<Object> resultSet = (Set<Object>) asSet(lhs.evaluate(context), true);
- Iterator<?> itor = rhs.evaluateAsIterator(context);
- while (itor.hasNext())
- resultSet.add(itor.next());
- return RepeatableIterator.create(resultSet);
- }
-
- public int getExpressionType() {
- return TYPE_UNION;
- }
-
- public String getOperator() {
- return KEYWORD_UNION;
- }
-
- public int getPriority() {
- return PRIORITY_COLLECTION;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unique.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unique.java
deleted file mode 100644
index 58d1e5b0a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unique.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An expression that ensures that the elements of its collection is only returned
- * once throughout the whole query.
- */
-final class Unique extends Binary {
- /**
- * A UniqueIterator that uses a set as a discriminator, ensuring that
- * no element is returned twice.
- */
- static class UniqueIterator<T> extends MatchIteratorFilter<T> {
- final Set<T> uniqueSet;
-
- public UniqueIterator(Iterator<? extends T> iterator, Set<T> uniqueSet) {
- super(iterator);
- this.uniqueSet = uniqueSet;
- }
-
- protected boolean isMatch(T val) {
- synchronized (uniqueSet) {
- return uniqueSet.add(val);
- }
- }
- }
-
- Unique(Expression collection, Expression explicitCache) {
- super(collection, explicitCache);
- }
-
- public Object evaluate(IEvaluationContext context) {
- return evaluateAsIterator(context);
- }
-
- @SuppressWarnings("unchecked")
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- Object explicitCache = rhs.evaluate(context);
- Set<Object> uniqueSet;
- if (explicitCache == null)
- // No cache, we just ensure that the iteration is unique
- uniqueSet = new HashSet<Object>();
- else {
- if (!(explicitCache instanceof Set<?>))
- throw new IllegalArgumentException("Unique cache must be a java.util.Set"); //$NON-NLS-1$
- uniqueSet = (Set<Object>) explicitCache;
- }
- return new UniqueIterator<Object>(lhs.evaluateAsIterator(context), uniqueSet);
- }
-
- public int getExpressionType() {
- return TYPE_UNIQUE;
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- CollectionFilter.appendProlog(bld, rootVariable, lhs, getOperator());
- if (rhs != Literal.NULL_CONSTANT)
- appendOperand(bld, rootVariable, rhs, IExpressionConstants.PRIORITY_COMMA);
- bld.append(')');
- }
-
- public String getOperator() {
- return KEYWORD_UNIQUE;
- }
-
- public int getPriority() {
- return PRIORITY_COLLECTION;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Variable.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Variable.java
deleted file mode 100644
index a7adfb738..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Variable.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An expression representing a variable stack in the current thread.
- */
-public class Variable extends Expression {
-
- private final String name;
-
- public Variable(String name) {
- this.name = name;
- }
-
- public int compareTo(Expression e) {
- int cmp = super.compareTo(e);
- if (cmp == 0)
- cmp = name.compareTo(((Variable) e).name);
- return cmp;
- }
-
- public boolean equals(Object o) {
- return super.equals(o) && name.equals(((Variable) o).name);
- }
-
- public final Object evaluate(IEvaluationContext context) {
- return context.getValue(this);
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- Object value = context.getValue(this);
- if (value instanceof IRepeatableIterator<?>)
- return ((IRepeatableIterator<?>) value).getCopy();
-
- Iterator<?> itor = RepeatableIterator.create(value);
- setValue(context, itor);
- return itor;
- }
-
- public int getExpressionType() {
- return TYPE_VARIABLE;
- }
-
- public String getName() {
- return name;
- }
-
- public String getOperator() {
- return "<variable>"; //$NON-NLS-1$
- }
-
- public int getPriority() {
- return PRIORITY_VARIABLE;
- }
-
- public int hashCode() {
- return name.hashCode();
- }
-
- public final void setValue(IEvaluationContext context, Object value) {
- context.setValue(this, value);
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- bld.append(name);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/VersionFunction.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/VersionFunction.java
deleted file mode 100644
index afd9099d4..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/VersionFunction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-
-import org.eclipse.equinox.p2.metadata.Version;
-
-/**
- * A function that creates a {@link Version} from a string
- */
-public final class VersionFunction extends Function {
-
- public VersionFunction(Expression[] operands) {
- super(assertLength(operands, 1, 1, KEYWORD_VERSION));
- }
-
- boolean assertSingleArgumentClass(Object v) {
- return v instanceof String;
- }
-
- Object createInstance(Object arg) {
- return Version.create((String) arg);
- }
-
- public String getOperator() {
- return KEYWORD_VERSION;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/WrappedIQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/WrappedIQuery.java
deleted file mode 100644
index b6f8efa8f..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/WrappedIQuery.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.query.IMatchQuery;
-import org.eclipse.equinox.p2.query.IQuery;
-
-public final class WrappedIQuery extends Function {
-
- /**
- * <p>The WrappedIQuery constructor takes an array with one or two arguments.
- * The first argument must evaluate to an instance of {@link IQuery}. The second
- * argument is optional. The following applies:</p><ul>
- * <li>If first argument evaluates to an instance of {@link IMatchQuery}, then
- * a provided second argument assumed to be the candidate to match. The
- * variable <code>this</code> will be used if no second argument is not provided.</li>
- * <li>For all other types of queries the second argument must evaluate
- * to an iterator. If it is not provided, it defaults to the variable
- * <code>everything</code>.
- * </ul>
- * @param operands
- */
- public WrappedIQuery(Expression[] operands) {
- super(assertLength(operands, 1, 2, KEYWORD_IQUERY));
- }
-
- @SuppressWarnings("unchecked")
- public Object evaluate(IEvaluationContext context) {
- Object query = operands[0].evaluate(context);
-
- if (query instanceof IMatchQuery<?>) {
- Object value = null;
- if (operands.length > 1)
- value = operands[1].evaluate(context);
- else
- value = ExpressionFactory.THIS.evaluate(context);
- return Boolean.valueOf(((IMatchQuery<Object>) query).isMatch(value));
- }
-
- if (!(query instanceof IQuery<?>))
- throw new IllegalArgumentException("iquery first argument must be an IQuery instance"); //$NON-NLS-1$
-
- Iterator<?> iterator = null;
- if (operands.length > 1)
- iterator = operands[1].evaluateAsIterator(context);
- else
- iterator = ExpressionFactory.EVERYTHING.evaluateAsIterator(context);
-
- return ((IQuery<Object>) query).perform((Iterator<Object>) iterator);
- }
-
- public String getOperator() {
- return KEYWORD_IQUERY;
- }
-
- @Override
- public boolean isReferenceTo(Variable variable) {
- Object firstOp = operands[0];
- if (firstOp instanceof Literal) {
- Object query = ((Literal) firstOp).value;
- return (query instanceof IMatchQuery<?>) ? variable == ExpressionFactory.THIS : variable == ExpressionFactory.EVERYTHING;
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java
deleted file mode 100644
index f86a657a1..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java
+++ /dev/null
@@ -1,631 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression.parser;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.expression.IExpressionConstants;
-import org.eclipse.equinox.internal.p2.metadata.expression.LDAPApproximation;
-import org.eclipse.equinox.p2.metadata.expression.*;
-
-public class ExpressionParser extends Stack<IExpression> implements IExpressionConstants, IExpressionParser {
- private static final long serialVersionUID = 5481439062356612378L;
-
- protected static final int TOKEN_OR = 1;
- protected static final int TOKEN_AND = 2;
-
- protected static final int TOKEN_EQUAL = 10;
- protected static final int TOKEN_NOT_EQUAL = 11;
- protected static final int TOKEN_LESS = 12;
- protected static final int TOKEN_LESS_EQUAL = 13;
- protected static final int TOKEN_GREATER = 14;
- protected static final int TOKEN_GREATER_EQUAL = 15;
- protected static final int TOKEN_MATCHES = 16;
-
- protected static final int TOKEN_NOT = 20;
- protected static final int TOKEN_DOT = 21;
- protected static final int TOKEN_COMMA = 22;
- protected static final int TOKEN_PIPE = 23;
- protected static final int TOKEN_DOLLAR = 24;
- protected static final int TOKEN_IF = 25;
- protected static final int TOKEN_ELSE = 26;
-
- protected static final int TOKEN_LP = 30;
- protected static final int TOKEN_RP = 31;
- protected static final int TOKEN_LB = 32;
- protected static final int TOKEN_RB = 33;
- protected static final int TOKEN_LC = 34;
- protected static final int TOKEN_RC = 35;
-
- protected static final int TOKEN_IDENTIFIER = 40;
- protected static final int TOKEN_LITERAL = 41;
-
- protected static final int TOKEN_NULL = 50;
- protected static final int TOKEN_TRUE = 51;
- protected static final int TOKEN_FALSE = 52;
-
- private static final int TOKEN_ALL = 60;
- private static final int TOKEN_EXISTS = 61;
-
- protected static final int TOKEN_END = 0;
- protected static final int TOKEN_ERROR = -1;
-
- protected static final Map<String, Integer> keywords;
- static {
- keywords = new HashMap<String, Integer>();
- keywords.put(KEYWORD_FALSE, new Integer(TOKEN_FALSE));
- keywords.put(KEYWORD_NULL, new Integer(TOKEN_NULL));
- keywords.put(KEYWORD_TRUE, new Integer(TOKEN_TRUE));
- keywords.put(KEYWORD_ALL, new Integer(TOKEN_ALL));
- keywords.put(KEYWORD_EXISTS, new Integer(TOKEN_EXISTS));
- }
-
- protected final IExpressionFactory factory;
-
- protected String expression;
- protected int tokenPos;
- protected int currentToken;
- protected int lastTokenPos;
- protected Object tokenValue;
- protected String rootVariable;
-
- public ExpressionParser(IExpressionFactory factory) {
- this.factory = factory;
- }
-
- public synchronized IExpression parse(String exprString) {
- expression = exprString;
- tokenPos = 0;
- currentToken = 0;
- tokenValue = null;
- IExpression thisVariable = factory.thisVariable();
- rootVariable = ExpressionUtil.getName(thisVariable);
- push(thisVariable);
- try {
- nextToken();
- IExpression expr = currentToken == TOKEN_END ? factory.constant(Boolean.TRUE) : parseCondition();
- assertToken(TOKEN_END);
- return expr;
- } finally {
- clear(); // pop all items
- }
- }
-
- public synchronized IExpression parseQuery(String exprString) {
- expression = exprString;
- tokenPos = 0;
- currentToken = 0;
- tokenValue = null;
- rootVariable = VARIABLE_EVERYTHING;
- IExpression everythingVariable = factory.variable(VARIABLE_EVERYTHING);
- push(everythingVariable);
- try {
- nextToken();
- IExpression expr = parseCondition();
- assertToken(TOKEN_END);
- return expr;
- } finally {
- clear(); // pop all items
- }
- }
-
- protected Map<String, Integer> keywordToTokenMap() {
- return keywords;
- }
-
- protected IExpression parseCondition() {
- // Just a hook in this parser. Conditions are not supported
- return parseOr();
- }
-
- protected IExpression parseOr() {
- IExpression expr = parseAnd();
- if (currentToken != TOKEN_OR)
- return expr;
-
- ArrayList<IExpression> exprs = new ArrayList<IExpression>();
- exprs.add(expr);
- do {
- nextToken();
- exprs.add(parseAnd());
- } while (currentToken == TOKEN_OR);
- return factory.or(exprs.toArray(new IExpression[exprs.size()]));
- }
-
- protected IExpression parseAnd() {
- IExpression expr = parseBinary();
- if (currentToken != TOKEN_AND)
- return expr;
-
- ArrayList<IExpression> exprs = new ArrayList<IExpression>();
- exprs.add(expr);
- do {
- nextToken();
- exprs.add(parseBinary());
- } while (currentToken == TOKEN_AND);
- return factory.and(exprs.toArray(new IExpression[exprs.size()]));
- }
-
- protected IExpression parseBinary() {
- IExpression expr = parseNot();
- for (;;) {
- switch (currentToken) {
- case TOKEN_OR :
- case TOKEN_AND :
- case TOKEN_RP :
- case TOKEN_RB :
- case TOKEN_RC :
- case TOKEN_COMMA :
- case TOKEN_IF :
- case TOKEN_ELSE :
- case TOKEN_END :
- break;
- case TOKEN_EQUAL :
- case TOKEN_NOT_EQUAL :
- case TOKEN_GREATER :
- case TOKEN_GREATER_EQUAL :
- case TOKEN_LESS :
- case TOKEN_LESS_EQUAL :
- case TOKEN_MATCHES :
- int realToken = currentToken;
- nextToken();
- IExpression rhs;
- if (realToken == TOKEN_MATCHES && currentToken == TOKEN_LITERAL && tokenValue instanceof String)
- rhs = factory.constant(new LDAPApproximation((String) tokenValue));
- else
- rhs = parseNot();
- switch (realToken) {
- case TOKEN_EQUAL :
- expr = factory.equals(expr, rhs);
- break;
- case TOKEN_NOT_EQUAL :
- expr = factory.not(factory.equals(expr, rhs));
- break;
- case TOKEN_GREATER :
- expr = factory.greater(expr, rhs);
- break;
- case TOKEN_GREATER_EQUAL :
- expr = factory.greaterEqual(expr, rhs);
- break;
- case TOKEN_LESS :
- expr = factory.less(expr, rhs);
- break;
- case TOKEN_LESS_EQUAL :
- expr = factory.lessEqual(expr, rhs);
- break;
- default :
- expr = factory.matches(expr, rhs);
- }
- continue;
- default :
- throw syntaxError();
- }
- break;
- }
- return expr;
- }
-
- protected IExpression parseNot() {
- if (currentToken == TOKEN_NOT) {
- nextToken();
- IExpression expr = parseNot();
- return factory.not(expr);
- }
- return parseCollectionExpression();
- }
-
- protected IExpression parseCollectionExpression() {
- IExpression expr = parseCollectionLHS();
- if (expr == null) {
- expr = parseMember();
- if (currentToken != TOKEN_DOT)
- return expr;
- nextToken();
- }
- for (;;) {
- int funcToken = currentToken;
- nextToken();
- assertToken(TOKEN_LP);
- nextToken();
- expr = parseCollectionRHS(expr, funcToken);
- if (currentToken != TOKEN_DOT)
- break;
- nextToken();
- }
- return expr;
- }
-
- protected IExpression parseCollectionLHS() {
- IExpression expr = null;
- switch (currentToken) {
- case TOKEN_EXISTS :
- case TOKEN_ALL :
- expr = getVariableOrRootMember(rootVariable);
- break;
- }
- return expr;
- }
-
- protected IExpression parseCollectionRHS(IExpression expr, int funcToken) {
- switch (funcToken) {
- case TOKEN_EXISTS :
- expr = factory.exists(expr, parseLambdaDefinition());
- break;
- case TOKEN_ALL :
- expr = factory.all(expr, parseLambdaDefinition());
- break;
- default :
- throw syntaxError();
- }
- return expr;
- }
-
- protected IExpression parseLambdaDefinition() {
- assertToken(TOKEN_IDENTIFIER);
- IExpression each = factory.variable((String) tokenValue);
- push(each);
- try {
- nextToken();
- assertToken(TOKEN_PIPE);
- nextToken();
- IExpression body = parseCondition();
- assertToken(TOKEN_RP);
- nextToken();
- return factory.lambda(each, body);
- } finally {
- pop();
- }
- }
-
- protected IExpression parseMember() {
- IExpression expr = parseUnary();
- String name;
- while (currentToken == TOKEN_DOT || currentToken == TOKEN_LB) {
- int savePos = tokenPos;
- int saveToken = currentToken;
- Object saveTokenValue = tokenValue;
- nextToken();
- if (saveToken == TOKEN_DOT) {
- switch (currentToken) {
- case TOKEN_IDENTIFIER :
- name = (String) tokenValue;
- nextToken();
- expr = factory.member(expr, name);
- break;
-
- default :
- tokenPos = savePos;
- currentToken = saveToken;
- tokenValue = saveTokenValue;
- return expr;
- }
- } else {
- IExpression atExpr = parseMember();
- assertToken(TOKEN_RB);
- nextToken();
- expr = factory.at(expr, atExpr);
- }
- }
- return expr;
- }
-
- protected IExpression parseUnary() {
- IExpression expr;
- switch (currentToken) {
- case TOKEN_LP :
- nextToken();
- expr = parseCondition();
- assertToken(TOKEN_RP);
- nextToken();
- break;
- case TOKEN_LITERAL :
- expr = factory.constant(tokenValue);
- nextToken();
- break;
- case TOKEN_IDENTIFIER :
- expr = getVariableOrRootMember((String) tokenValue);
- nextToken();
- break;
- case TOKEN_NULL :
- expr = factory.constant(null);
- nextToken();
- break;
- case TOKEN_TRUE :
- expr = factory.constant(Boolean.TRUE);
- nextToken();
- break;
- case TOKEN_FALSE :
- expr = factory.constant(Boolean.FALSE);
- nextToken();
- break;
- case TOKEN_DOLLAR :
- expr = parseParameter();
- break;
- default :
- throw syntaxError();
- }
- return expr;
- }
-
- private IExpression parseParameter() {
- if (currentToken == TOKEN_DOLLAR) {
- nextToken();
- if (currentToken == TOKEN_LITERAL && tokenValue instanceof Integer) {
- IExpression param = factory.indexedParameter(((Integer) tokenValue).intValue());
- nextToken();
- return param;
- }
- }
- throw syntaxError();
- }
-
- protected IExpression[] parseArray() {
- IExpression expr = parseCondition();
- if (currentToken != TOKEN_COMMA)
- return new IExpression[] {expr};
-
- ArrayList<IExpression> operands = new ArrayList<IExpression>();
- operands.add(expr);
- do {
- nextToken();
- if (currentToken == TOKEN_LC)
- // We don't allow lambdas in the array
- break;
- operands.add(parseCondition());
- } while (currentToken == TOKEN_COMMA);
- return operands.toArray(new IExpression[operands.size()]);
- }
-
- protected void assertToken(int token) {
- if (currentToken != token)
- throw syntaxError();
- }
-
- protected IExpression getVariableOrRootMember(String id) {
- int idx = size();
- while (--idx >= 0) {
- IExpression v = get(idx);
- if (id.equals(v.toString()))
- return v;
- }
-
- if (rootVariable == null || rootVariable.equals(id))
- throw syntaxError("No such variable: " + id); //$NON-NLS-1$
-
- return factory.member(getVariableOrRootMember(rootVariable), id);
- }
-
- protected void nextToken() {
- tokenValue = null;
- int top = expression.length();
- char c = 0;
- while (tokenPos < top) {
- c = expression.charAt(tokenPos);
- if (!Character.isWhitespace(c))
- break;
- ++tokenPos;
- }
- if (tokenPos >= top) {
- lastTokenPos = top;
- currentToken = TOKEN_END;
- return;
- }
-
- lastTokenPos = tokenPos;
- switch (c) {
- case '|' :
- if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '|') {
- tokenValue = OPERATOR_OR;
- currentToken = TOKEN_OR;
- tokenPos += 2;
- } else {
- currentToken = TOKEN_PIPE;
- ++tokenPos;
- }
- break;
-
- case '&' :
- if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '&') {
- tokenValue = OPERATOR_AND;
- currentToken = TOKEN_AND;
- tokenPos += 2;
- } else
- currentToken = TOKEN_ERROR;
- break;
-
- case '=' :
- if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '=') {
- tokenValue = OPERATOR_EQUALS;
- currentToken = TOKEN_EQUAL;
- tokenPos += 2;
- } else
- currentToken = TOKEN_ERROR;
- break;
-
- case '!' :
- if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '=') {
- tokenValue = OPERATOR_NOT_EQUALS;
- currentToken = TOKEN_NOT_EQUAL;
- tokenPos += 2;
- } else {
- currentToken = TOKEN_NOT;
- ++tokenPos;
- }
- break;
-
- case '~' :
- if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '=') {
- tokenValue = OPERATOR_MATCHES;
- currentToken = TOKEN_MATCHES;
- tokenPos += 2;
- } else
- currentToken = TOKEN_ERROR;
- break;
-
- case '>' :
- if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '=') {
- tokenValue = OPERATOR_GT_EQUAL;
- currentToken = TOKEN_GREATER_EQUAL;
- tokenPos += 2;
- } else {
- currentToken = TOKEN_GREATER;
- ++tokenPos;
- }
- break;
-
- case '<' :
- if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '=') {
- tokenValue = OPERATOR_LT_EQUAL;
- currentToken = TOKEN_LESS_EQUAL;
- tokenPos += 2;
- } else {
- currentToken = TOKEN_LESS;
- ++tokenPos;
- }
- break;
-
- case '?' :
- currentToken = TOKEN_IF;
- ++tokenPos;
- break;
-
- case ':' :
- currentToken = TOKEN_ELSE;
- ++tokenPos;
- break;
-
- case '.' :
- currentToken = TOKEN_DOT;
- ++tokenPos;
- break;
-
- case '$' :
- currentToken = TOKEN_DOLLAR;
- ++tokenPos;
- break;
-
- case '{' :
- currentToken = TOKEN_LC;
- ++tokenPos;
- break;
-
- case '}' :
- currentToken = TOKEN_RC;
- ++tokenPos;
- break;
-
- case '(' :
- currentToken = TOKEN_LP;
- ++tokenPos;
- break;
-
- case ')' :
- currentToken = TOKEN_RP;
- ++tokenPos;
- break;
-
- case '[' :
- currentToken = TOKEN_LB;
- ++tokenPos;
- break;
-
- case ']' :
- currentToken = TOKEN_RB;
- ++tokenPos;
- break;
-
- case ',' :
- currentToken = TOKEN_COMMA;
- ++tokenPos;
- break;
-
- case '"' :
- case '\'' :
- parseDelimitedString(c);
- break;
-
- case '/' :
- parseDelimitedString(c);
- if (currentToken == TOKEN_LITERAL)
- tokenValue = SimplePattern.compile((String) tokenValue);
- break;
-
- default :
- if (Character.isDigit(c)) {
- int start = tokenPos++;
- while (tokenPos < top && Character.isDigit(expression.charAt(tokenPos)))
- ++tokenPos;
- tokenValue = Integer.valueOf(expression.substring(start, tokenPos));
- currentToken = TOKEN_LITERAL;
- break;
- }
- if (Character.isJavaIdentifierStart(c)) {
- int start = tokenPos++;
- while (tokenPos < top && Character.isJavaIdentifierPart(expression.charAt(tokenPos)))
- ++tokenPos;
- String word = expression.substring(start, tokenPos);
- Integer token = keywordToTokenMap().get(word);
- if (token == null)
- currentToken = TOKEN_IDENTIFIER;
- else
- currentToken = token.intValue();
- tokenValue = word;
- break;
- }
- throw syntaxError();
- }
- }
-
- protected void popVariable() {
- if (isEmpty())
- throw syntaxError();
- pop();
- }
-
- protected ExpressionParseException syntaxError() {
- Object tv = tokenValue;
- if (tv == null) {
- if (lastTokenPos >= expression.length())
- return syntaxError("Unexpected end of expression"); //$NON-NLS-1$
- tv = expression.substring(lastTokenPos, lastTokenPos + 1);
- }
- return syntaxError("Unexpected token \"" + tv + '"'); //$NON-NLS-1$
- }
-
- protected ExpressionParseException syntaxError(String message) {
- return new ExpressionParseException(expression, message, tokenPos);
- }
-
- private void parseDelimitedString(char delim) {
- int start = ++tokenPos;
- StringBuffer buf = new StringBuffer();
- int top = expression.length();
- while (tokenPos < top) {
- char ec = expression.charAt(tokenPos);
- if (ec == delim)
- break;
- if (ec == '\\') {
- if (++tokenPos == top)
- break;
- ec = expression.charAt(tokenPos);
- }
- buf.append(ec);
- ++tokenPos;
- }
- if (tokenPos == top) {
- tokenPos = start - 1;
- currentToken = TOKEN_ERROR;
- } else {
- ++tokenPos;
- tokenValue = buf.toString();
- currentToken = TOKEN_LITERAL;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/LDAPFilterParser.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/LDAPFilterParser.java
deleted file mode 100644
index 1878fe7b1..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/LDAPFilterParser.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression.parser;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.Messages;
-import org.eclipse.equinox.internal.p2.metadata.expression.IExpressionConstants;
-import org.eclipse.equinox.internal.p2.metadata.expression.LDAPApproximation;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Parser class for OSGi filter strings. This class parses the complete filter string and builds a tree of Filter
- * objects rooted at the parent.
- */
-public class LDAPFilterParser {
- @SuppressWarnings("serial")
- private static final Map<String, IFilterExpression> filterCache = Collections.<String, IFilterExpression> synchronizedMap(new LinkedHashMap<String, IFilterExpression>() {
- public boolean removeEldestEntry(Map.Entry<String, IFilterExpression> expr) {
- return size() > 64;
- }
- });
-
- private final IExpressionFactory factory;
-
- private final IExpression self;
-
- private final StringBuffer sb = new StringBuffer();
-
- private String filterString;
-
- private int position;
-
- public LDAPFilterParser(IExpressionFactory factory) {
- this.factory = factory;
- self = factory.variable(IExpressionConstants.VARIABLE_THIS);
- position = 0;
- }
-
- public IFilterExpression parse(String filterStr) {
- IFilterExpression filter = filterCache.get(filterStr);
- if (filter != null)
- return filter;
-
- synchronized (this) {
- filterString = filterStr;
- position = 0;
- try {
- IExpression expr = parseFilter();
- if (position != filterString.length())
- throw syntaxException(Messages.filter_trailing_characters);
- filter = factory.filterExpression(expr);
- filterCache.put(filterStr, filter);
- return filter;
- } catch (StringIndexOutOfBoundsException e) {
- throw syntaxException(Messages.filter_premature_end);
- }
- }
- }
-
- private IExpression parseAnd() {
- skipWhiteSpace();
- char c = filterString.charAt(position);
- if (c != '(')
- throw syntaxException(Messages.filter_missing_leftparen);
-
- ArrayList<IExpression> operands = new ArrayList<IExpression>();
- while (c == '(') {
- IExpression child = parseFilter();
- if (!operands.contains(child))
- operands.add(child);
- c = filterString.charAt(position);
- }
- // int sz = operands.size();
- // return sz == 1 ? operands.get(0) : factory.and(operands.toArray(new IExpression[sz]));
- return factory.normalize(operands, IExpression.TYPE_AND);
- }
-
- private IExpression parseAttr() {
- skipWhiteSpace();
-
- int begin = position;
- int end = position;
-
- char c = filterString.charAt(begin);
- while (!(c == '~' || c == '<' || c == '>' || c == '=' || c == '(' || c == ')')) {
- position++;
- if (!Character.isWhitespace(c))
- end = position;
- c = filterString.charAt(position);
- }
- if (end == begin)
- throw syntaxException(Messages.filter_missing_attr);
- return factory.member(self, filterString.substring(begin, end));
- }
-
- private IExpression parseFilter() {
- IExpression filter;
- skipWhiteSpace();
-
- if (filterString.charAt(position) != '(')
- throw syntaxException(Messages.filter_missing_leftparen);
-
- position++;
- filter = parseFiltercomp();
-
- skipWhiteSpace();
-
- if (filterString.charAt(position) != ')')
- throw syntaxException(Messages.filter_missing_rightparen);
-
- position++;
- skipWhiteSpace();
-
- return filter;
- }
-
- private IExpression parseFiltercomp() {
- skipWhiteSpace();
-
- char c = filterString.charAt(position);
-
- switch (c) {
- case '&' : {
- position++;
- return parseAnd();
- }
- case '|' : {
- position++;
- return parseOr();
- }
- case '!' : {
- position++;
- return parseNot();
- }
- }
- return parseItem();
- }
-
- private IExpression parseItem() {
- IExpression attr = parseAttr();
-
- skipWhiteSpace();
- String value;
-
- boolean[] hasWild = {false};
- char c = filterString.charAt(position);
- switch (c) {
- case '~' :
- case '>' :
- case '<' :
- if (filterString.charAt(position + 1) != '=')
- throw syntaxException(Messages.filter_invalid_operator);
- position += 2;
- int savePos = position;
- value = parseValue(hasWild);
- if (hasWild[0]) {
- // Unescaped wildcard found. This is not legal for the given operator
- position = savePos;
- throw syntaxException(Messages.filter_invalid_value);
- }
- switch (c) {
- case '>' :
- return factory.greaterEqual(attr, factory.constant(value));
- case '<' :
- return factory.lessEqual(attr, factory.constant(value));
- }
- return factory.matches(attr, factory.constant(new LDAPApproximation(value)));
- case '=' :
- position++;
- value = parseValue(hasWild);
- return hasWild[0] ? factory.matches(attr, factory.constant(SimplePattern.compile(value))) : factory.equals(attr, factory.constant(value));
- }
- throw syntaxException(Messages.filter_invalid_operator);
- }
-
- private IExpression parseNot() {
- skipWhiteSpace();
-
- if (filterString.charAt(position) != '(')
- throw syntaxException(Messages.filter_missing_leftparen);
- return factory.not(parseFilter());
- }
-
- private IExpression parseOr() {
- skipWhiteSpace();
- char c = filterString.charAt(position);
- if (c != '(')
- throw syntaxException(Messages.filter_missing_leftparen);
-
- ArrayList<IExpression> operands = new ArrayList<IExpression>();
- while (c == '(') {
- IExpression child = parseFilter();
- operands.add(child);
- c = filterString.charAt(position);
- }
- // int sz = operands.size();
- // return sz == 1 ? operands.get(0) : factory.or(operands.toArray(new IExpression[sz]));
- return factory.normalize(operands, IExpression.TYPE_OR);
- }
-
- private static int hexValue(char c) {
- int v;
- if (c <= '9')
- v = c - '0';
- else if (c <= 'F')
- v = (c - 'A') + 10;
- else
- v = (c - 'a') + 10;
- return v;
- }
-
- private String parseValue(boolean[] hasWildBin) {
- sb.setLength(0);
- int savePos = position;
- boolean hasEscapedWild = false;
- parseloop: while (true) {
- char c = filterString.charAt(position);
- switch (c) {
- case '*' :
- if (hasEscapedWild && !hasWildBin[0]) {
- // We must redo the parse.
- position = savePos;
- hasWildBin[0] = true;
- return parseValue(hasWildBin);
- }
- hasWildBin[0] = true;
- sb.append(c);
- position++;
- break;
-
- case ')' :
- break parseloop;
-
- case '(' :
- throw syntaxException(Messages.filter_invalid_value);
-
- case '\\' :
- c = filterString.charAt(++position);
- if (c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'a' && c <= 'f' && position + 1 < filterString.length()) {
- char nc = filterString.charAt(position + 1);
- if (nc >= '0' && nc <= '9' || nc >= 'A' && nc <= 'F' || nc >= 'a' && nc <= 'f') {
- // Assume proper \xx escape where xx are hex digits
- ++position;
- c = (char) (((hexValue(c) << 4) & 0xf0) | (hexValue(nc) & 0x0f));
- if (c == '*' && hasWildBin != null) {
- hasEscapedWild = true;
- if (hasWildBin[0])
- sb.append('\\');
- }
- }
- }
- /* fall through into default */
-
- default :
- sb.append(c);
- position++;
- break;
- }
- }
- if (sb.length() == 0)
- throw syntaxException(Messages.filter_missing_value);
- return sb.toString();
- }
-
- private void skipWhiteSpace() {
- for (int top = filterString.length(); position < top; ++position)
- if (!Character.isWhitespace(filterString.charAt(position)))
- break;
- }
-
- protected ExpressionParseException syntaxException(String message) {
- return new ExpressionParseException(NLS.bind(message, filterString, Integer.toString(position)));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/QLParser.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/QLParser.java
deleted file mode 100644
index b82dc651a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/QLParser.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression.parser;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.expression.Variable;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-import org.eclipse.equinox.p2.metadata.expression.IExpressionFactory;
-
-public class QLParser extends ExpressionParser {
- private static final long serialVersionUID = 882034383978853143L;
-
- private static final int TOKEN_ANY = 42;
-
- private static final int TOKEN_LATEST = 70;
- private static final int TOKEN_LIMIT = 71;
- private static final int TOKEN_FIRST = 72;
- private static final int TOKEN_FLATTEN = 73;
- private static final int TOKEN_UNIQUE = 74;
- private static final int TOKEN_SELECT = 75;
- private static final int TOKEN_COLLECT = 76;
- private static final int TOKEN_TRAVERSE = 77;
- private static final int TOKEN_INTERSECT = 78;
- private static final int TOKEN_UNION = 79;
-
- private static final Map<String, Integer> qlKeywords;
- static {
- qlKeywords = new HashMap<String, Integer>();
- qlKeywords.putAll(keywords);
- qlKeywords.put(KEYWORD_COLLECT, new Integer(TOKEN_COLLECT));
- qlKeywords.put(KEYWORD_FALSE, new Integer(TOKEN_FALSE));
- qlKeywords.put(KEYWORD_FIRST, new Integer(TOKEN_FIRST));
- qlKeywords.put(KEYWORD_FLATTEN, new Integer(TOKEN_FLATTEN));
- qlKeywords.put(KEYWORD_LATEST, new Integer(TOKEN_LATEST));
- qlKeywords.put(KEYWORD_LIMIT, new Integer(TOKEN_LIMIT));
- qlKeywords.put(KEYWORD_NULL, new Integer(TOKEN_NULL));
- qlKeywords.put(KEYWORD_SELECT, new Integer(TOKEN_SELECT));
- qlKeywords.put(KEYWORD_TRAVERSE, new Integer(TOKEN_TRAVERSE));
- qlKeywords.put(KEYWORD_TRUE, new Integer(TOKEN_TRUE));
- qlKeywords.put(KEYWORD_UNIQUE, new Integer(TOKEN_UNIQUE));
- qlKeywords.put(KEYWORD_INTERSECT, new Integer(TOKEN_INTERSECT));
- qlKeywords.put(KEYWORD_UNION, new Integer(TOKEN_UNION));
- qlKeywords.put(OPERATOR_EACH, new Integer(TOKEN_ANY));
- }
-
- public QLParser(IExpressionFactory factory) {
- super(factory);
- }
-
- protected Map<String, Integer> keywordToTokenMap() {
- return qlKeywords;
- }
-
- protected IExpression parseCondition() {
- IExpression expr = parseOr();
- if (currentToken == TOKEN_IF) {
- nextToken();
- IExpression ifTrue = parseOr();
- assertToken(TOKEN_ELSE);
- nextToken();
- expr = factory.condition(expr, ifTrue, parseOr());
- }
- return expr;
- }
-
- protected IExpression parseMember() {
- IExpression expr = parseFunction();
- String name;
- while (currentToken == TOKEN_DOT || currentToken == TOKEN_LB) {
- int savePos = tokenPos;
- int saveToken = currentToken;
- Object saveTokenValue = tokenValue;
- nextToken();
- if (saveToken == TOKEN_DOT) {
- switch (currentToken) {
- case TOKEN_IDENTIFIER :
- name = (String) tokenValue;
- nextToken();
- if (currentToken == TOKEN_LP) {
- nextToken();
- IExpression[] callArgs = parseArray();
- assertToken(TOKEN_RP);
- nextToken();
- expr = factory.memberCall(expr, name, callArgs);
- } else
- expr = factory.member(expr, name);
- break;
-
- default :
- tokenPos = savePos;
- currentToken = saveToken;
- tokenValue = saveTokenValue;
- return expr;
- }
- } else {
- IExpression atExpr = parseMember();
- assertToken(TOKEN_RB);
- nextToken();
- expr = factory.at(expr, atExpr);
- }
- }
- return expr;
- }
-
- protected IExpression parseFunction() {
- if (currentToken == TOKEN_IDENTIFIER) {
- Object function = factory.getFunctionMap().get(tokenValue);
- if (function != null) {
- int savePos = tokenPos;
- int saveToken = currentToken;
- Object saveTokenValue = tokenValue;
-
- nextToken();
- if (currentToken == TOKEN_LP) {
- nextToken();
- IExpression[] args = currentToken == TOKEN_RP ? IExpressionFactory.NO_ARGS : parseArray();
- assertToken(TOKEN_RP);
- nextToken();
- return factory.function(function, args);
- }
- tokenPos = savePos;
- currentToken = saveToken;
- tokenValue = saveTokenValue;
- }
- }
- return parseUnary();
- }
-
- protected IExpression parseCollectionLHS() {
- IExpression expr;
- switch (currentToken) {
- case TOKEN_SELECT :
- case TOKEN_COLLECT :
- case TOKEN_FIRST :
- case TOKEN_FLATTEN :
- case TOKEN_TRAVERSE :
- case TOKEN_LATEST :
- case TOKEN_LIMIT :
- case TOKEN_INTERSECT :
- case TOKEN_UNION :
- case TOKEN_UNIQUE :
- expr = getVariableOrRootMember(rootVariable);
- break;
- default :
- expr = super.parseCollectionLHS();
- }
- return expr;
- }
-
- protected IExpression parseCollectionRHS(IExpression expr, int funcToken) {
- switch (funcToken) {
- case TOKEN_SELECT :
- expr = factory.select(expr, parseLambdaDefinition());
- break;
- case TOKEN_COLLECT :
- expr = factory.collect(expr, parseLambdaDefinition());
- break;
- case TOKEN_FIRST :
- expr = factory.first(expr, parseLambdaDefinition());
- break;
- case TOKEN_TRAVERSE :
- expr = factory.traverse(expr, parseLambdaDefinition());
- break;
- case TOKEN_LATEST :
- if (currentToken == TOKEN_RP) {
- expr = factory.latest(expr);
- assertToken(TOKEN_RP);
- nextToken();
- } else
- expr = factory.latest(factory.select(expr, parseLambdaDefinition()));
- break;
- case TOKEN_FLATTEN :
- if (currentToken == TOKEN_RP) {
- expr = factory.flatten(expr);
- assertToken(TOKEN_RP);
- nextToken();
- } else
- expr = factory.flatten(factory.select(expr, parseLambdaDefinition()));
- break;
- case TOKEN_LIMIT :
- expr = factory.limit(expr, parseCondition());
- assertToken(TOKEN_RP);
- nextToken();
- break;
- case TOKEN_INTERSECT :
- expr = factory.intersect(expr, parseCondition());
- assertToken(TOKEN_RP);
- nextToken();
- break;
- case TOKEN_UNION :
- expr = factory.union(expr, parseCondition());
- assertToken(TOKEN_RP);
- nextToken();
- break;
- case TOKEN_UNIQUE :
- if (currentToken == TOKEN_RP)
- expr = factory.unique(expr, factory.constant(null));
- else {
- expr = factory.unique(expr, parseMember());
- assertToken(TOKEN_RP);
- nextToken();
- }
- break;
- default :
- expr = super.parseCollectionRHS(expr, funcToken);
- }
- return expr;
- }
-
- protected IExpression parseUnary() {
- IExpression expr;
- switch (currentToken) {
- case TOKEN_LB :
- nextToken();
- expr = factory.array(parseArray());
- assertToken(TOKEN_RB);
- nextToken();
- break;
- case TOKEN_ANY :
- expr = factory.variable(OPERATOR_EACH);
- nextToken();
- break;
- default :
- expr = super.parseUnary();
- }
- return expr;
- }
-
- protected IExpression parseLambdaDefinition() {
- boolean endingRC = false;
- int anyIndex = -1;
- IExpression[] initializers = IExpressionFactory.NO_ARGS;
- IExpression[] variables;
- if (currentToken == TOKEN_LC) {
- // Lambda starts without currying.
- endingRC = true;
- nextToken();
- anyIndex = 0;
- variables = parseVariables();
- if (variables == null)
- // empty means no pipe at the end.
- throw syntaxError();
- } else {
- anyIndex = 0;
- variables = parseVariables();
- if (variables == null) {
- anyIndex = -1;
- initializers = parseArray();
- assertToken(TOKEN_LC);
- nextToken();
- endingRC = true;
- for (int idx = 0; idx < initializers.length; ++idx) {
- IExpression initializer = initializers[idx];
- if (initializer instanceof Variable && OPERATOR_EACH.equals(initializer.toString())) {
- if (anyIndex == -1)
- anyIndex = idx;
- else
- anyIndex = -1; // Second Each. This is illegal
- break;
- }
- }
- if (anyIndex == -1)
- throw new IllegalArgumentException("Exaclty one _ must be present among the currying expressions"); //$NON-NLS-1$
-
- variables = parseVariables();
- if (variables == null)
- // empty means no pipe at the end.
- throw syntaxError();
- }
-
- }
- nextToken();
- IExpression body = parseCondition();
- if (endingRC) {
- assertToken(TOKEN_RC);
- nextToken();
- }
-
- assertToken(TOKEN_RP);
- nextToken();
- IExpression each;
- IExpression[] assignments;
- if (initializers.length == 0) {
- if (variables.length != 1)
- throw new IllegalArgumentException("Must have exactly one variable unless currying is used"); //$NON-NLS-1$
- each = variables[0];
- assignments = IExpressionFactory.NO_ARGS;
- } else {
- if (initializers.length != variables.length)
- throw new IllegalArgumentException("Number of currying expressions and variables differ"); //$NON-NLS-1$
-
- if (initializers.length == 1) {
- // This is just a map from _ to some variable
- each = variables[0];
- assignments = IExpressionFactory.NO_ARGS;
- } else {
- int idx;
- each = variables[anyIndex];
- assignments = new IExpression[initializers.length - 1];
- for (idx = 0; idx < anyIndex; ++idx)
- assignments[idx] = factory.assignment(variables[idx], initializers[idx]);
- for (++idx; idx < initializers.length; ++idx)
- assignments[idx] = factory.assignment(variables[idx], initializers[idx]);
- }
- }
- return factory.lambda(each, assignments, body);
- }
-
- private IExpression[] parseVariables() {
- int savePos = tokenPos;
- int saveToken = currentToken;
- Object saveTokenValue = tokenValue;
- List<Object> ids = null;
- while (currentToken == TOKEN_IDENTIFIER) {
- if (ids == null)
- ids = new ArrayList<Object>();
- ids.add(tokenValue);
- nextToken();
- if (currentToken == TOKEN_COMMA) {
- nextToken();
- continue;
- }
- break;
- }
-
- if (currentToken != TOKEN_PIPE) {
- // This was not a variable list
- tokenPos = savePos;
- currentToken = saveToken;
- tokenValue = saveTokenValue;
- return null;
- }
-
- if (ids == null)
- // Empty list but otherwise OK
- return IExpressionFactory.NO_ARGS;
-
- int top = ids.size();
- IExpression[] result = new IExpression[top];
- for (int idx = 0; idx < top; ++idx) {
- String name = (String) ids.get(idx);
- IExpression var = factory.variable(name);
- push(var);
- result[idx] = var;
- }
- return result;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CapabilityIndex.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CapabilityIndex.java
deleted file mode 100644
index 53943c842..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CapabilityIndex.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.index;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.metadata.*;
-import org.eclipse.equinox.internal.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-
-/**
- * An in-memory implementation of a CapabilityIndex based on a Map.
- */
-@SuppressWarnings("unchecked")
-public class CapabilityIndex extends Index<IInstallableUnit> {
-
- private final Map<String, Object> capabilityMap;
-
- public CapabilityIndex(Iterator<IInstallableUnit> itor) {
- HashMap<String, Object> index = new HashMap<String, Object>(300);
- while (itor.hasNext()) {
- IInstallableUnit iu = itor.next();
- Collection<IProvidedCapability> pcs = iu.getProvidedCapabilities();
- for (IProvidedCapability pc : pcs) {
- String name = pc.getName();
- Object prev = index.put(name, iu);
- if (prev == null || prev == iu)
- continue;
-
- ArrayList<IInstallableUnit> list;
- if (prev instanceof IInstallableUnit) {
- list = new ArrayList<IInstallableUnit>();
- list.add((IInstallableUnit) prev);
- } else
- list = (ArrayList<IInstallableUnit>) prev;
- list.add(iu);
- index.put(name, list);
- }
- }
- this.capabilityMap = index;
- }
-
- private Object getRequirementIDs(IEvaluationContext ctx, IExpression requirement, Object queriedKeys) {
- switch (requirement.getExpressionType()) {
- case IExpression.TYPE_AND :
- // AND is OK if at least one of the branches require the queried key
- for (IExpression expr : ExpressionUtil.getOperands(requirement)) {
- Object test = getRequirementIDs(ctx, expr, queriedKeys);
- if (test != null) {
- if (test == Boolean.FALSE)
- // Failing exists so the AND will fail altogether
- return test;
-
- // It's safe to break here since an and'ing several queries
- // for different keys and the same input will yield false anyway.
- return test;
- }
- }
- return null;
-
- case IExpression.TYPE_OR :
- // OR is OK if all the branches require the queried key
- for (IExpression expr : ExpressionUtil.getOperands(requirement)) {
- Object test = getRequirementIDs(ctx, expr, queriedKeys);
- if (test == null)
- // This branch did not require the key so index cannot be used
- return null;
-
- if (test == Boolean.FALSE)
- // Branch will always fail regardless of input, so just ignore
- continue;
-
- queriedKeys = test;
- }
- return queriedKeys;
-
- case IExpression.TYPE_ALL :
- case IExpression.TYPE_EXISTS :
- CollectionFilter cf = (CollectionFilter) requirement;
- if (isIndexedMember(cf.getOperand(), ExpressionFactory.THIS, InstallableUnit.MEMBER_PROVIDED_CAPABILITIES)) {
- LambdaExpression lambda = cf.lambda;
- return getQueriedIDs(ctx, lambda.getItemVariable(), ProvidedCapability.MEMBER_NAME, lambda.getOperand(), queriedKeys);
- }
- }
- return null;
- }
-
- @Override
- protected Object getQueriedIDs(IEvaluationContext ctx, IExpression variable, String memberName, IExpression booleanExpr, Object queriedKeys) {
- if (booleanExpr.getExpressionType() != IExpression.TYPE_MATCHES)
- return super.getQueriedIDs(ctx, variable, memberName, booleanExpr, queriedKeys);
-
- Matches matches = (Matches) booleanExpr;
- if (matches.lhs != variable)
- return null;
-
- Object rhsObj = matches.rhs.evaluate(ctx);
- if (!(rhsObj instanceof IRequirement))
- return null;
-
- // Let the requirement expression participate in the
- // index usage query
- //
- IMatchExpression<IInstallableUnit> rm = ((IRequirement) rhsObj).getMatches();
- return RequiredCapability.isSimpleRequirement(rm) ? concatenateUnique(queriedKeys, rm.getParameters()[0]) : getRequirementIDs(rm.createContext(), ((Unary) rm).operand, queriedKeys);
- }
-
- public Iterator<IInstallableUnit> getCandidates(IEvaluationContext ctx, IExpression variable, IExpression booleanExpr) {
- Object queriedKeys = null;
-
- // booleanExpression must be a collection filter on providedCapabilities
- // or an IInstallableUnit used in a match expression.
- //
- IExpression expr = booleanExpr;
- int type = booleanExpr.getExpressionType();
- if (type == 0) {
- // wrapper
- expr = ((Unary) booleanExpr).operand;
- type = expr.getExpressionType();
- }
-
- switch (type) {
- case IExpression.TYPE_ALL :
- case IExpression.TYPE_EXISTS :
- CollectionFilter cf = (CollectionFilter) expr;
- if (isIndexedMember(cf.getOperand(), variable, InstallableUnit.MEMBER_PROVIDED_CAPABILITIES)) {
- // This is providedCapabilities.exists or providedCapabilites.all
- //
- LambdaExpression lambda = cf.lambda;
- queriedKeys = getQueriedIDs(ctx, lambda.getItemVariable(), ProvidedCapability.MEMBER_NAME, lambda.getOperand(), queriedKeys);
- } else {
- // Might be the requirements array.
- //
- Expression op = cf.getOperand();
- if (op instanceof Member && InstallableUnit.MEMBER_REQUIREMENTS.equals(((Member) op).getName())) {
- queriedKeys = getQueriedIDs(ctx, variable, ProvidedCapability.MEMBER_NAME, booleanExpr, queriedKeys);
- }
- }
- break;
-
- case IExpression.TYPE_MATCHES :
- Matches matches = (Matches) expr;
- if (matches.lhs != variable)
- break;
-
- Object rhsObj = matches.rhs.evaluate(ctx);
- if (!(rhsObj instanceof IRequirement))
- break;
-
- // Let the requirement expression participate in the
- // index usage query
- //
- IMatchExpression<IInstallableUnit> rm = ((IRequirement) rhsObj).getMatches();
- queriedKeys = RequiredCapability.isSimpleRequirement(rm) ? concatenateUnique(queriedKeys, rm.getParameters()[0]) : getRequirementIDs(rm.createContext(), ((Unary) rm).operand, queriedKeys);
- break;
-
- default :
- queriedKeys = null;
- }
-
- if (queriedKeys == null)
- // Index cannot be used.
- return null;
-
- Collection<IInstallableUnit> matchingIUs;
- if (queriedKeys == Boolean.FALSE) {
- // It has been determined that the expression has no chance
- // to succeed regardless of input
- matchingIUs = CollectionUtils.<IInstallableUnit> emptySet();
- } else if (queriedKeys instanceof Collection<?>) {
- matchingIUs = new HashSet<IInstallableUnit>();
- for (Object key : (Collection<Object>) queriedKeys)
- collectMatchingIUs((String) key, matchingIUs);
- } else {
- Object v = capabilityMap.get(queriedKeys);
- if (v == null)
- matchingIUs = CollectionUtils.<IInstallableUnit> emptySet();
- else if (v instanceof IInstallableUnit)
- matchingIUs = Collections.singleton((IInstallableUnit) v);
- else
- matchingIUs = (Collection<IInstallableUnit>) v;
- }
- return matchingIUs.iterator();
- }
-
- private void collectMatchingIUs(String name, Collection<IInstallableUnit> collector) {
- Object v = capabilityMap.get(name);
- if (v == null)
- return;
- if (v instanceof IInstallableUnit)
- collector.add((IInstallableUnit) v);
- else
- collector.addAll((Collection<IInstallableUnit>) v);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CompoundIndex.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CompoundIndex.java
deleted file mode 100644
index 77e207f23..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CompoundIndex.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.index;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-
-public class CompoundIndex<T> implements IIndex<T> {
-
- private final Collection<IIndex<T>> indexes;
-
- public CompoundIndex(Collection<IIndex<T>> indexes) {
- this.indexes = indexes;
- }
-
- public Iterator<T> getCandidates(IEvaluationContext ctx, IExpression variable, IExpression booleanExpr) {
- Set<T> result = null;
- for (IIndex<T> index : indexes) {
- Iterator<T> indexResult = index.getCandidates(ctx, variable, booleanExpr);
- if (indexResult == null)
- return null;
- if (indexResult.hasNext()) {
- if (result == null)
- result = new HashSet<T>();
- do {
- result.add(indexResult.next());
- } while (indexResult.hasNext());
- }
- }
- if (result == null)
- result = CollectionUtils.emptySet();
- return result.iterator();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IdIndex.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IdIndex.java
deleted file mode 100644
index a415e8ca4..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IdIndex.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.index;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.IUMap;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-
-public class IdIndex extends Index<IInstallableUnit> {
- private final IUMap iuMap;
-
- public IdIndex(IUMap iuMap) {
- this.iuMap = iuMap;
- }
-
- public IdIndex(Iterator<IInstallableUnit> ius) {
- iuMap = new IUMap();
- while (ius.hasNext())
- iuMap.add(ius.next());
- }
-
- public Iterator<IInstallableUnit> getCandidates(IEvaluationContext ctx, IExpression variable, IExpression booleanExpr) {
- Object queriedKeys = getQueriedIDs(ctx, variable, InstallableUnit.MEMBER_ID, booleanExpr, null);
- if (queriedKeys == null)
- return null;
-
- if (queriedKeys instanceof Collection<?>) {
- HashSet<IInstallableUnit> collector = new HashSet<IInstallableUnit>();
- for (Object key : (Collection<?>) queriedKeys)
- collector.addAll(iuMap.getUnits((String) key));
- return collector.iterator();
- }
- return iuMap.getUnits((String) queriedKeys).iterator();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/Index.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/Index.java
deleted file mode 100644
index b5051bf3d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/Index.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.index;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import org.eclipse.equinox.internal.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-
-public abstract class Index<T> implements IIndex<T> {
-
- protected static boolean isIndexedMember(IExpression expr, IExpression variable, String memberName) {
- if (expr instanceof Member) {
- Member member = (Member) expr;
- return member.getOperand() == variable && member.getName().equals(memberName);
- }
- return false;
- }
-
- protected static Object concatenateUnique(Object previous, Object toAdd) {
- if (previous == null || toAdd == null || toAdd == Boolean.FALSE)
- return toAdd;
-
- if (previous instanceof ArrayList<?>) {
- @SuppressWarnings("unchecked")
- ArrayList<Object> prevArr = (ArrayList<Object>) previous;
- if (!prevArr.contains(toAdd))
- prevArr.add(toAdd);
- return previous;
- }
- if (previous.equals(toAdd))
- return previous;
-
- ArrayList<Object> arr = new ArrayList<Object>();
- arr.add(previous);
- arr.add(toAdd);
- return arr;
- }
-
- protected Object getQueriedIDs(IEvaluationContext ctx, IExpression variable, String memberName, IExpression booleanExpr, Object queriedKeys) {
- IExpression targetExpr = booleanExpr;
- if (booleanExpr instanceof IMatchExpression<?>) {
- targetExpr = ((Unary) targetExpr).operand;
- ctx = ((IMatchExpression<?>) booleanExpr).createContext();
- }
- int type = targetExpr.getExpressionType();
- switch (type) {
- case IExpression.TYPE_EQUALS :
- Binary eqExpr = (Binary) targetExpr;
- IExpression lhs = eqExpr.lhs;
- IExpression rhs = eqExpr.rhs;
- if (isIndexedMember(lhs, variable, memberName)) {
- Object val = safeEvaluate(ctx, rhs);
- if (val == null)
- return null;
- return concatenateUnique(queriedKeys, val);
- }
- if (isIndexedMember(rhs, variable, memberName)) {
- Object val = safeEvaluate(ctx, lhs);
- if (val == null)
- return null;
- return concatenateUnique(queriedKeys, val);
- }
-
- // Not applicable for indexing
- return null;
-
- case IExpression.TYPE_AND :
- // AND is OK if at least one of the branches require the queried key
- for (IExpression expr : ExpressionUtil.getOperands(targetExpr)) {
- Object test = getQueriedIDs(ctx, variable, memberName, expr, queriedKeys);
- if (test != null) {
- if (test == Boolean.FALSE)
- // Failing exists so the AND will fail altogether
- return test;
-
- // It's safe to break here since an and'ing several queries
- // for different keys and the same input will yield false anyway.
- return test;
- }
- }
- return null;
-
- case IExpression.TYPE_OR :
- // OR is OK if all the branches require the queried key
- for (IExpression expr : ExpressionUtil.getOperands(targetExpr)) {
- Object test = getQueriedIDs(ctx, variable, memberName, expr, queriedKeys);
- if (test == null)
- // This branch did not require the key so index cannot be used
- return null;
-
- if (test == Boolean.FALSE)
- // Branch will always fail regardless of input, so just ignore
- continue;
-
- queriedKeys = test;
- }
- return queriedKeys;
-
- case IExpression.TYPE_EXISTS :
- case IExpression.TYPE_ALL :
- // We must evaluate the lhs to find the referenced keys
- //
- CollectionFilter cf = (CollectionFilter) targetExpr;
- Iterator<?> values;
- try {
- values = cf.getOperand().evaluateAsIterator(ctx);
- } catch (IllegalArgumentException e) {
- return null;
- }
- if (!values.hasNext())
- // No keys are requested but we know that an exists must
- // fail at this point. An all will however succeed regardless
- // of what is used as input.
- return type == IExpression.TYPE_ALL ? null : Boolean.FALSE;
-
- LambdaExpression lambda = cf.lambda;
- IEvaluationContext lambdaCtx = lambda.prolog(ctx);
- Variable lambdaVar = lambda.getItemVariable();
- IExpression filterExpr = lambda.getOperand();
- do {
- lambdaVar.setValue(lambdaCtx, values.next());
- queriedKeys = getQueriedIDs(lambdaCtx, variable, memberName, filterExpr, queriedKeys);
- if (queriedKeys == null)
- // No use continuing. The expression does not require the key
- return null;
- } while (values.hasNext());
- return queriedKeys;
- }
- return null;
- }
-
- private static Object safeEvaluate(IEvaluationContext ctx, IExpression expr) {
- try {
- return expr.evaluate(ctx);
- } catch (IllegalArgumentException e) {
- return null;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IndexProvider.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IndexProvider.java
deleted file mode 100644
index c7899d646..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IndexProvider.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.eclipse.equinox.internal.p2.metadata.index;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-import org.eclipse.equinox.p2.metadata.index.IQueryWithIndex;
-import org.eclipse.equinox.p2.query.*;
-
-public abstract class IndexProvider<T> implements IIndexProvider<T>, IQueryable<T> {
- public static <Q> IQueryResult<Q> query(IIndexProvider<Q> indexProvider, IQuery<Q> query, IProgressMonitor monitor) {
- if (monitor != null)
- monitor.beginTask(null, IProgressMonitor.UNKNOWN);
- IQueryResult<Q> result = (query instanceof IQueryWithIndex<?>) ? ((IQueryWithIndex<Q>) query).perform(indexProvider) : query.perform(indexProvider.everything());
- if (monitor != null) {
- monitor.worked(1);
- monitor.done();
- }
- return result;
- }
-
- public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor) {
- return query(this, query, monitor);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/messages.properties b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/messages.properties
deleted file mode 100644
index 540b61526..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/messages.properties
+++ /dev/null
@@ -1,69 +0,0 @@
-###############################################################################
- # Copyright (c) 2009 Cloudsmith Inc. and others.
- # All rights reserved. This program and the accompanying materials
- # are made available under the terms of the Eclipse Public License v1.0
- # which accompanies this distribution, and is available at
- # http://www.eclipse.org/legal/epl-v10.html
- #
- # Contributors:
- # Cloudsmith Inc. - initial API and implementation
-###############################################################################
-_0_is_not_a_valid_qualifier_in_osgi_1=The {0} value is invalid in OSGi version: "{1}"
-array_can_not_be_empty=Array format can not be empty
-array_can_not_have_character_group=Array format can not have a character group
-auto_can_not_have_pad_value=Auto format can not have a pad value
-cannot_combine_ignore_with_other_instruction=Cannot combine ignore with other instruction
-cannot_combine_range_upper_bound_with_pad_value=Cannot combine range upper bound with pad value
-character_group_defined_more_then_once=Character group was defined more then once
-colon_expected_before_original_version_0=A colon was expected before original version: {0}
-default_defined_more_then_once=Default defined more then once
-delimiter_can_not_be_ignored=A delimiter cannot be ignored
-delimiter_can_not_have_default_value=A delimiter cannot have a default value
-delimiter_can_not_have_pad_value=A delimiter cannot have a pad value
-delimiter_can_not_have_range=A delimiter cannot have a range
-EOS_after_escape=End of string was encountere after the escape character
-expected_orignal_after_colon_0=An original version was expected after colon: {0}
-expected_orignal_after_slash_0=A format or colon was expected after slash: {0}
-expected_slash_after_raw_vector_0=A slash was expected after a raw version: {0}
-filter_missing_leftparen=Filter "{0}" Missing ''('' at position {1}
-filter_missing_rightparen=Filter "{0}" Missing '')'' at position {1}
-filter_trailing_characters=Filter "{0}" Extraneous trailing characters at position {1}
-filter_invalid_operator=Filter "{0}" Invalid operator at position {1}
-filter_missing_attr=Filter "{0}" Missing attr at position {1}
-filter_missing_value=Filter "{0}" is missing value at position {1}
-filter_invalid_value=Filter "{0}" has invalid value at position {1}
-filter_premature_end=Filter "{0}" ends before it is complete
-format_0_unable_to_parse_1=Format "{0}" was unable to parse {1}
-format_0_unable_to_parse_empty_version=Format "{0}" was unable to parse an empty version
-format_is_empty=Format is empty
-format_must_be_delimited_by_colon_0=Format must be delimited by version range: {0}
-group_can_not_be_empty=A group can not be empty
-ignore_defined_more_then_once=More then one definition of ignore
-illegal_character_encountered_ascii_0=An illegal character was encountered. Code = {0}
-missing_comma_in_range_0=Missing comma in range "{0}"
-negative_character_range=The character range is negative
-neither_raw_vector_nor_format_specified_0=Neither raw version nor format was specified: {0}
-number_can_not_have_pad_value=A number cannot have a pad value
-only_format_specified_0=Only a format was specified: {0}
-only_max_and_empty_string_defaults_can_have_translations=Only max string and empty string defaults can have translations
-original_must_start_with_colon_0=Original version must start with colon: {0}
-original_stated_but_missing_0=Expected original version after colon: {0}
-no_expression_factory=No Expression Factory service has been registered
-no_expression_parser=No Expression Parser service has been registered
-pad_defined_more_then_once=Pad was defined more then once
-performing_subquery=Performing subquery
-premature_end_of_format=Premature end of format
-premature_end_of_format_expected_0=Premature end of format, "{0}" expected
-premature_EOS_0=Premature end of string in "{0}"
-range_defined_more_then_once=Range defined more then once
-range_max_cannot_be_less_then_range_min=The range maximum must not be less then its minimum
-range_max_cannot_be_zero=The range maximum cannot be zero
-range_min_0_is_not_less_then_range_max_1=Range minimum "{0}" is not less then range maximum "{1}" (inclusion is required at both ends if the versions are equal)
-range_boundaries_0_and_1_cannot_have_different_formats=Range boundaries "{0}" and "{1}" cannot have different formats
-raw_and_original_must_use_same_range_inclusion_0=Raw and original must use the same range inclusion markers in range "{0}"
-raw_element_can_not_have_pad_value=A raw element cannot have a pad value
-raw_element_expected_0=A raw element was expected: {0}
-string_can_not_have_pad_value=A string cannot have a pad value
-syntax_error_in_version_format_0_1_2=Syntax error in version format "{0}" at position {1}: {2}
-syntax_error_in_version_format_0_1_found_2_expected_3=Syntax error in version format "{0}" at position {1}: Found {2} when {3} was expected
-unbalanced_format_parenthesis=Unbalanced format parenthesis \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/query/UpdateQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/query/UpdateQuery.java
deleted file mode 100644
index 9ff724815..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/query/UpdateQuery.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Cloudsmith Inc. - converted into expression based query
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.query;
-
-import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
-
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IInstallableUnitPatch;
-import org.eclipse.equinox.p2.metadata.expression.*;
-
-/**
- * A query that finds all IUs that are considered an "Update" of the
- * specified IU.
- */
-public final class UpdateQuery extends ExpressionMatchQuery<IInstallableUnit> {
- private static final IExpression expr1;
- private static final IExpression expr2;
-
- static {
- IExpressionParser parser = ExpressionUtil.getParser();
-
- // This expression is used in case the updateFrom is an IInstallableUnitPatch
- //
- expr1 = parser.parse("$0 ~= updateDescriptor && ($0.id != id || $0.version < version)"); //$NON-NLS-1$
-
- // When updateFrom is not an IInstallableUnitPatch, we need to do one of two things depending
- // on if the current item is an InstallableUnitPatch or not.
- //
- expr2 = parser.parse("this ~= class('org.eclipse.equinox.p2.metadata.IInstallableUnitPatch')" + // //$NON-NLS-1$
- "? $0 ~= lifeCycle" + // //$NON-NLS-1$
- ": $0 ~= updateDescriptor && ($0.id != id || $0.version < version)"); //$NON-NLS-1$
- }
-
- public UpdateQuery(IInstallableUnit updateFrom) {
- super(IInstallableUnit.class, updateFrom instanceof IInstallableUnitPatch ? expr1 : expr2, updateFrom, IInstallableUnitPatch.class);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IArtifactKey.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IArtifactKey.java
deleted file mode 100644
index fdcba7a80..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IArtifactKey.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-
-/**
- * Provide standardised artifact information to uniquely identify the
- * corresponding bytes (perhaps not stored as a file).
- * <p>
- * Artifact keys represent both a unique opaque identifier as well as structured
- * and standardised pieces of information.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IArtifactKey extends IVersionedId {
-
- /**
- * Returns the classifier for this artifact key. The returned value can be empty.
- * @return the classifier segment of the key.
- */
- public String getClassifier();
-
- /**
- * Returns the id for this artifact key.
- * @return the id segment of the key.
- */
- public String getId();
-
- /**
- * Returns the version for this artifact key.
- * @return the version segment of the key.
- */
- public Version getVersion();
-
- /**
- * Returns the canonical string form of this artifact key.
- * @return the canonical string representing this key
- */
- public String toExternalForm();
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ICopyright.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ICopyright.java
deleted file mode 100644
index d8ad2bd43..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ICopyright.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import java.net.URI;
-
-/**
- * The <code>ICopyright</code> interface represents a software copyright. A copyright has
- * required body text which may be the full text or a summary. An optional location field can be specified
- * which links to full text.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface ICopyright {
-
- /**
- * Returns the location of a document containing the copyright notice.
- *
- * @return The location of the copyright notice, or <code>null</code>
- */
- public URI getLocation();
-
- /**
- * Returns the license body.
- *
- * @return the license body, never <code>null</code>
- */
- public String getBody();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnit.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnit.java
deleted file mode 100644
index fecc130d5..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnit.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Genuitec, LLC - added license support
- * EclipseSource - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-
-/**
- * An installable unit represents an atomic, indivisible unit of installable functionality
- * in a provisioned system. Everything that can be installed or uninstalled in a system,
- * including both concrete artifacts and instructions describing steps to be performed
- * during install, must be expressed as one or more installable units. Thus the set of
- * installable units present in a system, together with the existing environment
- * (operating system, etc), completely describes the initial installed state of that system.
- * <p>
- * Installable units may have dependencies on functionality provided by other installable
- * units, such that the unit cannot be installed unless some other installable unit
- * is present in the installed system that provides a matching capability. Such
- * dependencies are referred to as <i>required capabilities</i>. Conversely,
- * installable units may declared <i>provided capabilities</i>, describing the
- * capabilities that they make available to other units in the system. Note the
- * weak coupling at work here: installable units never directly depend on each other,
- * but instead depend on abstract capabilities that any other installable unit may provide.
- * </p>
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IInstallableUnit extends IVersionedId, Comparable<IInstallableUnit> {
-
- /**
- * A capability namespace representing a particular InstallableUnit by id.
- * Each InstallableUnit automatically provides a capability in this namespace representing
- * itself, and other InstallableUnits can require such a capability to state that they
- * require a particular InstallableUnit to be present.
- *
- * @see IInstallableUnit#getId()
- */
- public static final String NAMESPACE_IU_ID = "org.eclipse.equinox.p2.iu"; //$NON-NLS-1$
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.partial.iu"</code>) for a
- * boolean property indicating the IU is generated from incomplete information and
- * should be replaced by the complete IU if available.
- *
- * @see #getProperty(String)
- */
- public static final String PROP_PARTIAL_IU = "org.eclipse.equinox.p2.partial.iu"; //$NON-NLS-1$
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.contact"</code>) for a
- * String property containing a contact address where problems can be reported,
- * such as an email address.
- *
- * @see #getProperty(String)
- */
- public static final String PROP_CONTACT = "org.eclipse.equinox.p2.contact"; //$NON-NLS-1$
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.description"</code>) for a
- * String property containing a human-readable description of the installable unit.
- *
- * @see #getProperty(String)
- */
- public static final String PROP_DESCRIPTION = "org.eclipse.equinox.p2.description"; //$NON-NLS-1$
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.description.url"</code>) for a
- * String property containing a URL to the description of the installable unit.
- *
- * @see #getProperty(String)
- */
- public static final String PROP_DESCRIPTION_URL = "org.eclipse.equinox.p2.description.url"; //$NON-NLS-1$
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.doc.url"</code>) for a
- * String property containing a URL for documentation about the installable unit.
- *
- * @see #getProperty(String)
- */
- public static final String PROP_DOC_URL = "org.eclipse.equinox.p2.doc.url"; //$NON-NLS-1$
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.bundle.localization"</code>) for a String
- * property containing the bundle localization property file name
- */
- public static final String PROP_BUNDLE_LOCALIZATION = "org.eclipse.equinox.p2.bundle.localization"; //$NON-NLS-1$
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.name"</code>) for a
- * String property containing a human-readable name for the installable unit.
- *
- * @see #getProperty(String)
- */
- public static final String PROP_NAME = "org.eclipse.equinox.p2.name"; //$NON-NLS-1$
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.provider"</code>) for a
- * String property containing information about the vendor or provider of the
- * installable unit.
- *
- * @see #getProperty(String)
- */
- public static final String PROP_PROVIDER = "org.eclipse.equinox.p2.provider"; //$NON-NLS-1$
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.icon"</code>) for a String
- * property containing a URI for an icon that should be shown when displaying this
- * installable unit in a user interface.
- *
- * @see #getProperty(String)
- */
- public static final String PROP_ICON = "org.eclipse.equinox.p2.icon"; //$NON-NLS-1$
-
- /**
- * Returns the collection of artifacts associated with this installable unit.
- * Installing this unit into a system will cause these artifacts to be fetched from
- * a repository and applied to the installed system. Uninstalling this unit
- * will cause these artifacts to be removed from the system.
- *
- * @return The artifacts associated with this installable unit
- */
- public Collection<IArtifactKey> getArtifacts();
-
- /**
- * Returns the filter on this installable unit. The filter is matched against
- * the properties of the environment the unit is installed into. An installable
- * unit will not be installed if it has a filter condition that is not satisfied by the
- * properties of the environment.
- *
- * @return The installation filter for this unit, or <code>null</code>
- * @noreference This method is not intended to be referenced by clients.
- */
- public IMatchExpression<IInstallableUnit> getFilter();
-
- /**
- * Returns the fragments that have been bound to this installable unit, or
- * <code>null</code> if this unit is not resolved.
- *
- * @see #isResolved()
- * @return The fragments bound to this installable unit, or <code>null</code>
- */
- public Collection<IInstallableUnitFragment> getFragments();
-
- /**
- * Returns an <i>unmodifiable copy</i> of the properties
- * associated with the installable unit.
- *
- * @return an <i>unmodifiable copy</i> of the properties of this installable unit.
- */
- public Map<String, String> getProperties();
-
- /**
- * Returns the untranslated property of this installable unit associated with the given key.
- * Returns <code>null</code> if no such property is defined.
- * <p>
- * If the property value has been externalized, this method will return a string containing
- * the translation key rather than a human-readable string. For this reason, clients
- * wishing to obtain the value for a property that is typically translated should use
- * {@link #getProperty(String, String)} instead.
- * </p>
- *
- * @param key The property key to retrieve a property value for
- * @return the property that applies to this installable unit or <code>null</code>
- */
- public String getProperty(String key);
-
- /**
- * Returns the property of this installable unit associated with the given key.
- * Returns <code>null</code> if no such property is defined or no applicable
- * translation is available.
- *
- * @param key The property key to retrieve a property value for
- * @param locale The locale to translate the property for, or null to use the current locale.
- * @return the property that applies to this installable unit or <code>null</code>
- */
- public String getProperty(String key, String locale);
-
- /**
- * Returns the collection of capabilities provided by this installable unit.
- *
- * @return The collection of capabilities provided by this installable unit.
- */
- public Collection<IProvidedCapability> getProvidedCapabilities();
-
- public Collection<IRequirement> getRequirements();
-
- public Collection<IRequirement> getMetaRequirements();
-
- public Collection<ITouchpointData> getTouchpointData();
-
- public ITouchpointType getTouchpointType();
-
- /**
- * Returns whether this installable unit has been resolved. A resolved
- * installable unit represents the union of an installable unit and some
- * fragments.
- *
- * @see #getFragments()
- * @see #unresolved()
- * @return <code>true</code> if this installable unit is resolved, and
- * <code>false</code> otherwise.
- */
- public boolean isResolved();
-
- /**
- * Returns whether this installable unit is a singleton. Only one singleton
- * installable unit with a given id is allowed to exist in a given installed system.
- * Attempting to install multiple versions of a singleton will fail.
- * @return <code>true</code> if this unit is a singleton, and <code>false</code> otherwise
- * @noreference This method is not intended to be referenced by clients.
- */
- public boolean isSingleton();
-
- /**
- * Returns whether this unit has a provided capability that satisfies the given
- * requirement.
- * @return <code>true</code> if this unit satisfies the given requirement, and <code>false</code> otherwise.
- */
- public boolean satisfies(IRequirement candidate);
-
- /**
- * Returns the unresolved equivalent of this installable unit. If this unit is
- * already unresolved, this method returns the receiver. Otherwise, this
- * method returns an installable unit with the same id and version, but without
- * any fragments attached.
- *
- * @see #getFragments()
- * @see #isResolved()
- * @return The unresolved equivalent of this unit
- */
- public IInstallableUnit unresolved();
-
- /**
- * Returns information about what this installable unit is an update of.
- * @return The lineage information about the installable unit
- */
- public IUpdateDescriptor getUpdateDescriptor();
-
- /**
- * Returns the untranslated licenses that apply to this installable unit.
- * <p>
- * If the license text has been externalized, this method will return strings containing
- * the translation keys rather than human-readable strings. For this reason, clients
- * wishing to obtain a license for display to an end user should use {@link #getLicenses(String)}
- * instead.
- * </p>
- * @return the licenses that apply to this installable unit
- */
- public Collection<ILicense> getLicenses();
-
- /**
- * Returns the licenses that apply to this installable unit. Any translation of the
- * licenses for the given locale will be applied. Returns an empty collection if this
- * unit has no licenses, or if the available licenses are externalized and do not
- * have translations available for the given locale.
- *
- * @param locale The locale to translate the license for, or null to use the current locale.
- * @return the translated licenses that apply to this installable unit
- */
- public Collection<ILicense> getLicenses(String locale);
-
- /**
- * Returns the untranslated copyright that applies to this installable unit.
- * <p>
- * If the copyright text has been externalized, this method will return strings containing
- * the translation keys rather than human-readable strings. For this reason, clients
- * wishing to obtain a copyright for display to an end user should use {@link #getCopyright(String)}
- * instead.
- * </p>
- * @return the copyright that applies to this installable unit or <code>null</code>
- */
- public ICopyright getCopyright();
-
- /**
- * Returns the copyright that applies to this installable unit. Any translation of the
- * copyright for the given locale will be applied. Returns <code>null</code> if this
- * unit has no copyright, or if the copyright is externalized and no translations are
- * available for the given locale.
- *
- * @param locale The locale to translate the copyright for, or null to use the current locale.
- * @return the copyright that applies to this installable unit or <code>null</code>
- */
- public ICopyright getCopyright(String locale);
-
- /**
- * Returns whether this InstallableUnit is equal to the given object.
- *
- * This method returns <i>true</i> if:
- * <ul>
- * <li> Both this object and the given object are of type IInstallableUnit
- * <li> The result of <b>getId()</b> on both objects are equal
- * <li> The result of <b>getVersion()</b> on both objects are equal
- * </ul>
- */
- public boolean equals(Object obj);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitFragment.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitFragment.java
deleted file mode 100644
index 1e00481e7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitFragment.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import java.util.Collection;
-
-/**
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IInstallableUnitFragment extends IInstallableUnit {
- public Collection<IRequirement> getHost();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitPatch.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitPatch.java
deleted file mode 100644
index 6f0a02971..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitPatch.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import java.util.List;
-
-/**
- * An installable unit patch is an installable unit that alters the required capabilities of another
- * installable unit.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IInstallableUnitPatch extends IInstallableUnit {
- /**
- * The applicability scope of a patch describes the installable units that this
- * patch should be applied to. Specifically, this patch will be applied to all installable
- * units that satisfy all of the required capabilities in one or more of the given
- * required capability arrays.
- * <p>
- * The returned two-dimensional array can be considered
- * as a boolean expression, where items in the inner array are connected by
- * AND operators, and each of the arrays are separated by OR operators. For example
- * a scope of [[r1, r2, r3], [r4, r5]] will match any unit whose provided capabilities
- * satisfy the expression ((r1 ^ r2 ^ r3) | (r4 ^ r5)).
- * @noreference This method is not intended to be referenced by clients.
- */
- IRequirement[][] getApplicabilityScope();
-
- /**
- * Returns the requirement changes imposed by the patch.
- * @return The patch requirement changes.
- */
- List<IRequirementChange> getRequirementsChange();
-
- /**
- * Returns the required capability that defines the lifecycle of this patch. The
- * patch will be installed into a profile if and only if the lifecycle capability
- * is satisfied by some IU in the profile. If a future provisioning operation causes
- * the requirement to no longer be satisfied, the patch will be uninstalled.
- */
- IRequirement getLifeCycle();
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ILicense.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ILicense.java
deleted file mode 100644
index 5d613ad9b..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ILicense.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* EclipseSource - initial API and implementation
- * IBM - ongoing development
-******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import java.net.URI;
-
-/**
- * The <code>ILicense</code> interface represents a software license. A license has required body text
- * which may be the full text or an annotation. An optional URL field can be specified
- * which links to full text. Licenses can be easily compared using their digests.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface ILicense {
-
- /**
- * Returns the location of a document containing the full license.
- *
- * @return the location of the license document, or <code>null</code>
- */
- public URI getLocation();
-
- /**
- * Returns the license body.
- * @return the license body, never <code>null</code>
- */
- public String getBody();
-
- /**
- * Returns the message digest of the license body. The digest is calculated on a normalized
- * version of the license where all whitespace has been reduced to one space.
- *
- * @return the message digest as a <code>BigInteger</code>, never <code>null</code>
- */
- public String getUUID();
-
- /**
- * Returns whether this license is equal to the given object.
- *
- * This method returns <i>true</i> if:
- * <ul>
- * <li> Both this object and the given object are of type ILicense
- * <li> The result of <b>getDigest()</b> on both objects are equal
- * </ul>
- */
- public boolean equals(Object obj);
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IProvidedCapability.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IProvidedCapability.java
deleted file mode 100644
index 2d7cc12c5..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IProvidedCapability.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* EclipseSource - initial API and implementation
- * IBM - ongoing development
-******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-/**
- * Describes a capability as exposed or required by an installable unit
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IProvidedCapability {
-
- /**
- *
- * @return String
- * @noreference This method is not intended to be referenced by clients.
- */
- public String getName();
-
- /**
- *
- * @return String
- * @noreference This method is not intended to be referenced by clients.
- */
- public String getNamespace();
-
- /**
- *
- * @return String
- * @noreference This method is not intended to be referenced by clients.
- */
- public Version getVersion();
-
- /**
- * Returns whether this provided capability is equal to the given object.
- *
- * This method returns <i>true</i> if:
- * <ul>
- * <li> Both this object and the given object are of type IProvidedCapability
- * <li> The result of <b>getName()</b> on both objects are equal
- * <li> The result of <b>getNamespace()</b> on both objects are equal
- * <li> The result of <b>getVersion()</b> on both objects are equal
- * </ul>
- */
- public boolean equals(Object other);
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirement.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirement.java
deleted file mode 100644
index 5338d47b2..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirement.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 2010 IBM and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* IBM - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-
-/**
- * A requirement represents some external constraint on an {@link IInstallableUnit}.
- * Each requirement represents something an {@link IInstallableUnit} needs that
- * it expects to be provided by another {@link IInstallableUnit}. Requirements are
- * entirely generic, and are intended to be capable of representing anything that
- * an {@link IInstallableUnit} may need either at install time, or at runtime.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IRequirement {
-
- /**
- * Returns the minimum cardinality of the requirement. That is, the minimum
- * number of capabilities that must be provided that match this requirement before
- * this requirement is considered fully satisfied. A minimum cardinality of 0 indicates
- * that the requirement is optional.
- *
- * @return the minimum cardinality of this requirement
- */
- int getMin();
-
- /**
- * Returns the maximum cardinality of the requirement. That is, the maximum
- * number of capabilities that are permitted to be present that satisfy this requirement.
- * A maximum cardinality of 0 indicates that there must <em>not</em> be
- * any installable unit in the system that satisfies this requirement.
- *
- * @return the maximum cardinality of this requirement
- */
- int getMax();
-
- /**
- * @noreference This method is not intended to be referenced by clients.
- */
- IMatchExpression<IInstallableUnit> getFilter();
-
- /**
- * Returns a boolean match expression that will return true for any
- * {@link IInstallableUnit} that matches the requirement.
- * @return A boolean match expression for installable unit matching.
- */
- IMatchExpression<IInstallableUnit> getMatches();
-
- /**
- * Returns whether the provided capabilities of the given installable unit satisfy
- * this requirement.
- *
- * @param iu the installable unit to check for matching capabilities
- * @return <code>true</code> if the given installable unit satisfies this
- * requirement, and <code>false</code> otherwise.
- */
- boolean isMatch(IInstallableUnit iu);
-
- /**
- * Returns whether this requirement should cause extra installable units
- * to be installed in order to satisfy it.
- * @return <code>true</code> if additional installable units should be installed
- * to satisfy this requirement, and <code>false</code> otherwise
- */
- boolean isGreedy();
-
- /**
- * Returns a textual description of this requirement.
- *
- * @return a textual description of this requirement
- */
- String getDescription();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirementChange.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirementChange.java
deleted file mode 100644
index 27d89bc7f..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirementChange.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-
-/**
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IRequirementChange {
-
- /**
- *
- * @noreference This method is not intended to be referenced by clients.
- */
- public IRequiredCapability applyOn();
-
- /**
- *
- * @noreference This method is not intended to be referenced by clients.
- */
-
- public IRequiredCapability newValue();
-
- /**
- *
- * @noreference This method is not intended to be referenced by clients.
- */
-
- public boolean matches(IRequiredCapability toMatch);
-
- /**
- * Returns whether this requirement change is equal to the given object.
- *
- * This method returns <i>true</i> if:
- * <ul>
- * <li> Both this object and the given object are of type IRequiredCapability
- * <li> The result of <b>applyOn()</b> on both objects are equal
- * <li> The result of <b>newValue()</b> on both objects are equal
- * </ul>
- * @noreference This method is not intended to be referenced by clients.
- */
- public boolean equals(Object other);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointData.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointData.java
deleted file mode 100644
index 89530b709..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointData.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import java.util.Map;
-
-/**
- * ITouchpoint data instances contain the additional information needed by a touchpoint
- * to execute each engine phase it participates in. This includes the sequence of
- * instruction statements to be executed during each phase, and any additional
- * supporting data needed to perform the phase.
- *
- * @see MetadataFactory#createTouchpointData(Map)
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface ITouchpointData {
-
- /**
- * Returns the touchpoint instruction corresponding to the given key.
- */
- public ITouchpointInstruction getInstruction(String instructionKey);
-
- /**
- * Returns an unmodifiable map of the touchpoint instructions. The map
- * keys are strings, and the values are instances of {@link ITouchpointInstruction}.
- *
- * @return the touchpoint instructions
- */
- public Map<String, ITouchpointInstruction> getInstructions();
-
- /**
- * Returns whether this TouchpointData is equal to the given object.
- *
- * This method returns <i>true</i> if:
- * <ul>
- * <li> Both this object and the given object are of type ITouchpointData
- * <li> The result of <b>getInstructions()</b> on both objects are equal
- * </ul>
- */
- public boolean equals(Object obj);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointInstruction.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointInstruction.java
deleted file mode 100644
index e7c9b49b9..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointInstruction.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-/**
- * A touchpoint instruction contains either a sequence of instruction statements
- * to be executed during a particular engine phase, or some simple string value
- * that is needed by a touchpoint to execute its phases.
- * <p>
- * The format of a touchpoint instruction statement sequence is as follows:
- *
- * statement-sequence :
- * | statement ';'
- * | statement-sequence statement
- * ;
- *
- *Where a statement is of the format:
- *
- * statement :
- * | actionName '(' parameters ')'
- * ;
- *
- * parameters :
- * | // empty
- * | parameter
- * | parameters ',' parameter
- * ;
- *
- * parameter :
- * | paramName ':' paramValue
- * ;
- *
- * actionName, paramName, paramValue :
- * | String
- * ;
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface ITouchpointInstruction {
-
- /**
- * Returns the body of this touchpoint instruction. The body is either a sequence
- * of instruction statements, or a simple string value.
- *
- * @return The body of this touchpoint instruction
- */
- public String getBody();
-
- //TODO What is this? Please doc
- public String getImportAttribute();
-
- /**
- * Returns whether this TouchpointInstruction is equal to the given object.
- *
- * This method returns <i>true</i> if:
- * <ul>
- * <li> Both this object and the given object are of type ITouchpointInstruction
- * <li> The result of <b>getBody()</b> on both objects are equal
- * <li> The result of <b>getImportAttribute()</b> on both objects are equal
- * </ul>
- */
- public boolean equals(Object obj);
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointType.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointType.java
deleted file mode 100644
index 02218f760..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointType.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-
-/**
- * Identifies a particular touchpoint. A touchpoint is identified by an id
- * and a version.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface ITouchpointType {
-
- /**
- * A touchpoint type indicating an undefined touchpoint type. Identity (==)
- * must be used to test for the <code>NONE</code> type.
- */
- public static final ITouchpointType NONE = new ITouchpointType() {
-
- public String getId() {
- return "null"; //$NON-NLS-1$
- }
-
- public Version getVersion() {
- return Version.emptyVersion;
- }
- };
-
- public String getId();
-
- public Version getVersion();
-
- /**
- * Returns whether this TouchpointInstruction is equal to the given object.
- *
- * This method returns <i>true</i> if:
- * <ul>
- * <li> Both this object and the given object are of type ITouchpointType
- * <li> The result of <b>getId()</b> on both objects are equal
- * <li> The result of <b>getVersion()</b> on both objects are equal
- * </ul>
- */
- public boolean equals(Object obj);
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IUpdateDescriptor.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IUpdateDescriptor.java
deleted file mode 100644
index 0fff4ebab..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IUpdateDescriptor.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import java.net.URI;
-import java.util.Collection;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-
-/**
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IUpdateDescriptor {
- public final int NORMAL = 0;
- public final int HIGH = 1;
-
- Collection<IMatchExpression<IInstallableUnit>> getIUsBeingUpdated();
-
- /**
- * The description of the update. This allows to explain what the update is about.
- * @return A description
- */
- public String getDescription();
-
- /**
- * Returns the location of a document containing the description.
- *
- * @return the location of the document, or <code>null</code>
- */
- public URI getLocation();
-
- /**
- * The importance of the update descriptor represented as a int.
- * @return The severity.
- */
- public int getSeverity();
-
- /**
- * Helper method indicating whether or not an installable unit is an update for the installable unit passed
- * @param iu the installable unit checked
- * @return A boolean indicating whether or not an installable unit is an update.
- */
- public boolean isUpdateOf(IInstallableUnit iu);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionFormat.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionFormat.java
deleted file mode 100644
index 594621674..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionFormat.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-/**
- * <p>The IVersionFormat represents the Omni Version Format in compiled form. It
- * is also a parser for versions of that format.</p>
- * <p>An instance of IVersionFormat is immutable and thus thread safe. The parser
- * does not maintain any state.</p>
- * @noextend This interface is not intended to be extended by clients.
- * @noimplement This interface is not intended to be implemented by clients.
- * @since 2.0
- */
-public interface IVersionFormat {
-
- /**
- * The string that by default will be interpreted as the logical max string when parsing
- * optional elements of type string and a default that is the empty string (i.e. OSGi)
- */
- static final String DEFAULT_MAX_STRING_TRANSLATION = "zzz"; //$NON-NLS-1$
-
- /**
- * The string that by default will be interpreted as the logical min string when parsing
- * optional elements of type string and a default that is the max string (i.e. Maven triplets)
- */
- static final String DEFAULT_MIN_STRING_TRANSLATION = "-"; //$NON-NLS-1$
-
- /**
- * Appends the string representation of this compiled format to
- * the given StringBuffer.
- * @param sb The buffer that will receive the string representation
- */
- void toString(StringBuffer sb);
-
- /**
- * Parse the given version string.
- * @param version The version string to parse.
- * @return A created version.
- * @throws IllegalArgumentException If the version string could not be parsed.
- */
- Version parse(String version);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionedId.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionedId.java
deleted file mode 100644
index eb8aec341..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionedId.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- * IBM - Ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-
-/**
- * An interface representing a (id,version) pair.
- * @since 2.0
- */
-public interface IVersionedId {
- /**
- * Returns the id portion of this versioned id.
- *
- * @return The id portion of this versioned id.
- */
- String getId();
-
- /**
- * Returns the version portion of this versioned id.
- *
- * @return the version portion of this versioned id.
- */
- Version getVersion();
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/KeyWithLocale.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/KeyWithLocale.java
deleted file mode 100644
index 8892a7c67..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/KeyWithLocale.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import java.io.Serializable;
-import java.util.Locale;
-
-/**
- * A key that can be used to extract a localized property for a specified Locale
- * @noextend This class is not intended to be subclassed by clients.
- * @since 2.0
- */
-public final class KeyWithLocale implements Serializable {
- private static final long serialVersionUID = 8818242663547645188L;
- private final String key;
- private final Locale locale;
-
- public KeyWithLocale(String key, Locale locale) {
- this.key = key;
- this.locale = locale;
- }
-
- public String getKey() {
- return key;
- }
-
- public Locale getLocale() {
- return locale;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/MetadataFactory.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/MetadataFactory.java
deleted file mode 100644
index c4200bce3..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/MetadataFactory.java
+++ /dev/null
@@ -1,670 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Genuitec, LLC
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-
-/**
- * A factory class for instantiating various p2 metadata objects.
- * @noextend
- * @noimplement
- * @since 2.0
- */
-public final class MetadataFactory {
- /**
- * A description containing information about an installable unit. Once created,
- * installable units are immutable. This description class allows a client to build
- * up the state for an installable unit incrementally, and then finally produce
- * the resulting immutable unit.
- */
- public static class InstallableUnitDescription {
- public static final String PROP_TYPE_GROUP = "org.eclipse.equinox.p2.type.group"; //$NON-NLS-1$
-
- InstallableUnit unit;
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.type.patch"</code>) for a
- * boolean property indicating that an installable unit is a group.
- *
- */
- public static final String PROP_TYPE_PATCH = "org.eclipse.equinox.p2.type.patch"; //$NON-NLS-1$
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.type.fragment"</code>) for a
- * boolean property indicating that an installable unit is a fragment.
- *
- */
- public static final String PROP_TYPE_FRAGMENT = "org.eclipse.equinox.p2.type.fragment"; //$NON-NLS-1$
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.type.category"</code>) for a
- * boolean property indicating that an installable unit is a category.
- *
- */
- public static final String PROP_TYPE_CATEGORY = "org.eclipse.equinox.p2.type.category"; //$NON-NLS-1$
-
- public InstallableUnitDescription() {
- super();
- }
-
- public void addProvidedCapabilities(Collection<IProvidedCapability> additional) {
- if (additional == null || additional.size() == 0)
- return;
- Collection<IProvidedCapability> current = unit().getProvidedCapabilities();
- ArrayList<IProvidedCapability> all = new ArrayList<IProvidedCapability>(additional.size() + current.size());
- all.addAll(current);
- all.addAll(additional);
- unit().setCapabilities(all.toArray(new IProvidedCapability[all.size()]));
- }
-
- /** @deprecated Use addRequirements(additional) instead */
- public void addRequiredCapabilities(Collection<IRequirement> additional) {
- addRequirements(additional);
- }
-
- public void addRequirements(Collection<IRequirement> additional) {
- if (additional == null || additional.size() == 0)
- return;
- List<IRequirement> current = unit().getRequirements();
- ArrayList<IRequirement> all = new ArrayList<IRequirement>(additional.size() + current.size());
- all.addAll(current);
- all.addAll(additional);
- unit().setRequiredCapabilities(all.toArray(new IRequirement[all.size()]));
- }
-
- public void addTouchpointData(ITouchpointData data) {
- Assert.isNotNull(data);
- unit().addTouchpointData(data);
- }
-
- public String getId() {
- return unit().getId();
- }
-
- public Collection<IProvidedCapability> getProvidedCapabilities() {
- return unit().getProvidedCapabilities();
- }
-
- /** @deprecated Use getRequirements() instead */
- public List<IRequirement> getRequiredCapabilities() {
- return getRequirements();
- }
-
- public List<IRequirement> getRequirements() {
- return unit().getRequirements();
- }
-
- /** @deprecated Use getMetaRequirements() instead */
- public Collection<IRequirement> getMetaRequiredCapabilities() {
- return getMetaRequirements();
- }
-
- public Collection<IRequirement> getMetaRequirements() {
- return unit().getMetaRequirements();
- }
-
- /**
- * Returns the current touchpoint data on this installable unit description. The
- * touchpoint data may change if further data is added to the description.
- *
- * @return The current touchpoint data on this description
- */
- public Collection<ITouchpointData> getTouchpointData() {
- return unit().getTouchpointData();
-
- }
-
- 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(IMatchExpression<IInstallableUnit> filter) {
- unit().setFilter(filter);
- }
-
- public void setFilter(String filter) {
- unit().setFilter(filter);
- }
-
- public void setId(String id) {
- unit().setId(id);
- }
-
- public void setLicenses(ILicense[] licenses) {
- unit().setLicenses(licenses);
- }
-
- public void setProperty(String key, String value) {
- unit().setProperty(key, value);
- }
-
- /** @deprecated Use setRequirements(requirements) instead */
- public void setRequiredCapabilities(IRequirement[] requirements) {
- setRequirements(requirements);
- }
-
- public void setRequirements(IRequirement[] requirements) {
- unit().setRequiredCapabilities(requirements);
- }
-
- /** @deprecated Use setMetaRequirements(requirements) instead */
- public void setMetaRequiredCapabilities(IRequirement[] metaRequirements) {
- setMetaRequirements(metaRequirements);
- }
-
- public void setMetaRequirements(IRequirement[] 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;
- }
- }
-
- public static class InstallableUnitFragmentDescription extends InstallableUnitDescription {
- public InstallableUnitFragmentDescription() {
- super();
- setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- }
-
- public void setHost(IRequirement... hostRequirement) {
- ((InstallableUnitFragment) unit()).setHost(Arrays.asList(hostRequirement));
- }
-
- InstallableUnit unit() {
- if (unit == null)
- unit = new InstallableUnitFragment();
- return unit;
- }
- }
-
- public static class InstallableUnitPatchDescription extends InstallableUnitDescription {
-
- public InstallableUnitPatchDescription() {
- super();
- setProperty(InstallableUnitDescription.PROP_TYPE_PATCH, Boolean.TRUE.toString());
- }
-
- public void setApplicabilityScope(IRequirement[][] applyTo) {
- if (applyTo == null)
- throw new IllegalArgumentException("A patch scope can not be null"); //$NON-NLS-1$
- ((InstallableUnitPatch) unit()).setApplicabilityScope(applyTo);
- }
-
- public void setLifeCycle(IRequirement 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 IRequirement[0][0]);
- }
- return unit;
- }
- }
-
- /**
- * Singleton touchpoint data for a touchpoint with no instructions.
- */
- private static final ITouchpointData EMPTY_TOUCHPOINT_DATA = new TouchpointData(CollectionUtils.<String, ITouchpointInstruction> emptyMap());
-
- private static ITouchpointType[] typeCache = new ITouchpointType[5];
-
- private static int typeCacheOffset;
-
- /**
- * Returns an {@link IInstallableUnit} based on the given
- * description. Once the installable unit has been created, the information is
- * discarded from the description object.
- *
- * @param description The description of the unit to create
- * @return The created installable unit
- */
- public static IInstallableUnit createInstallableUnit(InstallableUnitDescription description) {
- Assert.isNotNull(description);
- return description.unitCreate();
- }
-
- /**
- * Returns an {@link IInstallableUnitFragment} based on the given
- * description. Once the fragment has been created, the information is
- * discarded from the description object.
- *
- * @param description The description of the unit to create
- * @return The created installable unit fragment
- */
- public static IInstallableUnitFragment createInstallableUnitFragment(InstallableUnitFragmentDescription description) {
- Assert.isNotNull(description);
- return (IInstallableUnitFragment) description.unitCreate();
- }
-
- /**
- * Returns an {@link IInstallableUnitPatch} based on the given
- * description. Once the patch installable unit has been created, the information is
- * discarded from the description object.
- *
- * @param description The description of the unit to create
- * @return The created installable unit patch
- */
- public static IInstallableUnitPatch createInstallableUnitPatch(InstallableUnitPatchDescription description) {
- Assert.isNotNull(description);
- return (IInstallableUnitPatch) description.unitCreate();
- }
-
- /**
- * Returns a {@link IProvidedCapability} with the given values.
- *
- * @param namespace The capability namespace
- * @param name The capability name
- * @param version The capability version
- */
- public static IProvidedCapability createProvidedCapability(String namespace, String name, Version version) {
- return new ProvidedCapability(namespace, name, version);
- }
-
- /**
- * Returns a {@link IRequirement} with the given values.
- *
- * @param namespace The capability namespace
- * @param name The required capability name
- * @param range The range of versions that are required, or <code>null</code>
- * to indicate that any version will do.
- * @param filter The filter used to evaluate whether this capability is applicable in the
- * current environment, or <code>null</code> to indicate this capability is always applicable
- * @param optional <code>true</code> if this required capability is optional,
- * and <code>false</code> otherwise.
- * @param multiple <code>true</code> if this capability can be satisfied by multiple provided capabilities,
- * or <code>false</code> if it requires exactly one match
- * @return the requirement
- */
- public static IRequirement createRequirement(String namespace, String name, VersionRange range, IMatchExpression<IInstallableUnit> filter, boolean optional, boolean multiple) {
- return new RequiredCapability(namespace, name, range, filter, optional ? 0 : 1, multiple ? Integer.MAX_VALUE : 1, true, null);
- }
-
- /**
- * Create and return a new requirement ({@link IRequirement}) with the specified values.
- *
- * @param namespace the namespace for the requirement. Must not be <code>null</code>.
- * @param name the name for the requirement. Must not be <code>null</code>.
- * @param range the version range. A value of <code>null</code> is equivalent to {@link VersionRange#emptyRange} and matches all versions.
- * @param filter The filter used to evaluate whether this capability is applicable in the
- * current environment, or <code>null</code> to indicate this capability is always applicable
- * @param minCard minimum cardinality
- * @param maxCard maximum cardinality
- * @param greedy <code>true</code> if the requirement should be considered greedy and <code>false</code> otherwise
- * @return the requirement
- */
- public static IRequirement createRequirement(String namespace, String name, VersionRange range, IMatchExpression<IInstallableUnit> filter, int minCard, int maxCard, boolean greedy) {
- return new RequiredCapability(namespace, name, range, filter, minCard, maxCard, greedy, null);
- }
-
- /**
- * Create and return a new requirement ({@link IRequirement}) with the specified values.
- *
- * @param requirement the match expression
- * @param filter The filter used to evaluate whether this capability is applicable in the
- * current environment, or <code>null</code> to indicate this capability is always applicable
- * @param minCard minimum cardinality
- * @param maxCard maximum cardinality
- * @param greedy <code>true</code> if the requirement should be considered greedy and <code>false</code> otherwise
- * @return the requirement
- */
- public static IRequirement createRequirement(IMatchExpression<IInstallableUnit> requirement, IMatchExpression<IInstallableUnit> filter, int minCard, int maxCard, boolean greedy) {
- return new RequiredCapability(requirement, filter, minCard, maxCard, greedy, null);
- }
-
- /**
- * Create and return a new requirement ({@link IRequirement}) with the specified values.
- *
- * @param namespace the namespace for the requirement. Must not be <code>null</code>.
- * @param name the name for the requirement. Must not be <code>null</code>.
- * @param range the version range. A value of <code>null</code> is equivalent to {@link VersionRange#emptyRange} and matches all versions.
- * @param filter The filter used to evaluate whether this capability is applicable in the
- * current environment, or <code>null</code> to indicate this capability is always applicable
- * @param optional <code>true</code> if this requirement is optional, and <code>false</code> otherwise.
- * @param multiple <code>true</code> if this requirement can be satisfied by multiple provided capabilities, or <code>false</code>
- * if it requires exactly one match
- * @param greedy <code>true</code> if the requirement should be considered greedy and <code>false</code> otherwise
- * @return the requirement
- */
- public static IRequirement createRequirement(String namespace, String name, VersionRange range, String filter, boolean optional, boolean multiple, boolean greedy) {
- return new RequiredCapability(namespace, name, range, filter, optional, multiple, greedy);
- }
-
- /**
- * Create and return a new requirement ({@link IRequirement}) with the specified values.
- *
- * @param namespace the namespace for the requirement. Must not be <code>null</code>.
- * @param name the name for the requirement. Must not be <code>null</code>.
- * @param range the version range. A value of <code>null</code> is equivalent to {@link VersionRange#emptyRange} and matches all versions.
- * @param filter The filter used to evaluate whether this capability is applicable in the
- * current environment, or <code>null</code> to indicate this capability is always applicable
- * @param minCard minimum cardinality
- * @param maxCard maximum cardinality
- * @param greedy <code>true</code> if the requirement should be considered greedy and <code>false</code> otherwise
- * @param description a <code>String</code> description of the requirement, or <code>null</code>
- * @return the requirement
- */
- public static IRequirement createRequirement(String namespace, String name, VersionRange range, IMatchExpression<IInstallableUnit> filter, int minCard, int maxCard, boolean greedy, String description) {
- return new RequiredCapability(namespace, name, range, filter, minCard, maxCard, greedy, description);
- }
-
- /**
- * Create and return a new requirement ({@link IRequirement}) with the specified values.
- *
- * @param requirement the match expression
- * @param filter the filter, or <code>null</code>
- * @param minCard minimum cardinality
- * @param maxCard maximum cardinality
- * @param greedy <code>true</code> if the requirement should be considered greedy and <code>false</code> otherwise
- * @param description a <code>String</code> description of the requirement, or <code>null</code>
- * @return the requirement
- */
- public static IRequirement createRequirement(IMatchExpression<IInstallableUnit> requirement, IMatchExpression<IInstallableUnit> filter, int minCard, int maxCard, boolean greedy, String description) {
- return new RequiredCapability(requirement, filter, minCard, maxCard, greedy, description);
- }
-
- /**
- * Returns a new requirement change.
- * @param applyOn The source of the requirement change - the kind of requirement to apply the change to
- * @param newValue The result of the requirement change - the requirement to replace the source requirement with
- * @return a requirement change
- */
- public static IRequirementChange createRequirementChange(IRequirement applyOn, IRequirement newValue) {
- if ((applyOn == null || applyOn instanceof IRequiredCapability) && (newValue == null || newValue instanceof IRequiredCapability))
- return new RequirementChange((IRequiredCapability) applyOn, (IRequiredCapability) newValue);
- throw new IllegalArgumentException();
- }
-
- /**
- * Returns a new {@link ICopyright}.
- * @param location the location of a document containing the copyright notice, or <code>null</code>
- * @param body the copyright body, cannot be <code>null</code>
- * @throws IllegalArgumentException when the <code>body</code> is <code>null</code>
- */
- public static ICopyright createCopyright(URI location, String body) {
- return new Copyright(location, body);
- }
-
- /**
- * Return a new {@link ILicense}
- * The body should contain either the full text of the license or an summary for a license
- * fully specified in the given location.
- *
- * @param location the location of a document containing the full license, or <code>null</code>
- * @param body the license body, cannot be <code>null</code>
- * @throws IllegalArgumentException when the <code>body</code> is <code>null</code>
- */
- public static ILicense createLicense(URI location, String body) {
- return new License(location, body, null);
- }
-
- /**
- * Returns an {@link IInstallableUnit} that represents the given
- * unit bound to the given fragments.
- *
- * @see IInstallableUnit#isResolved()
- * @param unit The unit to be bound
- * @param fragments The fragments to be bound
- * @return A resolved installable unit
- */
- public static IInstallableUnit createResolvedInstallableUnit(IInstallableUnit unit, IInstallableUnitFragment[] fragments) {
- if (unit.isResolved())
- return unit;
- Assert.isNotNull(unit);
- Assert.isNotNull(fragments);
- return new ResolvedInstallableUnit(unit, fragments);
-
- }
-
- /**
- * Returns an instance of {@link ITouchpointData} with the given instructions.
- *
- * @param instructions The instructions for the touchpoint data.
- * @return The created touchpoint data
- */
- public static ITouchpointData createTouchpointData(Map<String, ? extends Object> instructions) {
- Assert.isNotNull(instructions);
- //copy the map to protect against subsequent change by caller
- if (instructions.isEmpty())
- return EMPTY_TOUCHPOINT_DATA;
-
- Map<String, ITouchpointInstruction> result = new LinkedHashMap<String, ITouchpointInstruction>(instructions.size());
-
- for (Map.Entry<String, ? extends Object> entry : instructions.entrySet()) {
- Object value = entry.getValue();
- ITouchpointInstruction instruction;
- if (value == null || value instanceof String)
- instruction = createTouchpointInstruction((String) value, null);
- else
- instruction = (ITouchpointInstruction) value;
- result.put(entry.getKey(), instruction);
- }
- return new TouchpointData(result);
- }
-
- /**
- * Merge the given touchpoint instructions with a pre-existing touchpoint data
- * @param initial - the initial ITouchpointData
- * @param incomingInstructions - Map of ITouchpointInstructions to merge into the initial touchpoint data
- * @return the merged ITouchpointData
- */
- public static ITouchpointData mergeTouchpointData(ITouchpointData initial, Map<String, ITouchpointInstruction> incomingInstructions) {
- if (incomingInstructions == null || incomingInstructions.size() == 0)
- return initial;
-
- Map<String, ITouchpointInstruction> resultInstructions = new HashMap<String, ITouchpointInstruction>(initial.getInstructions());
- for (String key : incomingInstructions.keySet()) {
- ITouchpointInstruction instruction = incomingInstructions.get(key);
- ITouchpointInstruction existingInstruction = resultInstructions.get(key);
-
- if (existingInstruction != null) {
- String body = existingInstruction.getBody();
- if (body == null || body.length() == 0)
- body = instruction.getBody();
- else if (instruction.getBody() != null) {
- if (!body.endsWith(";")) //$NON-NLS-1$
- body += ';';
- body += instruction.getBody();
- }
-
- String importAttribute = existingInstruction.getImportAttribute();
- if (importAttribute == null || importAttribute.length() == 0)
- importAttribute = instruction.getImportAttribute();
- else if (instruction.getImportAttribute() != null) {
- if (!importAttribute.endsWith(",")) //$NON-NLS-1$
- importAttribute += ',';
- importAttribute += instruction.getBody();
- }
- instruction = createTouchpointInstruction(body, importAttribute);
- }
- resultInstructions.put(key, instruction);
- }
- return createTouchpointData(resultInstructions);
- }
-
- public static ITouchpointInstruction createTouchpointInstruction(String body, String importAttribute) {
- return new TouchpointInstruction(body, importAttribute);
- }
-
- /**
- * Returns a {@link TouchpointType} with the given id and version.
- *
- * @param id The touchpoint id
- * @param version The touchpoint version
- * @return A touchpoint type instance with the given id and version
- */
- public static ITouchpointType createTouchpointType(String id, Version version) {
- Assert.isNotNull(id);
- Assert.isNotNull(version);
-
- if (id.equals(ITouchpointType.NONE.getId()) && version.equals(ITouchpointType.NONE.getVersion()))
- return ITouchpointType.NONE;
-
- synchronized (typeCache) {
- ITouchpointType result = getCachedTouchpointType(id, version);
- if (result != null)
- return result;
- result = new TouchpointType(id, version);
- putCachedTouchpointType(result);
- return result;
- }
- }
-
- public static IUpdateDescriptor createUpdateDescriptor(Collection<IMatchExpression<IInstallableUnit>> descriptors, int severity, String description, URI location) {
- return new UpdateDescriptor(descriptors, severity, description, location);
- }
-
- public static IUpdateDescriptor createUpdateDescriptor(String id, VersionRange range, int severity, String description) {
- return createUpdateDescriptor(id, range, severity, description, null);
- }
-
- /**
- * Create and return a new update descriptor {@link IUpdateDescriptor} with the specified values.
- *
- * @param id the identifiter for the update. Must not be <code>null</code>.
- * @param range the version range. A <code>null</code> range is equivalent to {@link VersionRange#emptyRange} and matches all versions.
- * @param severity the severity
- * @param description a <code>String</code> description or <code>null</code>
- * @param location a {@link URI} specifying the location or <code>null</code>
- * @return the update descriptor
- */
- public static IUpdateDescriptor createUpdateDescriptor(String id, VersionRange range, int severity, String description, URI location) {
- Collection<IMatchExpression<IInstallableUnit>> descriptors = new ArrayList<IMatchExpression<IInstallableUnit>>(1);
- descriptors.add(createMatchExpressionFromRange(IInstallableUnit.NAMESPACE_IU_ID, id, range));
- return createUpdateDescriptor(descriptors, severity, description, location);
- }
-
- private static final IExpression allVersionsExpression;
- private static final IExpression range_II_Expression;
- private static final IExpression range_IN_Expression;
- private static final IExpression range_NI_Expression;
- private static final IExpression range_NN_Expression;
- private static final IExpression strictVersionExpression;
- private static final IExpression openEndedExpression;
- private static final IExpression openEndedNonInclusiveExpression;
-
- static {
- IExpressionFactory factory = ExpressionUtil.getFactory();
- IExpression xVar = factory.variable("x"); //$NON-NLS-1$
- IExpression nameEqual = factory.equals(factory.member(xVar, ProvidedCapability.MEMBER_NAME), factory.indexedParameter(0));
- IExpression namespaceEqual = factory.equals(factory.member(xVar, ProvidedCapability.MEMBER_NAMESPACE), factory.indexedParameter(1));
-
- IExpression versionMember = factory.member(xVar, ProvidedCapability.MEMBER_VERSION);
-
- IExpression versionCmpLow = factory.indexedParameter(2);
- IExpression versionEqual = factory.equals(versionMember, versionCmpLow);
- IExpression versionGt = factory.greater(versionMember, versionCmpLow);
- IExpression versionGtEqual = factory.greaterEqual(versionMember, versionCmpLow);
-
- IExpression versionCmpHigh = factory.indexedParameter(3);
- IExpression versionLt = factory.less(versionMember, versionCmpHigh);
- IExpression versionLtEqual = factory.lessEqual(versionMember, versionCmpHigh);
-
- IExpression pvMember = factory.member(factory.thisVariable(), InstallableUnit.MEMBER_PROVIDED_CAPABILITIES);
- allVersionsExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual)));
- strictVersionExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionEqual)));
- openEndedExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGtEqual)));
- openEndedNonInclusiveExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGt)));
- range_II_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGtEqual, versionLtEqual)));
- range_IN_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGtEqual, versionLt)));
- range_NI_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGt, versionLtEqual)));
- range_NN_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGt, versionLt)));
- }
-
- private static IMatchExpression<IInstallableUnit> createMatchExpressionFromRange(String namespace, String name, VersionRange range) {
- IMatchExpression<IInstallableUnit> resultExpression = null;
- IExpressionFactory factory = ExpressionUtil.getFactory();
- if (range == null || range.equals(VersionRange.emptyRange)) {
- resultExpression = factory.matchExpression(allVersionsExpression, name, namespace);
- } else {
- if (range.getMinimum().equals(range.getMaximum())) {
- // Explicit version appointed
- resultExpression = factory.matchExpression(strictVersionExpression, name, namespace, range.getMinimum());
- } else {
- if (range.getMaximum().equals(Version.MAX_VERSION)) {
- // Open ended
- resultExpression = factory.matchExpression(range.getIncludeMinimum() ? openEndedExpression : openEndedNonInclusiveExpression, name, namespace, range.getMinimum());
- } else {
- resultExpression = factory.matchExpression(//
- range.getIncludeMinimum() ? (range.getIncludeMaximum() ? range_II_Expression : range_IN_Expression) //
- : (range.getIncludeMaximum() ? range_NI_Expression : range_NN_Expression), //
- name, namespace, range.getMinimum(), range.getMaximum());
- }
- }
- }
- return resultExpression;
- }
-
- private static ITouchpointType getCachedTouchpointType(String id, Version version) {
- for (int i = 0; i < typeCache.length; i++) {
- if (typeCache[i] != null && typeCache[i].getId().equals(id) && typeCache[i].getVersion().equals(version))
- return typeCache[i];
- }
- return null;
- }
-
- private static void putCachedTouchpointType(ITouchpointType result) {
- //simple rotating buffer
- typeCache[typeCacheOffset] = result;
- typeCacheOffset = (typeCacheOffset + 1) % typeCache.length;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/Version.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/Version.java
deleted file mode 100644
index 3b3d1b3de..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/Version.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc - initial API and implementation.
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.metadata;
-
-import java.io.Serializable;
-import org.eclipse.equinox.internal.p2.metadata.*;
-
-/**
- * A class that represents a Version in the Omni Version format. A Version can be though of as an
- * array of comparable elements and an optional pad value. The pad value is used when comparing
- * two versions with a different number of segments.
- *
- * The Omni Version can convert almost any version into a raw format that it uses for comparisons.
- * This enables a unified order of all such versions and solves problems that arise when the
- * version semantics are different. A good example is the OSGi version versus the version used in Maven.
- * The lack of qualifier in the OSGi version implies that the qualifier is an empty string. So a version
- * without a qualifier is the smallest of all other versions with the same major,minor,micro number.
- * With Maven semantics, it's the opposite. If the qualifier is removed, the resulting version is
- * considered higher then all other versions with the same major, minor, and micro number. The
- * Omni version solves this by using different raw representations of the OSGi and Maven versions.
- *
- * The Omni version addresses a lot of other issues as well, such as reordering of the elements
- * or treating some parts of a version as irrelevant when comparing.
- *
- * The class is signature compatible with {@link org.osgi.framework.Version} but attempts
- * to use it as such might render a {@link UnsupportedOperationException} in case the
- * raw vector holds incompatible values. The method {@link #isOSGiCompatible()} can be used
- * to test.
- * @noextend This class is not intended to be subclassed by clients.
- * @since 2.0
- */
-public abstract class Version implements Comparable<Version>, Serializable {
- public static final String RAW_PREFIX = "raw:"; //$NON-NLS-1$
-
- /**
- * The version that is semantically greater then all other versions.
- */
- public static final Version MAX_VERSION = OmniVersion.createMaxVersion();
-
- /**
- * The version that is semantically less then all other versions.
- */
- public static final Version emptyVersion = OmniVersion.createMinVersion();
-
- private static final long serialVersionUID = 6218979149720923857L;
-
- /**
- * Compile a version format string into a compiled format..
- *
- * @param format The format to compile.
- * @return The compiled format
- * @throws VersionFormatException If the format could not be compiled
- */
- public static IVersionFormat compile(String format) throws VersionFormatException {
- return VersionFormat.compile(format, 0, format.length());
- }
-
- /**
- * Parses a version identifier from the specified string.
- *
- * @param version String representation of the version identifier. Leading
- * and trailing whitespace will be ignored.
- * @return A <code>Version</code> object representing the version identifier
- * or <code>null</code> if <code>version</code> is <code>null</code> or
- * an empty string.
- * @throws IllegalArgumentException If <code>version</code> is improperly
- * formatted.
- */
- public static Version create(String version) {
- return version == null ? null : VersionParser.parse(version, 0, version.length());
- }
-
- /**
- * Creates an OSGi version identifier from the specified numerical components.
- *
- * <p>
- * The qualifier is set to the empty string.
- *
- * @param major Major component of the version identifier.
- * @param minor Minor component of the version identifier.
- * @param micro Micro component of the version identifier.
- * @throws IllegalArgumentException If the numerical components are
- * negative.
- */
- public static Version createOSGi(int major, int minor, int micro) {
- return createOSGi(major, minor, micro, null);
- }
-
- /**
- * Creates an OSGi version identifier from the specified components.
- *
- * @param major Major component of the version identifier.
- * @param minor Minor component of the version identifier.
- * @param micro Micro component of the version identifier.
- * @param qualifier Qualifier component of the version identifier. If
- * <code>null</code> is specified, then the qualifier will be set to
- * the empty string.
- * @throws IllegalArgumentException If the numerical components are negative
- * or the qualifier string is invalid.
- */
- public static Version createOSGi(int major, int minor, int micro, String qualifier) {
- Comparable<?> logicQualifier;
- if (qualifier == null || qualifier.length() == 0) {
- if (major == 0 && minor == 0 && micro == 0)
- return emptyVersion;
- logicQualifier = VersionVector.MINS_VALUE; // So that we can do identity compare
- } else if (qualifier.equals(IVersionFormat.DEFAULT_MAX_STRING_TRANSLATION))
- logicQualifier = VersionVector.MAXS_VALUE;
- else
- logicQualifier = qualifier;
- return new OSGiVersion(major, minor, micro, logicQualifier);
- }
-
- /**
- * Parses a version identifier from the specified string. This method is for backward
- * compatibility with OSGi and will return the OSGi &quot;0.0.0&quot; version when
- * the provided string is empty or <code>null</code>.
- *
- * @param version String representation of the version identifier. Leading
- * and trailing whitespace will be ignored.
- * @return A <code>Version</code> object representing the version
- * identifier. If <code>version</code> is <code>null</code> or
- * the empty string then the OSGi <code>emptyVersion</code> will be
- * returned.
- * @throws IllegalArgumentException If <code>version</code> is improperly
- * formatted.
- * @see #create(String)
- */
- public static Version parseVersion(String version) {
- if (version == null || version.length() == 0)
- return Version.emptyVersion;
- Version v = create(version);
- return v == null ? Version.emptyVersion : v;
- }
-
- /**
- * Returns the optional format.
- */
- public abstract IVersionFormat getFormat();
-
- /**
- * Returns the <code>original</code> part of the string for this version
- * or <code>null</code> if no such part was provided when the version was
- * created. An OSGi type version will always return the OSGi string representation.
- *
- * @return The <code>original</code> part of the version string or
- * <code>null</code> if that part was missing.
- */
- public abstract String getOriginal();
-
- /**
- * Returns the pad value used when comparing this versions to
- * versions that has a larger number of segments
- * @return The pad value or <code>null</code> if not set.
- */
- public abstract Comparable<?> getPad();
-
- /**
- * An element from the raw vector representation of this version.
- * @param index The zero based index of the desired element
- * @return An element from the raw vector
- */
- public abstract Comparable<?> getSegment(int index);
-
- /**
- * Returns the number of elements in the raw vector representation of this version.
- * @return The number of elements in the raw vector.
- */
- public abstract int getSegmentCount();
-
- /**
- * Checks if this version is in compliance with the OSGi version spec.
- * @return A flag indicating whether the version is OSGi compatible or not.
- */
- public abstract boolean isOSGiCompatible();
-
- public String toString() {
- StringBuffer buf = new StringBuffer(20);
- toString(buf);
- return buf.toString();
- }
-
- /**
- * Appends the string representation of this version onto the
- * <code>sb</code> StringBuffer.
- * @param sb The buffer that will receive the version string
- */
- public abstract void toString(StringBuffer sb);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionFormatException.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionFormatException.java
deleted file mode 100644
index 4585b5c72..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionFormatException.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-/**
- * Exception thrown when parsing Omni Version formats.
- * @noextend This class is not intended to be subclassed by clients.
- * @since 2.0
- */
-public class VersionFormatException extends Exception {
-
- private static final long serialVersionUID = -867104101610941043L;
-
- public VersionFormatException(String message) {
- super(message);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionRange.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionRange.java
deleted file mode 100644
index 5fde149f0..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionRange.java
+++ /dev/null
@@ -1,470 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Cloudsmith Inc - rewrite to handle non-OSGi versions.
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import java.io.Serializable;
-import org.eclipse.equinox.internal.p2.metadata.*;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * This class represents a version range with Omni Version bounds. It is signature
- * equivalent with the OSGi org.eclipse.osgi.service.resolver.VersionRange
- *
- * @Immutable
- * @noextend This class is not intended to be subclassed by clients.
- * @since 2.0
- */
-public class VersionRange implements Serializable {
- private static final long serialVersionUID = 4988030307298088028L;
-
- /**
- * TODO: This should not be OSGi but it has to be that for now since the resolver creates
- * a filter where the min and max are converted into strings. When the filter is evaluated an
- * attempt is made to recreate them as OSGi versions.
- *
- * An empty OSGi Version range.
- */
- public static final VersionRange emptyRange = new VersionRange(Version.emptyVersion, true, Version.MAX_VERSION, true);
-
- private final Version minVersion;
- private final boolean includeMin;
- private final Version maxVersion;
- private final boolean includeMax;
-
- private static int copyEscaped(String vr, int pos, String breakChars, StringBuffer sb) {
- int top = vr.length();
- pos = VersionParser.skipWhite(vr, pos);
- if (pos >= top)
- throw new IllegalArgumentException();
-
- char c = vr.charAt(pos);
- for (;;) {
- if (c == '\\' && ++pos < top)
- c = vr.charAt(pos);
- else {
- if (c <= ' ')
- return VersionParser.skipWhite(vr, pos);
- if (breakChars != null && breakChars.indexOf(c) >= 0)
- break;
- }
- sb.append(c);
- if (++pos >= top)
- break;
- c = vr.charAt(pos);
- }
- return pos;
- }
-
- /**
- * Constructs a VersionRange with the specified minVersion and maxVersion.
- * @param minVersion the minimum version of the range
- * @param maxVersion the maximum version of the range
- */
- public VersionRange(Version minVersion, boolean includeMin, Version maxVersion, boolean includeMax) {
- if (minVersion == null) {
- if (maxVersion == null) {
- minVersion = Version.emptyVersion;
- maxVersion = Version.MAX_VERSION;
- } else
- minVersion = Version.emptyVersion;
- } else {
- if (maxVersion == null)
- maxVersion = Version.MAX_VERSION;
- else {
- if (minVersion != maxVersion && minVersion.equals(maxVersion))
- maxVersion = minVersion;
- else if (!(minVersion.getFormat() == null ? maxVersion.getFormat() == null : minVersion.getFormat().equals(maxVersion.getFormat()))) {
- // We always allow the MIN and MAX boundaries
- if (!(minVersion.equals(Version.emptyVersion) || maxVersion.equals(Version.MAX_VERSION)))
- throw new IllegalArgumentException(NLS.bind(Messages.range_boundaries_0_and_1_cannot_have_different_formats, minVersion, maxVersion));
- }
- }
- }
- this.minVersion = minVersion;
- this.includeMin = includeMin;
- this.maxVersion = maxVersion;
- this.includeMax = includeMax;
- validateRange();
- }
-
- /**
- * Constructs a VersionRange from the given versionRange String.
- * @param versionRange a version range String that specifies a range of
- * versions.
- */
- public VersionRange(String versionRange) {
- int top = 0;
- int pos = 0;
- if (versionRange != null) {
- top = versionRange.length();
- pos = VersionParser.skipWhite(versionRange, 0);
- top = VersionParser.skipTrailingWhite(versionRange, pos, top);
- }
-
- if (pos >= top) {
- minVersion = Version.emptyVersion;
- includeMin = true;
- maxVersion = Version.MAX_VERSION;
- includeMax = true;
- return;
- }
-
- char c = versionRange.charAt(pos);
- int[] position = new int[1];
- boolean rawPrefix = false;
- IVersionFormat fmt = null;
- if (VersionParser.isLetter(c)) {
- if (versionRange.startsWith("raw:", pos)) { //$NON-NLS-1$
- rawPrefix = true;
- pos += 4;
- } else {
- position[0] = pos;
- fmt = parseFormat(versionRange, position);
- pos = position[0];
- if (pos >= versionRange.length())
- throw new IllegalArgumentException(NLS.bind(Messages.format_must_be_delimited_by_colon_0, versionRange));
-
- c = versionRange.charAt(pos);
- if (c != ':')
- throw new IllegalArgumentException(NLS.bind(Messages.format_must_be_delimited_by_colon_0, versionRange));
- ++pos;
- }
- pos = VersionParser.skipWhite(versionRange, pos);
- if (pos >= top)
- throw new IllegalArgumentException(NLS.bind(Messages.premature_EOS_0, versionRange));
- c = versionRange.charAt(pos);
- } else
- fmt = VersionFormat.OSGI_FORMAT;
-
- String minStr;
- String maxStr;
- StringBuffer sb = new StringBuffer();
- if (c == '[' || c == '(') {
- includeMin = (c == '[');
- pos = copyEscaped(versionRange, ++pos, ",)]", sb); //$NON-NLS-1$
- if (pos >= top)
- throw new IllegalArgumentException(NLS.bind(Messages.premature_EOS_0, versionRange));
- c = versionRange.charAt(pos++);
- if (c != ',')
- throw new IllegalArgumentException(NLS.bind(Messages.missing_comma_in_range_0, versionRange));
-
- minStr = sb.toString();
- sb.setLength(0);
- pos = copyEscaped(versionRange, pos, ")]", sb); //$NON-NLS-1$
- if (pos >= top)
- throw new IllegalArgumentException();
- maxStr = sb.toString();
-
- c = versionRange.charAt(pos++);
- includeMax = (c == ']');
- } else {
- StringBuffer sbMin = new StringBuffer();
- pos = copyEscaped(versionRange, pos, rawPrefix ? "/" : null, sbMin); //$NON-NLS-1$
- includeMin = includeMax = true;
- minStr = sbMin.toString();
- maxStr = null;
- }
-
- if (rawPrefix) {
- String origMin = null;
- String origMax = null;
- pos = VersionParser.skipWhite(versionRange, pos);
- if (pos < top && versionRange.charAt(pos) == '/') {
- if (++pos == top)
- throw new IllegalArgumentException(NLS.bind(Messages.original_stated_but_missing_0, versionRange));
- position[0] = pos;
- fmt = parseFormat(versionRange, position);
- pos = VersionParser.skipWhite(versionRange, position[0]);
- if (pos < top) {
- boolean origUseIncDelims = false;
- c = versionRange.charAt(pos);
- if (c != ':')
- throw new IllegalArgumentException(NLS.bind(Messages.original_must_start_with_colon_0, versionRange));
-
- pos = VersionParser.skipWhite(versionRange, ++pos);
- if (pos == top)
- throw new IllegalArgumentException(NLS.bind(Messages.original_stated_but_missing_0, versionRange));
-
- c = versionRange.charAt(pos);
- if (c == '[' || c == '(') {
- if (includeMin != (c == '[') || maxStr == null)
- throw new IllegalArgumentException(NLS.bind(Messages.raw_and_original_must_use_same_range_inclusion_0, versionRange));
- pos = VersionParser.skipWhite(versionRange, ++pos);
- origUseIncDelims = true;
- }
-
- sb.setLength(0);
- if (maxStr == null) {
- copyEscaped(versionRange, pos, ",])", sb); //$NON-NLS-1$
- origMin = sb.toString();
- } else {
- pos = copyEscaped(versionRange, pos, ",])", sb); //$NON-NLS-1$
- if (pos >= top)
- throw new IllegalArgumentException(NLS.bind(Messages.premature_EOS_0, versionRange));
- c = versionRange.charAt(pos++);
- if (c != ',')
- throw new IllegalArgumentException(NLS.bind(Messages.missing_comma_in_range_0, versionRange));
- origMin = sb.toString();
-
- sb.setLength(0);
- pos = copyEscaped(versionRange, pos, "])", sb); //$NON-NLS-1$
- if (origUseIncDelims) {
- if (pos >= top)
- throw new IllegalArgumentException(NLS.bind(Messages.premature_EOS_0, versionRange));
- c = versionRange.charAt(pos++);
- if (includeMax != (c == ']'))
- throw new IllegalArgumentException(NLS.bind(Messages.raw_and_original_must_use_same_range_inclusion_0, versionRange));
- }
- origMax = sb.toString();
- }
- }
- }
- minVersion = VersionFormat.parseRaw(minStr, fmt, origMin);
- if (maxStr != null) {
- if (maxStr.equals(minStr))
- maxVersion = minVersion;
- else
- maxVersion = VersionFormat.parseRaw(maxStr, fmt, origMax);
- } else
- maxVersion = Version.MAX_VERSION;
- } else {
- if (fmt == null)
- fmt = VersionFormat.OSGI_FORMAT;
- minVersion = fmt.parse(minStr);
- if (maxStr != null) {
- if (maxStr.equals(minStr))
- maxVersion = minVersion;
- else
- maxVersion = fmt.parse(maxStr);
- } else {
- maxVersion = Version.MAX_VERSION;
- }
- }
- validateRange();
- }
-
- private static IVersionFormat parseFormat(String versionRange, int[] position) {
- int pos = VersionParser.skipWhite(versionRange, position[0]);
- if (!versionRange.startsWith("format(", pos)) //$NON-NLS-1$
- return null;
-
- pos += 7;
- int end = VersionParser.findEndOfFormat(versionRange, pos, versionRange.length());
- try {
- position[0] = end + 1;
- return VersionFormat.compile(versionRange, pos, end);
- } catch (VersionFormatException e) {
- throw new IllegalArgumentException(e.getMessage());
- }
- }
-
- /**
- * Returns the version format.
- */
- public IVersionFormat getFormat() {
- return minVersion.equals(Version.emptyVersion) ? maxVersion.getFormat() : minVersion.getFormat();
- }
-
- /**
- * Returns the minimum Version of this VersionRange
- * @return the minimum Version of this VersionRange
- */
- public Version getMinimum() {
- return minVersion;
- }
-
- /**
- * Indicates if the minimum version is included in the version range.
- * @return true if the minimum version is included in the version range;
- * otherwise false is returned
- */
- public boolean getIncludeMinimum() {
- return includeMin;
- }
-
- /**
- * Returns the maximum Version of this VersionRange
- * @return the maximum Version of this VersionRange
- */
- public Version getMaximum() {
- return maxVersion;
- }
-
- /**
- * Indicates if the maximum version is included in the version range.
- * @return true if the maximum version is included in the version range;
- * otherwise false is returned
- */
- public boolean getIncludeMaximum() {
- return includeMax;
- }
-
- public VersionRange intersect(VersionRange r2) {
- int minCompare = minVersion.compareTo(r2.getMinimum());
- int maxCompare = maxVersion.compareTo(r2.getMaximum());
-
- boolean resultMinIncluded;
- Version resultMin;
- if (minCompare == 0) {
- if (maxCompare == 0 && includeMin == r2.getIncludeMinimum() && includeMax == r2.getIncludeMaximum())
- return this;
- resultMin = minVersion;
- resultMinIncluded = includeMin && r2.getIncludeMinimum();
- } else if (minCompare < 0) {
- resultMin = r2.getMinimum();
- resultMinIncluded = r2.getIncludeMinimum();
- } else { // minCompare > 0)
- resultMin = minVersion;
- resultMinIncluded = includeMin;
- }
-
- boolean resultMaxIncluded;
- Version resultMax;
- if (maxCompare > 0) {
- resultMax = r2.getMaximum();
- resultMaxIncluded = r2.getIncludeMaximum();
- } else if (maxCompare < 0) {
- resultMax = maxVersion;
- resultMaxIncluded = includeMax;
- } else {//maxCompare == 0
- resultMax = maxVersion;
- resultMaxIncluded = includeMax && r2.getIncludeMaximum();
- }
-
- int minMaxCmp = resultMin.compareTo(resultMax);
- if (minMaxCmp < 0 || (minMaxCmp == 0 && resultMinIncluded && resultMaxIncluded))
- return new VersionRange(resultMin, resultMinIncluded, resultMax, resultMaxIncluded);
-
- return null;
- }
-
- /**
- * Returns whether the given version is included in this VersionRange.
- * This will depend on the minimum and maximum versions of this VersionRange
- * and the given version.
- *
- * @param version a version to be tested for inclusion in this VersionRange.
- * (may be <code>null</code>)
- * @return <code>true</code> if the version is include,
- * <code>false</code> otherwise
- */
- public boolean isIncluded(Version version) {
- if (version == null)
- return false;
-
- if (minVersion == maxVersion)
- // Can only happen when both includeMin and includeMax are true
- return minVersion.equals(version);
-
- int minCheck = includeMin ? 0 : -1;
- int maxCheck = includeMax ? 0 : 1;
- return minVersion.compareTo(version) <= minCheck && maxVersion.compareTo(version) >= maxCheck;
- }
-
- /**
- * Checks if the versions of this range is in compliance with the OSGi version spec.
- * @return A flag indicating whether the range is OSGi compatible or not.
- */
- public boolean isOSGiCompatible() {
- return minVersion.isOSGiCompatible() && maxVersion.isOSGiCompatible();
- }
-
- public boolean equals(Object object) {
- if (!(object instanceof VersionRange))
- return false;
- VersionRange vr = (VersionRange) object;
- return includeMin == vr.includeMin && includeMax == vr.includeMax && minVersion.equals(vr.getMinimum()) && maxVersion.equals(vr.getMaximum());
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + maxVersion.hashCode();
- result = prime * result + minVersion.hashCode();
- result = prime * result + (includeMax ? 1231 : 1237);
- result = prime * result + (includeMin ? 1231 : 1237);
- return result;
- }
-
- public String toString() {
- StringBuffer result = new StringBuffer();
- toString(result);
- return result.toString();
- }
-
- public void toString(StringBuffer result) {
- boolean gtEqual = includeMin && includeMax && Version.MAX_VERSION.equals(maxVersion);
- if (gtEqual && Version.emptyVersion.equals(minVersion)) {
- minVersion.toString(result);
- return;
- }
-
- IVersionFormat fmt = getFormat();
- if (fmt == VersionFormat.OSGI_FORMAT) {
- if (gtEqual) {
- minVersion.toString(result);
- } else {
- result.append(includeMin ? '[' : '(');
- minVersion.toString(result);
- result.append(',');
- maxVersion.toString(result);
- result.append(includeMax ? ']' : ')');
- }
- return;
- }
-
- result.append("raw:"); //$NON-NLS-1$
- if (gtEqual) {
- ((BasicVersion) minVersion).rawToString(result, true);
- } else {
- result.append(includeMin ? '[' : '(');
- ((BasicVersion) minVersion).rawToString(result, true);
- result.append(',');
- ((BasicVersion) maxVersion).rawToString(result, true);
- result.append(includeMax ? ']' : ')');
- }
- boolean hasOriginal = (minVersion.getOriginal() != null || maxVersion.getOriginal() != null);
- if (fmt != null || hasOriginal) {
- result.append('/');
- if (fmt != null)
- fmt.toString(result);
- if (hasOriginal) {
- result.append(':');
- if (gtEqual) {
- ((BasicVersion) minVersion).originalToString(result, true);
- } else {
- if (Version.emptyVersion.equals(minVersion))
- ((BasicVersion) minVersion).rawToString(result, true);
- else
- ((BasicVersion) minVersion).originalToString(result, true);
- result.append(',');
- ((BasicVersion) maxVersion).originalToString(result, true);
- }
- }
- }
- }
-
- // Preserve singletons during deserialization
- private Object readResolve() {
- VersionRange vr = this;
- if (equals(emptyRange))
- vr = emptyRange;
- return vr;
- }
-
- private void validateRange() {
- int cmp = minVersion.compareTo(maxVersion);
- if (!(cmp < 0 || (cmp == 0 && includeMin && includeMax)))
- throw new IllegalArgumentException(NLS.bind(Messages.range_min_0_is_not_less_then_range_max_1, minVersion, maxVersion));
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionedId.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionedId.java
deleted file mode 100644
index ebd1273dc..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionedId.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 Code 9 and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- * EclipseSource - ongoing development
- * Thomas Hallgren - Fix for bug 268659
- * IBM - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import org.eclipse.equinox.internal.p2.core.helpers.StringHelper;
-
-/**
- * An object representing a (id,version) pair. An instance of this class can be constructed
- * by invoking the constructor or calling {@link VersionedId#parse(String)} with a string
- * representation of this VersionedID.
- *
- * @noextend This class is not intended to be subclassed by clients.
- *
- * @since 2.0
- */
-public class VersionedId implements IVersionedId {
- private final String id;
- private final Version version;
-
- /**
- * Creates and returns a new {@link VersionedId} from the given string specification.
- * The specification must be of the form "id/version", or just "id" if the version is absent
- * <p>
- * This factory method can be used to reconstruct a {@link VersionedId}
- * instance from the string representation produced by a previous invocation of
- * {@link #toString()}.
- *
- * @param spec the specification for the versioned id to create
- * @return the parsed versioned id
- * @throws IllegalArgumentException If <code>spec</code> is improperly
- * formatted.
- */
- public static IVersionedId parse(String spec) {
- String[] segments = StringHelper.getArrayFromString(spec, '/');
- return new VersionedId(segments[0], segments.length == 1 ? null : segments[1]);
- }
-
- /**
- * Creates a new versioned id with the given id and version.
- *
- * @param id The identifier
- * @param version The version
- * @throws IllegalArgumentException If <code>version</code> is improperly
- * formatted.
- */
- public VersionedId(String id, String version) {
- this.id = id;
- this.version = Version.parseVersion(version);
- }
-
- /**
- * Creates a new versioned id with the given id and version.
- *
- * @param id The identifier
- * @param version The version
- */
- public VersionedId(String id, Version version) {
- this.id = id;
- this.version = (version == null) ? Version.emptyVersion : version;
- }
-
- /**
- * @return the ID of this VersionedID
- */
- public String getId() {
- return id;
- }
-
- /**
- * @return the Version of this VersionedID
- */
- public Version getVersion() {
- return version;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
-
- if (!(obj instanceof VersionedId))
- return false;
-
- VersionedId vname = (VersionedId) obj;
- return id.equals(vname.id) && version.equals(vname.version);
- }
-
- public int hashCode() {
- return id.hashCode() * 31 + version.hashCode();
- }
-
- /**
- * Returns a string representation of this versioned id.
- * The result can be used to later construct an equal {@link VersionedId}
- * instance using {{@link #parse(String)}.
- * @return A string representation of this versioned id
- */
- public String toString() {
- return Version.emptyVersion.equals(version) ? id : id + '/' + version.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionParseException.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionParseException.java
deleted file mode 100644
index 1d0832405..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionParseException.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-/**
- * An exception used by an expression parser that indicates that something went wrong when
- * parsing.
- * @noextend This class is not intended to be subclassed by clients.
- * @since 2.0
- */
-public class ExpressionParseException extends RuntimeException {
- private static final long serialVersionUID = 8432875384760577764L;
-
- public ExpressionParseException(String message) {
- super(message);
- }
-
- public ExpressionParseException(String expression, String message, int position) {
- super("Parse error in string \"" + expression + "\": " + message + " at position " + position); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionUtil.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionUtil.java
deleted file mode 100644
index 28864fe0d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionUtil.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-import org.eclipse.equinox.internal.p2.metadata.expression.*;
-import org.eclipse.equinox.internal.p2.metadata.expression.parser.LDAPFilterParser;
-import org.eclipse.equinox.internal.p2.metadata.expression.parser.QLParser;
-
-/**
- * Global access to factory, parser, and methods for introspection
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- * @since 2.0
- */
-public final class ExpressionUtil {
- private static final IExpressionParser expressionParser = new QLParser(ExpressionFactory.INSTANCE);
- private static final LDAPFilterParser ldapFilterParser = new LDAPFilterParser(ExpressionFactory.INSTANCE);
- public static final IExpression TRUE_EXPRESSION = ExpressionFactory.INSTANCE.constant(Boolean.TRUE);
- public static final IExpression FALSE_EXPRESSION = ExpressionFactory.INSTANCE.constant(Boolean.FALSE);
-
- private ExpressionUtil() {
- //We don't want to ppl to instantiate this class
- }
-
- /**
- * Returns the global expression factory
- * @return The global expression factory.
- */
- public static IExpressionFactory getFactory() {
- return ExpressionFactory.INSTANCE;
- }
-
- /**
- * Creates and returns a new expression parser
- * @return The new parser
- */
- public static IExpressionParser getParser() {
- return expressionParser;
- }
-
- /**
- * Parse an LDAP filter from the <code>filter</code> string. If <code>filter</code> is <code>null</code>
- * or a string that is empty or only consists of whitespace, then this method returns <code>null</code>.
- * @param filter The filter to parse. Can be <code>null</code> or empty.
- * @return An expression that corresponds to the LDAP filter or <code>null</code>.
- * @throws ExpressionParseException If the syntax was invalid
- */
- public static IFilterExpression parseLDAP(String filter) throws IllegalArgumentException {
- filter = trimmedOrNull(filter);
- return filter == null ? null : ldapFilterParser.parse(filter);
- }
-
- /**
- * Create a new expression. The expression will have access to the global
- * variable 'this' and to the context parameters.
- * @param expression The string representing the boolean expression.
- * @return The resulting expression tree.
- * @throws ExpressionParseException If the syntax was invalid
- */
- public static IExpression parse(String expression) {
- expression = trimmedOrNull(expression);
- return expression == null ? null : getParser().parse(expression);
- }
-
- /**
- * Create an arbitrary expression. The expression will have access to the global
- * variable 'everything' and to the context parameters.
- * @param expression The string representing the boolean expression.
- * @return The resulting expression tree.
- * @throws ExpressionParseException If the syntax was invalid
- */
- public static IExpression parseQuery(String expression) {
- expression = trimmedOrNull(expression);
- return expression == null ? null : getParser().parseQuery(expression);
- }
-
- /**
- * If <code>str</code> is <code>null</code>, then this method returns <code>null</code>.
- * Otherwise <code>str</code> is trimmed from whitespace at both ends. If the result
- * of the trim is an empty string, then <code>null</code> is returned, otherwise the
- * result of the trim is returned.
- * @param str The string to trim. Can be <code>null</code>.
- * @return The trimmed string or <code>null</code>.
- */
- public static String trimmedOrNull(String str) {
- if (str != null) {
- str = str.trim();
- if (str.length() == 0)
- str = null;
- }
- return str;
- }
-
- /**
- * Obtains the Left Hand Side (LHS) of a binary expression.
- * @param expression The expression to introspect
- * @return The left hand side operator
- * @throws IllegalArgumentException if the expression is not a binary expression
- * @see IExpression#TYPE_AT
- * @see IExpression#TYPE_EQUALS
- * @see IExpression#TYPE_GREATER
- * @see IExpression#TYPE_GREATER_EQUAL
- * @see IExpression#TYPE_LESS
- * @see IExpression#TYPE_LESS_EQUAL
- * @see IExpression#TYPE_MATCHES
- * @see IExpression#TYPE_NOT_EQUALS
- */
- public static IExpression getLHS(IExpression expression) {
- if (expression instanceof Binary)
- return ((Binary) expression).lhs;
- throw new IllegalArgumentException();
- }
-
- /**
- * Obtains the name of a variable or member expression.
- * @param expression The expression to introspect
- * @return The name of the expression
- * @throws IllegalArgumentException if the expression is not a variable or a member
- * @see IExpression#TYPE_MEMBER
- * @see IExpression#TYPE_VARIABLE
- */
- public static String getName(IExpression expression) {
- if (expression instanceof Member)
- return ((Member) expression).getName();
- if (expression instanceof Variable)
- return ((Variable) expression).getName();
- throw new IllegalArgumentException();
- }
-
- /**
- * Obtains the operand of an unary expression
- * @param expression The expression to introspect
- * @return The expression operand
- * @throws IllegalArgumentException if the expression is not an unary expression
- * @see IExpression#TYPE_ALL
- * @see IExpression#TYPE_EXISTS
- * @see IExpression#TYPE_LAMBDA
- * @see IExpression#TYPE_NOT
- */
- public static IExpression getOperand(IExpression expression) {
- if (expression instanceof Unary)
- return ((Unary) expression).operand;
- throw new IllegalArgumentException();
- }
-
- /**
- * Obtains the operands of an n-ary expression
- * @param expression The expression to introspect
- * @return The expression operand
- * @throws IllegalArgumentException if the expression is not a n-ary expression
- * @see IExpression#TYPE_AND
- * @see IExpression#TYPE_OR
- */
- public static IExpression[] getOperands(IExpression expression) {
- if (expression instanceof NAry)
- return ((NAry) expression).operands;
- throw new IllegalArgumentException();
- }
-
- /**
- * Obtains the Right Hand Side (RHS) of a binary expression.
- * @param expression The expression to introspect
- * @return The right hand side operator
- * @throws IllegalArgumentException if the expression is not a binary expression
- * @see IExpression#TYPE_AT
- * @see IExpression#TYPE_EQUALS
- * @see IExpression#TYPE_GREATER
- * @see IExpression#TYPE_GREATER_EQUAL
- * @see IExpression#TYPE_LESS
- * @see IExpression#TYPE_LESS_EQUAL
- * @see IExpression#TYPE_MATCHES
- * @see IExpression#TYPE_NOT_EQUALS
- */
- public static IExpression getRHS(IExpression expression) {
- if (expression instanceof Binary)
- return ((Binary) expression).rhs;
- throw new IllegalArgumentException();
- }
-
- /**
- * Obtains the value of a literal expression
- * @param expression The expression to introspect
- * @return The literal value
- * @throws IllegalArgumentException if the expression is not a literal
- * @see IExpression#TYPE_LITERAL
- */
- public static Object getValue(IExpression expression) {
- if (expression instanceof Literal)
- return ((Literal) expression).value;
- throw new IllegalArgumentException();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IContextExpression.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IContextExpression.java
deleted file mode 100644
index a89e54e2a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IContextExpression.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-
-/**
- * This is an expression that will need access to the global variable
- * <code>everything</code>.
- * @since 2.0
- */
-public interface IContextExpression<T> extends IExpression {
-
- /**
- * <p>Creates a new context to be passed to a subsequent evaluation. The context
- * will have the variable 'everything' set to an expression that represents
- * the <code>everything</code> iterator filtered for instances of <code>elementClass</code>.</p>
- * <p>The values of the iterator will be copied if necessary (when everything is referenced
- * more then once).</p>
- * @param elementClass the class of the iterator elements
- * @param indexProvider The index provider that represents all queried material.
- * @return A new evaluation context.
- */
- IEvaluationContext createContext(Class<? extends T> elementClass, IIndexProvider<T> indexProvider);
-
- /**
- * <p>Creates a new context to be passed to a subsequent evaluation. The context
- * will have the variable 'everything' set to an expression that represents
- * the <code>everything</code> iterator filtered for instances of <code>elementClass</code>.</p>
- * <p>The values of the iterator will be copied if necessary (when everything is referenced
- * more then once).</p>
- * @param elementClass the class of the iterator elements
- * @param everything The iterator that represents all queried material.
- * @return A new evaluation context.
- */
- IEvaluationContext createContext(Class<? extends T> elementClass, Iterator<T> everything);
-
- /**
- * Returns the parameters that this context expression was created with.
- * @return An array of parameters, possibly empty but never <code>null</code>.
- */
- Object[] getParameters();
-
- /**
- * Evaluate the expression and return the expected collection result as an iterator
- * @param context The evaluation context
- * @return The result of the evaluation.
- */
- Iterator<T> iterator(IEvaluationContext context);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IEvaluationContext.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IEvaluationContext.java
deleted file mode 100644
index ee3021442..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IEvaluationContext.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-
-/**
- * The evaluation context. Contexts can be nested and new contexts are pushed for each closure
- * during an evaluation of an expression.
- * @since 2.0
- */
-public interface IEvaluationContext {
- IIndexProvider<?> getIndexProvider();
-
- void setIndexProvider(IIndexProvider<?> indexProvider);
-
- /**
- * Retrieve the value of the given <code>variable</code> from this context
- * @param variable The variable who's value should be retrieved
- * @return The current value for the variable
- */
- Object getValue(IExpression variable);
-
- /**
- * Set the current value for the given <code>variable</code> to <code>value</code>
- * @param variable The variable who's value should be set
- * @param value The new value for the variable.
- */
- void setValue(IExpression variable, Object value);
-
- /**
- * Returns the value of the parameter at the given <code>position</code>
- * @param position The zero based position for the parameter
- * @return The parameter value
- */
- Object getParameter(int position);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpression.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpression.java
deleted file mode 100644
index 802c8ba85..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpression.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-/**
- * A node in the expression tree
- * @since 2.0
- * @noimplement This interface is not intended to be implemented directly by clients.
- * @noextend This interface is not intended to be extended directly by clients.
- */
-public interface IExpression {
- int TYPE_ALL = 1;
- int TYPE_AND = 2;
- int TYPE_AT = 3;
- int TYPE_EQUALS = 4;
- int TYPE_EXISTS = 5;
- int TYPE_GREATER = 6;
- int TYPE_GREATER_EQUAL = 7;
- int TYPE_LAMBDA = 8;
- int TYPE_LESS = 9;
- int TYPE_LESS_EQUAL = 10;
- int TYPE_LITERAL = 11;
- int TYPE_MATCHES = 12;
- int TYPE_MEMBER = 13;
- int TYPE_NOT = 14;
- int TYPE_NOT_EQUALS = 15;
- int TYPE_OR = 16;
- int TYPE_PARAMETER = 17;
- int TYPE_VARIABLE = 18;
- int TYPE_ARRAY = 20;
- int TYPE_ASSIGNMENT = 21;
- int TYPE_COLLECT = 22;
- int TYPE_CONDITION = 23;
- int TYPE_FIRST = 24;
- int TYPE_FLATTEN = 25;
- int TYPE_FUNCTION = 26;
- int TYPE_INTERSECT = 27;
- int TYPE_LATEST = 28;
- int TYPE_LIMIT = 29;
- int TYPE_PIPE = 30;
- int TYPE_SELECT = 31;
- int TYPE_TRAVERSE = 32;
- int TYPE_UNION = 33;
- int TYPE_UNIQUE = 34;
-
- /**
- * Let the visitor visit this instance and all expressions that this
- * instance contains.
- * @param visitor The visiting visitor.
- * @return <code>true</code> if the visitor should continue visiting, <code>false</code> otherwise.
- */
- boolean accept(IExpressionVisitor visitor);
-
- /**
- * Evaluate this expression with given context and variables.
- * @param context The evaluation context
- * @return The result of the evaluation.
- */
- Object evaluate(IEvaluationContext context);
-
- /**
- * Returns the expression type (see TYPE_xxx constants).
- */
- int getExpressionType();
-
- /**
- * Appends the string representation of this expression to the collector <code>collector</code>.
- */
- void toString(StringBuffer collector);
-
- /**
- * Appends the an LDAP filter representation of this expression to the <code>collector</code>.
- * @throws UnsupportedOperationException if the expression contains nodes
- * that cannot be represented in an LDAP filter
- */
- void toLDAPString(StringBuffer collector);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionFactory.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionFactory.java
deleted file mode 100644
index 7a6701c50..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionFactory.java
+++ /dev/null
@@ -1,400 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-import java.util.List;
-import java.util.Map;
-import org.eclipse.equinox.p2.metadata.IVersionedId;
-import org.eclipse.equinox.p2.query.IQuery;
-
-/**
- * This interface provides all the factory methods needed to create the
- * nodes of the expression tree.
- * @since 2.0
- * @noimplement This interface is not intended to be implemented directly by clients.
- * @noextend This interface is not intended to be extended directly by clients.
- */
-public interface IExpressionFactory {
- String FUNC_BOOLEAN = "boolean"; //$NON-NLS-1$
- String FUNC_VERSION = "version"; //$NON-NLS-1$
- String FUNC_CLASS = "class"; //$NON-NLS-1$
- String FUNC_RANGE = "range"; //$NON-NLS-1$
- String FUNC_FILTER = "filter"; //$NON-NLS-1$
-
- IExpression[] NO_ARGS = new IExpression[0];
-
- /**
- * Create a collection filter that yields true if the <code>lambda</code> yields true for
- * all of the elements of the <code>collection</code>
- * @param collection The collection providing the elements to test
- * @param lambda The lambda that performs the test
- * @return A boolean expression
- */
- IExpression all(IExpression collection, IExpression lambda);
-
- /**
- * Create a logical <i>and</i> of its <code>operands</code>.
- * @param operands The boolean operands
- * @return A boolean expression
- */
- IExpression and(IExpression... operands);
-
- /**
- * Creates an expression that represents a variable assignment
- * @param variable The variable
- * @param expression The expression that yields the value to assign to the variable
- * @return An assignment expression
- */
- IExpression assignment(IExpression variable, IExpression expression);
-
- /**
- * Create an expression that collects the result of evaluating each element in a new collection.
- * @param collection The collection providing the elements to evaluate
- * @param lambda The lambda that creates each new element
- * @return A collection expression
- */
- IExpression collect(IExpression collection, IExpression lambda);
-
- /**
- * Create an expression that first evaluates a <code>test</code> and then, depending on the outcome,
- * evaluates either <code>ifTrue</code> or <code>ifFalse</code>. The expression yields the result
- * of the <code>ifTrue</code> or <code>ifFalse</code> evaluation.
- * @param test The test
- * @param ifTrue The code to evaluate when the test evaluates to <code>true</code>
- * @param ifFalse The code to evaluate when the test evaluates to <code>false</code>
- * @return The conditional expression
- */
- IExpression condition(IExpression test, IExpression ifTrue, IExpression ifFalse);
-
- /**
- * Create an expression that yields the first element of the
- * <code>collection</code> for which the <code>lambda</code> yields <code>true</code>.
- * @param collection The collection providing the elements to test
- * @param lambda The lambda that performs the test
- * @return An element expression
- */
- IExpression first(IExpression collection, IExpression lambda);
-
- /**
- * Intended to be applied on collections of collections. Yields a single collection with
- * all elements from the source collections, in the order they are evaluated.
- * @param collection The collection providing the collections that provides all elements
- * @return A collection expression
- */
- IExpression flatten(IExpression collection);
-
- /**
- * Creates a lambda expression that takes more then one variable (currying). Suitable for use
- * in most collection expressions.
- * @param variable The element variable that the lambda uses
- * @param body The body of the lambda
- * @param initialAssignments Assignments to evaluate once before calling the body for each element.
- * @return A lambda expression with currying
- */
- IExpression lambda(IExpression variable, IExpression[] initialAssignments, IExpression body);
-
- /**
- * Creates a member call expression.
- * @param target The target for the member call
- * @param name The name of the member
- * @param args The arguments to use for the call
- * @return A member expression
- */
- IExpression memberCall(IExpression target, String name, IExpression... args);
-
- /**
- * <p>Recursively traverse and collect elements based on a condition</p>
- * <p>A common scenario in p2 is that you want to start with a set of roots and then find
- * all items that fulfill the root requirements. Those items in turn introduce new
- * requirements so you want to find them too. The process continues until no more
- * requirements can be satisfied. This type of query can be performed using the traverse
- * function.</p>
- * <p>The function will evaluate an expression, once for each element, collect
- * elements for which the evaluation returned true, then then re-evaluate using the
- * collected result as source of elements. No element is evaluated twice. This continues
- * until no more elements are found.</p>
- * @param collection The collection providing the elements to test
- * @param lambda The lambda that collects the children for the next iteration
- * @return A collection expression
- */
- IExpression traverse(IExpression collection, IExpression lambda);
-
- /**
- * Create an expression that yields a new collection where each element is unique. An
- * optional <code>cache</code> can be provided if the uniqueness should span a larger
- * scope then just the source collection.
- * @param collection The source collection
- * @param cache Optional cache to use when uniqueness should span over several invocations
- * @return A collection expression
- */
- IExpression unique(IExpression collection, IExpression cache);
-
- /**
- * Create an array of elements.
- * @param elements The elements of the array
- * @return An array expression
- */
- IExpression array(IExpression... elements);
-
- /**
- * Create an lookup of <code>key</code> in the <code>target</code>.
- * The key expression should evaluate to a string or an integer.
- * @param target The target for the lookup
- * @param key The key to use for the lookup
- * @return A lookup expression
- */
- IExpression at(IExpression target, IExpression key);
-
- /**
- * Create an evaluation context with one single variable
- * @param params Indexed parameters to use in the expression
- * @return the context
- */
- IEvaluationContext createContext(Object... params);
-
- /**
- * Create an evaluation context with one single variable
- * @param params Indexed parameters to use in the expression
- * @param variables The variables that will be maintained by the context
- * @return the context
- */
- IEvaluationContext createContext(IExpression[] variables, Object... params);
-
- /**
- * Creates an expression that evaluates to the constant <code>value</code>.
- * @param value The constant
- * @return A constant expression
- */
- IExpression constant(Object value);
-
- /**
- * Creates a top level expression that represents a full query.
- * @param expr The query
- * @param parameters The parameters of the query
- * @return A top level query expression
- */
- <T> IContextExpression<T> contextExpression(IExpression expr, Object... parameters);
-
- /**
- * Create an expression that tests if <code>lhs</code> is equal to <code>rhs</code>.
- * @param lhs The left hand side value.
- * @param rhs The right hand side value.
- * @return A boolean expression
- */
- IExpression equals(IExpression lhs, IExpression rhs);
-
- /**
- * Create a collection filter that yields true if the <code>lambda</code> yields true for
- * at least one of the elements of the <code>collection</code>
- * @param collection The collection providing the elements to test
- * @param lambda The lambda that performs the test
- * @return A boolean expression
- */
- IExpression exists(IExpression collection, IExpression lambda);
-
- /**
- * Creates a top level expression suitable for predicate matching
- * @param expression The boolean expression
- * @return A top level predicate expression
- */
- IFilterExpression filterExpression(IExpression expression);
-
- /**
- * Given one of the values in the map returned by {@link #getFunctionMap()}, this method
- * returns a function expression.
- * @param function The value obtained from the map.
- * @param args The arguments to evaluate and pass when evaluating the function.
- * @return A function expression
- */
- IExpression function(Object function, IExpression... args);
-
- /**
- * Returns a map of functions supported by this factory. The map is keyed by
- * function names and the value is an object suitable to pass to the {@link #function(Object, IExpression[])}
- * method.
- * @return A key/function map.
- */
- Map<String, ? extends Object> getFunctionMap();
-
- /**
- * Create an expression that tests if <code>lhs</code> is greater than <code>rhs</code>.
- * @param lhs The left hand side value.
- * @param rhs The right hand side value.
- * @return A boolean expression
- */
- IExpression greater(IExpression lhs, IExpression rhs);
-
- /**
- * Create an expression that tests if <code>lhs</code> is greater than or equal to <code>rhs</code>.
- * @param lhs The left hand side value.
- * @param rhs The right hand side value.
- * @return A boolean expression
- */
- IExpression greaterEqual(IExpression lhs, IExpression rhs);
-
- /**
- * Creates an indexed parameter expression
- * @param index The index to use
- * @return a parameter expression
- */
- IExpression indexedParameter(int index);
-
- /**
- * Create an <i>intersection</i> of <code>c1</code> and <code>c2</code>
- * @param c1 first collection
- * @param c2 second collection
- * @return An intersect expression
- */
- IExpression intersect(IExpression c1, IExpression c2);
-
- /**
- * Creates a lambda expression that takes exactly one variable. Suitable for use
- * in most collection expressions.
- * @param variable The element variable that the lambda uses
- * @param body The body of the lambda
- * @return A lambda expression
- */
- IExpression lambda(IExpression variable, IExpression body);
-
- /**
- * Create an expression that yields a new collection consisting of the latest version of
- * the elements of the <code>collection</code>. Each element in <code>collection</code>
- * must implement the {@link IVersionedId} interface.
- * @param collection The collection providing the versioned elements
- * @return A collection expression
- */
- IExpression latest(IExpression collection);
-
- /**
- * Create an expression that tests if <code>lhs</code> is less than <code>rhs</code>.
- * @param lhs The left hand side value.
- * @param rhs The right hand side value.
- * @return A boolean expression
- */
- IExpression less(IExpression lhs, IExpression rhs);
-
- /**
- * Create an expression that tests if <code>lhs</code> is less than or equal to <code>rhs</code>.
- * @param lhs The left hand side value.
- * @param rhs The right hand side value.
- * @return A boolean expression
- */
- IExpression lessEqual(IExpression lhs, IExpression rhs);
-
- /**
- * Create an expression that yields a new collection consisting of the <i>count</i>
- * first elements of the source collection.
- * @param collection The source collection
- * @param count The element count limit
- * @return A collection expression
- */
- IExpression limit(IExpression collection, int count);
-
- /**
- * Create an expression that yields a new collection consisting of the <i>n</i> first
- * elements of the source collection where <i>n</i> is determined by <code>limit</code>.
- * @param collection The source collection
- * @param limit The expression that evaluates to the element count limit
- * @return A collection expression
- */
- IExpression limit(IExpression collection, IExpression limit);
-
- /**
- * Performs boolean normalization on the expression to create a canonical form.
- * @param operands The operands to normalize
- * @param expressionType The type (must be either {@link IExpression#TYPE_AND}
- * or {@link IExpression#TYPE_OR}.
- * @return The normalized expression
- */
- IExpression normalize(List<? extends IExpression> operands, int expressionType);
-
- /**
- * Create an expression that tests if <code>lhs</code> matches <code>rhs</code>.
- * @param lhs The left hand side value.
- * @param rhs The right hand side value.
- * @return A boolean expression
- */
- IExpression matches(IExpression lhs, IExpression rhs);
-
- /**
- * Creates a parameterized top level expression suitable for predicate matching
- * @param expression The boolean expression
- * @param parameters The parameters to use in the call
- * @return A top level predicate expression
- */
- <T> IMatchExpression<T> matchExpression(IExpression expression, Object... parameters);
-
- /**
- * Creates a member accessor expression.
- * @param target The target for the member access
- * @param name The name of the member
- * @return A member expression
- */
- IExpression member(IExpression target, String name);
-
- /**
- * Creates an expression that negates the result of evaluating its <code>operand</code>.
- * @param operand The boolean expression to negate
- * @return A boolean expression
- */
- IExpression not(IExpression operand);
-
- /**
- * Create a logical <i>or</i> of its <code>operands</code>.
- * @param operands The boolean operands
- * @return A boolean expression
- */
- IExpression or(IExpression... operands);
-
- /**
- * Create a pipe of expressions.
- * @param expressions The expressions that make out the pipe
- * @return A pipe expression
- */
- IExpression pipe(IExpression... expressions);
-
- /**
- * Create an expression that yields a new collection consisting of all elements of the
- * <code>collection</code> for which the <code>lambda</code> yields <code>true</code>.
- * @param collection The collection providing the elements to test
- * @param lambda The lambda that performs the test
- * @return A collection expression
- */
- IExpression select(IExpression collection, IExpression lambda);
-
- /**
- * Returns the variable that represents <code>this</this> in an expression
- * @return The <code>this</this> variable.
- */
- IExpression thisVariable();
-
- /**
- * Wrap an {@link IQuery} as an expression.
- * @param query
- * @return An expression that wraps the query
- */
- IExpression toExpression(IQuery<?> query);
-
- /**
- * Create a <i>union</i> of <code>c1</code> and <code>c2</code>
- * @param c1 first collection
- * @param c2 second collection
- * @return A union expression
- */
- IExpression union(IExpression c1, IExpression c2);
-
- /**
- * Creates an expression that represents a variable
- * @param name The name of the variable
- * @return A variable expression
- */
- IExpression variable(String name);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionParser.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionParser.java
deleted file mode 100644
index c9f43b33c..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionParser.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-
-/**
- * A parser that produces an expression tree based on a string representation. An
- * implementation will use the {@link IExpressionFactory} to create the actual expressions
- * @since 2.0
- */
-public interface IExpressionParser {
- /**
- * Create a new expression. The expression will have access to the global
- * variable 'this' and to the context parameters.
- * @param exprString The string representing the boolean expression.
- * @return The resulting expression tree.
- * @throws ExpressionParseException
- */
- IExpression parse(String exprString);
-
- /**
- * Create an arbitrary expression. The expression will have access to the global
- * variable 'everything' and to the context parameters.
- * @param exprString The string representing the boolean expression.
- * @return The resulting expression tree.
- * @throws ExpressionParseException
- */
- IExpression parseQuery(String exprString);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionVisitor.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionVisitor.java
deleted file mode 100644
index 1c314d804..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionVisitor.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-/**
- * A general purpose visitor that will visit each node in an expression tree.
- * @since 2.0
- */
-public interface IExpressionVisitor {
- /**
- * The method that will be called for each expression that is
- * visited.
- * @param expression The expression that the visitor visits.
- * @return <code>true</code> to continue visiting other expressions or
- * <code>false</code> to break out.
- */
- boolean visit(IExpression expression);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IFilterExpression.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IFilterExpression.java
deleted file mode 100644
index 8e5bcba92..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IFilterExpression.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-import java.util.Map;
-import org.osgi.framework.Filter;
-
-/**
- * An interface that combines the IExpression with the LDAP filter. The
- * string representation is the LDAP filter syntax.
- * @since 2.0
- */
-public interface IFilterExpression extends IExpression, Filter {
- /**
- * Filter using a <code>Map</code>. This <code>Filter</code> is
- * executed using the specified <code>Map</code>'s keys and values.
- * The keys are case insensitively matched with this <code>Filter</code>.
- *
- * @param map The <code>Map</code> whose keys are used in the
- * match.
- * @return <code>true</code> if the <code>map</code>'s keys and
- * values match this filter; <code>false</code> otherwise.
- * @throws IllegalArgumentException If <code>map</code> contains case
- * variants of the same key name.
- */
- boolean match(Map<String, ? extends Object> map);
-
- /**
- * Filter with case sensitivity using a <code>Map</code>. This
- * <code>Filter</code> is executed using the specified
- * <code>Map</code>'s keys and values. The keys are case sensitively
- * matched with this <code>Filter</code>.
- *
- * @param map The <code>Map</code> whose keys are used in the
- * match.
- * @return <code>true</code> if the <code>map</code>'s keys and
- * values match this filter; <code>false</code> otherwise.
- */
- boolean matchCase(Map<String, ? extends Object> map);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMatchExpression.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMatchExpression.java
deleted file mode 100644
index ac425e9d9..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMatchExpression.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-/**
- * A match expression is a boolean expression matching a candidate of a
- * specific type. An {@link IEvaluationContext} is needed in order to evaluate
- * a match and this class provides two ways of doing that. Either a context
- * is created first and then reused in several subsequent calls to
- * {@link #isMatch(IEvaluationContext, Object)} or, if no repeated calls are
- * expected, the {@link #isMatch(Object)} method can be used. It will then
- * create a context on each call.
- * @since 2.0
- */
-public interface IMatchExpression<T> extends IExpression {
- /**
- * <p>Creates a new context to be passed to repeated subsequent evaluations. The context
- * will introduce 'this' as an uninitialized variable and make the parameters available.
- * @return A new evaluation context.
- */
- IEvaluationContext createContext();
-
- /**
- * Returns the parameters that this match expression was created with.
- * @return An array of parameters, possibly empty but never <code>null</code>.
- */
- Object[] getParameters();
-
- /**
- * This method creates a new evaluation context and assigns the <code>candidate</code>
- * to the 'this' variable of the <code>context</code> and then evaluates the expression.
- * This is essentially a short form for <pre>isMatch(createContext(), candidate)</pre>.
- * @param candidate The object to test.
- * @return the result of the evaluation.
- */
- boolean isMatch(T candidate);
-
- /**
- * This method assigns <code>candidate</code> to the 'this' variable of the
- * <code>context</code> and then evaluates the expression.
- * @param context A context
- * @param candidate The object to test.
- * @return the result of the evaluation.
- */
- boolean isMatch(IEvaluationContext context, T candidate);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMemberProvider.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMemberProvider.java
deleted file mode 100644
index 44cf39d29..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMemberProvider.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-/**
- * This interface may be implemented by any class that wants to provide easy
- * (high performance) access to its member to the expression evaluator. It
- * also gives the implementing class a way to hide or rename the members
- * otherwise accessible using getters.
- * @since 2.0
- */
-public interface IMemberProvider {
- /**
- * Returns the value for the specified member. Implementers can rely
- * on that the <code>memberName</code> is a string that has been
- * internalized using {@link String#intern()}.
- * @param memberName The name of the member
- * @return The member value.
- * @throws IllegalArgumentException if the instance has no member with
- * the given name.
- */
- Object getMember(String memberName);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/SimplePattern.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/SimplePattern.java
deleted file mode 100644
index 0ba2c0928..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/SimplePattern.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-import java.io.Serializable;
-
-/**
- * A simple compiled pattern. It supports two kinds of wildcards. The '*' (any character zero to many times)
- * and the '?' (any character exactly one time).
- * @since 2.0
- */
-public class SimplePattern implements Serializable, Comparable<SimplePattern> {
- private static final long serialVersionUID = -2477990705739062410L;
-
- /**
- * Matches the <code>value</code> with the compiled expression. The value
- * is considered matching if all characters are matched by the expression. A
- * partial match is not enough.
- * @param value The value to match
- * @return <code>true</code> if the value was a match.
- */
- public boolean isMatch(CharSequence value) {
- if (node == null)
- node = parse(pattern, 0);
- return node.match(value, 0);
- }
-
- public String toString() {
- return pattern;
- }
-
- public int compareTo(SimplePattern o) {
- return pattern.compareTo(o.pattern);
- }
-
- public boolean equals(Object o) {
- return o == this || (o instanceof SimplePattern && ((SimplePattern) o).pattern.equals(pattern));
- }
-
- public int hashCode() {
- return 3 * pattern.hashCode();
- }
-
- private final String pattern;
- private transient Node node;
-
- private SimplePattern(String pattern) {
- this.pattern = pattern;
- }
-
- static class AllNode extends Node {
- boolean match(CharSequence value, int pos) {
- return true;
- }
- }
-
- static class RubberBandNode extends Node {
- final Node next;
-
- RubberBandNode(Node next) {
- this.next = next;
- }
-
- boolean match(CharSequence value, int pos) {
- int top = value.length();
- String ending = next.getEndingConstant();
- if (ending != null) {
- // value must end with this constant. It will be faster
- // to scan backwards from the end.
- int clen = ending.length();
- if (clen > top - pos)
- return false;
- while (clen > 0)
- if (ending.charAt(--clen) != value.charAt(--top))
- return false;
- return true;
- }
-
- while (pos < top) {
- if (next.match(value, pos++))
- return true;
- }
- return false;
- }
- }
-
- static class AnyCharacterNode extends Node {
- final Node next;
-
- AnyCharacterNode(Node next) {
- this.next = next;
- }
-
- boolean match(CharSequence value, int pos) {
- int top = value.length();
- return next == null ? pos + 1 == top : next.match(value, pos + 1);
- }
- }
-
- static class EndConstantNode extends Node {
- final String constant;
-
- EndConstantNode(String constant) {
- this.constant = constant;
- }
-
- boolean match(CharSequence value, int pos) {
- int max = constant.length() + pos;
- int top = value.length();
- if (top != max)
- return false;
-
- int idx = 0;
- while (pos < max)
- if (value.charAt(pos++) != constant.charAt(idx++))
- return false;
- return true;
- }
-
- String getEndingConstant() {
- return constant;
- }
- }
-
- static class ConstantNode extends Node {
- final Node next;
- final String constant;
-
- ConstantNode(Node next, String constant) {
- this.next = next;
- this.constant = constant;
- }
-
- boolean match(CharSequence value, int pos) {
- int max = constant.length() + pos;
- int top = value.length();
- if (top < max)
- return false;
-
- int idx = 0;
- while (pos < max)
- if (value.charAt(pos++) != constant.charAt(idx++))
- return false;
- return next == null ? (pos == top) : next.match(value, pos);
- }
- }
-
- static abstract class Node {
- abstract boolean match(CharSequence value, int pos);
-
- String getEndingConstant() {
- return null;
- }
- }
-
- public static SimplePattern compile(String pattern) {
- if (pattern == null)
- throw new IllegalArgumentException("Pattern can not be null"); //$NON-NLS-1$
- return new SimplePattern(pattern);
- }
-
- private static Node parse(String pattern, int pos) {
- int top = pattern.length();
- StringBuffer bld = null;
- Node parsedNode = null;
- while (pos < top) {
- char c = pattern.charAt(pos);
- switch (c) {
- case '*' :
- ++pos;
- parsedNode = pos == top ? new AllNode() : new RubberBandNode(parse(pattern, pos));
- break;
- case '?' :
- parsedNode = new AnyCharacterNode(parse(pattern, pos + 1));
- break;
- case '\\' :
- if (++pos == top)
- throw new IllegalArgumentException("Pattern ends with escape"); //$NON-NLS-1$
- c = pattern.charAt(pos);
- // fall through
- default :
- if (bld == null)
- bld = new StringBuffer();
- bld.append(c);
- ++pos;
- continue;
- }
- break;
- }
-
- if (bld != null) {
- String constant = bld.toString();
- parsedNode = parsedNode == null ? new EndConstantNode(constant) : new ConstantNode(parsedNode, constant);
- }
- return parsedNode;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/package.html b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/package.html
deleted file mode 100644
index 04c524048..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides a simple expression language used to represent requirements and filters in the metadada<h2>
-Package Specification</h2>
-<p>
-This package defines a simple expression language that is used to define requirements and filters in the metadata, but also form the base of the p2 query language.
-<p>
-@since 2.0
-<p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndex.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndex.java
deleted file mode 100644
index ebb8ce232..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndex.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.index;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-
-/**
- * Indexed access to the elements provided by an IQueryable
- * @since 2.0
- */
-public interface IIndex<T> {
- /**
- * Obtains the elements that are candidates for the given <code>booleanExpr</code> when applied
- * using the given <code>variable</code> as <code>this</code>.
- * The returned set of elements are the elements that must be present in order for the expression
- * to evaluate to <code>true</code>. The set may contain false positives.
- *
- * TODO: Write more about how the valid set of elements is determined.
- *
- * @param ctx The evaluation context used when examining the <code>booleanExpr</code>.
- * @param variable The variable used as <code>this</code>.
- * @param booleanExpr The boolean expression.
- * @return The candidate elements or <code>null</code> if this index cannot be used.
- */
- Iterator<T> getCandidates(IEvaluationContext ctx, IExpression variable, IExpression booleanExpr);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndexProvider.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndexProvider.java
deleted file mode 100644
index e85ec8732..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndexProvider.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.index;
-
-import java.util.Iterator;
-
-/**
- * An index provider is typically an IQueryable.
- * @since 2.0
- */
-public interface IIndexProvider<T> {
- /**
- * Return an index optimized for producing candidates based on values
- * for a <code>memberName</code> that denotes a member of the index
- * type.
- * @param memberName A member of type <code>T</code>.
- * @return An index or <code>null</code> if this provider does not support
- * this index.
- */
- IIndex<T> getIndex(String memberName);
-
- /**
- * Return the iterator that delivers all rows that the target query should
- * consider. This is used when no index can be found for any possible
- * member.
- * @return An iterator. Possibly empty but never <code>null</code>.
- */
- Iterator<T> everything();
-
- /**
- * Returns a property that this index manages on behalf of a <code>client</code> object.
- * Examples of this is the properties that a profile manages for installable
- * units.
- * @param client The client for which the property is managed. Typically an IU.
- * @param memberName The name of the managed properties, i.e. &quot;profileProperties&quot;
- * @param key The property key
- * @return The managed property value or <code>null</code> if no value could be found.
- */
- Object getManagedProperty(Object client, String memberName, Object key);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IQueryWithIndex.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IQueryWithIndex.java
deleted file mode 100644
index d944e8554..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IQueryWithIndex.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.index;
-
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.equinox.p2.query.IQueryResult;
-
-/**
- * An extension of the {@link IQuery} that allows use of indexes.
- * @since 2.0
- */
-public interface IQueryWithIndex<T> extends IQuery<T> {
- /**
- * Evaluates the query using the <code>indexProvider</code>. The query
- * is first analyzed for index candidates (typically expressions like
- * id == &lt;some value&gt;) and if possible, indexes returned by
- * {@link IIndexProvider#getIndex(String)} will be used
- * in place of the iterator returned by {@link IIndexProvider#everything()}.
- *
- * @param indexProvider The provider of the material to evaluate the query on
- * @return The results of the query.
- */
- IQueryResult<T> perform(IIndexProvider<T> indexProvider);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/package.html b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/package.html
deleted file mode 100644
index 3486d12fb..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/package.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides classes for metadata query indexing
-<h2>
-Package Specification</h2>
-<p>
-This package provides API for creating and manipulating indices that are used
-to optimize queries against a particular queryable source.
-<p>
-@since 2.0
-<p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/package.html b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/package.html
deleted file mode 100644
index 8b40121ee..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/package.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Defines the metadata being handled by p2.
-<h2>
-Package Specification</h2>
-<p>
-This API package defines the constructs being manipulated by p2 such as installable units.
-<p>
-@since 2.0
-<p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CollectionResult.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CollectionResult.java
deleted file mode 100644
index 6edd2e054..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CollectionResult.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-import java.lang.reflect.Array;
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-
-/**
- * This class allows to adapt java collections to a p2 a query result and as such something queryable
- * @since 2.0
- */
-public class CollectionResult<T> implements IQueryResult<T> {
- private final Collection<T> collection;
-
- public CollectionResult(Collection<T> collection) {
- this.collection = collection == null ? CollectionUtils.<T> emptySet() : collection;
- }
-
- public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor) {
- return query.perform(iterator());
- }
-
- public boolean isEmpty() {
- return collection.isEmpty();
- }
-
- public Iterator<T> iterator() {
- return collection.iterator();
- }
-
- public T[] toArray(Class<T> clazz) {
- int size = collection.size();
- @SuppressWarnings("unchecked")
- T[] result = (T[]) Array.newInstance(clazz, size);
- if (size != 0)
- collection.toArray(result);
- return result;
- }
-
- public Set<T> toSet() {
- return new HashSet<T>(collection);
- }
-
- public Set<T> toUnmodifiableSet() {
- return collection instanceof Set<?> ? Collections.<T> unmodifiableSet((Set<T>) collection) : toSet();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/Collector.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/Collector.java
deleted file mode 100644
index c387ce71a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/Collector.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-import java.lang.reflect.Array;
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.metadata.Messages;
-
-/**
- * A collector is a generic visitor that collects objects passed to it,
- * and can then express the result of the visit in various forms. The collector
- * can also short-circuit a traversal by returning <code>false</code> from
- * its {@link #accept(Object)} method.
- * <p>
- * This default collector just accepts all objects passed to it. Clients may subclass
- * to perform different processing on the objects passed to it.
- * @param <T> The type of object accepted by this collector
- * @since 2.0
- */
-public class Collector<T> implements IQueryResult<T> {
- private Set<T> collected = null;
-
- public static final Collector<?> EMPTY_COLLECTOR = new Collector<Object>() {
- public boolean accept(Object val) {
- return false;
- }
- };
-
- @SuppressWarnings("unchecked")
- public static final <T> Collector<T> emptyCollector() {
- return (Collector<T>) EMPTY_COLLECTOR;
- }
-
- /**
- * Creates a new collector.
- */
- public Collector() {
- super();
- }
-
- /**
- * Accepts an object.
- * <p>
- * This default implementation adds the objects to a list. Clients may
- * override this method to perform additional filtering, add different objects
- * to the list, short-circuit the traversal, or process the objects directly without
- * collecting them.
- *
- * @param object the object to collect or visit
- * @return <code>true</code> if the traversal should continue,
- * or <code>false</code> to indicate the traversal should stop.
- */
- public boolean accept(T object) {
- getCollection().add(object);
- return true;
- }
-
- /**
- * Adds the elements from one collector to this collector
- * @param queryResult The collector from which the elements should be retrieved
- */
- public void addAll(IQueryResult<T> queryResult) {
- boolean keepGoing = true;
- for (Iterator<T> iter = queryResult.iterator(); iter.hasNext() && keepGoing;) {
- keepGoing = accept(iter.next());
- }
- }
-
- /**
- * Returns the collection that is being used to collect results. Unlike {@linkplain #toSet()},
- * this returns the actual modifiable collection that is being used to store results. The
- * return value is only intended to be used within subclasses and should not be exposed
- * outside of a collection class.
- *
- * @return the collection being used to collect results.
- */
- protected Collection<T> getCollection() {
- if (collected == null)
- collected = new HashSet<T>();
- return collected;
- }
-
- /**
- * Returns whether this collector is empty.
- * @return <code>true</code> if this collector has accepted any results,
- * and <code>false</code> otherwise.
- */
- public boolean isEmpty() {
- return collected == null || collected.isEmpty();
- }
-
- /**
- * Returns an iterator on the collected objects.
- *
- * @return an iterator of the collected objects.
- */
- public Iterator<T> iterator() {
- return collected == null ? CollectionUtils.<T> emptyList().iterator() : collected.iterator();
- }
-
- /**
- * Returns the number of collected objects.
- */
- public int size() {
- return collected == null ? 0 : collected.size();
- }
-
- /**
- * Returns the collected objects as an array
- *
- * @param clazz The type of array to return
- * @return The array of results
- * @throws ArrayStoreException the runtime type of the specified array is
- * not a super-type of the runtime type of every collected object
- */
- public T[] toArray(Class<T> clazz) {
- int size = collected == null ? 0 : collected.size();
- @SuppressWarnings("unchecked")
- T[] result = (T[]) Array.newInstance(clazz, size);
- if (size != 0)
- collected.toArray(result);
- return result;
- }
-
- /**
- * Returns a copy of the collected objects.
- *
- * @return An unmodifiable collection of the collected objects
- */
- public Set<T> toSet() {
- return collected == null ? new HashSet<T>() : new HashSet<T>(collected);
- }
-
- /**
- * Performs a query on this results of this collector.
- */
- public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor) {
- IQueryResult<T> result;
- if (monitor == null)
- monitor = new NullProgressMonitor();
- try {
- monitor.beginTask(Messages.performing_subquery, 1);
- result = query.perform(iterator());
- monitor.worked(1);
- } finally {
- monitor.done();
- }
- return result;
- }
-
- /**
- * Returns the collected objects as an immutable collection.
- *
- * @return An unmodifiable collection of the collected objects
- */
- @SuppressWarnings("unchecked")
- public Set<T> toUnmodifiableSet() {
- return collected == null ? Collections.EMPTY_SET : Collections.unmodifiableSet(collected);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CompoundQueryable.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CompoundQueryable.java
deleted file mode 100644
index dab517ce7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CompoundQueryable.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 2010 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-import java.util.*;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.metadata.expression.CompoundIterator;
-import org.eclipse.equinox.internal.p2.metadata.index.CompoundIndex;
-import org.eclipse.equinox.internal.p2.metadata.index.IndexProvider;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.KeyWithLocale;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-
-/**
- * A queryable that holds a number of other IQueryables and provides
- * a mechanism for querying the entire set.
- * @since 2.0
- */
-public final class CompoundQueryable<T> extends IndexProvider<T> {
-
- static class PassThroughIndex<T> implements IIndex<T> {
- private final Iterator<T> iterator;
-
- public PassThroughIndex(Iterator<T> iterator) {
- this.iterator = iterator;
- }
-
- public Iterator<T> getCandidates(IEvaluationContext ctx, IExpression variable, IExpression booleanExpr) {
- return iterator;
- }
- }
-
- private IQueryable<T>[] queryables;
-
- public CompoundQueryable(IQueryable<T>[] queryables) {
- this.queryables = queryables;
- }
-
- /**
- * Creates a queryable that combines the given collection of input queryables
- *
- * @param queryables The collection of queryables to be combined
- */
- @SuppressWarnings("unchecked")
- CompoundQueryable(Collection<? extends IQueryable<T>> queryables) {
- this(queryables.toArray(new IQueryable[queryables.size()]));
- }
-
- /**
- * Creates a queryable that combines the two provided input queryables
- *
- * @param query1 The first queryable
- * @param query2 The second queryable
- */
- @SuppressWarnings("unchecked")
- CompoundQueryable(IQueryable<T> query1, IQueryable<T> query2) {
- this(new IQueryable[] {query1, query2});
- }
-
- public IIndex<T> getIndex(String memberName) {
- // Check that at least one of the queryable can present an index
- // for the given member.
- boolean found = false;
- for (IQueryable<T> queryable : queryables) {
- if (queryable instanceof IIndexProvider<?>) {
- @SuppressWarnings("unchecked")
- IIndexProvider<T> ip = (IIndexProvider<T>) queryable;
- if (ip.getIndex(memberName) != null) {
- found = true;
- break;
- }
- }
- }
-
- if (!found)
- // Nobody had an index for this member
- return null;
-
- ArrayList<IIndex<T>> indexes = new ArrayList<IIndex<T>>(queryables.length);
- for (IQueryable<T> queryable : queryables) {
- if (queryable instanceof IIndexProvider<?>) {
- @SuppressWarnings("unchecked")
- IIndexProvider<T> ip = (IIndexProvider<T>) queryable;
- IIndex<T> index = ip.getIndex(memberName);
- if (index != null)
- indexes.add(index);
- else
- indexes.add(new PassThroughIndex<T>(ip.everything()));
- } else {
- indexes.add(new PassThroughIndex<T>(getIteratorFromQueryable(queryable)));
- }
- }
- return indexes.size() == 1 ? indexes.get(0) : new CompoundIndex<T>(indexes);
- }
-
- public Iterator<T> everything() {
- if (queryables.length == 0)
- return CollectionUtils.<T> emptySet().iterator();
-
- if (queryables.length == 1)
- return getIteratorFromQueryable(queryables[0]);
-
- ArrayList<Iterator<T>> iterators = new ArrayList<Iterator<T>>(queryables.length);
- for (IQueryable<T> queryable : queryables)
- iterators.add(getIteratorFromQueryable(queryable));
- return new CompoundIterator<T>(iterators.iterator());
- }
-
- public Object getManagedProperty(Object client, String memberName, Object key) {
- for (IQueryable<T> queryable : queryables) {
- if (queryable instanceof IIndexProvider<?>) {
- @SuppressWarnings("unchecked")
- IIndexProvider<T> ip = (IIndexProvider<T>) queryable;
- Object value = ip.getManagedProperty(client, memberName, key);
- if (value != null)
- return value;
- }
- }
-
- // When asked for translatedProperties we should return from the IU when the property is not found.
- if (client instanceof IInstallableUnit && memberName.equals(InstallableUnit.MEMBER_TRANSLATED_PROPERTIES)) {
- IInstallableUnit iu = (IInstallableUnit) client;
- return key instanceof KeyWithLocale ? iu.getProperty(((KeyWithLocale) key).getKey()) : iu.getProperty(key.toString());
- }
- return null;
- }
-
- static class IteratorCapture<T> implements IQuery<T> {
- private Iterator<T> capturedIterator;
-
- public IQueryResult<T> perform(Iterator<T> iterator) {
- capturedIterator = iterator;
- return Collector.emptyCollector();
- }
-
- public IExpression getExpression() {
- return null;
- }
-
- Iterator<T> getCapturedIterator() {
- return capturedIterator == null ? CollectionUtils.<T> emptySet().iterator() : capturedIterator;
- }
- }
-
- private static <T> Iterator<T> getIteratorFromQueryable(IQueryable<T> queryable) {
- if (queryable instanceof IIndexProvider<?>) {
- @SuppressWarnings("unchecked")
- IIndexProvider<T> ip = (IIndexProvider<T>) queryable;
- return ip.everything();
- }
- IteratorCapture<T> capture = new IteratorCapture<T>();
- queryable.query(capture, new NullProgressMonitor());
- return capture.getCapturedIterator();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionMatchQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionMatchQuery.java
deleted file mode 100644
index b81bcfe9a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionMatchQuery.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.metadata.index.*;
-
-/**
- * A query that matches candidates against an expression.
- * @since 2.0
- */
-public class ExpressionMatchQuery<T> implements IMatchQuery<T>, IQueryWithIndex<T> {
- private final IMatchExpression<T> expression;
- private final Class<? extends T> matchingClass;
- private final IEvaluationContext context;
- private final List<String> indexedMembers;
-
- public ExpressionMatchQuery(Class<? extends T> matchingClass, IExpression expression, Object... parameters) {
- this.matchingClass = matchingClass;
- this.expression = ExpressionUtil.getFactory().<T> matchExpression(expression, parameters);
- this.context = this.expression.createContext();
- this.indexedMembers = Expression.getIndexCandidateMembers(matchingClass, ExpressionFactory.THIS, (Expression) expression);
- }
-
- public ExpressionMatchQuery(Class<? extends T> matchingClass, String expression, Object... parameters) {
- this(matchingClass, ExpressionUtil.parse(expression), parameters);
- }
-
- public IEvaluationContext getContext() {
- return context;
- }
-
- public Class<? extends T> getMatchingClass() {
- return matchingClass;
- }
-
- public IQueryResult<T> perform(IIndexProvider<T> indexProvider) {
- if (((MatchExpression<T>) expression).operand == ExpressionUtil.TRUE_EXPRESSION)
- return new QueryResult<T>(RepeatableIterator.create(indexProvider));
- Iterator<T> iterator = null;
- int top = indexedMembers.size();
- for (int idx = 0; idx < top; ++idx) {
- IIndex<T> index = indexProvider.getIndex(indexedMembers.get(idx));
- if (index != null) {
- iterator = index.getCandidates(context, ExpressionFactory.THIS, expression);
- if (iterator != null)
- break;
- }
- }
- if (iterator == null)
- iterator = RepeatableIterator.create(indexProvider);
- context.setIndexProvider(indexProvider);
- return perform(iterator);
- }
-
- public IQueryResult<T> perform(Iterator<T> iterator) {
- if (((MatchExpression<T>) expression).operand == ExpressionUtil.TRUE_EXPRESSION)
- return new QueryResult<T>(iterator);
-
- HashSet<T> result = null;
- while (iterator.hasNext()) {
- T value = iterator.next();
- if (isMatch(value)) {
- if (result == null)
- result = new HashSet<T>();
- result.add(value);
- }
- }
- return result == null ? Collector.<T> emptyCollector() : new CollectionResult<T>(result);
- }
-
- public boolean isMatch(T candidate) {
- if (!matchingClass.isInstance(candidate))
- return false;
- ExpressionFactory.THIS.setValue(context, candidate);
- return Boolean.TRUE == expression.evaluate(context);
- }
-
- public IMatchExpression<T> getExpression() {
- return expression;
- }
-
- public void setIndexProvider(IIndexProvider<T> indexProvider) {
- context.setIndexProvider(indexProvider);
- }
-
- public void prePerform() { //
- }
-
- public void postPerform() { //
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionQuery.java
deleted file mode 100644
index 8ec52f4e4..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionQuery.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-
-import java.util.Iterator;
-import org.eclipse.equinox.internal.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-import org.eclipse.equinox.p2.metadata.index.IQueryWithIndex;
-
-/**
- * A query that evaluates using an iterator as input and produces a new iterator.
- * @since 2.0
- */
-public class ExpressionQuery<T> implements IQueryWithIndex<T> {
- private final IContextExpression<T> expression;
- private final Class<? extends T> elementClass;
-
- public ExpressionQuery(Class<? extends T> elementClass, IExpression expression, Object... parameters) {
- this.elementClass = elementClass;
- this.expression = ExpressionUtil.getFactory().<T> contextExpression(expression, parameters);
- }
-
- public ExpressionQuery(Class<? extends T> matchingClass, String expression, Object... parameters) {
- this(matchingClass, ExpressionUtil.parseQuery(expression), parameters);
- }
-
- public Class<? extends T> getElementClass() {
- return elementClass;
- }
-
- public IQueryResult<T> perform(IIndexProvider<T> indexProvider) {
- return new QueryResult<T>(expression.iterator(expression.createContext(elementClass, indexProvider)));
- }
-
- public IQueryResult<T> perform(Iterator<T> iterator) {
- return new QueryResult<T>(expression.iterator(expression.createContext(elementClass, iterator)));
- }
-
- public IContextExpression<T> getExpression() {
- return expression;
- }
-
- public static <T> Class<? extends T> getElementClass(IQuery<T> query) {
- @SuppressWarnings("unchecked")
- Class<? extends T> elementClass = (Class<T>) Object.class;
- if (query instanceof ExpressionMatchQuery<?>)
- elementClass = ((ExpressionMatchQuery<T>) query).getMatchingClass();
- else if (query instanceof ExpressionQuery<?>)
- elementClass = ((ExpressionQuery<T>) query).getElementClass();
- return elementClass;
- }
-
- public static <T> IContextExpression<T> createExpression(IQuery<T> query) {
- IExpressionFactory factory = ExpressionUtil.getFactory();
- IExpression expr = query.getExpression();
- Object[] parameters;
- if (expr == null) {
- expr = factory.toExpression(query);
- if (query instanceof IMatchQuery<?>)
- expr = factory.select(ExpressionFactory.EVERYTHING, factory.lambda(ExpressionFactory.THIS, expr));
- parameters = new Object[0];
- } else {
- if (expr instanceof MatchExpression<?>) {
- MatchExpression<?> matchExpr = (MatchExpression<?>) expr;
- parameters = matchExpr.getParameters();
- expr = factory.select(ExpressionFactory.EVERYTHING, factory.lambda(ExpressionFactory.THIS, matchExpr.operand));
- } else if (expr instanceof ContextExpression<?>) {
- ContextExpression<?> contextExpr = (ContextExpression<?>) expr;
- parameters = contextExpr.getParameters();
- expr = contextExpr.operand;
- } else
- parameters = new Object[0];
- }
- return factory.contextExpression(expr, parameters);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IMatchQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IMatchQuery.java
deleted file mode 100644
index e0a6413d3..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IMatchQuery.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 2010 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-/**
- * A query in which the elements can be evaluated by calling isMatch on. Each
- * element can be evaluated independently of all other elements. Match queries
- * can be evaluated in parallel as each call {@link #isMatch(Object)} is mutually
- * exclusive from all other calls. <P>
- *
- * @noimplement This interface is not intended to be implemented by clients. Clients
- * creating custom queries must extend {@link ExpressionMatchQuery}.
- * @deprecated If possible, use one of the predefined queries in {@link QueryUtil} or
- * use the {@link QueryUtil#createMatchQuery(String, Object...)}
- * to create a custom expression based query. If the query cannot be expressed using
- * the p2QL, then use a predefined or custom expression query as a first filter
- * (in worst case, use {@link QueryUtil#createIUAnyQuery()}) and then provide further filtering
- * like so:<pre>
- * for(iter = queryable.query(someExpressionQuery).iterator(); iter.hasNext();) {
- * // do your match here
- * }</pre>
- * @since 2.0
- */
-public interface IMatchQuery<T> extends IQuery<T> {
-
- /**
- * Returns whether the given object satisfies the parameters of this query.
- *
- * @param candidate The object to perform the query against
- * @return <code>true</code> if the unit satisfies the parameters
- * of this query, and <code>false</code> otherwise
- *
- * @noreference This method is not intended to be referenced by clients.
- */
- public boolean isMatch(T candidate);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQuery.java
deleted file mode 100644
index 14860a54c..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQuery.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-
-/**
- * The root interface for all queries that can be performed on an {@link IQueryable}.
- * A query is a piece of logic that selects some objects from a list of provided
- * inputs using some established criteria.
- * <p>
- * Any given query must be stable - running the same query on the same inputs
- * must return an equal query result each time the query is executed. Thus a client
- * that has performed a query can freely cache the result as long as they know the
- * query input has not changed.
- * </p>
- *
- * @param <T> The type of input object that this query accepts
- * @noimplement This interface is not intended to be implemented directly by clients.
- * @noextend This interface is not intended to be extended directly by clients.
- * @since 2.0
- */
-public interface IQuery<T> {
- /**
- * Evaluates the query for a specific input.
- *
- * @param iterator The elements for which to evaluate the query on
- * @return The results of the query.
- */
- IQueryResult<T> perform(Iterator<T> iterator);
-
- /**
- * Returns the IExpression backing this query or <code>null</code> if
- * this is not an expression query.
- * @return An expression or <code>null</code>.
- */
- IExpression getExpression();
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryResult.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryResult.java
deleted file mode 100644
index 0f7ce7617..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryResult.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-import java.util.Iterator;
-import java.util.Set;
-
-/**
- * An IQueryResult represents the results of a query.
- *
- * @since 2.0
- */
-public interface IQueryResult<T> extends IQueryable<T> {
- /**
- * Returns whether this QueryResult is empty.
- * @return <code>true</code> if this QueryResult has accepted any results,
- * and <code>false</code> otherwise.
- */
- public boolean isEmpty();
-
- /**
- * Returns an iterator on the collected objects.
- *
- * @return an iterator of the collected objects.
- */
- public Iterator<T> iterator();
-
- /**
- * Returns the collected objects as an array
- *
- * @param clazz The type of array to return
- * @return The array of results
- * @throws ArrayStoreException the runtime type of the specified array is
- * not a super-type of the runtime type of every collected object
- */
- public T[] toArray(Class<T> clazz);
-
- /**
- * Creates a new Set copy with the contents of this query result. The
- * copy can be altered without any side effects on its origin.
- * @return A detached copy of the result.
- */
- public Set<T> toSet();
-
- /**
- * Returns a Set backed by this query result. The set is immutable.
- * @return A Set backed by this query result.
- */
- public Set<T> toUnmodifiableSet();
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryable.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryable.java
deleted file mode 100644
index 22b4d8bd7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryable.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * An IQueryable contains objects, and is able to perform queries on those objects.
- * <p>
- * This interface may be implemented by clients.
- * @since 2.0
- */
-public interface IQueryable<T> {
- /**
- * Performs a query, passing any objects that satisfy the
- * query to the provided collector.
- * <p>
- * This method is long-running; progress and cancellation are provided
- * by the given progress monitor.
- * </p>
- *
- * @param query The query to perform
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- * @return The collector argument
- */
- public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/MatchQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/MatchQuery.java
deleted file mode 100644
index f320f7e18..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/MatchQuery.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 2010 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* EclipseSource - initial API and implementation
-* IBM Corporation - ongoing development
-******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-
-/**
- * This class represents a simple Java-based query. Clients may subclass and
- * override the {@link #isMatch(Object)} method in order to write simple
- * queries against p2 metadata.
- * <p>
- * Note that hand-written queries cannot be optimized for queryables containing
- * indices, or for remote queryables. In general you should use one of the pre-defined
- * queries found in {@link QueryUtil} if possible, to obtain queries optimized for indexing and
- * remote execution. This class is intended for simple queries against small data
- * sources where indexed lookup and remote query execution are not needed.
- * </p>
- * @deprecated If possible, use one of the predefined queries in {@link QueryUtil}
- * or use the {@link QueryUtil#createMatchQuery(String, Object...)}
- * to create a custom expression based query. If the query cannot be expressed using
- * the p2QL, then use a predefined or custom expression query as a first filter
- * (in worst case, use {@link QueryUtil#createIUAnyQuery()}) and then provide further filtering
- * like so:<pre>
- * for(iter = queryable.query(someExpressionQuery).iterator(); iter.hasNext();) {
- * // do your match here
- * }</pre>
- * @since 2.0
- */
-public abstract class MatchQuery<T> implements IMatchQuery<T> {
-
- /**
- * Returns whether the given object satisfies the parameters of this query.
- *
- * @param candidate The object to perform the query against
- * @return <code>true</code> if the unit satisfies the parameters
- * of this query, and <code>false</code> otherwise
- *
- * @noreference This method is not intended to be referenced by clients.
- * Clients should call {@link #perform(Iterator)}
- */
- public abstract boolean isMatch(T candidate);
-
- /**
- * Performs this query on the given iterator, passing all objects in the iterator
- * that match the criteria of this query to the given result.
- */
- public final IQueryResult<T> perform(Iterator<T> iterator) {
- Collector<T> result = new Collector<T>();
- while (iterator.hasNext()) {
- T candidate = iterator.next();
- if (candidate != null && isMatch(candidate))
- if (!result.accept(candidate))
- break;
- }
- return result;
- }
-
- /**
- * Execute any pre-processing that must be done before this query is performed against
- * a particular iterator. This method may be used by subclasses to do any calculations,
- * caching, or other preparation for the query.
- * <p>
- * This method is internal to the framework. Subclasses may override this method, but
- * should not call this method.
- *
- * @noreference This method is not intended to be referenced by clients.
- */
- public void prePerform() {
- // nothing to do by default
- }
-
- /**
- * Execute any post-processing that must be done after this query has been performed against
- * a particular iterator. This method may be used by subclasses to clear caches or any other
- * cleanup that should occur after a query.
- * <p>
- * This method will be called even if the query does not complete successfully.
- * <p>
- * This method is internal to the framework. Subclasses may override this method, but
- * should not call this method.
- *
- * @noreference This method is not intended to be referenced by clients.
- */
- public void postPerform() {
- // nothing to do by default
- }
-
- public IExpression getExpression() {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java
deleted file mode 100644
index 5b4c54c12..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java
+++ /dev/null
@@ -1,519 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.metadata.expression.ContextExpression;
-import org.eclipse.equinox.internal.p2.metadata.expression.ExpressionFactory;
-import org.eclipse.equinox.internal.p2.metadata.expression.Expression.VariableFinder;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-
-/**
- * Helper class for query related tasks.
- * @since 2.0
- */
-public class QueryUtil {
-
- public static final IQuery<IInstallableUnit> ALL_UNITS = QueryUtil.createMatchQuery(ExpressionUtil.TRUE_EXPRESSION);
-
- public static final String ANY = "*"; //$NON-NLS-1$
-
- public static final IQuery<IInstallableUnit> NO_UNITS = QueryUtil.createQuery("limit(0)"); //$NON-NLS-1$
-
- public static final String PROP_TYPE_CATEGORY = "org.eclipse.equinox.p2.type.category"; //$NON-NLS-1$
-
- public static final String PROP_TYPE_GROUP = "org.eclipse.equinox.p2.type.group"; //$NON-NLS-1$
-
- public static final String PROP_TYPE_PATCH = "org.eclipse.equinox.p2.type.patch"; //$NON-NLS-1$
-
- private static final IExpression matchesRequirementsExpression = ExpressionUtil.parse("$0.exists(r | this ~= r)"); //$NON-NLS-1$
-
- private static final IExpression matchIU_ID = ExpressionUtil.parse("id == $0"); //$NON-NLS-1$
- private static final IExpression matchIU_IDAndRange = ExpressionUtil.parse("id == $0 && version ~= $1"); //$NON-NLS-1$
- private static final IExpression matchIU_IDAndVersion = ExpressionUtil.parse("id == $0 && version == $1"); //$NON-NLS-1$
- private static final IExpression matchIU_Range = ExpressionUtil.parse("version ~= $0"); //$NON-NLS-1$
- private static final IExpression matchIU_Version = ExpressionUtil.parse("version == $0"); //$NON-NLS-1$
- private static final IExpression matchIU_propAny = ExpressionUtil.parse("properties[$0] != null"); //$NON-NLS-1$
- private static final IExpression matchIU_propNull = ExpressionUtil.parse("properties[$0] == null"); //$NON-NLS-1$
- private static final IExpression matchIU_propTrue = ExpressionUtil.parse("properties[$0] == true"); //$NON-NLS-1$
- private static final IExpression matchIU_propValue = ExpressionUtil.parse("properties[$0] == $1"); //$NON-NLS-1$
-
- /**
- * Creates a queryable that combines the given collection of input queryables
- *
- * @param queryables The collection of queryables to be combined
- */
- @SuppressWarnings("unchecked")
- public static <T> IQueryable<T> compoundQueryable(Collection<? extends IQueryable<T>> queryables) {
- return new CompoundQueryable<T>(queryables.toArray(new IQueryable[queryables.size()]));
- }
-
- /**
- * Creates a queryable that combines the two provided input queryables
- *
- * @param query1 The first queryable
- * @param query2 The second queryable
- */
- @SuppressWarnings("unchecked")
- public static <T> IQueryable<T> compoundQueryable(IQueryable<T> query1, IQueryable<T> query2) {
- return new CompoundQueryable<T>(new IQueryable[] {query1, query2});
- }
-
- /**
- * Creates a compound query that combines the given queries. If all queries
- * are candidate match queries, then the queries will be concatenated as a
- * boolean 'and' or a boolean 'or' expression depending on the <code>and</code>
- * flag. If at least one query is a full query, all queries will instead be evaluated
- * using intersection when <code>and</code> is <code>true</code> or a union.
- *
- * @param queries The queries to perform
- * @param and <code>true</code> if this query represents an intersection or a
- * logical 'and', and <code>false</code> if this query represents a union or
- * a logical 'or'.
- * @return A compound query
- */
- @SuppressWarnings("unchecked")
- public static <T> IQuery<T> createCompoundQuery(Collection<? extends IQuery<? extends T>> queries, boolean and) {
- IExpressionFactory factory = ExpressionUtil.getFactory();
- int top = queries.size();
- if (top == 1)
- return (IQuery<T>) queries.iterator().next();
-
- Class<? extends T> elementClass = (Class<T>) Object.class;
- if (top == 0)
- return QueryUtil.<T> createMatchQuery(elementClass, ExpressionUtil.TRUE_EXPRESSION);
-
- IExpression[] expressions = new IExpression[top];
- boolean justBooleans = true;
- boolean justContexts = true;
- int idx = 0;
- for (IQuery<? extends T> query : queries) {
- if (query instanceof IMatchQuery<?>)
- justContexts = false;
- else
- justBooleans = false;
-
- IExpression expr = query.getExpression();
- if (expr == null)
- expr = factory.toExpression(query);
-
- Class<? extends T> ec = ExpressionQuery.getElementClass(query);
- if (elementClass == null)
- elementClass = ec;
- else if (elementClass != ec) {
- if (elementClass.isAssignableFrom(ec)) {
- if (and)
- // Use most restrictive class
- elementClass = ec;
- } else if (ec.isAssignableFrom(elementClass)) {
- if (!and)
- // Use least restrictive class
- elementClass = ec;
- }
- }
- expressions[idx++] = expr;
- }
-
- if (justBooleans) {
- IExpression compound = and ? factory.and(expressions) : factory.or(expressions);
- return QueryUtil.<T> createMatchQuery(elementClass, compound);
- }
-
- if (!justContexts) {
- // Mix of boolean queries and context queries. All must be converted into context then.
- for (idx = 0; idx < expressions.length; ++idx)
- expressions[idx] = makeContextExpression(factory, expressions[idx]);
- }
-
- IExpression compound = expressions[0];
- for (idx = 1; idx < expressions.length; ++idx)
- compound = and ? factory.intersect(compound, expressions[idx]) : factory.union(compound, expressions[idx]);
- return QueryUtil.<T> createQuery(elementClass, compound);
- }
-
- /**
- * Creates a compound query that combines the two queries. If both queries
- * are candidate match queries, then the queries will be concatenated as a
- * boolean 'and' or a boolean 'or' expression depending on the <code>and</code>
- * flag. If at least one query is a full query, all queries will instead be evaluated
- * using intersection when <code>and</code> is <code>true</code> or a union.
- *
- * @param query1 the first query
- * @param query2 the second query
- * @param and <code>true</code> if this query represents an intersection or a
- * logical 'and', and <code>false</code> if this query represents a union or
- * a logical 'or'.
- * @return A compound query
- */
- public static <T> IQuery<T> createCompoundQuery(IQuery<? extends T> query1, IQuery<T> query2, boolean and) {
- ArrayList<IQuery<? extends T>> queries = new ArrayList<IQuery<? extends T>>(2);
- queries.add(query1);
- queries.add(query2);
- return createCompoundQuery(queries, and);
- }
-
- /**
- * Returns a query that matches all {@link InstallableUnit} elements
- */
- public static IQuery<IInstallableUnit> createIUAnyQuery() {
- return ALL_UNITS;
- }
-
- /**
- * Creates a new query that will return the members of the
- * given <code>category</code>. If the specified {@link IInstallableUnit}
- * is not a category, then no installable unit will satisfy the query.
- *
- * @param category The category
- * @return A query that returns category members
- */
- public static IQuery<IInstallableUnit> createIUCategoryMemberQuery(IInstallableUnit category) {
- if (QueryUtil.isCategory(category))
- return QueryUtil.createMatchQuery(matchesRequirementsExpression, category.getRequirements());
- return NO_UNITS;
- }
-
- /**
- * Creates a query matching every {@link IInstallableUnit} that is a category.
- * @return The query that matches categories
- * @since 2.0
- */
- public static IQuery<IInstallableUnit> createIUCategoryQuery() {
- return createIUPropertyQuery(QueryUtil.PROP_TYPE_CATEGORY, Boolean.TRUE.toString());
- }
-
- /**
- * Creates a query matching every {@link IInstallableUnit} that is a group.
- * @return a query that matches all groups
- */
- public static IQuery<IInstallableUnit> createIUGroupQuery() {
- return createIUPropertyQuery(PROP_TYPE_GROUP, Boolean.TRUE.toString());
- }
-
- /**
- * Creates an {@link IInstallableUnit} that will match all patches.
- * @return The created query
- */
- public static IQuery<IInstallableUnit> createIUPatchQuery() {
- return createIUPropertyQuery(QueryUtil.PROP_TYPE_PATCH, Boolean.TRUE.toString());
- }
-
- /**
- * Creates a query that searches for {@link IInstallableUnit} instances that have
- * a property whose value matches the provided value. If no property name is
- * specified, then all {@link IInstallableUnit} instances are accepted.
- * @param propertyName The key of the property to match or <code>null</code> to match all
- * @param propertyValue The value of the property. Can be {@link #ANY} to match all values
- * except <code>null</code>
- * @return The query matching properties
- */
- public static IQuery<IInstallableUnit> createIUPropertyQuery(String propertyName, String propertyValue) {
- if (propertyName == null)
- return QueryUtil.createMatchQuery(ExpressionUtil.TRUE_EXPRESSION);
- if (propertyValue == null)
- return QueryUtil.createMatchQuery(matchIU_propNull, propertyName);
- if (ANY.equals(propertyValue))
- return QueryUtil.createMatchQuery(matchIU_propAny, propertyName);
- if (Boolean.valueOf(propertyValue).booleanValue())
- return QueryUtil.createMatchQuery(matchIU_propTrue, propertyName);
- return QueryUtil.createMatchQuery(matchIU_propValue, propertyName, propertyValue);
- }
-
- /**
- * Creates a query that will match any {@link IInstallableUnit} with the given
- * id and version.
- *
- * @param versionedId The precise id/version combination that a matching unit must have
- * @return a query that matches IU's by id and version
- */
- public static IQuery<IInstallableUnit> createIUQuery(IVersionedId versionedId) {
- return createIUQuery(versionedId.getId(), versionedId.getVersion());
- }
-
- /**
- * Creates a query that will match any {@link IInstallableUnit} with the given
- * id, regardless of version.
- *
- * @param id The installable unit id to match, or <code>null</code> to match any id
- * @return a query that matches IU's by id
- */
- public static IQuery<IInstallableUnit> createIUQuery(String id) {
- return id == null ? ALL_UNITS : QueryUtil.createMatchQuery(matchIU_ID, id);
- }
-
- /**
- * Creates a query that will match any {@link IInstallableUnit} with the given
- * id and version.
- *
- * @param id The installable unit id to match, or <code>null</code> to match any id
- * @param version The precise version that a matching unit must have or <code>null</code>
- * to match any version
- * @return a query that matches IU's by id and version
- */
- public static IQuery<IInstallableUnit> createIUQuery(String id, Version version) {
- if (version == null || version.equals(Version.emptyVersion))
- return createIUQuery(id);
- if (id == null)
- return QueryUtil.createMatchQuery(matchIU_Version, version);
- return QueryUtil.createMatchQuery(matchIU_IDAndVersion, id, version);
- }
-
- /**
- * Creates a query that will match any {@link IInstallableUnit} with the given
- * id, and whose version falls in the provided range.
- *
- * @param id The installable unit id to match, or <code>null</code> to match any id
- * @param range The version range to match or <code>null</code> to match any range.
- * @return a query that matches IU's by id and range
- */
- public static IQuery<IInstallableUnit> createIUQuery(String id, VersionRange range) {
- if (range == null || range.equals(VersionRange.emptyRange))
- return createIUQuery(id);
- if (id == null)
- return QueryUtil.createMatchQuery(matchIU_Range, range);
- return QueryUtil.createMatchQuery(matchIU_IDAndRange, id, range);
- }
-
- /**
- * Creates a query that returns the latest version for each unique id of an {@link IVersionedId}.
- * All other elements are discarded.
- * @return A query matching the latest version for each id.
- */
- public static IQuery<IInstallableUnit> createLatestIUQuery() {
- return QueryUtil.createQuery(ExpressionUtil.getFactory().latest(ExpressionFactory.EVERYTHING));
- }
-
- /**
- * Creates a query that returns the latest version for each unique id of an {@link IVersionedId}
- * from the collection produced by <code>query</code>.
- * All other elements are discarded.
- * @param query The query that precedes the latest query when evaluating.
- * @return A query matching the latest version for each id.
- */
- public static <T extends IVersionedId> IQuery<T> createLatestQuery(IQuery<T> query) {
- IContextExpression<T> ctxExpr = ExpressionQuery.createExpression(query);
- IExpressionFactory factory = ExpressionUtil.getFactory();
- @SuppressWarnings("unchecked")
- Class<T> elementClass = (Class<T>) IVersionedId.class;
- return QueryUtil.createQuery(elementClass, factory.latest(((ContextExpression<?>) ctxExpr).operand), ctxExpr.getParameters());
- }
-
- /**
- * Creates a limit query that can be used to limit the number of query results returned. Once
- * the limit is reached, the query is terminated.
- * @param query The query that should be limited
- * @param limit A positive integer denoting the limit
- * @return A limited query
- * @since 2.0
- */
- public static <T> IQuery<T> createLimitQuery(IQuery<T> query, int limit) {
- IContextExpression<T> ctxExpr = ExpressionQuery.createExpression(query);
- IExpressionFactory factory = ExpressionUtil.getFactory();
- return QueryUtil.createQuery(ExpressionQuery.getElementClass(query), factory.limit(((ContextExpression<T>) ctxExpr).operand, limit), ctxExpr.getParameters());
- }
-
- /**
- * Creates an {@link IInstallableUnit} query that will iterate over all candidates and discriminate by
- * applying the boolean <code>matchExpression</code> on each candidate.
- * @param matchExpression The boolean expression used for filtering one candidate
- * @param parameters Values for parameter substitution
- * @return The created query
- */
- public static IQuery<IInstallableUnit> createMatchQuery(IExpression matchExpression, Object... parameters) {
- return new ExpressionMatchQuery<IInstallableUnit>(IInstallableUnit.class, matchExpression, parameters);
- }
-
- /**
- * Parses the <code>matchExpression</code> and creates an {@link IInstallableUnit} query that will
- * iterate over all candidates and discriminate by applying the boolean <code>matchExpression</code>
- * on each candidate.
- * @param matchExpression The boolean expression used for filtering one candidate
- * @param parameters Values for parameter substitution
- * @return The created query
- */
- public static IQuery<IInstallableUnit> createMatchQuery(String matchExpression, Object... parameters) {
- return new ExpressionMatchQuery<IInstallableUnit>(IInstallableUnit.class, matchExpression, parameters);
- }
-
- /**
- * Creates an query that will iterate over all candidates and discriminate all
- * candidates that are not instances of <code>matchinClass></code> or for which
- * the boolean <code>matchExpression</code> returns false.
- * @param matchingClass The class that matching candidates must be an instance of
- * @param matchExpression The boolean expression used for filtering one candidate
- * @param parameters Values for parameter substitution
- * @return The created query
- */
- public static <T> IQuery<T> createMatchQuery(Class<? extends T> matchingClass, IExpression matchExpression, Object... parameters) {
- return new ExpressionMatchQuery<T>(matchingClass, matchExpression, parameters);
- }
-
- /**
- * Parses the <code>matchExpression</code> and creates an query that will iterate over
- * all candidates and discriminate all candidates that are not instances of
- * <code>matchinClass></code> or for which the boolean <code>matchExpression</code>
- * returns false.
- * @param matchingClass The class that matching candidates must be an instance of
- * @param matchExpression The boolean expression used for filtering one candidate
- * @param parameters Values for parameter substitution
- * @return The created query
- */
- public static <T> IQuery<T> createMatchQuery(Class<? extends T> matchingClass, String matchExpression, Object... parameters) {
- return new ExpressionMatchQuery<T>(matchingClass, matchExpression, parameters);
- }
-
- /**
- * <p>Creates a piped query based on the provided input queries.</p>
- * <p>A pipe is a composite query in which each sub-query is executed in succession.
- * The results from the ith sub-query are piped as input into the i+1th sub-query. The
- * query will short-circuit if any query returns an empty result set.</p>
- *
- * @param queries the ordered list of queries to perform
- * @return A query pipe
- */
- @SuppressWarnings("unchecked")
- public static <T> IQuery<T> createPipeQuery(Collection<? extends IQuery<? extends T>> queries) {
- IExpressionFactory factory = ExpressionUtil.getFactory();
- int top = queries.size();
- IExpression[] expressions = new IExpression[top];
- int idx = 0;
- for (IQuery<? extends T> query : queries) {
- IExpression expr = query.getExpression();
- if (expr == null)
- expr = factory.toExpression(query);
- expressions[idx++] = expr;
- }
- IExpression pipe = factory.pipe(expressions);
- VariableFinder finder = new VariableFinder(ExpressionFactory.EVERYTHING);
- pipe.accept(finder);
- return finder.isFound() ? QueryUtil.<T> createQuery((Class<T>) Object.class, pipe) : QueryUtil.<T> createMatchQuery((Class<T>) Object.class, pipe);
- }
-
- /**
- * <p>Creates a piped query based on the provided input queries.</p>
- * <p>A pipe is a composite query in which each sub-query is executed in succession.
- * The results from the ith sub-query are piped as input into the i+1th sub-query. The
- * query will short-circuit if any query returns an empty result set.</p>
- *
- * @param query1 the first query
- * @param query2 the second query
- * @return A query pipe
- */
- public static <T> IQuery<T> createPipeQuery(IQuery<? extends T> query1, IQuery<? extends T> query2) {
- ArrayList<IQuery<? extends T>> queries = new ArrayList<IQuery<? extends T>>(2);
- queries.add(query1);
- queries.add(query2);
- return createPipeQuery(queries);
- }
-
- /**
- * Creates an {@link IInstallableUnit} query based on an <code>expression</code> that
- * uses all candidates as input.
- * @param expression The query expression
- * @param parameters Values for parameter substitution
- * @return The created query
- */
- public static IQuery<IInstallableUnit> createQuery(IExpression expression, Object... parameters) {
- return new ExpressionQuery<IInstallableUnit>(IInstallableUnit.class, expression, parameters);
- }
-
- /**
- * Parses the <code>expression</code> and creates an {@link IInstallableUnit} query. The
- * <code>expression</code> is expected to use all candidates as input.
- * @param expression The query expression
- * @param parameters Values for parameter substitution
- * @return The created query
- */
- public static IQuery<IInstallableUnit> createQuery(String expression, Object... parameters) {
- return new ExpressionQuery<IInstallableUnit>(IInstallableUnit.class, expression, parameters);
- }
-
- /**
- * Creates a query that will limit the result to instances of the <code>matchinClass</code>. The
- * <code>expression</code> is expected to use all candidates as input.
- * @param matchingClass The class used as discriminator for the result
- * @param expression The query expression
- * @param parameters Values for parameter substitution
- * @return The created query
- */
- public static <T> IQuery<T> createQuery(Class<? extends T> matchingClass, IExpression expression, Object... parameters) {
- return new ExpressionQuery<T>(matchingClass, expression, parameters);
- }
-
- /**
- * Parses the <code>expression</code> and creates a query that will limit the result
- * to instances of the <code>matchinClass</code>. The <code>expression</code> is expected
- * to use all candidates as input.
- * @param matchingClass The class used as discriminator for the result
- * @param expression The query expression
- * @param parameters Values for parameter substitution
- * @return The created query
- */
- public static <T> IQuery<T> createQuery(Class<? extends T> matchingClass, String expression, Object... parameters) {
- return new ExpressionQuery<T>(matchingClass, expression, parameters);
- }
-
- /**
- * Test if the {@link IInstallableUnit} is a category.
- * @param iu the element being tested.
- * @return <tt>true</tt> if the parameter is a category.
- */
- public static boolean isCategory(IInstallableUnit iu) {
- String value = iu.getProperty(PROP_TYPE_CATEGORY);
- if (value != null && (value.equals(Boolean.TRUE.toString())))
- return true;
- return false;
- }
-
- /**
- * Test if the {@link IInstallableUnit} is a fragment.
- * @param iu the element being tested.
- * @return <tt>true</tt> if the parameter is a fragment.
- */
- public static boolean isFragment(IInstallableUnit iu) {
- return iu instanceof IInstallableUnitFragment;
- }
-
- /**
- * Test if the {@link IInstallableUnit} is a group.
- * @param iu the element being tested.
- * @return <tt>true</tt> if the parameter is a group.
- */
- public static boolean isGroup(IInstallableUnit iu) {
- String value = iu.getProperty(PROP_TYPE_GROUP);
- if (value != null && (value.equals(Boolean.TRUE.toString())))
- return true;
- return false;
- }
-
- /**
- * Test if the {@link IInstallableUnit} is a patch.
- * @param iu the element being tested.
- * @return <tt>true</tt> if the parameter is a patch.
- */
- public static boolean isPatch(IInstallableUnit iu) {
- String value = iu.getProperty(PROP_TYPE_PATCH);
- if (value != null && (value.equals(Boolean.TRUE.toString())))
- return true;
- return false;
- }
-
- private static IExpression makeContextExpression(IExpressionFactory factory, IExpression expr) {
- VariableFinder finder = new VariableFinder(ExpressionFactory.EVERYTHING);
- expr.accept(finder);
- if (!finder.isFound())
- expr = factory.select(ExpressionFactory.EVERYTHING, factory.lambda(ExpressionFactory.THIS, expr));
- return expr;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/package.html b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/package.html
deleted file mode 100644
index ddcfd40e9..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/package.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides common classes for the query mechanism.
-<h2>
-Package Specification</h2>
-<p>
-This package provide low level infrastructure for querying collections of metadata.
-Additional queries can be found in the org.eclipse.equinox.p2.metadata.query package and more domain specific queries can be found in the touchpoints.
-<p>
-@since 2.0
-<p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.director.app/.classpath b/bundles/org.eclipse.equinox.p2.publisher.eclipse/.classpath
index 834ea833e..834ea833e 100644
--- a/bundles/org.eclipse.equinox.p2.director.app/.classpath
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/.classpath
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/.cvsignore b/bundles/org.eclipse.equinox.p2.publisher.eclipse/.cvsignore
new file mode 100644
index 000000000..da1f782c0
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/.cvsignore
@@ -0,0 +1,3 @@
+temp.folder
+target
+ant_tasks
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/.project b/bundles/org.eclipse.equinox.p2.publisher.eclipse/.project
index 2bc9a3891..f77f99cb7 100644
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/.project
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.equinox.p2.tests.optimizers</name>
+ <name>org.eclipse.equinox.p2.publisher.eclipse</name>
<comment></comment>
<projects>
</projects>
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.publisher.eclipse/.settings/org.eclipse.jdt.core.prefs
index cd0a1d3aa..409e92e67 100644
--- a/bundles/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Tue Feb 09 13:00:00 EST 2010
+#Thu Feb 17 10:12:47 CET 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.builder.cleanOutputFolder=clean
org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -9,7 +9,7 @@ org.eclipse.jdt.core.circularClasspath=error
org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
@@ -25,7 +25,7 @@ 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.discouragedReference=ignore
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
@@ -35,18 +35,19 @@ 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.includeNullInfoFromAsserts=disabled
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.invalidJavadocTagsNotVisibleRef=disabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
+org.eclipse.jdt.core.compiler.problem.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
@@ -57,7 +58,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
@@ -67,13 +68,17 @@ 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.redundantNullCheck=warning
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
@@ -83,10 +88,10 @@ 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=disabled
+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.unusedLocal=warning
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
@@ -167,6 +172,12 @@ 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_field=insert
+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_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=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_annotation_on_type=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.publisher.eclipse/.settings/org.eclipse.jdt.ui.prefs
index cb66dccdf..6cff743bf 100644
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/.settings/org.eclipse.jdt.ui.prefs
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/.settings/org.eclipse.jdt.ui.prefs
@@ -1,4 +1,4 @@
-#Thu Oct 30 11:24:56 EDT 2008
+#Mon Apr 04 09:29:53 EDT 2011
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_core
@@ -6,7 +6,7 @@ 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.staticondemandthreshold=99
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
@@ -15,6 +15,7 @@ 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_missing_override_annotations_interface_methods=false
sp_cleanup.add_serial_version_id=false
sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false
@@ -31,7 +32,7 @@ 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.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
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.publisher.eclipse/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 000000000..1536d63c6
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,3 @@
+#Wed Feb 01 13:57:01 EST 2006
+eclipse.preferences.version=1
+selfhosting.binExcludes=/org.eclipse.pde.build/bin_ant
diff --git a/bundles/org.eclipse.equinox.p2.publisher/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.publisher.eclipse/META-INF/MANIFEST.MF
index f73f932c9..fde71f481 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/META-INF/MANIFEST.MF
@@ -1,68 +1,60 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
-Bundle-SymbolicName: org.eclipse.equinox.p2.publisher;singleton:=true
-Bundle-Version: 1.1.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.publisher.Activator
+Bundle-SymbolicName: org.eclipse.equinox.p2.publisher.eclipse;singleton:=true
+Bundle-ClassPath: pdepublishing.jar
+Eclipse-BundleShape: dir
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.pde.internal.publishing.Activator
+Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.publisher;
- x-friends:="org.eclipse.equinox.p2.directorywatcher,
- org.eclipse.equinox.p2.touchpoint.eclipse,
- org.eclipse.equinox.p2.ui.sdk,
- org.eclipse.equinox.p2.updatesite",
- org.eclipse.equinox.internal.p2.publisher.compatibility;x-internal:=true,
- org.eclipse.equinox.internal.p2.publisher.eclipse;
- x-friends:="org.eclipse.equinox.p2.directorywatcher,
- org.eclipse.equinox.p2.extensionlocation,
- org.eclipse.equinox.p2.repository.tools,
- org.eclipse.equinox.p2.updatesite",
- org.eclipse.equinox.internal.p2.swt.tools;x-internal:=true,
- org.eclipse.equinox.p2.publisher;x-friends:="org.eclipse.equinox.p2.directorywatcher,org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.equinox.p2.updatesite",
- org.eclipse.equinox.p2.publisher.actions;x-friends:="org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.p2.directorywatcher",
- org.eclipse.equinox.p2.publisher.eclipse;
- x-friends:="org.eclipse.equinox.p2.directorywatcher,
- org.eclipse.equinox.p2.extensionlocation,
- org.eclipse.equinox.p2.touchpoint.eclipse,
- org.eclipse.equinox.p2.updatesite,
- org.eclipse.equinox.p2.repository.tools",
- org.eclipse.equinox.spi.p2.publisher;x-friends:="org.eclipse.equinox.p2.updatesite"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: javax.xml.parsers,
- org.eclipse.equinox.app;version="1.0.0";resolution:=optional,
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.eclipse.equinox.app;version="[1.0.0,2.0.0)",
org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
org.eclipse.equinox.internal.frameworkadmin.equinox,
org.eclipse.equinox.internal.frameworkadmin.utils,
org.eclipse.equinox.internal.p2.artifact.repository,
- org.eclipse.equinox.internal.p2.artifact.repository.simple,
org.eclipse.equinox.internal.p2.core.helpers,
org.eclipse.equinox.internal.p2.metadata,
- org.eclipse.equinox.internal.p2.metadata.expression,
- org.eclipse.equinox.internal.p2.metadata.index,
org.eclipse.equinox.internal.p2.metadata.repository,
+ org.eclipse.equinox.internal.p2.publisher,
org.eclipse.equinox.internal.provisional.frameworkadmin,
org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata.index;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.publisher,
+ org.eclipse.equinox.p2.publisher.actions,
org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.spi;version="[2.0.0,3.0.0)",
org.eclipse.equinox.simpleconfigurator.manipulator;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.spi,
- org.eclipse.osgi.service.datalocation;version="1.2.0",
+ org.eclipse.equinox.spi.p2.publisher,
+ org.eclipse.osgi.service.datalocation;version="1.3.0",
org.eclipse.osgi.service.environment;version="1.1.0",
org.eclipse.osgi.service.pluginconversion;version="1.0.0",
- org.eclipse.osgi.service.resolver;version="1.2.0",
+ org.eclipse.osgi.service.resolver;version="1.5.0",
org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.4.0",
+ org.osgi.framework;version="1.3.0",
org.osgi.service.application;version="1.1.0",
- org.osgi.service.packageadmin;version="1.2.0",
- org.xml.sax,
- org.xml.sax.helpers
+ org.osgi.service.packageadmin;version="1.2.0"
+Export-Package: org.eclipse.equinox.internal.p2.publisher.compatibility;x-internal:=true,
+ org.eclipse.equinox.internal.p2.publisher.eclipse;
+ x-friends:="org.eclipse.equinox.p2.directorywatcher,
+ org.eclipse.equinox.p2.extensionlocation,
+ org.eclipse.equinox.p2.repository.tools,
+ org.eclipse.equinox.p2.updatesite,
+ org.eclipse.pde.build",
+ org.eclipse.equinox.p2.publisher.eclipse;
+ x-friends:="org.eclipse.equinox.p2.directorywatcher,
+ org.eclipse.equinox.p2.extensionlocation,
+ org.eclipse.equinox.p2.touchpoint.eclipse,
+ org.eclipse.equinox.p2.updatesite,
+ org.eclipse.equinox.p2.repository.tools",
+ org.eclipse.pde.internal.build.publisher;x-friends:="org.eclipse.pde.build",
+ org.eclipse.pde.internal.publishing;x-friends:="org.eclipse.pde.build",
+ org.eclipse.pde.internal.swt.tools;x-internal:=true
+Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/about.html b/bundles/org.eclipse.equinox.p2.publisher.eclipse/about.html
index 460233046..460233046 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/about.html
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/about.html
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/build.properties b/bundles/org.eclipse.equinox.p2.publisher.eclipse/build.properties
new file mode 100644
index 000000000..3779b2c6a
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/build.properties
@@ -0,0 +1,16 @@
+source.pdepublishing.jar = src/
+output.pdepublishing.jar = bin/
+bin.includes = META-INF/,\
+ plugin.properties,\
+ ant_tasks/pdepublishing-ant.jar,\
+ plugin.xml,\
+ about.html
+jars.compile.order = pdepublishing.jar,\
+ ant_tasks/pdepublishing-ant.jar
+source.ant_tasks/pdepublishing-ant.jar = src_ant/
+output.ant_tasks/pdepublishing-ant.jar = bin_ant/
+extra.ant_tasks/pdepublishing-ant.jar = platform:/plugin/org.apache.ant
+jars.extra.classpath = platform:/plugin/org.apache.ant/lib/ant.jar
+javacTarget=jsr14
+javacSource=1.5
+src.includes = about.html
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/plugin.properties b/bundles/org.eclipse.equinox.p2.publisher.eclipse/plugin.properties
index 5ceaadc85..800405763 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin/plugin.properties
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/plugin.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2008, 2009 IBM Corporation and others.
+# Copyright (c) 2007, 2011 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
#
# Contributors:
# IBM Corporation - initial API and implementation
+# SAP AG - consolidation of publishers for PDE formats
###############################################################################
-pluginName = Equinox Framework Admin
-providerName = Eclipse.org - Equinox
+bundleName = Plug-in Development Environment Publishing Support
+providerName = Eclipse.org
diff --git a/bundles/org.eclipse.equinox.p2.publisher/plugin.xml b/bundles/org.eclipse.equinox.p2.publisher.eclipse/plugin.xml
index 210c1d9e8..1e90424e1 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/plugin.xml
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/plugin.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.5"?>
<plugin>
- <extension id="InstallPublisher" point="org.eclipse.core.runtime.applications">
+ <extension id="org.eclipse.equinox.p2.publisher.InstallPublisher" point="org.eclipse.core.runtime.applications">
<application cardinality="1" thread="any" visible="true">
<run class="org.eclipse.equinox.p2.publisher.eclipse.InstallPublisherApplication" />
</application>
@@ -11,12 +11,12 @@
<run class="org.eclipse.equinox.internal.p2.publisher.compatibility.GeneratorApplication" />
</application>
</extension>
- <extension id="ProductPublisher" point="org.eclipse.core.runtime.applications">
+ <extension id="org.eclipse.equinox.p2.publisher.ProductPublisher" point="org.eclipse.core.runtime.applications">
<application cardinality="1" thread="any" visible="true">
<run class="org.eclipse.equinox.p2.publisher.eclipse.ProductPublisherApplication" />
</application>
</extension>
- <extension id="FeaturesAndBundlesPublisher" point="org.eclipse.core.runtime.applications">
+ <extension id="org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher" point="org.eclipse.core.runtime.applications">
<application cardinality="1" thread="any" visible="true">
<run class="org.eclipse.equinox.p2.publisher.eclipse.FeaturesAndBundlesPublisherApplication" />
</application>
@@ -24,24 +24,24 @@
<extension point="org.eclipse.ant.core.antTasks">
<antTask
- library="ant_tasks/publisher-ant.jar"
+ library="ant_tasks/pdepublishing-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"
+ library="ant_tasks/pdepublishing-ant.jar"
name="p2.publish.featuresAndBundles">
</antTask>
<antTask
class="org.eclipse.equinox.internal.p2.publisher.ant.ProductPublisherTask"
- library="ant_tasks/publisher-ant.jar"
+ library="ant_tasks/pdepublishing-ant.jar"
name="p2.publish.product">
</antTask>
</extension>
<extension point="org.eclipse.ant.core.extraClasspathEntries">
- <extraClasspathEntry library="ant_tasks/publisher-ant.jar"/>
+ <extraClasspathEntry library="ant_tasks/pdepublishing-ant.jar"/>
</extension>
</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/pom.xml b/bundles/org.eclipse.equinox.p2.publisher.eclipse/pom.xml
new file mode 100644
index 000000000..3e8cfa798
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+ <groupId>org.eclipse</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+ </parent>
+
+ <groupId>org.eclipse</groupId>
+ <artifactId>org.eclipse.equinox.p2.publisher.eclipse</artifactId>
+ <version>1.0.0.qualifier</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/bundles/org.eclipse.equinox.p2.publisher/scripts/buildExtraJAR.xml b/bundles/org.eclipse.equinox.p2.publisher.eclipse/scripts/buildExtraJAR.xml
index a34be7af7..1c8886a84 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/scripts/buildExtraJAR.xml
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/scripts/buildExtraJAR.xml
@@ -2,7 +2,7 @@
<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="plugin" value="org.eclipse.equinox.p2.publisher.eclipse"/>
<property name="temp.folder" value="${basedir}/temp.folder"/>
<property name="plugin.destination" value="${basedir}"/>
<property name="build.result.folder" value="${basedir}/ant_tasks"/>
@@ -24,13 +24,13 @@
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"/>
+ <delete file="${basedir}/ant_tasks/pdepublishing-ant.jar" failonerror="false"/>
+ <ant antfile="${basedir}/build.xml" target="ant_tasks/pdepublishing-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"/>
+ <delete file="${basedir}/ant_tasks/pdepublishing-ant.jar" failonerror="false"/>
+ <jar destfile="${basedir}/ant_tasks/pdepublishing-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/compatibility/GeneratorApplication.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/compatibility/GeneratorApplication.java
index f7bed224f..f7bed224f 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/GeneratorApplication.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/compatibility/GeneratorApplication.java
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/IGeneratorConstants.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/compatibility/IGeneratorConstants.java
index 30bd49cb9..30bd49cb9 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/IGeneratorConstants.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/compatibility/IGeneratorConstants.java
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java
new file mode 100644
index 000000000..6622fa176
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java
@@ -0,0 +1,656 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.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.p2.metadata.Version;
+import org.eclipse.pde.internal.publishing.Utils;
+import org.eclipse.pde.internal.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 BUNDLE_ID_KEY = "<key>CFBundleIdentifier</key>"; //$NON-NLS-1$
+ private static final String BUNDLE_INFO_KEY = "<key>CFBundleGetInfoString</key>"; //$NON-NLS-1$
+ private static final String BUNDLE_VERSION_KEY = "<key>CFBundleVersion</key>"; //$NON-NLS-1$
+ private static final String BUNDLE_SHORT_VERSION_KEY = "<key>CFBundleShortVersionString</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 name;
+ private String description;
+ private String os = "win32"; //$NON-NLS-1$
+ private boolean brandIcons = true;
+ private String id;
+ private Version version;
+
+ public BrandingIron() {
+ }
+
+ public void setName(String value) {
+ name = value;
+ }
+
+ public void setIcons(String[] value) {
+ icons = (value == null || value.length == 0) ? null : value;
+ }
+
+ public void setIcons(String value) {
+ icons = org.eclipse.equinox.internal.frameworkadmin.utils.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 brand(ExecutablesDescriptor descriptor) 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;
+
+ File root = descriptor.getLocation();
+
+ // 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 (!root.exists() || (!brandIcons && new File(root, testName).exists()))
+ return;
+
+ // make sure the descriptor's location is a canonical path otherwise
+ // removing files from it may fail (this happens notably on Windows)
+ try {
+ root = root.getCanonicalFile();
+ } catch (IOException e) {
+ // try to live with an absolute path
+ root = root.getAbsoluteFile();
+ }
+ descriptor.setLocation(root);
+
+ if ("win32".equals(os)) //$NON-NLS-1$
+ brandWindows(descriptor);
+ else if ("linux".equals(os)) //$NON-NLS-1$
+ brandLinux(descriptor);
+ else if ("solaris".equals(os)) //$NON-NLS-1$
+ brandSolaris(descriptor);
+ else if ("macosx".equals(os)) //$NON-NLS-1$
+ brandMac(descriptor);
+ else if ("aix".equals(os)) //$NON-NLS-1$
+ brandAIX(descriptor);
+ else if ("hpux".equals(os)) //$NON-NLS-1$
+ brandHPUX(descriptor);
+ else
+ renameLauncher(descriptor);
+ descriptor.setExecutableName(name, true);
+ }
+
+ private void brandAIX(ExecutablesDescriptor descriptor) {
+ renameLauncher(descriptor);
+ }
+
+ private void brandHPUX(ExecutablesDescriptor descriptor) {
+ renameLauncher(descriptor);
+ }
+
+ private void brandLinux(ExecutablesDescriptor descriptor) throws Exception {
+ renameLauncher(descriptor);
+ if (brandIcons) {
+ File icon = null;
+ if (icons.length > 0) {
+ for (int i = 0; i < icons.length; i++) {
+ if (icons[i].toLowerCase().endsWith(".xpm")) { //$NON-NLS-1$
+ icon = new File(icons[i]);
+ break;
+ }
+ }
+ }
+ if (icon != null) {
+ File targetIcon = new File(descriptor.getLocation(), "icon.xpm"); //$NON-NLS-1$
+ Utils.copy(icon, targetIcon);
+ descriptor.addFile(targetIcon);
+ }
+ }
+ }
+
+ private void brandSolaris(ExecutablesDescriptor descriptor) throws Exception {
+ renameLauncher(descriptor);
+ if (brandIcons == false)
+ return;
+
+ File root = descriptor.getLocation();
+ for (int i = 0; i < icons.length; i++) {
+ String icon = icons[i];
+
+ int iconNameLength = icon.length();
+ if (iconNameLength < 5)
+ continue;
+ String extension = icon.substring(iconNameLength - 5);
+ // check if the extension is one of: .l.pm, .m.pm, .s.pm, .t.pm
+ if (extension.charAt(0) == '.' && extension.endsWith(".pm") && "lmst".indexOf(extension.charAt(1)) >= 0) { //$NON-NLS-1$ //$NON-NLS-2$
+ File targetIcon = new File(root, name + extension);
+ Utils.copy(new File(icon), targetIcon);
+ descriptor.addFile(targetIcon);
+ }
+ }
+ }
+
+ private void brandMac(ExecutablesDescriptor descriptor) throws Exception {
+ //Initially the files are in: <root>/Eclipse.app/
+ //and they must appear in <root>/MyAppName.app/
+ //Because java does not support the rename of a folder, files are copied.
+
+ //Initialize the target folders
+ String appName = name;
+ if (appName.equals("eclipse")) //$NON-NLS-1$
+ appName = "Eclipse"; //$NON-NLS-1$
+ else if (appName.equals("launcher")) //$NON-NLS-1$
+ appName = "Launcher"; //$NON-NLS-1$
+
+ File root = descriptor.getLocation();
+
+ File target = new File(root, appName + ".app/Contents"); //$NON-NLS-1$
+ target.mkdirs();
+ new File(target, "MacOS").mkdirs(); //$NON-NLS-1$
+ new File(target, "Resources").mkdirs(); //$NON-NLS-1$
+
+ File initialRoot = new File(root, "Launcher.app/Contents"); //$NON-NLS-1$
+ if (!initialRoot.exists())
+ initialRoot = new File(root, "launcher.app/Contents"); //$NON-NLS-1$
+ if (!initialRoot.exists())
+ initialRoot = new File(root, "Eclipse.app/Contents"); //$NON-NLS-1$
+ if (!initialRoot.exists())
+ initialRoot = new File(root, "eclipse.app/Contents"); //$NON-NLS-1$
+ if (!initialRoot.exists())
+ throw new FileNotFoundException("cannot find launcher root (Eclipse.app or Launcher.app)"); //$NON-NLS-1$
+ // use the canonical rep to avoid possible issues from case-insensitive file systems
+ initialRoot = initialRoot.getCanonicalFile();
+ copyMacLauncher(descriptor, initialRoot, target);
+ String iconName = ""; //$NON-NLS-1$
+ if (brandIcons) {
+ File icon = null;
+ for (int i = 0; i < icons.length; i++) {
+ if (icons[i].toLowerCase().endsWith(".icns")) { //$NON-NLS-1$
+ icon = new File(icons[i]);
+ if (icon.exists()) {
+ break;
+ }
+ }
+ }
+ if (icon != null) {
+ iconName = icon.getName(); // was previously: name + ".icns"
+ File initialIcon = new File(initialRoot, "Resources/Eclipse.icns"); //$NON-NLS-1$
+ try {
+ // canonicalize to ensure case matches
+ initialIcon = initialIcon.getCanonicalFile();
+ } catch (IOException e) { /*ignore*/
+ }
+ File targetIcon = new File(target, "Resources/" + iconName); //$NON-NLS-1$
+
+ initialIcon.delete();
+ descriptor.removeFile(initialIcon);
+ Utils.copy(icon, targetIcon);
+ descriptor.addFile(targetIcon);
+ }
+ }
+ copyMacIni(descriptor, initialRoot, target, iconName);
+ modifyInfoPListFile(descriptor, initialRoot, target, iconName);
+ File splashApp = new File(initialRoot, "Resources/Splash.app"); //$NON-NLS-1$
+ if (splashApp.exists()) {
+ brandMacSplash(descriptor, initialRoot, target, iconName);
+ }
+
+ // move over any files remaining in the original folder
+ moveContents(descriptor, initialRoot, target);
+ initialRoot.getParentFile().delete(); // initialRoot is xxx.app/Contents
+ }
+
+ /**
+ * 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 descriptor
+ * @param initialRoot
+ * @param target
+ * @param iconName
+ */
+ private void brandMacSplash(ExecutablesDescriptor descriptor, File initialRoot, File target, String iconName) {
+ String splashContents = "Resources/Splash.app/Contents"; //$NON-NLS-1$
+ modifyInfoPListFile(descriptor, new File(initialRoot, splashContents), new File(target, splashContents), iconName);
+
+ //link the MacOS launcher for the splash app
+ String splashMacOS = splashContents + "/MacOS"; //$NON-NLS-1$
+ File macOSDir = new File(target, "MacOS"); //$NON-NLS-1$
+ File splashMacOSDir = new File(target, splashMacOS);
+
+ splashMacOSDir.mkdirs();
+
+ File targetLauncher = new File(splashMacOSDir, name);
+
+ 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, name}; //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
+ Process proc = Runtime.getRuntime().exec(command, null, splashMacOSDir);
+ 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
+ try {
+ Utils.copy(new File(macOSDir, name), targetLauncher);
+ try {
+ Runtime.getRuntime().exec(new String[] {"chmod", "755", targetLauncher.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$
+ }
+ }
+
+ File initialLauncher = findLauncher(new File(initialRoot, splashMacOS));
+ if (initialLauncher != null) {
+ try {
+ if (!initialLauncher.getCanonicalFile().equals(targetLauncher.getCanonicalFile()))
+ initialLauncher.delete();
+ } catch (IOException e) {
+ // ignore
+ }
+ descriptor.removeFile(initialLauncher);
+ }
+ descriptor.addFile(targetLauncher);
+ }
+
+ private File findLauncher(File root) {
+ for (String launcherName : new String[] {"launcher", "eclipse"}) { //$NON-NLS-1$ //$NON-NLS-2$
+ File launcher = new File(root, launcherName);
+ if (launcher.exists())
+ return launcher;
+ }
+ return null;
+ }
+
+ private void moveContents(ExecutablesDescriptor descriptor, File source, File target) {
+ if (!source.exists())
+ return;
+ try {
+ source = source.getCanonicalFile();
+ target = target.getCanonicalFile();
+ } catch (IOException e) {
+ System.out.println("Could not copy macosx resources."); //$NON-NLS-1$
+ return;
+ }
+ if (source.equals(target))
+ 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);
+ descriptor.replace(contents[i], dest);
+ } else
+ moveContents(descriptor, contents[i], dest);
+ }
+ source.delete();
+ } else {
+ source.renameTo(target);
+ descriptor.replace(source, target);
+ }
+ }
+
+ private void brandWindows(ExecutablesDescriptor descriptor) throws Exception {
+ File root = descriptor.getLocation();
+ File templateLauncher = new File(root, name + ".exe"); //$NON-NLS-1$
+ if (!templateLauncher.exists())
+ templateLauncher = new File(root, "launcher.exe"); //$NON-NLS-1$
+ if (!templateLauncher.exists())
+ templateLauncher = new File(root, "eclipse.exe"); //$NON-NLS-1$
+ if (brandIcons) {
+ if (templateLauncher.exists()) {
+ String[] args = new String[icons.length + 1];
+ args[0] = templateLauncher.getAbsolutePath();
+ System.arraycopy(icons, 0, args, 1, icons.length);
+ IconExe.main(args);
+ } else {
+ System.out.println("Could not find executable to brand"); //$NON-NLS-1$
+ }
+ }
+ File targetLauncher = new File(root, name + ".exe"); //$NON-NLS-1$
+ if (templateLauncher.exists() && !templateLauncher.getName().equals(name + ".exe")) { //$NON-NLS-1$
+ templateLauncher.renameTo(targetLauncher);
+ descriptor.replace(templateLauncher, targetLauncher);
+ }
+ descriptor.setExecutableName(name, true);
+ }
+
+ private void renameLauncher(ExecutablesDescriptor descriptor) {
+ File root = descriptor.getLocation();
+ File launcher = findLauncher(root);
+ if (launcher == null)
+ return;
+ File targetLauncher = new File(root, name);
+ launcher.renameTo(targetLauncher);
+ descriptor.replace(launcher, targetLauncher);
+ descriptor.setExecutableName(name, true);
+ }
+
+ private void copyMacLauncher(ExecutablesDescriptor descriptor, File initialRoot, File target) {
+ File launcher = getCanonicalFile(new File(initialRoot, "MacOS/launcher")); //$NON-NLS-1$
+ File eclipseLauncher = getCanonicalFile(new File(initialRoot, "MacOS/eclipse")); //$NON-NLS-1$
+ File targetFile = getCanonicalFile(new File(target, "MacOS/" + name)); //$NON-NLS-1$
+ if (!launcher.exists()) {
+ launcher = eclipseLauncher;
+ } else if (eclipseLauncher.exists() && !targetFile.equals(eclipseLauncher)) {
+ //we may actually have both if exporting from the mac
+ eclipseLauncher.delete();
+ descriptor.removeFile(eclipseLauncher);
+ }
+ if (!targetFile.equals(launcher)) {
+ try {
+ Utils.copy(launcher, targetFile);
+ } catch (IOException e) {
+ System.out.println("Could not copy macosx launcher"); //$NON-NLS-1$
+ return;
+ }
+ launcher.delete();
+ launcher.getParentFile().delete();
+ descriptor.replace(launcher, targetFile);
+ }
+ 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
+ }
+ descriptor.setExecutableName(name, false);
+ }
+
+ private File getCanonicalFile(File file) {
+ try {
+ return file.getCanonicalFile();
+ } catch (IOException e) {
+ return file;
+ }
+ }
+
+ private void copyMacIni(ExecutablesDescriptor descriptor, File initialRoot, File target, String iconName) {
+ String brandedIniName = "MacOS/" + name + ".ini"; //$NON-NLS-1$//$NON-NLS-2$
+ // 4 possibilities, in order of preference:
+ // rcp.app/Contents/MacOS/rcp.ini (targetFile)
+ // Eclipse.app/Contents/MacOS/rcp.ini (brandedIni)
+ // Eclipse.app/Contents/MacOS/eclipse.ini (ini)
+ // Eclipse.app/Contents/MacOS/Eclipse.ini (ini2)
+ File targetFile = getCanonicalFile(new File(target, brandedIniName));
+ File brandedIni = getCanonicalFile(new File(initialRoot, brandedIniName));
+ File ini = getCanonicalFile(new File(initialRoot, "MacOS/eclipse.ini")); //$NON-NLS-1$
+ File ini2 = getCanonicalFile(new File(initialRoot, "MacOS/Eclipse.ini")); //$NON-NLS-1$
+
+ if (targetFile.exists()) {
+ //an ini already exists at the target, use that
+ if (brandedIni.exists() && !brandedIni.equals(targetFile)) {
+ brandedIni.delete();
+ descriptor.removeFile(brandedIni);
+ }
+ if (ini.exists() && !ini.equals(targetFile)) {
+ ini.delete();
+ descriptor.removeFile(ini);
+ }
+ if (ini2.exists() && !ini2.equals(targetFile)) {
+ ini2.delete();
+ descriptor.removeFile(ini2);
+ }
+ ini = targetFile;
+ } else if (brandedIni.exists()) {
+ //take the one that is already branded
+ if (ini.exists() && !ini.equals(brandedIni)) {
+ ini.delete();
+ descriptor.removeFile(ini);
+ }
+ if (ini2.exists() && !ini2.equals(brandedIni)) {
+ ini2.delete();
+ descriptor.removeFile(ini2);
+ }
+ ini = brandedIni;
+ } else {
+ if (ini.exists()) {
+ if (ini2.exists() && !ini2.equals(ini)) {
+ // this should not happen really
+ System.out.printf("Found both %s and %s - discarding the latter", ini.getAbsolutePath(), ini2.getAbsolutePath()); //$NON-NLS-1$
+ ini2.delete();
+ descriptor.removeFile(ini2);
+ }
+ } else if (ini2.exists()) {
+ ini = ini2;
+ } else
+ return;
+ }
+
+ StringBuffer buffer;
+ try {
+ buffer = readFile(ini);
+ } catch (IOException e) {
+ System.out.println("Impossible to brand ini file"); //$NON-NLS-1$
+ return;
+ }
+
+ if (iconName.length() > 0) {
+ int xdoc = scan(buffer, 0, XDOC_ICON);
+ if (xdoc != -1) {
+ String icns = XDOC_ICON_PREFIX + iconName;
+ buffer.replace(xdoc, xdoc + XDOC_ICON.length(), icns);
+ }
+ }
+
+ try {
+ transferStreams(new ByteArrayInputStream(buffer.toString().getBytes()), new FileOutputStream(targetFile));
+ if (!ini.equals(targetFile)) {
+ ini.delete();
+ descriptor.replace(ini, 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(ExecutablesDescriptor descriptor, File initialRoot, File 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 {
+ replacePlistValue(buffer, MARKER_KEY, name);
+ }
+
+ int bundlePos = scan(buffer, 0, BUNDLE_NAME);
+ if (bundlePos != -1)
+ buffer.replace(bundlePos, bundlePos + BUNDLE_NAME.length(), name);
+ else {
+ replacePlistValue(buffer, BUNDLE_KEY, name);
+ }
+
+ replacePlistValue(buffer, BUNDLE_ID_KEY, id);
+ replacePlistValue(buffer, BUNDLE_INFO_KEY, description);
+ if (version != null) {
+ // CFBundleShortVersionString is to be 3 segments only
+ // http://developer.apple.com/library/mac/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-111349
+ StringBuffer sv = new StringBuffer(version.getSegment(0).toString());
+ sv.append('.');
+ sv.append(version.getSegmentCount() > 1 ? version.getSegment(1).toString() : "0"); //$NON-NLS-1$
+ sv.append('.');
+ sv.append(version.getSegmentCount() > 2 ? version.getSegment(2).toString() : "0"); //$NON-NLS-1$
+ replacePlistValue(buffer, BUNDLE_VERSION_KEY, version.toString());
+ replacePlistValue(buffer, BUNDLE_SHORT_VERSION_KEY, sv.toString());
+ }
+
+ int iconPos = scan(buffer, 0, ICON_NAME);
+ if (iconPos != -1)
+ buffer.replace(iconPos, iconPos + ICON_NAME.length(), iconName);
+ else {
+ replacePlistValue(buffer, ICON_KEY, iconName);
+ }
+
+ File target = new File(targetRoot, "Info.plist"); //$NON-NLS-1$;
+ try {
+ 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
+ }
+ descriptor.replace(infoPList, target);
+ }
+
+ private void replacePlistValue(StringBuffer buffer, String key, String value) {
+ if (value == null) {
+ return;
+ }
+ int exePos = scan(buffer, 0, key);
+ if (exePos != -1) {
+ int start = scan(buffer, exePos + 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, value);
+ }
+ }
+ }
+
+ 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;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public void setVersion(Version version) {
+ this.version = version;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+}
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.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/DataLoader.java
index b6244ce8b..1f2838e31 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/DataLoader.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/DataLoader.java
@@ -19,9 +19,9 @@ import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFilePa
import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl;
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
+import org.eclipse.pde.internal.publishing.Activator;
import org.osgi.framework.Constants;
public class DataLoader {
@@ -36,7 +36,7 @@ public class DataLoader {
private static final String ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL = "org.eclipse.equinox.simpleconfigurator.configUrl"; //$NON-NLS-1$
private Manipulator manipulator;
- private File configurationLocation;
+ private final File configurationLocation;
/**
*
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.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ExecutablesDescriptor.java
index e10b6c502..104667fe5 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ExecutablesDescriptor.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ExecutablesDescriptor.java
@@ -17,9 +17,9 @@ import java.util.Set;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
import org.eclipse.equinox.p2.publisher.AbstractPublisherAction;
import org.eclipse.osgi.service.environment.Constants;
+import org.eclipse.pde.internal.publishing.Activator;
public class ExecutablesDescriptor {
@@ -27,7 +27,7 @@ public class ExecutablesDescriptor {
private Set<File> files;
private String executableName;
private boolean temporary = false;
- private String os;
+ private final String os;
private File iniFile;
public static File findExecutable(String os, File root, String baseName) {
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.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureManifestParser.java
index 3e51ed23a..3802959b2 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureManifestParser.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureManifestParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,17 +8,22 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Cloudsmith Inc - split into FeatureParser and FeatureManifestParser
+ * SAP AG - consolidation of publishers for PDE formats
*******************************************************************************/
package org.eclipse.equinox.internal.p2.publisher.eclipse;
-import java.io.*;
+import java.io.IOException;
+import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import javax.xml.parsers.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.p2.metadata.VersionRange;
import org.eclipse.equinox.p2.publisher.eclipse.Feature;
import org.eclipse.equinox.p2.publisher.eclipse.FeatureEntry;
import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.publishing.*;
import org.xml.sax.*;
import org.xml.sax.helpers.DefaultHandler;
@@ -32,8 +37,10 @@ public class FeatureManifestParser extends DefaultHandler {
protected Feature result;
private URL url;
private StringBuffer characters = null;
+ private MultiStatus status = null;
+ private final boolean hasImports = false;
- private List<String> messageKeys = new ArrayList<String>();
+ private final List<String> messageKeys = new ArrayList<String>();
public FeatureManifestParser() {
this(true);
@@ -53,6 +60,7 @@ public class FeatureManifestParser extends DefaultHandler {
}
}
+ @Override
public void characters(char[] ch, int start, int length) {
if (characters == null)
return;
@@ -63,7 +71,11 @@ public class FeatureManifestParser extends DefaultHandler {
return new Feature(id, version);
}
+ @Override
public void endElement(String uri, String localName, String qName) {
+ if ("requires".equals(localName) && !hasImports) { //$NON-NLS-1$
+ error(Messages.feature_parse_emptyRequires);
+ }
if (characters == null)
return;
if ("description".equals(localName)) { //$NON-NLS-1$
@@ -76,6 +88,22 @@ public class FeatureManifestParser extends DefaultHandler {
characters = null;
}
+ private void error(String message) {
+ if (status == null) {
+ String msg = NLS.bind(Messages.exception_featureParse, url.toExternalForm());
+ status = new MultiStatus(Activator.ID, Constants.EXCEPTION_FEATURE_PARSE, msg, null);
+ }
+ status.add(new Status(IStatus.ERROR, Activator.ID, Constants.EXCEPTION_FEATURE_PARSE, message, null));
+ }
+
+ public MultiStatus getStatus() {
+ return status;
+ }
+
+ public List<String> getMessageKeys() {
+ return messageKeys;
+ }
+
public Feature getResult() {
return result;
}
@@ -92,22 +120,13 @@ public class FeatureManifestParser extends DefaultHandler {
* Parse the given input stream and return a feature object
* or null.
*/
- public Feature parse(InputStream in) {
+ public Feature parse(InputStream in, URL featureURL) throws SAXException, IOException {
result = null;
- try {
- parser.parse(new InputSource(in), this);
- } catch (SAXException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
+ url = featureURL;
+ parser.parse(new InputSource(in), this);
return result;
}
- public List<String> getMessageKeys() {
- return messageKeys;
- }
-
private void processCopyright(Attributes attributes) {
result.setCopyrightURL(attributes.getValue("url")); //$NON-NLS-1$
characters = new StringBuffer();
@@ -131,7 +150,7 @@ public class FeatureManifestParser extends DefaultHandler {
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})));
+ error(NLS.bind(Messages.feature_parse_invalidIdOrVersion, (new String[] {id, ver})));
} else {
result = createFeature(id, ver);
@@ -142,23 +161,16 @@ public class FeatureManifestParser extends DefaultHandler {
result.setEnvironment(os, ws, arch, nl);
result.setApplication(attributes.getValue("application")); //$NON-NLS-1$
- result.setPlugin(attributes.getValue("plugin")); //$NON-NLS-1$
+ result.setBrandingPlugin(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$
+ result.setLicenseFeature(attributes.getValue("license-feature")); //$NON-NLS-1$
+ result.setLicenseFeatureVersion(attributes.getValue("license-feature-version")); //$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$
}
@@ -166,26 +178,35 @@ public class FeatureManifestParser extends DefaultHandler {
private void processImport(Attributes attributes) {
String id = attributes.getValue("feature"); //$NON-NLS-1$
+ boolean isPlugin = false;
+ if (id == null) {
+ id = attributes.getValue("plugin"); //$NON-NLS-1$
+ if (id == null)
+ throw new IllegalStateException();
+ isPlugin = true;
+ }
+ String versionStr = attributes.getValue("version"); //$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$
- }
+ if ("versionRange".equals(attributes.getValue("match"))) { //$NON-NLS-1$//$NON-NLS-2$
+ VersionRange versionRange = new VersionRange(versionStr);
+ entry = FeatureEntry.createRequires(id, versionRange, attributes.getValue("match"), attributes.getValue("filter"), isPlugin); //$NON-NLS-1$ //$NON-NLS-2$
} 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$
+ entry = FeatureEntry.createRequires(id, versionStr, attributes.getValue("match"), attributes.getValue("filter"), isPlugin); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ if (!isPlugin && "true".equalsIgnoreCase(attributes.getValue("patch"))) { //$NON-NLS-1$ //$NON-NLS-2$
+ entry.setPatch(true);
}
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());
+ String unpack = attributes.getValue("unpack"); //$NON-NLS-1$
+ if (unpack != null)
+ entry.setUnpack(Boolean.valueOf(unpack).booleanValue());
+ String optional = attributes.getValue("optional"); //$NON-NLS-1$
+ if (optional != null)
+ entry.setOptional(Boolean.valueOf(optional).booleanValue());
setEnvironment(attributes, entry);
String filter = attributes.getValue("filter"); //$NON-NLS-1$
if (filter != null)
@@ -209,7 +230,7 @@ public class FeatureManifestParser extends DefaultHandler {
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$
+ error(NLS.bind(Messages.feature_parse_invalidIdOrVersion, (new String[] {id, version})));
} else {
FeatureEntry plugin = new FeatureEntry(id, version, true);
setEnvironment(attributes, plugin);
@@ -241,6 +262,7 @@ public class FeatureManifestParser extends DefaultHandler {
entry.setEnvironment(os, ws, arch, nl);
}
+ @Override
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$
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.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureParser.java
index 08fd6a805..1d0d92c4b 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureParser.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureParser.java
@@ -8,28 +8,36 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Cloudsmith Inc - split into FeatureParser and FeatureManifestParser
+ * SAP AG - consolidation of publishers for PDE formats
*******************************************************************************/
package org.eclipse.equinox.internal.p2.publisher.eclipse;
-import java.io.*;
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
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;
+import org.eclipse.pde.internal.publishing.Activator;
+import org.xml.sax.SAXException;
/**
* 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 {
+public class FeatureParser {
- private FeatureManifestParser parser = new FeatureManifestParser();
+ private final FeatureManifestParser parser = new FeatureManifestParser();
/**
* Parses the specified location and constructs a feature. The given location
@@ -49,7 +57,7 @@ public class FeatureParser extends DefaultHandler {
InputStream input = null;
try {
input = new BufferedInputStream(new FileInputStream(file));
- feature = parser.parse(input);
+ feature = parser.parse(input, toURL(location));
if (feature != null) {
List<String> messageKeys = parser.getMessageKeys();
String[] keyStrings = messageKeys.toArray(new String[messageKeys.size()]);
@@ -57,6 +65,10 @@ public class FeatureParser extends DefaultHandler {
}
} catch (FileNotFoundException e) {
return null;
+ } catch (SAXException e) {
+ logWarning(location, e);
+ } catch (IOException e) {
+ logWarning(location, e);
} finally {
if (input != null)
try {
@@ -74,16 +86,18 @@ public class FeatureParser extends DefaultHandler {
return null;
InputStream input = new BufferedInputStream(jar.getInputStream(entry));
- feature = parser.parse(input);
+ feature = parser.parse(input, toURL(location));
if (feature != null) {
List<String> messageKeys = parser.getMessageKeys();
String[] keyStrings = messageKeys.toArray(new String[messageKeys.size()]);
feature.setLocalizations(LocalizationHelper.getJarPropertyLocalizations(location, "feature", null, keyStrings)); //$NON-NLS-1$
}
+ } catch (SAXException e) {
+ logWarning(location, e);
} catch (IOException e) {
- e.printStackTrace();
+ logWarning(location, e);
} catch (SecurityException e) {
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Exception parsing feature: " + location.getAbsolutePath(), e)); //$NON-NLS-1$
+ logWarning(location, e);
} finally {
try {
if (jar != null)
@@ -95,4 +109,17 @@ public class FeatureParser extends DefaultHandler {
}
return feature;
}
+
+ private static void logWarning(File location, Exception exception) {
+ LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Exception parsing feature: " + location.getAbsolutePath(), exception)); //$NON-NLS-1$
+ }
+
+ private static URL toURL(File location) {
+ try {
+ return location.toURI().toURL();
+ } catch (MalformedURLException e) {
+ // not known to happen
+ throw new RuntimeException(e);
+ }
+ }
}
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.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/GeneratorBundleInfo.java
index 4c55a27f0..4c55a27f0 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/GeneratorBundleInfo.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/GeneratorBundleInfo.java
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.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java
index 56b46abab..d37be68f6 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java
@@ -119,6 +119,11 @@ public interface IProductDescriptor {
public File getLocation();
/**
+ * Determines if the launchers should be included in the published product
+ */
+ public boolean includeLaunchers();
+
+ /**
* Returns the license URL for this product
*/
public String getLicenseURL();
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.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
index c35c1d8e4..d1253819c 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -9,39 +9,65 @@
* IBM Corporation - initial API and implementation
* Code 9 - Additional function and fixes
* EclipseSource - ongoing development
+ * Felix Riegger (SAP AG) - consolidation of publishers for PDE formats (bug 331974)
*******************************************************************************/
package org.eclipse.equinox.internal.p2.publisher.eclipse;
-import java.io.*;
-import java.util.*;
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.p2.metadata.VersionedId;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
+import org.eclipse.equinox.internal.p2.core.helpers.URLUtil;
import org.eclipse.equinox.p2.metadata.IVersionedId;
+import org.eclipse.equinox.p2.metadata.VersionedId;
+import org.eclipse.equinox.p2.publisher.eclipse.FeatureEntry;
import org.eclipse.osgi.service.datalocation.Location;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.publishing.Activator;
+import org.eclipse.pde.internal.publishing.Messages;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
/**
* Used to parse a .product file.
*/
public class ProductFile extends DefaultHandler implements IProductDescriptor {
+ public final static String GENERIC_VERSION_NUMBER = "0.0.0"; //$NON-NLS-1$
+
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$
+ protected static final String ATTRIBUTE_FRAGMENT = "fragment"; //$NON-NLS-1$
private static final String ATTRIBUTE_APPLICATION = "application"; //$NON-NLS-1$
+ private static final String ATTRIBUTE_INCLUDE_LAUNCHERS = "includeLaunchers"; //$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$
+ protected static final String ATTRIBUTE_VERSION = "version"; //$NON-NLS-1$
+ protected static final String ATTRIBUTE_ID = "id"; //$NON-NLS-1$
private static final String ATTRIBUTE_UID = "uid"; //$NON-NLS-1$
private static final String PROPERTY_ECLIPSE_APPLICATION = "eclipse.application"; //$NON-NLS-1$
@@ -116,12 +142,16 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
private static final int STATE_LICENSE_URL = 19;
private static final int STATE_LICENSE_TEXT = 20;
+ private static final String PI_PDEBUILD = "org.eclipse.pde.build"; //$NON-NLS-1$
+ private final static int EXCEPTION_PRODUCT_FORMAT = 23;
+ private final static int EXCEPTION_PRODUCT_FILE = 24;
+
private int state = STATE_START;
private SAXParser parser;
private String launcherName = null;
// private boolean useIco = false;
- private Map<String, Collection<String>> icons = new HashMap<String, Collection<String>>(6);
+ private final Map<String, Collection<String>> icons = new HashMap<String, Collection<String>>(6);
private String configPath = null;
private final Map<String, String> platformSpecificConfigPaths = new HashMap<String, String>();
private String configPlatform = null;
@@ -129,19 +159,21 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
private String id = null;
private String uid = null;
private boolean useFeatures = false;
- private List<IVersionedId> plugins = null;
- private List<IVersionedId> fragments = null;
- private List<IVersionedId> features = null;
+ protected List<FeatureEntry> plugins = new ArrayList<FeatureEntry>();
+ protected List<FeatureEntry> fragments = new ArrayList<FeatureEntry>();
+ private final List<FeatureEntry> features = new ArrayList<FeatureEntry>();
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 final File location;
private List<BundleInfo> bundleInfos;
private Map<String, String> properties;
+ private boolean includeLaunchers = true;
private String licenseURL;
private String licenseText = null;
+ private String currentOS;
private static String normalize(String text) {
if (text == null || text.trim().length() == 0)
@@ -164,6 +196,34 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
return result.toString();
}
+ public ProductFile(String location, String os) throws CoreException {
+ super();
+ this.currentOS = os;
+ this.location = new File(location);
+ try {
+ parserFactory.setNamespaceAware(true);
+ parser = parserFactory.newSAXParser();
+ InputStream in = new BufferedInputStream(new FileInputStream(location));
+ try {
+ parser.parse(new InputSource(in), this);
+ } finally {
+ try {
+ in.close();
+ } catch (IOException e) {
+ // ignore exception on close (as it was done by Utils.close() before)
+ }
+ }
+ } catch (ParserConfigurationException e) {
+ throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_PRODUCT_FORMAT, NLS.bind(Messages.exception_productParse, location), e));
+ } catch (SAXException e) {
+ throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_PRODUCT_FORMAT, NLS.bind(Messages.exception_productParse, location), e));
+ } catch (FileNotFoundException e) {
+ throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_PRODUCT_FILE, NLS.bind(Messages.exception_missingElement, location), null));
+ } catch (IOException e) {
+ throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_PRODUCT_FORMAT, NLS.bind(Messages.exception_productParse, location), e));
+ }
+ }
+
/**
* Constructs a product file parser.
*/
@@ -177,8 +237,7 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
try {
parser.parse(new InputSource(in), this);
} finally {
- if (in != null)
- in.close();
+ in.close();
}
parser = null;
}
@@ -217,19 +276,27 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
* be included in the list
*/
public List<IVersionedId> getBundles(boolean includeFragments) {
- List<IVersionedId> p = plugins != null ? plugins : CollectionUtils.<IVersionedId> emptyList();
- if (!includeFragments)
- return p;
+ List<IVersionedId> result = new LinkedList<IVersionedId>();
- List<IVersionedId> f = fragments != null ? fragments : CollectionUtils.<IVersionedId> emptyList();
- int size = p.size() + f.size();
- if (size == 0)
- return CollectionUtils.emptyList();
+ for (FeatureEntry plugin : plugins) {
+ result.add(new VersionedId(plugin.getId(), plugin.getVersion()));
+ }
- List<IVersionedId> both = new ArrayList<IVersionedId>(size);
- both.addAll(p);
- both.addAll(f);
- return both;
+ if (includeFragments) {
+ for (FeatureEntry fragment : fragments) {
+ result.add(new VersionedId(fragment.getId(), fragment.getVersion()));
+ }
+ }
+
+ return result;
+ }
+
+ private List<FeatureEntry> getBundleEntries(boolean includeFragments) {
+ List<FeatureEntry> result = new LinkedList<FeatureEntry>();
+ result.addAll(plugins);
+ if (includeFragments)
+ result.addAll(fragments);
+ return result;
}
/**
@@ -245,20 +312,47 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
* Returns a list<VersionedName> of fragments that constitute this product.
*/
public List<IVersionedId> getFragments() {
- return fragments != null ? fragments : CollectionUtils.<IVersionedId> emptyList();
+ List<IVersionedId> result = new LinkedList<IVersionedId>();
+
+ for (FeatureEntry fragment : fragments) {
+ result.add(new VersionedId(fragment.getId(), fragment.getVersion()));
+ }
+
+ return result;
}
/**
* Returns a List<VersionedName> of features that constitute this product.
*/
public List<IVersionedId> getFeatures() {
- return features != null ? features : CollectionUtils.<IVersionedId> emptyList();
+ List<IVersionedId> result = new LinkedList<IVersionedId>();
+
+ for (FeatureEntry feature : features) {
+ result.add(new VersionedId(feature.getId(), feature.getVersion()));
+ }
+
+ return result;
+ }
+
+ public List<FeatureEntry> getProductEntries() {
+ if (useFeatures()) {
+ return features;
+ }
+ return getBundleEntries(true);
+ }
+
+ public boolean containsPlugin(String plugin) {
+ return getBundles(true).contains(plugin);
+ }
+
+ public String[] getIcons() {
+ return getIcons(currentOS);
}
public String[] getIcons(String os) {
Collection<String> result = icons.get(os);
if (result == null)
- return null;
+ return new String[0];
return result.toArray(new String[result.size()]);
}
@@ -271,6 +365,10 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
return configPath;
}
+ public boolean haveCustomConfig() {
+ return configPath != null || platformSpecificConfigPaths.size() > 0;
+ }
+
/**
* Returns the ID for this product.
*/
@@ -320,6 +418,26 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
return (version == null || version.length() == 0) ? "0.0.0" : version; //$NON-NLS-1$
}
+ public boolean includeLaunchers() {
+ return includeLaunchers;
+ }
+
+ public Map<String, BundleInfo> getConfigurationInfo() {
+ Map<String, BundleInfo> result = new HashMap<String, BundleInfo>();
+ for (BundleInfo info : getBundleInfos()) {
+ result.put(info.getSymbolicName(), info);
+ }
+ return result;
+ }
+
+ public Properties getConfigProperties() {
+ Properties props = new Properties();
+ for (Entry<String, String> property : getConfigurationProperties().entrySet()) {
+ props.setProperty(property.getKey(), property.getValue());
+ }
+ return props;
+ }
+
/**
* Returns the VM arguments for a specific platform.
* If the empty string is used for the OS, this returns
@@ -386,6 +504,7 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
return licenseURL;
}
+ @Override
public void startElement(String uri, String localName, String qName, Attributes attributes) {
switch (state) {
case STATE_START :
@@ -527,6 +646,7 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
bundleInfos.add(info);
}
+ @Override
public void endElement(String uri, String localName, String qName) {
switch (state) {
case STATE_PLUGINS :
@@ -580,6 +700,7 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
}
}
+ @Override
public void characters(char[] ch, int start, int length) {
switch (state) {
case STATE_PROGRAM_ARGS :
@@ -638,25 +759,27 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
launcherArgs.setProperty(key, value);
}
- private void processPlugin(Attributes attributes) {
+ protected void processPlugin(Attributes attributes) {
String fragment = attributes.getValue(ATTRIBUTE_FRAGMENT);
- IVersionedId name = new VersionedId(attributes.getValue(ATTRIBUTE_ID), attributes.getValue(ATTRIBUTE_VERSION));
+ String pluginId = attributes.getValue(ATTRIBUTE_ID);
+ String pluginVersion = attributes.getValue(ATTRIBUTE_VERSION);
+
+ FeatureEntry entry = new FeatureEntry(pluginId, pluginVersion != null ? pluginVersion : GENERIC_VERSION_NUMBER, true);
+ entry.setFragment(Boolean.valueOf(fragment).booleanValue());
+
if (fragment != null && new Boolean(fragment).booleanValue()) {
- if (fragments == null)
- fragments = new ArrayList<IVersionedId>();
- fragments.add(name);
+ fragments.add(entry);
} else {
- if (plugins == null)
- plugins = new ArrayList<IVersionedId>();
- plugins.add(name);
+ plugins.add(entry);
}
}
private void processFeature(Attributes attributes) {
- IVersionedId name = new VersionedId(attributes.getValue(ATTRIBUTE_ID), attributes.getValue(ATTRIBUTE_VERSION));
- if (features == null)
- features = new ArrayList<IVersionedId>();
- features.add(name);
+ String featureId = attributes.getValue(ATTRIBUTE_ID);
+ String featureVersion = attributes.getValue(ATTRIBUTE_VERSION);
+ FeatureEntry featureEntry = new FeatureEntry(featureId, featureVersion != null ? featureVersion : GENERIC_VERSION_NUMBER, false);
+
+ features.add(featureEntry);
}
private void processProduct(Attributes attributes) {
@@ -664,6 +787,8 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
uid = attributes.getValue(ATTRIBUTE_UID);
productName = attributes.getValue(ATTRIBUTE_NAME);
application = attributes.getValue(ATTRIBUTE_APPLICATION);
+ if (attributes.getIndex(ATTRIBUTE_INCLUDE_LAUNCHERS) >= 0)
+ includeLaunchers = Boolean.valueOf(attributes.getValue(ATTRIBUTE_INCLUDE_LAUNCHERS));
String use = attributes.getValue("useFeatures"); //$NON-NLS-1$
if (use != null)
useFeatures = Boolean.valueOf(use).booleanValue();
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/AccumulateConfigDataAction.java
index a1353770c..a1353770c 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AccumulateConfigDataAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/AccumulateConfigDataAction.java
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileAdvice.java
index b1ab0c1cd..878ece708 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileAdvice.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileAdvice.java
@@ -10,9 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.p2.publisher.eclipse;
-import org.eclipse.equinox.p2.metadata.MetadataFactory;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
import java.io.*;
import java.util.Map;
import java.util.zip.ZipEntry;
@@ -20,18 +17,19 @@ import java.util.zip.ZipFile;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.publisher.AbstractAdvice;
import org.eclipse.equinox.p2.publisher.actions.*;
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.pde.internal.publishing.Activator;
/**
* 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 {
+public class AdviceFileAdvice extends AbstractAdvice implements ITouchpointAdvice, ICapabilityAdvice, IUpdateDescriptorAdvice, IPropertyAdvice, IAdditionalInstallableUnitAdvice {
/**
* The location of the bundle advice file, relative to the bundle root location.
@@ -47,6 +45,7 @@ public class AdviceFileAdvice extends AbstractAdvice implements ITouchpointAdvic
private IRequirement[] metaRequiredCapabilities;
private Map<String, String> iuProperties;
private InstallableUnitDescription[] additionalIUs;
+ private IUpdateDescriptor updateDescriptor;
private boolean containsAdvice = false;
/**
@@ -89,6 +88,7 @@ public class AdviceFileAdvice extends AbstractAdvice implements ITouchpointAdvic
metaRequiredCapabilities = parser.getMetaRequiredCapabilities();
iuProperties = parser.getProperties();
additionalIUs = parser.getAdditionalInstallableUnitDescriptions();
+ updateDescriptor = parser.getUpdateDescriptor();
containsAdvice = true;
}
@@ -142,6 +142,7 @@ public class AdviceFileAdvice extends AbstractAdvice implements ITouchpointAdvic
}
}
+ @Override
public boolean isApplicable(String configSpec, boolean includeDefault, String candidateId, Version candidateVersion) {
return id.equals(candidateId) && version.equals(candidateVersion);
}
@@ -169,6 +170,10 @@ public class AdviceFileAdvice extends AbstractAdvice implements ITouchpointAdvic
return additionalIUs;
}
+ public IUpdateDescriptor getUpdateDescriptor(InstallableUnitDescription iu) {
+ return updateDescriptor;
+ }
+
public Map<String, String> getArtifactProperties(IInstallableUnit iu, IArtifactDescriptor descriptor) {
return null;
}
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileParser.java
index 703c7c549..c2d5ce782 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileParser.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileParser.java
@@ -57,6 +57,7 @@ public class AdviceFileParser {
private static final String LICENSES_PREFIX = "licenses."; //$NON-NLS-1$
private static final String ARTIFACTS_PREFIX = "artifacts."; //$NON-NLS-1$
private static final String HOST_REQUIREMENTS_PREFIX = "hostRequirements."; //$NON-NLS-1$
+ private static final String UPDATE_DESCRIPTOR_PREFIX = "update."; //$NON-NLS-1$
public static final Version COMPATIBLE_VERSION = Version.createOSGi(1, 0, 0);
public static final VersionRange VERSION_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, Version.createOSGi(2, 0, 0), false);
@@ -65,17 +66,18 @@ public class AdviceFileParser {
private List<IProvidedCapability> adviceProvides = new ArrayList<IProvidedCapability>();
private List<IRequirement> adviceRequires = new ArrayList<IRequirement>();
private List<IRequirement> adviceMetaRequires = new ArrayList<IRequirement>();
+ private IUpdateDescriptor adviceUpdateDescriptor = null;
private Map<String, ITouchpointInstruction> adviceInstructions = new HashMap<String, ITouchpointInstruction>();
private List<InstallableUnitDescription> adviceOtherIUs = new ArrayList<InstallableUnitDescription>();
private final Map<String, String> advice;
private Iterator<String> keysIterator;
private String current;
- // private String hostId; not currently used
+ private String hostId;
private Version hostVersion;
public AdviceFileParser(String id, Version version, Map<String, String> advice) {
- // this.hostId = id; not currently used
+ this.hostId = id;
this.hostVersion = version;
this.advice = advice;
}
@@ -94,6 +96,8 @@ public class AdviceFileParser {
while (current != null) {
if (current.startsWith(PROPERTIES_PREFIX))
parseProperties(PROPERTIES_PREFIX, adviceProperties);
+ else if (current.startsWith(UPDATE_DESCRIPTOR_PREFIX))
+ this.adviceUpdateDescriptor = parseUpdateDescriptor(UPDATE_DESCRIPTOR_PREFIX, hostId);
else if (current.startsWith(PROVIDES_PREFIX))
parseProvides(PROVIDES_PREFIX, adviceProvides);
else if (current.startsWith(REQUIRES_PREFIX))
@@ -155,6 +159,33 @@ public class AdviceFileParser {
properties.put(propertyName, propertyValue);
}
+ private IUpdateDescriptor parseUpdateDescriptor(String prefix, String id) {
+ String name = id;
+ String description = null;
+ String range = "[0.0.0,$version$)"; //$NON-NLS-1$
+ String severity = "0"; //$NON-NLS-1$
+
+ while (current != null && current.startsWith(prefix)) {
+ String token = current;
+ if (token.equals(UPDATE_ID)) {
+ name = currentValue();
+ } else if (token.equals(UPDATE_DESCRIPTION)) {
+ description = currentValue();
+ } else if (token.equals(UPDATE_RANGE)) {
+ range = currentValue();
+ } else if (token.equals(UPDATE_SEVERITY)) {
+ severity = currentValue();
+ } else {
+ // ignore
+ }
+ next();
+ }
+
+ range = substituteVersionAndQualifier(range);
+ VersionRange versionRange = new VersionRange(range);
+ return MetadataFactory.createUpdateDescriptor(name, versionRange, Integer.valueOf(severity), description);
+ }
+
private void parseProvides(String prefix, List<IProvidedCapability> provides) {
while (current != null && current.startsWith(prefix)) {
int dotIndex = current.indexOf('.', prefix.length());
@@ -534,6 +565,10 @@ public class AdviceFileParser {
return adviceProvides.toArray(new IProvidedCapability[adviceProvides.size()]);
}
+ public IUpdateDescriptor getUpdateDescriptor() {
+ return adviceUpdateDescriptor;
+ }
+
public Map<String, ITouchpointInstruction> getTouchpointInstructions() {
if (adviceInstructions.isEmpty())
return null;
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java
index 3c5497a5a..82c20b65d 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java
@@ -10,18 +10,15 @@
******************************************************************************/
package org.eclipse.equinox.p2.publisher.eclipse;
-import org.eclipse.equinox.p2.metadata.MetadataFactory;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
-import org.eclipse.equinox.p2.query.QueryUtil;
-
import java.io.File;
import java.util.*;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.publisher.eclipse.ExecutablesDescriptor;
import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.publisher.*;
import org.eclipse.equinox.p2.publisher.actions.VersionAdvice;
+import org.eclipse.equinox.p2.query.QueryUtil;
/**
* Create IUs and CUs that represent the entire launcher for an application. This includes
@@ -30,12 +27,12 @@ import org.eclipse.equinox.p2.publisher.actions.VersionAdvice;
*/
public class ApplicationLauncherAction extends AbstractPublisherAction {
- private String flavor;
- private String[] configSpecs;
- private File location;
- private String executableName;
- private Version version;
- private String id;
+ private final String flavor;
+ private final String[] configSpecs;
+ private final File location;
+ private final String executableName;
+ private final Version version;
+ private final String id;
/**
* Returns the id of the top level IU published by this action for the given id and flavor.
@@ -56,6 +53,7 @@ public class ApplicationLauncherAction extends AbstractPublisherAction {
this.location = location;
}
+ @Override
public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
// Create the basic actions and run them putting the IUs in a temporary result
Collection<IPublisherAction> actions = createActions(publisherInfo);
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundleShapeAdvice.java
index 510da514e..510da514e 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundleShapeAdvice.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundleShapeAdvice.java
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java
index d59813da5..8a3068078 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others. All rights reserved. This
+ * Copyright (c) 2008, 2010 Code 9 and others. All rights reserved. This
* program and the accompanying materials are made available under the terms of
* the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@@ -21,7 +21,6 @@ import org.eclipse.equinox.frameworkadmin.BundleInfo;
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
import org.eclipse.equinox.internal.p2.publisher.Messages;
import org.eclipse.equinox.internal.p2.publisher.eclipse.GeneratorBundleInfo;
import org.eclipse.equinox.p2.metadata.*;
@@ -42,6 +41,7 @@ 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.eclipse.pde.internal.publishing.Activator;
import org.osgi.framework.*;
import org.osgi.service.packageadmin.PackageAdmin;
@@ -85,7 +85,7 @@ public class BundlesAction extends AbstractPublisherAction {
public static final IProvidedCapability BUNDLE_CAPABILITY = MetadataFactory.createProvidedCapability(PublisherHelper.NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, Version.createOSGi(1, 0, 0));
public static final IProvidedCapability SOURCE_BUNDLE_CAPABILITY = MetadataFactory.createProvidedCapability(PublisherHelper.NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_SOURCE, Version.createOSGi(1, 0, 0));
- static final String DEFAULT_BUNDLE_LOCALIZATION = "plugin"; //$NON-NLS-1$
+ static final String DEFAULT_BUNDLE_LOCALIZATION = "OSGI-INF/l10n/bundle"; //$NON-NLS-1$
private static final String[] BUNDLE_IU_PROPERTY_MAP = {Constants.BUNDLE_NAME, IInstallableUnit.PROP_NAME, Constants.BUNDLE_DESCRIPTION, IInstallableUnit.PROP_DESCRIPTION, Constants.BUNDLE_VENDOR, IInstallableUnit.PROP_PROVIDER, Constants.BUNDLE_CONTACTADDRESS, IInstallableUnit.PROP_CONTACT, Constants.BUNDLE_DOCURL, IInstallableUnit.PROP_DOC_URL, Constants.BUNDLE_UPDATELOCATION, IInstallableUnit.PROP_BUNDLE_LOCALIZATION, Constants.BUNDLE_LOCALIZATION, IInstallableUnit.PROP_BUNDLE_LOCALIZATION};
public static final int BUNDLE_LOCALIZATION_INDEX = PublisherHelper.BUNDLE_LOCALIZED_PROPERTIES.length - 1;
@@ -116,8 +116,8 @@ public class BundlesAction extends AbstractPublisherAction {
Version hostVersion = Version.parseVersion(configInfo.getVersion());
VersionRange range = hostVersion == Version.emptyVersion ? VersionRange.emptyRange : new VersionRange(hostVersion, true, Version.MAX_VERSION, true);
cu.setHost(new IRequirement[] { //
- MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, hostId, range, null, false, false, true), //
- MetadataFactory.createRequirement(PublisherHelper.NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, new VersionRange(Version.createOSGi(1, 0, 0), true, Version.createOSGi(2, 0, 0), false), null, false, false, false)});
+ MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, hostId, range, null, false, false, true), //
+ MetadataFactory.createRequirement(PublisherHelper.NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, new VersionRange(Version.createOSGi(1, 0, 0), true, Version.createOSGi(2, 0, 0), false), null, false, false, false)});
//Adds capabilities for fragment, self, and describing the flavor supported
cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
@@ -205,6 +205,7 @@ public class BundlesAction extends AbstractPublisherAction {
}
}
iu.setCapabilities(providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
+ processUpdateDescriptorAdvice(iu, info);
processCapabilityAdvice(iu, info);
// Set certain properties from the manifest header attributes as IU properties.
@@ -248,10 +249,9 @@ public class BundlesAction extends AbstractPublisherAction {
private IInstallableUnitFragment createHostLocalizationFragment(IInstallableUnit bundleIU, BundleDescription bd, String hostId, String[] hostBundleManifestValues) {
Map<Locale, Map<String, String>> hostLocalizations = getHostLocalizations(new File(bd.getLocation()), hostBundleManifestValues);
- if (hostLocalizations != null) {
- return createLocalizationFragmentOfHost(bd, hostId, hostBundleManifestValues, hostLocalizations);
- }
- return null;
+ if (hostLocalizations == null || hostLocalizations.isEmpty())
+ return null;
+ return createLocalizationFragmentOfHost(bd, hostId, hostBundleManifestValues, hostLocalizations);
}
/*
@@ -378,12 +378,17 @@ public class BundlesAction extends AbstractPublisherAction {
if (p == null)
return null;
StringBuffer result = new StringBuffer();
- for (Entry<String, String> aProperty : p.entrySet()) {
- if (aProperty.getKey().equals(BUNDLE_SHAPE))
- continue;
- result.append(aProperty.getKey()).append(": ").append(aProperty.getValue()).append('\n'); //$NON-NLS-1$
+ // See https://bugs.eclipse.org/329386. We are trying to reduce the size of the manifest data in
+ // the eclipse touchpoint. We've removed the code that requires it but in order for old clients
+ // to still be able to use recent repositories, we're going to keep around the manifest properties
+ // they need.
+ final String[] interestingKeys = new String[] {Constants.BUNDLE_SYMBOLICNAME, Constants.BUNDLE_VERSION, Constants.FRAGMENT_HOST};
+ for (String key : interestingKeys) {
+ String value = p.get(key);
+ if (value != null)
+ result.append(key).append(": ").append(value).append('\n'); //$NON-NLS-1$
}
- return result.toString();
+ return result.length() == 0 ? null : result.toString();
}
// Return a map from locale to property set for the manifest localizations
@@ -463,7 +468,6 @@ public class BundlesAction extends AbstractPublisherAction {
return (PluginConverter) ServiceHelper.getService(Activator.getContext(), PluginConverter.class.getName());
}
- @SuppressWarnings("unchecked")
private static Dictionary<String, String> convertPluginManifest(File bundleLocation, boolean logConversionException) {
PluginConverter converter;
try {
@@ -541,7 +545,6 @@ public class BundlesAction extends AbstractPublisherAction {
try {
if (manifestStream != null) {
try {
- @SuppressWarnings("unchecked")
Map<String, String> manifestMap = ManifestElement.parseBundleManifest(manifestStream, null);
// TODO temporary hack. We are reading a Map but everyone wants a Dictionary so convert.
// real answer is to have people expect a Map but that is a wider change.
@@ -585,6 +588,7 @@ public class BundlesAction extends AbstractPublisherAction {
this.bundles = bundles;
}
+ @Override
public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
if (bundles == null && locations == null)
throw new IllegalStateException(Messages.exception_noBundlesOrLocations);
@@ -594,7 +598,7 @@ public class BundlesAction extends AbstractPublisherAction {
try {
if (bundles == null)
bundles = getBundleDescriptions(expandLocations(locations), monitor);
- generateBundleIUs(bundles, results, monitor);
+ generateBundleIUs(bundles, publisherInfo, results, monitor);
bundles = null;
} catch (OperationCanceledException e) {
return Status.CANCEL_STATUS;
@@ -611,6 +615,7 @@ public class BundlesAction extends AbstractPublisherAction {
publishArtifact(descriptor, inclusions, null, publisherInfo, createRootPrefixComputer(base));
}
+ @Override
protected void publishArtifact(IArtifactDescriptor descriptor, File jarFile, IPublisherInfo publisherInfo) {
// no files to publish so this is done.
if (jarFile == null || publisherInfo == null)
@@ -660,7 +665,12 @@ public class BundlesAction extends AbstractPublisherAction {
}
}
+ //TODO remove this method
protected void generateBundleIUs(BundleDescription[] bundleDescriptions, IPublisherResult result, IProgressMonitor monitor) {
+ generateBundleIUs(bundleDescriptions, null, result, monitor);
+ }
+
+ protected void generateBundleIUs(BundleDescription[] bundleDescriptions, IPublisherInfo info, IPublisherResult result, IProgressMonitor monitor) {
// This assumes that hosts are processed before fragments because for each fragment the host
// is queried for the strings that should be translated.
@@ -680,7 +690,7 @@ public class BundlesAction extends AbstractPublisherAction {
}
File location = new File(bd.getLocation());
- IArtifactDescriptor ad = PublisherHelper.createArtifactDescriptor(info.getArtifactRepository(), key, location);
+ IArtifactDescriptor ad = PublisherHelper.createArtifactDescriptor(info, key, location);
processArtifactPropertiesAdvice(bundleIU, ad, info);
// Publish according to the shape on disk
@@ -797,7 +807,7 @@ public class BundlesAction extends AbstractPublisherAction {
// 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());
+ PackageAdmin packageAdmin = ServiceHelper.getService(Activator.getContext(), PackageAdmin.class);
if (packageAdmin == null)
return null;
Bundle[] matchingBundles = packageAdmin.getBundles(symbolicName, 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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigAdvice.java
index a095a5556..a095a5556 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigAdvice.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigAdvice.java
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java
index b99b1c8d0..3d77fdebf 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java
@@ -15,6 +15,7 @@ import java.util.*;
import java.util.Map.Entry;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.internal.p2.metadata.TouchpointInstruction;
import org.eclipse.equinox.internal.p2.publisher.eclipse.GeneratorBundleInfo;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
@@ -246,8 +247,12 @@ public class ConfigCUsAction extends AbstractPublisherAction {
String key = aProperty.getKey();
if (shouldPublishProperty(key) && !properties.contains(key)) {
properties.add(key);
- configurationData += "setProgramProperty(propName:" + key + ", propValue:" + aProperty.getValue() + ");"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- unconfigurationData += "setProgramProperty(propName:" + key + ", propValue:);"; //$NON-NLS-1$ //$NON-NLS-2$
+ Map<String, String> parameters = new LinkedHashMap<String, String>();
+ parameters.put("propName", key); //$NON-NLS-1$
+ parameters.put("propValue", aProperty.getValue()); //$NON-NLS-1$
+ configurationData += TouchpointInstruction.encodeAction("setProgramProperty", parameters); //$NON-NLS-1$
+ parameters.put("propValue", ""); //$NON-NLS-1$//$NON-NLS-2$
+ unconfigurationData += TouchpointInstruction.encodeAction("setProgramProperty", parameters); //$NON-NLS-1$
}
}
}
@@ -270,6 +275,7 @@ public class ConfigCUsAction extends AbstractPublisherAction {
String configurationData = ""; //$NON-NLS-1$
String unconfigurationData = ""; //$NON-NLS-1$
+ Map<String, String> touchpointParameters = new LinkedHashMap<String, String>();
Set<String> jvmSet = new HashSet<String>();
Set<String> programSet = new HashSet<String>();
for (IExecutableAdvice advice : launchingAdvice) {
@@ -277,16 +283,20 @@ public class ConfigCUsAction extends AbstractPublisherAction {
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$
+ touchpointParameters.clear();
+ touchpointParameters.put("jvmArg", jvmArgs[i]); //$NON-NLS-1$
+ configurationData += TouchpointInstruction.encodeAction("addJvmArg", touchpointParameters); //$NON-NLS-1$
+ unconfigurationData += TouchpointInstruction.encodeAction("removeJvmArg", touchpointParameters); //$NON-NLS-1$
}
String[] programArgs = advice.getProgramArguments();
for (int i = 0; i < programArgs.length; i++)
if (shouldPublishProgramArg(programArgs[i]) && !programSet.contains(programArgs[i])) {
if (programArgs[i].startsWith("-")) //$NON-NLS-1$
programSet.add(programArgs[i]);
- configurationData += "addProgramArg(programArg:" + programArgs[i] + ");"; //$NON-NLS-1$ //$NON-NLS-2$
- unconfigurationData += "removeProgramArg(programArg:" + programArgs[i] + ");"; //$NON-NLS-1$ //$NON-NLS-2$
+ touchpointParameters.clear();
+ touchpointParameters.put("programArg", programArgs[i]); //$NON-NLS-1$
+ configurationData += TouchpointInstruction.encodeAction("addProgramArg", touchpointParameters); //$NON-NLS-1$
+ unconfigurationData += TouchpointInstruction.encodeAction("removeProgramArg", touchpointParameters); //$NON-NLS-1$
} else if (i + 1 < programArgs.length && !programArgs[i + 1].startsWith("-")) { //$NON-NLS-1$
// if we are not publishing then skip over the following arg as it is assumed to be a parameter
// to this command line arg.
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/DefaultCUsAction.java
index 30734f329..30734f329 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/DefaultCUsAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/DefaultCUsAction.java
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/EclipseInstallAction.java
index 184714a01..184714a01 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EclipseInstallAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/EclipseInstallAction.java
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/EclipsePublisherHelper.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/EclipsePublisherHelper.java
new file mode 100644
index 000000000..07eeaf056
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/EclipsePublisherHelper.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.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
+# SAP AG - consolidation of publishers for PDE formats
+ *******************************************************************************/
+package org.eclipse.equinox.p2.publisher.eclipse;
+
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.Map.Entry;
+import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.publisher.IPublisherInfo;
+import org.eclipse.equinox.p2.publisher.PublisherInfo;
+import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+
+public class EclipsePublisherHelper {
+ public static IInstallableUnit[] createEclipseIU(BundleDescription bd, boolean isFolderPlugin, IArtifactKey key, Map<String, String> extraProperties) {
+ ArrayList<IInstallableUnit> iusCreated = new ArrayList<IInstallableUnit>(1);
+ IPublisherInfo info = new PublisherInfo();
+ String shape = isFolderPlugin ? IBundleShapeAdvice.DIR : IBundleShapeAdvice.JAR;
+ info.addAdvice(new BundleShapeAdvice(bd.getSymbolicName(), PublisherHelper.fromOSGiVersion(bd.getVersion()), shape));
+ IInstallableUnit iu = BundlesAction.createBundleIU(bd, key, info);
+ addExtraProperties(iu, extraProperties);
+ iusCreated.add(iu);
+ return (iusCreated.toArray(new IInstallableUnit[iusCreated.size()]));
+ }
+
+ private static void addExtraProperties(IInstallableUnit iiu, Map<String, String> extraProperties) {
+ if (iiu instanceof InstallableUnit) {
+ InstallableUnit iu = (InstallableUnit) iiu;
+
+ for (Entry<String, String> entry : extraProperties.entrySet()) {
+ iu.setProperty(entry.getKey(), entry.getValue());
+ }
+ }
+ }
+}
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java
index fe3e0b757..2b98a0b32 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java
@@ -59,6 +59,7 @@ public class EquinoxExecutableAction extends AbstractPublisherAction {
this.flavor = flavor;
}
+ @Override
public IStatus perform(IPublisherInfo publisherinfo, IPublisherResult result, IProgressMonitor monitor) {
setPublisherInfo(publisherinfo);
ExecutablesDescriptor brandedExecutables = brandExecutables(executables);
@@ -125,7 +126,7 @@ public class EquinoxExecutableAction extends AbstractPublisherAction {
} else {
IArtifactKey key = PublisherHelper.createBinaryArtifactKey(id, version);
iu.setArtifacts(new IArtifactKey[] {key});
- IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(info.getArtifactRepository(), key, null);
+ IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(info, key, null);
publishArtifact(descriptor, execDescriptor.getFiles(), null, info, createRootPrefixComputer(execDescriptor.getLocation()));
if (execDescriptor.isTemporary())
FileUtils.deleteAll(execDescriptor.getLocation());
@@ -217,16 +218,18 @@ public class EquinoxExecutableAction extends AbstractPublisherAction {
protected void fullBrandExecutables(ExecutablesDescriptor descriptor, IBrandingAdvice advice) {
BrandingIron iron = new BrandingIron();
+ iron.setId(idBase);
+ iron.setVersion(version);
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());
+ // FIXME: use product's aboutText as description?
+ // iron.setDescription(advice.getAboutText());
try {
- iron.brand();
- descriptor.setExecutableName(name, true);
+ iron.brand(descriptor);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxLauncherCUAction.java
index abcafe7ef..abcafe7ef 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxLauncherCUAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxLauncherCUAction.java
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/Feature.java
index b57f0eafa..441b89bec 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/Feature.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/Feature.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,22 +7,25 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * SAP AG - consolidation of publishers for PDE formats
*******************************************************************************/
package org.eclipse.equinox.p2.publisher.eclipse;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Locale;
+import java.util.Map;
/**
*
* Feature information
*/
-public class Feature {
+public class Feature implements IPlatformEntry {
private final String id;
private String version;
private String label;
private String image;
- private String pluginId;
+ private String brandingPlugin;
private boolean primary = false;
private boolean exclusive = false;
private String application;
@@ -30,6 +33,8 @@ public class Feature {
private URLEntry description;
private URLEntry license;
+ private String licenseFeature;
+ private String licenseFeatureVersion;
private URLEntry copyright;
private String installHandler;
@@ -82,6 +87,10 @@ public class Feature {
return arch;
}
+ public String getBrandingPlugin() {
+ return brandingPlugin;
+ }
+
public String getColocationAffinity() {
return colocationAffinity;
}
@@ -152,6 +161,14 @@ public class Feature {
return null;
}
+ public String getLicenseFeature() {
+ return licenseFeature;
+ }
+
+ public String getLicenseFeatureVersion() {
+ return licenseFeatureVersion;
+ }
+
public String getLicenseURL() {
if (license != null)
return license.getURL();
@@ -174,10 +191,6 @@ public class Feature {
return os;
}
- public String getPlugin() {
- return pluginId;
- }
-
public String getProviderName() {
return providerName;
}
@@ -186,6 +199,18 @@ public class Feature {
return updateSite;
}
+ public String getUpdateSiteLabel() {
+ if (updateSite != null)
+ return updateSite.getAnnotation();
+ return null;
+ }
+
+ public String getUpdateSiteURL() {
+ if (updateSite != null)
+ return updateSite.getURL();
+ return null;
+ }
+
public String getVersion() {
return version;
}
@@ -202,10 +227,20 @@ public class Feature {
return primary;
}
+ public boolean removeEntry(FeatureEntry entry) {
+ if (entry == null || entries == null)
+ return false;
+ return entries.remove(entry);
+ }
+
public void setApplication(String application) {
this.application = application;
}
+ public void setBrandingPlugin(String brandingPlugin) {
+ this.brandingPlugin = brandingPlugin;
+ }
+
public void setColocationAffinity(String colocationAffinity) {
this.colocationAffinity = colocationAffinity;
}
@@ -271,6 +306,14 @@ public class Feature {
this.license.setAnnotation(license);
}
+ public void setLicenseFeature(String name) {
+ this.licenseFeature = name;
+ }
+
+ public void setLicenseFeatureVersion(String version) {
+ this.licenseFeatureVersion = version;
+ }
+
public void setLicenseURL(String licenseURL) {
if (this.license == null)
this.license = new URLEntry();
@@ -285,10 +328,6 @@ public class Feature {
this.location = location;
}
- public void setPlugin(String pluginId) {
- this.pluginId = pluginId;
- }
-
public void setPrimary(boolean primary) {
this.primary = primary;
}
@@ -309,10 +348,6 @@ public class Feature {
this.updateSite.setURL(updateSiteURL);
}
- public void setURL(String value) {
- //
- }
-
public void setVersion(String version) {
this.version = version;
}
@@ -320,6 +355,7 @@ public class Feature {
/**
* For debugging purposes only.
*/
+ @Override
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java
index 53c865604..2c4736443 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java
@@ -1,22 +1,24 @@
/*******************************************************************************
- * 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
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Felix Riegger (SAP AG) - consolidation of publishers for PDE formats (bug 331974)
*******************************************************************************/
package org.eclipse.equinox.p2.publisher.eclipse;
import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.VersionRange;
/**
*/
-public class FeatureEntry {
+public class FeatureEntry implements IPlatformEntry {
private final String id;
- private String version;
+ private String versionOrRange;
private String url;
private String os;
private String ws;
@@ -26,9 +28,12 @@ public class FeatureEntry {
private final boolean isPlugin;
private boolean isFragment = false;
private boolean isRequires = false;
- private boolean unpack = true;
+ private Boolean unpack = null;
private boolean optional = false;
private boolean isPatch = false;
+ /**
+ * Temporary field to add provorg.eclipse.pde.internal.publishing.model.filters to features
+ */
private String filter;
public static FeatureEntry createRequires(String id, String version, String match, String filter, boolean isPlugin) {
@@ -42,12 +47,30 @@ public class FeatureEntry {
return result;
}
+ public static FeatureEntry createRequires(String id, VersionRange versionRange, String match, String filter, boolean isPlugin) {
+ FeatureEntry result = new FeatureEntry(id, versionRange, 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.versionOrRange = Version.parseVersion(version).toString();
this.isPlugin = isPlugin;
}
+ public FeatureEntry(String id, VersionRange versionRange, boolean isPlugin) {
+ this.id = id;
+ this.versionOrRange = versionRange.toString();
+ this.isPlugin = isPlugin;
+ }
+
+ @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
@@ -61,10 +84,10 @@ public class FeatureEntry {
return false;
} else if (!id.equals(other.id))
return false;
- if (version == null) {
- if (other.version != null)
+ if (versionOrRange == null) {
+ if (other.versionOrRange != null)
return false;
- } else if (!version.equals(other.version))
+ } else if (!versionOrRange.equals(other.versionOrRange))
return false;
if (isPlugin() != other.isPlugin())
@@ -78,6 +101,9 @@ public class FeatureEntry {
return arch;
}
+ /**
+ * Temporary method to add provisioning filters to features
+ */
public String getFilter() {
return filter;
}
@@ -103,18 +129,19 @@ public class FeatureEntry {
}
public String getVersion() {
- return version;
+ return versionOrRange;
}
public String getWS() {
return ws;
}
+ @Override
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());
+ result = prime * result + ((versionOrRange == null) ? 0 : versionOrRange.hashCode());
return result;
}
@@ -135,7 +162,7 @@ public class FeatureEntry {
}
public boolean isUnpack() {
- return unpack;
+ return (unpack == null || unpack.booleanValue());
}
public void setEnvironment(String os, String ws, String arch, String nl) {
@@ -145,6 +172,9 @@ public class FeatureEntry {
this.nl = nl;
}
+ /**
+ * Temporary method to add provisioning filters to features
+ */
public void setFilter(String filter) {
this.filter = filter;
@@ -159,7 +189,7 @@ public class FeatureEntry {
}
public void setUnpack(boolean value) {
- unpack = value;
+ unpack = Boolean.valueOf(value);
}
public void setURL(String value) {
@@ -167,18 +197,23 @@ public class FeatureEntry {
}
public void setVersion(String value) {
- version = Version.parseVersion(value).toString();
+ versionOrRange = Version.parseVersion(value).toString();
}
+ @Override
public String toString() {
StringBuffer result = new StringBuffer();
result.append(isRequires ? "Requires: " : ""); //$NON-NLS-1$ //$NON-NLS-2$
result.append(isPlugin ? "Plugin: " : "Feature: "); //$NON-NLS-1$ //$NON-NLS-2$
result.append(id != null ? id.toString() : ""); //$NON-NLS-1$
- result.append(version != null ? " " + version.toString() : ""); //$NON-NLS-1$ //$NON-NLS-2$
+ result.append(versionOrRange != null ? " " + versionOrRange.toString() : ""); //$NON-NLS-1$ //$NON-NLS-2$
return result.toString();
}
+ public boolean unpackSet() {
+ return unpack != null;
+ }
+
public boolean isPatch() {
return isPatch;
}
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAction.java
index 892c9d508..0201801a4 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAction.java
@@ -13,21 +13,44 @@ package org.eclipse.equinox.p2.publisher.eclipse;
import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
import java.util.Map.Entry;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
+import java.util.StringTokenizer;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.publisher.*;
+import org.eclipse.equinox.internal.p2.publisher.FileSetDescriptor;
import org.eclipse.equinox.internal.p2.publisher.Messages;
import org.eclipse.equinox.internal.p2.publisher.eclipse.FeatureParser;
-import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.ILicense;
+import org.eclipse.equinox.p2.metadata.IProvidedCapability;
+import org.eclipse.equinox.p2.metadata.IRequirement;
+import org.eclipse.equinox.p2.metadata.IRequirementChange;
+import org.eclipse.equinox.p2.metadata.ITouchpointType;
+import org.eclipse.equinox.p2.metadata.IUpdateDescriptor;
+import org.eclipse.equinox.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitPatchDescription;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.VersionRange;
import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.publisher.*;
+import org.eclipse.equinox.p2.publisher.AbstractPublisherAction;
+import org.eclipse.equinox.p2.publisher.IPublisherInfo;
+import org.eclipse.equinox.p2.publisher.IPublisherResult;
import org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice;
import org.eclipse.equinox.p2.repository.IRepository;
import org.eclipse.equinox.p2.repository.IRepositoryReference;
@@ -36,6 +59,7 @@ import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
import org.eclipse.equinox.p2.repository.spi.RepositoryReference;
import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.publishing.Activator;
/**
* Publish IUs for all of the features in the given set of locations. The locations can
@@ -76,8 +100,8 @@ public class FeaturesAction extends AbstractPublisherAction {
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.getBrandingPlugin() != null)
+ iu.setProperty(UPDATE_FEATURE_PLUGIN_PROP, feature.getBrandingPlugin());
if (feature.isExclusive())
iu.setProperty(UPDATE_FEATURE_EXCLUSIVE_PROP, Boolean.TRUE.toString());
if (feature.isPrimary())
@@ -282,6 +306,7 @@ public class FeaturesAction extends AbstractPublisherAction {
}
iu.setCapabilities(providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
+ processUpdateDescriptorAdvice(iu, info);
processCapabilityAdvice(iu, publisherInfo);
return MetadataFactory.createInstallableUnit(iu);
}
@@ -368,6 +393,7 @@ public class FeaturesAction extends AbstractPublisherAction {
}
iu.setCapabilities(providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
+ processUpdateDescriptorAdvice(iu, info);
processCapabilityAdvice(iu, publisherInfo);
return MetadataFactory.createInstallableUnitPatch(iu);
}
@@ -492,6 +518,9 @@ public class FeaturesAction extends AbstractPublisherAction {
}
protected void generateSiteReferences(Feature feature, IPublisherResult result, IPublisherInfo publisherInfo) {
+ if (publisherInfo.getMetadataRepository() == null)
+ return;
+
//publish feature site references
URLEntry updateURL = feature.getUpdateSite();
//don't enable feature update sites by default since this results in too many
@@ -552,12 +581,14 @@ public class FeaturesAction extends AbstractPublisherAction {
String versionSpec = entry.getVersion();
if (versionSpec == null)
return VersionRange.emptyRange;
+ String match = entry.getMatch();
+ if ("versionRange".equals(match)) //$NON-NLS-1$
+ return new VersionRange(versionSpec);
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;
@@ -587,6 +618,7 @@ public class FeaturesAction extends AbstractPublisherAction {
return false;
}
+ @Override
public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
if (features == null && locations == null)
throw new IllegalStateException(Messages.exception_noFeaturesOrLocations);
@@ -605,7 +637,7 @@ public class FeaturesAction extends AbstractPublisherAction {
Collection<IArtifactKey> artifacts = featureIU.getArtifacts();
for (IArtifactKey artifactKey : artifacts) {
File file = new File(feature.getLocation());
- ArtifactDescriptor ad = (ArtifactDescriptor) PublisherHelper.createArtifactDescriptor(info.getArtifactRepository(), artifactKey, file);
+ ArtifactDescriptor ad = (ArtifactDescriptor) PublisherHelper.createArtifactDescriptor(info, artifactKey, file);
processArtifactPropertiesAdvice(featureIU, ad, publisherInfo);
ad.setProperty(IArtifactDescriptor.DOWNLOAD_CONTENTTYPE, IArtifactDescriptor.TYPE_ZIP);
// if the artifact is a dir then zip it up.
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAndBundlesPublisherApplication.java
index 516cb99b8..516cb99b8 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAndBundlesPublisherApplication.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAndBundlesPublisherApplication.java
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/IBrandingAdvice.java
index 6f4952079..6f4952079 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IBrandingAdvice.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/IBrandingAdvice.java
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/IBundleShapeAdvice.java
index 8ad1badd5..8ad1badd5 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IBundleShapeAdvice.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/IBundleShapeAdvice.java
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/IConfigAdvice.java
index 6c8eefd6a..6c8eefd6a 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IConfigAdvice.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/IConfigAdvice.java
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/IExecutableAdvice.java
index 7d46675f3..7d46675f3 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IExecutableAdvice.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/IExecutableAdvice.java
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/HttpConstants.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/IPlatformEntry.java
index 810ab5e94..98f9c5491 100644
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/HttpConstants.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/IPlatformEntry.java
@@ -1,15 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc and others.
+ * 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:
- * Cloudsmith Inc. - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.equinox.p2.testserver;
-public interface HttpConstants {
- public static final String LAST_MODIFIED = "Last-Modified"; //$NON-NLS-1$
+package org.eclipse.equinox.p2.publisher.eclipse;
+
+public interface IPlatformEntry {
+ public String getOS();
+
+ public String getWS();
+
+ public String getArch();
+
+ public String getNL();
}
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/InstallPublisherApplication.java
index ae180c257..ae180c257 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/InstallPublisherApplication.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/InstallPublisherApplication.java
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/LaunchingAdvice.java
index 72647823e..72647823e 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/LaunchingAdvice.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/LaunchingAdvice.java
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java
index 2f803f4c0..a5ad2675c 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java
@@ -48,7 +48,7 @@ public class ProductAction extends AbstractPublisherAction {
// create all the actions needed to publish a product
ArrayList<IPublisherAction> actions = new ArrayList<IPublisherAction>();
// products include the executable so add actions to publish them
- if (getExecutablesLocation() != null)
+ if (getExecutablesLocation() != null && this.product.includeLaunchers())
actions.add(createApplicationExecutableAction(info.getConfigurations()));
// add the actions that just configure things.
actions.add(createConfigCUsAction());
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ProductFileAdvice.java
index e054e7fc5..e054e7fc5 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductFileAdvice.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ProductFileAdvice.java
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ProductPublisherApplication.java
index dc365e78b..eba846360 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductPublisherApplication.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/ProductPublisherApplication.java
@@ -13,11 +13,13 @@ package org.eclipse.equinox.p2.publisher.eclipse;
import java.io.File;
import java.net.URISyntaxException;
import java.util.ArrayList;
+import org.eclipse.equinox.internal.p2.publisher.Messages;
import org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor;
import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.publisher.*;
import org.eclipse.equinox.p2.publisher.actions.VersionAdvice;
+import org.eclipse.osgi.util.NLS;
public class ProductPublisherApplication extends AbstractPublisherApplication {
@@ -40,8 +42,7 @@ public class ProductPublisherApplication extends AbstractPublisherApplication {
try {
productDescriptor = new ProductFile(product);
} catch (Exception e) {
- if (product == null)
- throw new IllegalArgumentException("unable to load product file"); //$NON-NLS-1$
+ throw new IllegalArgumentException(NLS.bind(Messages.exception_errorLoadingProductFile, product, e.toString()));
}
File executablesFeature = executables == null ? null : new File(executables);
return new ProductAction(source, productDescriptor, flavor, executablesFeature);
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.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/URLEntry.java
index b9566e8a8..b9566e8a8 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/URLEntry.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/URLEntry.java
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/BuildPublisherApplication.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/BuildPublisherApplication.java
new file mode 100644
index 000000000..a2e3c6c0a
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/BuildPublisherApplication.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.build.publisher;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.equinox.p2.publisher.AbstractPublisherApplication;
+import org.eclipse.equinox.p2.publisher.IPublisherAction;
+
+public class BuildPublisherApplication extends AbstractPublisherApplication {
+ private List<IPublisherAction> actions;
+
+ public void addAction(IPublisherAction action) {
+ if (actions == null)
+ actions = new ArrayList<IPublisherAction>(1);
+ actions.add(action);
+ }
+
+ @Override
+ protected IPublisherAction[] createActions() {
+ if (actions == null)
+ return new IPublisherAction[0];
+ return actions.toArray(new IPublisherAction[actions.size()]);
+ }
+
+ public void setAppend(boolean value) {
+ super.append = value;
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/FeatureRootAdvice.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/FeatureRootAdvice.java
new file mode 100644
index 000000000..bd2220689
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/FeatureRootAdvice.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.build.publisher;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
+import org.eclipse.equinox.internal.p2.publisher.FileSetDescriptor;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.publisher.AbstractAdvice;
+import org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice;
+
+public class FeatureRootAdvice extends AbstractAdvice implements IFeatureRootAdvice {
+ private static final int IDX_COMPUTER = 0;
+ private static final int IDX_DESCRIPTOR = 1;
+
+ // String config -> Object[] { GatheringComputer, Map: permission -> Set, String }
+ private final Map<String, Object[]> advice = new HashMap<String, Object[]>();
+ private String featureId;
+ private Version featureVersion;
+
+ @Override
+ public boolean isApplicable(String configSpec, boolean includeDefault, String id, Version version) {
+ if (featureId != null && !featureId.equals(id))
+ return false;
+ if (featureVersion != null && !featureVersion.equals(version))
+ return false;
+
+ if (configSpec != null && !advice.containsKey(configSpec))
+ return false;
+
+ return true;
+ }
+
+ /**
+ * Return the configs for which we have advice
+ * @return String[]
+ */
+ public String[] getConfigs() {
+ return advice.keySet().toArray(new String[advice.size()]);
+ }
+
+ /**
+ * Return the GatheringComputer containing the set of rootfiles to include for the given config
+ * Returns null if we have no advice for the given config.
+ * @param config
+ * @return GatheringComputer
+ */
+ public IPathComputer getRootFileComputer(String config) {
+ if (advice.containsKey(config))
+ return (GatheringComputer) advice.get(config)[IDX_COMPUTER];
+ return null;
+ }
+
+ public void addRootfiles(String config, GatheringComputer computer) {
+ Object[] configAdvice = getConfigAdvice(config);
+
+ if (configAdvice[IDX_COMPUTER] == null)
+ configAdvice[IDX_COMPUTER] = computer;
+ else {
+ GatheringComputer existing = (GatheringComputer) configAdvice[IDX_COMPUTER];
+ existing.addAll(computer);
+ }
+ FileSetDescriptor descriptor = getDescriptor(config);
+ descriptor.addFiles(computer.getFiles());
+ }
+
+ public void addPermissions(String config, String permissions, String[] files) {
+ FileSetDescriptor descriptor = getDescriptor(config);
+ for (int i = 0; i < files.length; i++) {
+ descriptor.addPermissions(new String[] {permissions, files[i]});
+ }
+ }
+
+ public void addLinks(String config, String links) {
+ FileSetDescriptor descriptor = getDescriptor(config);
+ descriptor.setLinks(links);
+ }
+
+ private Object[] getConfigAdvice(String config) {
+ Object[] configAdvice = advice.get(config);
+ if (configAdvice == null) {
+ configAdvice = new Object[3];
+ advice.put(config, configAdvice);
+ }
+ return configAdvice;
+ }
+
+ public FileSetDescriptor getDescriptor(String config) {
+ Object[] configAdvice = getConfigAdvice(config);
+ FileSetDescriptor descriptor = null;
+
+ if (configAdvice[IDX_DESCRIPTOR] != null)
+ descriptor = (FileSetDescriptor) configAdvice[IDX_DESCRIPTOR];
+ else {
+ String key = "root"; //$NON-NLS-1$
+ if (config.length() > 0)
+ key += "." + config; //$NON-NLS-1$
+ descriptor = new FileSetDescriptor(key, config);
+ configAdvice[IDX_DESCRIPTOR] = descriptor;
+ }
+ return descriptor;
+ }
+
+ public void setFeatureId(String featureId) {
+ this.featureId = featureId;
+ }
+
+ public void setFeatureVersion(Version featureVersion) {
+ this.featureVersion = featureVersion;
+ }
+
+ public String[] getConfigurations() {
+ Set<String> keys = advice.keySet();
+ return keys.toArray(new String[keys.size()]);
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/GatherBundleAction.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/GatherBundleAction.java
new file mode 100644
index 000000000..ef8b7ca79
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/GatherBundleAction.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.build.publisher;
+
+import java.io.File;
+import java.util.Dictionary;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.publisher.IPublisherInfo;
+import org.eclipse.equinox.p2.publisher.IPublisherResult;
+import org.eclipse.equinox.p2.publisher.eclipse.*;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.pde.internal.publishing.Utils;
+
+public class GatherBundleAction extends BundlesAction {
+ private GatheringComputer computer = null;
+ private String unpack = null;
+ private File manifestRoot = null;
+ private File bundleLocation = null;
+
+ /**
+ * @param location
+ */
+ public GatherBundleAction(File location, File manifestRoot) {
+ super(new File[] {location});
+ this.manifestRoot = manifestRoot;
+ this.bundleLocation = location;
+ }
+
+ @Override
+ public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
+ return super.perform(publisherInfo, results, monitor);
+ }
+
+ @Override
+ protected void publishArtifact(IArtifactDescriptor descriptor, File base, File[] inclusions, IPublisherInfo publisherInfo) {
+ //ignore passed in inclusions, publish according to our computer
+ publishArtifact(descriptor, computer.getFiles(), null, publisherInfo, computer);
+ }
+
+ @Override
+ protected BundleDescription[] getBundleDescriptions(File[] bundleLocations, IProgressMonitor monitor) {
+ Dictionary<String, String> manifest = basicLoadManifest(manifestRoot);
+ if (manifest == null)
+ return null;
+
+ BundleDescription bundle = createBundleDescription(manifest, bundleLocation);
+ createShapeAdvice(bundle);
+ return new BundleDescription[] {bundle};
+ }
+
+ protected void createShapeAdvice(BundleDescription bundle) {
+ @SuppressWarnings("unchecked")
+ Dictionary<String, String> manifest = (Dictionary<String, String>) bundle.getUserObject();
+ String shape = manifest.get(BUNDLE_SHAPE);
+ if (shape == null) {
+ if (unpack != null) {
+ shape = Boolean.valueOf(unpack).booleanValue() ? IBundleShapeAdvice.DIR : IBundleShapeAdvice.JAR;
+ } else {
+ shape = Utils.guessUnpack(bundle, Utils.getBundleClasspath(manifest)) ? IBundleShapeAdvice.DIR : IBundleShapeAdvice.JAR;
+ }
+ }
+ BundleShapeAdvice advice = new BundleShapeAdvice(bundle.getSymbolicName(), PublisherHelper.fromOSGiVersion(bundle.getVersion()), shape);
+ info.addAdvice(advice);
+ }
+
+ public void setComputer(GatheringComputer computer) {
+ this.computer = computer;
+ }
+
+ public void setUnpack(String unpack) {
+ this.unpack = unpack;
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/GatherFeatureAction.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/GatherFeatureAction.java
new file mode 100644
index 000000000..f328f2d44
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/GatherFeatureAction.java
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.build.publisher;
+
+import java.io.File;
+import java.util.Collection;
+import org.eclipse.equinox.internal.p2.publisher.eclipse.FeatureParser;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.publisher.IPublisherInfo;
+import org.eclipse.equinox.p2.publisher.eclipse.Feature;
+import org.eclipse.equinox.p2.publisher.eclipse.FeaturesAction;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
+import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
+
+public class GatherFeatureAction extends FeaturesAction {
+ private GatheringComputer computer;
+ private String groupId = null;
+ private FeatureRootAdvice rootAdvice;
+ private final File featureRoot;
+
+ public GatherFeatureAction(File location, File featureRoot) {
+ super(new File[] {location});
+ this.featureRoot = featureRoot;
+ }
+
+ public void setComputer(GatheringComputer computer) {
+ this.computer = computer;
+ }
+
+ public void setGroupId(String groupId) {
+ this.groupId = groupId;
+ }
+
+ @Override
+ protected Feature[] getFeatures(File[] locations) {
+ Feature feature = new FeatureParser().parse(featureRoot);
+ if (feature != null) {
+ feature.setLocation(locations[0].getAbsolutePath());
+ rootAdvice.setFeatureId(feature.getId());
+ rootAdvice.setFeatureVersion(Version.parseVersion(feature.getVersion()));
+ return new Feature[] {feature};
+ }
+ return new Feature[0];
+ }
+
+ // protected ArrayList generateRootFileIUs(Feature feature, IPublisherResult result, IPublisherInfo publisherInfo) {
+ // ArrayList ius = new ArrayList();
+ //
+ // Collection collection = publisherInfo.getAdvice(null, false, null, null, FeatureRootAdvice.class);
+ // if (collection.size() == 0)
+ // return ius;
+ //
+ // FeatureRootAdvice advice = (FeatureRootAdvice) collection.iterator().next();
+ // String[] configs = advice.getConfigs();
+ // for (int i = 0; i < configs.length; i++) {
+ // String config = configs[i];
+ //
+ // GatheringComputer rootComputer = advice.getRootFileComputer(config);
+ //
+ // if (rootComputer != null) {
+ // FileSetDescriptor descriptor = advice.getDescriptor(config);
+ // IInstallableUnit iu = (IInstallableUnit) createFeatureRootFileIU(feature.getId(), feature.getVersion(), null, descriptor)[0];
+ //
+ // File[] files = rootComputer.getFiles();
+ // IArtifactKey artifactKey = iu.getArtifacts()[0];
+ // ArtifactDescriptor artifactDescriptor = new ArtifactDescriptor(artifactKey);
+ // publishArtifact(artifactDescriptor, files, null, publisherInfo, rootComputer);
+ //
+ // result.addIU(iu, IPublisherResult.NON_ROOT);
+ // ius.add(iu);
+ // }
+ // }
+ // return ius;
+ // }
+
+ @Override
+ protected String getGroupId(String featureId) {
+ if (groupId != null)
+ return groupId;
+ return super.getGroupId(featureId);
+ }
+
+ @Override
+ protected IInstallableUnit generateFeatureJarIU(Feature feature, IPublisherInfo publisherInfo) {
+ if (computer == null)
+ return null;
+ return createFeatureJarIU(feature, publisherInfo);
+ }
+
+ @Override
+ protected void publishFeatureArtifacts(Feature feature, IInstallableUnit featureIU, IPublisherInfo publisherInfo) {
+ if (computer == null)
+ return;
+
+ // add all the artifacts associated with the feature
+ Collection<IArtifactKey> artifacts = featureIU.getArtifacts();
+ if (artifacts.size() > 1) {
+ //boo!
+ }
+
+ ArtifactDescriptor ad = (ArtifactDescriptor) PublisherHelper.createArtifactDescriptor(publisherInfo, artifacts.iterator().next(), null);
+ processArtifactPropertiesAdvice(featureIU, ad, publisherInfo);
+ ad.setProperty(IArtifactDescriptor.DOWNLOAD_CONTENTTYPE, IArtifactDescriptor.TYPE_ZIP);
+
+ publishArtifact(ad, computer.getFiles(), null, publisherInfo, computer);
+ }
+
+ public void setRootAdvice(FeatureRootAdvice rootAdvice) {
+ this.rootAdvice = rootAdvice;
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/GatheringComputer.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/GatheringComputer.java
new file mode 100644
index 000000000..3df09db1e
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/build/publisher/GatheringComputer.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2011 IBM Corporation and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors: IBM Corporation - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.pde.internal.build.publisher;
+
+import java.io.File;
+import java.util.LinkedHashMap;
+import java.util.Set;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
+
+public class GatheringComputer implements IPathComputer {
+ private static final String PROVIDED_PATH = ":PROVIDED:"; //$NON-NLS-1$
+ private final LinkedHashMap<File, String> filesMap = new LinkedHashMap<File, String>();
+
+ public IPath computePath(File source) {
+ String prefix = filesMap.get(source);
+
+ IPath result = null;
+ if (prefix.startsWith(PROVIDED_PATH)) {
+ // the desired path is provided in the map
+ result = new Path(prefix.substring(10));
+ } else {
+ //else the map contains a prefix which must be stripped from the path
+ result = new Path(source.getAbsolutePath());
+ IPath rootPath = new Path(prefix);
+ result = result.removeFirstSegments(rootPath.matchingFirstSegments(result));
+ }
+ return result.setDevice(null);
+ }
+
+ public void reset() {
+ // nothing
+
+ }
+
+ public void addAll(GatheringComputer computer) {
+ filesMap.putAll(computer.filesMap);
+ }
+
+ public void addFiles(String prefix, String[] files) {
+ for (int i = 0; i < files.length; i++) {
+ filesMap.put(new File(prefix, files[i]), prefix);
+ }
+ }
+
+ public void addFile(String prefix, String file) {
+ filesMap.put(new File(prefix, file), prefix);
+ }
+
+ public void addFile(String computedPath, File file) {
+ filesMap.put(file, PROVIDED_PATH + computedPath);
+ }
+
+ public File[] getFiles() {
+ Set<File> keys = filesMap.keySet();
+ return keys.toArray(new File[keys.size()]);
+ }
+
+ public int size() {
+ return filesMap.size();
+ }
+} \ 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.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Activator.java
index 5c2cb2cac..f50a5588f 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Activator.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Activator.java
@@ -1,32 +1,31 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2011 SAP 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:
- * IBM Corporation - initial API and implementation
+ * SAP AG - consolidation of publishers for PDE formats
*******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator;
+package org.eclipse.pde.internal.publishing;
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$
+ private static BundleContext context;
+ public static String ID = "org.eclipse.equinox.p2.publisher.eclipse"; //$NON-NLS-1$
public static BundleContext getContext() {
return context;
}
- public void start(BundleContext context) throws Exception {
- Activator.context = context;
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
}
- public void stop(BundleContext context) throws Exception {
+ public void stop(BundleContext bundleContext) throws Exception {
Activator.context = null;
}
-
}
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Constants.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Constants.java
new file mode 100644
index 000000000..d7efee1c6
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Constants.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2011 SAP 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:
+ * SAP AG - consolidation of publishers for PDE formats
+ *******************************************************************************/
+
+package org.eclipse.pde.internal.publishing;
+
+public final class Constants {
+
+ public static final String ECLIPSE_BUNDLE_SHAPE = "Eclipse-BundleShape"; //$NON-NLS-1$
+ public static final String BUNDLE_CLASSPATH = org.osgi.framework.Constants.BUNDLE_CLASSPATH;
+
+ public static final String BUNDLE_EQUINOX_LAUNCHER = "org.eclipse.equinox.launcher"; //$NON-NLS-1$
+
+ public static final int EXCEPTION_FEATURE_PARSE = 17;
+}
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.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Messages.java
index 41616abbf..eb3d5edd6 100644
--- 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.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Messages.java
@@ -1,32 +1,32 @@
/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM - Initial API and implementation
+ * SAP AG - consolidation of publishers for PDE formats
*******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.artifact.processors.md5;
+package org.eclipse.pde.internal.publishing;
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$
+ private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.publisher.eclipse.messages";//$NON-NLS-1$
+
+ // exception
+ public static String exception_missingElement;
+ public static String exception_featureParse;
+ public static String exception_productParse;
- public static String Error_invalid_hash;
- public static String Error_MD5_unavailable;
- public static String Error_unexpected_hash;
- public static String warning_differentMD5;
+ // feature parsing
+ public static String feature_parse_invalidIdOrVersion;
+ public static String feature_parse_emptyRequires;
static {
- // initialize resource bundle
+ // load message values from bundle file
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
}
-
- private Messages() {
- //empty
- }
-}
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Utils.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Utils.java
new file mode 100644
index 000000000..1865c047a
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/Utils.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * SAP AG - consolidation of publishers for PDE formats
+ *******************************************************************************/
+package org.eclipse.pde.internal.publishing;
+
+import java.io.*;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.osgi.util.ManifestElement;
+import org.osgi.framework.BundleException;
+
+public final class Utils {
+
+ static 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();
+ }
+ }
+ }
+
+ public static boolean guessUnpack(BundleDescription bundle, String[] classpath) {
+ if (bundle == null)
+ return true;
+
+ @SuppressWarnings("unchecked")
+ Dictionary<String, String> properties = (Dictionary<String, String>) bundle.getUserObject();
+ String shape = null;
+ if (properties != null && (shape = properties.get(Constants.ECLIPSE_BUNDLE_SHAPE)) != null) {
+ return shape.equals("dir"); //$NON-NLS-1$
+ }
+
+ // launcher fragments are a special case, they have no bundle-classpath and they must
+ //be unpacked
+ if (bundle.getHost() != null && bundle.getName().startsWith(Constants.BUNDLE_EQUINOX_LAUNCHER))
+ return true;
+
+ if (new File(bundle.getLocation()).isFile())
+ return false;
+
+ if (classpath.length == 0)
+ return false;
+
+ for (int i = 0; i < classpath.length; i++) {
+ if (classpath[i].equals(".")) //$NON-NLS-1$
+ return false;
+ }
+ return true;
+ }
+
+ public static String[] getBundleClasspath(Dictionary<String, String> manifest) {
+ String fullClasspath = getBundleManifestHeader(manifest, Constants.BUNDLE_CLASSPATH);
+ String[] result = new String[0];
+ try {
+ if (fullClasspath != null) {
+ ManifestElement[] classpathEntries;
+ classpathEntries = ManifestElement.parseHeader(Constants.BUNDLE_CLASSPATH, fullClasspath);
+ result = new String[classpathEntries.length];
+ for (int i = 0; i < classpathEntries.length; i++) {
+ result[i] = classpathEntries[i].getValue();
+ }
+ }
+ } catch (BundleException e) {
+ //Ignore
+ }
+ return result;
+ }
+
+ public static String getBundleManifestHeader(Dictionary<String, String> manifest, String header) {
+ String value = manifest.get(header);
+ if (value != null)
+ return value;
+
+ Enumeration<String> keys = manifest.keys();
+ while (keys.hasMoreElements()) {
+ String key = keys.nextElement();
+ if (key.equalsIgnoreCase(header))
+ return manifest.get(key);
+ }
+ return null;
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/messages.properties b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/messages.properties
new file mode 100644
index 000000000..f6c98acad
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/publishing/messages.properties
@@ -0,0 +1,22 @@
+###############################################################################
+# Copyright (c) 2003, 2011 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+# SAP AG - consolidation of publishers for PDE formats
+###############################################################################
+### PDE Publishing plugin message catalog
+
+
+### exception
+exception_missingElement = Unable to find element: {0}.
+exception_featureParse = Problems parsing the feature {0}.
+exception_productParse = Problems parsing the product file {0}.
+
+### feature parsing
+feature_parse_invalidIdOrVersion= Invalid ID \"{0}\" or version \"{1}\" encountered.
+feature_parse_emptyRequires = Error parsing feature: \"require\" must include at least one \"import\" element.
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.eclipse/src/org/eclipse/pde/internal/swt/tools/IconExe.java
index 6367a40b9..7aae1ae33 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/swt/tools/IconExe.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/swt/tools/IconExe.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,7 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.equinox.internal.p2.swt.tools;
+package org.eclipse.pde.internal.swt.tools;
import java.io.*;
import java.util.*;
@@ -954,6 +954,7 @@ public class IconExe {
*
* @see #hashCode()
*/
+ @Override
public boolean equals(Object object) {
if (object == this)
return true;
@@ -973,6 +974,7 @@ public class IconExe {
*
* @see #equals(Object)
*/
+ @Override
public int hashCode() {
return (blue << 16) | (green << 8) | red;
}
@@ -983,6 +985,7 @@ public class IconExe {
*
* @return a string representation of the <code>RGB</code>
*/
+ @Override
public String toString() {
return "RGB {" + red + ", " + green + ", " + blue + "}"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
@@ -1195,7 +1198,8 @@ public class IconExe {
/*
* the set of ImageLoader event listeners, created on demand
*/
- Vector<?> imageLoaderListeners;
+ @SuppressWarnings("rawtypes")
+ Vector imageLoaderListeners;
/**
* Construct a new empty ImageLoader.
@@ -2620,6 +2624,7 @@ public class IconExe {
throw new IllegalArgumentException();
}
+ @Override
public void close() throws IOException {
buf = null;
if (in != null) {
@@ -2638,6 +2643,7 @@ public class IconExe {
/**
* Answers how many bytes are available for reading without blocking
*/
+ @Override
public int available() throws IOException {
if (buf == null)
throw new IOException();
@@ -2647,6 +2653,7 @@ public class IconExe {
/**
* Answer the next byte of the input stream.
*/
+ @Override
public int read() throws IOException {
if (buf == null)
throw new IOException();
@@ -2660,6 +2667,7 @@ public class IconExe {
* Don't imitate the JDK behaviour of reading a random number
* of bytes when you can actually read them all.
*/
+ @Override
public int read(byte b[], int off, int len) throws IOException {
int result;
int left = len;
@@ -2963,6 +2971,7 @@ public class IconExe {
return 1;
}
+ @Override
boolean isFileFormat(LEDataInputStream stream) {
try {
byte[] header = new byte[18];
@@ -3028,6 +3037,7 @@ public class IconExe {
return header;
}
+ @Override
ImageData[] loadFromByteStream() {
int[] fileHeader = loadFileHeader();
byte[] infoHeader = new byte[BMPHeaderFixedSize];
@@ -3157,6 +3167,7 @@ public class IconExe {
return WinBMPFileFormat.BMPHeaderFixedSize + paletteSize + dataSize;
}
+ @Override
boolean isFileFormat(LEDataInputStream stream) {
try {
byte[] header = new byte[4];
@@ -3223,6 +3234,7 @@ public class IconExe {
return numIcons;
}
+ @Override
ImageData[] loadFromByteStream() {
int numIcons = loadFileHeader(inputStream);
int[][] headers = loadIconHeaders(numIcons);
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.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java
index 04f18ebd7..5f6d3f716 100644
--- 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.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2009, 2011 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -8,8 +8,6 @@
******************************************************************************/
package org.eclipse.equinox.internal.p2.publisher.ant;
-import org.eclipse.equinox.p2.query.QueryUtil;
-
import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
@@ -20,16 +18,17 @@ import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
import org.eclipse.equinox.internal.p2.publisher.Messages;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.publisher.*;
import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
import org.eclipse.equinox.p2.repository.artifact.ArtifactKeyQuery;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.publishing.Activator;
public abstract class AbstractPublishTask extends Task {
protected static final String ANT_PROPERTY_PREFIX = "${"; //$NON-NLS-1$
@@ -98,7 +97,7 @@ public abstract class AbstractPublishTask extends Task {
protected List<RepoEntry> contextRepositories = new ArrayList<RepoEntry>();
protected IProvisioningAgent getProvisioningAgent() {
- return (IProvisioningAgent) ServiceHelper.getService(Activator.context, IProvisioningAgent.SERVICE_NAME);
+ return (IProvisioningAgent) ServiceHelper.getService(Activator.getContext(), IProvisioningAgent.SERVICE_NAME);
}
protected IStatus createConfigurationEror(String message) {
@@ -121,7 +120,7 @@ public abstract class AbstractPublishTask extends Task {
if (repoLocation.equals(new File(source)))
throw new IllegalArgumentException(NLS.bind(Messages.exception_artifactRepoNoAppendDestroysInput, URIUtil.toUnencodedString(artifactLocation)));
}
- repo.removeAll();
+ repo.removeAll(new NullProgressMonitor());
}
info.setArtifactRepository(repo);
} else if ((info.getArtifactOptions() & IPublisherInfo.A_PUBLISH) > 0)
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.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/FeaturesAndBundlesPublisherTask.java
index 0c8bcab19..0c8bcab19 100644
--- 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.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/FeaturesAndBundlesPublisherTask.java
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.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/ProductPublisherTask.java
index 2a4af026b..2a4af026b 100644
--- 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.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/ProductPublisherTask.java
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.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java
index d25b04174..d25b04174 100644
--- 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.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java
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.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/TaskMessages.java
index 6893edd95..5edd9feea 100644
--- 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.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/TaskMessages.java
@@ -13,7 +13,7 @@ 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$
+ private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.publisher.ant.messages";//$NON-NLS-1$
public static String exception_errorOccurredCallingGenerator;
public static String exception_errorArtifactRepo;
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.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/messages.properties
index 2c2eb1c97..2c2eb1c97 100644
--- 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.eclipse/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/messages.properties
diff --git a/bundles/org.eclipse.equinox.p2.publisher/.classpath b/bundles/org.eclipse.equinox.p2.publisher/.classpath
deleted file mode 100644
index 834ea833e..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" output="bin_ant" path="src_ant"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.publisher/.cvsignore b/bundles/org.eclipse.equinox.p2.publisher/.cvsignore
deleted file mode 100644
index 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 3c6003b89..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/.externalToolBuilders/Build Publisher Ant Tasks.launch
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1255396868921_12&quot; label=&quot;working set&quot; name=&quot;working set&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.equinox.p2.publisher&quot; type=&quot;4&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.publisher/scripts/buildExtraJAR.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.publisher"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="true"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.publisher/scripts/buildExtraJAR.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.publisher/.project b/bundles/org.eclipse.equinox.p2.publisher/.project
deleted file mode 100644
index 20aa4f425..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/.project
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.publisher</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value>&lt;project&gt;/.externalToolBuilders/Build Publisher Ant Tasks.launch</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f9763e493..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,348 +0,0 @@
-#Tue Feb 16 09:33:59 EST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.publisher/Eclipse install publisher.launch b/bundles/org.eclipse.equinox.p2.publisher/Eclipse install publisher.launch
deleted file mode 100644
index 632914eb5..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/Eclipse install publisher.launch
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Eclipse install publisher"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console &#13;&#10;-consolelog&#13;&#10;-application org.eclipse.equinox.p2.publisher.InstallPublisher&#13;&#10;-metadataRepository file:c:/temp/repos&#13;&#10;-source file:C:\build.ecf\v20080507-1345\3.3.2\updateSite&#13;&#10;-artifactRepository file:d:/temp/repos&#13;&#10;-source d:/m1/eclipse&#13;&#10;-configs win32.win32.x86&#13;&#10;-id sdk&#13;&#10;-version 3.4.0&#13;&#10;&#10;-flavor tooling&#13;&#10;-top org.eclipse.sdk.feature.group&#13;&#10;-publishArtifacts"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="true"/>
-<stringAttribute key="target_bundles" value="org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.osgi.services@default:default,org.eclipse.core.jobs@default:default,org.eclipse.equinox.app@default:true,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.common@2:true,org.eclipse.ecf@default:default,org.eclipse.equinox.frameworkadmin.equinox@3:true,org.eclipse.equinox.security@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.core.net@default:default,org.eclipse.osgi@-1:true,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.frameworkadmin@3:true,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.p2.jarprocessor@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.simpleconfigurator.manipulator@3:true,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.simpleconfigurator@3:true"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.publisher/Features and Bundles Publisher.launch b/bundles/org.eclipse.equinox.p2.publisher/Features and Bundles Publisher.launch
deleted file mode 100644
index 41b1d426a..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/Features and Bundles Publisher.launch
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Features and Bundles Publisher"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher&#13;&#10;-metadataRepository file:c:/temp/repos&#13;&#10;-artifactRepository file:c:/temp/repos&#13;&#10;-source C:\build.ecf\v20080507-1345\3.3.2\updateSite&#13;&#10;-configs win32.win32.x86&#13;&#10;-publishArtifacts"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.osgi@default:default,org.eclipse.equinox.frameworkadmin@3:true,org.eclipse.equinox.common@default:default,org.eclipse.ecf@default:default,org.eclipse.equinox.frameworkadmin.equinox@3:true,org.eclipse.core.jobs@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.security@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.app@default:true,org.eclipse.equinox.launcher@default:default,org.eclipse.core.net@default:default,org.eclipse.osgi.services@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.registry@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.simpleconfigurator.manipulator@3:true,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.simpleconfigurator@3:true,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.artifact.repository@default:default"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.publisher/about.html b/bundles/org.eclipse.equinox.p2.publisher/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.publisher/ant_tasks/.cvsignore b/bundles/org.eclipse.equinox.p2.publisher/ant_tasks/.cvsignore
deleted file mode 100644
index 1d6b46f03..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/ant_tasks/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-publisher-ant.jar
diff --git a/bundles/org.eclipse.equinox.p2.publisher/build.properties b/bundles/org.eclipse.equinox.p2.publisher/build.properties
deleted file mode 100644
index cf4258197..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/build.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2010 EclipseSource and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# EclipseSource - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-source.ant_tasks/publisher-ant.jar = src_ant/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- profiles/,\
- plugin.xml,\
- ant_tasks/publisher-ant.jar,\
- plugin.properties
-src.includes = about.html
-jars.compile.order = .,\
- ant_tasks/publisher-ant.jar
-javacWarnings..=+unusedThrown
-extra.ant_tasks/publisher-ant.jar = platform:/plugin/org.apache.ant
-jars.extra.classpath = platform:/plugin/org.apache.ant/lib/ant.jar
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.publisher/plugin.properties b/bundles/org.eclipse.equinox.p2.publisher/plugin.properties
deleted file mode 100644
index bdeeb80a6..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bundleName = Equinox Provisioning Publisher
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.publisher/pom.xml b/bundles/org.eclipse.equinox.p2.publisher/pom.xml
deleted file mode 100644
index fc100a871..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.publisher</artifactId>
- <version>1.1.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/CDC-1.0_Foundation-1.0.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/CDC-1.0_Foundation-1.0.profile
deleted file mode 100644
index dde120a4d..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/CDC-1.0_Foundation-1.0.profile
+++ /dev/null
@@ -1,24 +0,0 @@
-###############################################################################
-# Copyright (c) 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.microedition.io
-org.osgi.framework.bootdelegation = \
- javax.microedition.io
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- CDC-1.0/Foundation-1.0
-osgi.java.profile.name = CDC-1.0/Foundation-1.0
-org.eclipse.jdt.core.compiler.compliance=1.3
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/CDC-1.1_Foundation-1.1.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/CDC-1.1_Foundation-1.1.profile
deleted file mode 100644
index 67b20c7ef..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/CDC-1.1_Foundation-1.1.profile
+++ /dev/null
@@ -1,30 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.microedition.io,\
- javax.microedition.pki,\
- javax.security.auth.x500
-org.osgi.framework.bootdelegation = \
- javax.microedition.io,\
- javax.microedition.pki,\
- javax.security.auth.x500
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2,\
- CDC-1.0/Foundation-1.0,\
- CDC-1.1/Foundation-1.1
-osgi.java.profile.name = CDC-1.1/Foundation-1.1
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.2.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.2.profile
deleted file mode 100644
index ab98b6707..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.2.profile
+++ /dev/null
@@ -1,47 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- org.omg.CORBA,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextPackage
-org.osgi.framework.bootdelegation = \
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- JRE-1.1,\
- J2SE-1.2
-osgi.java.profile.name = J2SE-1.2
-org.eclipse.jdt.core.compiler.compliance=1.2
-org.eclipse.jdt.core.compiler.source=1.2
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.3.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.3.profile
deleted file mode 100644
index da3538e6e..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.3.profile
+++ /dev/null
@@ -1,68 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.naming,\
- javax.naming.directory,\
- javax.naming.event,\
- javax.naming.ldap,\
- javax.naming.spi,\
- javax.rmi,\
- javax.rmi.CORBA,\
- javax.sound.midi,\
- javax.sound.midi.spi,\
- javax.sound.sampled,\
- javax.sound.sampled.spi,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- javax.transaction,\
- org.omg.CORBA,\
- org.omg.CORBA_2_3,\
- org.omg.CORBA_2_3.portable,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextPackage,\
- org.omg.SendingContext,\
- org.omg.stub.java.rmi
-org.osgi.framework.bootdelegation = \
- javax.*,\
- org.omg.*,\
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- JRE-1.1,\
- J2SE-1.2,\
- J2SE-1.3
-osgi.java.profile.name = J2SE-1.3
-org.eclipse.jdt.core.compiler.compliance=1.3
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.4.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.4.profile
deleted file mode 100644
index abaa0c3d6..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.4.profile
+++ /dev/null
@@ -1,129 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.crypto,\
- javax.crypto.interfaces,\
- javax.crypto.spec,\
- javax.imageio,\
- javax.imageio.event,\
- javax.imageio.metadata,\
- javax.imageio.plugins.jpeg,\
- javax.imageio.spi,\
- javax.imageio.stream,\
- javax.naming,\
- javax.naming.directory,\
- javax.naming.event,\
- javax.naming.ldap,\
- javax.naming.spi,\
- javax.net,\
- javax.net.ssl,\
- javax.print,\
- javax.print.attribute,\
- javax.print.attribute.standard,\
- javax.print.event,\
- javax.rmi,\
- javax.rmi.CORBA,\
- javax.security.auth,\
- javax.security.auth.callback,\
- javax.security.auth.kerberos,\
- javax.security.auth.login,\
- javax.security.auth.spi,\
- javax.security.auth.x500,\
- javax.security.cert,\
- javax.sound.midi,\
- javax.sound.midi.spi,\
- javax.sound.sampled,\
- javax.sound.sampled.spi,\
- javax.sql,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- javax.transaction,\
- javax.transaction.xa,\
- javax.xml.parsers,\
- javax.xml.transform,\
- javax.xml.transform.dom,\
- javax.xml.transform.sax,\
- javax.xml.transform.stream,\
- org.ietf.jgss,\
- org.omg.CORBA,\
- org.omg.CORBA_2_3,\
- org.omg.CORBA_2_3.portable,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextExtPackage,\
- org.omg.CosNaming.NamingContextPackage,\
- org.omg.Dynamic,\
- org.omg.DynamicAny,\
- org.omg.DynamicAny.DynAnyFactoryPackage,\
- org.omg.DynamicAny.DynAnyPackage,\
- org.omg.IOP,\
- org.omg.IOP.CodecFactoryPackage,\
- org.omg.IOP.CodecPackage,\
- org.omg.Messaging,\
- org.omg.PortableInterceptor,\
- org.omg.PortableInterceptor.ORBInitInfoPackage,\
- org.omg.PortableServer,\
- org.omg.PortableServer.CurrentPackage,\
- org.omg.PortableServer.POAManagerPackage,\
- org.omg.PortableServer.POAPackage,\
- org.omg.PortableServer.portable,\
- org.omg.PortableServer.ServantLocatorPackage,\
- org.omg.SendingContext,\
- org.omg.stub.java.rmi,\
- org.w3c.dom,\
- org.w3c.dom.css,\
- org.w3c.dom.events,\
- org.w3c.dom.html,\
- org.w3c.dom.stylesheets,\
- org.w3c.dom.views ,\
- org.xml.sax,\
- org.xml.sax.ext,\
- org.xml.sax.helpers
-org.osgi.framework.bootdelegation = \
- javax.*,\
- org.ietf.jgss,\
- org.omg.*,\
- org.w3c.*,\
- org.xml.*,\
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2,\
- JRE-1.1,\
- J2SE-1.2,\
- J2SE-1.3,\
- J2SE-1.4
-osgi.java.profile.name = J2SE-1.4
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.5.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.5.profile
deleted file mode 100644
index e56a9293d..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.5.profile
+++ /dev/null
@@ -1,157 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.activity,\
- javax.crypto,\
- javax.crypto.interfaces,\
- javax.crypto.spec,\
- javax.imageio,\
- javax.imageio.event,\
- javax.imageio.metadata,\
- javax.imageio.plugins.bmp,\
- javax.imageio.plugins.jpeg,\
- javax.imageio.spi,\
- javax.imageio.stream,\
- javax.management,\
- javax.management.loading,\
- javax.management.modelmbean,\
- javax.management.monitor,\
- javax.management.openmbean,\
- javax.management.relation,\
- javax.management.remote,\
- javax.management.remote.rmi,\
- javax.management.timer,\
- javax.naming,\
- javax.naming.directory,\
- javax.naming.event,\
- javax.naming.ldap,\
- javax.naming.spi,\
- javax.net,\
- javax.net.ssl,\
- javax.print,\
- javax.print.attribute,\
- javax.print.attribute.standard,\
- javax.print.event,\
- javax.rmi,\
- javax.rmi.CORBA,\
- javax.rmi.ssl,\
- javax.security.auth,\
- javax.security.auth.callback,\
- javax.security.auth.kerberos,\
- javax.security.auth.login,\
- javax.security.auth.spi,\
- javax.security.auth.x500,\
- javax.security.cert,\
- javax.security.sasl,\
- javax.sound.midi,\
- javax.sound.midi.spi,\
- javax.sound.sampled,\
- javax.sound.sampled.spi,\
- javax.sql,\
- javax.sql.rowset,\
- javax.sql.rowset.serial,\
- javax.sql.rowset.spi,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.plaf.synth,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- javax.transaction,\
- javax.transaction.xa,\
- javax.xml,\
- javax.xml.datatype,\
- javax.xml.namespace,\
- javax.xml.parsers,\
- javax.xml.transform,\
- javax.xml.transform.dom,\
- javax.xml.transform.sax,\
- javax.xml.transform.stream,\
- javax.xml.validation,\
- javax.xml.xpath,\
- org.ietf.jgss,\
- org.omg.CORBA,\
- org.omg.CORBA_2_3,\
- org.omg.CORBA_2_3.portable,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextExtPackage,\
- org.omg.CosNaming.NamingContextPackage,\
- org.omg.Dynamic,\
- org.omg.DynamicAny,\
- org.omg.DynamicAny.DynAnyFactoryPackage,\
- org.omg.DynamicAny.DynAnyPackage,\
- org.omg.IOP,\
- org.omg.IOP.CodecFactoryPackage,\
- org.omg.IOP.CodecPackage,\
- org.omg.Messaging,\
- org.omg.PortableInterceptor,\
- org.omg.PortableInterceptor.ORBInitInfoPackage,\
- org.omg.PortableServer,\
- org.omg.PortableServer.CurrentPackage,\
- org.omg.PortableServer.POAManagerPackage,\
- org.omg.PortableServer.POAPackage,\
- org.omg.PortableServer.portable,\
- org.omg.PortableServer.ServantLocatorPackage,\
- org.omg.SendingContext,\
- org.omg.stub.java.rmi,\
- org.w3c.dom,\
- org.w3c.dom.bootstrap,\
- org.w3c.dom.css,\
- org.w3c.dom.events,\
- org.w3c.dom.html,\
- org.w3c.dom.ls,\
- org.w3c.dom.ranges,\
- org.w3c.dom.stylesheets,\
- org.w3c.dom.traversal,\
- org.w3c.dom.views ,\
- org.xml.sax,\
- org.xml.sax.ext,\
- org.xml.sax.helpers
-org.osgi.framework.bootdelegation = \
- javax.*,\
- org.ietf.jgss,\
- org.omg.*,\
- org.w3c.*,\
- org.xml.*,\
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2,\
- JRE-1.1,\
- J2SE-1.2,\
- J2SE-1.3,\
- J2SE-1.4,\
- J2SE-1.5
-osgi.java.profile.name = J2SE-1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/JRE-1.1.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/JRE-1.1.profile
deleted file mode 100644
index 7bb8b46de..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/JRE-1.1.profile
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages =
-org.osgi.framework.bootdelegation = \
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- JRE-1.1
-osgi.java.profile.name = JRE-1.1
-org.eclipse.jdt.core.compiler.compliance=1.1
-org.eclipse.jdt.core.compiler.source=1.1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/JavaSE-1.6.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/JavaSE-1.6.profile
deleted file mode 100644
index 68e811f69..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/JavaSE-1.6.profile
+++ /dev/null
@@ -1,194 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.activation,\
- javax.activity,\
- javax.annotation,\
- javax.annotation.processing,\
- javax.crypto,\
- javax.crypto.interfaces,\
- javax.crypto.spec,\
- javax.imageio,\
- javax.imageio.event,\
- javax.imageio.metadata,\
- javax.imageio.plugins.bmp,\
- javax.imageio.plugins.jpeg,\
- javax.imageio.spi,\
- javax.imageio.stream,\
- javax.jws,\
- javax.jws.soap,\
- javax.lang.model,\
- javax.lang.model.element,\
- javax.lang.model.type,\
- javax.lang.model.util,\
- javax.management,\
- javax.management.loading,\
- javax.management.modelmbean,\
- javax.management.monitor,\
- javax.management.openmbean,\
- javax.management.relation,\
- javax.management.remote,\
- javax.management.remote.rmi,\
- javax.management.timer,\
- javax.naming,\
- javax.naming.directory,\
- javax.naming.event,\
- javax.naming.ldap,\
- javax.naming.spi,\
- javax.net,\
- javax.net.ssl,\
- javax.print,\
- javax.print.attribute,\
- javax.print.attribute.standard,\
- javax.print.event,\
- javax.rmi,\
- javax.rmi.CORBA,\
- javax.rmi.ssl,\
- javax.script,\
- javax.security.auth,\
- javax.security.auth.callback,\
- javax.security.auth.kerberos,\
- javax.security.auth.login,\
- javax.security.auth.spi,\
- javax.security.auth.x500,\
- javax.security.cert,\
- javax.security.sasl,\
- javax.sound.midi,\
- javax.sound.midi.spi,\
- javax.sound.sampled,\
- javax.sound.sampled.spi,\
- javax.sql,\
- javax.sql.rowset,\
- javax.sql.rowset.serial,\
- javax.sql.rowset.spi,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.plaf.synth,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- javax.tools,\
- javax.transaction,\
- javax.transaction.xa,\
- javax.xml,\
- javax.xml.bind,\
- javax.xml.bind.annotation,\
- javax.xml.bind.annotation.adapters,\
- javax.xml.bind.attachment,\
- javax.xml.bind.helpers,\
- javax.xml.bind.util,\
- javax.xml.crypto,\
- javax.xml.crypto.dom,\
- javax.xml.crypto.dsig,\
- javax.xml.crypto.dsig.dom,\
- javax.xml.crypto.dsig.keyinfo,\
- javax.xml.crypto.dsig.spec,\
- javax.xml.datatype,\
- javax.xml.namespace,\
- javax.xml.parsers,\
- javax.xml.soap,\
- javax.xml.stream,\
- javax.xml.stream.events,\
- javax.xml.stream.util,\
- javax.xml.transform,\
- javax.xml.transform.dom,\
- javax.xml.transform.sax,\
- javax.xml.transform.stax,\
- javax.xml.transform.stream,\
- javax.xml.validation,\
- javax.xml.ws,\
- javax.xml.ws.handler,\
- javax.xml.ws.handler.soap,\
- javax.xml.ws.http,\
- javax.xml.ws.soap,\
- javax.xml.ws.spi,\
- javax.xml.ws.wsaddressing,\
- javax.xml.xpath,\
- org.ietf.jgss,\
- org.omg.CORBA,\
- org.omg.CORBA_2_3,\
- org.omg.CORBA_2_3.portable,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextExtPackage,\
- org.omg.CosNaming.NamingContextPackage,\
- org.omg.Dynamic,\
- org.omg.DynamicAny,\
- org.omg.DynamicAny.DynAnyFactoryPackage,\
- org.omg.DynamicAny.DynAnyPackage,\
- org.omg.IOP,\
- org.omg.IOP.CodecFactoryPackage,\
- org.omg.IOP.CodecPackage,\
- org.omg.Messaging,\
- org.omg.PortableInterceptor,\
- org.omg.PortableInterceptor.ORBInitInfoPackage,\
- org.omg.PortableServer,\
- org.omg.PortableServer.CurrentPackage,\
- org.omg.PortableServer.POAManagerPackage,\
- org.omg.PortableServer.POAPackage,\
- org.omg.PortableServer.portable,\
- org.omg.PortableServer.ServantLocatorPackage,\
- org.omg.SendingContext,\
- org.omg.stub.java.rmi,\
- org.w3c.dom,\
- org.w3c.dom.bootstrap,\
- org.w3c.dom.css,\
- org.w3c.dom.events,\
- org.w3c.dom.html,\
- org.w3c.dom.ls,\
- org.w3c.dom.ranges,\
- org.w3c.dom.stylesheets,\
- org.w3c.dom.traversal,\
- org.w3c.dom.views,\
- org.w3c.dom.xpath,\
- org.xml.sax,\
- org.xml.sax.ext,\
- org.xml.sax.helpers
-org.osgi.framework.bootdelegation = \
- javax.*,\
- org.ietf.jgss,\
- org.omg.*,\
- org.w3c.*,\
- org.xml.*,\
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2,\
- JRE-1.1,\
- J2SE-1.2,\
- J2SE-1.3,\
- J2SE-1.4,\
- J2SE-1.5,\
- JavaSE-1.6
-osgi.java.profile.name = JavaSE-1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.source=1.6
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.0.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.0.profile
deleted file mode 100644
index 773501a52..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.0.profile
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages =
-org.osgi.framework.bootdelegation = \
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0
-osgi.java.profile.name = OSGi/Minimum-1.0
-org.eclipse.jdt.core.compiler.compliance=1.3
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.1.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.1.profile
deleted file mode 100644
index 5031392b7..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.1.profile
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages =
-org.osgi.framework.bootdelegation = \
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1
-osgi.java.profile.name = OSGi/Minimum-1.1
-org.eclipse.jdt.core.compiler.compliance=1.3
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.2.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.2.profile
deleted file mode 100644
index 601b37379..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.2.profile
+++ /dev/null
@@ -1,24 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.security.auth.x500
-org.osgi.framework.bootdelegation = \
- javax.security.auth.x500
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2
-osgi.java.profile.name = OSGi/Minimum-1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Activator.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Activator.java
deleted file mode 100644
index 80380db60..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Activator.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.publisher;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
- public static BundleContext context = null;
- public static String ID = "org.eclipse.equinox.p2.publisher"; //$NON-NLS-1$
-
- public static BundleContext getContext() {
- return context;
- }
-
- public void start(BundleContext bundleContext) throws Exception {
- Activator.context = bundleContext;
- }
-
- public void stop(BundleContext bundleContext) throws Exception {
- Activator.context = null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/FileSetDescriptor.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/FileSetDescriptor.java
deleted file mode 100644
index aa1c2d235..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/FileSetDescriptor.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- * IBM Corporation - Ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.publisher;
-
-import java.io.File;
-import java.util.*;
-
-public class FileSetDescriptor {
- private final String key;
- private String configSpec = null;
- private HashSet<File> fileset = new HashSet<File>();
- private final ArrayList<String[]> permissions = new ArrayList<String[]>();
- private String links = ""; //$NON-NLS-1$
-
- public FileSetDescriptor(String key, String configSpec) {
- this.key = key;
- this.configSpec = configSpec;
- }
-
- public void addFiles(File[] files) {
- fileset.addAll(Arrays.asList(files));
- }
-
- // a permission spec is { <perm>, file patterns }
- public void addPermissions(String[] property) {
- permissions.add(property);
- }
-
- public void setLinks(String property) {
- links = property;
- }
-
- public String getConfigSpec() {
- return configSpec;
- }
-
- public String getKey() {
- return key;
- }
-
- public String getLinks() {
- return links;
- }
-
- public String[][] getPermissions() {
- return permissions.toArray(new String[permissions.size()][]);
- }
-
- public File[] getFiles() {
- return fileset.toArray(new File[fileset.size()]);
- }
-
- public int size() {
- return fileset.size();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Messages.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Messages.java
deleted file mode 100644
index 52637b19c..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/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.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_noArtifactRepo;
- public static String exception_noMetadataRepo;
- public static String exception_noBundlesOrLocations;
- public static String exception_noFeaturesOrLocations;
- public static String exception_invalidSiteReference;
- public static String exception_invalidSiteReferenceInFeature;
- public static String exception_repoMustBeURL;
- public static String exception_sourcePath;
-
- public static String message_generatingMetadata;
- public static String message_generationCompleted;
- public static String message_noSimpleconfigurator;
-
- public static String exception_artifactRepoNoAppendDestroysInput;
-
- public static String error_rootIU_generation;
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/QuotedTokenizer.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/QuotedTokenizer.java
deleted file mode 100644
index d66af45cb..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/QuotedTokenizer.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.publisher;
-
-import java.io.*;
-import java.util.Enumeration;
-import java.util.NoSuchElementException;
-
-/**
- * Tokenzier which supports quoting using '"'
- * The resulting tokens will not contain the quote character '"' unless it was escaped '\"'
- */
-public class QuotedTokenizer implements Enumeration<String> {
- private StreamTokenizer tokenizer = null;
-
- /**
- * Default delimiter is whitespace characters
- * @param str - String to be tokenized
- */
- public QuotedTokenizer(String str) {
- this(str, null);
- }
-
- /**
- * Tokenize based on the given delimiters. The quote character '"' can not be
- * used as a delimiter.
- * @param str - String to be tokenized
- * @param delim - delimiter characters
- * @throws IllegalArgumentException if delim contains the quote character '"'
- */
- public QuotedTokenizer(String str, String delim) {
- if (delim != null && delim.indexOf('"') > -1)
- throw new IllegalArgumentException();
-
- StringReader reader = new StringReader(str);
- tokenizer = new StreamTokenizer(reader);
-
- tokenizer.resetSyntax();
- if (delim == null)
- tokenizer.ordinaryChars(0, 0x20);
- else
- tokenizer.wordChars(0, 0x20);
- tokenizer.wordChars(0x21, 0xFF); //characters > 0xFF are also word chars
- tokenizer.quoteChar('"');
-
- if (delim != null) {
- for (int i = 0; i < delim.length(); i++) {
- tokenizer.ordinaryChar(delim.charAt(i));
- }
- }
- }
-
- /**
- * Test to see if more tokens are available
- * @return true if there is another token
- */
- public boolean hasMoreTokens() {
- return (token(null) != StreamTokenizer.TT_EOF);
- }
-
- /**
- * Return the next token,
- * @return the next token
- * @throws NoSuchElementException if there are no more tokens
- */
- public String nextToken() {
- StringBuffer buffer = new StringBuffer(10);
- int tokenType = token(buffer);
-
- if (tokenType == StreamTokenizer.TT_EOF)
- throw new NoSuchElementException();
-
- return buffer.toString();
- }
-
- /**
- * Get the next token, or check that there is a next token
- * @param buffer to hold the token, or null if we just want to know if there is one
- */
- private int token(StringBuffer buffer) {
- int tokenType = 0;
- int next = 0;
-
- get_token: while (true) {
- try {
- tokenType = tokenizer.nextToken();
- } catch (IOException e) {
- tokenType = StreamTokenizer.TT_EOF;
- }
- switch (tokenType) {
- case StreamTokenizer.TT_WORD :
- case '"' :
- if (buffer == null) {
- //we just wanted to know if there was something coming
- tokenizer.pushBack();
- return tokenType;
- }
- buffer.append(tokenizer.sval);
-
- // peek at the next token,
- try {
- next = tokenizer.nextToken();
- tokenizer.pushBack();
- } catch (IOException e) {
- next = StreamTokenizer.TT_EOF;
- }
-
- //if the next token is a quote, it is still this token, otherwise we are done
- if (next == '"')
- continue;
- break get_token;
- case StreamTokenizer.TT_EOF :
- break get_token;
- default :
- //ordinary char from delim, if we have something we are done, otherwise keep looking for a token
- if (buffer != null && buffer.length() > 0)
- break get_token;
- continue;
- }
- }
- return tokenType;
- }
-
- public boolean hasMoreElements() {
- return hasMoreTokens();
- }
-
- public String nextElement() {
- return nextToken();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java
deleted file mode 100644
index 5878b640c..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java
+++ /dev/null
@@ -1,544 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Code 9 - Additional function and fixes
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.publisher.eclipse;
-
-import java.io.*;
-import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
-import org.eclipse.equinox.internal.p2.swt.tools.IconExe;
-
-/**
- *
- */
-public class BrandingIron {
- private static final String MARKER_NAME = "%EXECUTABLE_NAME%"; //$NON-NLS-1$
- private static final String BUNDLE_NAME = "%BUNDLE_NAME%"; //$NON-NLS-1$
- private static final String ICON_NAME = "%ICON_NAME%"; //$NON-NLS-1$
- private static final String MARKER_KEY = "<key>CFBundleExecutable</key>"; //$NON-NLS-1$
- private static final String BUNDLE_KEY = "<key>CFBundleName</key>"; //$NON-NLS-1$
- private static final String ICON_KEY = "<key>CFBundleIconFile</key>"; //$NON-NLS-1$
- private static final String STRING_START = "<string>"; //$NON-NLS-1$
- private static final String STRING_END = "</string>"; //$NON-NLS-1$
- private static final String XDOC_ICON = "-Xdock:icon=../Resources/Eclipse.icns"; //$NON-NLS-1$
- private static final String XDOC_ICON_PREFIX = "-Xdock:icon=../Resources/"; //$NON-NLS-1$
-
- private String[] icons = null;
- private String root;
- private String name;
- private String os = "win32"; //$NON-NLS-1$
- private boolean brandIcons = true;
-
- public void setName(String value) {
- name = value;
- }
-
- public void setIcons(String[] value) {
- icons = value;
- }
-
- public void setIcons(String value) {
- icons = Utils.getTokens(value, ",");//$NON-NLS-1$
- if (icons[0].startsWith("${")) { //$NON-NLS-1$
- if (icons.length > 1) {
- String[] temp = new String[icons.length - 1];
- System.arraycopy(icons, 1, temp, 0, temp.length);
- icons = temp;
- } else {
- icons = null;
- }
- }
- //trim whitespace
- if (icons != null) {
- for (int i = 0; i < icons.length; i++) {
- icons[i] = icons[i].trim();
- }
- }
- }
-
- public void setRoot(String value) {
- root = value;
- }
-
- public void brand() throws Exception {
- // if the name property is not set it will be ${launcher.name} so just bail.
- if (name.startsWith("${")) //$NON-NLS-1$
- return;
-
- if (icons == null || icons[0].startsWith("${")) //$NON-NLS-1$
- brandIcons = false;
-
- // if the root does not exists (happens in some packaging cases) or
- // there is already a file with target name and we don't need to update its icons, don't do anything
- String testName = os.equals("win32") ? name + ".exe" : name; //$NON-NLS-1$ //$NON-NLS-2$
- if (!new File(root).exists() || (!brandIcons && new File(root, testName).exists()))
- return;
-
- if ("win32".equals(os)) //$NON-NLS-1$
- brandWindows();
- else if ("linux".equals(os)) //$NON-NLS-1$
- brandLinux();
- else if ("solaris".equals(os)) //$NON-NLS-1$
- brandSolaris();
- else if ("macosx".equals(os)) //$NON-NLS-1$
- brandMac();
- else if ("aix".equals(os)) //$NON-NLS-1$
- brandAIX();
- else if ("hpux".equals(os)) //$NON-NLS-1$
- brandHPUX();
- else
- renameLauncher();
- }
-
- private void brandAIX() {
- renameLauncher();
- }
-
- private void brandHPUX() {
- renameLauncher();
- }
-
- private void brandLinux() throws Exception {
- renameLauncher();
- if (brandIcons)
- copy(new File(icons[0]), new File(root, "icon.xpm")); //$NON-NLS-1$
- }
-
- private void brandSolaris() throws Exception {
- renameLauncher();
- if (brandIcons == false)
- return;
-
- for (int i = 0; i < icons.length; i++) {
- String icon = icons[i];
- if (icon.endsWith(".l.pm")) //$NON-NLS-1$
- copy(new File(icon), new File(root, name + ".l.pm")); //$NON-NLS-1$
- if (icon.endsWith(".m.pm")) //$NON-NLS-1$
- copy(new File(icon), new File(root, name + ".m.pm")); //$NON-NLS-1$
- if (icon.endsWith(".s.pm")) //$NON-NLS-1$
- copy(new File(icon), new File(root, name + ".s.pm")); //$NON-NLS-1$
- if (icon.endsWith(".t.pm")) //$NON-NLS-1$
- copy(new File(icon), new File(root, name + ".t.pm")); //$NON-NLS-1$
- }
- }
-
- private void brandMac() throws Exception {
- //Initially the files are in: <root>/Eclipse.app/
- //and they must appear in <root>/MyAppName.app/
- //Because java does not support the rename of a folder, files are copied.
-
- //Initialize the target folders
- String appName = name;
- if (appName.equals("eclipse")) //$NON-NLS-1$
- appName = "Eclipse"; //$NON-NLS-1$
- else if (appName.equals("launcher")) //$NON-NLS-1$
- appName = "Launcher"; //$NON-NLS-1$
-
- String target = root + '/' + appName + ".app/Contents"; //$NON-NLS-1$
- new File(target).mkdirs();
- new File(target + "/MacOS").mkdirs(); //$NON-NLS-1$
- new File(target + "/Resources").mkdirs(); //$NON-NLS-1$
-
- String initialRoot = root + "/Launcher.app/Contents"; //$NON-NLS-1$
- if (!new File(initialRoot).exists())
- initialRoot = root + "/Eclipse.app/Contents"; //$NON-NLS-1$
- copyMacLauncher(initialRoot, target);
- String iconName = ""; //$NON-NLS-1$
- File splashApp = new File(initialRoot, "Resources/Splash.app"); //$NON-NLS-1$
- if (brandIcons) {
- File icon = new File(icons[0]);
- iconName = icon.getName();
- copy(icon, new File(target + "/Resources/" + icon.getName())); //$NON-NLS-1$
- new File(initialRoot + "/Resources/Eclipse.icns").delete(); //$NON-NLS-1$
- if (!splashApp.exists())
- new File(initialRoot + "/Resources/").delete(); //$NON-NLS-1$
- }
- copyMacIni(initialRoot, target, iconName);
- modifyInfoPListFile(initialRoot, target, iconName);
- if (splashApp.exists()) {
- brandMacSplash(initialRoot, target, iconName);
- }
-
- File rootFolder = getCanonicalFile(new File(initialRoot));
- File targetFolder = getCanonicalFile(new File(target));
- if (!rootFolder.equals(targetFolder)) {
- rootFolder.delete();
- if (rootFolder.exists()) {
- //if the rootFolder still exists, its because there were other files that need to be moved over
- moveContents(rootFolder, targetFolder);
- }
- rootFolder.getParentFile().delete();
- }
- }
-
- /**
- * Brand the splash.app Info.plist and link or copy the mac launcher.
- * It is assumed that the mac launcher has been branded already.
- * @param initialRoot
- * @param target
- * @param iconName
- */
- private void brandMacSplash(String initialRoot, String target, String iconName) {
- String splashContents = "/Resources/Splash.app/Contents"; //$NON-NLS-1$
- modifyInfoPListFile(initialRoot + splashContents, target + splashContents, iconName);
-
- //link the MacOS launcher for the splash app
- int result = -1;
- String osName = System.getProperty("os.name"); //$NON-NLS-1$
- if (osName != null && !osName.startsWith("Windows")) { //$NON-NLS-1$
- try {
- String[] command = new String[] {"ln", "-sf", "../../../MacOS/" + name, "MacOS/" + name}; //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
- File linkDir = new File(target, splashContents);
- Process proc = Runtime.getRuntime().exec(command, null, linkDir);
- result = proc.waitFor();
- } catch (IOException e) {
- // ignore
- } catch (InterruptedException e) {
- // ignore
- }
- }
-
- if (result != 0) {
- //ln failed, or we are on windows, just copy the executable instead
- File macOSDir = new File(target, "MacOS"); //$NON-NLS-1$
- File splashMacOSDir = new File(target, splashContents + "/MacOS"); //$NON-NLS-1$
- splashMacOSDir.mkdirs();
- try {
- File targetFile = new File(splashMacOSDir, name);
- copy(new File(macOSDir, name), targetFile);
- try {
- Runtime.getRuntime().exec(new String[] {"chmod", "755", targetFile.getAbsolutePath()}); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (IOException e) {
- // ignore
- }
- } catch (IOException e) {
- System.out.println("Could not copy macosx splash launcher"); //$NON-NLS-1$
- }
- }
- }
-
- private void moveContents(File source, File target) {
- if (!source.exists())
- return;
-
- try {
- if (source.getCanonicalFile().equals(target.getCanonicalFile()))
- return;
- } catch (IOException e) {
- System.out.println("Could not copy macosx resources."); //$NON-NLS-1$
- return;
- }
-
- target.getParentFile().mkdirs();
- if (source.isDirectory()) {
- target.mkdirs();
- File[] contents = source.listFiles();
- for (int i = 0; i < contents.length; i++) {
- File dest = new File(target, contents[i].getName());
- if (contents[i].isFile())
- contents[i].renameTo(dest);
- else
- moveContents(contents[i], dest);
- }
- source.delete();
- } else {
- source.renameTo(target);
- }
- }
-
- private void brandWindows() throws Exception {
- File templateLauncher = new File(root, name + ".exe"); //$NON-NLS-1$
- if (!templateLauncher.exists())
- templateLauncher = new File(root, "launcher.exe"); //$NON-NLS-1$
- if (!templateLauncher.exists())
- templateLauncher = new File(root, "eclipse.exe"); //$NON-NLS-1$
- if (brandIcons) {
- if (templateLauncher.exists()) {
- String[] args = new String[icons.length + 1];
- args[0] = templateLauncher.getAbsolutePath();
- System.arraycopy(icons, 0, args, 1, icons.length);
- IconExe.main(args);
- }
- }
- if (templateLauncher.exists() && !templateLauncher.getName().equals(name + ".exe")) //$NON-NLS-1$
- templateLauncher.renameTo(new File(root, name + ".exe")); //$NON-NLS-1$
- }
-
- private void renameLauncher() {
- if (!new File(root, "launcher").renameTo(new File(root, name))) //$NON-NLS-1$
- new File(root, "eclipse").renameTo(new File(root, name)); //$NON-NLS-1$
- }
-
- private void copyMacLauncher(String initialRoot, String target) {
- String targetLauncher = target + "/MacOS/"; //$NON-NLS-1$
- File launcher = getCanonicalFile(new File(initialRoot + "/MacOS/launcher")); //$NON-NLS-1$
- File eclipseLauncher = getCanonicalFile(new File(initialRoot + "/MacOS/eclipse")); //$NON-NLS-1$
- File targetFile = getCanonicalFile(new File(targetLauncher, name));
- if (!launcher.exists()) {
- launcher = eclipseLauncher;
- } else if (eclipseLauncher.exists() && !targetFile.equals(eclipseLauncher)) {
- //we may actually have both if exporting from the mac
- eclipseLauncher.delete();
- }
- try {
- if (targetFile.equals(launcher)) {
- try {
- //Force the executable bit on the exe because it has been lost when copying the file
- Runtime.getRuntime().exec(new String[] {"chmod", "755", targetFile.getAbsolutePath()}); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (IOException e) {
- //ignore
- }
- return;
- }
- copy(launcher, targetFile);
- } catch (IOException e) {
- System.out.println("Could not copy macosx launcher"); //$NON-NLS-1$
- return;
- }
- try {
- //Force the executable bit on the exe because it has been lost when copying the file
- Runtime.getRuntime().exec(new String[] {"chmod", "755", targetFile.getAbsolutePath()}); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (IOException e) {
- //ignore
- }
- launcher.delete();
- launcher.getParentFile().delete();
- }
-
- private File getCanonicalFile(File file) {
- try {
- return file.getCanonicalFile();
- } catch (IOException e) {
- return file;
- }
- }
-
- private void copyMacIni(String initialRoot, String target, String iconName) {
- // 3 possibilities, in order of preference:
- // rcp.app/Contents/MacOS/rcp.ini (targetFile)
- // Eclipse.app/Contents/MacOS/rcp.ini (brandedIni)
- // Eclipse.app/Contents/MacOs/eclipse.ini (ini)
- File targetFile = getCanonicalFile(new File(target, "/MacOS/" + name + ".ini")); //$NON-NLS-1$//$NON-NLS-2$
- File brandedIni = getCanonicalFile(new File(initialRoot, "/MacOS/" + name + ".ini")); //$NON-NLS-1$ //$NON-NLS-2$
- File ini = getCanonicalFile(new File(initialRoot, "/MacOS/eclipse.ini")); //$NON-NLS-1$
-
- if (targetFile.exists()) {
- //an ini already exists at the target, use that
- if (brandedIni.exists() && !brandedIni.equals(targetFile))
- brandedIni.delete();
- if (ini.exists() && !ini.equals(targetFile))
- ini.delete();
- ini = targetFile;
- } else if (brandedIni.exists()) {
- //take the one that is already branded
- if (ini.exists() && !ini.equals(brandedIni))
- ini.delete();
- ini = brandedIni;
- } else if (!ini.exists()) {
- return;
- }
-
- StringBuffer buffer;
- try {
- buffer = readFile(ini);
- } catch (IOException e) {
- System.out.println("Impossible to brand ini file"); //$NON-NLS-1$
- return;
- }
-
- if (iconName.length() > 0) {
- int xdoc = scan(buffer, 0, XDOC_ICON);
- if (xdoc != -1) {
- String icns = XDOC_ICON_PREFIX + iconName;
- buffer.replace(xdoc, xdoc + XDOC_ICON.length(), icns);
- }
- }
-
- try {
- transferStreams(new ByteArrayInputStream(buffer.toString().getBytes()), new FileOutputStream(targetFile));
- if (!ini.equals(targetFile))
- ini.delete();
- } catch (FileNotFoundException e) {
- System.out.println("Impossible to brand ini file"); //$NON-NLS-1$
- return;
- } catch (IOException e) {
- System.out.println("Impossible to brand ini file"); //$NON-NLS-1$
- return;
- }
- }
-
- private void modifyInfoPListFile(String initialRoot, String targetRoot, String iconName) {
- File infoPList = new File(initialRoot, "Info.plist"); //$NON-NLS-1$
- StringBuffer buffer;
- try {
- buffer = readFile(infoPList);
- } catch (IOException e) {
- System.out.println("Impossible to brand info.plist file"); //$NON-NLS-1$
- return;
- }
- int exePos = scan(buffer, 0, MARKER_NAME);
- if (exePos != -1)
- buffer.replace(exePos, exePos + MARKER_NAME.length(), name);
- else {
- exePos = scan(buffer, 0, MARKER_KEY);
- if (exePos != -1) {
- int start = scan(buffer, exePos + MARKER_KEY.length(), STRING_START);
- int end = scan(buffer, start + STRING_START.length(), STRING_END);
- if (start > -1 && end > start) {
- buffer.replace(start + STRING_START.length(), end, name);
- }
- }
- }
-
- int bundlePos = scan(buffer, 0, BUNDLE_NAME);
- if (bundlePos != -1)
- buffer.replace(bundlePos, bundlePos + BUNDLE_NAME.length(), name);
- else {
- exePos = scan(buffer, 0, BUNDLE_KEY);
- if (exePos != -1) {
- int start = scan(buffer, exePos + BUNDLE_KEY.length(), STRING_START);
- int end = scan(buffer, start + STRING_START.length(), STRING_END);
- if (start > -1 && end > start) {
- buffer.replace(start + STRING_START.length(), end, name);
- }
- }
- }
-
- int iconPos = scan(buffer, 0, ICON_NAME);
- if (iconPos != -1)
- buffer.replace(iconPos, iconPos + ICON_NAME.length(), iconName);
- else {
- exePos = scan(buffer, 0, ICON_KEY);
- if (exePos != -1) {
- int start = scan(buffer, exePos + ICON_KEY.length(), STRING_START);
- int end = scan(buffer, start + STRING_START.length(), STRING_END);
- if (start > -1 && end > start) {
- buffer.replace(start + STRING_START.length(), end, iconName);
- }
- }
- }
-
- File target = null;
- try {
- target = new File(targetRoot, "Info.plist"); //$NON-NLS-1$
- target.getParentFile().mkdirs();
- transferStreams(new ByteArrayInputStream(buffer.toString().getBytes()), new FileOutputStream(target));
- } catch (FileNotFoundException e) {
- System.out.println("Impossible to brand info.plist file"); //$NON-NLS-1$
- return;
- } catch (IOException e) {
- System.out.println("Impossible to brand info.plist file"); //$NON-NLS-1$
- return;
- }
- try {
- if (!infoPList.getCanonicalFile().equals(target.getCanonicalFile()))
- infoPList.delete();
- } catch (IOException e) {
- //ignore
- }
- }
-
- /**
- * Transfers all available bytes from the given input stream to the given output stream.
- * Regardless of failure, this method closes both streams.
- * @throws IOException
- */
- public void copy(File source, File destination) throws IOException {
- InputStream in = null;
- OutputStream out = null;
- try {
- in = new BufferedInputStream(new FileInputStream(source));
- out = new BufferedOutputStream(new FileOutputStream(destination));
- final byte[] buffer = new byte[8192];
- while (true) {
- int bytesRead = -1;
- bytesRead = in.read(buffer);
- if (bytesRead == -1)
- break;
- out.write(buffer, 0, bytesRead);
- }
- } finally {
- try {
- if (in != null)
- in.close();
- } finally {
- if (out != null)
- out.close();
- }
- }
- }
-
- private int scan(StringBuffer buf, int start, String targetName) {
- return scan(buf, start, new String[] {targetName});
- }
-
- private int scan(StringBuffer buf, int start, String[] targets) {
- for (int i = start; i < buf.length(); i++) {
- for (int j = 0; j < targets.length; j++) {
- if (i < buf.length() - targets[j].length()) {
- String match = buf.substring(i, i + targets[j].length());
- if (targets[j].equalsIgnoreCase(match))
- return i;
- }
- }
- }
- return -1;
- }
-
- private StringBuffer readFile(File targetName) throws IOException {
- InputStreamReader reader = new InputStreamReader(new BufferedInputStream(new FileInputStream(targetName)));
- StringBuffer result = new StringBuffer();
- char[] buf = new char[4096];
- int count;
- try {
- count = reader.read(buf, 0, buf.length);
- while (count != -1) {
- result.append(buf, 0, count);
- count = reader.read(buf, 0, buf.length);
- }
- } finally {
- try {
- reader.close();
- } catch (IOException e) {
- // ignore exceptions here
- }
- }
- return result;
- }
-
- private void transferStreams(InputStream source, OutputStream destination) throws IOException {
- source = new BufferedInputStream(source);
- destination = new BufferedOutputStream(destination);
- try {
- byte[] buffer = new byte[8192];
- while (true) {
- int bytesRead = -1;
- if ((bytesRead = source.read(buffer)) == -1)
- break;
- destination.write(buffer, 0, bytesRead);
- }
- } finally {
- try {
- source.close();
- } catch (IOException e) {
- // ignore
- }
- try {
- destination.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-
- public void setOS(String value) {
- os = value;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/messages.properties b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/messages.properties
deleted file mode 100644
index fb2d606b2..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_noPluginConverter=Unable to acquire PluginConverter service during generation for: {0}.
-exception_noArtifactRepo=An artifact repository must be specified in order to publish artifacts.
-exception_noMetadataRepo=A metadata repository must be specified.
-exception_invalidSiteReference=Invalid site reference: {0}
-exception_invalidSiteReferenceInFeature=Invalid site reference {0} in feature {1}.
-exception_repoMustBeURL=Repository location ({0}) must be a URL.
-exception_sourcePath=Source location ({0}) must be a valid file-system path.
-message_generatingMetadata = Generating metadata for {0}.
-message_generationCompleted = Generation completed with success [{0} seconds].
-message_noSimpleconfigurator = Could not find simpleconfigurator bundle.
-exception_artifactRepoNoAppendDestroysInput = Not appending to artifact repository ({0}) may destroy input files.
-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/p2/publisher/AbstractAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractAdvice.java
deleted file mode 100644
index 457323fc7..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractAdvice.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher;
-
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
-public class AbstractAdvice implements IPublisherAdvice {
-
- public boolean isApplicable(String configSpec, boolean includeDefault, String id, Version version) {
- return matchConfig(configSpec, includeDefault) && matchId(id) && matchVersion(version);
- }
-
- protected boolean matchVersion(Version version) {
- if (version == null)
- return true;
- Version adviceVersion = getVersion();
- if (adviceVersion != null)
- return version.equals(adviceVersion);
- VersionRange range = getVersionRange();
- if (range != null)
- return range.isIncluded(version);
- return true;
- }
-
- protected Version getVersion() {
- return null;
- }
-
- protected VersionRange getVersionRange() {
- return null;
- }
-
- protected boolean matchId(String id) {
- if (id == null)
- return true;
- String adviceId = getId();
- return adviceId == null ? true : adviceId.equals(id);
- }
-
- protected String getId() {
- return null;
- }
-
- protected boolean matchConfig(String configSpec, boolean includeDefault) {
- String adviceConfigSpec = getConfigSpec();
- if (adviceConfigSpec == null)
- return includeDefault;
- String[] full = AbstractPublisherAction.parseConfigSpec(configSpec);
- String[] partial = AbstractPublisherAction.parseConfigSpec(adviceConfigSpec);
- for (int i = 0; i < partial.length; i++) {
- String string = partial[i];
- if (string != null && !string.equals(full[i]))
- return false;
- }
- return true;
- }
-
- protected String getConfigSpec() {
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java
deleted file mode 100644
index 5c2aa81ba..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java
+++ /dev/null
@@ -1,533 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher;
-
-import java.io.*;
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactDescriptor;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
-import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.internal.p2.publisher.QuotedTokenizer;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.publisher.actions.*;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-
-public abstract class AbstractPublisherAction implements IPublisherAction {
- public static final String CONFIG_ANY = "ANY"; //$NON-NLS-1$
- public static final String CONFIG_SEGMENT_SEPARATOR = "."; //$NON-NLS-1$
-
- protected IPublisherInfo info;
-
- /**
- * Convert a list of tokens into an array. The list separator has to be
- * specified.
- */
- public static String[] getArrayFromString(String list, String separator) {
- if (list == null || list.trim().equals("")) //$NON-NLS-1$
- return new String[0];
- List<String> result = new ArrayList<String>();
- for (QuotedTokenizer tokens = new QuotedTokenizer(list, separator); tokens.hasMoreTokens();) {
- String token = tokens.nextToken().trim();
- if (!token.equals("")) //$NON-NLS-1$
- result.add(token);
- }
- return result.toArray(new String[result.size()]);
- }
-
- /**
- * Returns a string array of { ws, os, arch } as parsed from the given string
- * @param configSpec the string to parse
- * @return the ws, os, arch form of the given string
- */
- public static String[] parseConfigSpec(String configSpec) {
- String[] result = getArrayFromString(configSpec, CONFIG_SEGMENT_SEPARATOR);
- for (int i = 0; i < result.length; i++)
- if (result[i].equals("*")) //$NON-NLS-1$
- result[i] = CONFIG_ANY;
-
- if (result.length < 3) {
- String[] temp = new String[3];
- System.arraycopy(result, 0, temp, 0, result.length);
- for (int i = result.length; i < temp.length; i++) {
- temp[i] = CONFIG_ANY;
- }
- result = temp;
- }
- return result;
- }
-
- /**
- * Returns the canonical form of config spec with the given ws, os and arch.
- * Note that the result is intended to be machine readable (i.e., parseConfigSpec
- * will parse the the result).
- * @param ws the window system
- * @param os the operating system
- * @param arch the machine architecture
- * @return the machine readable format of the given config spec
- */
- public static String createConfigSpec(String ws, String os, String arch) {
- return ws + '.' + os + '.' + arch;
- }
-
- protected void addSelfCapability(InstallableUnitDescription root) {
- root.setCapabilities(new IProvidedCapability[] {createSelfCapability(root.getId(), root.getVersion())});
- }
-
- /**
- * Returns the LDAP filter form that matches the given config spec. Returns
- * an empty String if the spec does not identify an ws, os or arch.
- * @param configSpec a config spec to filter
- * @return the LDAP filter for the given spec. <code>null</code> if the given spec does not
- * parse into a filter.
- */
- protected IMatchExpression<IInstallableUnit> createFilterSpec(String configSpec) {
- String[] config = parseConfigSpec(configSpec);
- if (config[0] != null || config[1] != null || config[2] != null) {
- String filterWs = config[0] != null && config[0] != CONFIG_ANY ? "(osgi.ws=" + config[0] + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- String filterOs = config[1] != null && config[1] != CONFIG_ANY ? "(osgi.os=" + config[1] + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- String filterArch = config[2] != null && config[2] != CONFIG_ANY ? "(osgi.arch=" + config[2] + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if (filterWs.length() == 0 && filterOs.length() == 0 && filterArch.length() == 0)
- return null;
- return InstallableUnit.parseFilter("(& " + filterWs + filterOs + filterArch + ")"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return null;
- }
-
- protected boolean filterMatches(IMatchExpression<IInstallableUnit> filter, String configSpec) {
- if (filter == null)
- return true;
-
- String[] config = parseConfigSpec(configSpec);
- return filter.isMatch(InstallableUnit.contextIU(config[0], config[1], config[2]));
- }
-
- /**
- * Returns the normalized string form of the given config spec. This is useful for putting
- * in IU ids etc. Note that the result is not intended to be machine readable (i.e., parseConfigSpec
- * may not work on the result).
- * @param configSpec the config spec to format
- * @return the readable format of the given config spec
- */
- protected String createIdString(String configSpec) {
- String[] config = parseConfigSpec(configSpec);
- return config[0] + '.' + config[1] + '.' + config[2];
- }
-
- protected String createCUIdString(String id, String type, String flavor, String configSpec) {
- return flavor + id + "." + type + "." + createIdString(configSpec); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Creates and returns a collection of RequiredCapabilities for the IUs represented
- * by the given collection. The collection may include a mixture of IInstallableUnits
- * or VersionedNames.
- * @param children descriptions of the IUs on which requirements are to be made
- * @return a collection of RequiredCapabilities representing the given IUs
- */
- protected Collection<IRequirement> createIURequirements(Collection<? extends IVersionedId> children) {
- ArrayList<IRequirement> result = new ArrayList<IRequirement>(children.size());
- for (IVersionedId next : children) {
- if (next instanceof IInstallableUnit) {
- IInstallableUnit iu = (IInstallableUnit) next;
- VersionRange range = new VersionRange(iu.getVersion(), true, iu.getVersion(), true);
- result.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, iu.getFilter() == null ? null : iu.getFilter(), false, false));
- } else {
- Version version = next.getVersion();
- VersionRange range = (version == null || Version.emptyVersion.equals(version)) ? VersionRange.emptyRange : new VersionRange(version, true, version, true);
- IMatchExpression<IInstallableUnit> filter = getFilterAdvice(next);
- result.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, next.getId(), range, filter, false, false));
- }
- }
- return result;
- }
-
- private IMatchExpression<IInstallableUnit> getFilterAdvice(IVersionedId name) {
- if (info == null)
- return null;
- Collection<IFilterAdvice> filterAdvice = info.getAdvice(CONFIG_ANY, true, name.getId(), name.getVersion(), IFilterAdvice.class);
- for (IFilterAdvice advice : filterAdvice) {
- IMatchExpression<IInstallableUnit> result = advice.getFilter(name.getId(), name.getVersion(), false);
- if (result != null)
- return result;
- }
- return null;
- }
-
- protected InstallableUnitDescription createIUShell(String id, Version version) {
- InstallableUnitDescription root = new MetadataFactory.InstallableUnitDescription();
- root.setId(id);
- root.setVersion(version);
- return root;
- }
-
- protected IArtifactDescriptor createPack200ArtifactDescriptor(IArtifactKey key, File pathOnDisk, String installSize) {
- //TODO this size calculation is bogus
- ArtifactDescriptor result = new ArtifactDescriptor(key);
- if (pathOnDisk != null) {
- result.setProperty(IArtifactDescriptor.ARTIFACT_SIZE, installSize);
- // TODO - this is wrong but I'm testing a work-around for bug 205842
- result.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, Long.toString(pathOnDisk.length()));
- }
- IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
- result.setProcessingSteps(steps);
- result.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
- return result;
- }
-
- protected InstallableUnitDescription createParentIU(Collection<? extends IVersionedId> children, String id, Version version) {
- InstallableUnitDescription root = createIUShell(id, version);
- root.addRequirements(createIURequirements(children));
- addSelfCapability(root);
- return root;
- }
-
- //This is to hide FileUtils from other actions
- protected IPathComputer createParentPrefixComputer(int segmentsToKeep) {
- return FileUtils.createParentPrefixComputer(segmentsToKeep);
- }
-
- //This is to hide FileUtils from other actions
- protected IPathComputer createRootPrefixComputer(final File root) {
- return FileUtils.createRootPathComputer(root);
- }
-
- protected IProvidedCapability createSelfCapability(String installableUnitId, Version installableUnitVersion) {
- return MetadataFactory.createProvidedCapability(PublisherHelper.IU_NAMESPACE, installableUnitId, installableUnitVersion);
- }
-
- protected static InstallableUnitDescription[] processAdditionalInstallableUnitsAdvice(IInstallableUnit iu, IPublisherInfo publisherInfo) {
- Collection<IAdditionalInstallableUnitAdvice> advice = publisherInfo.getAdvice(null, false, iu.getId(), iu.getVersion(), IAdditionalInstallableUnitAdvice.class);
- if (advice.isEmpty())
- return null;
-
- List<InstallableUnitDescription> ius = new ArrayList<InstallableUnitDescription>();
- for (IAdditionalInstallableUnitAdvice entry : advice) {
- InstallableUnitDescription[] others = entry.getAdditionalInstallableUnitDescriptions(iu);
- if (others != null)
- ius.addAll(Arrays.asList(others));
- }
- return ius.toArray(new InstallableUnitDescription[ius.size()]);
- }
-
- /**
- * Add all of the advised artifact properties for the given IU and artifact descriptor.
- * @param iu the IU
- * @param descriptor the descriptor to decorate
- * @param info the publisher info supplying the advice
- */
- protected static void processArtifactPropertiesAdvice(IInstallableUnit iu, IArtifactDescriptor descriptor, IPublisherInfo info) {
- if (!(descriptor instanceof SimpleArtifactDescriptor))
- return;
-
- Collection<IPropertyAdvice> advice = info.getAdvice(null, false, iu.getId(), iu.getVersion(), IPropertyAdvice.class);
- for (IPropertyAdvice entry : advice) {
- Map<String, String> props = entry.getArtifactProperties(iu, descriptor);
- if (props == null)
- continue;
- for (Entry<String, String> pe : props.entrySet()) {
- ((SimpleArtifactDescriptor) descriptor).setRepositoryProperty(pe.getKey(), pe.getValue());
- }
- }
- }
-
- /**
- * Add all of the advised IU properties for the given IU.
- * @param iu the IU to decorate
- * @param info the publisher info supplying the advice
- */
- protected static void processInstallableUnitPropertiesAdvice(InstallableUnitDescription iu, IPublisherInfo info) {
- Collection<IPropertyAdvice> advice = info.getAdvice(null, false, iu.getId(), iu.getVersion(), IPropertyAdvice.class);
- for (IPropertyAdvice entry : advice) {
- Map<String, String> props = entry.getInstallableUnitProperties(iu);
- if (props == null)
- continue;
- for (Entry<String, String> pe : props.entrySet()) {
- iu.setProperty(pe.getKey(), pe.getValue());
- }
- }
- }
-
- /**
- * Add all of the advised provided and required capabilities for the given installable unit.
- * @param iu the IU to decorate
- * @param info the publisher info supplying the advice
- */
- protected static void processCapabilityAdvice(InstallableUnitDescription iu, IPublisherInfo info) {
- Collection<ICapabilityAdvice> advice = info.getAdvice(null, false, iu.getId(), iu.getVersion(), ICapabilityAdvice.class);
- if (advice.isEmpty())
- return;
-
- for (ICapabilityAdvice entry : advice) {
-
- //process required capabilities
- IRequirement[] requiredAdvice = entry.getRequiredCapabilities(iu);
- if (requiredAdvice != null) {
- List<IRequirement> current = iu.getRequirements();
- Set<IRequirement> resultRequiredCapabilities = new HashSet<IRequirement>(current);
-
- // remove current required capabilities that match (same name and namespace) advice.
- for (int j = 0; j < current.size(); j++) {
- IRequirement curr = current.get(j);
- IRequiredCapability currentRequiredCapability = null;
- if (curr instanceof IRequiredCapability)
- currentRequiredCapability = (IRequiredCapability) curr;
- else
- continue;
- for (int k = 0; k < requiredAdvice.length; k++) {
- IRequiredCapability requiredCapability = null;
- if (requiredAdvice[k] instanceof IRequiredCapability)
- requiredCapability = (IRequiredCapability) requiredAdvice[k];
- else
- continue;
- if (requiredCapability.getNamespace().equals(currentRequiredCapability.getNamespace()) && requiredCapability.getName().equals(currentRequiredCapability.getName())) {
- resultRequiredCapabilities.remove(currentRequiredCapability);
- break;
- }
- }
- }
- // add all advice
- resultRequiredCapabilities.addAll(Arrays.asList(requiredAdvice));
- iu.setRequirements(resultRequiredCapabilities.toArray(new IRequirement[resultRequiredCapabilities.size()]));
- }
-
- //process meta required capabilities
- IRequirement[] metaRequiredAdvice = entry.getMetaRequiredCapabilities(iu);
- if (metaRequiredAdvice != null) {
- Collection<IRequirement> current = iu.getMetaRequirements();
- Set<IRequirement> resultMetaRequiredCapabilities = new HashSet<IRequirement>(current);
-
- // remove current meta-required capabilities that match (same name and namespace) advice.
- for (IRequirement curr : current) {
- IRequiredCapability currentMetaRequiredCapability = null;
- if (curr instanceof IRequiredCapability)
- currentMetaRequiredCapability = (IRequiredCapability) curr;
- else
- continue;
- for (int k = 0; k < metaRequiredAdvice.length; k++) {
- IRequiredCapability metaRequiredCapability = null;
- if (metaRequiredAdvice[k] instanceof IRequiredCapability)
- metaRequiredCapability = (IRequiredCapability) metaRequiredAdvice[k];
- else
- continue;
- if (metaRequiredCapability.getNamespace().equals(currentMetaRequiredCapability.getNamespace()) && metaRequiredCapability.getName().equals(currentMetaRequiredCapability.getName())) {
- resultMetaRequiredCapabilities.remove(currentMetaRequiredCapability);
- break;
- }
- }
- }
-
- // add all advice
- resultMetaRequiredCapabilities.addAll(Arrays.asList(metaRequiredAdvice));
- iu.setMetaRequirements(resultMetaRequiredCapabilities.toArray(new IRequirement[resultMetaRequiredCapabilities.size()]));
- }
-
- //process provided capabilities
- IProvidedCapability[] providedAdvice = entry.getProvidedCapabilities(iu);
- if (providedAdvice != null) {
- Collection<IProvidedCapability> current = iu.getProvidedCapabilities();
- Set<IProvidedCapability> resultProvidedCapabilities = new HashSet<IProvidedCapability>(current);
- for (IProvidedCapability currentProvidedCapability : current) {
- for (int k = 0; k < providedAdvice.length; k++) {
- IProvidedCapability providedCapability = providedAdvice[k];
- if (providedCapability.getNamespace().equals(currentProvidedCapability.getNamespace()) && providedCapability.getName().equals(currentProvidedCapability.getName())) {
- resultProvidedCapabilities.remove(currentProvidedCapability);
- break;
- }
- }
- }
- resultProvidedCapabilities.addAll(Arrays.asList(providedAdvice));
- iu.setCapabilities(resultProvidedCapabilities.toArray(new IProvidedCapability[resultProvidedCapabilities.size()]));
- }
- }
- }
-
- /**
- * Adds all applicable touchpoint advice to the given installable unit.
- * @param iu The installable unit to add touchpoint advice to
- * @param currentInstructions The set of touchpoint instructions assembled for this IU so far
- * @param info The publisher info
- */
- protected static void processTouchpointAdvice(InstallableUnitDescription iu, Map<String, ? extends Object> currentInstructions, IPublisherInfo info) {
- processTouchpointAdvice(iu, currentInstructions, info, null);
- }
-
- protected static void processTouchpointAdvice(InstallableUnitDescription iu, Map<String, ? extends Object> currentInstructions, IPublisherInfo info, String configSpec) {
- Collection<ITouchpointAdvice> advice = info.getAdvice(configSpec, false, iu.getId(), iu.getVersion(), ITouchpointAdvice.class);
- if (currentInstructions == null) {
- if (advice == null || advice.isEmpty())
- return;
- currentInstructions = CollectionUtils.emptyMap();
- }
-
- ITouchpointData result = MetadataFactory.createTouchpointData(currentInstructions);
- if (advice != null) {
- for (ITouchpointAdvice entry : advice) {
- result = entry.getTouchpointData(result);
- }
- }
- iu.addTouchpointData(result);
- }
-
- /**
- * Publishes the artifact by zipping the <code>files</code> using <code>root</code>
- * as a base for relative paths. Then copying the zip into the repository.
- * @param descriptor used to identify the zip.
- * @param inclusion the file to be published. files can be <code>null</code> but no action is taken.
- * @param publisherInfo the publisher info.
- */
- protected void publishArtifact(IArtifactDescriptor descriptor, File inclusion, IPublisherInfo publisherInfo) {
- // no files to publish so this is done.
- if (inclusion == null)
- return;
- // if the destination already contains the descriptor, there is nothing to do.
- IArtifactRepository destination = publisherInfo.getArtifactRepository();
- if (destination == null || destination.contains(descriptor))
- return;
-
- // if all we are doing is indexing things then add the descriptor and get on with it
- if ((publisherInfo.getArtifactOptions() & IPublisherInfo.A_PUBLISH) == 0) {
- destination.addDescriptor(descriptor);
- return;
- }
-
- // if the file is already in the same location the repo will put it, just add the descriptor and exit
- if (destination instanceof IFileArtifactRepository) {
- File descriptorFile = ((IFileArtifactRepository) destination).getArtifactFile(descriptor);
- if (inclusion.equals(descriptorFile)) {
- destination.addDescriptor(descriptor);
- return;
- }
- }
-
- try {
- OutputStream output = destination.getOutputStream(descriptor);
- if (output == null)
- return;
- output = new BufferedOutputStream(output);
- FileUtils.copyStream(new BufferedInputStream(new FileInputStream(inclusion)), true, output, true);
- } catch (ProvisionException e) {
- LogHelper.log(e.getStatus());
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error publishing artifacts", e)); //$NON-NLS-1$
- }
- }
-
- /**
- * Publishes the artifact by zipping the <code>files</code> using <code>root</code>
- * as a base for relative paths. Then copying the zip into the repository.
- * @param descriptor used to identify the zip.
- * @param inclusions and folders to be included in the zip. files can be null.
- * @param exclusions and folders to be excluded in the zip. files can be null.
- * @param publisherInfo the publisher info.
- * @param prefixComputer
- */
- protected void publishArtifact(IArtifactDescriptor descriptor, File[] inclusions, File[] exclusions, IPublisherInfo publisherInfo, IPathComputer prefixComputer) {
- // no files to publish so this is done.
- if (inclusions == null || inclusions.length < 1)
- return;
- // if the destination already contains the descriptor, there is nothing to do.
- IArtifactRepository destination = publisherInfo.getArtifactRepository();
- if (destination == null || destination.contains(descriptor))
- return;
- // if all we are doing is indexing things then add the descriptor and get on with it
- if ((publisherInfo.getArtifactOptions() & IPublisherInfo.A_PUBLISH) == 0) {
- destination.addDescriptor(descriptor);
- return;
- }
-
- // TODO need to implement the overwrite story in the repos
- // boolean overwrite = (info.getArtifactOptions() & IPublisherInfo.A_OVERWRITE) > 0;
- // if there is just one file and the mode is as-is, just copy the file into the repo
- // otherwise, zip up the files and copy the zip into the repo
- File tempFile = null;
- try {
- OutputStream output = destination.getOutputStream(descriptor);
- if (output == null)
- return;
- output = new BufferedOutputStream(output);
- tempFile = File.createTempFile("p2.generator", ""); //$NON-NLS-1$ //$NON-NLS-2$
- FileUtils.zip(inclusions, exclusions, tempFile, prefixComputer);
- if (output != null)
- FileUtils.copyStream(new BufferedInputStream(new FileInputStream(tempFile)), true, output, true);
- } catch (ProvisionException e) {
- LogHelper.log(e.getStatus());
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error publishing artifacts", e)); //$NON-NLS-1$
- e.printStackTrace();
- } finally {
- if (tempFile != null)
- tempFile.delete();
- }
- }
-
- /**
- * Loop over the known metadata repositories looking for the given IU.
- * Return the first IU found.
- * @param iuId the id of the IU to look for
- * @return the first matching IU or <code>null</code> if none.
- */
- protected IInstallableUnit queryForIU(IPublisherResult publisherResult, String iuId, Version version) {
- IQuery<IInstallableUnit> query = QueryUtil.createIUQuery(iuId, version);
- if (version == null || Version.emptyVersion.equals(version))
- query = QueryUtil.createLatestQuery(query);
-
- IQueryResult<IInstallableUnit> collector = Collector.emptyCollector();
- NullProgressMonitor progress = new NullProgressMonitor();
- if (publisherResult != null)
- collector = publisherResult.query(query, progress);
- if (collector.isEmpty() && info.getMetadataRepository() != null)
- collector = info.getMetadataRepository().query(query, progress);
- if (collector.isEmpty() && info.getContextMetadataRepository() != null)
- collector = info.getContextMetadataRepository().query(query, progress);
- if (!collector.isEmpty())
- return collector.iterator().next();
- return null;
- }
-
- /**
- * Loop over the known metadata repositories looking for the given IU within a particular range
- * @param publisherResult
- * @param iuId the id of the IU to look for
- * @param versionRange the version range to consider
- * @return The the IUs with the matching ids in the given range
- */
- protected IQueryResult<IInstallableUnit> queryForIUs(IPublisherResult publisherResult, String iuId, VersionRange versionRange) {
- IQuery<IInstallableUnit> query = null;
- IQueryResult<IInstallableUnit> queryResult = Collector.emptyCollector();
- query = QueryUtil.createIUQuery(iuId, versionRange);
- NullProgressMonitor progress = new NullProgressMonitor();
- if (publisherResult != null)
- queryResult = publisherResult.query(query, progress);
- if (queryResult.isEmpty() && info.getMetadataRepository() != null)
- queryResult = info.getMetadataRepository().query(query, progress);
- if (queryResult.isEmpty() && info.getContextMetadataRepository() != null)
- queryResult = info.getContextMetadataRepository().query(query, progress);
- return queryResult;
- }
-
- public abstract IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor);
-
- public void setPublisherInfo(IPublisherInfo info) {
- this.info = info;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java
deleted file mode 100644
index 740753680..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.publisher;
-
-import org.eclipse.equinox.p2.query.QueryUtil;
-
-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.CompositeArtifactRepository;
-import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.internal.p2.publisher.Messages;
-import org.eclipse.equinox.p2.core.*;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.repository.artifact.ArtifactKeyQuery;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.ServiceReference;
-
-public abstract class AbstractPublisherApplication implements IApplication {
-
- // The mapping rules for in-place generation need to construct paths into the structure
- // of an eclipse installation; in the future the default artifact mapping declared in
- // SimpleArtifactRepository may change, for example, to not have a 'bundles' directory
- // instead of a 'plugins' directory, so a separate constant is defined and used here.
- static final protected String[][] INPLACE_MAPPING_RULES = { {"(& (classifier=osgi.bundle) (format=packed)", "${repoUrl}/features/${id}_${version}.jar.pack.gz"}, //$NON-NLS-1$//$NON-NLS-2$
- {"(& (classifier=osgi.bundle))", "${repoUrl}/plugins/${id}_${version}.jar"}, //$NON-NLS-1$//$NON-NLS-2$
- {"(& (classifier=binary))", "${repoUrl}/binary/${id}_${version}"}, //$NON-NLS-1$//$NON-NLS-2$
- {"(& (classifier=org.eclipse.update.feature))", "${repoUrl}/features/${id}_${version}.jar"}}; //$NON-NLS-1$//$NON-NLS-2$
-
- static final public String PUBLISH_PACK_FILES_AS_SIBLINGS = "publishPackFilesAsSiblings"; //$NON-NLS-1$
-
- protected PublisherInfo info;
- protected String source;
- protected URI metadataLocation;
- protected String metadataRepoName;
- protected URI artifactLocation;
- protected String artifactRepoName;
- protected URI[] contextMetadataRepositories;
- protected URI[] contextArtifactRepositories;
- //whether repository xml files should be compressed
- protected boolean compress = false;
- protected boolean inplace = false;
- protected boolean append = false;
- protected boolean reusePackedFiles = false;
- protected String[] configurations;
- private IStatus status;
-
- private ServiceReference agentRef;
-
- protected IProvisioningAgent agent;
-
- /**
- * Returns the error message for this application, or the empty string
- * if the application terminated successfully.
- */
- public IStatus getStatus() {
- return status;
- }
-
- protected void initialize(PublisherInfo publisherInfo) throws ProvisionException {
- if (inplace) {
- File location = new File(source);
- if (metadataLocation == null)
- metadataLocation = location.toURI();
- if (artifactLocation == null)
- artifactLocation = location.toURI();
- publisherInfo.setArtifactOptions(publisherInfo.getArtifactOptions() | IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH);
- }
- initializeRepositories(publisherInfo);
- }
-
- protected IStatus createConfigurationEror(String message) {
- return new Status(IStatus.ERROR, "org.eclipse.equinox.p2.publisher", message); //$NON-NLS-1$
- }
-
- private boolean isEmpty(IArtifactRepository repo) {
- IQueryResult<IArtifactKey> result = repo.query(QueryUtil.createLimitQuery(ArtifactKeyQuery.ALL_KEYS, 1), null);
- return result.isEmpty();
- }
-
- protected void initializeRepositories(PublisherInfo publisherInfo) throws ProvisionException {
- if (artifactLocation != null) {
- IArtifactRepository repo = Publisher.createArtifactRepository(agent, artifactLocation, artifactRepoName, compress, reusePackedFiles);
- if (!append && !isEmpty(repo)) {
- File repoLocation = URIUtil.toFile(artifactLocation);
- if (repoLocation != null && source != null) {
- if (repoLocation.isFile())
- repoLocation = repoLocation.getParentFile();
- if (repoLocation.equals(new File(source)))
- throw new IllegalArgumentException(NLS.bind(Messages.exception_artifactRepoNoAppendDestroysInput, URIUtil.toUnencodedString(artifactLocation)));
- }
- repo.removeAll();
- }
- publisherInfo.setArtifactRepository(repo);
- } else if ((publisherInfo.getArtifactOptions() & IPublisherInfo.A_PUBLISH) > 0)
- throw new ProvisionException(createConfigurationEror(Messages.exception_noArtifactRepo));
- if (metadataLocation == null)
- throw new ProvisionException(createConfigurationEror(Messages.exception_noMetadataRepo));
- publisherInfo.setMetadataRepository(Publisher.createMetadataRepository(agent, metadataLocation, metadataRepoName, append, compress));
-
- if (contextMetadataRepositories != null && contextMetadataRepositories.length > 0) {
- CompositeMetadataRepository contextMetadata = CompositeMetadataRepository.createMemoryComposite(agent);
- if (contextMetadata != null) {
- for (int i = 0; i < contextMetadataRepositories.length; i++)
- contextMetadata.addChild(contextMetadataRepositories[i]);
- if (contextMetadata.getChildren().size() > 0)
- publisherInfo.setContextMetadataRepository(contextMetadata);
- }
- }
- if (contextArtifactRepositories != null && contextArtifactRepositories.length > 0) {
- CompositeArtifactRepository contextArtifact = CompositeArtifactRepository.createMemoryComposite(agent);
- if (contextArtifact != null) {
- for (int i = 0; i < contextArtifactRepositories.length; i++)
- contextArtifact.addChild(contextArtifactRepositories[i]);
-
- if (contextArtifact.getChildren().size() > 0)
- publisherInfo.setContextArtifactRepository(contextArtifact);
- }
- }
- }
-
- protected void processCommandLineArguments(String[] args, PublisherInfo publisherInfo) throws Exception {
- if (args == null)
- return;
- for (int i = 0; i < args.length; i++) {
- // check for args without parameters (i.e., a flag arg)
- processFlag(args[i], publisherInfo);
-
- // check for args with parameters. If we are at the last argument or if the next one
- // has a '-' as the first character, then we can't have an arg with a parm so continue.
- if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
- continue;
- processParameter(args[i], args[++i], publisherInfo);
- }
- }
-
- @SuppressWarnings("unused")
- protected void processParameter(String arg, String parameter, PublisherInfo publisherInfo) throws URISyntaxException {
- try {
- if (arg.equalsIgnoreCase("-metadataRepository") || arg.equalsIgnoreCase("-mr")) //$NON-NLS-1$ //$NON-NLS-2$
- metadataLocation = URIUtil.fromString(parameter);
-
- if (arg.equalsIgnoreCase("-artifactRepository") || arg.equalsIgnoreCase("-ar")) //$NON-NLS-1$ //$NON-NLS-2$
- artifactLocation = URIUtil.fromString(parameter);
- } catch (URISyntaxException e) {
- throw new IllegalArgumentException(NLS.bind(Messages.exception_repoMustBeURL, parameter));
- }
-
- if (arg.equalsIgnoreCase("-metadataRepositoryName")) //$NON-NLS-1$
- metadataRepoName = parameter;
-
- if (arg.equalsIgnoreCase("-source")) { //$NON-NLS-1$
- // check here to see if the location actually exists so we can fail gracefully now rather than unpredictably later
- // see bug 272956 where we would fail with an NPE if someone gave us a URL instead of a file-system path
- if (!new File(parameter).exists())
- throw new IllegalArgumentException(NLS.bind(Messages.exception_sourcePath, parameter));
- source = parameter;
- }
-
- if (arg.equalsIgnoreCase("-artifactRepositoryName")) //$NON-NLS-1$
- artifactRepoName = parameter;
-
- if (arg.equalsIgnoreCase("-configs")) //$NON-NLS-1$
- publisherInfo.setConfigurations(AbstractPublisherAction.getArrayFromString(parameter, ",")); //$NON-NLS-1$
-
- if (arg.equalsIgnoreCase("-contextMetadata")) //$NON-NLS-1$
- publisherInfo.setContextMetadataRepository(processMetadataRepositoryList(parameter));
-
- if (arg.equalsIgnoreCase("-contextArtifacts")) //$NON-NLS-1$
- publisherInfo.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(agent);
- 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(agent);
- 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 publisherInfo) {
- if (arg.equalsIgnoreCase("-publishArtifacts") || arg.equalsIgnoreCase("-pa")) //$NON-NLS-1$ //$NON-NLS-2$
- publisherInfo.setArtifactOptions(publisherInfo.getArtifactOptions() | IPublisherInfo.A_PUBLISH);
-
- if (arg.equalsIgnoreCase("-publishArtifactRepository") || arg.equalsIgnoreCase("-par")) //$NON-NLS-1$ //$NON-NLS-2$
- publisherInfo.setArtifactOptions(publisherInfo.getArtifactOptions() | IPublisherInfo.A_INDEX);
-
- if (arg.equalsIgnoreCase("-overwriteArtifacts")) //$NON-NLS-1$
- publisherInfo.setArtifactOptions(publisherInfo.getArtifactOptions() | IPublisherInfo.A_OVERWRITE);
-
- if (arg.equalsIgnoreCase("-append")) //$NON-NLS-1$
- append = true;
-
- if (arg.equalsIgnoreCase("-compress")) //$NON-NLS-1$
- compress = true;
-
- if (arg.equalsIgnoreCase("-reusePack200Files")) //$NON-NLS-1$
- reusePackedFiles = true;
-
- if (arg.equalsIgnoreCase("-inplace")) //$NON-NLS-1$
- inplace = true;
- }
-
- private void setupAgent() throws ProvisionException {
- agentRef = Activator.getContext().getServiceReference(IProvisioningAgent.SERVICE_NAME);
- if (agentRef != null) {
- agent = (IProvisioningAgent) Activator.getContext().getService(agentRef);
- if (agent != null)
- return;
- }
- ServiceReference providerRef = Activator.getContext().getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);
- if (providerRef == null)
- throw new RuntimeException("No provisioning agent provider is available"); //$NON-NLS-1$
- IProvisioningAgentProvider provider = (IProvisioningAgentProvider) Activator.getContext().getService(providerRef);
- if (provider == null)
- throw new RuntimeException("No provisioning agent provider is available"); //$NON-NLS-1$
- //obtain agent for currently running system
- agent = provider.createAgent(null);
- Activator.getContext().ungetService(providerRef);
- }
-
- 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 publisherInfo) throws Exception {
- try {
- this.info = publisherInfo;
- setupAgent();
- initialize(publisherInfo);
- System.out.println(NLS.bind(Messages.message_generatingMetadata, publisherInfo.getSummary()));
-
- long before = System.currentTimeMillis();
- IPublisherAction[] actions = createActions();
- Publisher publisher = createPublisher(publisherInfo);
- IStatus result = publisher.publish(actions, new NullProgressMonitor());
- long after = System.currentTimeMillis();
-
- if (result.isOK()) {
- System.out.println(NLS.bind(Messages.message_generationCompleted, String.valueOf((after - before) / 1000)));
- return IApplication.EXIT_OK;
- }
- 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 publisherInfo) {
- return new Publisher(publisherInfo);
- }
-
- public Object start(IApplicationContext context) throws Exception {
- return run((String[]) context.getArguments().get("application.args")); //$NON-NLS-1$
- }
-
- public void stop() {
- if (agentRef != null) {
- Activator.getContext().ungetService(agentRef);
- agentRef = null;
- }
- }
-
- public void setArtifactLocation(URI location) {
- this.artifactLocation = location;
- }
-
- public void setMetadataLocation(URI location) {
- this.metadataLocation = location;
- }
-
- public boolean reuseExistingPack200Files() {
- return reusePackedFiles;
- }
-
- public void setReuseExistingPackedFiles(boolean value) {
- reusePackedFiles = value;
- }
-
- public void setContextRepositories(URI[] metadata, URI[] artifacts) {
- this.contextMetadataRepositories = metadata;
- this.contextArtifactRepositories = artifacts;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherAction.java
deleted file mode 100644
index c53215a53..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherAction.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-
-public interface IPublisherAction {
-
- IStatus perform(IPublisherInfo info, IPublisherResult results, IProgressMonitor monitor);
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherAdvice.java
deleted file mode 100644
index a0777d456..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherAdvice.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher;
-
-import org.eclipse.equinox.p2.metadata.Version;
-
-public interface IPublisherAdvice {
-
- public boolean isApplicable(String configSpec, boolean includeDefault, String id, Version version);
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherInfo.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherInfo.java
deleted file mode 100644
index e804e2d08..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.p2.metadata.Version;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-
-public interface IPublisherInfo {
-
- /**
- * A bitwise flag to say whether or not the index for the artifact repository should
- * be updated.
- */
- public static final int A_INDEX = 1;
-
- /**
- * A bitwise flag to say whether or the artifacts themselves should be published.
- */
- public static final int A_PUBLISH = 2;
-
- /**
- * A bitwise flag to say whether or not to overwrite disk content discovered
- * in the repository when publishing an artifact
- */
- public static final int A_OVERWRITE = 4;
-
- /**
- * Returns the artifact repository into which any publishable artifacts are published
- * or <code>null</code> if none.
- * @return a destination artifact repository or <code>null</code>
- */
- public IArtifactRepository getArtifactRepository();
-
- /**
- * Returns the metadata repository into which any publishable metadata is published
- * or <code>null</code> if none.
- * @return a destination metadata repository or <code>null</code>
- */
- public IMetadataRepository getMetadataRepository();
-
- /**
- * Returns whether or not artifacts themselves should be published.
- * @return <code>true</code> if artifacts should be published.
- * <code>false</code> otherwise.
- */
- public int getArtifactOptions();
-
- /**
- * Returns the registered advice for the given configuration of WS, OS and ARCH where the
- * advice is of the given type. If mergeDefault is <code>true</code> then the advice for
- * the default configuration is merged into the result.
- * @param configSpec the configuration to query. Note that the given configuration
- * must specify values for WS, OS and ARCH.
- * @param type the type of advice to look for
- * @param includeDefault whether or not to merge in the advice common to all configurations
- * @return the set of advice of the given type for the given configuration
- */
- public <T extends IPublisherAdvice> Collection<T> getAdvice(String configSpec, boolean includeDefault, String id, Version version, Class<T> type);
-
- /**
- * Add the given advice to the set of publishing advices.
- * @param advice the advice to retain
- */
- public void addAdvice(IPublisherAdvice advice);
-
- /**
- * Returns the configurations being published. Each configuration is a string of the form
- * ws.os.arch describing the window system, operating system, and architecture of each
- * configuration.
- * @return The configurations being published
- * @see AbstractPublisherAction#createConfigSpec(String, String, String)
- */
- public String[] getConfigurations();
-
- /**
- * Returns the artifact repository given to the publisher as context for
- * the publisher actions. May be <code>null</code>. Note that multiple
- * repositories may be represented as one composite repository.
- *
- * @return the context artifact repository or <code>null</code> if none.
- */
- public IArtifactRepository getContextArtifactRepository();
-
- /**
- * Returns the metadata repository given to the publisher as context for
- * the publisher actions. May be <code>null</code>. Note that multiple
- * repositories may be represented as one composite repository.
- *
- * @return the context metadata repository or <code>null</code> if none.
- */
- public IMetadataRepository getContextMetadataRepository();
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherResult.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherResult.java
deleted file mode 100644
index 44a56d4b0..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherResult.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher;
-
-import java.util.Collection;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.query.IQueryable;
-
-/**
- * Publisher results represent the result of running a publishing operation. A result is a
- * collection of IInstallableUnits that were created or read duing the operation. The result
- * IUs are categorized either as "roots" or "non-roots". The meaning of these types is
- * determined by the actions involved in the operation and it is up to the consumer of the
- * result to interpret the collections.
- */
-public interface IPublisherResult extends IQueryable<IInstallableUnit> {
- /**
- * Merge mode setting that causes all root results to be merged into
- * the root of the merged results and all non-roots to become non-roots.
- */
- public static final int MERGE_MATCHING = 0;
-
- /**
- * Merge mode setting that causes all root and non-root result entries to
- * be placed in the root collection of the result.
- */
- public static final int MERGE_ALL_ROOT = 1;
-
- /**
- * Merge mode setting that causes all root and non-root result entries to
- * be placed in the non-root collection of the result.
- */
- public static final int MERGE_ALL_NON_ROOT = 2;
-
- /**
- * An opaque token used to identify the root elements of a result.
- */
- public static final String ROOT = "root"; //$NON-NLS-1$
-
- /**
- * An opaque token used to identify the non-root elements of a result.
- */
- public static final String NON_ROOT = "non_root"; //$NON-NLS-1$
-
- /**
- * Add the given IU to this result and identify it as the given type
- * @see #ROOT
- * @see #NON_ROOT
- *
- * @param iu the IU to add
- * @param type the type of the IU in this result
- */
- public void addIU(IInstallableUnit iu, String type);
-
- /**
- * Add all of the given IUs to this result and identify it as the given type
- * @see #ROOT
- * @see #NON_ROOT
- *
- * @param ius the IUs to add
- * @param type the type of the IUs in this result
- */
- public void addIUs(Collection<IInstallableUnit> ius, String type);
-
- /**
- * Returns the IUs of the given type with the given id in this result.
- * @param id the id of the IUs to look for
- * @param type the type of IUs to look for in this result
- * @return the requested IUs
- * @see #ROOT
- * @see #NON_ROOT
- */
- public Collection<IInstallableUnit> getIUs(String id, String type);
-
- /**
- * Returns the first available IU of the given type with the given id in this result.
- * @param id the id of the IU to look for
- * @param type the type of IU to look for in this result
- * @return the requested IU
- * @see #ROOT
- * @see #NON_ROOT
- * @deprecated This method should be removed as it essentially returns a random IU
- * with the given ID. There are some uses for this but not many and they can use #getIUs
- */
- public IInstallableUnit getIU(String id, String type);
-
- /**
- * Returns the IU of the given type with the given id and version in this result.
- * @param id the id of the IU to look for
- * @param version the version of the IU to look for
- * @param type the type of IU to look for in this result
- * @return the requested IU
- * @see #ROOT
- * @see #NON_ROOT
- */
- public IInstallableUnit getIU(String id, Version version, String type);
-
- /**
- * Merges the given result in this result according to the given mode.
- * @see #MERGE_ALL_NON_ROOT
- * @see #MERGE_ALL_ROOT
- * @see #MERGE_MATCHING
- * @param result the result to merge into this result
- * @param mode the merge mode to use
- */
- public void merge(IPublisherResult result, int mode);
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/Publisher.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/Publisher.java
deleted file mode 100644
index 49eeb0cab..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/Publisher.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher;
-
-import java.net.URI;
-import java.util.Collection;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.repository.*;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-
-public class Publisher {
- static final public String PUBLISH_PACK_FILES_AS_SIBLINGS = "publishPackFilesAsSiblings"; //$NON-NLS-1$
- private static final long SERVICE_TIMEOUT = 5000;
-
- private IPublisherInfo info;
- private IPublisherResult results;
-
- /**
- * Returns a metadata repository that corresponds to the given settings. If a repository at the
- * given location already exists, it is updated with the settings and returned. If no repository
- * is found then a new Simple repository is created, configured and returned
- * @param agent the provisioning agent to use when creating the repository
- * @param location the URL location of the repository
- * @param name the name of the repository
- * @param append whether or not the repository should appended or cleared
- * @param compress whether or not to compress the repository index
- * @return the discovered or created repository
- * @throws ProvisionException
- */
- public static IMetadataRepository createMetadataRepository(IProvisioningAgent agent, URI location, String name, boolean append, boolean compress) throws ProvisionException {
- try {
- IMetadataRepository result = loadMetadataRepository(agent, location, true, true);
- if (result != null && result.isModifiable()) {
- result.setProperty(IRepository.PROP_COMPRESSED, compress ? "true" : "false"); //$NON-NLS-1$//$NON-NLS-2$
- if (!append)
- result.removeAll();
- return result;
- }
- } catch (ProvisionException e) {
- //fall through and create a new repository
- }
-
- // the given repo location is not an existing repo so we have to create something
- IMetadataRepositoryManager manager = getService(agent, IMetadataRepositoryManager.SERVICE_NAME);
- String repositoryName = name == null ? location + " - metadata" : name; //$NON-NLS-1$
- IMetadataRepository result = manager.createRepository(location, repositoryName, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
- if (result != null) {
- manager.removeRepository(result.getLocation());
- result.setProperty(IRepository.PROP_COMPRESSED, compress ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
- return result;
- }
- // I don't think we can really get here, but just in case, we better throw a provisioning exception
- String msg = org.eclipse.equinox.internal.p2.metadata.repository.Messages.repoMan_internalError;
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.INTERNAL_ERROR, msg, null));
- }
-
- /**
- * Load a metadata repository from the given location.
- * @param location the URI location of the repository
- * @param modifiable whether to ask the manager for a modifiable repository
- * @param removeFromManager remove the loaded repository from the manager if it wasn't already loaded
- * @return the loaded repository
- * @throws ProvisionException
- */
- public static IMetadataRepository loadMetadataRepository(IProvisioningAgent agent, URI location, boolean modifiable, boolean removeFromManager) throws ProvisionException {
- IMetadataRepositoryManager manager = getService(agent, IMetadataRepositoryManager.SERVICE_NAME);
- boolean existing = manager.contains(location);
-
- IMetadataRepository result = manager.loadRepository(location, modifiable ? IRepositoryManager.REPOSITORY_HINT_MODIFIABLE : 0, null);
- if (!existing && removeFromManager)
- manager.removeRepository(location);
- return result;
- }
-
- /**
- * Returns an artifact repository that corresponds to the given settings. If a repository at the
- * given location already exists, it is updated with the settings and returned. If no repository
- * is found then a new Simple repository is created, configured and returned
- * @param agent the provisioning agent to use when creating the repository
- * @param location the URL location of the repository
- * @param name the name of the repository
- * @param compress whether or not to compress the repository index
- * @param reusePackedFiles whether or not to include discovered Pack200 files in the repository
- * @return the discovered or created repository
- * @throws ProvisionException
- */
- public static IArtifactRepository createArtifactRepository(IProvisioningAgent agent, URI location, String name, boolean compress, boolean reusePackedFiles) throws ProvisionException {
- try {
- IArtifactRepository result = loadArtifactRepository(agent, location, true, true);
- if (result != null && result.isModifiable()) {
- result.setProperty(IRepository.PROP_COMPRESSED, compress ? "true" : "false"); //$NON-NLS-1$//$NON-NLS-2$
- if (reusePackedFiles)
- result.setProperty(PUBLISH_PACK_FILES_AS_SIBLINGS, "true"); //$NON-NLS-1$
- return result;
- }
- } catch (ProvisionException e) {
- //fall through and create a new repository
- }
-
- IArtifactRepositoryManager manager = getService(agent, IArtifactRepositoryManager.SERVICE_NAME);
- String repositoryName = name != null ? name : location + " - artifacts"; //$NON-NLS-1$
- IArtifactRepository result = manager.createRepository(location, repositoryName, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
- if (result != null) {
- manager.removeRepository(result.getLocation());
- if (reusePackedFiles)
- result.setProperty(PUBLISH_PACK_FILES_AS_SIBLINGS, "true"); //$NON-NLS-1$
- result.setProperty(IRepository.PROP_COMPRESSED, compress ? "true" : "false"); //$NON-NLS-1$//$NON-NLS-2$
- return result;
- }
- // I don't think we can really get here, but just in case, we better throw a provisioning exception
- String msg = org.eclipse.equinox.internal.p2.artifact.repository.Messages.repoMan_internalError;
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.INTERNAL_ERROR, msg, null));
- }
-
- /**
- * Load an artifact repository from the given location.
- * @param location the URI location of the repository
- * @param modifiable whether to ask the manager for a modifiable repository
- * @param removeFromManager remove the loaded repository from the manager if it wasn't already loaded
- * @return the loaded repository
- * @throws ProvisionException
- */
- public static IArtifactRepository loadArtifactRepository(IProvisioningAgent agent, URI location, boolean modifiable, boolean removeFromManager) throws ProvisionException {
- IArtifactRepositoryManager manager = getService(agent, IArtifactRepositoryManager.SERVICE_NAME);
- boolean existing = manager.contains(location);
-
- IArtifactRepository result = manager.loadRepository(location, modifiable ? IRepositoryManager.REPOSITORY_HINT_MODIFIABLE : 0, null);
- if (!existing && removeFromManager)
- manager.removeRepository(location);
- return result;
- }
-
- public Publisher(IPublisherInfo info) {
- this.info = info;
- results = new PublisherResult();
- }
-
- /**
- * Obtains a service from the agent, waiting for a reasonable timeout period
- * if the service is not yet available. This method never returns <code>null</code>;
- * an exception is thrown if the service could not be obtained.
- *
- * @param <T> The type of the service to return
- * @param agent The agent to obtain the service from
- * @param serviceName The name of the service to obtain
- * @return The service instance
- */
- @SuppressWarnings("unchecked")
- protected static <T> T getService(IProvisioningAgent agent, String serviceName) {
- T service = (T) agent.getService(serviceName);
- if (service != null)
- return service;
- long start = System.currentTimeMillis();
- do {
- try {
- Thread.sleep(100);
- } catch (InterruptedException e) {
- //ignore and keep waiting
- }
- service = (T) agent.getService(serviceName);
- if (service != null)
- return service;
- } while ((System.currentTimeMillis() - start) < SERVICE_TIMEOUT);
- //could not obtain the service
- throw new IllegalStateException("Unable to obtain required service: " + serviceName); //$NON-NLS-1$
- }
-
- public Publisher(IPublisherInfo info, IPublisherResult results) {
- this.info = info;
- this.results = results;
- }
-
- class ArtifactProcess implements IRunnableWithProgress {
-
- private final IPublisherAction[] actions;
- private final IPublisherInfo info;
- private IStatus result = null;
-
- public ArtifactProcess(IPublisherAction[] actions, IPublisherInfo info) {
- this.info = info;
- this.actions = actions;
- }
-
- public void run(IProgressMonitor monitor) {
- MultiStatus finalStatus = new MultiStatus("this", 0, "publishing result", null); //$NON-NLS-1$//$NON-NLS-2$
- for (int i = 0; i < actions.length; i++) {
- if (monitor.isCanceled()) {
- result = Status.CANCEL_STATUS;
- return;
- }
- IStatus status = actions[i].perform(info, results, monitor);
- finalStatus.merge(status);
- monitor.worked(1);
- }
- result = finalStatus;
- }
-
- public IStatus getStatus() {
- return result;
- }
-
- }
-
- public IStatus publish(IPublisherAction[] actions, IProgressMonitor monitor) {
- if (monitor == null)
- monitor = new NullProgressMonitor();
- SubMonitor sub = SubMonitor.convert(monitor, actions.length);
- if (Tracing.DEBUG_PUBLISHING)
- Tracing.debug("Invoking publisher"); //$NON-NLS-1$
- try {
- ArtifactProcess artifactProcess = new ArtifactProcess(actions, info);
-
- IStatus finalStatus = null;
- if (info.getArtifactRepository() != null) {
- finalStatus = info.getArtifactRepository().executeBatch(artifactProcess, sub);
- if (finalStatus.isOK())
- // If the batch process didn't report any errors, then
- // Use the status from our actions
- finalStatus = artifactProcess.getStatus();
- } else {
- artifactProcess.run(sub);
- finalStatus = artifactProcess.getStatus();
- }
-
- if (Tracing.DEBUG_PUBLISHING)
- Tracing.debug("Publishing complete. Result=" + finalStatus); //$NON-NLS-1$
- if (!finalStatus.isOK())
- return finalStatus;
- } finally {
- sub.done();
- }
- // if there were no errors, publish all the ius.
- IMetadataRepository metadataRepository = info.getMetadataRepository();
- if (metadataRepository != null) {
- Collection<IInstallableUnit> ius = results.getIUs(null, null);
- metadataRepository.addInstallableUnits(ius);
- }
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherInfo.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherInfo.java
deleted file mode 100644
index a72a78a7b..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherInfo.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher;
-
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-
-public class PublisherInfo implements IPublisherInfo {
-
- private int artifactOptions = 0;
- private IMetadataRepository metadataRepository;
- private IArtifactRepository artifactRepository;
- private IMetadataRepository contextMetadataRepository;
- private IArtifactRepository contextArtifactRepository;
- private String[] configurations = new String[0];
- private List<IPublisherAdvice> adviceList = new ArrayList<IPublisherAdvice>(11);
-
- public void addAdvice(IPublisherAdvice advice) {
- adviceList.add(advice);
- }
-
- public List<IPublisherAdvice> getAdvice() {
- return adviceList;
- }
-
- @SuppressWarnings("unchecked")
- public <T extends IPublisherAdvice> Collection<T> getAdvice(String configSpec, boolean includeDefault, String id, Version version, Class<T> type) {
- ArrayList<T> result = new ArrayList<T>();
- for (IPublisherAdvice advice : adviceList) {
- if (type.isInstance(advice) && advice.isApplicable(configSpec, includeDefault, id, version))
- // Ideally, we would use Class.cast here but it was introduced in Java 1.5
- result.add((T) advice);
- }
- return result;
- }
-
- public IArtifactRepository getArtifactRepository() {
- return artifactRepository;
- }
-
- public IMetadataRepository getMetadataRepository() {
- return metadataRepository;
- }
-
- public IArtifactRepository getContextArtifactRepository() {
- return contextArtifactRepository;
- }
-
- public IMetadataRepository getContextMetadataRepository() {
- return contextMetadataRepository;
- }
-
- public int getArtifactOptions() {
- return artifactOptions;
- }
-
- public void setArtifactRepository(IArtifactRepository value) {
- artifactRepository = value;
- }
-
- public void setMetadataRepository(IMetadataRepository value) {
- metadataRepository = value;
- }
-
- public void setContextArtifactRepository(IArtifactRepository value) {
- contextArtifactRepository = value;
- }
-
- public void setContextMetadataRepository(IMetadataRepository value) {
- contextMetadataRepository = value;
- }
-
- public void setArtifactOptions(int value) {
- artifactOptions = value;
- }
-
- public String[] getConfigurations() {
- return configurations;
- }
-
- public void setConfigurations(String[] value) {
- configurations = value;
- }
-
- public String getSummary() {
- return "."; //$NON-NLS-1$
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherResult.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherResult.java
deleted file mode 100644
index cf7d2a092..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherResult.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- * Cloudsmith Inc. - query indexes
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.IUMap;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.metadata.expression.CompoundIterator;
-import org.eclipse.equinox.internal.p2.metadata.index.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-import org.eclipse.equinox.p2.query.IQueryResult;
-
-public class PublisherResult extends IndexProvider<IInstallableUnit> implements IPublisherResult {
-
- final IUMap rootIUs = new IUMap();
- final IUMap nonRootIUs = new IUMap();
-
- private IIndex<IInstallableUnit> idIndex;
-
- public void addIU(IInstallableUnit iu, String type) {
- if (type == ROOT)
- rootIUs.add(iu);
- if (type == NON_ROOT)
- nonRootIUs.add(iu);
- }
-
- public void addIUs(Collection<IInstallableUnit> ius, String type) {
- for (IInstallableUnit iu : ius)
- addIU(iu, type);
- }
-
- public IInstallableUnit getIU(String id, Version version, String type) {
- if (type == null || type == ROOT) {
- IInstallableUnit result = rootIUs.get(id, version);
- if (result != null)
- return result;
- }
- if (type == null || type == NON_ROOT) {
- IInstallableUnit result = nonRootIUs.get(id, version);
- if (result != null)
- return result;
- }
- return null;
- }
-
- // TODO this method really should not be needed as it just returns the first
- // matching IU non-deterministically.
- public IInstallableUnit getIU(String id, String type) {
- if (type == null || type == ROOT) {
- IQueryResult<IInstallableUnit> ius = rootIUs.get(id);
- if (!ius.isEmpty())
- return ius.iterator().next();
- }
- if (type == null || type == NON_ROOT) {
- IQueryResult<IInstallableUnit> ius = nonRootIUs.get(id);
- if (!ius.isEmpty())
- return ius.iterator().next();
- }
- return null;
- }
-
- /**
- * Returns the IUs in this result with the given id.
- */
- public Collection<IInstallableUnit> getIUs(String id, String type) {
- if (type == null) {
- // TODO can this be optimized?
- ArrayList<IInstallableUnit> result = new ArrayList<IInstallableUnit>();
- result.addAll(rootIUs.get(id).toUnmodifiableSet());
- result.addAll(nonRootIUs.get(id).toUnmodifiableSet());
- return result;
- }
- if (type == ROOT)
- return rootIUs.get(id).toUnmodifiableSet();
- if (type == NON_ROOT)
- return nonRootIUs.get(id).toUnmodifiableSet();
- return null;
- }
-
- public void merge(IPublisherResult result, int mode) {
- if (mode == MERGE_MATCHING) {
- addIUs(result.getIUs(null, ROOT), ROOT);
- addIUs(result.getIUs(null, NON_ROOT), NON_ROOT);
- } else if (mode == MERGE_ALL_ROOT) {
- addIUs(result.getIUs(null, ROOT), ROOT);
- addIUs(result.getIUs(null, NON_ROOT), ROOT);
- } else if (mode == MERGE_ALL_NON_ROOT) {
- addIUs(result.getIUs(null, ROOT), NON_ROOT);
- addIUs(result.getIUs(null, NON_ROOT), NON_ROOT);
- }
- }
-
- public synchronized IIndex<IInstallableUnit> getIndex(String memberName) {
- if (InstallableUnit.MEMBER_ID.equals(memberName)) {
- if (idIndex == null) {
- ArrayList<IIndex<IInstallableUnit>> indexes = new ArrayList<IIndex<IInstallableUnit>>();
- indexes.add(new IdIndex(nonRootIUs));
- indexes.add(new IdIndex(rootIUs));
- idIndex = new CompoundIndex<IInstallableUnit>(indexes);
- }
- return idIndex;
- }
- return null;
- }
-
- public Iterator<IInstallableUnit> everything() {
- ArrayList<Iterator<IInstallableUnit>> iterators = new ArrayList<Iterator<IInstallableUnit>>();
- iterators.add(nonRootIUs.iterator());
- iterators.add(rootIUs.iterator());
- return new CompoundIterator<IInstallableUnit>(iterators.iterator());
- }
-
- public Object getManagedProperty(Object client, String memberName, Object key) {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IAdditionalInstallableUnitAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IAdditionalInstallableUnitAdvice.java
deleted file mode 100644
index 583cd3340..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IAdditionalInstallableUnitAdvice.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-public interface IAdditionalInstallableUnitAdvice extends IPublisherAdvice {
-
- public InstallableUnitDescription[] getAdditionalInstallableUnitDescriptions(IInstallableUnit iu);
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ICapabilityAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ICapabilityAdvice.java
deleted file mode 100644
index 11366d384..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ICapabilityAdvice.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 EclipseSource and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eclipse Source - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
-import org.eclipse.equinox.p2.metadata.IProvidedCapability;
-import org.eclipse.equinox.p2.metadata.IRequirement;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-public interface ICapabilityAdvice extends IPublisherAdvice {
-
- public IProvidedCapability[] getProvidedCapabilities(InstallableUnitDescription iu);
-
- public IRequirement[] getRequiredCapabilities(InstallableUnitDescription iu);
-
- public IRequirement[] getMetaRequiredCapabilities(InstallableUnitDescription iu);
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFeatureRootAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFeatureRootAdvice.java
deleted file mode 100644
index 732826f68..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFeatureRootAdvice.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
-import org.eclipse.equinox.internal.p2.publisher.FileSetDescriptor;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-public interface IFeatureRootAdvice extends IPublisherAdvice {
-
- /**
- * Return an array of configSpecs for which this advice is applicable.
- * @see IPublisherAdvice#isApplicable(String, boolean, String, org.eclipse.equinox.p2.metadata.Version)
- * @return String [] : Array of configSpec ("ws,os,arch")
- */
- public String[] getConfigurations();
-
- public IPathComputer getRootFileComputer(String configSpec);
-
- public FileSetDescriptor getDescriptor(String configSpec);
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFilterAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFilterAdvice.java
deleted file mode 100644
index b26edb4ce..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFilterAdvice.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 EclipseSource and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * EclipseSource - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-/**
- * Filter advice helps actions figure out where an IU with a given id and version
- * is applicable. For example, when some IU being published depends on another,
- * it is possible that the prerequisite is not applicable in all scenarios. In that case
- * it is useful for new IU to spec its requirement using an applicability filter. This
- * advice can supply that filter.
- */
-public interface IFilterAdvice extends IPublisherAdvice {
- /**
- * Returns the filter to use for depending on the IU with the given id.
- * If an exact match is desired, only IUs with the given version are considered
- * as sources of filter information. If in-exact matches are acceptable, the
- * advisor will attempt to find the most relevant IU (typically the one with the highest
- * version less than that supplied) to supply the version information.
- *
- * @param id the id of the target IU
- * @param version the version of the target IU
- * @param exact whether or not to consider information for IUs whose
- * version does not match the supplied version
- * @return the filter to use when depending on the given IU or <code>null</code>
- * if none.
- */
- public IMatchExpression<IInstallableUnit> getFilter(String id, Version version, boolean exact);
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ILicenseAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ILicenseAdvice.java
deleted file mode 100644
index a6deae374..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ILicenseAdvice.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-/**
- * Provides advice about a license.
- */
-public interface ILicenseAdvice extends IPublisherAdvice {
-
- public String getLicenseURL();
-
- public String getLicenseText();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IPropertyAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IPropertyAdvice.java
deleted file mode 100644
index 587488131..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IPropertyAdvice.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
-import java.util.Map;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-
-public interface IPropertyAdvice extends IPublisherAdvice {
-
- /**
- * Returns the set of extra properties to be associated with the IU
- */
- public Map<String, String> getInstallableUnitProperties(InstallableUnitDescription iu);
-
- /**
- * Returns the set of extra properties to be associated with the artifact descriptor
- * being published
- */
- public Map<String, String> getArtifactProperties(IInstallableUnit iu, IArtifactDescriptor descriptor);
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootFilesAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootFilesAdvice.java
deleted file mode 100644
index c830838d5..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootFilesAdvice.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import java.io.File;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-public interface IRootFilesAdvice extends IPublisherAdvice {
-
- public File getRoot();
-
- public File[] getIncludedFiles();
-
- public File[] getExcludedFiles();
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootIUAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootIUAdvice.java
deleted file mode 100644
index 9cd432b1c..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootIUAdvice.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import java.util.Collection;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-import org.eclipse.equinox.p2.publisher.IPublisherResult;
-
-public interface IRootIUAdvice extends IPublisherAdvice {
-
- /**
- * Returns the list of children of the root for this publishing operation.
- * Returned elements are either the String id of the IUs, a VersionedName describing
- * the IU or the IUs themselves.
- * @param result
- * @return the collection of children
- */
- public Collection<? extends Object> getChildren(IPublisherResult result);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ITouchpointAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ITouchpointAdvice.java
deleted file mode 100644
index 1551b7237..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ITouchpointAdvice.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.equinox.p2.metadata.ITouchpointData;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-/**
- * Touchpoint advice provides information related to the touch points associated
- * with an installable unit being published.
- */
-public interface ITouchpointAdvice extends IPublisherAdvice {
- /**
- * Returns a touchpoint data that merges the given touchpoint data
- * with any new touchpoint data contributed by this advice.
- *
- * @param existingData The current set of touchpoint data.
- * @return the merged touchpoint data
- */
- public ITouchpointData getTouchpointData(ITouchpointData existingData);
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IVersionAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IVersionAdvice.java
deleted file mode 100644
index b2e0d1d49..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IVersionAdvice.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-public interface IVersionAdvice extends IPublisherAdvice {
-
- public static final String NS_BUNDLE = "bundle"; //$NON-NLS-1$
- public static final String NS_FEATURE = "feature"; //$NON-NLS-1$
- public static final String NS_ROOT = "root"; //$NON-NLS-1$
-
- /**
- * Returns the version advice for the given id in the given namespace.
- * @param namespace the namespace in which to look for advice
- * @param id the item for which advice is sought
- * @return the version advice found or <code>null</code> if none
- */
- public Version getVersion(String namespace, String id);
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/JREAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/JREAction.java
deleted file mode 100644
index feb7f3f2a..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/JREAction.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import java.io.*;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-import org.eclipse.osgi.util.ManifestElement;
-import org.osgi.framework.BundleException;
-
-public class JREAction extends AbstractPublisherAction {
- private static final String DEFAULT_JRE_NAME = "a.jre"; //$NON-NLS-1$
- private static final Version DEFAULT_JRE_VERSION = Version.parseVersion("1.6"); //$NON-NLS-1$
- private static final String DEFAULT_PROFILE = "/profiles/JavaSE-1.6.profile"; //$NON-NLS-1$
- private static final String PROFILE_LOCATION = "jre.action.profile.location"; //$NON-NLS-1$
- private static final String PROFILE_NAME = "osgi.java.profile.name"; //$NON-NLS-1$
- private static final String PROFILE_TARGET_VERSION = "org.eclipse.jdt.core.compiler.codegen.targetPlatform"; //$NON-NLS-1$
- private static final String PROFILE_SYSTEM_PACKAGES = "org.osgi.framework.system.packages"; //$NON-NLS-1$
-
- private File jreLocation;
- private String environment;
- private Map<String, String> profileProperties;
-
- public JREAction(File location) {
- this.jreLocation = location;
- }
-
- public JREAction(String environment) {
-
- this.environment = environment;
- }
-
- public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- initialize(publisherInfo);
- IArtifactDescriptor artifact = createJREData(results);
- if (artifact != null)
- publishArtifact(artifact, new File[] {jreLocation}, null, publisherInfo, createRootPrefixComputer(jreLocation));
- return Status.OK_STATUS;
- }
-
- /**
- * Creates IUs and artifact descriptors for the JRE. The resulting IUs are added
- * to the given set, and the resulting artifact descriptor, if any, is returned.
- * If the jreLocation is <code>null</code>, default information is generated.
- */
- protected IArtifactDescriptor createJREData(IPublisherResult results) {
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- iu.setSingleton(false);
- iu.setId(DEFAULT_JRE_NAME);
- iu.setVersion(DEFAULT_JRE_VERSION);
- iu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE);
-
- generateJREIUData(iu);
-
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configId = "config." + iu.getId();//$NON-NLS-1$
- cu.setId(configId);
- cu.setVersion(iu.getVersion());
- VersionRange range = iu.getVersion() == Version.emptyVersion ? VersionRange.emptyRange : new VersionRange(iu.getVersion(), true, Version.MAX_VERSION, true);
- cu.setHost(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, null, false, false)});
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(configId, iu.getVersion())});
- cu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE);
- Map<String, String> touchpointData = new HashMap<String, String>();
-
- if (jreLocation == null || !jreLocation.exists()) {
- touchpointData.put("install", ""); //$NON-NLS-1$ //$NON-NLS-2$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- results.addIU(MetadataFactory.createInstallableUnit(iu), IPublisherResult.ROOT);
- results.addIU(MetadataFactory.createInstallableUnit(cu), IPublisherResult.ROOT);
- return null;
- }
-
- //Generate artifact for JRE
- IArtifactKey key = new ArtifactKey(PublisherHelper.BINARY_ARTIFACT_CLASSIFIER, iu.getId(), iu.getVersion());
- iu.setArtifacts(new IArtifactKey[] {key});
- results.addIU(MetadataFactory.createInstallableUnit(iu), IPublisherResult.ROOT);
-
- //Create config info for the CU
- String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- touchpointData.put("install", configurationData); //$NON-NLS-1$
- String unConfigurationData = "cleanupzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- touchpointData.put("uninstall", unConfigurationData); //$NON-NLS-1$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- results.addIU(MetadataFactory.createInstallableUnit(cu), IPublisherResult.ROOT);
-
- //Create the artifact descriptor
- return PublisherHelper.createArtifactDescriptor(info.getArtifactRepository(), key, jreLocation);
- }
-
- private IProvidedCapability[] generateJRECapability(String id, Version version) {
- if (profileProperties == null)
- return new IProvidedCapability[0];
-
- try {
- ManifestElement[] jrePackages = ManifestElement.parseHeader(PROFILE_SYSTEM_PACKAGES, profileProperties.get(PROFILE_SYSTEM_PACKAGES));
- IProvidedCapability[] exportedPackageAsCapabilities = new IProvidedCapability[jrePackages.length + 1];
- exportedPackageAsCapabilities[0] = PublisherHelper.createSelfCapability(id, version);
- for (int i = 1; i <= jrePackages.length; i++) {
- exportedPackageAsCapabilities[i] = MetadataFactory.createProvidedCapability(PublisherHelper.CAPABILITY_NS_JAVA_PACKAGE, jrePackages[i - 1].getValue(), null);
- }
- return exportedPackageAsCapabilities;
- } catch (BundleException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return new IProvidedCapability[0];
- }
-
- private void generateJREIUData(InstallableUnitDescription iu) {
- if (profileProperties == null || profileProperties.size() == 0)
- return; //got nothing
-
- String profileLocation = profileProperties.get(PROFILE_LOCATION);
-
- String profileName = profileLocation != null ? new Path(profileLocation).lastSegment() : profileProperties.get(PROFILE_NAME);
- if (profileName.endsWith(".profile")) //$NON-NLS-1$
- profileName = profileName.substring(0, profileName.length() - 8);
- Version version = null;
- int idx = profileName.indexOf('-');
- if (idx != -1) {
- try {
- version = Version.parseVersion(profileName.substring(idx + 1));
- } catch (IllegalArgumentException e) {
- //ignore
- }
- profileName = profileName.substring(0, idx);
- }
- if (version == null) {
- try {
- String targetVersion = profileProperties.get(PROFILE_TARGET_VERSION);
- version = targetVersion != null ? Version.parseVersion(targetVersion) : null;
- } catch (IllegalArgumentException e) {
- //ignore
- }
- }
-
- if (version == null)
- version = DEFAULT_JRE_VERSION;
-
- iu.setVersion(version);
-
- profileName = profileName.replace('-', '.');
- profileName = profileName.replace('/', '.');
- profileName = profileName.replace('_', '.');
- iu.setId("a.jre." + profileName.toLowerCase()); //$NON-NLS-1$
-
- IProvidedCapability[] capabilities = generateJRECapability(iu.getId(), iu.getVersion());
- iu.setCapabilities(capabilities);
- }
-
- private void initialize(IPublisherInfo publisherInfo) {
- this.info = publisherInfo;
-
- if (jreLocation != null) {
- //Look for a JRE profile file to set version and capabilities
- File[] profiles = jreLocation.listFiles(new FileFilter() {
- public boolean accept(File pathname) {
- return pathname.getAbsolutePath().endsWith(".profile"); //$NON-NLS-1$
- }
- });
- if (profiles != null && profiles.length > 0) {
- profileProperties = loadProfile(profiles[0]);
- }
- }
- if (profileProperties == null) {
- String entry = environment != null ? "/profiles/" + environment.replace('/', '_') + ".profile" : DEFAULT_PROFILE; //$NON-NLS-1$ //$NON-NLS-2$
- URL profileURL = Activator.getContext().getBundle().getEntry(entry);
- profileProperties = loadProfile(profileURL);
- }
- }
-
- private Map<String, String> loadProfile(File profileFile) {
- if (profileFile == null || !profileFile.exists())
- return null;
-
- try {
- InputStream stream = new BufferedInputStream(new FileInputStream(profileFile));
- Map<String, String> properties = loadProfile(stream);
- if (properties != null)
- properties.put(PROFILE_LOCATION, profileFile.getAbsolutePath());
- return properties;
- } catch (FileNotFoundException e) {
- //null
- }
- return null;
- }
-
- private Map<String, String> loadProfile(URL profileURL) {
- if (profileURL == null)
- return null;
-
- try {
- InputStream stream = profileURL.openStream();
- return loadProfile(stream);
- } catch (IOException e) {
- //null
- }
- return null;
- }
-
- /**
- * Always closes the stream when done
- */
- private Map<String, String> loadProfile(InputStream stream) {
- if (stream != null) {
- try {
- return CollectionUtils.loadProperties(stream);
- } catch (IOException e) {
- return null;
- } finally {
- try {
- stream.close();
- } catch (IOException e) {
- // error
- }
- }
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/MergeResultsAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/MergeResultsAction.java
deleted file mode 100644
index e43e0d0e5..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/MergeResultsAction.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.publisher.*;
-
-public class MergeResultsAction extends AbstractPublisherAction {
-
- private IPublisherAction[] actions;
- private int mode;
-
- public MergeResultsAction(IPublisherAction[] actions, int mode) {
- this.actions = actions;
- this.mode = mode;
- }
-
- public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- MultiStatus finalStatus = new MultiStatus(MergeResultsAction.class.getName(), 0, "publishing result", null); //$NON-NLS-1$
- for (int i = 0; i < actions.length; i++) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- IPublisherAction action = actions[i];
- IPublisherResult result = new PublisherResult();
- finalStatus.merge(action.perform(publisherInfo, result, monitor));
- results.merge(result, mode);
- }
- if (!finalStatus.isOK())
- return finalStatus;
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/QueryableFilterAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/QueryableFilterAdvice.java
deleted file mode 100644
index b06a1ace6..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/QueryableFilterAdvice.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 EclipseSource and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * EclipseSource - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.query.*;
-
-/**
- * An IFilterAdvice that looks up the desired IU in the publisher's input metadata
- * repository and returns whatever filter is found there.
- */
-public class QueryableFilterAdvice implements IFilterAdvice {
-
- private IQueryable<IInstallableUnit> queryable;
-
- public QueryableFilterAdvice(IQueryable<IInstallableUnit> queryable) {
- this.queryable = queryable;
- }
-
- public IMatchExpression<IInstallableUnit> getFilter(String id, Version version, boolean exact) {
- IQuery<IInstallableUnit> query = QueryUtil.createIUQuery(id, version);
- IQueryResult<IInstallableUnit> result = queryable.query(query, null);
- if (!result.isEmpty())
- return result.iterator().next().getFilter();
- if (exact)
- return null;
-
- query = QueryUtil.createIUQuery(id);
- result = queryable.query(query, null);
- if (!result.isEmpty())
- return result.iterator().next().getFilter();
- return null;
- }
-
- public boolean isApplicable(String configSpec, boolean includeDefault, String id, Version version) {
- return true;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAction.java
deleted file mode 100644
index 9a585ff48..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAction.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-
-public class RootFilesAction extends AbstractPublisherAction {
- private String idBase;
- private Version version;
- private String flavor;
- private boolean createParent = true;
-
- /**
- * Returns the id of the top level IU published by this action for the given id and flavor.
- * @param id the id of the application being published
- * @param flavor the flavor being published
- * @return the if for ius published by this action
- */
- public static String computeIUId(String id, String flavor) {
- return flavor + id + ".rootfiles"; //$NON-NLS-1$
- }
-
- public RootFilesAction(IPublisherInfo info, String idBase, Version version, String flavor) {
- this.idBase = idBase == null ? "org.eclipse" : idBase; //$NON-NLS-1$
- this.version = version;
- this.flavor = flavor;
- }
-
- public void setCreateParent(boolean createParent) {
- this.createParent = createParent;
- }
-
- public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- setPublisherInfo(publisherInfo);
- IPublisherResult innerResult = new PublisherResult();
- // we have N platforms, generate a CU for each
- // TODO try and find common properties across platforms
- String[] configSpecs = publisherInfo.getConfigurations();
- for (int i = 0; i < configSpecs.length; i++) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- generateRootFileIUs(configSpecs[i], innerResult);
- }
- // merge the IUs into the final result as non-roots and create a parent IU that captures them all
- results.merge(innerResult, IPublisherResult.MERGE_ALL_NON_ROOT);
- if (createParent)
- publishTopLevelRootFilesIU(innerResult.getIUs(null, IPublisherResult.ROOT), results);
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- return Status.OK_STATUS;
- }
-
- private void publishTopLevelRootFilesIU(Collection<? extends IVersionedId> children, IPublisherResult result) {
- InstallableUnitDescription descriptor = createParentIU(children, computeIUId(idBase, flavor), version);
- descriptor.setSingleton(true);
- IInstallableUnit rootIU = MetadataFactory.createInstallableUnit(descriptor);
- if (rootIU == null)
- return;
- result.addIU(rootIU, IPublisherResult.ROOT);
- }
-
- /**
- * Generates IUs and CUs for the files that make up the root files for a given
- * ws/os/arch combination.
- */
- private void generateRootFileIUs(String configSpec, IPublisherResult result) {
- // Create the IU for the executable
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- iu.setSingleton(true);
- String idPrefix = idBase + ".rootfiles"; //$NON-NLS-1$
- String iuId = idPrefix + '.' + createIdString(configSpec);
- iu.setId(iuId);
- iu.setVersion(version);
- IMatchExpression<IInstallableUnit> filter = createFilterSpec(configSpec);
- iu.setFilter(filter);
- IArtifactKey key = PublisherHelper.createBinaryArtifactKey(iuId, version);
- iu.setArtifacts(new IArtifactKey[] {key});
- iu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE);
- IProvidedCapability launcherCapability = MetadataFactory.createProvidedCapability(flavor + idBase, idPrefix, version);
- iu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(iuId, version), launcherCapability});
- result.addIU(MetadataFactory.createInstallableUnit(iu), IPublisherResult.ROOT);
-
- // Create the CU that installs/configures the executable
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configUnitId = flavor + iuId;
- cu.setId(configUnitId);
- cu.setVersion(version);
- cu.setFilter(filter);
- cu.setHost(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iuId, new VersionRange(version, true, version, true), null, false, false)});
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
-
- //TODO bug 218890, would like the fragment to provide the launcher capability as well, but can't right now.
- cu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(configUnitId, version)});
-
- cu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE);
- Map<String, String> touchpointData = new HashMap<String, String>();
- String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- touchpointData.put("install", configurationData); //$NON-NLS-1$
- String unConfigurationData = "cleanupzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- touchpointData.put("uninstall", unConfigurationData); //$NON-NLS-1$
- processTouchpointAdvice(cu, touchpointData, info, configSpec);
- IInstallableUnit unit = MetadataFactory.createInstallableUnit(cu);
- result.addIU(unit, IPublisherResult.ROOT);
-
- if ((info.getArtifactOptions() & (IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH)) > 0) {
- // Create the artifact descriptor. we have several files so no path on disk
- IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(info.getArtifactRepository(), key, null);
- IRootFilesAdvice advice = getAdvice(configSpec);
- publishArtifact(descriptor, advice.getIncludedFiles(), advice.getExcludedFiles(), info, createPrefixComputer(advice.getRoot()));
- }
- }
-
- private IPathComputer createPrefixComputer(File root) {
- if (root == null)
- return createParentPrefixComputer(1);
- return createRootPrefixComputer(root);
- }
-
- /**
- * Compiles the <class>IRootFilesAdvice</class> from the <code>info</code> into one <class>IRootFilesAdvice</class>
- * and returns the result.
- * @param configSpec
- * @return a compilation of <class>IRootfilesAdvice</class> from the <code>info</code>.
- */
- private IRootFilesAdvice getAdvice(String configSpec) {
- Collection<IRootFilesAdvice> advice = info.getAdvice(configSpec, true, null, null, IRootFilesAdvice.class);
- ArrayList<File> inclusions = new ArrayList<File>();
- ArrayList<File> exclusions = new ArrayList<File>();
- File root = null;
- for (IRootFilesAdvice entry : advice) {
- // TODO for now we simply get root from the first advice that has one
- if (root == null)
- root = entry.getRoot();
- File[] list = entry.getIncludedFiles();
- if (list != null)
- inclusions.addAll(Arrays.asList(list));
- list = entry.getExcludedFiles();
- if (list != null)
- exclusions.addAll(Arrays.asList(list));
- }
- File[] includeList = inclusions.toArray(new File[inclusions.size()]);
- File[] excludeList = exclusions.toArray(new File[exclusions.size()]);
- return new RootFilesAdvice(root, includeList, excludeList, configSpec);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAdvice.java
deleted file mode 100644
index 2a904e693..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAdvice.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import java.io.File;
-import org.eclipse.equinox.p2.publisher.AbstractAdvice;
-
-public class RootFilesAdvice extends AbstractAdvice implements IRootFilesAdvice {
- private File root;
- private File[] excludedFiles;
- private File[] includedFiles;
- private String configSpec;
-
- public RootFilesAdvice(File root, File[] includedFiles, File[] excludedFiles, String configSpec) {
- this.root = root;
- this.excludedFiles = excludedFiles;
- this.includedFiles = includedFiles;
- this.configSpec = configSpec;
- }
-
- public File getRoot() {
- return root;
- }
-
- protected String getConfigSpec() {
- return configSpec;
- }
-
- public File[] getExcludedFiles() {
- return excludedFiles;
- }
-
- public File[] getIncludedFiles() {
- return includedFiles;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAction.java
deleted file mode 100644
index 00dd7b5e5..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAction.java
+++ /dev/null
@@ -1,188 +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 org.eclipse.equinox.p2.metadata.MetadataFactory;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Collection;
-import java.util.HashSet;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.internal.p2.publisher.Messages;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Create a top level IU that lists all the current roots as well as any explicitly identified
- * top level IUs.
- */
-public class RootIUAction extends AbstractPublisherAction {
-
- private Version version;
- private String id;
- private String name;
- private Collection<IVersionAdvice> versionAdvice;
-
- public RootIUAction(String id, Version version, String name) {
- this.id = id;
- this.version = version;
- this.name = name;
- }
-
- public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- this.info = publisherInfo;
- return generateRootIU(results);
- }
-
- protected IStatus generateRootIU(IPublisherResult result) {
- Collection<? extends IVersionedId> children = getChildren(result);
- InstallableUnitDescription descriptor = createTopLevelIUDescription(children, null, false);
- processCapabilityAdvice(descriptor, info);
- processTouchpointAdvice(descriptor, null, info);
- processInstallableUnitPropertiesAdvice(descriptor, info);
- processLicense(descriptor, info);
- IInstallableUnit rootIU = MetadataFactory.createInstallableUnit(descriptor);
- if (rootIU == null)
- return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.error_rootIU_generation, new Object[] {name, id, version}));
- result.addIU(rootIU, IPublisherResult.NON_ROOT);
-
- InstallableUnitDescription[] others = processAdditionalInstallableUnitsAdvice(rootIU, info);
- for (int iuIndex = 0; others != null && iuIndex < others.length; iuIndex++) {
- result.addIU(MetadataFactory.createInstallableUnit(others[iuIndex]), IPublisherResult.ROOT);
- }
-
- return Status.OK_STATUS;
- // TODO why do we create a category here?
- // result.addIU(generateDefaultCategory(rootIU, rootCategory), IPublisherResult.NON_ROOT);
- }
-
- protected static void processLicense(InstallableUnitDescription iu, IPublisherInfo info) {
- Collection<ILicenseAdvice> advice = info.getAdvice(null, true, iu.getId(), iu.getVersion(), ILicenseAdvice.class);
- if (advice.size() > 0) {
- // Only process the first license we find for this IU.
- ILicenseAdvice entry = advice.iterator().next();
- String licenseText = entry.getLicenseText() == null ? "" : entry.getLicenseText(); //$NON-NLS-1$
- String licenseUrl = entry.getLicenseURL() == null ? "" : entry.getLicenseURL(); //$NON-NLS-1$
- if (licenseText.length() > 0 || licenseUrl.length() > 0)
- iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(licenseUrl), licenseText)});
- }
- }
-
- private static URI toURIOrNull(String url) {
- if (url == null)
- return null;
- try {
- return URIUtil.fromString(url);
- } catch (URISyntaxException e) {
- return null;
- }
- }
-
- /**
- * This was copied over from Generator to match up with the call from generateRootIU (above).
- * It is entirely unclear why it was needed. Should review.
- * Short term fix to ensure IUs that have no corresponding category are not lost.
- * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=211521.
- */
- // private IInstallableUnit generateDefaultCategory(IInstallableUnit rootIU) {
- // rootCategory.add(rootIU);
- //
- // InstallableUnitDescription cat = new MetadataFactory.InstallableUnitDescription();
- // cat.setSingleton(true);
- // String categoryId = rootIU.getId() + ".categoryIU"; //$NON-NLS-1$
- // cat.setId(categoryId);
- // cat.setVersion(Version.emptyVersion);
- // cat.setProperty(IInstallableUnit.PROP_NAME, rootIU.getProperty(IInstallableUnit.PROP_NAME));
- // cat.setProperty(IInstallableUnit.PROP_DESCRIPTION, rootIU.getProperty(IInstallableUnit.PROP_DESCRIPTION));
- //
- // ArrayList required = new ArrayList(rootCategory.size());
- // for (Iterator iterator = rootCategory.iterator(); iterator.hasNext();) {
- // IInstallableUnit iu = (IInstallableUnit) iterator.next();
- // required.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), VersionRange.emptyRange, iu.getFilter(), false, false));
- // }
- // cat.setRequiredCapabilities((RequiredCapability[]) required.toArray(new RequiredCapability[required.size()]));
- // cat.setCapabilities(new ProvidedCapability[] {MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, categoryId, Version.emptyVersion)});
- // cat.setArtifacts(new IArtifactKey[0]);
- // cat.setProperty(IInstallableUnit.PROP_TYPE_CATEGORY, "true"); //$NON-NLS-1$
- // return MetadataFactory.createInstallableUnit(cat);
- // }
- private Collection<? extends IVersionedId> getChildren(IPublisherResult result) {
- // get any roots that we have accummulated so far and search for
- // children from the advice.
- HashSet<IVersionedId> children = new HashSet<IVersionedId>();
- Collection<IRootIUAdvice> rootAdvice = info.getAdvice(null, true, null, null, IRootIUAdvice.class);
- if (rootAdvice == null)
- return children;
- for (IRootIUAdvice advice : rootAdvice) {
- Collection<? extends Object> list = advice.getChildren(result);
- if (list != null)
- for (Object object : list) {
- // if the advice is a string, look it up in the result. if not there then
- // query the known metadata repos
- if (object instanceof String) {
- String childId = (String) object;
- IInstallableUnit iu = queryForIU(result, childId, getVersionAdvice(childId));
- if (iu != null)
- children.add(iu);
- } else if (object instanceof IVersionedId) {
- children.add((IVersionedId) object);
- }
- }
- }
- return children;
- }
-
- private InstallableUnitDescription createTopLevelIUDescription(Collection<? extends IVersionedId> children, Collection<IRequirement> requires, boolean configureLauncherData) {
- InstallableUnitDescription root = new MetadataFactory.InstallableUnitDescription();
- root.setSingleton(true);
- root.setId(id);
- root.setVersion(version);
- root.setProperty(IInstallableUnit.PROP_NAME, name);
-
- Collection<IRequirement> requiredCapabilities = createIURequirements(children);
- if (requires != null)
- requiredCapabilities.addAll(requires);
- root.setRequirements(requiredCapabilities.toArray(new IRequirement[requiredCapabilities.size()]));
- root.setArtifacts(new IArtifactKey[0]);
-
- root.setProperty("lineUp", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- root.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, VersionRange.emptyRange, IUpdateDescriptor.NORMAL, null));
- root.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString());
- root.setCapabilities(new IProvidedCapability[] {createSelfCapability(id, version)});
- // TODO why is the type OSGI?
- root.setTouchpointType(PublisherHelper.TOUCHPOINT_OSGI);
- return root;
- }
-
- private Version getVersionAdvice(String iuID) {
- if (versionAdvice == null) {
- versionAdvice = info.getAdvice(null, true, null, null, IVersionAdvice.class);
- if (versionAdvice == null)
- return null;
- }
- for (IVersionAdvice advice : versionAdvice) {
- // TODO have to figure a way to know the namespace here. for now just look everywhere
- Version result = advice.getVersion(IInstallableUnit.NAMESPACE_IU_ID, iuID);
- if (result == null)
- result = advice.getVersion(IVersionAdvice.NS_BUNDLE, iuID);
- if (result == null)
- result = advice.getVersion(IVersionAdvice.NS_FEATURE, iuID);
- if (result != null)
- return result;
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAdvice.java
deleted file mode 100644
index 5dbfb5274..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAdvice.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import java.util.Collection;
-import org.eclipse.equinox.p2.publisher.AbstractAdvice;
-import org.eclipse.equinox.p2.publisher.IPublisherResult;
-
-/**
- * Advises publisher actions as to which IUs should be listed as children of an
- * eventual root IU. Each child is described as a VersionedName.
- */
-public class RootIUAdvice extends AbstractAdvice implements IRootIUAdvice {
-
- private Collection<? extends Object> children;
-
- public RootIUAdvice(Collection<? extends Object> children) {
- this.children = children;
- }
-
- public Collection<? extends Object> getChildren(IPublisherResult result) {
- return children;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUResultFilterAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUResultFilterAdvice.java
deleted file mode 100644
index bb858bc93..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUResultFilterAdvice.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import java.util.Arrays;
-import java.util.Collection;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.publisher.AbstractAdvice;
-import org.eclipse.equinox.p2.publisher.IPublisherResult;
-import org.eclipse.equinox.p2.query.IQuery;
-
-public class RootIUResultFilterAdvice extends AbstractAdvice implements IRootIUAdvice {
- private IQuery<IInstallableUnit> query;
-
- public RootIUResultFilterAdvice(IQuery<IInstallableUnit> query) {
- this.query = query;
- }
-
- public Collection<IInstallableUnit> getChildren(IPublisherResult result) {
- Collection<IInstallableUnit> value = result.getIUs(null, IPublisherResult.ROOT);
- if (query == null)
- return value;
- return Arrays.asList(query.perform(value.iterator()).toArray(IInstallableUnit.class));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/VersionAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/VersionAdvice.java
deleted file mode 100644
index 491c40f95..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/VersionAdvice.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import java.io.*;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.publisher.AbstractAdvice;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-public class VersionAdvice extends AbstractAdvice implements IVersionAdvice {
-
- Map<String, Map<String, Version>> versions = new HashMap<String, Map<String, Version>>(11);
-
- /**
- * Load the given namespace with version mappings from the properties file at
- * the given location. The properties file is expected to be in the normal format
- * produced and consumed by PDE Build.
- * @param namespace the namespace to populate. If "null" is passed
- * in, the version will be stored in the "null" namespace
- * @param location the location of the mapping file
- */
- public void load(String namespace, String location) {
- load(namespace, location, null);
- }
-
- public void load(String namespace, String location, String idSuffix) {
- File file = new File(location);
- if (namespace == null)
- namespace = "null"; //$NON-NLS-1$
-
- Map<String, String> properties;
- InputStream stream = null;
- try {
- stream = new BufferedInputStream(new FileInputStream(file));
- properties = CollectionUtils.loadProperties(stream);
- } catch (IOException e) {
- return;
- } finally {
- if (stream != null)
- try {
- stream.close();
- } catch (IOException e) {
- //nothing
- }
- }
- for (Entry<String, String> entry : properties.entrySet()) {
- String key = entry.getKey();
- if (idSuffix != null)
- key += idSuffix;
- setVersion(namespace, key, Version.parseVersion(entry.getValue()));
- }
- }
-
- /**
- * Returns the version advice for the given id in the given namespace.
- * @param namespace the namespace in which to look for advice
- * @param id the item for which advice is sought
- * @return the version advice found or <code>null</code> if none
- */
- public Version getVersion(String namespace, String id) {
- Map<String, Version> values = versions.get(namespace);
- // if no one says anything then don't say anything. someone else might have an opinion
- if (values != null) {
- Version result = values.get(id);
- if (result != null)
- return result;
- }
-
- values = versions.get("null"); //$NON-NLS-1$
- if (values == null)
- return null;
- return values.get(id);
- }
-
- /**
- * Sets the version advice for the given id in the given namespace.
- * @param namespace the namespace in which to look for advice
- * @param id the item for which advice is sought
- * @param version the version advice for the given id or <code>null</code> to remove advice
- */
- public void setVersion(String namespace, String id, Version version) {
- Map<String, Version> values = versions.get(namespace);
- if (values == null) {
- // if we are clearing values then there is nothing to do
- if (version == null)
- return;
- values = new HashMap<String, Version>();
- versions.put(namespace, values);
- }
- if (version == null)
- values.remove(id);
- else
- values.put(id, version);
- }
-
- public IPublisherAdvice merge(IPublisherAdvice advice) {
- if (!(advice instanceof VersionAdvice))
- return this;
- VersionAdvice source = (VersionAdvice) advice;
- for (String namespace : source.versions.keySet()) {
- Map<String, Version> myValues = versions.get(namespace);
- Map<String, Version> sourceValues = source.versions.get(namespace);
- if (myValues == null)
- versions.put(namespace, sourceValues);
- else if (sourceValues != null)
- versions.put(namespace, merge(myValues, sourceValues));
- }
- return this;
- }
-
- private Map<String, Version> merge(Map<String, Version> myValues, Map<String, Version> sourceValues) {
- Map<String, Version> result = new HashMap<String, Version>(myValues);
- for (String key : sourceValues.keySet()) {
- if (result.get(key) == null)
- result.put(key, sourceValues.get(key));
- }
- return result;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/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 db80201ee..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/LocalizationHelper.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.spi.p2.publisher;
-
-import java.io.*;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.*;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-
-/**
- * Helper functions supporting the processing of localized
- * property files.
- *
- */
-public final class LocalizationHelper {
-
- private static final String PROPERTIES_FILE_EXTENSION = ".properties"; //$NON-NLS-1$
- private static final Locale DEFAULT_LOCALE = new Locale("df", "LT"); //$NON-NLS-1$//$NON-NLS-2$
- private static LocalizationHelper instance = new LocalizationHelper();
-
- // Extract the locale string from the properties file with the given filename
- // where the locale string follows the given prefix. For example, return "zh_HK"
- // from filename == "plugin_zh_HK.properties" and prefix == "plugin".
- static public String getLocaleString(String filename, String prefix) {
- String localeString = null;
- if (filename.startsWith(prefix) && filename.endsWith(PROPERTIES_FILE_EXTENSION)) {
- if (filename.length() > prefix.length() + PROPERTIES_FILE_EXTENSION.length()) {
- localeString = filename.substring(prefix.length() + 1, filename.length() - PROPERTIES_FILE_EXTENSION.length());
- } else {
- localeString = ""; //$NON-NLS-1$
- }
- }
- return localeString;
- }
-
- // Get the locale corresponding to the given locale string
- static public Locale getLocale(String localeString) {
- Locale locale = DEFAULT_LOCALE;
- if (localeString.length() == 5 && localeString.indexOf('_') == 2) {
- locale = new Locale(localeString.substring(0, 2), localeString.substring(3, 5));
- } else if (localeString.length() == 2) {
- locale = new Locale(localeString.substring(0, 2));
- }
- return locale;
- }
-
- // For the given root directory and path to localization files within that directory
- // get a map from locale to property set for the localization property files.
- public static Map<Locale, Map<String, String>> getDirPropertyLocalizations(File root, String localizationPath, Locale defaultLocale, String[] propertyKeys) {
- File fullPath = new File(root, localizationPath);
- File localizationDir = fullPath.getParentFile();
- final String localizationFile = fullPath.getName();
- String[] localizationFiles = LocalizationHelper.getLocalizationFiles(localizationDir, localizationFile);
-
- HashMap<Locale, Map<String, String>> localizations = null;
-
- if (localizationFiles != null && localizationFiles.length > 0) {
- localizations = new HashMap<Locale, Map<String, String>>(localizationFiles.length);
- for (int i = 0; i < localizationFiles.length; i++) {
- String nextFile = localizationFiles[i];
- Locale nextLocale = getLocale(LocalizationHelper.getLocaleString(nextFile, localizationFile));
-
- try {
- Map<String, String> properties = loadProperties(root, nextFile);
- Map<String, String> localizedStrings = getLocalizedProperties(propertyKeys, properties);
- if (localizedStrings.size() > 0) {
- localizations.put(nextLocale, localizedStrings);
- if (DEFAULT_LOCALE.equals(nextLocale) && defaultLocale != null) {
- localizations.put(nextLocale, localizedStrings);
- }
- }
- } catch (IOException ioe) {
- ioe.printStackTrace();
- }
- }
- }
-
- return localizations;
- }
-
- public static Map<Locale, Map<String, String>> getJarPropertyLocalizations(File root, String localizationPath, Locale defaultLocale, String[] propertyKeys) {
- ZipFile jarFile = null;
- Map<Locale, Map<String, String>> localizations = new HashMap<Locale, Map<String, String>>(4);
- try {
- jarFile = new ZipFile(root, ZipFile.OPEN_READ);
- for (Enumeration<? extends ZipEntry> entries = jarFile.entries(); entries.hasMoreElements();) {
- ZipEntry nextEntry = entries.nextElement();
- String nextName = nextEntry.getName();
- String localeString = LocalizationHelper.getLocaleString(nextName, localizationPath);
-
- if (!nextEntry.isDirectory() && localeString != null) {
- Locale nextLocale = LocalizationHelper.getLocale(localeString);
- InputStream stream = null;
- try {
- stream = jarFile.getInputStream(nextEntry);
- Map<String, String> properties = CollectionUtils.loadProperties(stream);
- Map<String, String> localizedStrings = LocalizationHelper.getLocalizedProperties(propertyKeys, properties);
- if (localizedStrings.size() > 0) {
- localizations.put(nextLocale, localizedStrings);
- if (DEFAULT_LOCALE.equals(nextLocale) && defaultLocale != null) {
- localizations.put(nextLocale, localizedStrings);
- }
- }
- } finally {
- if (stream != null)
- stream.close();
- }
- }
- }
- } catch (IOException ioe) {
- ioe.printStackTrace();
- } finally {
- if (jarFile != null) {
- try {
- jarFile.close();
- } catch (IOException ioe) {
- // do nothing
- }
- }
- }
-
- return localizations;
- }
-
- // Load a property set from given root and file with the given name
- private static Map<String, String> loadProperties(File root, String propertyFilename) throws IOException {
- InputStream propertyStream = null;
- try {
- try {
- if (root.isDirectory())
- propertyStream = new FileInputStream(new File(root, propertyFilename));
- else {
- URLConnection connection = new URL("jar:" + root.toURL().toExternalForm() + "!/" + propertyFilename).openConnection(); //$NON-NLS-1$ //$NON-NLS-2$
- connection.setUseCaches(false);
- propertyStream = connection.getInputStream();
- }
- } catch (FileNotFoundException e) {
- // if there is no messages file then just return;
- return CollectionUtils.emptyMap();
- }
- return CollectionUtils.loadProperties(propertyStream);
- } finally {
- if (propertyStream != null)
- propertyStream.close();
- }
- }
-
- // Given a list of keys and the corresponding localized property set,
- // return a new property set with those keys and the localized values.
- static public Map<String, String> getLocalizedProperties(String[] propertyKeys, Map<String, String> properties) {
- Map<String, String> localizedProperties = new HashMap<String, String>();
- for (int i = 0; i < propertyKeys.length; i++) {
- String key = propertyKeys[i];
- if (key != null) {
- String localizedValue = properties.get(key);
- if (localizedValue != null)
- localizedProperties.put(key, localizedValue);
- }
- }
- return localizedProperties;
- }
-
- public static String[] getLocalizationFiles(File localizationDir, final String filenamePrefix) {
- return localizationDir.list(instance.new FileFilter() {
- public boolean accept(File directory, String filename) {
- return (getLocaleString(filename, filenamePrefix) != null ? true : false);
- }
- });
- }
-
- private abstract class FileFilter implements FilenameFilter {
-
- public FileFilter() {
- // Nothing to do
- }
-
- /* (non-Javadoc)
- * @see java.io.FilenameFilter#accept(java.io.File, java.lang.String)
- */
- public abstract boolean accept(File directory, String filename);
- }
-
- private LocalizationHelper() {
- //
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java
deleted file mode 100644
index 6d2e2f035..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.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
- * Genuitec, LLC - added license support
- * Code 9 - Ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.spi.p2.publisher;
-
-import java.io.*;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.equinox.internal.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.p2.publisher.IPublisherInfo;
-import org.eclipse.equinox.p2.publisher.PublisherInfo;
-import org.eclipse.equinox.p2.publisher.eclipse.*;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-import org.osgi.framework.Constants;
-
-/**
- * This class was originally the MetadataGeneratorHelper from the Generator.
- * Much of the code has been deprecated and will be removed.
- *
- */
-public class PublisherHelper {
- /**
- * A capability namespace representing the type of Eclipse resource (bundle, feature, source bundle, etc)
- * @see IProvidedCapability#getNamespace()
- */
- public static final String NAMESPACE_ECLIPSE_TYPE = "org.eclipse.equinox.p2.eclipse.type"; //$NON-NLS-1$
-
- public static final String NAMESPACE_FLAVOR = "org.eclipse.equinox.p2.flavor"; //$NON-NLS-1$"
- /**
- * A capability name in the {@link #NAMESPACE_ECLIPSE_TYPE} namespace
- * representing a feature
- * @see IProvidedCapability#getName()
- */
- public static final String TYPE_ECLIPSE_FEATURE = "feature"; //$NON-NLS-1$
-
- /**
- * A capability name in the {@link #NAMESPACE_ECLIPSE_TYPE} namespace
- * representing a source bundle
- * @see IProvidedCapability#getName()
- */
- public static final String TYPE_ECLIPSE_SOURCE = "source"; //$NON-NLS-1$
-
- /**
- * A capability namespace representing the localization (translation)
- * of strings from a specified IU in a specified locale
- * @see IProvidedCapability#getNamespace()
- * TODO: this should be in API, probably in IInstallableUnit
- */
- public static final String NAMESPACE_IU_LOCALIZATION = "org.eclipse.equinox.p2.localization"; //$NON-NLS-1$
-
- // Only certain properties in the bundle manifest are assumed to be localized.
- public static final String[] BUNDLE_LOCALIZED_PROPERTIES = {Constants.BUNDLE_NAME, Constants.BUNDLE_DESCRIPTION, Constants.BUNDLE_VENDOR, Constants.BUNDLE_CONTACTADDRESS, Constants.BUNDLE_DOCURL, Constants.BUNDLE_UPDATELOCATION, Constants.BUNDLE_LOCALIZATION};
-
- public static final String CAPABILITY_NS_JAVA_PACKAGE = "java.package"; //$NON-NLS-1$
-
- public static final String CAPABILITY_NS_UPDATE_FEATURE = "org.eclipse.update.feature"; //$NON-NLS-1$
-
- public static final String ECLIPSE_FEATURE_CLASSIFIER = "org.eclipse.update.feature"; //$NON-NLS-1$
- public static final String OSGI_BUNDLE_CLASSIFIER = "osgi.bundle"; //$NON-NLS-1$
- public static final String BINARY_ARTIFACT_CLASSIFIER = "binary"; //$NON-NLS-1$
-
- public static final String INSTALL_FEATURES_FILTER = "(org.eclipse.update.install.features=true)"; //$NON-NLS-1$
-
- public static final String IU_NAMESPACE = IInstallableUnit.NAMESPACE_IU_ID;
-
- public static final String ECLIPSE_INSTALL_HANDLER_PROP = "org.eclipse.update.installHandler"; //$NON-NLS-1$
-
- public static final ITouchpointType TOUCHPOINT_NATIVE = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.native", Version.createOSGi(1, 0, 0)); //$NON-NLS-1$
- public static final ITouchpointType TOUCHPOINT_OSGI = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.osgi", Version.createOSGi(1, 0, 0)); //$NON-NLS-1$
-
- public static final IProvidedCapability FEATURE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_FEATURE, Version.createOSGi(1, 0, 0));
-
- public static IArtifactDescriptor createArtifactDescriptor(IArtifactKey key, File pathOnDisk) {
- return createArtifactDescriptor(null, key, pathOnDisk);
- }
-
- public static IArtifactDescriptor createArtifactDescriptor(IArtifactRepository artifactRepo, IArtifactKey key, File pathOnDisk) {
- IArtifactDescriptor result = artifactRepo != null ? artifactRepo.createArtifactDescriptor(key) : new ArtifactDescriptor(key);
- if (result instanceof ArtifactDescriptor) {
- ArtifactDescriptor descriptor = (ArtifactDescriptor) result;
- if (pathOnDisk != null) {
- descriptor.setProperty(IArtifactDescriptor.ARTIFACT_SIZE, Long.toString(pathOnDisk.length()));
- descriptor.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, Long.toString(pathOnDisk.length()));
- }
- String md5 = computeMD5(pathOnDisk);
- if (md5 != null)
- descriptor.setProperty(IArtifactDescriptor.DOWNLOAD_MD5, md5);
- }
- return result;
- }
-
- private static String computeMD5(File file) {
- if (file == null || file.isDirectory() || !file.exists())
- return null;
- MessageDigest md5Checker;
- try {
- md5Checker = MessageDigest.getInstance("MD5"); //$NON-NLS-1$
- } catch (NoSuchAlgorithmException e) {
- return null;
- }
- InputStream fis = null;
- try {
- fis = new BufferedInputStream(new FileInputStream(file));
- int read = -1;
- while ((read = fis.read()) != -1) {
- md5Checker.update((byte) read);
- }
- byte[] digest = md5Checker.digest();
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < digest.length; i++) {
- if ((digest[i] & 0xFF) < 0x10)
- buf.append('0');
- buf.append(Integer.toHexString(digest[i] & 0xFF));
- }
- return buf.toString();
- } catch (FileNotFoundException e) {
- return null;
- } catch (IOException e) {
- return null;
- } finally {
- if (fis != null)
- try {
- fis.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-
- public static IProvidedCapability makeTranslationCapability(String hostId, Locale locale) {
- return MetadataFactory.createProvidedCapability(NAMESPACE_IU_LOCALIZATION, locale.toString(), Version.createOSGi(1, 0, 0));
- }
-
- public static String createDefaultConfigUnitId(String classifier, String configurationFlavor) {
- return configurationFlavor + "." + classifier + ".default"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public static IInstallableUnit createDefaultFeatureConfigurationUnit(String configurationFlavor) {
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configUnitId = createDefaultConfigUnitId(ECLIPSE_FEATURE_CLASSIFIER, configurationFlavor);
- cu.setId(configUnitId);
- Version configUnitVersion = Version.createOSGi(1, 0, 0);
- cu.setVersion(configUnitVersion);
-
- // Add capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
-
- // Create a required capability on features
- IRequirement[] reqs = new IRequirement[] {MetadataFactory.createRequirement(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_FEATURE, VersionRange.emptyRange, null, true, true, false)};
- cu.setHost(reqs);
-
- cu.setFilter(INSTALL_FEATURES_FILTER);
- Map<String, String> touchpointData = new HashMap<String, String>();
- touchpointData.put("install", "installFeature(feature:${artifact},featureId:default,featureVersion:default)"); //$NON-NLS-1$//$NON-NLS-2$
- touchpointData.put("uninstall", "uninstallFeature(feature:${artifact},featureId:default,featureVersion:default)"); //$NON-NLS-1$//$NON-NLS-2$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
-
- return MetadataFactory.createInstallableUnit(cu);
- }
-
- public static IInstallableUnit createDefaultConfigurationUnitForSourceBundles(String configurationFlavor) {
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configUnitId = createDefaultConfigUnitId("source", configurationFlavor); //$NON-NLS-1$
- cu.setId(configUnitId);
- Version configUnitVersion = Version.createOSGi(1, 0, 0);
- cu.setVersion(configUnitVersion);
-
- // Add capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
-
- // Create a required capability on source providers
- IRequirement[] reqs = new IRequirement[] {MetadataFactory.createRequirement(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_SOURCE, VersionRange.emptyRange, null, true, true, false)};
- cu.setHost(reqs);
- Map<String, String> touchpointData = new HashMap<String, String>();
-
- touchpointData.put("install", "addSourceBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
- touchpointData.put("uninstall", "removeSourceBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- return MetadataFactory.createInstallableUnit(cu);
- }
-
- private static void addExtraProperties(IInstallableUnit iiu, Map<String, String> extraProperties) {
- if (iiu instanceof InstallableUnit) {
- InstallableUnit iu = (InstallableUnit) iiu;
-
- for (Entry<String, String> entry : extraProperties.entrySet()) {
- iu.setProperty(entry.getKey(), entry.getValue());
- }
- }
- }
-
- public static IInstallableUnit[] createEclipseIU(BundleDescription bd, boolean isFolderPlugin, IArtifactKey key, Map<String, String> extraProperties) {
- ArrayList<IInstallableUnit> iusCreated = new ArrayList<IInstallableUnit>(1);
- IPublisherInfo info = new PublisherInfo();
- String shape = isFolderPlugin ? IBundleShapeAdvice.DIR : IBundleShapeAdvice.JAR;
- info.addAdvice(new BundleShapeAdvice(bd.getSymbolicName(), fromOSGiVersion(bd.getVersion()), shape));
- IInstallableUnit iu = BundlesAction.createBundleIU(bd, key, info);
- addExtraProperties(iu, extraProperties);
- iusCreated.add(iu);
- return (iusCreated.toArray(new IInstallableUnit[iusCreated.size()]));
- }
-
- public static ArtifactKey createBinaryArtifactKey(String id, Version version) {
- return new ArtifactKey(BINARY_ARTIFACT_CLASSIFIER, id, version);
- }
-
- public static IProvidedCapability createSelfCapability(String installableUnitId, Version installableUnitVersion) {
- return MetadataFactory.createProvidedCapability(IU_NAMESPACE, installableUnitId, installableUnitVersion);
- }
-
- /**
- * Convert <code>version</code> into its OSGi equivalent if possible.
- *
- * @param version The version to convert. Can be <code>null</code>
- * @return The converted version or <code>null</code> if the argument was <code>null</code>
- * @throws UnsupportedOperationException if the version could not be converted into an OSGi version
- */
- public static org.osgi.framework.Version toOSGiVersion(Version version) {
- if (version == null)
- return null;
- if (version == Version.emptyVersion)
- return org.osgi.framework.Version.emptyVersion;
- if (version == Version.MAX_VERSION)
- return new org.osgi.framework.Version(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE);
-
- BasicVersion bv = (BasicVersion) version;
- return new org.osgi.framework.Version(bv.getMajor(), bv.getMinor(), bv.getMicro(), bv.getQualifier());
- }
-
- /**
- * Create an omni version from an OSGi <code>version</code>.
- * @param version The OSGi version. Can be <code>null</code>.
- * @return The created omni version
- */
- public static Version fromOSGiVersion(org.osgi.framework.Version version) {
- if (version == null)
- return null;
- if (version.getMajor() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE)
- return Version.MAX_VERSION;
- return Version.createOSGi(version.getMajor(), version.getMinor(), version.getMicro(), version.getQualifier());
- }
-
- public static org.eclipse.osgi.service.resolver.VersionRange toOSGiVersionRange(VersionRange range) {
- if (range.equals(VersionRange.emptyRange))
- return org.eclipse.osgi.service.resolver.VersionRange.emptyRange;
- return new org.eclipse.osgi.service.resolver.VersionRange(toOSGiVersion(range.getMinimum()), range.getIncludeMinimum(), toOSGiVersion(range.getMaximum()), range.getIncludeMinimum());
- }
-
- public static VersionRange fromOSGiVersionRange(org.eclipse.osgi.service.resolver.VersionRange range) {
- if (range.equals(org.eclipse.osgi.service.resolver.VersionRange.emptyRange))
- return VersionRange.emptyRange;
- return new VersionRange(fromOSGiVersion(range.getMinimum()), range.getIncludeMinimum(), fromOSGiVersion(range.getMaximum()), range.getIncludeMaximum());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ql/.classpath b/bundles/org.eclipse.equinox.p2.ql/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.ql/.project b/bundles/org.eclipse.equinox.p2.ql/.project
deleted file mode 100644
index bf129f044..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/.project
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.ql</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index b069b3cf4..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Thu Nov 12 08:11:03 CET 2009
-eclipse.preferences.version=1
-encoding//model/p2ql.ecorediag=UTF-8
diff --git a/bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 62ea9274b..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,347 +0,0 @@
-#Tue Dec 22 17:40:14 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 014501b61..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:57:54 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.ql/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ql/META-INF/MANIFEST.MF
deleted file mode 100644
index 072c1650e..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.ql;singleton:=true
-Bundle-Version: 2.0.0.qualifier
-Bundle-ClassPath: .
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.p2.ql;version="2.0.0"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.1"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)"
diff --git a/bundles/org.eclipse.equinox.p2.ql/about.html b/bundles/org.eclipse.equinox.p2.ql/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ql/build.properties b/bundles/org.eclipse.equinox.p2.ql/build.properties
deleted file mode 100644
index e0cf562f5..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id: build.properties,v 1.3 2010/01/23 22:21:13 johna Exp $
-
-bin.includes = .,\
- META-INF/,\
- plugin.properties,\
- about.html,\
- OSGI-INF/
-jars.compile.order = .
-source.. = src/
-output.. = bin/
-src.includes = about.html,\
- model/,\
- OSGI-INF/
-javacTarget=jsr14
-javacSource=1.5
-javacWarnings..=+fieldHiding
diff --git a/bundles/org.eclipse.equinox.p2.ql/model/p2ql.bnf b/bundles/org.eclipse.equinox.p2.ql/model/p2ql.bnf
deleted file mode 100644
index 476f54187..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/model/p2ql.bnf
+++ /dev/null
@@ -1,67 +0,0 @@
-condition
- : orExpression ( '?' orExpression ':' orExpression )?
- ;
-
-orExpression : andExpression ( '||' andExpression )* ;
-
-andExpression : binaryExpression ( '&&' binaryExpression )* ;
-
-binaryExpression : notExpression ( op notExpression )?;
-
-op : '=' | '!=' | '>' | '>=' | '<' | '<=' | '~=' ;
-
-notExpression
- : '!' notExpression
- | collectionExpression
- ;
-
-collectionExpression
- : memberExpression ( '.' collectionFunction )*
- ;
-
-memberExpression : constructor ( ( '.' ID ) | ( '[' memberExpression ']' ) )* ;
-
-constructor
- : ( filter | version | range | class ) '(' unaryExpression ')'
- | set '(' ( collectionExpression ( ',' collectionExpression )* )? ')'
- | unaryExpression
- ;
-
-collectionFunction
- : ( select | reject | exists | all | traverse ) '(' lambdaDefinition ')'
- | limit '(' memberExpression ')'
- | unique '(' memberExpression? ')'
- | latest '(' lambdaDefinition? ')'
- ;
-
-lambdaDefinition
- : initializer ( ',' initializer )* ( ',' '{' lambda '}' )?
- | '{' lambda '}'
- | lambda
- ;
-
-initializer
- : '_'
- | condition
- ;
-
-lambda
- : ( ID ( ',' ID )* )? '|' condition
- ;
-
-unaryExpression
- : '(' condition ')'
- | '[' condition ( ',' condition )* ']' // #array construct
- | '/' regexpPattern '/'
- | STRING
- | INT
- | parameter
- | 'null'
- | 'true'
- | 'false'
- | ID
- ;
-
-parameter
- : '$' INT | ID
- ;
diff --git a/bundles/org.eclipse.equinox.p2.ql/plugin.properties b/bundles/org.eclipse.equinox.p2.ql/plugin.properties
deleted file mode 100644
index cd7799fdd..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/plugin.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id: plugin.properties,v 1.1 2009/12/01 17:41:31 helindbe Exp $
-
-pluginName =p2 query language
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.ql/pom.xml b/bundles/org.eclipse.equinox.p2.ql/pom.xml
deleted file mode 100644
index cffd94b54..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.ql</artifactId>
- <version>2.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLExpression.java b/bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLExpression.java
deleted file mode 100644
index 60b277ccb..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLExpression.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.ql;
-
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-
-/**
- * @noextend This interface is not intended to be extended by clients.
- * @noimplement This interface is not intended to be implemented by clients.
- * @since 2.0
- */
-public interface IQLExpression extends IExpression {
- //
-}
diff --git a/bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/package.html b/bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/package.html
deleted file mode 100644
index b23b0f12e..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/package.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-A query language specialized in the querying of p2 constructs.
-<h2>
-Package Specification</h2>
-<p>
-This package specifies a query language specialized in the handling p2 constructs.
-service.
-<p>
-@since 2.0
-<p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/.classpath b/bundles/org.eclipse.equinox.p2.reconciler.dropins/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/.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.reconciler.dropins/.cvsignore b/bundles/org.eclipse.equinox.p2.reconciler.dropins/.cvsignore
deleted file mode 100644
index e043cc4e2..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-bin
-build.xml
-javaCompiler...args
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/.project b/bundles/org.eclipse.equinox.p2.reconciler.dropins/.project
deleted file mode 100644
index bfbc706d0..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.reconciler.dropins</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.reconciler.dropins/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.reconciler.dropins/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 45a58927b..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,330 +0,0 @@
-#Wed Dec 30 07:30:16 CET 2009
-eclipse.preferences.version=1
-instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.reconciler.dropins/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 56bcc3e9b..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/.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.reconciler.dropins/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.reconciler.dropins/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/.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.reconciler.dropins/Bootstrap.product b/bundles/org.eclipse.equinox.p2.reconciler.dropins/Bootstrap.product
deleted file mode 100644
index 2d2a9af6a..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/Bootstrap.product
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="p2 bootstrap" id="org.eclipse.equinox.p2.reconciler.dropins.product" application="org.eclipse.equinox.p2.reconciler.application" version="1.1.0.qualifier" useFeatures="false" includeLaunchers="true">
-
- <launcherArgs>
- <vmArgs>-Dorg.eclipse.equinox.p2.reconciler.noConfig=true</vmArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <windowImages/>
-
- <launcher name="eclipse">
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.expressions"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.net"/>
- <plugin id="org.eclipse.core.net.win32.x86" fragment="true"/>
- <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.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.ds"/>
- <plugin id="org.eclipse.equinox.frameworkadmin"/>
- <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
- <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
- <plugin id="org.eclipse.equinox.p2.core"/>
- <plugin id="org.eclipse.equinox.p2.director"/>
- <plugin id="org.eclipse.equinox.p2.directorywatcher"/>
- <plugin id="org.eclipse.equinox.p2.engine"/>
- <plugin id="org.eclipse.equinox.p2.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.ql"/>
- <plugin id="org.eclipse.equinox.p2.reconciler.dropins"/>
- <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.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
- <plugin id="org.eclipse.equinox.util"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.services"/>
- <plugin id="org.sat4j.core"/>
- <plugin id="org.sat4j.pb"/>
- </plugins>
-
-
-</product>
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.reconciler.dropins/META-INF/MANIFEST.MF
deleted file mode 100644
index a0293d727..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,39 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.reconciler.dropins;singleton:=true
-Bundle-Version: 1.1.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.reconciler.dropins.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.reconciler.dropins;x-internal:=true
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.equinox.p2.touchpoint.eclipse;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Import-Package: 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.extensionlocation,
- org.eclipse.equinox.internal.p2.metadata.repository,
- org.eclipse.equinox.internal.p2.update,
- org.eclipse.equinox.internal.provisional.configurator,
- org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.internal.provisional.p2.directorywatcher,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.planner;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata.spi;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.service.datalocation;version="1.0.0",
- org.eclipse.osgi.service.environment;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"
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/Reconciler App - Metadata Generator.launch b/bundles/org.eclipse.equinox.p2.reconciler.dropins/Reconciler App - Metadata Generator.launch
deleted file mode 100644
index abded130d..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/Reconciler App - Metadata Generator.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="true"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Reconciler App - Metadata Generator"/>
-<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:/tmp/reconciler/repo/&#13;&#10;-artifactRepository file:D:/tmp/reconciler/repo&#13;&#10;-source D:/tmp/reconciler/eclipse&#13;&#10;-root reconciler&#13;&#10;-rootVersion 1.0.0&#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="org.eclipse.equinox.security*1.0.0.v20080421-2006@default:default,org.eclipse.core.runtime.compatibility.auth*3.2.100.v20070502@default:default,com.ibm.icu*3.8.1.v20080402@default:default,org.eclipse.equinox.common*3.4.0.v20080421-2006@default:default,org.eclipse.core.runtime*3.4.0.v20080421-1805@default:default,org.eclipse.equinox.preferences*3.2.200.v20080421-2006@default:default,org.eclipse.update.configurator*3.2.200.v20080417@default:default,org.eclipse.core.variables*3.2.100.v20080324-1600@default:default,org.eclipse.osgi*3.4.0.v20080421-2006@:,org.eclipse.core.net*1.1.0.I20080422@default:default,org.eclipse.equinox.registry*3.4.0.v20080421-2006@default:default,org.eclipse.core.jobs*3.4.0.v20080310@default:default,org.eclipse.osgi.services*3.1.200.v20071203@default:default,org.eclipse.equinox.security.win32.x86*1.0.0.v20080421-2006@default:false,org.eclipse.equinox.app*1.1.0.v20080421-2006@default:true,org.eclipse.core.runtime.compatibility.registry*3.2.200.v20070717@default:false,org.eclipse.equinox.launcher*1.0.100.v20080421-2006@default:default,org.eclipse.core.contenttype*3.3.0.v20080414@default:default,org.eclipse.core.net.win32.x86*1.0.0.HEAD@default:false,org.eclipse.ant.core*3.2.0.v20080319@default:default,org.eclipse.equinox.launcher.win32.win32.x86*1.0.100.v20080421-2006@default:false,org.eclipse.equinox.launcher*1.0.100.v20080414@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.frameworkadmin*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.equinox.p2.artifact.repository*0.1.0.qualifier@default:default,org.eclipse.equinox.p2.metadata.generator*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*2.0.0.qualifier@default:default,org.eclipse.ecf.filetransfer*2.0.0.qualifier@default:default,org.eclipse.equinox.frameworkadmin.equinox*0.1.0.qualifier@default:true,org.eclipse.ecf.provider.filetransfer.ssl*1.0.0.qualifier@default:false,org.eclipse.equinox.p2.metadata.repository*0.1.0.qualifier@default:default,org.eclipse.ecf.identity*2.0.0.qualifier@default:default,org.eclipse.ecf.ssl*1.0.0.qualifier@default:false"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/Reconciler app installation.launch b/bundles/org.eclipse.equinox.p2.reconciler.dropins/Reconciler app installation.launch
deleted file mode 100644
index 62cb457d4..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/Reconciler app installation.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/Reconciler app installation"/>
-<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;-noExit&#13;&#10;-application org.eclipse.equinox.p2.director.app.application&#13;&#10;-metadataRepository file:d:/tmp/reconciler/repo &#13;&#10;-artifactRepository file:d:/tmp/reconciler/repo &#13;&#10;-installIU reconciler &#13;&#10;-destination d:/tmp/bootstrapTest/ &#13;&#10;-bundlepool d:/tmp/pool/&#13;&#10;-profile bootProfile &#13;&#10;-p2.os win32 &#13;&#10;-p2.ws win32 &#13;&#10;-p2.arch x86&#13;&#10;-profileProperties org.eclipse.update.install.features=true"/>
-<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/bootstrapTest/p2"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.core.runtime*3.4.0.v20080421-1805@4:true,org.eclipse.equinox.common*3.4.0.v20080421-2006@default:default,org.eclipse.equinox.app*1.1.0.v20080421-2006@2:true,org.eclipse.core.runtime.compatibility.registry*3.2.200.v20070717@default:false,org.eclipse.equinox.security.win32.x86*1.0.0.v20080421-2006@default:false,org.eclipse.swt.win32.win32.x86*3.4.0.v3440@default:false,org.eclipse.equinox.preferences*3.2.200.v20080421-2006@default:default,org.eclipse.core.commands*3.4.0.v20080408-0800@default:default,org.eclipse.swt*3.4.0.v3440@default:default,org.eclipse.core.runtime.compatibility.auth*3.2.100.v20070502@default:default,org.eclipse.core.contenttype*3.3.0.v20080414@default:default,org.eclipse.osgi*3.4.0.v20080421-2006@:,org.eclipse.core.jobs*3.4.0.v20080310@default:default,org.eclipse.jface*3.4.0.I20080422-0800@default:default,org.eclipse.core.variables*3.2.100.v20080324-1600@default:default,org.eclipse.osgi.services*3.1.200.v20071203@default:default,org.eclipse.ant.core*3.2.0.v20080319@default:default,org.eclipse.equinox.security*1.0.0.v20080421-2006@default:default,org.eclipse.equinox.registry*3.4.0.v20080421-2006@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*1.0.0.qualifier@default:default,org.eclipse.equinox.p2.engine*1.0.0.qualifier@default:default,org.eclipse.equinox.p2.director*1.0.0.qualifier@default:default,org.sat4j.pb*2.0.0.v20080421@default:default,org.eclipse.equinox.p2.metadata.repository*1.0.0.qualifier@default:default,org.eclipse.equinox.p2.director.app*1.0.0.qualifier@default:default,org.eclipse.equinox.p2.console*1.0.0.qualifier@default:default,org.eclipse.ecf.identity*2.0.0.qualifier@default:default,org.eclipse.ecf*2.0.0.qualifier@default:default,org.eclipse.ecf.provider.filetransfer*2.0.0.qualifier@default:default,org.eclipse.ecf.filetransfer*2.0.0.qualifier@default:default,org.eclipse.equinox.simpleconfigurator.manipulator*1.0.0.qualifier@default:default,org.eclipse.equinox.p2.core*1.0.0.qualifier@default:default,org.eclipse.equinox.frameworkadmin.equinox*1.0.0.qualifier@default:default,org.eclipse.equinox.p2.artifact.repository*1.0.0.qualifier@default:default,org.eclipse.ecf.provider.filetransfer.ssl*1.0.0.qualifier@default:false,org.eclipse.equinox.simpleconfigurator*1.0.0.qualifier@default:default,org.sat4j.core*2.0.0.v20080421@default:default,org.eclipse.equinox.frameworkadmin*1.0.0.qualifier@default:default,org.eclipse.ecf.ssl*1.0.0.qualifier@default:false"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/about.html b/bundles/org.eclipse.equinox.p2.reconciler.dropins/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/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.reconciler.dropins/build.properties b/bundles/org.eclipse.equinox.p2.reconciler.dropins/build.properties
deleted file mode 100644
index 3a99d7dac..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/build.properties
+++ /dev/null
@@ -1,21 +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/,\
- .,\
- plugin.properties,\
- about.html,\
- plugin.xml,\
- Bootstrap.product
-src.includes = about.html
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/plugin.properties b/bundles/org.eclipse.equinox.p2.reconciler.dropins/plugin.properties
deleted file mode 100644
index deacb731d..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/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 = Dropin Reconciler Plug-in
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/plugin.xml b/bundles/org.eclipse.equinox.p2.reconciler.dropins/plugin.xml
deleted file mode 100644
index 1b5ce1dad..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/plugin.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-
- <extension
- id="org.eclipse.equinox.p2.reconciler.dropins.product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.eclipse.equinox.p2.reconciler.application"
- name="p2 reconciliation product">
- <property
- name="appName"
- value="p2 reconciliation product">
- </property>
- </product>
- </extension>
- <extension
- id="org.eclipse.equinox.p2.reconciler.application"
- point="org.eclipse.core.runtime.applications">
- <application
- cardinality="singleton-global"
- thread="main"
- visible="true">
- <run
- class="org.eclipse.equinox.internal.p2.reconciler.dropins.Application">
- </run>
- </application>
- </extension>
- <extension
- id="product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.eclipse.equinox.p2.reconciler.application"
- name="p2 reconciliation application">
- <property
- name="appName"
- value="p2 reconciliation application">
- </property>
- </product>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/pom.xml b/bundles/org.eclipse.equinox.p2.reconciler.dropins/pom.xml
deleted file mode 100644
index a9d78316d..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.reconciler.dropins</artifactId>
- <version>1.1.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Activator.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Activator.java
deleted file mode 100644
index d182d0b0e..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Activator.java
+++ /dev/null
@@ -1,613 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse 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.p2.reconciler.dropins;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URL;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.p2.extensionlocation.*;
-import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager;
-import org.eclipse.equinox.internal.p2.update.Configuration;
-import org.eclipse.equinox.internal.p2.update.PathUtil;
-import org.eclipse.equinox.internal.provisional.p2.directorywatcher.DirectoryWatcher;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.osgi.service.datalocation.Location;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
- static final String PROP_APPLICATION_STATUS = "org.eclipse.equinox.p2.reconciler.application.status"; //$NON-NLS-1$
- public static final String ID = "org.eclipse.equinox.p2.reconciler.dropins"; //$NON-NLS-1$
- private static final String DROPINS_DIRECTORY = "org.eclipse.equinox.p2.reconciler.dropins.directory"; //$NON-NLS-1$
- private static final String DROPINS = "dropins"; //$NON-NLS-1$
- private static final String LINKS = "links"; //$NON-NLS-1$
- private static final String CONFIG_INI = "config.ini"; //$NON-NLS-1$
- private static final String PLATFORM_CFG = "org.eclipse.update/platform.xml"; //$NON-NLS-1$
- private static final String CACHE_FILENAME = "cache.timestamps"; //$NON-NLS-1$
- private static final String DIR_ECLIPSE = "eclipse"; //$NON-NLS-1$
- private static final String DIR_PLUGINS = "plugins"; //$NON-NLS-1$
- private static final String DIR_FEATURES = "features"; //$NON-NLS-1$
- private static final String EXT_LINK = ".link"; //$NON-NLS-1$
- private static BundleContext bundleContext;
- private final static Set<IMetadataRepository> repositories = new HashSet<IMetadataRepository>();
- private Collection<File> filesToCheck = null;
-
- /**
- * Helper method to create an extension location metadata repository at the given URI.
- * If one already exists at that location then an exception will be thrown.
- *
- * This method never returns <code>null</code>.
- *
- * @throws IllegalStateException
- * @throws ProvisionException
- */
- public static IMetadataRepository createExtensionLocationMetadataRepository(URI location, String name, Map<String, String> properties) throws ProvisionException {
- IProvisioningAgent agent = getAgent();
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager == null)
- throw new IllegalStateException("MetadataRepositoryManager not registered."); //$NON-NLS-1$
- ExtensionLocationMetadataRepositoryFactory factory = new ExtensionLocationMetadataRepositoryFactory();
- factory.setAgent(agent);
- IMetadataRepository repository = factory.create(location, name, ExtensionLocationMetadataRepository.TYPE, properties);
- //we need to add the concrete repository to the repository manager, or its properties will not be correct
- ((MetadataRepositoryManager) manager).addRepository(repository);
- manager.setRepositoryProperty(location, IRepository.PROP_SYSTEM, String.valueOf(true));
- return repository;
- }
-
- private static IProvisioningAgent getAgent() {
- return (IProvisioningAgent) ServiceHelper.getService(getContext(), IProvisioningAgent.SERVICE_NAME);
- }
-
- /**
- * Helper method to load an extension location metadata repository from the given URL.
- *
- * @throws IllegalStateException
- * @throws ProvisionException
- */
- public static IMetadataRepository loadMetadataRepository(URI location, IProgressMonitor monitor) throws ProvisionException {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) getAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager == null)
- throw new IllegalStateException("MetadataRepositoryManager not registered."); //$NON-NLS-1$
- IMetadataRepository repository = manager.loadRepository(location, monitor);
- manager.setRepositoryProperty(location, IRepository.PROP_SYSTEM, String.valueOf(true));
- return repository;
- }
-
- /**
- * Helper method to create an extension location artifact repository at the given URL.
- * If one already exists at that location then an exception will be thrown.
- *
- * This method never returns <code>null</code>.
- *
- * @throws IllegalStateException
- * @throws ProvisionException
- */
- public static IArtifactRepository createExtensionLocationArtifactRepository(URI location, String name, Map<String, String> properties) throws ProvisionException {
- IProvisioningAgent agent = getAgent();
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- if (manager == null)
- throw new IllegalStateException("ArtifactRepositoryManager not registered."); //$NON-NLS-1$
- ExtensionLocationArtifactRepositoryFactory factory = new ExtensionLocationArtifactRepositoryFactory();
- factory.setAgent(agent);
- IArtifactRepository repository = factory.create(location, name, ExtensionLocationArtifactRepository.TYPE, properties);
- //we need to add the concrete repository to the repository manager, or its properties will not be correct
- ((ArtifactRepositoryManager) manager).addRepository(repository);
- manager.setRepositoryProperty(location, IRepository.PROP_SYSTEM, String.valueOf(true));
- return repository;
- }
-
- /**
- * Helper method to load an extension location metadata repository from the given URL.
- *
- * @throws IllegalStateException
- * @throws ProvisionException
- */
- public static IArtifactRepository loadArtifactRepository(URI location, IProgressMonitor monitor) throws ProvisionException {
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) getAgent().getService(IArtifactRepositoryManager.SERVICE_NAME);
- if (manager == null)
- throw new IllegalStateException("ArtifactRepositoryManager not registered."); //$NON-NLS-1$
- IArtifactRepository repository = manager.loadRepository(location, monitor);
- manager.setRepositoryProperty(location, IRepository.PROP_SYSTEM, String.valueOf(true));
- return repository;
- }
-
- /*
- * Return the set of metadata repositories known to this bundle. It is constructed from the repos
- * for the drop-ins as well as the ones in the configuration.
- */
- public static Set<IMetadataRepository> getRepositories() {
- return repositories;
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- bundleContext = context;
-
- // check to see if there is really any work to do. Do this after setting the context, and
- // doing other initialization in case others call our public methods later.
- if (isUpToDate()) {
- // clear the cache
- filesToCheck = null;
- return;
- }
-
- checkConfigIni();
-
- // create the watcher for the "drop-ins" folder
- watchDropins();
- // keep an eye on the platform.xml
- watchConfiguration();
-
- synchronize(null);
- writeTimestamps();
-
- // we should probably be holding on to these repos by URL
- // see Bug 223422
- // for now explicitly nulling out these repos to allow GC to occur
- repositories.clear();
- filesToCheck = null;
- }
-
- private void checkConfigIni() {
- File configuration = getConfigurationLocation();
- if (configuration == null) {
- LogHelper.log(new Status(IStatus.ERROR, ID, "Unable to determine configuration location.")); //$NON-NLS-1$
- return;
- }
-
- File configIni = new File(configuration, CONFIG_INI);
- if (!configIni.exists()) {
- // try parent configuration
- File parentConfiguration = getParentConfigurationLocation();
- if (parentConfiguration == null)
- return;
-
- // write shared configuration
- Properties props = new Properties();
- try {
- OutputStream os = null;
- try {
- os = new BufferedOutputStream(new FileOutputStream(configIni));
- String externalForm = PathUtil.makeRelative(parentConfiguration.toURL().toExternalForm(), getOSGiInstallArea()).replace('\\', '/');
- props.put("osgi.sharedConfiguration.area", externalForm); //$NON-NLS-1$
- props.store(os, "Linked configuration"); //$NON-NLS-1$
- } finally {
- if (os != null)
- os.close();
- }
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, ID, "Unable to create linked configuration location.", e)); //$NON-NLS-1$
- }
- }
- }
-
- /*
- * Return a boolean value indicating whether or not we need to run
- * the reconciler due to changes in the file-system.
- */
- private boolean isUpToDate() {
- // the user might want to force a reconciliation
- if ("true".equals(getContext().getProperty("osgi.checkConfiguration"))) //$NON-NLS-1$//$NON-NLS-2$
- return false;
- // read timestamps
- Properties timestamps = readTimestamps();
- if (timestamps.isEmpty())
- return false;
-
- // gather the list of files/folders that we need to check
- Collection<File> files = getFilesToCheck();
- for (Iterator<File> iter = files.iterator(); iter.hasNext();) {
- File file = iter.next();
- String key = file.getAbsolutePath();
- String timestamp = timestamps.getProperty(key);
- if (timestamp == null)
- return false;
- if (!Long.toString(file.lastModified()).equals(timestamp))
- return false;
- timestamps.remove(key);
- }
-
- // if we had some extra timestamps in the file, then signal that something has
- // changed and we need to reconcile
- return timestamps.isEmpty();
- }
-
- /*
- * Restore the cached timestamp values.
- */
- private Properties readTimestamps() {
- Properties result = new Properties();
- File file = Activator.getContext().getDataFile(CACHE_FILENAME);
- if (!file.exists())
- return result;
- InputStream input = null;
- try {
- input = new BufferedInputStream(new FileInputStream(file));
- result.load(input);
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error occurred while reading cached timestamps for reconciliation.", e)); //$NON-NLS-1$
- } finally {
- try {
- if (input != null)
- input.close();
- } catch (IOException e) {
- // ignore
- }
- }
- return result;
- }
-
- /*
- * Return a collection of files which are interesting to us when we want to record timestamps
- * to figure out if something has changed and perhaps avoid an unnecessary reconcilation.
- */
- private Collection<File> getFilesToCheck() {
- if (filesToCheck != null)
- return filesToCheck;
-
- Set<File> result = new HashSet<File>();
-
- // configuration/org.eclipse.update/platform.xml, configuration/../plugins, configuration/../features
- File configuration = getConfigurationLocation();
- if (configuration != null) {
- result.add(new File(configuration, PLATFORM_CFG));
- File parent = configuration.getParentFile();
- if (parent != null) {
- File plugins = new File(parent, "plugins"); //$NON-NLS-1$
- result.add(plugins);
- File features = new File(parent, "features"); //$NON-NLS-1$
- result.add(features);
- }
- }
-
- // if we are in shared mode then record the same files for the parent configuration
- File parentConfiguration = getParentConfigurationLocation();
- if (parentConfiguration != null) {
- result.add(new File(parentConfiguration, PLATFORM_CFG));
- File parent = parentConfiguration.getParentFile();
- if (parent != null) {
- File plugins = new File(parent, "plugins"); //$NON-NLS-1$
- result.add(plugins);
- File features = new File(parent, "features"); //$NON-NLS-1$
- result.add(features);
- }
- }
-
- // dropins folders
- File[] dropins = getDropinsDirectories();
- result.addAll(getDropinsToCheck(dropins));
-
- // links folders
- File[] links = getLinksDirectories();
- result.addAll(getDropinsToCheck(links));
-
- filesToCheck = result;
- return filesToCheck;
- }
-
- /*
- * Iterate over the given collection of files (could be dropins or links folders) and
- * return a collection of files that might be interesting to check the timestamps of.
- */
- private Collection<File> getDropinsToCheck(File[] files) {
- Collection<File> result = new HashSet<File>();
- for (int outer = 0; outer < files.length; outer++) {
- // add top-level file/folder
- result.add(files[outer]);
-
- File[] children = files[outer].listFiles();
- for (int inner = 0; children != null && inner < children.length; inner++) {
- File child = children[inner];
- if (child.isFile() && child.getName().toLowerCase().endsWith(EXT_LINK)) {
- // if we have a link file then add the link file and its target
- File target = DropinsRepositoryListener.getLinkedFile(child);
- if (target == null || !target.exists())
- continue;
- result.add(child);
- result.add(target);
- File eclipse = new File(target, DIR_ECLIPSE);
- result.add(eclipse);
- result.add(new File(eclipse, DIR_PLUGINS));
- result.add(new File(eclipse, DIR_FEATURES));
-
- } else if (child.getName().equalsIgnoreCase(DIR_ECLIPSE)) {
- // if it is an "eclipse" dir then add it as well as "plugins" and "features"
- result.add(child);
- result.add(new File(child, DIR_PLUGINS));
- result.add(new File(child, DIR_FEATURES));
-
- } else if (child.isDirectory()) {
- // look for "dropins/foo/plugins" (and "features") and
- // "dropins/foo/eclipse/plugins" (and "features")
- // Note: we could have a directory-based bundle here but we
- // will still add it since it won't hurt anything (one extra timestamp check)
- result.add(child);
- File parent;
- File eclipse = new File(child, DIR_ECLIPSE);
- if (eclipse.exists()) {
- result.add(eclipse);
- parent = eclipse;
- } else {
- parent = child;
- }
- File plugins = new File(parent, DIR_PLUGINS);
- if (plugins.exists())
- result.add(plugins);
- File features = new File(parent, DIR_FEATURES);
- if (features.exists())
- result.add(features);
- }
- }
- }
- return result;
- }
-
- /*
- * Persist the cache timestamp values.
- */
- private void writeTimestamps() {
- Properties timestamps = new Properties();
- Collection<File> files = getFilesToCheck();
- for (Iterator<File> iter = files.iterator(); iter.hasNext();) {
- File file = iter.next();
- timestamps.put(file.getAbsolutePath(), Long.toString(file.lastModified()));
- }
-
- // write out the file
- File file = Activator.getContext().getDataFile(CACHE_FILENAME);
- OutputStream output = null;
- try {
- file.delete();
- output = new BufferedOutputStream(new FileOutputStream(file));
- timestamps.store(output, null);
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, ID, "Error occurred while writing cache timestamps for reconciliation.", e)); //$NON-NLS-1$
- } finally {
- if (output != null)
- try {
- output.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-
- /*
- * Synchronize the profile.
- */
- public static synchronized void synchronize(IProgressMonitor monitor) {
- IProfile profile = getCurrentProfile(bundleContext);
- if (profile == null)
- return;
- // create the profile synchronizer on all available repositories
- ProfileSynchronizer synchronizer = new ProfileSynchronizer(getAgent(), profile, repositories);
- IStatus result = synchronizer.synchronize(monitor);
- if (ProfileSynchronizer.isReconciliationApplicationRunning()) {
- System.getProperties().put(PROP_APPLICATION_STATUS, result);
- }
- if (!result.isOK() && !(result.getSeverity() == IStatus.CANCEL))
- LogHelper.log(result);
- }
-
- /*
- * Watch the platform.xml file.
- */
- private void watchConfiguration() {
- File configFile = getConfigurationLocation();
- if (configFile == null) {
- LogHelper.log(new Status(IStatus.ERROR, ID, "Unable to determine configuration location.")); //$NON-NLS-1$
- return;
- }
-
- configFile = new File(configFile, PLATFORM_CFG);
- if (!configFile.exists()) {
- // try parent configuration
- File parentConfiguration = getParentConfigurationLocation();
- if (parentConfiguration == null)
- return;
-
- File shareConfigFile = new File(parentConfiguration, PLATFORM_CFG);
- if (!shareConfigFile.exists())
- return;
-
- Configuration config = new Configuration();
- config.setDate(Long.toString(new Date().getTime()));
- config.setVersion("3.0"); //$NON-NLS-1$
- try {
- String sharedUR = PathUtil.makeRelative(shareConfigFile.toURL().toExternalForm(), getOSGiInstallArea()).replace('\\', '/');
- config.setSharedUR(sharedUR);
- // ensure that org.eclipse.update directory that holds platform.xml is pre-created.
- configFile.getParentFile().mkdirs();
- config.save(configFile, getOSGiInstallArea());
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, ID, "Unable to create linked platform.xml.", e)); //$NON-NLS-1$
- return;
- } catch (ProvisionException e) {
- LogHelper.log(new Status(IStatus.ERROR, ID, "Unable to create linked platform.xml.", e)); //$NON-NLS-1$
- return;
- }
-
- }
- DirectoryWatcher watcher = new DirectoryWatcher(configFile.getParentFile());
- PlatformXmlListener listener = new PlatformXmlListener(configFile);
- watcher.addListener(listener);
- watcher.poll();
- repositories.addAll(listener.getMetadataRepositories());
- }
-
- /*
- * Create a new directory watcher with a repository listener on the drop-ins folder.
- */
- private void watchDropins() {
- List<File> directories = new ArrayList<File>();
- File[] dropinsDirectories = getDropinsDirectories();
- directories.addAll(Arrays.asList(dropinsDirectories));
- File[] linksDirectories = getLinksDirectories();
- directories.addAll(Arrays.asList(linksDirectories));
- if (directories.isEmpty())
- return;
-
- DropinsRepositoryListener listener = new DropinsRepositoryListener(getAgent(), DROPINS);
- DirectoryWatcher watcher = new DirectoryWatcher(directories.toArray(new File[directories.size()]));
- watcher.addListener(listener);
- watcher.poll();
- repositories.addAll(listener.getMetadataRepositories());
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- bundleContext = null;
- }
-
- /*
- * Return the bundle context for this bundle.
- */
- 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);
- }
-
- /*
- * Helper method to get the shared configuration location. Return null if
- * it is unavailable.
- */
- public static File getParentConfigurationLocation() {
- Location configurationLocation = (Location) ServiceHelper.getService(getContext(), Location.class.getName(), Location.CONFIGURATION_FILTER);
- if (configurationLocation == null || !configurationLocation.isSet())
- return null;
-
- Location sharedConfigurationLocation = configurationLocation.getParentLocation();
- if (sharedConfigurationLocation == null)
- return null;
-
- URL url = sharedConfigurationLocation.getURL();
- if (url == null)
- return null;
- return URLUtil.toFile(url);
- }
-
- /*
- * 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(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);
- }
-
- /*
- * Return the locations of the links directories. There is a potential for
- * more than one to be returned here if we are running in shared mode.
- */
- private static File[] getLinksDirectories() {
- List<File> linksDirectories = new ArrayList<File>();
- File root = getEclipseHome();
- if (root != null)
- linksDirectories.add(new File(root, LINKS));
-
- // check to see if we are in shared mode. if so, then add the user's local
- // links directory. (the shared one will have been added above with the
- // reference to Eclipse home)
- if (getParentConfigurationLocation() != null) {
- File configuration = getConfigurationLocation();
- if (configuration != null && configuration.getParentFile() != null)
- linksDirectories.add(new File(configuration.getParentFile(), LINKS));
- }
- return linksDirectories.toArray(new File[linksDirectories.size()]);
- }
-
- /*
- * Return the location of the dropins directories. These include the one specified by
- * the "org.eclipse.equinox.p2.reconciler.dropins.directory" System property and the one
- * in the Eclipse home directory. If we are in shared mode, then also add the user's
- * local dropins directory.
- */
- private static File[] getDropinsDirectories() {
- List<File> dropinsDirectories = new ArrayList<File>();
- // did the user specify one via System properties?
- String watchedDirectoryProperty = bundleContext.getProperty(DROPINS_DIRECTORY);
- if (watchedDirectoryProperty != null)
- dropinsDirectories.add(new File(watchedDirectoryProperty));
-
- // always add the one in the Eclipse home directory
- File root = getEclipseHome();
- if (root != null)
- dropinsDirectories.add(new File(root, DROPINS));
-
- // check to see if we are in shared mode. if so, then add the user's local
- // dropins directory. (the shared one will have been added above with the
- // reference to Eclipse home)
- if (getParentConfigurationLocation() != null) {
- File configuration = getConfigurationLocation();
- if (configuration != null && configuration.getParentFile() != null)
- dropinsDirectories.add(new File(configuration.getParentFile(), DROPINS));
- }
- return dropinsDirectories.toArray(new File[dropinsDirectories.size()]);
- }
-
- /*
- * Return the current profile or null if it cannot be retrieved.
- */
- public static IProfile getCurrentProfile(BundleContext context) {
- IProvisioningAgent agent = getAgent();
- IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null)
- return null;
- return profileRegistry.getProfile(IProfileRegistry.SELF);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Application.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Application.java
deleted file mode 100644
index c514d2843..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Application.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 implementation and ideas
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.reconciler.dropins;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-
-public class Application implements IApplication {
-
- public Object start(IApplicationContext context) throws Exception {
- Object obj = System.getProperties().get(Activator.PROP_APPLICATION_STATUS);
- // if we have a non-OK status return "unlucky" 13, otherwise return the OK return code
- if (obj != null && (obj instanceof IStatus) && !((IStatus) obj).isOK())
- return new Integer(13);
- return IApplication.EXIT_OK;
- }
-
- public void stop() {
- //Nothing to do
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java
deleted file mode 100644
index ddf584ff0..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Code 9 - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.reconciler.dropins;
-
-import org.eclipse.equinox.p2.query.QueryUtil;
-
-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.core.helpers.Tracing;
-import org.eclipse.equinox.internal.p2.extensionlocation.ExtensionLocationArtifactRepository;
-import org.eclipse.equinox.internal.p2.extensionlocation.ExtensionLocationMetadataRepository;
-import org.eclipse.equinox.internal.p2.update.Site;
-import org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.osgi.util.NLS;
-
-public class DropinsRepositoryListener extends RepositoryListener {
- private static final String PREFIX = "[reconciler] [dropins] "; //$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 JAR = ".jar"; //$NON-NLS-1$
- private static final String LINK = ".link"; //$NON-NLS-1$
- private static final String ZIP = ".zip"; //$NON-NLS-1$
- private static final String LINKS_PATH = "path"; //$NON-NLS-1$
- private static final String DROPIN_ARTIFACT_REPOSITORIES = "dropin.artifactRepositories"; //$NON-NLS-1$
- private static final String DROPIN_METADATA_REPOSITORIES = "dropin.metadataRepositories"; //$NON-NLS-1$
- private static final String PIPE = "|"; //$NON-NLS-1$
- private final IProvisioningAgent agent;
- private List<IMetadataRepository> metadataRepositories = new ArrayList<IMetadataRepository>();
- private List<IArtifactRepository> artifactRepositories = new ArrayList<IArtifactRepository>();
-
- public DropinsRepositoryListener(IProvisioningAgent agent, String repositoryName) {
- super(repositoryName, true);
- this.agent = agent;
- }
-
- public boolean isInterested(File file) {
- return true;
- }
-
- public boolean added(File file) {
- if (super.added(file)) {
- if (Tracing.DEBUG_RECONCILER)
- Tracing.debug(PREFIX + "Interesting feature or bundle added: " + file); //$NON-NLS-1$
- return true;
- }
- addRepository(file);
- return true;
- }
-
- public boolean changed(File file) {
- if (super.changed(file)) {
- if (Tracing.DEBUG_RECONCILER)
- Tracing.debug(PREFIX + "Interesting feature or bundle changed: " + file); //$NON-NLS-1$
- return true;
- }
- addRepository(file);
- return true;
- }
-
- private void addRepository(File file) {
- URI repoLocation = createRepositoryLocation(file);
- Map<String, String> properties = new HashMap<String, String>();
- // if the file pointed to a link file, keep track of the attribute
- // so we can add it to the repo later
- if (file.isFile() && file.getName().endsWith(LINK)) {
- URI linkLocation = getLinkRepository(file, false);
- if (linkLocation != null)
- properties.put(Site.PROP_LINK_FILE, file.getAbsolutePath());
- }
- if (repoLocation != null) {
- getMetadataRepository(repoLocation, properties);
- getArtifactRepository(repoLocation, properties);
- }
- }
-
- /*
- * Return the file pointed to by the given link file. Return null if there is a problem
- * reading the file or resolving the location.
- */
- static File getLinkedFile(File file) {
- Properties links = new Properties();
- try {
- InputStream input = new BufferedInputStream(new FileInputStream(file));
- try {
- links.load(input);
- } finally {
- input.close();
- }
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.error_reading_link, file.getAbsolutePath()), e));
- return null;
- }
- String path = links.getProperty(LINKS_PATH);
- if (path == null) {
- return null;
- }
-
- // parse out link information
- if (path.startsWith("r ")) { //$NON-NLS-1$
- path = path.substring(2).trim();
- } else if (path.startsWith("rw ")) { //$NON-NLS-1$
- path = path.substring(3).trim();
- } else {
- path = path.trim();
- }
- File linkedFile = new File(path);
- if (!linkedFile.isAbsolute()) {
- // link support is relative to the install root
- File root = Activator.getEclipseHome();
- if (root != null)
- linkedFile = new File(root, path);
- }
- try {
- return linkedFile.getCanonicalFile();
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.error_resolving_link, linkedFile.getAbsolutePath(), file.getAbsolutePath()), e));
- return null;
- }
- }
-
- private URI createRepositoryLocation(File file) {
- try {
- file = file.getCanonicalFile();
- String fileName = file.getName();
- if (fileName.endsWith(LINK))
- return getLinkRepository(file, true);
-
- if (file.isDirectory()) {
- // Check if the directory is either the plugins directory of an extension location
- // or the features directory and the plugins folder is not present.
- // This extra check on the features directory is done to avoid adding the parent URL twice
- if (file.getName().equals(PLUGINS)) {
- File parentFile = file.getParentFile();
- return (parentFile != null) ? parentFile.toURI() : null;
- }
- if (file.getName().equals(FEATURES)) {
- File parentFile = file.getParentFile();
- if (parentFile == null || new File(parentFile, PLUGINS).isDirectory())
- return null;
- return parentFile.toURI();
- }
- return file.toURI();
- }
-
- //TODO: Should we remove this? We only should support directly runnable repos
- if (fileName.endsWith(ZIP) || fileName.endsWith(JAR))
- return new URI("jar:" + file.toURI() + "!/"); //$NON-NLS-1$ //$NON-NLS-2$
-
- // last resort -- we'll try to interpret the file as a link
- return getLinkRepository(file, false);
- } catch (URISyntaxException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error occurred while building repository location from file: " + file.getAbsolutePath(), e)); //$NON-NLS-1$
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error occurred while building repository location from file: " + file.getAbsolutePath(), e)); //$NON-NLS-1$
- }
- return null;
- }
-
- private URI getLinkRepository(File file, boolean logMissingLink) {
- File repo = getLinkedFile(file);
- if (repo == null) {
- if (logMissingLink)
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Unable to determine link location from file: " + file.getAbsolutePath())); //$NON-NLS-1$
- return null;
- }
- return repo.toURI();
- }
-
- public void getMetadataRepository(URI repoURL, Map<String, String> properties) {
- try {
- IMetadataRepository repository = null;
- try {
- ExtensionLocationMetadataRepository.validate(repoURL, null);
- repository = Activator.createExtensionLocationMetadataRepository(repoURL, "dropins metadata repo: " + repoURL, properties); //$NON-NLS-1$
- } catch (ProvisionException e) {
- repository = Activator.loadMetadataRepository(repoURL, null);
- }
- metadataRepositories.add(repository);
- debugRepository(repository);
- } catch (ProvisionException ex) {
- LogHelper.log(ex);
- }
- }
-
- private void debugRepository(IMetadataRepository repository) {
- if (!Tracing.DEBUG_RECONCILER)
- return;
- Tracing.debug(PREFIX + "Repository created " + repository.getLocation()); //$NON-NLS-1$
- // Print out a list of all the IUs in the repository
- IQueryResult<IInstallableUnit> result = repository.query(QueryUtil.createIUAnyQuery(), new NullProgressMonitor());
- for (Iterator<IInstallableUnit> iter = result.iterator(); iter.hasNext();)
- Tracing.debug(PREFIX + "\t" + iter.next()); //$NON-NLS-1$
- }
-
- public void getArtifactRepository(URI repoURL, Map<String, String> properties) {
- try {
- IArtifactRepository repository = null;
- try {
- ExtensionLocationArtifactRepository.validate(repoURL, null);
- repository = Activator.createExtensionLocationArtifactRepository(repoURL, "dropins artifact repo: " + repoURL, properties); //$NON-NLS-1$
- // fall through here and call the load which then adds the repo to the manager's list
- } catch (ProvisionException ex) {
- repository = Activator.loadArtifactRepository(repoURL, null);
- }
- artifactRepositories.add(repository);
- } catch (ProvisionException ex) {
- LogHelper.log(ex);
- }
- }
-
- public void stopPoll() {
- synchronizeDropinMetadataRepositories();
- synchronizeDropinArtifactRepositories();
- super.stopPoll();
- }
-
- private void synchronizeDropinMetadataRepositories() {
- List<String> currentRepositories = new ArrayList<String>();
- for (Iterator<IMetadataRepository> it = metadataRepositories.iterator(); it.hasNext();) {
- IMetadataRepository repository = it.next();
- currentRepositories.add(repository.getLocation().toString());
- }
- List<String> previousRepositories = getListRepositoryProperty(getMetadataRepository(), DROPIN_METADATA_REPOSITORIES);
- for (Iterator<String> iterator = previousRepositories.iterator(); iterator.hasNext();) {
- String repository = iterator.next();
- if (!currentRepositories.contains(repository))
- removeMetadataRepository(repository);
- }
- setListRepositoryProperty(getMetadataRepository(), DROPIN_METADATA_REPOSITORIES, currentRepositories);
- }
-
- private void removeMetadataRepository(String urlString) {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager == null)
- throw new IllegalStateException(Messages.metadata_repo_manager_not_registered);
- try {
- manager.removeRepository(new URI(urlString));
- } catch (URISyntaxException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error occurred while creating URL from: " + urlString, e)); //$NON-NLS-1$
- }
- }
-
- private void synchronizeDropinArtifactRepositories() {
- List<String> currentRepositories = new ArrayList<String>();
- for (Iterator<IArtifactRepository> it = artifactRepositories.iterator(); it.hasNext();) {
- IArtifactRepository repository = it.next();
- currentRepositories.add(repository.getLocation().toString());
- }
- List<String> previousRepositories = getListRepositoryProperty(getArtifactRepository(), DROPIN_ARTIFACT_REPOSITORIES);
- for (Iterator<String> iterator = previousRepositories.iterator(); iterator.hasNext();) {
- String repository = iterator.next();
- if (!currentRepositories.contains(repository))
- removeArtifactRepository(repository);
- }
- setListRepositoryProperty(getArtifactRepository(), DROPIN_ARTIFACT_REPOSITORIES, currentRepositories);
- }
-
- public void removeArtifactRepository(String urlString) {
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- if (manager == null)
- throw new IllegalStateException(Messages.artifact_repo_manager_not_registered);
- try {
- manager.removeRepository(new URI(urlString));
- } catch (URISyntaxException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error occurred while creating URL from: " + urlString, e)); //$NON-NLS-1$
- }
- }
-
- private List<String> getListRepositoryProperty(IRepository<?> repository, String key) {
- List<String> listProperty = new ArrayList<String>();
- String dropinRepositories = repository.getProperties().get(key);
- if (dropinRepositories != null) {
- StringTokenizer tokenizer = new StringTokenizer(dropinRepositories, PIPE);
- while (tokenizer.hasMoreTokens()) {
- listProperty.add(tokenizer.nextToken());
- }
- }
- return listProperty;
- }
-
- private void setListRepositoryProperty(IRepository<?> repository, String key, List<String> listProperty) {
- StringBuffer buffer = new StringBuffer();
- for (Iterator<String> it = listProperty.iterator(); it.hasNext();) {
- String repositoryString = it.next();
- buffer.append(repositoryString);
- if (it.hasNext())
- buffer.append(PIPE);
- }
- String value = (buffer.length() == 0) ? null : buffer.toString();
- repository.setProperty(key, value);
- }
-
- public Collection<IMetadataRepository> getMetadataRepositories() {
- List<IMetadataRepository> result = new ArrayList<IMetadataRepository>(metadataRepositories);
- result.add(getMetadataRepository());
- return result;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Messages.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Messages.java
deleted file mode 100644
index 79296ff8f..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Messages.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.reconciler.dropins;
-
-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.reconciler.dropins.messages"; //$NON-NLS-1$
- public static String artifact_repo_manager_not_registered;
- public static String errorLoadingRepository;
- public static String errorProcessingConfg;
- public static String metadata_repo_manager_not_registered;
- public static String error_reading_link;
- public static String error_resolving_link;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- // prevent instantiation
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java
deleted file mode 100644
index 15eab6283..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java
+++ /dev/null
@@ -1,282 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.reconciler.dropins;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.extensionlocation.*;
-import org.eclipse.equinox.internal.p2.update.*;
-import org.eclipse.equinox.internal.provisional.p2.directorywatcher.DirectoryChangeListener;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * This class watches a platform.xml file. Note that we don't really need to use the DirectoryChangeListener
- * framework since we are doing a single poll on startup, but we will leave the code here in case we
- * want to watch for changes during a session. Note that the code to actually synchronize the repositories
- * is on the Activator so we will need to call out to that if this behaviour is changed.
- *
- * @since 1.0
- */
-public class PlatformXmlListener extends DirectoryChangeListener {
-
- private static final String PLATFORM_XML = "platform.xml"; //$NON-NLS-1$
- private boolean changed = false;
- private File root;
- private long lastModified = -1l;
- private Set<IMetadataRepository> configRepositories;
-
- private String toString(Feature[] features, String[] list) {
- StringBuffer buffer = new StringBuffer();
- if (features != null) {
- for (int i = 0; i < features.length; i++) {
- String featureURL = features[i].getUrl();
- if (featureURL != null)
- buffer.append(featureURL).append(',');
- else {
- String id = features[i].getId();
- String version = features[i].getVersion();
- if (id != null && version != null)
- buffer.append("features/" + id + "_" + version + "/,"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
- }
- if (list != null) {
- for (int i = 0; i < list.length; i++)
- buffer.append(list[i]).append(',');
- }
- if (buffer.length() == 0)
- return ""; //$NON-NLS-1$
-
- return buffer.substring(0, buffer.length() - 1);
- }
-
- /*
- * Construct a new listener based on the given platform.xml file.
- */
- public PlatformXmlListener(File file) {
- super();
- if (!PLATFORM_XML.equals(file.getName()))
- throw new IllegalArgumentException();
- this.root = file;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.directorywatcher.IDirectoryChangeListener#added(java.io.File)
- */
- public boolean added(File file) {
- changed = changed || PLATFORM_XML.equals(file.getName());
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.directorywatcher.IDirectoryChangeListener#changed(java.io.File)
- */
- public boolean changed(File file) {
- changed = changed || PLATFORM_XML.equals(file.getName());
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.directorywatcher.IDirectoryChangeListener#getSeenFile(java.io.File)
- */
- public Long getSeenFile(File file) {
- return new Long(0);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.directorywatcher.DirectoryChangeListener#isInterested(java.io.File)
- */
- public boolean isInterested(File file) {
- return file.getName().equals(PLATFORM_XML) && lastModified != file.lastModified();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.directorywatcher.IDirectoryChangeListener#removed(java.io.File)
- */
- public boolean removed(File file) {
- changed = changed || PLATFORM_XML.equals(file.getName());
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.directorywatcher.IDirectoryChangeListener#startPoll()
- */
- public void startPoll() {
- changed = false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.directorywatcher.IDirectoryChangeListener#stopPoll()
- */
- public void stopPoll() {
- if (changed) {
- lastModified = root.lastModified();
- try {
- Configuration configuration = Configuration.load(root, Activator.getOSGiInstallArea());
- synchronizeConfiguration(configuration);
- } catch (ProvisionException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, Messages.errorProcessingConfg, e));
- }
- }
- changed = false;
- }
-
- public Collection<IMetadataRepository> getMetadataRepositories() {
- if (configRepositories == null)
- return CollectionUtils.emptySet();
- return configRepositories;
- }
-
- /*
- * Look through the given list of repositories and see if there is one
- * currently associated with the given url string. Return null if one could not
- * be found.
- */
- private IMetadataRepository getMatchingRepo(Collection<IMetadataRepository> repositoryList, String urlString) {
- if (repositoryList == null)
- return null;
- IPath urlPath = new Path(urlString).makeAbsolute();
- for (IMetadataRepository repo : repositoryList) {
- File file = URIUtil.toFile(repo.getLocation());
- if (file == null)
- continue;
- Path repoPath = new Path(file.getAbsolutePath());
- if (repoPath.makeAbsolute().equals(urlPath))
- return repo;
- // normalize the URLs to be the same
- if (repo instanceof ExtensionLocationMetadataRepository) {
- try {
- File one = ExtensionLocationMetadataRepository.getBaseDirectory(repo.getLocation());
- File two = ExtensionLocationMetadataRepository.getBaseDirectory(new URI(urlString));
- if (one.equals(two))
- return repo;
- } catch (ProvisionException e) {
- // Skip the repo if it's not found. Log all other errors.
- if (e.getStatus().getCode() != ProvisionException.REPOSITORY_NOT_FOUND)
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error occurred while comparing repository locations.", e)); //$NON-NLS-1$
- } catch (URISyntaxException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error occurred while comparing repository locations.", e)); //$NON-NLS-1$
- }
- }
- }
- return null;
- }
-
- /*
- * Ensure that we have a repository for each site in the given configuration.
- */
- protected void synchronizeConfiguration(Configuration config) {
- List<Site> sites = config.getSites();
- Set<IMetadataRepository> newRepos = new LinkedHashSet<IMetadataRepository>();
- Set<Site> toBeRemoved = new HashSet<Site>();
- for (Site site : sites) {
- String siteURL = site.getUrl();
- IMetadataRepository match = getMatchingRepo(Activator.getRepositories(), siteURL);
- if (match == null) {
- try {
- String linkFile = site.getLinkFile();
- if (linkFile != null && linkFile.length() > 0) {
- File link = new File(linkFile);
- if (!link.exists()) {
- toBeRemoved.add(site);
- continue;
- }
- }
- if (!site.isEnabled()) {
- toBeRemoved.add(site);
- continue;
- }
- String eclipseExtensionURL = siteURL + Constants.EXTENSION_LOCATION;
- // use the URI constructor here and not URIUtil#fromString because
- // our string is already encoded
- URI location = new URI(eclipseExtensionURL);
- Map<String, String> properties = new HashMap<String, String>();
- properties.put(SiteListener.SITE_POLICY, site.getPolicy());
-
- // In a "USER-INCLUDE" we add the site's features to the list
- // this is done to support backwards compatibility where previously features were not really installed.
- // One can always directly add the features to this list. This might be useful for excluding a particular feature
- // in a "USER-EXCLUDE" site.
- Feature[] listFeatures = site.getPolicy().equals(Site.POLICY_USER_INCLUDE) ? site.getFeatures() : null;
-
- properties.put(SiteListener.SITE_LIST, toString(listFeatures, site.getList()));
-
- // deal with the metadata repository
- IMetadataRepository metadataRepository = null;
- try {
- metadataRepository = Activator.createExtensionLocationMetadataRepository(location, "extension location metadata repository: " + location.toString(), properties); //$NON-NLS-1$
- } catch (ProvisionException ex) {
- try {
- metadataRepository = Activator.loadMetadataRepository(location, null);
- } catch (ProvisionException inner) {
- // handle the case where someone has removed the extension location from
- // disk. Note: we use the siteURL not the eclipseextensionURL
- // use the URI constructor here and not URIUtil#fromString because
- // our string is already encoded
- URI fileURI = new URI(siteURL);
- File file = URIUtil.toFile(fileURI);
- if (file != null && !file.exists()) {
- toBeRemoved.add(site);
- continue;
- }
- throw inner;
- }
- // set the repository properties here in case they have changed since the last time we loaded
- for (Entry<String, String> entry : properties.entrySet()) {
- metadataRepository.setProperty(entry.getKey(), entry.getValue());
- }
- }
- newRepos.add(metadataRepository);
-
- // now the artifact repository
- try {
- Activator.createExtensionLocationArtifactRepository(location, "extension location artifact repository: " + location, properties); //$NON-NLS-1$
- } catch (ProvisionException ex) {
- IArtifactRepository artifactRepository = Activator.loadArtifactRepository(location, null);
- // set the repository properties here in case they have changed since the last time we loaded
- for (Iterator<String> inner = properties.keySet().iterator(); inner.hasNext();) {
- String key = inner.next();
- String value = properties.get(key);
- artifactRepository.setProperty(key, value);
- }
- }
- } catch (URISyntaxException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.errorLoadingRepository, siteURL), e));
- } catch (ProvisionException e) {
- // Skip the repo if it's not found. Log all other errors.
- if (e.getStatus().getCode() != ProvisionException.REPOSITORY_NOT_FOUND)
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.errorLoadingRepository, siteURL), e));
- }
- } else {
- newRepos.add(match);
- }
- }
- if (!toBeRemoved.isEmpty()) {
- for (Iterator<Site> iter = toBeRemoved.iterator(); iter.hasNext();)
- config.removeSite(iter.next());
- try {
- config.save(root, Activator.getOSGiInstallArea());
- } catch (ProvisionException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error occurred while saving configuration at: " + root, e)); //$NON-NLS-1$
- }
- }
- configRepositories = newRepos;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
deleted file mode 100644
index 08304e3ed..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
+++ /dev/null
@@ -1,602 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial implementation and ideas
- * Sonatype, Inc. - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.reconciler.dropins;
-
-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.p2.core.helpers.*;
-import org.eclipse.equinox.internal.p2.extensionlocation.Constants;
-import org.eclipse.equinox.internal.provisional.configurator.Configurator;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.planner.IPlanner;
-import org.eclipse.equinox.p2.planner.ProfileInclusionRules;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-/**
- * Synchronizes a profile with a set of repositories.
- */
-public class ProfileSynchronizer {
- private static final String RECONCILER_APPLICATION_ID = "org.eclipse.equinox.p2.reconciler.application"; //$NON-NLS-1$
- private static final String TIMESTAMPS_FILE_PREFIX = "timestamps"; //$NON-NLS-1$
- private static final String PROFILE_TIMESTAMP = "PROFILE"; //$NON-NLS-1$
- private static final String NO_TIMESTAMP = "-1"; //$NON-NLS-1$
- private static final String PROP_FROM_DROPINS = "org.eclipse.equinox.p2.reconciler.dropins"; //$NON-NLS-1$
-
- private static final String CACHE_EXTENSIONS = "org.eclipse.equinox.p2.cache.extensions"; //$NON-NLS-1$
- private static final String PIPE = "|"; //$NON-NLS-1$
- private static final String EXPLANATION = "org.eclipse.equinox.p2.director.explain"; //$NON-NLS-1$
- final IProfile profile;
-
- final Map<String, IMetadataRepository> repositoryMap;
- private Map<String, String> timestamps;
- private final IProvisioningAgent agent;
-
- static class ReconcilerProfileChangeRequest extends ProfileChangeRequest {
- boolean isMove = false;
-
- public ReconcilerProfileChangeRequest(IProfile profile, boolean isMove) {
- super(profile);
- this.isMove = isMove;
- }
- }
-
- /*
- * Constructor for the class.
- */
- public ProfileSynchronizer(IProvisioningAgent agent, IProfile profile, Collection<IMetadataRepository> repositories) {
- this.agent = agent;
- this.profile = profile;
- this.repositoryMap = new HashMap<String, IMetadataRepository>();
- for (IMetadataRepository repository : repositories) {
- repositoryMap.put(repository.getLocation().toString(), repository);
- }
- }
-
- /*
- * Synchronize the profile with the list of metadata repositories.
- */
- public IStatus synchronize(IProgressMonitor monitor) {
- readTimestamps();
- if (isUpToDate())
- return Status.OK_STATUS;
-
- ProvisioningContext context = getContext();
- context.setProperty(EXPLANATION, new Boolean(Tracing.DEBUG_RECONCILER).toString());
-
- boolean done = false;
- while (!done) {
- // figure out if we really have anything to install/uninstall
- ReconcilerProfileChangeRequest request = createProfileChangeRequest(context);
- String updatedCacheExtensions = synchronizeCacheExtensions();
- if (request == null) {
- if (updatedCacheExtensions != null) {
- IStatus engineResult = setProperty(CACHE_EXTENSIONS, updatedCacheExtensions, context, null);
- if (engineResult.getSeverity() != IStatus.ERROR && engineResult.getSeverity() != IStatus.CANCEL)
- writeTimestamps();
- return engineResult;
- }
- return Status.OK_STATUS;
- }
- if (updatedCacheExtensions != null)
- request.setProfileProperty(CACHE_EXTENSIONS, updatedCacheExtensions);
-
- SubMonitor sub = SubMonitor.convert(monitor, 100);
- try {
- //create the provisioning plan
- IProvisioningPlan plan = createProvisioningPlan(request, context, sub.newChild(50));
- IStatus status = plan.getStatus();
- if (status.getSeverity() == IStatus.ERROR || status.getSeverity() == IStatus.CANCEL)
- return status;
- debug(request, plan);
-
- // if there is no work to do then just write out the timestamps and return.
- if (plan.getAdditions().query(QueryUtil.createIUAnyQuery(), null).isEmpty() && plan.getRemovals().query(QueryUtil.createIUAnyQuery(), null).isEmpty()) {
- writeTimestamps();
- return status;
- }
-
- //invoke the engine to perform installs/uninstalls
- IStatus engineResult = executePlan(plan, context, sub.newChild(50));
- if (engineResult.getSeverity() == IStatus.ERROR || engineResult.getSeverity() == IStatus.CANCEL)
- return engineResult;
-
- } finally {
- done = !request.isMove;
- sub.done();
- }
- }
- // write out the new timestamps (for caching) and apply the configuration
- writeTimestamps();
- return applyConfiguration(false);
- }
-
- private void writeTimestamps() {
- timestamps.clear();
- timestamps.put(PROFILE_TIMESTAMP, Long.toString(profile.getTimestamp()));
- for (Entry<String, IMetadataRepository> entry : repositoryMap.entrySet()) {
- IMetadataRepository repository = entry.getValue();
- Map<String, String> props = repository.getProperties();
- String timestamp = null;
- if (props != null)
- timestamp = props.get(IRepository.PROP_TIMESTAMP);
-
- if (timestamp == null)
- timestamp = NO_TIMESTAMP;
-
- timestamps.put(entry.getKey(), timestamp);
- }
-
- try {
- File file = Activator.getContext().getDataFile(TIMESTAMPS_FILE_PREFIX + profile.getProfileId().hashCode());
- OutputStream os = new BufferedOutputStream(new FileOutputStream(file));
- try {
- CollectionUtils.storeProperties(timestamps, os, "Timestamps for " + profile.getProfileId()); //$NON-NLS-1$
- } finally {
- if (os != null)
- os.close();
- }
- } catch (FileNotFoundException e) {
- //Ignore
- } catch (IOException e) {
- //Ignore
- }
- }
-
- private boolean isUpToDate() {
- // the user might want to force a reconciliation
- if ("true".equals(Activator.getContext().getProperty("osgi.checkConfiguration"))) //$NON-NLS-1$//$NON-NLS-2$
- return false;
-
- String lastKnownProfileTimeStamp = timestamps.remove(PROFILE_TIMESTAMP);
- if (lastKnownProfileTimeStamp == null)
- return false;
- if (!lastKnownProfileTimeStamp.equals(Long.toString(profile.getTimestamp())))
- return false;
-
- //When we get here the timestamps map only contains information related to repos
- for (Entry<String, IMetadataRepository> entry : repositoryMap.entrySet()) {
- IMetadataRepository repository = entry.getValue();
-
- Map<String, String> props = repository.getProperties();
- String currentTimestamp = null;
- if (props != null)
- currentTimestamp = props.get(IRepository.PROP_TIMESTAMP);
-
- if (currentTimestamp == null)
- currentTimestamp = NO_TIMESTAMP;
-
- String lastKnownTimestamp = timestamps.remove(entry.getKey());
- //A repo has been added
- if (lastKnownTimestamp == null)
- return false;
- if (!lastKnownTimestamp.equals(currentTimestamp)) {
- return false;
- }
- }
- //A repo has been removed
- if (timestamps.size() != 0)
- return false;
-
- return true;
- }
-
- private void readTimestamps() {
- File file = Activator.getContext().getDataFile(TIMESTAMPS_FILE_PREFIX + profile.getProfileId().hashCode());
- try {
- InputStream is = new BufferedInputStream(new FileInputStream(file));
- try {
- timestamps = CollectionUtils.loadProperties(is);
- } finally {
- if (is != null)
- is.close();
- }
- } catch (FileNotFoundException e) {
- timestamps = new HashMap<String, String>();
- //Ignore
- } catch (IOException e) {
- //Ignore
- timestamps = new HashMap<String, String>();
- }
- }
-
- private ProvisioningContext getContext() {
- ArrayList<URI> repoURLs = new ArrayList<URI>();
- for (Iterator<String> iterator = repositoryMap.keySet().iterator(); iterator.hasNext();) {
- try {
- repoURLs.add(new URI(iterator.next()));
- } catch (URISyntaxException e) {
- //ignore
- }
- }
- ProvisioningContext result = new ProvisioningContext(agent);
- result.setMetadataRepositories(repoURLs.toArray(new URI[repoURLs.size()]));
- result.setArtifactRepositories(new URI[0]);
- return result;
- }
-
- private String synchronizeCacheExtensions() {
- List<String> currentExtensions = new ArrayList<String>();
- StringBuffer buffer = new StringBuffer();
-
- List<String> repositories = new ArrayList<String>(repositoryMap.keySet());
- final String OSGiInstallArea = Activator.getOSGiInstallArea().toExternalForm() + Constants.EXTENSION_LOCATION;
- Collections.sort(repositories, new Comparator<String>() {
- public int compare(String left, String right) {
- if (OSGiInstallArea.equals(left))
- return -1;
- if (OSGiInstallArea.equals(right))
- return 1;
- return left.compareTo(right);
- }
- });
- for (Iterator<String> it = repositories.iterator(); it.hasNext();) {
- String repositoryId = it.next();
- try {
- IArtifactRepository repository = Activator.loadArtifactRepository(new URI(repositoryId), null);
-
- if (repository instanceof IFileArtifactRepository) {
- currentExtensions.add(escapePipe(repositoryId));
- buffer.append(repositoryId);
- if (it.hasNext())
- buffer.append(PIPE);
- }
- } catch (ProvisionException e) {
- // ignore
- } catch (URISyntaxException e) {
- // unexpected
- e.printStackTrace();
- }
- }
- String currentExtensionsProperty = (buffer.length() == 0) ? null : buffer.toString();
-
- List<String> previousExtensions = new ArrayList<String>();
- String previousExtensionsProperty = profile.getProperty(CACHE_EXTENSIONS);
- if (previousExtensionsProperty != null) {
- StringTokenizer tokenizer = new StringTokenizer(previousExtensionsProperty, PIPE);
- while (tokenizer.hasMoreTokens()) {
- previousExtensions.add(tokenizer.nextToken());
- }
- }
-
- if (previousExtensions.size() == currentExtensions.size() && previousExtensions.containsAll(currentExtensions))
- return null;
-
- return currentExtensionsProperty;
- }
-
- /**
- * Escapes the pipe ('|') character in a URI using the standard URI escape sequence.
- * This is done because the pipe character is used as the delimiter between locations
- * in the cache extensions profile property.
- */
- private String escapePipe(String location) {
- String result = location;
- int pipeIndex;
- while ((pipeIndex = result.indexOf(',')) != -1)
- result = result.substring(0, pipeIndex) + "%7C" + result.substring(pipeIndex + 1); //$NON-NLS-1$
- return result;
- }
-
- /*
- * Return a map of all the IUs in the profile
- * Use a map here so we have a copy of the original IU from the profile... we will need it later.
- */
- private Map<IInstallableUnit, IInstallableUnit> getProfileIUs() {
- IQueryResult<IInstallableUnit> profileQueryResult = profile.query(QueryUtil.createIUAnyQuery(), null);
- Map<IInstallableUnit, IInstallableUnit> result = new HashMap<IInstallableUnit, IInstallableUnit>();
- for (Iterator<IInstallableUnit> it = profileQueryResult.iterator(); it.hasNext();) {
- IInstallableUnit iu = it.next();
- result.put(iu, iu);
- }
- return result;
- }
-
- /*
- * Return a map of all the IUs available in the profile. This takes the shared parents into consideration, if applicable.
- * Use a map here so we have a copy of the original IU from the profile... we will need it later.
- */
- private Map<IInstallableUnit, IInstallableUnit> getAvailableProfileIUs() {
- IQueryResult<IInstallableUnit> profileQueryResult = profile.available(QueryUtil.createIUAnyQuery(), null);
- Map<IInstallableUnit, IInstallableUnit> result = new HashMap<IInstallableUnit, IInstallableUnit>();
- for (Iterator<IInstallableUnit> it = profileQueryResult.iterator(); it.hasNext();) {
- IInstallableUnit iu = it.next();
- result.put(iu, iu);
- }
- return result;
- }
-
- /*
- * Return the profile change requests that we need to execute in order to install everything from the
- * dropins folder(s). (or uninstall things that have been removed) We use a collection here because if
- * the user has moved bundles from the dropins to the plugins (for instance) then we need to uninstall
- * the old bundle and then re-install the new one. This is because the IUs for the moved bundles are
- * considered the same but they really differ in an IU property. (file location, which is not considered
- * as part of equality)
- */
- public ReconcilerProfileChangeRequest createProfileChangeRequest(ProvisioningContext context) {
- ReconcilerProfileChangeRequest request = new ReconcilerProfileChangeRequest(profile, false);
-
- boolean resolve = Boolean.valueOf(profile.getProperty("org.eclipse.equinox.p2.resolve")).booleanValue(); //$NON-NLS-1$
- if (resolve)
- request.removeProfileProperty("org.eclipse.equinox.p2.resolve"); //$NON-NLS-1$
-
- List<IInstallableUnit> toAdd = new ArrayList<IInstallableUnit>();
- List<IInstallableUnit> toRemove = new ArrayList<IInstallableUnit>();
- List<IInstallableUnit> toMove = new ArrayList<IInstallableUnit>();
-
- boolean foundIUsToAdd = false;
- Map<IInstallableUnit, IInstallableUnit> profileIUs = getProfileIUs();
-
- // we use IProfile.available(...) here so that we also gather any shared IUs
- Map<IInstallableUnit, IInstallableUnit> availableProfileIUs = getAvailableProfileIUs();
-
- // get all IUs from all our repos (toAdd)
- IQueryResult<IInstallableUnit> allIUs = getAllIUsFromRepos();
- for (Iterator<IInstallableUnit> iter = allIUs.iterator(); iter.hasNext();) {
- final IInstallableUnit iu = iter.next();
- IInstallableUnit existing = profileIUs.get(iu);
- // check to see if it is really the same IU
- if (existing == null) {
- if (QueryUtil.isGroup(iu))
- request.setInstallableUnitProfileProperty(iu, IProfile.PROP_PROFILE_ROOT_IU, Boolean.TRUE.toString());
- // mark all IUs with special property
- request.setInstallableUnitProfileProperty(iu, PROP_FROM_DROPINS, Boolean.TRUE.toString());
- request.setInstallableUnitInclusionRules(iu, ProfileInclusionRules.createOptionalInclusionRule(iu));
- request.setInstallableUnitProfileProperty(iu, IProfile.PROP_PROFILE_LOCKED_IU, Integer.toString(IProfile.LOCK_UNINSTALL));
- toAdd.add(iu);
-
- // as soon as we find something locally that needs to be installed, then
- // everything from the parent's dropins must be installed locally as well.
- if (!foundIUsToAdd && availableProfileIUs.get(iu) == null) {
- foundIUsToAdd = true;
- }
- } else {
- // if the IU is already installed in the profile then check to see if it was moved.
- String one = iu.getProperty(RepositoryListener.FILE_NAME);
- String two = existing.getProperty(RepositoryListener.FILE_NAME);
- // if we have an IU which has been moved, keep track of it.
- //
- // cheat here... since we always set the filename property for bundles in the dropins,
- // if the existing IU's filename is null then it isn't from the dropins. a better
- // (and more expensive) way to find this out is to do an IU profile property query.
- if (one != null && two != null && !one.equals(two))
- toMove.add(iu);
- }
- }
-
- // get all IUs from profile with marked property (existing)
- IQueryResult<IInstallableUnit> dropinIUs = profile.query(new IUProfilePropertyQuery(PROP_FROM_DROPINS, Boolean.TRUE.toString()), null);
- Set<IInstallableUnit> all = allIUs.toUnmodifiableSet();
- for (Iterator<IInstallableUnit> iter = dropinIUs.iterator(); iter.hasNext();) {
- IInstallableUnit iu = iter.next();
- // the STRICT policy is set when we install things via the UI, we use it to differentiate between IUs installed
- // via the dropins and the UI. (dropins are considered optional) If an IU has both properties set it means that
- // it was initially installed via the dropins but then upgraded via the UI. (properties are copied from the old IU
- // to the new IU during an upgrade) In this case we want to remove the "from dropins" property so the upgrade
- // will stick.
- if ("STRICT".equals(profile.getInstallableUnitProperty(iu, "org.eclipse.equinox.p2.internal.inclusion.rules"))) { //$NON-NLS-1$//$NON-NLS-2$
- request.removeInstallableUnitProfileProperty(iu, PROP_FROM_DROPINS);
- request.removeInstallableUnitProfileProperty(iu, IProfile.PROP_PROFILE_LOCKED_IU);
- continue;
- }
- // if the IU from the profile is in the "all available" list, then it is already added
- // otherwise if it isn't in the repo then we have to remove it from the profile.
- if (all.contains(iu))
- toAdd.remove(iu);
- else
- toRemove.add(iu);
- }
-
- if (!foundIUsToAdd && toRemove.isEmpty() && !resolve && toMove.isEmpty()) {
- if (Tracing.DEBUG_RECONCILER)
- Tracing.debug("[reconciler] Nothing to do."); //$NON-NLS-1$
- return null;
- }
-
- // if we have just a regular add/remove then set up the change request as per normal
- if (toMove.isEmpty()) {
- context.setExtraInstallableUnits(toAdd);
- request.addAll(toAdd);
- request.removeAll(toRemove);
- } else {
- // if we had some bundles which moved locations then we need to create a move change request
- // and remove the moved bundles first. The caller of this method will take care of calling us again
- // to re-add the bundles at their new location (and other bundles which need adding)
- request = new ReconcilerProfileChangeRequest(profile, true);
- request.removeAll(toMove);
- }
-
- // force removal of all moved and removed IUs, which will also remove anything which depends on them
- // see: bug 306424#c6 and bug 308934.
- Collection<IRequirement> extraReqs = new ArrayList<IRequirement>();
- for (IInstallableUnit unit : request.getRemovals()) {
- IRequirement negation = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, unit.getId(), //
- new VersionRange(unit.getVersion(), true, unit.getVersion(), true), null, 0, 0, false);
- extraReqs.add(negation);
- }
- request.addExtraRequirements(extraReqs);
- debug(request);
- return request;
- }
-
- private void debug(ProfileChangeRequest request, IProvisioningPlan plan) {
- if (!Tracing.DEBUG_RECONCILER)
- return;
- final String PREFIX = "[reconciler] [plan] "; //$NON-NLS-1$
- // get the request
- List<IInstallableUnit> toAdd = new ArrayList<IInstallableUnit>(request.getAdditions());
- List<IInstallableUnit> toRemove = new ArrayList<IInstallableUnit>(request.getRemovals());
- // remove from the request everything that is in the plan
-
- for (Iterator<IInstallableUnit> iterator = plan.getRemovals().query(QueryUtil.createIUAnyQuery(), null).iterator(); iterator.hasNext();) {
- IInstallableUnit iu = iterator.next();
- toRemove.remove(iu);
- }
- for (Iterator<IInstallableUnit> iterator = plan.getAdditions().query(QueryUtil.createIUAnyQuery(), null).iterator(); iterator.hasNext();) {
- IInstallableUnit iu = iterator.next();
- toAdd.remove(iu);
- }
-
- // if anything is left in the request, then something is wrong with the plan
- if (toAdd.size() == 0 && toRemove.size() == 0)
- Tracing.debug(PREFIX + "Plan matches the request."); //$NON-NLS-1$
- if (toAdd.size() != 0) {
- Tracing.debug(PREFIX + "Some units will not be installed, because they are already installed or there are dependency issues:"); //$NON-NLS-1$
- for (IInstallableUnit unit : toAdd)
- Tracing.debug(PREFIX + unit);
- }
- if (toRemove.size() != 0) {
- Tracing.debug(PREFIX + "Some units will not be uninstalled:"); //$NON-NLS-1$
- for (IInstallableUnit unit : toRemove)
- Tracing.debug(PREFIX + unit);
- }
- }
-
- /*
- * If debugging is turned on, then print out the details for the given profile change request.
- */
- private void debug(ProfileChangeRequest request) {
- if (!Tracing.DEBUG_RECONCILER)
- return;
- final String PREFIX = "[reconciler] "; //$NON-NLS-1$
- Collection<IInstallableUnit> toAdd = request.getAdditions();
- if (toAdd == null || toAdd.size() == 0) {
- Tracing.debug(PREFIX + "No installable units to add."); //$NON-NLS-1$
- } else {
- for (IInstallableUnit add : toAdd) {
- Tracing.debug(PREFIX + "Adding IU: " + add.getId() + ' ' + add.getVersion()); //$NON-NLS-1$
- }
- }
- Map<IInstallableUnit, Map<String, String>> propsToAdd = request.getInstallableUnitProfilePropertiesToAdd();
- if (propsToAdd == null || propsToAdd.isEmpty()) {
- Tracing.debug(PREFIX + "No IU properties to add."); //$NON-NLS-1$
- } else {
- for (Entry<IInstallableUnit, Map<String, String>> entry : propsToAdd.entrySet()) {
- Tracing.debug(PREFIX + "Adding IU property: " + entry.getKey() + "->" + entry.getValue()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- Collection<IInstallableUnit> toRemove = request.getRemovals();
- if (toRemove == null || toRemove.size() == 0) {
- Tracing.debug(PREFIX + "No installable units to remove."); //$NON-NLS-1$
- } else {
- for (IInstallableUnit remove : toRemove) {
- Tracing.debug(PREFIX + "Removing IU: " + remove.getId() + ' ' + remove.getVersion()); //$NON-NLS-1$
- }
- }
- Map<IInstallableUnit, List<String>> propsToRemove = request.getInstallableUnitProfilePropertiesToRemove();
- if (propsToRemove == null || propsToRemove.isEmpty()) {
- Tracing.debug(PREFIX + "No IU properties to remove."); //$NON-NLS-1$
- } else {
- for (Entry<IInstallableUnit, List<String>> entry : propsToRemove.entrySet()) {
- Tracing.debug(PREFIX + "Removing IU property: " + entry.getKey() + "->" + entry.getValue()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- Collection<IRequirement> extra = request.getExtraRequirements();
- if (extra == null || extra.isEmpty()) {
- Tracing.debug(PREFIX + "No extra requirements."); //$NON-NLS-1$
- } else {
- for (IRequirement requirement : extra)
- Tracing.debug(PREFIX + "Extra requirement: " + requirement); //$NON-NLS-1$
- }
- }
-
- /*
- * Return all of the IUs available in all of our repos. This usually includes the dropins and plugins folders
- * as well as any sites specified in the platform.xml file.
- */
- private IQueryResult<IInstallableUnit> getAllIUsFromRepos() {
- // TODO: Should consider using a sequenced iterator here instead of collecting
- Collector<IInstallableUnit> allRepos = new Collector<IInstallableUnit>();
- for (IMetadataRepository repository : repositoryMap.values()) {
- allRepos.addAll(repository.query(QueryUtil.createIUAnyQuery(), null));
- }
- return allRepos;
- }
-
- private IProvisioningPlan createProvisioningPlan(ProfileChangeRequest request, ProvisioningContext provisioningContext, IProgressMonitor monitor) {
- IPlanner planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
- return planner.getProvisioningPlan(request, provisioningContext, monitor);
- }
-
- private IStatus setProperty(String key, String value, ProvisioningContext provisioningContext, IProgressMonitor monitor) {
- IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
- IProvisioningPlan plan = engine.createPlan(profile, provisioningContext);
- plan.setProfileProperty(key, value);
- IPhaseSet phaseSet = PhaseSetFactory.createPhaseSetIncluding(new String[] {PhaseSetFactory.PHASE_PROPERTY});
- return engine.perform(plan, phaseSet, monitor);
- }
-
- private IStatus executePlan(IProvisioningPlan plan, ProvisioningContext provisioningContext, IProgressMonitor monitor) {
- IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
- IPhaseSet phaseSet = PhaseSetFactory.createDefaultPhaseSetExcluding(new String[] {PhaseSetFactory.PHASE_COLLECT, PhaseSetFactory.PHASE_CHECK_TRUST});
-
- if (plan.getInstallerPlan() != null) {
- IStatus installerPlanStatus = engine.perform(plan.getInstallerPlan(), phaseSet, monitor);
- if (!installerPlanStatus.isOK())
- return installerPlanStatus;
-
- applyConfiguration(true);
- }
- return engine.perform(plan, phaseSet, monitor);
- }
-
- /*
- * Write out the configuration file.
- */
- private IStatus applyConfiguration(boolean isInstaller) {
- if (!isInstaller && isReconciliationApplicationRunning())
- return Status.OK_STATUS;
- BundleContext context = Activator.getContext();
- ServiceReference reference = context.getServiceReference(Configurator.class.getName());
- Configurator configurator = (Configurator) context.getService(reference);
- try {
- configurator.applyConfiguration();
- } catch (IOException e) {
- return new Status(IStatus.ERROR, Activator.ID, "Unexpected failure applying configuration", e); //$NON-NLS-1$
- } finally {
- context.ungetService(reference);
- }
- return Status.OK_STATUS;
- }
-
- static boolean isReconciliationApplicationRunning() {
- EnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName());
- if (info == null)
- return false;
- String[] args = info.getCommandLineArgs();
- if (args == null)
- return false;
- for (int i = 0; i < args.length; i++) {
- if (args[i] != null && RECONCILER_APPLICATION_ID.equals(args[i].trim()))
- return true;
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/messages.properties b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/messages.properties
deleted file mode 100644
index c8b618c8f..000000000
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/messages.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.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.
-errorLoadingRepository=Error occurred while loading repository at {0}.
-errorProcessingConfg=Exception while processing configuration.
-metadata_repo_manager_not_registered=MetadataRepositoryManager not registered.
-error_reading_link = Error occurred while reading link file at {0}.
-error_resolving_link = Error occurred while resolving linked folder {0} from {1}.
- \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/.cvsignore b/bundles/org.eclipse.equinox.p2.repository.tools/.cvsignore
index b4b639c38..003f41400 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/.cvsignore
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/.cvsignore
@@ -1,3 +1,4 @@
bin
lib
-bin_ant \ No newline at end of file
+bin_ant
+target
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.repository.tools/META-INF/MANIFEST.MF
index 7ed59ee47..8ecfc1d49 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-SymbolicName: org.eclipse.equinox.p2.repository.tools;singleton:=true
-Bundle-Version: 2.0.0.qualifier
+Bundle-Version: 2.0.100.qualifier
Bundle-Activator: org.eclipse.equinox.p2.internal.repository.tools.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -28,6 +28,7 @@ Import-Package: org.eclipse.equinox.app;version="1.0.0",
org.eclipse.equinox.internal.p2.metadata.repository,
org.eclipse.equinox.internal.p2.persistence,
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.director,
org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/pom.xml b/bundles/org.eclipse.equinox.p2.repository.tools/pom.xml
index cbea1abdd..a18645175 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse</groupId>
<artifactId>org.eclipse.equinox.p2.repository.tools</artifactId>
- <version>2.0.0.qualifier</version>
+ <version>2.0.100.qualifier</version>
<packaging>eclipse-plugin</packaging>
</project>
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
index 8ee9b8e28..75aa294e6 100644
--- 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -150,11 +150,7 @@ public class JarComparator implements IArtifactComparator {
firstStream = new BufferedInputStream(firstFile.getInputStream(entry));
secondStream = new BufferedInputStream(secondFile.getInputStream(entry2));
if (lowerCase.endsWith(CLASS_EXTENSION)) {
- try {
- result = compareClasses(entryName, firstStream, entry.getSize(), secondStream, entry2.getSize());
- } catch (ClassFormatException e) {
- result = newErrorStatus(NLS.bind(Messages.differentEntry, new String[] {entryName, descriptorString, sourceLocation}), e);
- }
+ result = compareClasses(entryName, firstStream, entry.getSize(), secondStream, entry2.getSize());
} else if (lowerCase.endsWith(JAR_EXTENSION)) {
result = compareNestedJars(firstStream, entry.getSize(), secondStream, entry2.getSize(), entryName);
} else if (lowerCase.endsWith(PROPERTIES_EXTENSION) || lowerCase.endsWith(MAPPINGS_EXTENSION)) {
@@ -216,15 +212,42 @@ public class JarComparator implements IArtifactComparator {
return Status.OK_STATUS;
}
- private IStatus compareClasses(String entryName, InputStream stream1, long size1, InputStream stream2, long size2) throws ClassFormatException, IOException {
+ private IStatus compareClasses(String entryName, InputStream stream1, long size1, InputStream stream2, long size2) throws 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);
- if (!contentsFile1.equals(contentsFile2))
+ String contentsFile1 = null;
+ try {
+ contentsFile1 = disassembler.disassemble(firstEntryClassFileBytes, LINE_SEPARATOR, Disassembler.DETAILED | Disassembler.COMPACT);
+ } catch (ClassFormatException e) {
+ // ignore
+ }
+ String contentsFile2 = null;
+ try {
+ contentsFile2 = disassembler.disassemble(secondEntryClassFileBytes, LINE_SEPARATOR, Disassembler.DETAILED | Disassembler.COMPACT);
+ } catch (ClassFormatException e) {
+ // ignore
+ }
+ if (contentsFile1 == null || contentsFile2 == null) {
+ // one of the two .class file (or both) is corrupted
+ if (contentsFile1 == null) {
+ if (contentsFile2 != null) {
+ // first .class file is corrupted and not the second one
+ return newErrorStatus(NLS.bind(Messages.classesDifferent, entryName));
+ }
+ // both .class files are corrupted and we need to do a byte comparison in case the .class file is corrupted on purpose
+ if (!Arrays.equals(firstEntryClassFileBytes, secondEntryClassFileBytes)) {
+ return newErrorStatus(NLS.bind(Messages.binaryFilesDifferent, entryName));
+ }
+ return Status.OK_STATUS;
+ }
+ // first .class file is not corrupted but the second one is
return newErrorStatus(NLS.bind(Messages.classesDifferent, entryName));
+ }
+ if (!contentsFile1.equals(contentsFile2)) {
+ return newErrorStatus(NLS.bind(Messages.classesDifferent, entryName));
+ }
return Status.OK_STATUS;
}
@@ -256,15 +279,44 @@ public class JarComparator implements IArtifactComparator {
String prop1 = props1.getProperty(key);
String prop2 = props2.getProperty(key);
if (!prop1.equals(prop2)) {
- if (prop1.length() < 10 && prop2.length() < 10)
+ if (prop1.length() < 15 && prop2.length() < 15)
return newErrorStatus(NLS.bind(Messages.differentPropertyValueFull, new String[] {entryName, key, prop1, prop2}));
- return newErrorStatus(NLS.bind(Messages.differentPropertyValueFull, entryName, key));
+ // strings are too long, report the first bit that is different
+ String[] diff = extractDifference(prop1, prop2);
+ return newErrorStatus(NLS.bind(Messages.differentPropertyValueFull, new String[] {entryName, key, diff[0], diff[1]}));
}
}
return Status.OK_STATUS;
}
+ /*
+ * Given two different strings return the first segments of those
+ * strings that illustrate the differences.
+ */
+ private String[] extractDifference(String s1, String s2) {
+ for (int i = 0; i < s1.length() && i < s2.length(); i++) {
+ if (s1.charAt(i) != s2.charAt(i)) {
+ String result1, result2;
+ boolean truncated;
+ if (i > 3) {
+ truncated = (i + 7) < s1.length();
+ result1 = "..." + s1.substring(i - 3, truncated ? i + 7 : s1.length()) + (truncated ? "..." : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ truncated = (i + 7) < s2.length();
+ result2 = "..." + s2.substring(i - 3, truncated ? i + 7 : s2.length()) + (truncated ? "..." : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ } else {
+ truncated = (i + 10) < s1.length();
+ result1 = s1.substring(0, truncated ? i + 10 : s1.length()) + (truncated ? "..." : ""); //$NON-NLS-1$ //$NON-NLS-2$
+ truncated = (i + 10) < s2.length();
+ result2 = s2.substring(0, truncated ? i + 10 : s2.length()) + (truncated ? "..." : ""); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ return new String[] {result1, result2};
+ }
+ }
+ //no differences?
+ return new String[] {s1, s2};
+ }
+
private IStatus compareBytes(String entryName, InputStream firstStream, long size1, InputStream secondStream, long size2) throws IOException {
byte[] firstBytes = Utility.getInputStreamAsByteArray(firstStream, (int) size1);
byte[] secondBytes = Utility.getInputStreamAsByteArray(secondStream, (int) size2);
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ClassFileReader.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ClassFileReader.java
index dea13cc34..ddefde38d 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ClassFileReader.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ClassFileReader.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -308,7 +308,10 @@ public class ClassFileReader extends ClassFileStruct {
}
} catch (ClassFormatException e) {
throw e;
+ } catch (ArrayIndexOutOfBoundsException e) {
+ throw new ClassFormatException(ClassFormatException.ERROR_TRUNCATED_INPUT);
} catch (Exception e) {
+ // need to know what kind of exception can be thrown
e.printStackTrace();
throw new ClassFormatException(ClassFormatException.ERROR_TRUNCATED_INPUT);
}
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Disassembler.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Disassembler.java
index 69a9bfb3c..0572230a7 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Disassembler.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Disassembler.java
@@ -819,6 +819,28 @@ public class Disassembler {
int length = innerClassesAttributeEntries.length;
int innerClassNameIndex, outerClassNameIndex, innerNameIndex, accessFlags;
InnerClassesAttributeEntry innerClassesAttributeEntry;
+ if (length > 1) {
+ final char[] EMPTY_CHAR_ARRAY = Utility.EMPTY_STRING.toCharArray();
+ Arrays.sort(innerClassesAttributeEntries, new Comparator<InnerClassesAttributeEntry>() {
+ public int compare(InnerClassesAttributeEntry o1, InnerClassesAttributeEntry o2) {
+ final char[] innerClassName1 = o1.getInnerClassName();
+ final char[] innerClassName2 = o2.getInnerClassName();
+ final char[] innerName1 = o1.getInnerName();
+ final char[] innerName2 = o2.getInnerName();
+ final char[] outerClassName1 = o1.getOuterClassName();
+ final char[] outerClassName2 = o2.getOuterClassName();
+ StringBuffer buffer1 = new StringBuffer();
+ buffer1.append(innerClassName1 == null ? EMPTY_CHAR_ARRAY : innerClassName1);
+ buffer1.append(innerName1 == null ? EMPTY_CHAR_ARRAY : innerName1);
+ buffer1.append(outerClassName1 == null ? EMPTY_CHAR_ARRAY : outerClassName1);
+ StringBuffer buffer2 = new StringBuffer();
+ buffer2.append(innerClassName2 == null ? EMPTY_CHAR_ARRAY : innerClassName2);
+ buffer2.append(innerName2 == null ? EMPTY_CHAR_ARRAY : innerName2);
+ buffer2.append(outerClassName2 == null ? EMPTY_CHAR_ARRAY : outerClassName2);
+ return buffer1.toString().compareTo(buffer2.toString());
+ }
+ });
+ }
for (int i = 0; i < length; i++) {
if (i != 0) {
buffer.append(Messages.disassembler_comma);
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Signature.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Signature.java
index 7b855bb25..e1aa31599 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Signature.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Signature.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -729,8 +729,17 @@ public final class Signature {
// parameters
buffer.append('(');
char[][] pts = getParameterTypes(methodSignature);
- for (int i = 0, max = pts.length; i < max; i++) {
- if (i == max - 1) {
+ // search for the last array in the signature
+ int max = pts.length;
+ int index = max - 1;
+ loop: for (int i = index; i >= 0; i--) {
+ if (pts[i][0] == Signature.C_ARRAY) {
+ break loop;
+ }
+ index--;
+ }
+ for (int i = 0; i < max; i++) {
+ if (i == index) {
appendTypeSignature(pts[i], 0, fullyQualifyTypeNames, buffer, isVargArgs);
} else {
appendTypeSignature(pts[i], 0, fullyQualifyTypeNames, buffer);
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/Mirroring.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/Mirroring.java
index a6a0dc5e5..dcc6fec04 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/Mirroring.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/Mirroring.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Compeople AG (Stefan Liebig) - various ongoing maintenance
+ * Sonatype, Inc. - transport split
*******************************************************************************/
package org.eclipse.equinox.p2.internal.repository.mirroring;
@@ -15,6 +16,7 @@ import java.util.*;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.artifact.repository.RawMirrorRequest;
import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.internal.p2.repository.Transport;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.internal.repository.tools.Activator;
import org.eclipse.equinox.p2.internal.repository.tools.Messages;
@@ -43,6 +45,7 @@ public class Mirroring {
private String comparatorID;
private List<IArtifactKey> keysToMirror;
private IArtifactMirrorLog comparatorLog;
+ private Transport transport;
private IArtifactComparator getComparator() {
if (comparator == null)
@@ -192,7 +195,7 @@ public class Mirroring {
* 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);
+ RawMirrorRequest request = new RawMirrorRequest(srcDescriptor, destDescriptor, destination, transport);
request.perform(sourceRepo, new NullProgressMonitor());
return request.getResult();
@@ -306,4 +309,8 @@ public class Mirroring {
public void setCompareExclusions(IQuery<IArtifactDescriptor> excludedKeys) {
compareExclusionQuery = excludedKeys;
}
+
+ public void setTransport(Transport transport) {
+ this.transport = transport;
+ }
}
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
index 6f4db174f..6b3ee5d36 100644
--- 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
@@ -58,17 +58,17 @@ public abstract class AbstractApplication {
private void setupAgent() throws ProvisionException {
//note if we ever wanted these applications to act on a different agent than
//the currently running system we would need to set it here
- ServiceReference agentRef = Activator.getBundleContext().getServiceReference(IProvisioningAgent.SERVICE_NAME);
+ ServiceReference<IProvisioningAgent> agentRef = Activator.getBundleContext().getServiceReference(IProvisioningAgent.class);
if (agentRef != null) {
- agent = (IProvisioningAgent) Activator.getBundleContext().getService(agentRef);
+ agent = Activator.getBundleContext().getService(agentRef);
if (agent != null)
return;
}
//there is no agent around so we need to create one
- ServiceReference providerRef = Activator.getBundleContext().getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);
+ ServiceReference<IProvisioningAgentProvider> providerRef = Activator.getBundleContext().getServiceReference(IProvisioningAgentProvider.class);
if (providerRef == null)
throw new RuntimeException("No provisioning agent provider is available"); //$NON-NLS-1$
- IProvisioningAgentProvider provider = (IProvisioningAgentProvider) Activator.getBundleContext().getService(providerRef);
+ IProvisioningAgentProvider provider = Activator.getBundleContext().getService(providerRef);
if (provider == null)
throw new RuntimeException("No provisioning agent provider is available"); //$NON-NLS-1$
//obtain agent for currently running system
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
index d4168db40..327ea2a47 100644
--- 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
@@ -19,10 +19,14 @@ 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.director.PermissiveSlicer;
+import org.eclipse.equinox.internal.p2.repository.Transport;
import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.internal.repository.mirroring.*;
import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
import org.eclipse.equinox.p2.query.*;
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
@@ -182,7 +186,7 @@ public class MirrorApplication extends AbstractApplication implements IApplicati
IQueryable<IInstallableUnit> slice = slice(new NullProgressMonitor());
if (destinationArtifactRepository != null) {
mirrorStatus = mirrorArtifacts(slice, new NullProgressMonitor());
- if (mirrorStatus.getSeverity() == IStatus.ERROR)
+ if (failOnError && mirrorStatus.getSeverity() == IStatus.ERROR)
return mirrorStatus;
}
if (destinationMetadataRepository != null)
@@ -211,6 +215,7 @@ public class MirrorApplication extends AbstractApplication implements IApplicati
mirror.setBaseline(initializeBaseline());
mirror.setValidate(validate);
mirror.setCompareExclusions(compareExclusions);
+ mirror.setTransport((Transport) agent.getService(Transport.SERVICE_NAME));
// If IUs have been specified then only they should be mirrored, otherwise mirror everything.
if (keys.size() > 0)
@@ -272,8 +277,8 @@ public class MirrorApplication extends AbstractApplication implements IApplicati
sourceIUs = new ArrayList<IInstallableUnit>();
for (int i = 0; i < rootIUs.length; i++) {
String[] segments = getArrayArgsFromString(rootIUs[i], "/"); //$NON-NLS-1$
- VersionRange range = segments.length > 1 ? new VersionRange(segments[i]) : null;
- Iterator<IInstallableUnit> queryResult = metadataRepo.query(QueryUtil.createIUQuery(segments[i], range), null).iterator();
+ VersionRange range = segments.length > 1 ? new VersionRange(segments[1]) : null;
+ Iterator<IInstallableUnit> queryResult = metadataRepo.query(QueryUtil.createIUQuery(segments[0], range), null).iterator();
while (queryResult.hasNext())
sourceIUs.add(queryResult.next());
}
@@ -318,9 +323,30 @@ public class MirrorApplication extends AbstractApplication implements IApplicati
return new FileMirrorLog(absolutePath, 0, root);
}
+ private IQueryable<IInstallableUnit> performResolution(IProgressMonitor monitor) throws ProvisionException {
+ IProfileRegistry registry = Activator.getProfileRegistry();
+ String profileId = "MirrorApplication-" + System.currentTimeMillis();
+ IProfile profile = registry.addProfile(profileId, slicingOptions.getFilter());
+ IPlanner planner = (IPlanner) Activator.getAgent().getService(IPlanner.SERVICE_NAME);
+ if (planner == null)
+ throw new IllegalStateException();
+ IProfileChangeRequest pcr = planner.createChangeRequest(profile);
+ pcr.addAll(sourceIUs);
+ IProvisioningPlan plan = planner.getProvisioningPlan(pcr, null, monitor);
+ registry.removeProfile(profileId);
+ IQueryable<IInstallableUnit>[] arr = new IQueryable[plan.getInstallerPlan() == null ? 1 : 2];
+ arr[0] = plan.getAdditions();
+ if (plan.getInstallerPlan() != null)
+ arr[1] = plan.getInstallerPlan().getAdditions();
+ return new CompoundQueryable<IInstallableUnit>(arr);
+ }
+
private IQueryable<IInstallableUnit> slice(IProgressMonitor monitor) throws ProvisionException {
if (slicingOptions == null)
slicingOptions = new SlicingOptions();
+ if (slicingOptions.getInstallTimeLikeResolution())
+ return performResolution(monitor);
+
PermissiveSlicer slicer = new PermissiveSlicer(getCompositeMetadataRepository(), slicingOptions.getFilter(), slicingOptions.includeOptionalDependencies(), slicingOptions.isEverythingGreedy(), slicingOptions.forceFilterTo(), slicingOptions.considerStrictDependencyOnly(), slicingOptions.followOnlyFilteredRequirements());
IQueryable<IInstallableUnit> slice = slicer.slice(sourceIUs.toArray(new IInstallableUnit[sourceIUs.size()]), monitor);
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
index adaa79af6..bd2a2b85c 100644
--- 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
@@ -7,12 +7,12 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype Inc - ongoing development
*******************************************************************************/
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.*;
@@ -84,14 +84,10 @@ public class RecreateRepositoryApplication extends AbstractApplication {
manager.removeRepository(repository.getLocation());
boolean compressed = Boolean.valueOf(repoProperties.get(IRepository.PROP_COMPRESSED)).booleanValue();
- try {
- 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()));
- } catch (IOException e) {
- throw new ProvisionException(NLS.bind(Messages.exception_unableToRemoveRepo, repository.getLocation().toString()));
- }
+ 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 {
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
index 04f5e7fd3..57818e5ce 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
@@ -11,6 +11,7 @@
*******************************************************************************/
package org.eclipse.equinox.p2.internal.repository.tools;
+import java.net.URI;
import java.net.URISyntaxException;
import java.util.*;
import org.eclipse.core.runtime.*;
@@ -125,6 +126,8 @@ public class Repo2Runnable extends AbstractApplication implements IApplication {
if (engine == null)
throw new ProvisionException(Messages.exception_noEngineService);
ProvisioningContext context = new ProvisioningContext(agent);
+ context.setMetadataRepositories(getRepositories(true));
+ context.setArtifactRepositories(getRepositories(false));
IProvisioningPlan plan = engine.createPlan(profile, context);
for (Iterator<IInstallableUnit> iterator = processedIUs.iterator(); iterator.hasNext();) {
plan.addInstallableUnit(iterator.next());
@@ -146,6 +149,15 @@ public class Repo2Runnable extends AbstractApplication implements IApplication {
}
}
+ protected URI[] getRepositories(boolean metadata) {
+ List<URI> repos = new ArrayList<URI>();
+ for (RepositoryDescriptor repo : sourceRepositories) {
+ if (metadata ? repo.isMetadata() : repo.isArtifact())
+ repos.add(repo.getRepoLocation());
+ }
+ return repos.toArray(new URI[repos.size()]);
+ }
+
protected PhaseSet getPhaseSet() {
return new PhaseSet(new Phase[] {new Collect(100)}) { /* nothing to override */};
}
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
index 4909ca8ae..52b106b19 100644
--- 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
@@ -20,6 +20,8 @@ public class SlicingOptions {
private boolean considerStrictDependencyOnly = false;
private boolean followOnlyFilteredRequirements = false;
private boolean latestVersion = false;
+ private boolean resolve = false;
+
private Map<String, String> filter = null;
public boolean includeOptionalDependencies() {
@@ -79,4 +81,12 @@ public class SlicingOptions {
public void latestVersionOnly(boolean latest) {
this.latestVersion = latest;
}
+
+ public void installTimeLikeResolution(boolean resolve) {
+ this.resolve = resolve;
+ }
+
+ public boolean getInstallTimeLikeResolution() {
+ return resolve;
+ }
}
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
index 023ce05ca..f4ccc3f1d 100644
--- 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
@@ -45,6 +45,21 @@ public class CompositeRepositoryTask extends AbstractRepositoryTask {
* Add the listed repositories to the composite repository
*/
public void addConfiguredAdd(RepositoryList list) {
+ if (list.getRepoLocation() != null) {
+ RepositoryDescriptor descriptor = new RepositoryDescriptor();
+ //don't use RepositoryList#getRepoLocationURI() because we want relative URIs if they were specified
+ try {
+ descriptor.setLocation(URIUtil.fromString(list.getRepoLocation()));
+ descriptor.setOptional(list.isOptional());
+ if (!list.isBoth()) {
+ descriptor.setKind(list.isArtifact() ? RepositoryDescriptor.KIND_ARTIFACT : RepositoryDescriptor.KIND_METADATA);
+ }
+ ((CompositeRepositoryApplication) application).addChild(descriptor);
+ } catch (URISyntaxException e) {
+ //no good
+ }
+ }
+
for (DestinationRepository repo : list.getRepositoryList()) {
((CompositeRepositoryApplication) application).addChild(repo.getDescriptor());
}
@@ -54,6 +69,20 @@ public class CompositeRepositoryTask extends AbstractRepositoryTask {
* Remove the listed repositories from the composite repository
*/
public void addConfiguredRemove(RepositoryList list) {
+ if (list.getRepoLocation() != null) {
+ RepositoryDescriptor descriptor = new RepositoryDescriptor();
+ try {
+ //don't use RepositoryList#getRepoLocationURI() because we want relative URIs if they were specified
+ descriptor.setLocation(URIUtil.fromString(list.getRepoLocation()));
+ descriptor.setOptional(list.isOptional());
+ if (!list.isBoth()) {
+ descriptor.setKind(list.isArtifact() ? RepositoryDescriptor.KIND_ARTIFACT : RepositoryDescriptor.KIND_METADATA);
+ }
+ ((CompositeRepositoryApplication) application).removeChild(descriptor);
+ } catch (URISyntaxException e) {
+ // no good, don't remove
+ }
+ }
for (DestinationRepository repo : list.getRepositoryList()) {
((CompositeRepositoryApplication) application).removeChild(repo.getDescriptor());
}
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
index b4cd7fe6a..8221b13c7 100644
--- 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
@@ -27,6 +27,7 @@ public class MirrorTask extends AbstractRepositoryTask {
private File mirrorLog; // file to log mirror output to (optional)
private ComparatorDescription comparator;
+ private boolean ignoreErrors = false;
public MirrorTask() {
application = new MirrorApplication();
@@ -59,7 +60,7 @@ public class MirrorTask extends AbstractRepositoryTask {
List<IInstallableUnit> ius = prepareIUs();
application.setSourceIUs(ius);
IStatus result = application.run(null);
- if (result.matches(IStatus.ERROR))
+ if (!ignoreErrors && result.matches(IStatus.ERROR))
throw new BuildException(TaskHelper.statusToString(result, IStatus.ERROR, null).toString());
} catch (ProvisionException e) {
throw new BuildException(e);
@@ -111,6 +112,7 @@ public class MirrorTask extends AbstractRepositoryTask {
* Set whether or not we should ignore errors when running the mirror application.
*/
public void setIgnoreErrors(boolean value) {
+ ignoreErrors = value;
((MirrorApplication) application).setIgnoreErrors(value);
}
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
index 566e522a1..447f605b0 100644
--- 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
@@ -81,7 +81,7 @@ public class RemoveIUTask extends AbstractRepositoryTask {
}
//we will only remove the metadata if all artifacts were removed
- boolean removeMetadata = true;
+ boolean removeMetadata = (filter != null ? keys.size() > 0 : true);
for (IArtifactKey key : keys) {
if (filter == null) {
artifacts.removeDescriptor(key);
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
index fe94b51fb..d5e5ca4de 100644
--- 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
@@ -29,6 +29,7 @@ public class SlicingOption extends Task {
options.everythingGreedy(true);
options.includeOptionalDependencies(true);
options.followOnlyFilteredRequirements(false);
+ options.installTimeLikeResolution(false);
setIncludeFeatures(true);
}
@@ -104,7 +105,12 @@ public class SlicingOption extends Task {
options.latestVersionOnly(latest);
}
+ public void setResolve(boolean resolve) {
+ options.installTimeLikeResolution(resolve);
+ }
+
public SlicingOptions getOptions() {
return options;
}
+
}
diff --git a/bundles/org.eclipse.equinox.p2.repository/.cvsignore b/bundles/org.eclipse.equinox.p2.repository/.cvsignore
new file mode 100644
index 000000000..eb5a316cb
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.repository/.cvsignore
@@ -0,0 +1 @@
+target
diff --git a/bundles/org.eclipse.equinox.p2.repository/.project b/bundles/org.eclipse.equinox.p2.repository/.project
index 120c0420d..ee1e6707b 100644
--- a/bundles/org.eclipse.equinox.p2.repository/.project
+++ b/bundles/org.eclipse.equinox.p2.repository/.project
@@ -25,6 +25,11 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ds.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
diff --git a/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF
index 8c9fb2323..2f3e620d2 100644
--- a/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF
@@ -2,16 +2,19 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.equinox.p2.repository;singleton:=true
-Bundle-Version: 2.0.0.qualifier
+Bundle-Version: 2.1.0.qualifier
Bundle-Activator: org.eclipse.equinox.internal.p2.repository.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
-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",
+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.p2.ui.importexport",
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.generator,
org.eclipse.equinox.p2.metadata.repository,
org.eclipse.equinox.p2.operations,
org.eclipse.equinox.p2.repository.tools,
@@ -25,10 +28,7 @@ Export-Package: org.eclipse.equinox.internal.p2.persistence;x-friends:="org.ecli
org.eclipse.equinox.p2.repository.metadata.spi;version="2.0.0",
org.eclipse.equinox.p2.repository.spi;version="2.0.0"
Require-Bundle: org.eclipse.equinox.common,
- org.eclipse.ecf.filetransfer,
- org.eclipse.ecf,
- org.eclipse.equinox.registry;bundle-version="3.3.0",
- org.eclipse.ecf.provider.filetransfer;bundle-version="3.0.1"
+ org.eclipse.equinox.registry;bundle-version="3.3.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5,
J2SE-1.4,
CDC-1.1/Foundation-1.1
@@ -49,9 +49,10 @@ Import-Package: javax.xml.parsers,
org.eclipse.equinox.security.storage,
org.eclipse.osgi.service.debug,
org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0",
+ org.osgi.framework;version="1.6.0",
org.osgi.service.packageadmin;version="1.2.0",
org.osgi.service.prefs;version="1.0.0",
- org.osgi.util.tracker;version="1.3.0",
+ org.osgi.util.tracker;version="1.4.0",
org.xml.sax,
org.xml.sax.helpers
+Service-Component: OSGI-INF/cacheManager.xml
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/OSGI-INF/updatechecker.xml b/bundles/org.eclipse.equinox.p2.repository/OSGI-INF/cacheManager.xml
index 97a3e7887..d04c8dfb1 100644
--- a/bundles/org.eclipse.equinox.p2.updatechecker/OSGI-INF/updatechecker.xml
+++ b/bundles/org.eclipse.equinox.p2.repository/OSGI-INF/cacheManager.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.updatechecker">
- <implementation class="org.eclipse.equinox.internal.p2.updatechecker.UpdateCheckerComponent"/>
- <service>
- <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
- </service>
- <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateChecker"/>
-</scr:component> \ No newline at end of file
+<?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.repository">
+ <implementation class="org.eclipse.equinox.internal.p2.repository.CacheManagerComponent"/>
+ <service>
+ <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
+ </service>
+ <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.internal.p2.repository.CacheManager"/>
+</scr:component>
diff --git a/bundles/org.eclipse.equinox.p2.repository/build.properties b/bundles/org.eclipse.equinox.p2.repository/build.properties
index 7ac06b41b..82222b857 100644
--- a/bundles/org.eclipse.equinox.p2.repository/build.properties
+++ b/bundles/org.eclipse.equinox.p2.repository/build.properties
@@ -1,19 +1,10 @@
-###############################################################################
-# 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
+ plugin.properties,\
+ OSGI-INF/cacheManager.xml
src.includes = about.html
-javacTarget=jsr14
-javacSource=1.5
+javacSource = 1.5
+javacTarget = jsr14
+source.. = src/
diff --git a/bundles/org.eclipse.equinox.p2.repository/pom.xml b/bundles/org.eclipse.equinox.p2.repository/pom.xml
index 3e15abe1c..df8ce6caf 100644
--- a/bundles/org.eclipse.equinox.p2.repository/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.repository/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse</groupId>
<artifactId>org.eclipse.equinox.p2.repository</artifactId>
- <version>2.0.0.qualifier</version>
+ <version>2.1.0.qualifier</version>
<packaging>eclipse-plugin</packaging>
</project>
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
index c3d91c1ab..a112f8b86 100644
--- 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,15 +10,14 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.persistence;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
import java.io.*;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import javax.xml.parsers.ParserConfigurationException;
import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.VersionRange;
import org.eclipse.osgi.util.NLS;
import org.osgi.framework.BundleContext;
import org.xml.sax.*;
@@ -170,6 +169,9 @@ public class CompositeParser extends XMLParser implements XMLConstants {
}
public void parse(File file) throws IOException {
+ // don't overwrite if we already have a filename/location
+ if (errorContext == null)
+ setErrorContext(file.getAbsolutePath());
parse(new FileInputStream(file));
}
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
index 2a5b1672c..5b14902ee 100644
--- 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,13 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.persistence;
-import org.eclipse.equinox.p2.core.ProvisionException;
-
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.p2.core.ProvisionException;
import org.eclipse.osgi.util.NLS;
/**
@@ -61,6 +60,7 @@ public class CompositeRepositoryIO {
try {
bufferedInput = new BufferedInputStream(input);
CompositeParser repositoryParser = new CompositeParser(Activator.getContext(), Activator.ID, type);
+ repositoryParser.setErrorContext(location.toExternalForm());
repositoryParser.parse(input);
IStatus result = repositoryParser.getStatus();
switch (result.getSeverity()) {
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
index 6f4e4448d..01aa1a396 100644
--- 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,18 +10,16 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.persistence;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
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.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.VersionRange;
import org.eclipse.osgi.util.NLS;
import org.osgi.framework.BundleContext;
import org.osgi.util.tracker.ServiceTracker;
@@ -41,14 +39,14 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants {
protected String bundleId; // parser class bundle id
protected XMLReader xmlReader; // the XML reader for the parser
+ protected String errorContext; // some context of what we are parsing in case there is an error
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;
+ private static ServiceTracker<SAXParserFactory, SAXParserFactory> xmlTracker = null;
public XMLParser(BundleContext context, String pluginId) {
super();
@@ -63,24 +61,16 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants {
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 = new ServiceTracker<SAXParserFactory, SAXParserFactory>(context, SAXParserFactory.class, null);
xmlTracker.open();
}
- return (SAXParserFactory) xmlTracker.getService();
+ return xmlTracker.getService();
}
protected synchronized static void releaseXMLParsing() {
@@ -321,7 +311,7 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants {
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());
+ String value = attributes.getValue(i).trim().intern();
int j;
if ((j = indexOf(required, name)) >= 0) {
result[j] = value;
@@ -469,7 +459,7 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants {
}
protected void processCharacters(String data) {
- this.text = canonicalize(data);
+ this.text = data == null ? null : data.intern();
}
}
@@ -538,6 +528,8 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants {
: " (" + getRootObject() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
if (this.locator != null) {
String name = this.locator.getSystemId();
+ if (errorContext != null && (name == null || name.trim().length() == 0))
+ name = errorContext;
line = this.locator.getLineNumber();
column = this.locator.getColumnNumber();
if (line > 0) {
@@ -735,6 +727,10 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants {
return -1;
}
+ public void setErrorContext(String errorContext) {
+ this.errorContext = errorContext;
+ }
+
// public class BadStateError extends AssertionError {
// private static final long serialVersionUID = 1L; // not serialized
//
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
index 695e2874d..196f09f41 100644
--- 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc and others.
+ * Copyright (c) 2009, 2010 Cloudsmith Inc and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -9,15 +9,12 @@
* Cloudsmith Inc - initial API and implementation
* IBM Corporation - ongoing development
* Genuitec - Bug 291926
+ * Sonatype, Inc. - transport split
******************************************************************************/
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;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle.
@@ -27,143 +24,19 @@ import org.osgi.util.tracker.ServiceTracker;
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;
- }
-
+ Activator.context = aContext;
}
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(Bundle.START_ACTIVATION_POLICY);
- bundles[i].start(Bundle.START_TRANSIENT);
- 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/CacheManager.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java
index 0e4eba8e5..2f05d37ad 100644
--- 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
@@ -8,24 +8,22 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Cloudsmith Inc - additional implementation
+ * Sonatype Inc - additional implementation
*******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
-
-import org.eclipse.equinox.p2.core.ProvisionException;
+package org.eclipse.equinox.internal.p2.repository;
import java.io.*;
import java.net.URI;
-import java.util.*;
+import java.util.EventObject;
+import java.util.HashSet;
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.repository.*;
-import org.eclipse.equinox.internal.p2.repository.Activator;
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.repository.IStateful;
import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.repository.IRepository;
import org.eclipse.osgi.util.NLS;
@@ -45,6 +43,8 @@ public class CacheManager {
private final IAgentLocation agentLocation;
+ private final Transport transport;
+
/**
* IStateful implementation of BufferedOutputStream. Class is used to get the status from
* a download operation.
@@ -67,15 +67,14 @@ public class CacheManager {
}
- public CacheManager(IAgentLocation agentLocation) {
+ public CacheManager(IAgentLocation agentLocation, Transport transport) {
this.agentLocation = agentLocation;
+ this.transport = transport;
}
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<String> knownPrefixes = new HashSet<String>(5);
@@ -132,7 +131,7 @@ public class CacheManager {
// 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));
+ lastModifiedRemote = transport.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) {
@@ -169,15 +168,13 @@ public class CacheManager {
// (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));
+ lastModifiedRemote = transport.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) {
@@ -235,7 +232,7 @@ public class CacheManager {
* @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) {
+ protected File getCache(URI repositoryLocation, String prefix) {
File[] files = getCacheFiles(repositoryLocation, prefix);
if (files[0].exists())
return files[0];
@@ -245,7 +242,7 @@ public class CacheManager {
/**
* Returns the file corresponding to the data area to be used by the cache manager.
*/
- private File getCacheDirectory() {
+ protected File getCacheDirectory() {
return URIUtil.toFile(agentLocation.getDataArea(Activator.ID + "/cache/")); //$NON-NLS-1$
}
@@ -264,75 +261,6 @@ public class CacheManager {
return files;
}
- private RepositoryTransport getTransport() {
- return RepositoryTransport.getInstance();
- }
-
- private 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.
@@ -381,47 +309,45 @@ public class CacheManager {
bus.removeListener(busListener);
}
- private void updateCache(File cacheFile, URI remoteFile, long lastModifiedRemote, SubMonitor submonitor) throws FileNotFoundException, IOException, ProvisionException {
+ protected 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$
- }
- }
+ File downloadDir = new File(cacheFile.getParentFile(), DOWNLOADING);
+ if (!downloadDir.exists())
+ downloadDir.mkdir();
+ File tempFile = new File(downloadDir, cacheFile.getName());
+ // Ensure that the file from a previous download attempt is removed
+ if (tempFile.exists())
+ safeDelete(tempFile);
+
+ tempFile.createNewFile();
- StatefulStream metadata = new StatefulStream(new FileOutputStream(cacheFile, append));
+ StatefulStream stream = null;
+ try {
+ stream = new StatefulStream(new FileOutputStream(tempFile));
+ } catch (Exception e) {
+ throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e));
+ }
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));
+ result = transport.download(remoteFile, stream, 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();
+ result = stream.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();
+ stream.close();
+ // If there was any problem fetching the file, delete the temp file
+ if (result == null || !result.isOK())
+ safeDelete(tempFile);
+ }
+ if (result.isOK()) {
+ if (cacheFile.exists())
+ safeDelete(cacheFile);
+ if (tempFile.renameTo(cacheFile))
+ return;
+ result = new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.CacheManage_ErrorRenamingCache, new Object[] {remoteFile.toString(), tempFile.getAbsolutePath(), cacheFile.getAbsolutePath()}));
}
- 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();
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManagerComponent.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManagerComponent.java
new file mode 100644
index 000000000..5c617e4f2
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManagerComponent.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype, Inc and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.repository;
+
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
+
+public class CacheManagerComponent implements IAgentServiceFactory {
+
+ public Object createService(IProvisioningAgent agent) {
+ final IProvisioningEventBus eventBus = (IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME);
+ CacheManager cache = new CacheManager((IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME), (Transport) agent.getService(Transport.SERVICE_NAME));
+ cache.setEventBus(eventBus);
+ return cache;
+ }
+
+}
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
index d45e858e3..0613b69eb 100644
--- 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, IBM Corporation and others.
+ * Copyright (c) 2009,2010 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
@@ -7,6 +7,7 @@
* Contributors:
* IBM Corporation - Initial API and implementation
* Cloudsmith Inc - Implementation
+ * Sonatype Inc - Ongoing development
******************************************************************************/
package org.eclipse.equinox.internal.p2.repository;
@@ -17,11 +18,9 @@ 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.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.UIServices;
+import org.eclipse.equinox.p2.core.*;
import org.eclipse.equinox.p2.repository.IRepository;
import org.eclipse.equinox.security.storage.*;
@@ -64,7 +63,7 @@ public class Credentials {
* @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 LoginCanceledException when the user cancels the login prompt
* @throws CoreException if the password cannot be read or saved
* @return The authentication info.
*/
@@ -87,7 +86,7 @@ public class Credentials {
* @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 LoginCanceledException - user canceled the prompt for name/password
* @throws CoreException if there is an error
*/
public static UIServices.AuthenticationInfo forLocation(URI location, boolean prompt, UIServices.AuthenticationInfo lastUsed) throws LoginCanceledException, CoreException {
@@ -105,7 +104,7 @@ public class Credentials {
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);
+ throw internalError(e);
}
}
if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
@@ -147,10 +146,10 @@ public class Credentials {
prefNode = securePreferences.node(nodeName);
} catch (IllegalArgumentException e) {
// if the node name is illegal/malformed (should not happen).
- throw RepositoryStatusHelper.internalError(e);
+ throw internalError(e);
} catch (IllegalStateException e) {
// thrown if preference store has been tampered with
- throw RepositoryStatusHelper.internalError(e);
+ throw internalError(e);
}
if (!prompt) {
try {
@@ -174,7 +173,7 @@ public class Credentials {
}
return restoreFromMemory(nodeName);
} catch (StorageException e) {
- throw RepositoryStatusHelper.internalError(e);
+ throw internalError(e);
}
}
// need to prompt user for user name and password
@@ -195,8 +194,8 @@ public class Credentials {
}
UIServices.AuthenticationInfo latest = restoreFromMemory(nodeName);
- if (latest != null && lastUsed != null)
- if (!(latest.getUserName().equals(lastUsed.getUserName()) && latest.getPassword().equals(lastUsed.getPassword())))
+ if (latest != null)
+ if (lastUsed == null || !(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
@@ -257,9 +256,9 @@ public class Credentials {
prefNode.put(IRepository.PROP_PASSWORD, loginDetails.getPassword(), true);
prefNode.flush();
} catch (StorageException e1) {
- throw RepositoryStatusHelper.internalError(e1);
+ throw internalError(e1);
} catch (IOException e) {
- throw RepositoryStatusHelper.internalError(e);
+ throw internalError(e);
}
} else {
// if persisted earlier - the preference should be removed
@@ -274,7 +273,7 @@ public class Credentials {
try {
prefNode.flush();
} catch (IOException e) {
- throw RepositoryStatusHelper.internalError(e);
+ throw internalError(e);
}
}
}
@@ -480,4 +479,14 @@ public class Credentials {
timestamp = System.currentTimeMillis();
}
}
+
+ /**
+ * 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));
+ }
}
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/Messages.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java
index 2ed09a9d3..61d8912b8 100644
--- 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Cloudsmith Inc - additional messages
+ * Sonatype Inc - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.repository;
@@ -16,6 +17,11 @@ 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 CacheManager_AuthenticationFaileFor_0;
+ public static String CacheManager_FailedCommunicationWithRepo_0;
+ public static String CacheManager_Neither_0_nor_1_found;
+ public static String CacheManage_ErrorRenamingCache;
+
public static String artifact_not_found;
public static String io_failedRead;
public static String ecf_configuration_error;
@@ -74,6 +80,9 @@ public class Messages extends NLS {
public static String UnableToRead_0_TooManyAttempts;
public static String UnableToRead_0_UserCanceled;
+
+ public static String RepositoryTransport_failedReadRepo;
+
static {
// initialize resource bundles
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
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
index 6b740e448..08b25ebd0 100644
--- 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
@@ -98,9 +98,11 @@ public class ProgressStatistics {
long amount = 0L;
SortedMap<Long, Long> relevantData = m_recentSpeedMap.headMap(new Long(m_recentSpeedMapKey));
- for (Long rl : relevantData.values()) {
- dur += SPEED_RESOLUTION;
- amount += rl.longValue();
+ if (!relevantData.isEmpty()) {
+ for (Long rl : relevantData.values()) {
+ dur += SPEED_RESOLUTION;
+ amount += rl.longValue();
+ }
}
if (dur >= 1000)
@@ -123,7 +125,10 @@ public class ProgressStatistics {
}
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())});
+ String uriString = m_uri.toString();
+ if (uriString.endsWith(m_fileName))
+ uriString = uriString.substring(0, uriString.lastIndexOf(m_fileName));
+ return m_total != -1 ? NLS.bind(Messages.fetching_0_from_1_2_of_3_at_4, new String[] {m_fileName, uriString, convert(m_current), convert(m_total), convert(getRecentSpeed())}) : NLS.bind(Messages.fetching_0_from_1_2_at_3, new String[] {m_fileName, uriString, convert(m_current), convert(getRecentSpeed())});
}
public void setReportInterval(int reportInterval) {
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatus.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatus.java
deleted file mode 100644
index aae393d0f..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatus.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.repository;
-
-import org.eclipse.equinox.p2.core.ProvisionException;
-
-import java.io.FileNotFoundException;
-import java.net.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.ecf.core.identity.IDCreateException;
-import org.eclipse.ecf.filetransfer.BrowseFileTransferException;
-import org.eclipse.ecf.filetransfer.IncomingFileTransferException;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Utility class to transform transport errors into error messages.
- *
- */
-public class RepositoryStatus {
-
- public static String codeToMessage(int code, String toDownload) {
- switch (code) {
- case 400 :
- return NLS.bind(Messages.TransportErrorTranslator_400, toDownload);
- case 401 :
- return NLS.bind(Messages.TransportErrorTranslator_401, toDownload);
- case 402 :
- return NLS.bind(Messages.TransportErrorTranslator_402, toDownload);
- case 403 :
- return NLS.bind(Messages.TransportErrorTranslator_403, toDownload);
- case 404 :
- return NLS.bind(Messages.TransportErrorTranslator_404, toDownload);
- case 405 :
- return NLS.bind(Messages.TransportErrorTranslator_405, toDownload);
- case 406 :
- return NLS.bind(Messages.TransportErrorTranslator_406, toDownload);
- case 407 :
- return NLS.bind(Messages.TransportErrorTranslator_407, toDownload);
- case 408 :
- return NLS.bind(Messages.TransportErrorTranslator_408, toDownload);
- case 409 :
- return NLS.bind(Messages.TransportErrorTranslator_409, toDownload);
- case 410 :
- return NLS.bind(Messages.TransportErrorTranslator_410, toDownload);
- case 411 :
- return NLS.bind(Messages.TransportErrorTranslator_411, toDownload);
- case 412 :
- return NLS.bind(Messages.TransportErrorTranslator_412, toDownload);
- case 413 :
- return NLS.bind(Messages.TransportErrorTranslator_413, toDownload);
- case 414 :
- return NLS.bind(Messages.TransportErrorTranslator_414, toDownload);
- case 415 :
- return NLS.bind(Messages.TransportErrorTranslator_415, toDownload);
- case 416 :
- return NLS.bind(Messages.TransportErrorTranslator_416, toDownload);
- case 417 :
- return NLS.bind(Messages.TransportErrorTranslator_417, toDownload);
- case 418 :
- return NLS.bind(Messages.TransportErrorTranslator_418, toDownload);
- case 422 :
- return NLS.bind(Messages.TransportErrorTranslator_422, toDownload);
- case 423 :
- return NLS.bind(Messages.TransportErrorTranslator_423, toDownload);
- case 424 :
- return NLS.bind(Messages.TransportErrorTranslator_424, toDownload);
- case 425 :
- return NLS.bind(Messages.TransportErrorTranslator_425, toDownload);
- case 426 :
- return NLS.bind(Messages.TransportErrorTranslator_426, toDownload);
- case 449 :
- return NLS.bind(Messages.TransportErrorTranslator_449, toDownload);
- case 450 :
- return NLS.bind(Messages.TransportErrorTranslator_450, toDownload);
-
- case 500 :
- return NLS.bind(Messages.TransportErrorTranslator_500, toDownload);
- case 501 :
- return NLS.bind(Messages.TransportErrorTranslator_501, toDownload);
- case 502 :
- return NLS.bind(Messages.TransportErrorTranslator_502, toDownload);
- case 503 :
- return NLS.bind(Messages.TransportErrorTranslator_503, toDownload);
- case 504 :
- return NLS.bind(Messages.TransportErrorTranslator_504, toDownload);
- case 505 :
- return NLS.bind(Messages.TransportErrorTranslator_505, toDownload);
- case 506 :
- return NLS.bind(Messages.TransportErrorTranslator_506, toDownload);
- case 507 :
- return NLS.bind(Messages.TransportErrorTranslator_507, toDownload);
- case 508 :
- return NLS.bind(Messages.TransportErrorTranslator_508, toDownload);
- case 510 :
- return NLS.bind(Messages.TransportErrorTranslator_510, toDownload);
-
- default :
- return NLS.bind(Messages.TransportErrorTranslator_UnknownErrorCode, Integer.toString(code), toDownload);
- }
- }
-
- public static DownloadStatus forStatus(IStatus original, URI toDownload) {
- Throwable t = original.getException();
- return forException(t, toDownload);
- }
-
- public static DownloadStatus forException(Throwable t, URI toDownload) {
- if (t instanceof FileNotFoundException || (t instanceof IncomingFileTransferException && ((IncomingFileTransferException) t).getErrorCode() == 404))
- return new DownloadStatus(IStatus.ERROR, Activator.ID, ProvisionException.ARTIFACT_NOT_FOUND, NLS.bind(Messages.artifact_not_found, toDownload), t);
- if (t instanceof ConnectException)
- return new DownloadStatus(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, NLS.bind(Messages.TransportErrorTranslator_UnableToConnectToRepository_0, toDownload), t);
- if (t instanceof UnknownHostException)
- return new DownloadStatus(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_INVALID_LOCATION, NLS.bind(Messages.TransportErrorTranslator_UnknownHost, toDownload), t);
- if (t instanceof IDCreateException) {
- IStatus status = ((IDCreateException) t).getStatus();
- if (status != null && status.getException() != null)
- t = status.getException();
-
- return new DownloadStatus(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_INVALID_LOCATION, NLS.bind(Messages.TransportErrorTranslator_MalformedRemoteFileReference, toDownload), t);
- }
- int code = 0;
-
- // default to report as read repository error
- int provisionCode = ProvisionException.REPOSITORY_FAILED_READ;
-
- if (t instanceof IncomingFileTransferException)
- code = ((IncomingFileTransferException) t).getErrorCode();
- else if (t instanceof BrowseFileTransferException)
- code = ((BrowseFileTransferException) t).getErrorCode();
-
- // Switch on error codes in the HTTP error code range.
- // Note that 404 uses ARTIFACT_NOT_FOUND (as opposed to REPOSITORY_NOT_FOUND, which
- // is determined higher up in the calling chain).
- if (code == 401)
- provisionCode = ProvisionException.REPOSITORY_FAILED_AUTHENTICATION;
- else if (code == 404)
- provisionCode = ProvisionException.ARTIFACT_NOT_FOUND;
-
- // Add more specific translation here
-
- return new DownloadStatus(IStatus.ERROR, Activator.ID, provisionCode, //
- code == 0 ? NLS.bind(Messages.io_failedRead, toDownload) //
- : codeToMessage(code, toDownload.toString()), t);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatusHelper.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatusHelper.java
deleted file mode 100644
index ac3d66bd0..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatusHelper.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc, and other.
- * The code, documentation and other materials contained herein have been
- * licensed under the Eclipse Public License - v 1.0 by the individual
- * copyright holders listed above, as Initial Contributors under such license.
- * The text of such license is available at www.eclipse.org.
- * Contributors:
- * Cloudsmith Inc. - Initial API and implementation
- * IBM Corporation - Original Implementation of checkPermissionDenied
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.repository;
-
-import org.eclipse.equinox.p2.core.ProvisionException;
-
-import java.io.*;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ecf.filetransfer.BrowseFileTransferException;
-import org.eclipse.ecf.filetransfer.IncomingFileTransferException;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * RepositoryStatusHelper is a utility class for processing of exceptions and status.
- */
-public abstract class RepositoryStatusHelper {
-
- private static final long serialVersionUID = 1L;
- protected static final String SERVER_REDIRECT = "Server redirected too many times"; //$NON-NLS-1$
-
- public static IStatus createStatus(String nlsMessage, Object arg) {
- return createExceptionStatus(null, nlsMessage, new Object[] {arg});
- }
-
- public static IStatus createStatus(String nlsMessage, Object arg1, Object arg2) {
- return createExceptionStatus(null, nlsMessage, new Object[] {arg1, arg2});
- }
-
- public static IStatus createStatus(String nlsMessage, Object arg1, Object arg2, Object arg3) {
- return createExceptionStatus(null, nlsMessage, new Object[] {arg1, arg2, arg3});
- }
-
- public static IStatus createStatus(String nlsMessage, Object[] args) {
- return createExceptionStatus(null, nlsMessage, args);
- }
-
- public static IStatus createStatus(String nlsMessage) {
- return createExceptionStatus(null, nlsMessage, new Object[] {});
- }
-
- public static IStatus createExceptionStatus(Throwable cause) {
- return (cause instanceof CoreException) ? ((CoreException) cause).getStatus() : new Status(IStatus.ERROR, Activator.ID, IStatus.OK, cause.getMessage(), cause);
- }
-
- public static IStatus createExceptionStatus(Throwable cause, String nlsMessage, Object[] args) {
- if (args != null && args.length > 0)
- nlsMessage = NLS.bind(nlsMessage, args);
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, nlsMessage, cause);
- }
-
- public static IStatus createExceptionStatus(Throwable cause, String nlsMessage, Object arg1, Object arg2, Object arg3) {
- return createExceptionStatus(cause, nlsMessage, new Object[] {arg1, arg2, arg3});
- }
-
- public static IStatus createExceptionStatus(Throwable cause, String nlsMessage, Object arg1, Object arg2) {
- return createExceptionStatus(cause, nlsMessage, new Object[] {arg1, arg2});
- }
-
- public static IStatus createExceptionStatus(Throwable cause, String nlsMessage, Object arg1) {
- return createExceptionStatus(cause, nlsMessage, new Object[] {arg1});
- }
-
- public static IStatus createExceptionStatus(Throwable cause, String nlsMessage) {
- return createExceptionStatus(cause, nlsMessage, new Object[] {});
- }
-
- public static void deeplyPrint(Throwable e, PrintStream strm, boolean stackTrace) {
- deeplyPrint(e, strm, stackTrace, 0);
- }
-
- public static CoreException fromMessage(String nlsMessage, Object[] args) {
- return fromExceptionMessage(null, nlsMessage, args);
- }
-
- public static CoreException fromMessage(String nlsMessage, Object arg1) {
- return fromExceptionMessage(null, nlsMessage, new Object[] {arg1});
- }
-
- public static CoreException fromMessage(String nlsMessage, Object arg1, Object arg2) {
- return fromExceptionMessage(null, nlsMessage, new Object[] {arg1, arg2});
- }
-
- public static CoreException fromMessage(String nlsMessage, Object arg1, Object arg2, Object arg3) {
- return fromExceptionMessage(null, nlsMessage, new Object[] {arg1, arg2, arg3});
- }
-
- public static CoreException fromMessage(String nlsMessage) {
- return fromExceptionMessage(null, nlsMessage, new Object[] {});
- }
-
- public static CoreException fromExceptionMessage(Throwable cause, String nlsMessage, Object[] args) {
- CoreException ce = new CoreException(createExceptionStatus(cause, nlsMessage, args));
- if (cause != null)
- ce.initCause(cause);
- return ce;
- }
-
- public static CoreException fromExceptionMessage(Throwable cause, String nlsMessage, Object arg1, Object arg2, Object arg3) {
- return fromExceptionMessage(cause, nlsMessage, new Object[] {arg1, arg2, arg3});
- }
-
- public static CoreException fromExceptionMessage(Throwable cause, String nlsMessage, Object arg1, Object arg2) {
- return fromExceptionMessage(cause, nlsMessage, new Object[] {arg1, arg2});
- }
-
- public static CoreException fromExceptionMessage(Throwable cause, String nlsMessage, Object arg1) {
- return fromExceptionMessage(cause, nlsMessage, new Object[] {arg1});
- }
-
- public static CoreException fromExceptionMessage(Throwable cause, String nlsMessage) {
- return fromExceptionMessage(cause, nlsMessage, new Object[] {});
- }
-
- public static Throwable unwind(Throwable t) {
- for (;;) {
- Class<? extends Throwable> tc = t.getClass();
-
- // We don't use instanceof operator since we want
- // the explicit class, not subclasses.
- //
- if (tc != RuntimeException.class && tc != InvocationTargetException.class && tc != IOException.class)
- break;
-
- Throwable cause = t.getCause();
- if (cause == null)
- break;
-
- String msg = t.getMessage();
- if (msg != null && !msg.equals(cause.toString()))
- break;
-
- t = cause;
- }
- return t;
- }
-
- public static CoreException unwindCoreException(CoreException exception) {
- IStatus status = exception.getStatus();
- while (status != null && status.getException() instanceof CoreException) {
- exception = (CoreException) status.getException();
- status = exception.getStatus();
- }
- return exception;
- }
-
- public static CoreException wrap(IStatus status) {
- CoreException e = new CoreException(status);
- Throwable t = status.getException();
- if (t != null)
- e.initCause(t);
- return e;
- }
-
- public static CoreException wrap(Throwable t) {
- t = unwind(t);
- if (t instanceof CoreException)
- return unwindCoreException((CoreException) t);
-
- if (t instanceof OperationCanceledException || t instanceof InterruptedException)
- return new CoreException(Status.CANCEL_STATUS);
-
- String msg = t.toString();
- return fromExceptionMessage(t, msg);
- }
-
- private static void appendLevelString(PrintStream strm, int level) {
- if (level > 0) {
- strm.print("[0"); //$NON-NLS-1$
- for (int idx = 1; idx < level; ++idx) {
- strm.print('.');
- strm.print(level);
- }
- strm.print(']');
- }
- }
-
- private static void deeplyPrint(CoreException ce, PrintStream strm, boolean stackTrace, int level) {
- appendLevelString(strm, level);
- if (stackTrace)
- ce.printStackTrace(strm);
- deeplyPrint(ce.getStatus(), strm, stackTrace, level);
- }
-
- private static void deeplyPrint(IStatus status, PrintStream strm, boolean stackTrace, int level) {
- appendLevelString(strm, level);
- String msg = status.getMessage();
- strm.println(msg);
- Throwable cause = status.getException();
- if (cause != null) {
- strm.print("Caused by: "); //$NON-NLS-1$
- if (stackTrace || !(msg.equals(cause.getMessage()) || msg.equals(cause.toString())))
- deeplyPrint(cause, strm, stackTrace, level);
- }
-
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++)
- deeplyPrint(children[i], strm, stackTrace, level + 1);
- }
- }
-
- private static void deeplyPrint(Throwable t, PrintStream strm, boolean stackTrace, int level) {
- if (t instanceof CoreException)
- deeplyPrint((CoreException) t, strm, stackTrace, level);
- else {
- appendLevelString(strm, level);
- if (stackTrace)
- t.printStackTrace(strm);
- else {
- strm.println(t.toString());
- Throwable cause = t.getCause();
- if (cause != null) {
- strm.print("Caused by: "); //$NON-NLS-1$
- deeplyPrint(cause, strm, stackTrace, level);
- }
- }
- }
- }
-
- /**
- * Check if the given exception represents that a switch to the JRE HTTP Client
- * is required. ECF sets the HTTP status code 477 to indicate this.
- * If the JRE HTTP client is required a JREHttpClientRequiredException is thrown.
- */
- public static void checkJREHttpClientRequired(Throwable t) throws JREHttpClientRequiredException {
- if (t instanceof IncomingFileTransferException) {
- if (((IncomingFileTransferException) t).getErrorCode() == 477)
- throw new JREHttpClientRequiredException();
- } else if (t instanceof BrowseFileTransferException) {
- if (((BrowseFileTransferException) t).getErrorCode() == 477)
- throw new JREHttpClientRequiredException();
- }
-
- }
-
- /**
- * Check if the given exception represents a permission failure (401 for HTTP),
- * and throw a AuthenticationFailedException if a permission failure was encountered.
- */
- public static void checkPermissionDenied(Throwable t) throws AuthenticationFailedException {
- // From Use of File Transfer
- if (t instanceof IncomingFileTransferException) {
- if (((IncomingFileTransferException) t).getErrorCode() == 401)
- throw new AuthenticationFailedException();
- IStatus status = ((IncomingFileTransferException) t).getStatus();
- t = status == null ? t : status.getException();
- // From Use of Browse
- } else if (t instanceof BrowseFileTransferException) {
- if (((BrowseFileTransferException) t).getErrorCode() == 401)
- throw new AuthenticationFailedException();
- IStatus status = ((BrowseFileTransferException) t).getStatus();
- t = status == null ? t : status.getException();
- }
-
- if (t == null || !(t instanceof IOException))
- return;
-
- // TODO: is this needed (for 401) now that ECF throws exceptions with codes?
- // try to figure out if we have a 401 by parsing the exception message
- // There is unfortunately no specific (general) exception for "redirected too many times" - which is commonly
- // caused by a failed login. The message and exception are different in different implementations
- // of http client.
- String m = t.getMessage();
- if (m != null && (m.indexOf(" 401 ") != -1 || m.indexOf(SERVER_REDIRECT) != -1)) //$NON-NLS-1$
- throw new AuthenticationFailedException();
- if ("org.apache.commons.httpclient.RedirectException".equals(t.getClass().getName())) //$NON-NLS-1$
- throw new AuthenticationFailedException();
- }
-
- /**
- * Translates exceptions representing "FileNotFound" into FileNotFoundException.
- * @param t the throwable to check
- * @param toDownload the URI the exception was thrown for
- * @throws FileNotFoundException if 't' represents a file not found
- */
- public static void checkFileNotFound(Throwable t, URI toDownload) throws FileNotFoundException {
- if (t instanceof IncomingFileTransferException) {
- IncomingFileTransferException e = (IncomingFileTransferException) t;
- if (e.getErrorCode() == 404 || e.getErrorCode() == 403 || e.getErrorCode() == 300)
- throw new FileNotFoundException(toDownload.toString());
- }
- if (t instanceof BrowseFileTransferException) {
- BrowseFileTransferException e = (BrowseFileTransferException) t;
- if (e.getErrorCode() == 404 || e.getErrorCode() == 403 || e.getErrorCode() == 300)
- throw new FileNotFoundException(toDownload.toString());
- }
-
- if (t instanceof FileNotFoundException)
- throw (FileNotFoundException) t;
- if (t instanceof CoreException) {
- IStatus status = ((CoreException) t).getStatus();
- Throwable e = status == null ? null : status.getException();
- if (e instanceof FileNotFoundException)
- throw (FileNotFoundException) e;
- }
- }
-
- /**
- * Get default "InternalError" ProvisionException.
- * @param t
- * @return a default "InternalError"
- */
- public static ProvisionException internalError(Throwable t) {
- return new ProvisionException(new Status(IStatus.ERROR, Activator.ID, //
- ProvisionException.INTERNAL_ERROR, Messages.repoMan_internalError, t));
- }
-
- public static IStatus malformedAddressStatus(String address, Throwable t) {
- return new Status(IStatus.ERROR, Activator.ID, //
- ProvisionException.REPOSITORY_INVALID_LOCATION, NLS.bind(Messages.exception_malformedRepoURI, address), t);
-
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTransport.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTransport.java
deleted file mode 100644
index 3ab7b7ade..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.repository.IStateful;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.core.UIServices.AuthenticationInfo;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * RepositoryTransport adapts p2 to ECF file download and file browsing.
- * Download is performed by {@link FileReader}, and file browsing is performed by
- * {@link FileInfoReader}.
- */
-public class RepositoryTransport extends Transport {
- private static RepositoryTransport instance;
-
- /**
- * Returns an shared instance of Generic Transport
- */
- public static synchronized RepositoryTransport getInstance() {
- if (instance == null) {
- instance = new RepositoryTransport();
- }
- return instance;
- }
-
- /**
- * Perform a download, writing into the target output stream. Progress is reported on the
- * monitor. If the <code>target</code> is an instance of {@link IStateful} the resulting status
- * is also set on the target. An IStateful target is updated with status even if this methods
- * throws {@link OperationCanceledException}.
- *
- * @returns IStatus, that is a {@link DownloadStatus} on success.
- * @param toDownload URI of file to download
- * @param target OutputStream where result is written
- * @param startPos the starting position of the download, or -1 for from start
- * @param monitor where progress should be reported
- * @throws OperationCanceledException if the operation was canceled.
- */
- public IStatus download(URI toDownload, OutputStream target, long startPos, IProgressMonitor monitor) {
-
- boolean promptUser = false;
- boolean useJREHttp = false;
- AuthenticationInfo loginDetails = null;
- for (int i = RepositoryPreferences.getLoginRetryCount(); i > 0; i--) {
- FileReader reader = null;
- try {
- loginDetails = Credentials.forLocation(toDownload, promptUser, loginDetails);
- IConnectContext context = (loginDetails == null) ? null : ConnectContextFactory.createUsernamePasswordConnectContext(loginDetails.getUserName(), loginDetails.getPassword());
-
- // perform the download
- reader = new FileReader(context);
- reader.readInto(toDownload, target, startPos, monitor);
-
- // check that job ended ok - throw exceptions otherwise
- IStatus result = reader.getResult();
- if (result.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
index 6eba11a7e..e57216c8a 100644
--- 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,21 +7,68 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - transport split
*******************************************************************************/
package org.eclipse.equinox.internal.p2.repository;
-import java.io.OutputStream;
+import java.io.*;
import java.net.URI;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
public abstract class Transport {
+ public static final String SERVICE_NAME = Transport.class.getName();
+
+ /**
+ * 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 abstract IStatus download(URI toDownload, OutputStream target, long startPos, IProgressMonitor monitor);
+
/**
+ * 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 abstract IStatus download(URI toDownload, OutputStream target, IProgressMonitor 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 abstract InputStream stream(URI toDownload, IProgressMonitor monitor) throws FileNotFoundException, CoreException, AuthenticationFailedException;
+
+ /**
+ * 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 target
- * @param pm
- * @return IStatus describing outcome of the download
+ * @param monitor
+ * @throws OperationCanceledException if the operation was canceled by the user.
+ * @return last modified date (possibly 0)
*/
- public abstract IStatus download(URI toDownload, OutputStream target, IProgressMonitor pm);
+ public abstract long getLastModified(URI toDownload, IProgressMonitor monitor) throws CoreException, FileNotFoundException, AuthenticationFailedException;
+
}
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
index 66e362f27..2e1f20cb5 100644
--- 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,18 +8,19 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Wind River - fix for bug 299227
+ * Sonatype, Inc. - transport split
*******************************************************************************/
package org.eclipse.equinox.internal.p2.repository.helpers;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
+import java.io.*;
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.helpers.*;
-import org.eclipse.equinox.internal.p2.repository.*;
+import org.eclipse.equinox.internal.p2.repository.Activator;
+import org.eclipse.equinox.internal.p2.repository.Transport;
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.RepositoryEvent;
@@ -301,13 +302,12 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager
*/
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$
+ log("Error loading repository extension: " + extension.getUniqueIdentifier(), e); //$NON-NLS-1$
return null;
}
}
@@ -623,13 +623,12 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager
protected IRepository<T> loadRepository(URI location, IProgressMonitor monitor, String type, int flags) throws ProvisionException {
checkValidLocation(location);
- if (monitor == null)
- monitor = new NullProgressMonitor();
+ SubMonitor sub = SubMonitor.convert(monitor, 100);
boolean added = false;
IRepository<T> result = null;
try {
- enterLoad(location, monitor);
+ enterLoad(location, sub.newChild(5));
result = basicGetRepository(location);
if (result != null)
return result;
@@ -638,20 +637,11 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager
//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);
- // get the search order from the server, if it's available
- ByteArrayOutputStream index = new ByteArrayOutputStream();
- LocationProperties locationProperties = null;
- try {
- getTransport().download(getIndexFile(location), index, monitor);
- } catch (Throwable e) {
- // If any exceptions are thrown, just ignore the index file
- }
-
- locationProperties = LocationProperties.create(new ByteArrayInputStream(index.toByteArray()));
- String[] preferredOrder = getPreferredRepositorySearchOrder(locationProperties);
+ LocationProperties indexFile = loadIndexFile(location, sub.newChild(15));
+ String[] preferredOrder = getPreferredRepositorySearchOrder(indexFile);
String[] suffixes = sortSuffixes(getAllSuffixes(), location, preferredOrder);
- SubMonitor sub = SubMonitor.convert(monitor, NLS.bind(Messages.repoMan_adding, location), suffixes.length * 100);
+ sub = SubMonitor.convert(sub, NLS.bind(Messages.repoMan_adding, location), suffixes.length * 100);
ProvisionException failure = null;
try {
for (int i = 0; i < suffixes.length; i++) {
@@ -678,7 +668,7 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager
//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)
+ else if (failure == null || (failure.getStatus().getCode() != ProvisionException.REPOSITORY_FAILED_AUTHENTICATION && failure.getStatus().getCode() != ProvisionException.REPOSITORY_FAILED_READ))
rememberNotFound(location);
if (failure != null)
throw failure;
@@ -694,6 +684,49 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager
}
/**
+ * Fetches the p2.index file from the server. If the file could not be fetched
+ * a NullSafe version is returned.
+ */
+ private LocationProperties loadIndexFile(URI location, IProgressMonitor monitor) {
+ LocationProperties locationProperties = LocationProperties.createEmptyIndexFile();
+ //Handle the case of local repos
+ if ("file".equals(location.getScheme())) { //$NON-NLS-1$
+ InputStream localStream = null;
+ try {
+ try {
+ File indexFile = URIUtil.toFile(getIndexFileURI(location));
+ if (indexFile != null && indexFile.exists() && indexFile.canRead()) {
+ localStream = new FileInputStream(indexFile);
+ locationProperties = LocationProperties.create(localStream);
+ }
+ } catch (URISyntaxException e) {
+ LogHelper.log(new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e));
+ } finally {
+ if (localStream != null)
+ localStream.close();
+ }
+ } catch (IOException e) {
+ //do nothing.
+ }
+ return locationProperties;
+ }
+
+ //Handle non local repos (i.e. not file:)
+ ByteArrayOutputStream index = new ByteArrayOutputStream();
+ IStatus indexFileStatus = null;
+ try {
+ indexFileStatus = getTransport().download(getIndexFileURI(location), index, monitor);
+ } catch (URISyntaxException uriSyntaxException) {
+ LogHelper.log(new Status(IStatus.ERROR, Activator.ID, uriSyntaxException.getMessage(), uriSyntaxException));
+ indexFileStatus = null;
+ }
+ if (indexFileStatus != null && indexFileStatus.isOK())
+ locationProperties = LocationProperties.create(new ByteArrayInputStream(index.toByteArray()));
+
+ return locationProperties;
+ }
+
+ /**
* Basic sanity checking on location argument
*/
private URI checkValidLocation(URI location) {
@@ -1121,7 +1154,7 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager
}
}
- private static URI getIndexFile(URI base) throws URISyntaxException {
+ private static URI getIndexFileURI(URI base) throws URISyntaxException {
final String name = INDEX_FILE;
String spec = base.toString();
if (spec.endsWith(name))
@@ -1133,7 +1166,17 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager
return new URI(spec);
}
- private Transport getTransport() {
- return RepositoryTransport.getInstance();
+ protected Transport getTransport() {
+ return (Transport) agent.getService(Transport.SERVICE_NAME);
+ }
+
+ public void flushCache() {
+ synchronized (repositories) {
+ Collection<RepositoryInfo<T>> repos = repositories.values();
+ for (Iterator<RepositoryInfo<T>> iterator = repos.iterator(); iterator.hasNext();) {
+ RepositoryInfo<T> repositoryInfo = iterator.next();
+ repositoryInfo.repository = null;
+ }
+ }
}
}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/LocationProperties.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/LocationProperties.java
index 716f6d6a2..1b39fd416 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/LocationProperties.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/LocationProperties.java
@@ -51,6 +51,10 @@ public class LocationProperties {
private String[] artifactSearchOrder = new String[0]; // Version 1
private Map<String, Boolean> md5Hashes = null; // Version 1
+ public static LocationProperties createEmptyIndexFile() {
+ return new LocationProperties();
+ }
+
/**
* Creates a LocationProperties Object from an input stream. If the LocationProperties
* could be created, it is returned. If it could not be created, an empty LocationProperties
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
index 15728fe56..4e59267be 100644
--- 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
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
+# Copyright (c) 2007, 2010 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
# Contributors:
# IBM Corporation - initial API and implementation
# Cloudsmith Inc - additional messages
+# Sonatype Inc - ongoing implementation
###############################################################################
artifact_not_found=Artifact not found: {0}.
@@ -18,9 +19,10 @@ ecf_configuration_error=Transport initialization error.
repoMan_internalError=Internal error.
repo_loading = Loading the repository {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.
+CacheManage_ErrorRenamingCache=An error occurred while downloading {0}. The cache file {1} could not be renamed to {1}.
exception_malformedRepoURI = The repository location ({0}) must be a URI.
@@ -71,3 +73,4 @@ 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.
+RepositoryTransport_failedReadRepo=Error while reading from repository: {0}.
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
index 9de78fb8e..9342c6f4e 100644
--- 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
@@ -149,4 +149,40 @@ public class RepositoryEvent extends EventObject {
return isEnabled;
}
+ /*
+ * (non-Javadoc)
+ * @see java.util.EventObject#toString()
+ */
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("RepositoryEvent["); //$NON-NLS-1$
+ switch (kind) {
+ case ADDED :
+ buffer.append("ADDED "); //$NON-NLS-1$
+ break;
+ case CHANGED :
+ buffer.append("CHANGED "); //$NON-NLS-1$
+ break;
+ case DISCOVERED :
+ buffer.append("DISCOVERED "); //$NON-NLS-1$
+ break;
+ case ENABLEMENT :
+ buffer.append("ENABLED "); //$NON-NLS-1$
+ break;
+ case REMOVED :
+ buffer.append("REMOVED "); //$NON-NLS-1$
+ break;
+ }
+ if (type == IRepository.TYPE_ARTIFACT)
+ buffer.append("Artifact "); //$NON-NLS-1$
+ else
+ buffer.append("Metadata "); //$NON-NLS-1$
+ // uri
+ buffer.append(getSource().toString());
+ if (nickname != null)
+ buffer.append("Nickname: " + nickname); //$NON-NLS-1$
+ buffer.append(" Enabled: " + Boolean.toString(isEnabled)); //$NON-NLS-1$
+ buffer.append("] "); //$NON-NLS-1$
+ return buffer.toString();
+ }
}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRepository.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRepository.java
index 35a722aa7..1bccddc73 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRepository.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRepository.java
@@ -13,6 +13,7 @@ package org.eclipse.equinox.p2.repository;
import java.net.URI;
import java.util.Map;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.query.IQueryable;
@@ -204,4 +205,18 @@ public interface IRepository<T> extends IAdaptable, IQueryable<T> {
* @return The old property value, or <code>null</code> if there was no old value
*/
public String setProperty(String key, String value);
+
+ /**
+ * 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
+ * @param monitor A progress monitor use to track progress and cancel the operation. This may
+ * be a long running operation if another process holds the lock on this location
+ * @return The old property value, or <code>null</code> if there was no old value
+ * @since 2.1
+ */
+ public String setProperty(String key, String value, IProgressMonitor monitor);
}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRepositoryManager.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRepositoryManager.java
index 2cb3d22ff..0cbd2492a 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRepositoryManager.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRepositoryManager.java
@@ -112,7 +112,7 @@ public interface IRepositoryManager<T> extends IQueryable<T> {
public IProvisioningAgent getAgent();
/**
- * Returns the artifact repository locations known to the repository manager.
+ * Returns the 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.
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepository.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepository.java
index ae46654d5..28180b72a 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepository.java
@@ -62,15 +62,38 @@ public interface IArtifactRepository extends IRepository<IArtifactKey> {
* content is in this repository and the given descriptor accurately describes
* that content.
* @param descriptor the descriptor to add.
+ * @deprecated See {{@link #addDescriptor(IArtifactDescriptor, IProgressMonitor)}
*/
public void addDescriptor(IArtifactDescriptor descriptor);
/**
+ * 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.
+ * @param monitor A progress monitor use to track progress and cancel the operation. This may
+ * be a long running operation if another process holds the lock on this location
+ * @since 2.1
+ */
+ public void addDescriptor(IArtifactDescriptor descriptor, IProgressMonitor monitor);
+
+ /**
* Add the given artifact descriptors to this repository
* @param descriptors the artifact descriptors to add
+ * @deprecated See {{@link #addDescriptors(IArtifactDescriptor[], IProgressMonitor)}
*/
public void addDescriptors(IArtifactDescriptor[] descriptors);
+ /**
+ * Add the given artifact descriptors to this repository
+ * @param descriptors the artifact descriptors to add
+ * @param monitor A progress monitor use to track progress and cancel the operation. This may
+ * be a long running operation if another process holds the lock on this location
+ * @since 2.1
+ */
+ public void addDescriptors(IArtifactDescriptor[] descriptors, IProgressMonitor monitor);
+
/**
* Returns true if this repository contains the given descriptor.
* @param descriptor the descriptor to query
@@ -151,22 +174,89 @@ public interface IArtifactRepository extends IRepository<IArtifactKey> {
/**
* Remove the all keys, descriptors, and contents from this repository.
+ * @deprecated See {@link #removeAll(IProgressMonitor)}
*/
public void removeAll();
/**
+ * Remove the all keys, descriptors, and contents from this repository.
+ * @param monitor A progress monitor use to track progress and cancel the operation. This may
+ * be a long running operation if another process holds the lock on this location
+ * @since 2.1
+ */
+ public void removeAll(IProgressMonitor monitor);
+
+ /**
* Remove the given descriptor and its corresponding content in this repository.
* @param descriptor the descriptor to remove.
+ * @deprecated See {@link #removeDescriptor(IArtifactDescriptor, IProgressMonitor)}
*/
public void removeDescriptor(IArtifactDescriptor descriptor);
/**
+ * Remove the given descriptor and its corresponding content in this repository.
+ * @param descriptor the descriptor to remove.
+ * @param monitor A progress monitor use to track progress and cancel the operation. This may
+ * be a long running operation if another process holds the lock on this location
+ * @since 2.1
+ */
+ public void removeDescriptor(IArtifactDescriptor descriptor, IProgressMonitor monitor);
+
+ /**
* Remove the given key and all related content and descriptors from this repository.
* @param key the key to remove.
+ * @deprecated See {@link #removeDescriptor(IArtifactKey, IProgressMonitor)}
*/
public void removeDescriptor(IArtifactKey key);
/**
+ * Remove the given key and all related content and descriptors from this repository.
+ * @param key the key to remove.
+ * @param monitor A progress monitor use to track progress and cancel the operation. This may
+ * be a long running operation if another process holds the lock on this location
+ * @since 2.1
+ */
+ public void removeDescriptor(IArtifactKey key, IProgressMonitor monitor);
+
+ /**
+ * Remove the given list of artifact descriptors and their corresponding content
+ * in this repository.
+ * @param descriptors the list of descriptors to remove
+ * @since 2.1
+ * @deprecated See {@link #removeDescriptors(IArtifactDescriptor[], IProgressMonitor)}
+ */
+ public void removeDescriptors(IArtifactDescriptor[] descriptors);
+
+ /**
+ * Remove the given list of artifact descriptors and their corresponding content
+ * in this repository.
+ * @param descriptors the list of descriptors to remove
+ * @param monitor A progress monitor use to track progress and cancel the operation. This may
+ * be a long running operation if another process holds the lock on this location
+ * @since 2.1
+ */
+ public void removeDescriptors(IArtifactDescriptor[] descriptors, IProgressMonitor monitor);
+
+ /**
+ * Remove the given list of keys and all related content and descriptors from this
+ * repository.
+ * @param keys
+ * @since 2.1
+ * @deprecated See {@link #removeDescriptors(IArtifactKey[], IProgressMonitor)}
+ */
+ public void removeDescriptors(IArtifactKey[] keys);
+
+ /**
+ * Remove the given list of keys and all related content and descriptors from this
+ * repository.
+ * @param keys
+ * @param monitor A progress monitor use to track progress and cancel the operation. This may
+ * be a long running operation if another process holds the lock on this location
+ * @since 2.1
+ */
+ public void removeDescriptors(IArtifactKey[] keys, IProgressMonitor monitor);
+
+ /**
* Executes a runnable against this repository. It is up to the repository
* implementor to determine what "batch process" means, for example, it may mean
* that the repository index is not stored until after the runnable completes.
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/AbstractArtifactRepository.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/AbstractArtifactRepository.java
index 692c66fab..a4f2838d4 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/AbstractArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/AbstractArtifactRepository.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -51,26 +51,113 @@ public abstract class AbstractArtifactRepository extends AbstractRepository<IArt
public abstract OutputStream getOutputStream(IArtifactDescriptor descriptor) throws ProvisionException;
+ /**
+ * @since 2.1
+ */
+ public void addDescriptor(IArtifactDescriptor descriptor, IProgressMonitor monitor) {
+ assertModifiable();
+ }
+
+ /**
+ * @deprecated
+ */
public void addDescriptor(IArtifactDescriptor descriptor) {
+ this.addDescriptor(descriptor, new NullProgressMonitor());
+ }
+
+ /**
+ * {@inheritDoc}
+ * @since 2.1
+ */
+ public void addDescriptors(IArtifactDescriptor[] descriptors, IProgressMonitor monitor) {
assertModifiable();
}
+ /**
+ * @deprecated
+ */
public void addDescriptors(IArtifactDescriptor[] descriptors) {
+ this.addDescriptors(descriptors, new NullProgressMonitor());
+ }
+
+ /**
+ * {@inheritDoc}
+ * @since 2.1
+ */
+ public void removeDescriptor(IArtifactDescriptor descriptor, IProgressMonitor monitor) {
assertModifiable();
}
+ /**
+ * @deprecated
+ */
public void removeDescriptor(IArtifactDescriptor descriptor) {
+ this.removeDescriptor(descriptor, new NullProgressMonitor());
+ }
+
+ /**
+ * {@inheritDoc}
+ * @since 2.1
+ */
+ public void removeDescriptors(IArtifactDescriptor[] descriptors, IProgressMonitor monitor) {
+ assertModifiable();
+ }
+
+ /**
+ * {@inheritDoc}
+ * @since 2.1
+ * @deprecated ?? Strange that we added an API and then deprecated it
+ */
+ public void removeDescriptors(IArtifactDescriptor[] descriptors) {
+ this.removeDescriptors(descriptors, new NullProgressMonitor());
+ }
+
+ /**
+ * {@inheritDoc}
+ * @since 2.1
+ */
+ public void removeDescriptor(IArtifactKey key, IProgressMonitor monitor) {
assertModifiable();
}
+ /**
+ * @deprecated
+ */
public void removeDescriptor(IArtifactKey key) {
+ this.removeDescriptor(key, new NullProgressMonitor());
+ }
+
+ /**
+ * {@inheritDoc}
+ * @since 2.1
+ */
+ public void removeDescriptors(IArtifactKey[] keys, IProgressMonitor monitor) {
assertModifiable();
}
- public void removeAll() {
+ /**
+ * {@inheritDoc}
+ * @since 2.1
+ * @deprecated ?? Strange that we added an API and then deprecated it
+ */
+ public void removeDescriptors(IArtifactKey[] keys) {
+ this.removeDescriptors(keys, new NullProgressMonitor());
+ }
+
+ /**
+ * @since 2.1
+ */
+ public void removeAll(IProgressMonitor monitor) {
assertModifiable();
}
+ /**
+ * @deprecated
+ */
+ public void removeAll() {
+ this.removeAll(new NullProgressMonitor());
+ }
+
public boolean equals(Object o) {
if (this == o) {
return true;
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/IMetadataRepository.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/IMetadataRepository.java
index e6633c37f..54654f75e 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/IMetadataRepository.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/IMetadataRepository.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.equinox.p2.repository.metadata;
import java.util.Collection;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.core.IPool;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.repository.*;
import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;
@@ -81,4 +82,17 @@ public interface IMetadataRepository extends IRepository<IInstallableUnit> {
* the execution will be returned in the status.
*/
public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor);
+
+ /**
+ * Cause semantically equivalent IInstallableUnits in the receiver to be
+ * replaced with a shared object from the provided {@link IPool}. New objects are
+ * added to the {@link IPool} as required.
+ * <p>
+ * While the {@link IPool} should be retained to increase the scope of sharing when
+ * calling {@link #compress(IPool)} on subsequent repositories, the {@link IPool} can
+ * be discarded without adversely effecting the receiver.
+ * </p>
+ * @since 2.1
+ */
+ public void compress(IPool<IInstallableUnit> iuPool);
}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/spi/AbstractMetadataRepository.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/spi/AbstractMetadataRepository.java
index b526bb874..92cae1740 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/spi/AbstractMetadataRepository.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/spi/AbstractMetadataRepository.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import java.util.Collection;
import java.util.Map;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.repository.Activator;
+import org.eclipse.equinox.p2.core.IPool;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.metadata.Version;
@@ -151,4 +152,14 @@ public abstract class AbstractMetadataRepository extends AbstractRepository<IIns
return Status.OK_STATUS;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#compress(IPool<IInstallableUnit> iuPool)
+ */
+ /**
+ * @since 2.1
+ */
+ public void compress(IPool<IInstallableUnit> iuPool) {
+ // Default no-op. Subclasses should override as appropriate
+ }
+
}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/AbstractRepository.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/AbstractRepository.java
index e833c1cb8..4317e1a1a 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/AbstractRepository.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/AbstractRepository.java
@@ -12,7 +12,7 @@ package org.eclipse.equinox.p2.repository.spi;
import java.net.URI;
import java.util.Map;
-import org.eclipse.core.runtime.PlatformObject;
+import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.repository.IRepository;
@@ -171,8 +171,9 @@ public abstract class AbstractRepository<T> extends PlatformObject implements IR
/**
* {@inheritDoc}
+ * @since 2.1
*/
- public synchronized String setProperty(String key, String value) {
+ public synchronized String setProperty(String key, String value, IProgressMonitor monitor) {
assertModifiable();
if (key.equals(IRepository.PROP_NAME)) {
String oldName = getName();
@@ -183,6 +184,13 @@ public abstract class AbstractRepository<T> extends PlatformObject implements IR
}
/**
+ * {@inheritDoc}
+ */
+ public synchronized String setProperty(String key, String value) {
+ return this.setProperty(key, value, new NullProgressMonitor());
+ }
+
+ /**
* Sets the provider of this repository
*
* @param provider the repository 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/pom.xml b/bundles/org.eclipse.equinox.p2.sar/pom.xml
deleted file mode 100644
index 1ae60841e..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.sar</artifactId>
- <version>0.1.0</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/DirectByteArrayOutputStream.java b/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/DirectByteArrayOutputStream.java
deleted file mode 100644
index a8cc7f663..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/DirectByteArrayOutputStream.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - bug fixes and enhancements
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.sar;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-
-/**
- * The DirectByteArrayOutputStream discloses its guts (internal byte buffer and
- * byte buffer length) to avoid unnecessary allocation of byte arrays usually
- * involved with toByteArray().
- */
-public class DirectByteArrayOutputStream extends ByteArrayOutputStream {
-
- /**
- * Creates a new direct byte array output stream. The buffer capacity is
- * initially as defined by super class.
- */
- public DirectByteArrayOutputStream() {
- super();
- }
-
- /**
- * Creates a new byte array output stream, with a buffer capacity of the
- * specified size, in bytes.
- *
- * @param size
- * the initial size.
- * @throws IllegalArgumentException
- * if size is negative.
- */
- public DirectByteArrayOutputStream(int size) {
- super(size);
- }
-
- /**
- * Return the actual internal byte buffer.
- *
- * @return internal byte buffer
- */
- public final byte[] getBuffer() {
- return super.buf;
- }
-
- /**
- * Return the actual length of the internal byte buffer.
- *
- * @return actual length of the buffer
- */
- public final int getBufferLength() {
- return super.count;
- }
-
- /**
- * Return an input stream containing all the (shared) bytes this output
- * stream has already consumed.
- *
- * @return ByteArrayInputStream
- */
- public ByteArrayInputStream getInputStream() {
- return new ByteArrayInputStream(super.buf, 0, super.count);
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarConstants.java b/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarConstants.java
deleted file mode 100644
index 1dcbb4ddc..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarConstants.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - bug fixes and enhancements
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.sar;
-
-/**
- * Sar constants
- */
-public interface SarConstants {
-
- /** <code>SARFILE_MARKER</code> */
- String SARFILE_MARKER = "SarFile"; //$NON-NLS-1$
-
- /** <code>SARFILE_VERSION</code> */
- int SARFILE_VERSION = 2;
-
- /**
- * Comment for <code>DEFAULT_ENCODING</code>
- */
- String DEFAULT_ENCODING = "UTF-8"; //$NON-NLS-1$
-
- /**
- * Debug
- */
- boolean DEBUG = false;
-}
diff --git a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarEntry.java b/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarEntry.java
deleted file mode 100644
index 0de0b4b96..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarEntry.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - bug fixes and enhancements
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.sar;
-
-import java.io.IOException;
-import java.util.*;
-import java.util.zip.ZipEntry;
-
-/**
- * A SarEntry is the header information for an entry within a
- * org.eclipse.equinox.p2.sar stream.<br>
- * <b>Note: </b>The setTime() and getTime() methods of ZipEntry (our super
- * class) perform time zone dependent (!) conversions. For our serialization and
- * deserialization the stored time has to be time zone neutral. Therefore it is
- * necessary to invert those calculations. This is also the reason for
- * duplicating the javaToDosTime() and dosToJavaTime() methods.
- */
-public class SarEntry extends ZipEntry {
-
- private boolean isEof;
- private boolean isZip;
-
- /**
- * The name of the eof org.eclipse.equinox.p2.sar entry.
- */
- private static final String EOF_ENTRY_NAME = "<eof-org.eclipse.equinox.p2.sar>"; //$NON-NLS-1$
-
- private static final boolean DEBUG = SarConstants.DEBUG;
-
- /**
- * Creates an eof org.eclipse.equinox.p2.sar entry
- */
- public SarEntry() {
- super(EOF_ENTRY_NAME);
- setMethod(ZipEntry.DEFLATED);
- this.isEof = true;
- this.isZip = false;
- }
-
- /**
- * @param zipEntry
- */
- public SarEntry(ZipEntry zipEntry) {
- super(zipEntry);
- this.isZip = false;
- this.isEof = false;
- }
-
- /**
- * @param zipEntry
- * @param isZip
- */
- public SarEntry(ZipEntry zipEntry, boolean isZip) {
- super(zipEntry);
- this.isZip = isZip;
- this.isEof = false;
- }
-
- /**
- * @param sarInputStream
- * @throws IOException
- */
- public SarEntry(SarInputStream sarInputStream) throws IOException {
- // read name!
- super(sarInputStream.readString());
-
- String comment = sarInputStream.readString();
- long compressedSize = sarInputStream.readLong();
- long crc = sarInputStream.readLong();
- byte[] extra = sarInputStream.readBytes();
- int method = sarInputStream.readInt();
- long size = sarInputStream.readLong();
- long dosTime = sarInputStream.readLong();
- boolean isEof = sarInputStream.readBoolean();
- boolean isZip = sarInputStream.readBoolean();
-
- if (DEBUG) {
- System.out.println(getName() + "," + comment + "," + compressedSize + "," + crc + "," + extra + "," + method + "," + size + "," + dosTime + "," + isEof + "," + isZip);
- }
-
- if (method == ZipEntry.STORED) {
- setCompressedSize(compressedSize);
- setCrc(crc);
- setSize(size);
- }
-
- setComment(comment);
- setExtra(extra);
- setMethod(method);
- setTime(dosToJavaTime(dosTime));
- setEof(isEof);
- setZip(isZip);
- }
-
- /**
- * @param sarOutputStream
- * @throws IOException
- */
- public void writeTo(SarOutputStream sarOutputStream) throws IOException {
- String comment = this.getComment();
- long compressedSize = this.getCompressedSize();
- long crc = this.getCrc();
- byte[] extra = this.getExtra();
- int method = this.getMethod();
- String name = this.getName();
- long size = this.getSize();
- long dosTime = javaToDosTime(this.getTime());
- boolean isZip = this.isZip();
- boolean isEof = this.isEof();
-
- if (DEBUG) {
- System.out.println(name + "," + comment + "," + compressedSize + "," + crc + "," + extra + "," + method + "," + size + "," + dosTime + "," + isEof + "," + isZip);
- }
-
- sarOutputStream.writeString(name);
- sarOutputStream.writeString(comment);
- sarOutputStream.writeLong(compressedSize);
- sarOutputStream.writeLong(crc);
- sarOutputStream.writeBytes(extra);
- sarOutputStream.writeInt(method);
- sarOutputStream.writeLong(size);
- sarOutputStream.writeLong(dosTime);
- sarOutputStream.writeBool(isEof);
- sarOutputStream.writeBool(isZip);
- }
-
- /**
- * Is this the eof org.eclipse.equinox.p2.sar entry?
- *
- * @return the answer
- */
- public boolean isEof() {
- return isEof;
- }
-
- private void setEof(boolean isEof) {
- this.isEof = isEof;
- }
-
- /**
- * @return boolean
- */
- public boolean isZip() {
- return isZip;
- }
-
- /**
- * @param isZip
- */
- private void setZip(boolean isZip) {
- this.isZip = isZip;
- }
-
- /*
- * Converts DOS time to Java time (number of milliseconds since epoch).
- */
- public final static long dosToJavaTime(long dtime) {
- GregorianCalendar cal = new GregorianCalendar((int) (((dtime >> 25) & 0x7f) + 80) + 1900, (int) (((dtime >> 21) & 0x0f) - 1), (int) ((dtime >> 16) & 0x1f), (int) ((dtime >> 11) & 0x1f), (int) ((dtime >> 5) & 0x3f), (int) ((dtime << 1) & 0x3e));
- return cal.getTime().getTime();
- }
-
- /*
- * Converts Java time to DOS time.
- */
- public final static long javaToDosTime(long time) {
- GregorianCalendar cal = new GregorianCalendar();
- cal.setTime(new Date(time));
- int year = cal.get(Calendar.YEAR);
- if (year < 1980)
- return (1 << 21) | (1 << 16);
- int month = cal.get(Calendar.MONTH);
- int date = cal.get(Calendar.DAY_OF_MONTH);
- int hours = cal.get(Calendar.HOUR_OF_DAY);
- int minutes = cal.get(Calendar.MINUTE);
- int seconds = cal.get(Calendar.SECOND);
- return (year - 1980) << 25 | (month + 1) << 21 | date << 16 | hours << 11 | minutes << 5 | seconds >> 1;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarInputStream.java b/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarInputStream.java
deleted file mode 100644
index ea2abef3c..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarInputStream.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - bug fixes and enhancements
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.sar;
-
-import java.io.*;
-
-/**
- * The SarInputStream reads a streaming archive as an InputStream. Methods are
- * provided to position at each successive entry in the archive, and the read
- * each entry as a normal input stream using read().
- */
-public class SarInputStream extends InputStream {
-
- private final DataInputStream dataInputStream;
- private final int version;
- private InputStream contentStream;
-
- /**
- * Constructor for SarInputStream.
- *
- * @param inputStream
- * the input stream to use
- * @throws IOException
- */
- public SarInputStream(InputStream inputStream) throws IOException {
-
- this.dataInputStream = new DataInputStream(inputStream);
-
- // SarFile marker
- String marker = readString();
- if (!marker.equals(SarConstants.SARFILE_MARKER)) {
- throw new IOException("Does not contain org.eclipse.equinox.p2.sar marker.");
- }
-
- // SarFile version
- version = dataInputStream.readInt();
- if (version != SarConstants.SARFILE_VERSION) {
- throw new IOException("Unsupported version.");
- }
- }
-
- /**
- * Closes this stream.
- *
- * @throws IOException
- * on error
- */
- public void close() throws IOException {
- dataInputStream.close();
- }
-
- /**
- * Since we do not support marking just yet, we return false.
- *
- * @return False.
- */
- public boolean markSupported() {
- return false;
- }
-
- /**
- * Since we do not support marking just yet, we do nothing.
- *
- * @param markLimit
- * The limit to mark.
- */
- public void mark(int markLimit) {
- // nothing
- }
-
- /**
- * Since we do not support marking just yet, we do nothing.
- */
- public void reset() {
- // nothing
- }
-
- /**
- * Get the next entry in this org.eclipse.equinox.p2.sar archive. This will skip
- * over any remaining data in the current entry, if there is one, and place
- * the input stream at the header of the next entry, and read the header and
- * instantiate a new SarEntry from the header bytes and return that entry.
- * If there are no more entries in the archive, null will be returned to
- * indicate that the end of the archive has been reached.
- *
- * @return the next SarEntry in the archive, or null.
- * @throws IOException
- * on error
- */
- public SarEntry getNextEntry() throws IOException {
- SarEntry sarEntry = new SarEntry(this);
- if (sarEntry.isEof())
- return null;
-
- byte[] content = readBytes();
- contentStream = new ByteArrayInputStream(content);
- return sarEntry;
-
- }
-
- /**
- * Close the entry.
- *
- * @throws IOException
- */
- public void closeEntry() throws IOException {
- contentStream.close();
- }
-
- /**
- * @return String
- * @throws IOException
- */
- String readString() throws IOException {
- byte[] bytes = readBytes();
- if (bytes == null)
- return null;
-
- return new String(bytes, SarConstants.DEFAULT_ENCODING);
- }
-
- /**
- * @return byte[]
- * @throws IOException
- */
- byte[] readBytes() throws IOException {
- int length = dataInputStream.readInt();
- if (length == -1)
- return null;
-
- byte[] bytes = new byte[length];
- dataInputStream.readFully(bytes, 0, length);
- return bytes;
- }
-
- /**
- * @return int
- * @throws IOException
- */
- int readInt() throws IOException {
- return dataInputStream.readInt();
- }
-
- /**
- * @return boolean
- * @throws IOException
- */
- boolean readBoolean() throws IOException {
- return dataInputStream.readBoolean();
- }
-
- /**
- * @return long
- * @throws IOException
- */
- long readLong() throws IOException {
- return dataInputStream.readLong();
- }
-
- /**
- * Reads a byte from the current tar archive entry.
- *
- * This method simply calls read( byte[], int, int ).
- *
- * @return The byte read, or -1 at EOF.
- * @throws IOException
- * on error
- */
- public int read() throws IOException {
- return contentStream.read();
- }
-
- /**
- * Reads bytes from the current tar archive entry.
- *
- * This method is aware of the boundaries of the current entry in the
- * archive and will deal with them as if they were this stream's start and
- * EOF.
- *
- * @param buffer
- * The buffer into which to place bytes read.
- * @param offset
- * The offset at which to place bytes read.
- * @param numToRead
- * The number of bytes to read.
- * @return The number of bytes read, or -1 at EOF.
- * @throws IOException
- * on error
- */
- public int read(byte[] buffer, int offset, int numToRead) throws IOException {
- return contentStream.read(buffer, offset, numToRead);
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarOutputStream.java b/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarOutputStream.java
deleted file mode 100644
index 650a18e7f..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarOutputStream.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - bug fixes and enhancements
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.sar;
-
-import java.io.*;
-
-/**
- * The SarOutputStream writes a stream archive as an OutputStream. Methods are
- * provided to put entries, and then write their contents by writing to this
- * stream using write().
- */
-public class SarOutputStream extends OutputStream {
-
- private boolean finished;
- private final DataOutputStream dataOutputStream;
- private final DirectByteArrayOutputStream entryContent;
-
- /**
- * @param outputStream
- * @throws IOException
- */
- public SarOutputStream(OutputStream outputStream) throws IOException {
- dataOutputStream = new DataOutputStream(outputStream);
- entryContent = new DirectByteArrayOutputStream(16 * 1024);
- writeString(SarConstants.SARFILE_MARKER);
- dataOutputStream.writeInt(SarConstants.SARFILE_VERSION);
- finished = false;
- }
-
- /**
- * Ends the SAR archive and closes the underlying OutputStream.
- *
- * @see java.io.OutputStream#close()
- */
- // @Override
- public void close() throws IOException {
- finish();
- super.close();
- }
-
- /**
- * Finish this SAR archive but does not close the underlying output stream.
- *
- * @throws IOException
- */
- public void finish() throws IOException {
- if (finished)
- return;
-
- writeEOFRecord();
- finished = true;
- }
-
- /**
- * Put an entry on the output stream. This writes the entry's header record
- * and positions the output stream for writing the contents of the entry.
- * Once this method is called, the stream is ready for calls to write() to
- * write the entry's contents. Once the contents are written, closeEntry()
- * <B>MUST </B> be called to ensure that all buffered data is completely
- * written to the output stream.
- *
- * @param entry
- * the SarEntry to be written to the archive.
- * @throws IOException
- */
- public void putNextEntry(SarEntry entry) throws IOException {
- entry.writeTo(this);
- }
-
- /**
- * Close an entry. This method MUST be called for all file entries that
- * contain data. The reason is that we must buffer data written to the
- * stream in order to satisfy the buffer's record based writes. Thus, there
- * may be data fragments still being assembled that must be written to the
- * output stream before this entry is closed and the next entry written.
- *
- * @throws IOException
- */
- public void closeEntry() throws IOException {
- writeBytes(entryContent.getBuffer(), entryContent.getBufferLength());
- entryContent.reset();
- }
-
- /**
- * @param s
- * @throws IOException
- */
- void writeString(String s) throws IOException {
- byte[] bytes = null;
- if (s != null)
- bytes = s.getBytes(SarConstants.DEFAULT_ENCODING);
-
- writeBytes(bytes);
- }
-
- /**
- * @param bytes
- * @throws IOException
- */
- void writeBytes(byte[] bytes) throws IOException {
- writeBytes(bytes, bytes != null ? bytes.length : -1);
- }
-
- /**
- * @param bytes
- * @throws IOException
- */
- void writeBytes(byte[] bytes, int length) throws IOException {
- if (bytes != null) {
- dataOutputStream.writeInt(length);
- dataOutputStream.write(bytes, 0, length);
- } else {
- dataOutputStream.writeInt(-1);
- }
- }
-
- /**
- * @param v
- * @throws IOException
- */
- void writeInt(int v) throws IOException {
- dataOutputStream.writeInt(v);
- }
-
- /**
- * @param bool
- * @throws IOException
- */
- public void writeBool(boolean bool) throws IOException {
- dataOutputStream.writeBoolean(bool);
- }
-
- /**
- * @param v
- * @throws IOException
- */
- void writeLong(long v) throws IOException {
- dataOutputStream.writeLong(v);
- }
-
- /**
- * Writes a byte to the current org.eclipse.equinox.p2.sar archive entry.
- *
- * @param b
- * the byte written.
- * @throws IOException
- *
- * @see java.io.OutputStream#write(int)
- */
- public void write(int b) throws IOException {
- byte[] bytes = new byte[1];
- bytes[0] = (byte) b;
- entryContent.write(bytes);
- }
-
- /**
- * Writes bytes to the current org.eclipse.equinox.p2.sar archive entry.
- *
- * @param bytes
- * The buffer to write to the archive.
- * @throws IOException
- *
- * @see java.io.OutputStream#write(byte[])
- */
- public void write(byte[] bytes) throws IOException {
- entryContent.write(bytes, 0, bytes.length);
- }
-
- /**
- * Writes bytes to the current org.eclipse.equinox.p2.sar archive entry.
- *
- * @param bytes
- * The buffer to write to the archive.
- * @param offset
- * The offset in the buffer from which to get bytes.
- * @param numToWrite
- * The number of bytes to write.
- *
- * @throws IOException
- *
- * @see java.io.OutputStream#write(byte[], int, int)
- */
- public void write(byte[] bytes, int offset, int numToWrite) throws IOException {
- entryContent.write(bytes, offset, numToWrite);
- }
-
- /**
- * Write an EOF (end of archive) entry to the org.eclipse.equinox.p2.sar archive.
- *
- * @throws IOException
- */
- private void writeEOFRecord() throws IOException {
- SarEntry eofEntry = new SarEntry();
- eofEntry.writeTo(this);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarUtil.java b/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarUtil.java
deleted file mode 100644
index 9b23ba914..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarUtil.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - bug fixes and enhancements
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.sar;
-
-import java.io.*;
-import java.util.zip.*;
-
-/**
- * Helper class for converting Zips/Jars to Sars and vice versa.
- */
-public class SarUtil {
-
- private static final int BUFFER_SIZE = 8 * 1024;
- private static final boolean DEBUG = SarConstants.DEBUG;
-
- /**
- *
- */
- private SarUtil() {
- // utility class
- }
-
- /**
- * Normalize the given zip/jar.
- *
- * @param zipSource
- * @param zipTarget
- * @throws IOException
- */
- public static void normalize(File zipSource, File zipTarget) throws IOException {
- File tempSar = File.createTempFile("temp", ".sar");
- try {
- zipToSar(zipSource, tempSar);
- sarToZip(tempSar, zipTarget);
- } finally {
- tempSar.delete();
- }
- }
-
- /**
- * Normalize the given zip/jar.
- *
- * @param zipSource
- * @param zipTarget
- * @throws IOException
- */
- public static void normalize(InputStream zipSource, OutputStream zipTarget) throws IOException {
- DirectByteArrayOutputStream tempSar = new DirectByteArrayOutputStream();
- zipToSar(zipSource, tempSar);
- sarToZip(tempSar.getInputStream(), zipTarget);
- }
-
- /**
- * @param zipFile
- * @throws IOException
- */
- public static void zipToSar(File zipFile, File sarFile) throws IOException {
- InputStream zipInputStream = new BufferedInputStream(new FileInputStream(zipFile));
- OutputStream sarOutputStream = new BufferedOutputStream(new FileOutputStream(sarFile));
- SarUtil.zipToSar(zipInputStream, sarOutputStream);
- }
-
- /**
- * @param zippedInputStream
- * @param saredOutputStream
- * @throws IOException
- */
- public static void zipToSar(InputStream zippedInputStream, OutputStream saredOutputStream) throws IOException {
- zipToSar(zippedInputStream, true, saredOutputStream, true);
- }
-
- /**
- * @param zippedInputStream
- * @param closeIn
- * @param saredOutputStream
- * @param closeOut
- * @throws IOException
- */
- public static void zipToSar(InputStream zippedInputStream, boolean closeIn, OutputStream saredOutputStream, boolean closeOut) throws IOException {
- zipToSarNoClose(zippedInputStream, saredOutputStream);
-
- if (closeIn)
- zippedInputStream.close();
- if (closeOut)
- saredOutputStream.close();
- }
-
- /**
- * @param sarFile
- * @param zipFile
- * @throws IOException
- */
- public static void sarToZip(File sarFile, File zipFile) throws IOException {
- InputStream saredInputStream = new BufferedInputStream(new FileInputStream(sarFile));
- OutputStream zippedOutputStream = new BufferedOutputStream(new FileOutputStream(zipFile));
-
- sarToZip(saredInputStream, zippedOutputStream);
- }
-
- /**
- * @param saredInputStream
- * @param zippedOutputStream
- * @throws IOException
- */
- public static void sarToZip(InputStream saredInputStream, OutputStream zippedOutputStream) throws IOException {
- sarToZip(saredInputStream, true, zippedOutputStream, true);
- }
-
- /**
- * @param saredInputStream
- * @param closeIn
- * @param zippedOutputStream
- * @param closeOut
- * @throws IOException
- */
- public static void sarToZip(InputStream saredInputStream, boolean closeIn, OutputStream zippedOutputStream, boolean closeOut) throws IOException {
- sarToZipNoClose(saredInputStream, zippedOutputStream);
-
- if (closeIn)
- saredInputStream.close();
- if (closeOut)
- zippedOutputStream.close();
- }
-
- /**
- * @param zippedInputStream
- * @param saredOutputStream
- * @throws IOException
- */
- private static void zipToSarNoClose(InputStream zippedInputStream, OutputStream saredOutputStream) throws IOException {
-
- ZipInputStream zipInputStream = new ZipInputStream(zippedInputStream);
- SarOutputStream sarOutputStream = new SarOutputStream(saredOutputStream);
-
- ZipEntry zipEntry;
- byte[] buf = new byte[BUFFER_SIZE];
- while ((zipEntry = zipInputStream.getNextEntry()) != null) {
- boolean isZip = isZip(zipEntry);
- SarEntry sarEntry = new SarEntry(zipEntry, isZip);
- sarOutputStream.putNextEntry(sarEntry);
- if (isZip) {
- zipToSarNoClose(zipInputStream, sarOutputStream);
- } else {
- int read;
- while ((read = zipInputStream.read(buf)) != -1) {
- if (DEBUG) {
- System.out.println("Content: " + new String(buf, 0, read));
- }
- sarOutputStream.write(buf, 0, read);
- }
- }
- zipInputStream.closeEntry();
- sarOutputStream.closeEntry();
- }
- sarOutputStream.finish();
- }
-
- /**
- * @param saredInputStream
- * @param zippedOutputStream
- * @throws IOException
- */
- private static void sarToZipNoClose(InputStream saredInputStream, OutputStream zippedOutputStream) throws IOException {
-
- SarInputStream sarInputStream = new SarInputStream(saredInputStream);
- ZipOutputStream zipOutputStream = new ZipOutputStream(zippedOutputStream);
-
- SarEntry sarEntry;
- byte[] buf = new byte[BUFFER_SIZE];
- while ((sarEntry = sarInputStream.getNextEntry()) != null) {
- ZipEntry zipEntry = new ZipEntry(sarEntry);
- zipOutputStream.putNextEntry(zipEntry);
- if (sarEntry.isZip()) {
- sarToZipNoClose(sarInputStream, zipOutputStream);
- } else {
- int read;
- while ((read = sarInputStream.read(buf)) != -1) {
- if (DEBUG) {
- System.out.println("Content: " + new String(buf, 0, read));
- }
- zipOutputStream.write(buf, 0, read);
- }
- }
- sarInputStream.closeEntry();
- zipOutputStream.closeEntry();
- }
-
- zipOutputStream.finish();
- }
-
- private static boolean isZip(ZipEntry zipEntry) {
- String name = zipEntry.getName().toLowerCase();
- return name.endsWith(".zip") || name.endsWith(".jar");
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/build.properties b/bundles/org.eclipse.equinox.p2.tests.discovery/build.properties
index 23b466377..16fc97f5d 100644
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/build.properties
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/build.properties
@@ -15,6 +15,5 @@ bin.includes = META-INF/,\
about.html,\
plugin.xml,\
plugin.properties,\
- testdata/,\
- test.xml
+ testdata/
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/test.xml b/bundles/org.eclipse.equinox.p2.tests.discovery/test.xml
deleted file mode 100644
index bc26f5862..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/test.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0"?>
-<project name="p2 Automated Tests" default="run" basedir=".">
-
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="eclipse-home" value="${basedir}/../../" />
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test/library.xml" />
- <property name="p2discovery_location" value="${eclipse-home}/p2_discovery_data_dir" />
- <property name="plugin-name" value="org.eclipse.equinox.p2.tests.discovery" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- </target>
-
- <!-- This target holds code to cleanup the testing environment after the tests -->
- <!-- have been run. You can use this to delete temporary files that are created. -->
- <target name="cleanup">
- <delete dir="${p2discovery_location}" quiet="true" />
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen after all -->
- <!-- the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml" />
- <property name="output-file" value="${plugin-name}.xml" />
- </ant>
- </target>
-
- <!-- This target runs the performance test suites. Any actions that need to happen after all -->
- <!-- the tests have been run should go here. -->
- <!--
- <target name="performance" depends="init,performance-suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml" />
- <property name="output-file" value="${plugin-name}.xml" />
- </ant>
- </target>
- -->
-
- <target name="p2Tests" depends="init,cleanup">
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${p2discovery_location}" />
- <property name="plugin-name" value="org.eclipse.equinox.p2.tests.discovery" />
- <property name="classname" value="org.eclipse.equinox.p2.tests.discovery.AllDiscoveryTests" />
- </ant>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite" depends="p2Tests" />
-
- <!-- This target defines the performance tests that need to be run. -->
- <!--
- <target name="performance-suite" depends="p2PerformanceTests" />
- -->
-
- <target name="p2PerformanceTests">
- <!-- TODO -->
- </target>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.tests.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/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.tests.optimizers/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index e1f95f076..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,343 +0,0 @@
-#Tue May 27 11:30:06 EDT 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.tests.optimizers/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 56bcc3e9b..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:58:07 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests.optimizers/META-INF/MANIFEST.MF
deleted file mode 100644
index bac5607b5..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,28 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: p2 Optimizers Test Plug-in
-Bundle-SymbolicName: org.eclipse.equinox.p2.tests.optimizers;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Bundle-Activator: org.eclipse.equinox.p2.tests.optimizers.TestActivator
-Export-Package: org.eclipse.equinox.p2.tests.artifact.optimizers;version="2.0.0",
- org.eclipse.equinox.p2.tests.artifact.processors;version="2.0.0",
- org.eclipse.equinox.p2.tests.sar;version="2.0.0"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="3.4.0",
- org.junit;bundle-version="3.8.2"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Import-Package: ie.wombat.jbdiff,
- org.eclipse.equinox.internal.p2.artifact.optimizers,
- org.eclipse.equinox.internal.p2.artifact.optimizers.jardelta,
- org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff,
- org.eclipse.equinox.internal.p2.artifact.optimizers.pack200,
- org.eclipse.equinox.internal.p2.artifact.processors.jardelta,
- org.eclipse.equinox.internal.p2.artifact.processors.jbdiff,
- org.eclipse.equinox.internal.p2.artifact.processors.pack200,
- org.eclipse.equinox.internal.p2.artifact.repository,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.metadata,
- org.eclipse.equinox.internal.p2.sar,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.osgi.framework;version="1.4.0"
-Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/build.properties b/bundles/org.eclipse.equinox.p2.tests.optimizers/build.properties
deleted file mode 100644
index 826f51f8b..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- testData/
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/pom.xml b/bundles/org.eclipse.equinox.p2.tests.optimizers/pom.xml
deleted file mode 100644
index 9e0f200d9..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.tests.optimizers</artifactId>
- <version>1.0.100.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/AllTests.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/AllTests.java
deleted file mode 100644
index 6c28f5203..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/AllTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.optimizers;
-
-import junit.framework.*;
-
-/**
- * Performs all automated director tests.
- */
-public class AllTests extends TestCase {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(JBDiffStepTest.class);
- suite.addTestSuite(JBDiffZipStepTest.class);
- suite.addTestSuite(Pack200OptimizerTest.class);
- suite.addTestSuite(JarDeltaOptimizerTest.class);
- suite.addTestSuite(Bug209233Test.class);
- return suite;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Bug209233Test.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Bug209233Test.java
deleted file mode 100644
index 4c3ac6ac8..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Bug209233Test.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.optimizers;
-
-import ie.wombat.jbdiff.JBDiff;
-import java.io.*;
-import java.util.Arrays;
-import junit.framework.TestCase;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-
-/**
- * ... <code>Bug209233Test</code> ...
- */
-public class Bug209233Test extends TestCase {
-
- // public void testGenerateTestDataDiff() throws IOException {
- // File predecessor = TestData.getTempFile("sar", "org.eclipse.jdt_3.2.0.v20060605-1400.sar");
- // File current = TestData.getTempFile("sar", "org.eclipse.jdt_3.3.0.v20070607-1300.sar");
- // File diff = File.createTempFile("org.eclipse.jdt_3.2.0-3.3.0~", ".jbdiff");
- // JBDiff.bsdiff(predecessor, current, diff);
- // }
-
- public void testDiffJdt32SarToJdt33Sar() throws IOException {
-
- InputStream current = TestData.get("sar", "org.eclipse.jdt_3.3.0.v20070607-1300.sar");
- ByteArrayOutputStream currentBS = new ByteArrayOutputStream();
- FileUtils.copyStream(current, true, currentBS, true);
- byte[] currentBytes = currentBS.toByteArray();
-
- InputStream predecessor = TestData.get("sar", "org.eclipse.jdt_3.2.0.v20060605-1400.sar");
- ByteArrayOutputStream predecessorBS = new ByteArrayOutputStream();
- FileUtils.copyStream(predecessor, true, predecessorBS, true);
- byte[] predecessorBytes = predecessorBS.toByteArray();
-
- byte[] actualBytes = JBDiff.bsdiff(predecessorBytes, predecessorBytes.length, currentBytes, currentBytes.length);
-
- InputStream expected = TestData.get("optimizers", "org.eclipse.jdt_3.2.0-3.3.0.jbdiff");
- ByteArrayOutputStream expectedBS = new ByteArrayOutputStream();
- FileUtils.copyStream(expected, true, expectedBS, true);
- byte[] expectedBytes = expectedBS.toByteArray();
-
- assertEquals("Different lengths.", expectedBytes.length, actualBytes.length);
- assertTrue("Different bytes.", Arrays.equals(expectedBytes, actualBytes));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffStepTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffStepTest.java
deleted file mode 100644
index ca98076fa..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffStepTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.optimizers;
-
-import java.io.*;
-import java.util.Arrays;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff.JBDiffStep;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-import org.eclipse.equinox.p2.tests.artifact.processors.ArtifactRepositoryMock;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-
-/**
- * Test the <code>JBDiffStepTest</code> processing step.
- */
-public class JBDiffStepTest extends OptimizerTest {
-
- // public void testGenerateTestDataExe32To33() throws IOException {
- // File exe32 = TestData.getTempFile("optimizers", "eclipse-3.2.exe");
- // File exe33 = TestData.getTempFile("optimizers", "eclipse-3.3.exe");
- // File diff = File.createTempFile("eclipse-3.2-3.3~", ".jbdiff");
- // JBDiff.bsdiff(exe32, exe33, diff);
- // }
-
- /**
- * Test diffing the launcher.
- *
- * @throws IOException
- */
- public void testDiffEclipseExe32to33() throws IOException {
-
- IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/eclipse-3.2.exe");
- MockableJBDiffStep differ = new MockableJBDiffStep(repoMock);
- IProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0", true);
- IArtifactKey key = new ArtifactKey("cl", "id1", Version.create("1.1"));
- ArtifactDescriptor descriptor = new ArtifactDescriptor(key);
- differ.initialize(getAgent(), stepDescriptor, descriptor);
-
- ByteArrayOutputStream destination = new ByteArrayOutputStream();
- differ.link(destination, new NullProgressMonitor());
-
- InputStream inputStream = TestData.get("optimizers", "eclipse-3.3.exe");
- FileUtils.copyStream(inputStream, true, differ, true);
-
- inputStream = TestData.get("optimizers", "eclipse-3.2-3.3.jbdiff");
- ByteArrayOutputStream expected = new ByteArrayOutputStream();
- FileUtils.copyStream(inputStream, true, expected, true);
- assertTrue(Arrays.equals(expected.toByteArray(), destination.toByteArray()));
- }
-
- /**
- * Need to inject a repository!
- */
- private static class MockableJBDiffStep extends JBDiffStep {
- public MockableJBDiffStep(IArtifactRepository repository) {
- super(repository);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffZipStepTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffZipStepTest.java
deleted file mode 100644
index 9a0a818e7..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffZipStepTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.optimizers;
-
-import java.io.*;
-import java.util.Arrays;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff.JBDiffZipStep;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-import org.eclipse.equinox.p2.tests.artifact.processors.ArtifactRepositoryMock;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-
-/**
- * Test the <code>JBDiffZipTest</code> processing step.
- */
-public class JBDiffZipStepTest extends OptimizerTest {
-
- /**
- * Test diffing the <b>normalized</b> jars. This is indicated by the extension ".njar".
- *
- * @throws IOException
- */
- public void testDiffJdt32to33() throws IOException {
- IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/org.eclipse.jdt_3.2.0.v20060605-1400.njar");
- MockableJBDiffZipStep differ = new MockableJBDiffZipStep(repoMock);
- IProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0", true);
- IArtifactKey key = new ArtifactKey("cl", "id1", Version.create("1.1"));
- ArtifactDescriptor descriptor = new ArtifactDescriptor(key);
- differ.initialize(getAgent(), stepDescriptor, descriptor);
-
- ByteArrayOutputStream destination = new ByteArrayOutputStream();
- differ.link(destination, new NullProgressMonitor());
-
- InputStream inputStream = TestData.get("optimizers", "org.eclipse.jdt_3.3.0.v20070607-1300.njar");
- FileUtils.copyStream(inputStream, true, differ, true);
-
- inputStream = TestData.get("optimizers", "org.eclipse.jdt_3.2.0-3.3.0.jbdiff");
- ByteArrayOutputStream expected = new ByteArrayOutputStream();
- FileUtils.copyStream(inputStream, true, expected, true);
-
- assertTrue("Different diff bytes.", Arrays.equals(expected.toByteArray(), destination.toByteArray()));
- }
-
- /**
- * Need to inject a repository!
- */
- private static class MockableJBDiffZipStep extends JBDiffZipStep {
- public MockableJBDiffZipStep(IArtifactRepository repository) {
- super(repository);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JarDeltaOptimizerTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JarDeltaOptimizerTest.java
deleted file mode 100644
index ea17138c8..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JarDeltaOptimizerTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.optimizers;
-
-import java.io.*;
-import java.util.zip.ZipInputStream;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.jardelta.JarDeltaOptimizerStep;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-import org.eclipse.equinox.p2.tests.artifact.processors.ArtifactRepositoryMock;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-
-/**
- * Test the <code>JarDelta</code> processing step.
- */
-public class JarDeltaOptimizerTest extends OptimizerTest {
-
- // public void testPrepare() throws IOException {
- // IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/testdata_1.0.0.1.jar");
- // ProcessingStep step = new MockableJarDeltaOptimizerStep(repoMock);
- // ProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0.0.1", true);
- // IArtifactKey key = new ArtifactKey("ns", "cl", "id1", Version.create("1.0.0.2"));
- // ArtifactDescriptor descriptor = new ArtifactDescriptor(key);
- // step.initialize(stepDescriptor, descriptor);
- // ByteArrayOutputStream destination = new ByteArrayOutputStream();
- // step.link(destination, new NullProgressMonitor());
- //
- // InputStream inputStream = TestActivator.getContext().getBundle().getEntry("testData/optimizers/testdata_1.0.0.2.jar").openStream();
- // FileUtils.copyStream(inputStream, true, step, true);
- // destination.close();
- //
- // inputStream = new ByteArrayInputStream(destination.toByteArray());
- // FileOutputStream file = new FileOutputStream("d:/jardelta.jar");
- // FileUtils.copyStream(inputStream, true, file, true);
- // }
-
- public void testOptimization() throws IOException {
- IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/testdata_1.0.0.1.jar");
- ProcessingStep step = new MockableJarDeltaOptimizerStep(repoMock);
- IProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0.0.1", true);
- IArtifactKey key = new ArtifactKey("cl", "id1", Version.create("1.0.0.2"));
- ArtifactDescriptor descriptor = new ArtifactDescriptor(key);
- step.initialize(getAgent(), stepDescriptor, descriptor);
- ByteArrayOutputStream destination = new ByteArrayOutputStream();
- step.link(destination, new NullProgressMonitor());
-
- InputStream inputStream = TestData.get("optimizers", "testdata_1.0.0.2.jar");
- FileUtils.copyStream(inputStream, true, step, true);
- destination.close();
-
- inputStream = TestData.get("optimizers", "testdata_1.0.0.1-2.jar");
- ByteArrayOutputStream expected = new ByteArrayOutputStream();
- FileUtils.copyStream(inputStream, true, expected, true);
-
- ZipInputStream expectedJar = new ZipInputStream(new ByteArrayInputStream(expected.toByteArray()));
- ZipInputStream testJar = new ZipInputStream(new ByteArrayInputStream(destination.toByteArray()));
- TestData.assertEquals(expectedJar, testJar);
- expectedJar.close();
- testJar.close();
- }
-
- /**
- * Need to inject a repository!
- */
- private static class MockableJarDeltaOptimizerStep extends JarDeltaOptimizerStep {
- public MockableJarDeltaOptimizerStep(IArtifactRepository repository) {
- super(repository);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/OptimizerTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/OptimizerTest.java
deleted file mode 100644
index 7e9bb3987..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/OptimizerTest.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.eclipse.equinox.p2.tests.artifact.optimizers;
-
-import junit.framework.TestCase;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.Activator;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-
-public abstract class OptimizerTest extends TestCase {
- public OptimizerTest(String name) {
- super(name);
- }
-
- public OptimizerTest() {
- super();
- }
-
- protected static IProvisioningAgent getAgent() {
- //get the global agent for the currently running system
- return (IProvisioningAgent) ServiceHelper.getService(Activator.getContext(), IProvisioningAgent.SERVICE_NAME);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Pack200OptimizerTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Pack200OptimizerTest.java
deleted file mode 100644
index 2401e14c3..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Pack200OptimizerTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.optimizers;
-
-import java.io.*;
-import java.util.Arrays;
-import junit.framework.TestCase;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.pack200.Pack200OptimizerStep;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.p2.tests.optimizers.TestActivator;
-import org.osgi.framework.Bundle;
-
-public class Pack200OptimizerTest extends TestCase {
-
- public Pack200OptimizerTest(String name) {
- super(name);
- }
-
- public Pack200OptimizerTest() {
- super("");
- }
-
- // public void testPrepare() throws IOException {
- // // Setup the step
- // ProcessingStep step = new Pack200OptimizerStep();
- // FileOutputStream destination = new FileOutputStream("c:/packed.pack.gz");
- // step.link(destination, new NullProgressMonitor());
- //
- // // drive the source data through the step
- // Bundle bundle = TestActivator.getContext().getBundle();
- // InputStream inputStream = bundle.getEntry("testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar").openStream();
- // FileUtils.copyStream(inputStream, true, step, true);
- //
- // destination.close();
- // }
-
- public void testPack() throws IOException {
- // Setup the step
- ProcessingStep step = new Pack200OptimizerStep();
- ByteArrayOutputStream destination = new ByteArrayOutputStream();
- step.link(destination, new NullProgressMonitor());
-
- // drive the source data through the step
- Bundle bundle = TestActivator.getContext().getBundle();
- InputStream inputStream = bundle.getEntry("testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar").openStream();
- FileUtils.copyStream(inputStream, true, step, true);
-
- assertTrue("Failure: " + step.getStatus().getMessage(), step.getStatus().isOK());
-
- // Get the test data. The Sun 1.6.0_01 JRE produces a different packed file
- // then the IBM V5 JRE, so both versions of the test data are maintained.
- // TODO: investigate this? Is the difference spurious? Are there differences
- // in the pack200 results for other JREs? Do we need a more general
- // solution to the problem?
- String javaVersion = System.getProperty("java.version");
- boolean is1_6 = javaVersion.compareTo("1.6") > 0;
-
- inputStream = bundle.getEntry(is1_6 ? "testData/optimizers/1_6/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz" : "testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz").openStream();
-
- ByteArrayOutputStream expected = new ByteArrayOutputStream();
- FileUtils.copyStream(inputStream, true, expected, true);
-
- // Compare
- assertTrue(Arrays.equals(expected.toByteArray(), destination.toByteArray()));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/AllTests.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/AllTests.java
deleted file mode 100644
index 226e965c5..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/AllTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.processors;
-
-import junit.framework.*;
-
-/**
- * Performs all automated director tests.
- */
-public class AllTests extends TestCase {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(JBPatchStepTest.class);
- suite.addTestSuite(JBPatchZipStepTest.class);
- suite.addTestSuite(JarDeltaProcessorTest.class);
- return suite;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/ArtifactRepositoryMock.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/ArtifactRepositoryMock.java
deleted file mode 100644
index 49d63936f..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/ArtifactRepositoryMock.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.processors;
-
-import java.io.*;
-import java.lang.reflect.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.tests.optimizers.TestActivator;
-
-/**
- * Mock the getArtifact() needed to locate the predecessor.
- */
-public class ArtifactRepositoryMock implements InvocationHandler {
-
- private String artifactResource;
-
- public static IArtifactRepository getMock(String artifactResource) {
- return (IArtifactRepository) Proxy.newProxyInstance(IArtifactRepository.class.getClassLoader(), new Class[] {IArtifactRepository.class}, new ArtifactRepositoryMock(artifactResource));
- }
-
- private ArtifactRepositoryMock(String artifactResource) {
- this.artifactResource = artifactResource;
- }
-
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- if (!method.getName().equals("getArtifact"))
- throw new RuntimeException("Unexpected usage!");
-
- return getArtifact((IArtifactDescriptor) args[0], (OutputStream) args[1], (IProgressMonitor) args[2]);
- }
-
- private IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- InputStream inputStream;
- try {
- inputStream = TestActivator.getContext().getBundle().getEntry(artifactResource).openStream();
- FileUtils.copyStream(inputStream, true, destination, true);
- return Status.OK_STATUS;
- } catch (IOException e) {
- return new Status(IStatus.ERROR, TestActivator.PI, ":-(", e);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchStepTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchStepTest.java
deleted file mode 100644
index 1405e12c2..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchStepTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.processors;
-
-import java.io.*;
-import java.util.Arrays;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.artifact.processors.jbdiff.JBPatchStep;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-import org.eclipse.equinox.p2.tests.artifact.optimizers.OptimizerTest;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-
-/**
- * Test the <code>JBPatchStep</code>
- *
- */
-public class JBPatchStepTest extends OptimizerTest {
-
- public void testPatchEclipseExe32to33() throws IOException {
- IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/eclipse-3.2.exe");
- ProcessingStep patcher = new MockableJBPatchStep(repoMock);
- IProcessingStepDescriptor descriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0", true);
- IArtifactKey key = new ArtifactKey("cl", "id1", Version.create("1.1"));
- ArtifactDescriptor context = new ArtifactDescriptor(key);
- patcher.initialize(getAgent(), descriptor, context);
-
- ByteArrayOutputStream destination = new ByteArrayOutputStream();
- patcher.link(destination, new NullProgressMonitor());
-
- InputStream inputStream = TestData.get("optimizers", "eclipse-3.2-3.3.jbdiff");
- FileUtils.copyStream(inputStream, true, patcher, true);
-
- inputStream = TestData.get("optimizers", "eclipse-3.3.exe");
- ByteArrayOutputStream expected = new ByteArrayOutputStream();
- FileUtils.copyStream(inputStream, true, expected, true);
- assertTrue(Arrays.equals(expected.toByteArray(), destination.toByteArray()));
- }
-
- /**
- * Need to inject a repository!
- */
- private static class MockableJBPatchStep extends JBPatchStep {
- public MockableJBPatchStep(IArtifactRepository repository) {
- super.repository = repository;
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchZipStepTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchZipStepTest.java
deleted file mode 100644
index c5c921916..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchZipStepTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.processors;
-
-import java.io.*;
-import java.util.Arrays;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.artifact.processors.jbdiff.JBPatchZipStep;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-import org.eclipse.equinox.p2.tests.artifact.optimizers.OptimizerTest;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-
-/**
- * Test the <code>JBPatchZipStep</code> processing step.
- */
-public class JBPatchZipStepTest extends OptimizerTest {
-
- // /**
- // * This is a disabled "unit test" that was used to generate the data needed for real test.
- // * @throws IOException
- // */
- // public void testGenerateTestData() throws IOException {
- //
- // File sar32 = TestData.getTempFile("sar", "org.eclipse.jdt_3.2.0.v20060605-1400.sar");
- // File sar33 = TestData.getTempFile("sar", "org.eclipse.jdt_3.3.0.v20070607-1300.sar");
- //
- // File diff = File.createTempFile("org.eclipse.jdt_3.2.0-3.3.0", ".jbdiff");
- // JBDiff.bsdiff(sar32, sar33, diff);
- // }
-
- /**
- * Test patching the <b>normalized</b> jars. This is indicated by the extension ".njar".
- *
- * @throws IOException
- */
- public void testPatchOrgEclipseJdt32to33() throws IOException {
-
- IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/org.eclipse.jdt_3.2.0.v20060605-1400.njar");
- ProcessingStep patcher = new MockableJBPatchZipStep(repoMock);
- IProcessingStepDescriptor descriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0", true);
- IArtifactKey key = new ArtifactKey("cl", "id1", Version.create("1.1"));
- ArtifactDescriptor context = new ArtifactDescriptor(key);
- patcher.initialize(getAgent(), descriptor, context);
-
- ByteArrayOutputStream destination = new ByteArrayOutputStream();
- patcher.link(destination, new NullProgressMonitor());
-
- InputStream inputStream = TestData.get("optimizers", "org.eclipse.jdt_3.2.0-3.3.0.jbdiff");
- FileUtils.copyStream(inputStream, true, patcher, true);
-
- inputStream = TestData.get("optimizers", "org.eclipse.jdt_3.3.0.v20070607-1300.njar");
- ByteArrayOutputStream expected = new ByteArrayOutputStream();
- FileUtils.copyStream(inputStream, true, expected, true);
-
- assertTrue("Different resulting njar.", Arrays.equals(expected.toByteArray(), destination.toByteArray()));
- }
-
- /**
- * Need to inject a repository!
- */
- private static class MockableJBPatchZipStep extends JBPatchZipStep {
- public MockableJBPatchZipStep(IArtifactRepository repository) {
- super.repository = repository;
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JarDeltaProcessorTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JarDeltaProcessorTest.java
deleted file mode 100644
index 7ec8dc3c7..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JarDeltaProcessorTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * compeople AG (Stefan Liebig)
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.processors;
-
-import java.io.*;
-import java.util.zip.ZipInputStream;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.artifact.processors.jardelta.JarDeltaProcessorStep;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-import org.eclipse.equinox.p2.tests.artifact.optimizers.OptimizerTest;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-
-public class JarDeltaProcessorTest extends OptimizerTest {
-
- public JarDeltaProcessorTest(String name) {
- super(name);
- }
-
- public JarDeltaProcessorTest() {
- super("");
- }
-
- public void testProcessing() throws IOException {
- IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/testdata_1.0.0.1.jar");
- ProcessingStep step = new MockableJarDeltaProcessorStep(repoMock);
- IProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0.0.1", true);
- IArtifactKey key = new ArtifactKey("cl", "id1", Version.create("1.0.0.2"));
- ArtifactDescriptor descriptor = new ArtifactDescriptor(key);
- step.initialize(getAgent(), stepDescriptor, descriptor);
- ByteArrayOutputStream destination = new ByteArrayOutputStream();
- step.link(destination, new NullProgressMonitor());
-
- InputStream inputStream = TestData.get("optimizers", "testdata_1.0.0.1-2.jar");
- FileUtils.copyStream(inputStream, true, step, true);
- destination.close();
-
- inputStream = TestData.get("optimizers", "testdata_1.0.0.2.jar");
- ByteArrayOutputStream expected = new ByteArrayOutputStream();
- FileUtils.copyStream(inputStream, true, expected, true);
-
- ZipInputStream expectedJar = new ZipInputStream(new ByteArrayInputStream(expected.toByteArray()));
- ZipInputStream testJar = new ZipInputStream(new ByteArrayInputStream(destination.toByteArray()));
- TestData.assertEquals(expectedJar, testJar);
- expectedJar.close();
- testJar.close();
- }
-
- /**
- * Need to inject a repository!
- */
- private static class MockableJarDeltaProcessorStep extends JarDeltaProcessorStep {
- public MockableJarDeltaProcessorStep(IArtifactRepository repository) {
- super();
- this.repository = repository;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/AutomatedTests.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/AutomatedTests.java
deleted file mode 100644
index 54771de98..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/AutomatedTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.optimizers;
-
-import junit.framework.*;
-
-/**
- * @since 1.0
- */
-public class AutomatedTests extends TestCase {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AutomatedTests.class.getName());
- suite.addTest(org.eclipse.equinox.p2.tests.artifact.optimizers.AllTests.suite());
- suite.addTest(org.eclipse.equinox.p2.tests.artifact.processors.AllTests.suite());
- suite.addTest(org.eclipse.equinox.p2.tests.sar.AllTests.suite());
- return suite;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/TestActivator.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/TestActivator.java
deleted file mode 100644
index cd6876056..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/TestActivator.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.optimizers;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * @since 1.0
- */
-public class TestActivator implements BundleActivator {
-
- public static final String PI = "org.eclipse.equinox.p2.tests.optimizers"; //$NON-NLS-1$
- private static BundleContext bundleContext;
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- bundleContext = context;
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- bundleContext = null;
- }
-
- public static BundleContext getContext() {
- return bundleContext;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/TestData.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/TestData.java
deleted file mode 100644
index 21567a481..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/TestData.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * Red Hat, Inc. (Andrew Overholt) - add getFile method
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.optimizers;
-
-import java.io.*;
-import java.util.*;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-import junit.framework.Assert;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-
-/**
- * <code>TestData</code> helps with handling of test data.
- */
-public class TestData {
-
- private static final String TEST_DATA_ROOT_FOLDER = "testData";
- private static final String PREFIX_SEPERATOR = "~";
-
- /**
- * Get an input stream from the resource testDataName within the folder
- * testDataFolder of the testData folder of this project.
- * @param testDataFolder
- * @param testDataName
- * @return input stream for the test data
- * @throws IOException
- */
- public static InputStream get(String testDataFolder, String testDataName) throws IOException {
- return new BufferedInputStream(TestActivator.getContext().getBundle().getEntry(TEST_DATA_ROOT_FOLDER + "/" + testDataFolder + "/" + testDataName).openStream());
- }
-
- /**
- * Get a File from the resource testDataName within the folder
- * testDataFolder of the testData folder of this project.
- * @param testDataFolder
- * @return test data File
- * @throws IOException
- */
- public static File getFile(String testDataFolder, String testDataName) throws IOException {
- return new File(FileLocator.toFileURL(TestActivator.getContext().getBundle().getEntry(TEST_DATA_ROOT_FOLDER + "/" + testDataFolder + "/" + testDataName)).getPath());
- }
-
- /**
- * Create a temporary file for the test data. The temporary file will be deleted
- * when the jvm exists. If testDataName contains an extension this extension will
- * be used as suffix for the temporary file.
- * @param testDataFolder
- * @param testDataName
- * @return temporary file with test data
- * @throws IOException
- */
- public static File getTempFile(String testDataFolder, String testDataName) throws IOException {
- File temp = createTempFile(testDataName);
- OutputStream out = new FileOutputStream(temp);
- FileUtils.copyStream(get(testDataFolder, testDataName), true, out, true);
- return temp;
- }
-
- /**
- * Create a temporary file. This file will be deleted if the jvm exits.
- * If testDataName contains an extension this extension will be used as
- * suffix for the temporary file.
- * @param testDataName
- * @return temporary file
- * @throws IOException
- */
- public static File createTempFile(String testDataName) throws IOException {
- int i = testDataName.lastIndexOf('.');
- File temp = (i == -1) ? File.createTempFile(testDataName + PREFIX_SEPERATOR, ".tmp") : File.createTempFile(testDataName.substring(0, i) + PREFIX_SEPERATOR, testDataName.substring(i));
- temp.deleteOnExit();
- return temp;
- }
-
- /**
- * Assert equality of files.
- * @param expected
- * @param actual
- * @throws IOException
- */
- public static void assertEquals(File expected, File actual) throws IOException {
- Assert.assertEquals("Files have different lengths.", expected.length(), actual.length());
- TestData.assertEquals(new BufferedInputStream(new FileInputStream(expected)), new BufferedInputStream(new FileInputStream(actual)));
- }
-
- /**
- * Assert equality of input streams.
- * @param expected
- * @param actual
- * @throws IOException
- */
- public static void assertEquals(InputStream expected, InputStream actual) throws IOException {
- try {
- int readExpected = 0;
- int readActual = 0;
- int count = 0;
- while (readActual != -1 && readExpected != -1) {
- readActual = actual.read();
- readExpected = expected.read();
- Assert.assertEquals("Different bytes at " + count, readExpected, readActual);
- count++;
- }
- } finally {
- if (expected != null)
- expected.close();
- if (actual != null)
- actual.close();
- }
- }
-
- /**
- * Assert equality of zip input streams.
- * @param input1
- * @param input2
- * @throws IOException
- */
- public static void assertEquals(ZipInputStream input1, ZipInputStream input2) throws IOException {
- Map jar1 = getEntries(input1);
- Map jar2 = getEntries(input2);
- for (Iterator i = jar1.keySet().iterator(); i.hasNext();) {
- String name = (String) i.next();
- Object[] file1 = (Object[]) jar1.get(name);
- Object[] file2 = (Object[]) jar2.remove(name);
- Assert.assertNotNull(file2);
-
- ZipEntry entry1 = (ZipEntry) file1[0];
- ZipEntry entry2 = (ZipEntry) file2[0];
- // compare the entries
- Assert.assertTrue(entry1.getName().equals(entry2.getName()));
- Assert.assertTrue(entry1.getSize() == entry2.getSize());
- // TODO for now skip over the timestamp as they seem to be different
- // assertTrue(entry1.getTime() == entry2.getTime());
- Assert.assertTrue(entry1.isDirectory() == entry2.isDirectory());
- Assert.assertTrue(entry1.getCrc() == entry2.getCrc());
- Assert.assertTrue(entry1.getMethod() == entry2.getMethod());
-
- // check the content of the entries
- Assert.assertTrue(Arrays.equals((byte[]) file1[1], (byte[]) file2[1]));
- }
-
- // ensure that we have consumed all of the entries in the second JAR
- Assert.assertTrue(jar2.size() == 0);
- }
-
- private static Map getEntries(ZipInputStream input) throws IOException {
- Map result = new HashMap();
- while (true) {
- ZipEntry entry = input.getNextEntry();
- if (entry == null)
- return result;
-
- ByteArrayOutputStream content = new ByteArrayOutputStream();
- FileUtils.copyStream(input, false, content, true);
- input.closeEntry();
- result.put(entry.getName(), new Object[] {entry, content.toByteArray()});
- }
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/AllTests.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/AllTests.java
deleted file mode 100644
index 172fd682f..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/AllTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.sar;
-
-import junit.framework.*;
-
-/**
- * Performs all sar tests.
- */
-public class AllTests extends TestCase {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(DirectByteArrayOutputStreamTest.class);
- suite.addTestSuite(SarTest.class);
- suite.addTestSuite(SarEntryTest.class);
- return suite;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/DirectByteArrayOutputStreamTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/DirectByteArrayOutputStreamTest.java
deleted file mode 100644
index 576a8ec4d..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/DirectByteArrayOutputStreamTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.sar;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.util.Arrays;
-import junit.framework.TestCase;
-import org.eclipse.equinox.internal.p2.sar.DirectByteArrayOutputStream;
-
-/**
- * Test the <code>DirectByteArrayOutputStream</code>
- */
-public class DirectByteArrayOutputStreamTest extends TestCase {
-
- private static final String JUST11BYTES = "just11bytes";
- private static final int ELEVEN = JUST11BYTES.getBytes().length;
-
- /**
- * Test the constraints of the DBAOS
- *
- * @throws IOException
- */
- public void testDBAOSConstraints() throws IOException {
- DirectByteArrayOutputStream out = new DirectByteArrayOutputStream(1024);
- out.write(JUST11BYTES.getBytes());
- assertEquals(ELEVEN, out.getBufferLength());
- assertEquals(ELEVEN, out.toByteArray().length);
- assertNotSame(out.toByteArray(), out.getBuffer());
- assertEquals(1024, out.getBuffer().length);
- assertEquals(JUST11BYTES, new String(out.getBuffer(), 0, out.getBufferLength()));
- ByteArrayInputStream in = out.getInputStream();
- assertEquals(ELEVEN, in.available());
- byte[] elevenBytes = new byte[ELEVEN];
- in.read(elevenBytes);
- assertTrue(Arrays.equals(JUST11BYTES.getBytes(), elevenBytes));
- assertEquals(-1, in.read());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/SarEntryTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/SarEntryTest.java
deleted file mode 100644
index 6ea0c2f8a..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/SarEntryTest.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.sar;
-
-import junit.framework.TestCase;
-import org.eclipse.equinox.internal.p2.sar.SarEntry;
-
-public class SarEntryTest extends TestCase {
-
- public void testJavaToDosTimeAndBack() {
- final long minute = 1000l * 60l;
- long now = (System.currentTimeMillis() / minute) * minute;
- long dos = SarEntry.javaToDosTime(now);
- assertEquals(now, SarEntry.dosToJavaTime(dos));
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/SarTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/SarTest.java
deleted file mode 100644
index 8b8dcc383..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/SarTest.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.sar;
-
-import java.io.*;
-import java.util.Arrays;
-import junit.framework.TestCase;
-import org.eclipse.equinox.internal.p2.sar.SarUtil;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-
-/**
- * Test the sar stuff.
- */
-public class SarTest extends TestCase {
-
- // public void testGenerateTestDataNJarAndSarFromJar32() throws IOException {
- // InputStream jar32 = TestData.get("sar", "org.eclipse.jdt_3.2.0.v20060605-1400.jar");
- // generateNJarAndSar("org.eclipse.jdt_3.2.0.v20060605-1400", jar32);
- // }
- //
- // public void testGenerateTestDataNJarAndSarFromJar33() throws IOException {
- // InputStream jar32 = TestData.get("sar", "org.eclipse.jdt_3.3.0.v20070607-1300.jar");
- // generateNJarAndSar("org.eclipse.jdt_3.3.0.v20070607-1300", jar32);
- // }
- //
- // private void generateNJarAndSar(String name, InputStream jar) throws IOException {
- // File njar = File.createTempFile(name, ".njar");
- // OutputStream njarOut = new BufferedOutputStream(new FileOutputStream(njar));
- //
- // SarUtil.normalize(jar, njarOut);
- //
- // File sar = File.createTempFile(name, ".sar");
- // SarUtil.zipToSar(njar, sar);
- // }
-
- public void testJarToSarForJdt320() throws IOException {
- InputStream jdt320Jar = TestData.get("optimizers", "org.eclipse.jdt_3.2.0.v20060605-1400.njar");
- InputStream jdt320Sar = TestData.get("sar", "org.eclipse.jdt_3.2.0.v20060605-1400.sar");
- doJarToSar(jdt320Jar, jdt320Sar);
- }
-
- public void testSarToJarForJdt320() throws IOException {
- InputStream jdt320Sar = TestData.get("sar", "org.eclipse.jdt_3.2.0.v20060605-1400.sar");
- InputStream jdt320Jar = TestData.get("optimizers", "org.eclipse.jdt_3.2.0.v20060605-1400.njar");
- doSarToJar(jdt320Sar, jdt320Jar);
- }
-
- public void testJarToSarForJdt330() throws IOException {
- InputStream jdt330Jar = TestData.get("optimizers", "org.eclipse.jdt_3.3.0.v20070607-1300.njar");
- InputStream jdt330Sar = TestData.get("sar", "org.eclipse.jdt_3.3.0.v20070607-1300.sar");
- doJarToSar(jdt330Jar, jdt330Sar);
- }
-
- public void testSarToJarForJdt330() throws IOException {
- InputStream jdt330Sar = TestData.get("sar", "org.eclipse.jdt_3.3.0.v20070607-1300.sar");
- InputStream jdt330Jar = TestData.get("optimizers", "org.eclipse.jdt_3.3.0.v20070607-1300.njar");
- doSarToJar(jdt330Sar, jdt330Jar);
- }
-
- /**
- * @throws IOException
- */
- private void doJarToSar(InputStream jar, InputStream expectedSar) throws IOException {
- File sar = TestData.createTempFile("doJarToSar.sar");
- OutputStream sarOut = new BufferedOutputStream(new FileOutputStream(sar));
-
- SarUtil.zipToSar(jar, sarOut);
-
- InputStream sarIn = new BufferedInputStream(new FileInputStream(sar));
- TestData.assertEquals(sarIn, expectedSar);
- }
-
- /**
- * @throws IOException
- */
- private void doSarToJar(InputStream sar, InputStream expectedJar) throws IOException {
- File jar = TestData.createTempFile("doSarToJar.jar");
- OutputStream jarOut = new BufferedOutputStream(new FileOutputStream(jar));
-
- SarUtil.sarToZip(sar, jarOut);
-
- InputStream jarIn = new BufferedInputStream(new FileInputStream(jar));
- TestData.assertEquals(jarIn, expectedJar);
- }
-
- /**
- * @throws IOException
- */
- public void testZipToSarAndBack() throws IOException {
- File originalZipFile = TestData.getTempFile("sar", "test.zip");
- File sarFile = TestData.createTempFile("test.sar");
- File recreatedZipFile = TestData.createTempFile("test.zip");
-
- long before = System.currentTimeMillis();
- SarUtil.zipToSar(originalZipFile, sarFile);
- System.out.println("zipToSar took: " + (System.currentTimeMillis() - before));
-
- before = System.currentTimeMillis();
- SarUtil.sarToZip(sarFile, recreatedZipFile);
- System.out.println("sarToZip took: " + (System.currentTimeMillis() - before));
-
- TestData.assertEquals(originalZipFile, recreatedZipFile);
- }
-
- /**
- * @throws IOException
- */
- public void testNormalizeOnFiles() throws IOException {
- File alienZip = TestData.getTempFile("sar", "alien.zip");
-
- File normalizedAlienZip = TestData.createTempFile("normalizedalien.zip");
- SarUtil.normalize(alienZip, normalizedAlienZip);
-
- assertTrue(alienZip.length() != normalizedAlienZip.length());
-
- File renormalizedAlienZip = TestData.createTempFile("renormalizedalien.zip");
- SarUtil.normalize(normalizedAlienZip, renormalizedAlienZip);
-
- TestData.assertEquals(normalizedAlienZip, renormalizedAlienZip);
- }
-
- /**
- * @throws IOException
- */
- public void testNormalizeOnStreames() throws IOException {
- InputStream alienZip = TestData.get("sar", "alien.zip");
- ByteArrayOutputStream normalizedAlienZip = new ByteArrayOutputStream();
- ByteArrayOutputStream renormalizedAlienZip = new ByteArrayOutputStream();
- try {
- SarUtil.normalize(alienZip, normalizedAlienZip);
-
- SarUtil.normalize(new ByteArrayInputStream(normalizedAlienZip.toByteArray()), renormalizedAlienZip);
-
- assertTrue(Arrays.equals(normalizedAlienZip.toByteArray(), renormalizedAlienZip.toByteArray()));
- } finally {
- if (alienZip != null)
- alienZip.close();
- }
-
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/jarprocessor.jar.pack.gz b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/jarprocessor.jar.pack.gz
deleted file mode 100644
index f2df489b2..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/jarprocessor.jar.pack.gz
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/1_6/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/1_6/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz
deleted file mode 100644
index 9f52ad35f..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/1_6/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.2-3.3.jbdiff b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.2-3.3.jbdiff
deleted file mode 100644
index deac744b8..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.2-3.3.jbdiff
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.2.exe b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.2.exe
deleted file mode 100644
index 7826d1ed8..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.2.exe
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.3.exe b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.3.exe
deleted file mode 100644
index c5cd8f038..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.3.exe
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar
deleted file mode 100644
index 0c809eeed..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz
deleted file mode 100644
index b586d3cc8..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.2.0-3.3.0.jbdiff b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.2.0-3.3.0.jbdiff
deleted file mode 100644
index b920d53bb..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.2.0-3.3.0.jbdiff
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.2.0.v20060605-1400.njar b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.2.0.v20060605-1400.njar
deleted file mode 100644
index 41ee47bcc..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.2.0.v20060605-1400.njar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.3.0.v20070607-1300.njar b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.3.0.v20070607-1300.njar
deleted file mode 100644
index 9deec2f0e..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.3.0.v20070607-1300.njar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.1-2.jar b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.1-2.jar
deleted file mode 100644
index 71a546b02..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.1-2.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.1.jar b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.1.jar
deleted file mode 100644
index 49e7f90a2..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.1.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.2.jar b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.2.jar
deleted file mode 100644
index 3515b0f46..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.2.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/alien.zip b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/alien.zip
deleted file mode 100644
index 9872214cc..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/alien.zip
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.2.0.v20060605-1400.jar b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.2.0.v20060605-1400.jar
deleted file mode 100644
index d674aef01..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.2.0.v20060605-1400.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.2.0.v20060605-1400.sar b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.2.0.v20060605-1400.sar
deleted file mode 100644
index 0abfe3604..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.2.0.v20060605-1400.sar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.3.0.v20070607-1300.jar b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.3.0.v20070607-1300.jar
deleted file mode 100644
index 9deec2f0e..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.3.0.v20070607-1300.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.3.0.v20070607-1300.sar b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.3.0.v20070607-1300.sar
deleted file mode 100644
index 842bb71f7..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.3.0.v20070607-1300.sar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/test.zip b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/test.zip
deleted file mode 100644
index dde8b8440..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/test.zip
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.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 d282a1283..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,352 +0,0 @@
-#Fri Dec 12 15:45:18 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.recreateModifiedClassFileInOutputFolder=ignore
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=disabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests.verifier/META-INF/MANIFEST.MF
deleted file mode 100644
index 964030a65..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Test Install Verifier
-Bundle-SymbolicName: org.eclipse.equinox.p2.tests.verifier;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.tests.verifier.Activator
-Export-Package: org.eclipse.equinox.internal.p2.tests.verifier;x-internal:=true
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.equinox.p2.core
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)"
-Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/build.properties b/bundles/org.eclipse.equinox.p2.tests.verifier/build.properties
deleted file mode 100644
index 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 4d6dee3a4..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java
+++ /dev/null
@@ -1,309 +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.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.osgi.framework.internal.core.Constants;
-import org.eclipse.osgi.service.resolver.*;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.Bundle;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-/**
- * Application which verifies an install.
- *
- * @since 1.0
- */
-public class VerifierApplication implements IApplication {
-
- private static final File DEFAULT_PROPERTIES_FILE = new File("verifier.properties"); //$NON-NLS-1$
- private static final String ARG_PROPERTIES = "-verifier.properties"; //$NON-NLS-1$
- private IProvisioningAgent agent;
- private Properties properties = null;
- private List ignoreResolved = null;
-
- /*
- * Create and return an error status with the given message.
- */
- private static IStatus createError(String message) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, message);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext context) throws Exception {
- String[] args = (String[]) context.getArguments().get(IApplicationContext.APPLICATION_ARGS);
- processArguments(args);
-
- agent = (IProvisioningAgent) ServiceHelper.getService(Activator.getBundleContext(), IProvisioningAgent.SERVICE_NAME);
-
- IStatus result = verify();
- if (!result.isOK()) {
- // PrintWriter out = new PrintWriter(new FileWriter(new File("c:/tmp/dropins-debug.txt")));
- PrintWriter out = new PrintWriter(new OutputStreamWriter(System.err));
- out.println("Error from dropin verifier application: " + result.getMessage()); //$NON-NLS-1$
- Throwable t = result.getException();
- if (t != null)
- t.printStackTrace(out);
- out.close();
- LogHelper.log(result);
- }
- return result.isOK() ? IApplication.EXIT_OK : new Integer(13);
- }
-
- /*
- * Go through the command-line args and pull out interesting ones
- * for later consumption.
- */
- private void processArguments(String[] args) {
- if (args == null)
- return;
-
- for (int i = 1; i < args.length; i++) {
- if (ARG_PROPERTIES.equals(args[i - 1])) {
- String filename = args[i];
- if (filename.startsWith("-")) //$NON-NLS-1$
- continue;
- try {
- properties = readProperties(new File(filename));
- } catch (IOException e) {
- // TODO
- e.printStackTrace();
- // fall through to load default
- }
- continue;
- }
- }
-
- // problems loading properties file or none specified so look for a default
- if (properties == null) {
- try {
- if (DEFAULT_PROPERTIES_FILE.exists())
- properties = readProperties(DEFAULT_PROPERTIES_FILE);
- } catch (IOException e) {
- // TODO
- e.printStackTrace();
- }
- }
- if (properties == null)
- properties = new Properties();
- }
-
- /*
- * Read and return a properties file at the given location.
- */
- private Properties readProperties(File file) throws IOException {
- Properties result = new Properties();
- InputStream input = null;
- try {
- input = new BufferedInputStream(new FileInputStream(file));
- result.load(input);
- return result;
- } finally {
- if (input != null)
- try {
- input.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
- public void stop() {
- // nothing to do
- }
-
- /*
- * Return a boolean value indicating whether or not the bundle with the given symbolic name
- * should be considered when looking at bundles which are not resolved in the system.
- * TODO the call to this method was removed. we should add it back
- */
- protected boolean shouldCheckResolved(String bundle) {
- if (ignoreResolved == null) {
- ignoreResolved = new ArrayList();
- String list = properties.getProperty("ignore.unresolved");
- if (list == null)
- return true;
- for (StringTokenizer tokenizer = new StringTokenizer(list, ","); tokenizer.hasMoreTokens();)
- ignoreResolved.add(tokenizer.nextToken().trim());
- }
- for (Iterator iter = ignoreResolved.iterator(); iter.hasNext();) {
- if (bundle.equals(iter.next()))
- return false;
- }
- return true;
- }
-
- private List getAllBundles() {
- PlatformAdmin platformAdmin = (PlatformAdmin) ServiceHelper.getService(Activator.getBundleContext(), PlatformAdmin.class.getName());
- PackageAdmin packageAdmin = (PackageAdmin) ServiceHelper.getService(Activator.getBundleContext(), PackageAdmin.class.getName());
- State state = platformAdmin.getState(false);
- List result = new ArrayList();
-
- BundleDescription[] bundles = state.getBundles();
- for (int i = 0; i < bundles.length; i++) {
- BundleDescription bundle = bundles[i];
- Bundle[] versions = packageAdmin.getBundles(bundle.getSymbolicName(), bundle.getVersion().toString());
- for (int j = 0; j < versions.length; j++)
- result.add(versions[j]);
- }
- return result;
- }
-
- /*
- * Check to ensure all of the bundles in the system are resolved.
- *
- * Copied and modified from EclipseStarter#logUnresolvedBundles.
- * This method prints out all the reasons while asking the resolver directly
- * will only print out the first reason.
- */
- private IStatus checkResolved() {
- List allProblems = new ArrayList();
- PlatformAdmin platformAdmin = (PlatformAdmin) ServiceHelper.getService(Activator.getBundleContext(), PlatformAdmin.class.getName());
- State state = platformAdmin.getState(false);
- StateHelper stateHelper = platformAdmin.getStateHelper();
-
- // first lets look for missing leaf constraints (bug 114120)
- VersionConstraint[] leafConstraints = stateHelper.getUnsatisfiedLeaves(state.getBundles());
- // hash the missing leaf constraints by the declaring bundles
- Map missing = new HashMap();
- for (int i = 0; i < leafConstraints.length; i++) {
- // only include non-optional and non-dynamic constraint leafs
- if (leafConstraints[i] instanceof BundleSpecification && ((BundleSpecification) leafConstraints[i]).isOptional())
- continue;
- if (leafConstraints[i] instanceof ImportPackageSpecification) {
- if (ImportPackageSpecification.RESOLUTION_OPTIONAL.equals(((ImportPackageSpecification) leafConstraints[i]).getDirective(Constants.RESOLUTION_DIRECTIVE)))
- continue;
- if (ImportPackageSpecification.RESOLUTION_DYNAMIC.equals(((ImportPackageSpecification) leafConstraints[i]).getDirective(Constants.RESOLUTION_DIRECTIVE)))
- continue;
- }
- BundleDescription bundleDesc = leafConstraints[i].getBundle();
- ArrayList constraints = (ArrayList) missing.get(bundleDesc);
- if (constraints == null) {
- constraints = new ArrayList();
- missing.put(bundleDesc, constraints);
- }
- constraints.add(leafConstraints[i]);
- }
-
- // found some bundles with missing leaf constraints; log them first
- if (missing.size() > 0) {
- 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) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (registry == null)
- return createError("Profile registry service not available."); //$NON-NLS-1$
- IProfile profile = registry.getProfile(IProfileRegistry.SELF);
- if (profile == null)
- return createError("SELF profile not available in profile registry."); //$NON-NLS-1$
- IQueryResult results = profile.query(QueryUtil.createIUQuery(Activator.PLUGIN_ID), null);
- if (results.isEmpty())
- return createError(NLS.bind("IU for {0} not found in SELF profile.", Activator.PLUGIN_ID)); //$NON-NLS-1$
- return Status.OK_STATUS;
- }
-
- /*
- * Perform all of the verification checks.
- */
- public IStatus verify() {
- String message = "Problems occurred during verification."; //$NON-NLS-1$
- MultiStatus result = new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, message, null);
-
- // ensure all the bundles are resolved
- IStatus temp = checkResolved();
- if (!temp.isOK())
- result.merge(temp);
-
- // ensure we have a profile registry
- temp = checkProfileRegistry();
- if (!temp.isOK())
- result.merge(temp);
-
- return result;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests/.cvsignore b/bundles/org.eclipse.equinox.p2.tests/.cvsignore
new file mode 100644
index 000000000..eb5a316cb
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/.cvsignore
@@ -0,0 +1 @@
+target
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/GenerateTestData.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/GenerateTestData.java
new file mode 100644
index 000000000..3abe8540d
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/GenerateTestData.java
@@ -0,0 +1,276 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests;
+
+import java.io.*;
+import java.util.*;
+import org.osgi.framework.Version;
+
+/*
+ * Class which can generate features and bundles for test data.
+ * See #printUsage for arguments.
+ */
+public class GenerateTestData {
+
+ static final String baseBundleName = "My Bundle";
+ static final String baseBundleId = "com.example.bundle";
+ static final Version bundleVersion = new Version("1.0");
+
+ static final String baseFeatureName = "My feature";
+ static final String baseFeatureId = "com.example.feature";
+ static final Version featureVersion = new Version("1.0");
+
+ static int numFeatures = 0;
+ static int numBundles = 0;
+ static int numRequires = 0;
+ static File outputFile = null;
+ static Random random = new Random(System.currentTimeMillis());
+
+ Set<TestFeature> features = new HashSet<TestFeature>();
+ List<TestBundle> bundles = new ArrayList<TestBundle>();
+
+ /*
+ * Abstract class representing a feature or a bundle.
+ */
+ static abstract class TestObject {
+ String name;
+ String id;
+ Version version;
+ // use a set to avoid duplicates
+ Set<TestObject> requires = new HashSet<TestObject>();
+
+ public boolean equals(Object obj) {
+ if (!(obj instanceof TestBundle))
+ return false;
+ TestBundle other = (TestBundle) obj;
+ return id.equals(other.id) && version.equals(other.version);
+ }
+
+ public int hashCode() {
+ return id.hashCode() + version.hashCode();
+ }
+
+ // subclasses override to write out feature.xml or manifest.mf
+ abstract String getManifest();
+ }
+
+ static class TestBundle extends TestObject {
+
+ String getManifest() {
+ StringBuffer manifest = new StringBuffer();
+ manifest.append("Manifest-Version: 1.0\n");
+ manifest.append("Bundle-RequiredExecutionEnvironment: J2SE-1.4\n");
+ manifest.append("Bundle-ManifestVersion: 2\n");
+ manifest.append("Bundle-Name: " + name + '\n');
+ manifest.append("Bundle-SymbolicName: " + id + '\n');
+ manifest.append("Bundle-Version: " + version + '\n');
+ if (!requires.isEmpty()) {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("Require-Bundle: ");
+ for (Iterator<TestObject> iter = requires.iterator(); iter.hasNext();) {
+ TestObject req = iter.next();
+ buffer.append(req.id);
+ if (iter.hasNext())
+ buffer.append(",\n ");
+ }
+ manifest.append(buffer.toString());
+ }
+ return manifest.toString();
+ }
+
+ }
+
+ static class TestFeature extends TestObject {
+
+ String getManifest() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+ buffer.append(" <feature\n");
+ buffer.append("\t\tid=\"" + id + "\"\n");
+ buffer.append("\t\tlabel=\"" + name + "\"\n");
+ buffer.append("\t\tversion=\"" + version + "\"\n");
+ buffer.append("\t\tprovider-name=\"providerName\"\n");
+ buffer.append("\t\timage=\"eclipse_update_120.jpg\">\n");
+ buffer.append("\t<description>\n");
+ buffer.append("\t\tdescription\n");
+ buffer.append("\t</description>\n");
+ buffer.append("\t<copyright>\n");
+ buffer.append("\t\tcopyright\n");
+ buffer.append("\t</copyright>\n");
+ buffer.append("\t<license url=\"licenseURL\">\n");
+ buffer.append("\t\tlicense\n");
+ buffer.append("\t</license>\n");
+ for (TestObject bundle : requires) {
+ buffer.append("\t<plugin\n");
+ buffer.append("\t\tid=\"" + bundle.id + "\"\n");
+ buffer.append("\t\tdownload-size=\"0\"\n");
+ buffer.append("\t\tinstall-size=\"0\"\n");
+ buffer.append("\t\tversion=\"" + bundle.version + "\"/>\n");
+ }
+ buffer.append("</feature>\n");
+ return buffer.toString();
+ }
+ }
+
+ public static void main(String[] args) throws IOException {
+ processCommandLineArgs(args);
+ if (!validate()) {
+ printUsage();
+ return;
+ }
+ new GenerateTestData().generate();
+ }
+
+ static void printUsage() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("\nUse this application to generate test feature and bundle data.\n");
+ buffer.append("Parameters:\n");
+ buffer.append("-output <location>\n");
+ buffer.append("-features <number of features>\n");
+ buffer.append("-bundles <number of bundles>\n");
+ buffer.append("-requires <max number of requires for each bundle> [optional]\n");
+ buffer.append("\tSpecifying a requires of X bundles picks up to X of previously created bundles to be required.\n");
+ buffer.append("\tThis means bundles produced at the end are more likely to have X requirements.\n");
+ buffer.append("\tThis is done to avoid circular dependencies.\n");
+ System.err.println(buffer.toString());
+ }
+
+ /*
+ * Verify setup before starting. Ensure all required parameters have been set.
+ */
+ static boolean validate() {
+ StringBuffer buffer = new StringBuffer();
+ if (outputFile == null)
+ buffer.append("Need to set an output directory.\n");
+ if (numFeatures < 0 || numBundles <= 0)
+ buffer.append("Need to specifiy at least one bundle.\n");
+ if (numFeatures > numBundles)
+ buffer.append("Number of features must be the same or less than the number of bundles.\n");
+ if (numRequires > numBundles - 1)
+ buffer.append("Cannot have more required bundles than bundles.\n");
+ if (buffer.length() == 0)
+ return true;
+ System.err.println(buffer.toString());
+ return false;
+ }
+
+ static void processCommandLineArgs(String[] args) {
+ for (int i = 0; i < args.length - 1; i++) {
+ String arg = args[i];
+ String next = args[++i];
+ if ("-features".equalsIgnoreCase(arg)) {
+ numFeatures = Integer.parseInt(next);
+ } else if ("-bundles".equalsIgnoreCase(arg) || "-plugins".equalsIgnoreCase(arg)) {
+ numBundles = Integer.parseInt(next);
+ } else if ("-requires".equalsIgnoreCase(arg)) {
+ numRequires = Integer.parseInt(next);
+ } else if ("-output".equalsIgnoreCase(arg)) {
+ outputFile = new File(next);
+ }
+ }
+ }
+
+ void generate() throws IOException {
+ System.out.println("Generating " + numBundles + " bundles.");
+ for (int i = 0; i < numBundles; i++) {
+ TestBundle bundle = generateBundle(baseBundleName + i, baseBundleId + i, bundleVersion);
+ bundles.add(bundle);
+ }
+
+ System.out.println("Generating " + numFeatures + " features.");
+ for (int i = 0; i < numFeatures; i++) {
+ TestFeature feature = generateFeature(baseFeatureName + i, baseFeatureId + i, featureVersion, i);
+ features.add(feature);
+ }
+
+ save();
+ }
+
+ /*
+ * Persist the features and bundles to disk.
+ */
+ void save() throws IOException {
+ outputFile.mkdirs();
+ File featuresDir = new File(outputFile, "features");
+ featuresDir.mkdirs();
+ File pluginsDir = new File(outputFile, "plugins");
+ pluginsDir.mkdirs();
+
+ System.out.println("Writing " + features.size() + " features.");
+ for (TestFeature feature : features) {
+ File featureDir = new File(featuresDir, feature.id + '_' + feature.version);
+ File location = new File(featureDir, "feature.xml");
+ write(location, feature.getManifest());
+ }
+
+ System.out.println("Writing " + bundles.size() + " bundles.");
+ for (TestBundle bundle : bundles) {
+ File pluginDir = new File(pluginsDir, bundle.id + '_' + bundle.version);
+ File location = new File(new File(pluginDir, "META-INF"), "MANIFEST.MF");
+ write(location, bundle.getManifest());
+ }
+ }
+
+ void write(File location, String data) throws IOException {
+ File parent = location.getParentFile();
+ if (parent == null)
+ throw new RuntimeException("Unable to write to: " + location.getAbsolutePath() + "due to null parent.");
+ parent.mkdirs();
+ OutputStream output = null;
+ try {
+ output = new BufferedOutputStream(new FileOutputStream(location));
+ output.write(data.getBytes());
+ } finally {
+ if (output != null)
+ try {
+ output.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+ }
+
+ // Return a random bundle from the collection of already produced ones.
+ TestBundle getRandomBundle() {
+ if (bundles.isEmpty())
+ return null;
+ int index = random.nextInt(bundles.size());
+ return bundles.get(index);
+ }
+
+ TestBundle generateBundle(String name, String id, Version version) {
+ TestBundle bundle = new TestBundle();
+ bundle.id = id;
+ bundle.name = name;
+ bundle.version = version;
+ for (int i = 0; i < numRequires; i++) {
+ TestBundle req = getRandomBundle();
+ if (req != null)
+ bundle.requires.add(req);
+ }
+ return bundle;
+ }
+
+ TestFeature generateFeature(String name, String id, Version version, int index) {
+ TestFeature feature = new TestFeature();
+ feature.id = id;
+ feature.name = name;
+ feature.version = version;
+ // bundles were generated first and we already checked that we have more/equal bundles and features
+ // so we should be ok here.
+ TestBundle bundle = bundles.get(index);
+ if (bundle == null)
+ throw new RuntimeException("Could not find bundle at index: " + index + " to match feature: " + id);
+ feature.requires.add(bundle);
+ return feature;
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestLicenseConsistency.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestLicenseConsistency.java
new file mode 100644
index 000000000..7c8b79bbf
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestLicenseConsistency.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.*;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.ILicense;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+
+/**
+ * Tests that licenses in the helios repository are consistent with the platform feature license.
+ * Note this test isn't intended to be included in automated tests. It produces a report
+ * on stdout that can be used to identify features with inconsistent feature licenses.
+ */
+public class TestLicenseConsistency extends AbstractProvisioningTest {
+ public void testLicenses() throws URISyntaxException, ProvisionException, OperationCanceledException {
+ URI repoLocation = new URI("http://download.eclipse.org/releases/helios/201005070900");
+ IMetadataRepository repo = getMetadataRepositoryManager().loadRepository(repoLocation, null);
+ IQueryResult<IInstallableUnit> allFeatures = repo.query(QueryUtil.createIUGroupQuery(), null);
+ IQueryResult<IInstallableUnit> platform = allFeatures.query(QueryUtil.createIUQuery("org.eclipse.platform.feature.group"), null);
+ assertFalse(allFeatures.isEmpty());
+ assertFalse(platform.isEmpty());
+ IInstallableUnit platformFeature = platform.iterator().next();
+ ILicense platformLicense = platformFeature.getLicenses(null).iterator().next();
+
+ List<IInstallableUnit> noLicense = new ArrayList<IInstallableUnit>();
+ List<IInstallableUnit> extraLicense = new ArrayList<IInstallableUnit>();
+ List<IInstallableUnit> goodLicense = new ArrayList<IInstallableUnit>();
+ List<IInstallableUnit> badLicense = new ArrayList<IInstallableUnit>();
+ checkLicenses(platformLicense, allFeatures, goodLicense, badLicense, noLicense, extraLicense);
+
+ printReport(goodLicense, badLicense, noLicense, extraLicense);
+
+ }
+
+ private void printReport(List<IInstallableUnit> goodLicense, List<IInstallableUnit> badLicense, List<IInstallableUnit> noLicense, List<IInstallableUnit> extraLicense) {
+ String SPACER = "\n=======================";
+ System.out.println("\n\nSummary:" + SPACER);
+ System.out.println("Features with conforming license: " + goodLicense.size());
+ System.out.println("Features with different license: " + badLicense.size());
+ System.out.println("Features with no license: " + noLicense.size());
+ System.out.println("Features with extra licenses: " + extraLicense.size());
+ System.out.println("=======================");
+
+ System.out.println("\n\nDetails:" + SPACER);
+
+ System.out.println("Features with no license:" + SPACER);
+ for (IInstallableUnit unit : sort(noLicense)) {
+ System.out.println(unit.getId() + ' ' + unit.getVersion());
+ }
+
+ System.out.println("\n\nFeatures with different license:" + SPACER);
+ for (IInstallableUnit unit : sort(badLicense)) {
+ System.out.println(unit.getId() + ' ' + unit.getVersion());
+ }
+
+ System.out.println("\n\nFeatures with matching license:" + SPACER);
+ for (IInstallableUnit unit : sort(goodLicense)) {
+ System.out.println(unit.getId() + ' ' + unit.getVersion());
+ }
+
+ }
+
+ private List<IInstallableUnit> sort(List<IInstallableUnit> noLicense) {
+ Collections.sort(noLicense);
+ return noLicense;
+ }
+
+ private void checkLicenses(ILicense platformLicense, IQueryResult<IInstallableUnit> allFeatures, List<IInstallableUnit> goodLicense, List<IInstallableUnit> badLicense, List<IInstallableUnit> noLicense, List<IInstallableUnit> extraLicense) {
+ for (IInstallableUnit feature : allFeatures.toUnmodifiableSet()) {
+ //ignore groups that are not features
+ if (!feature.getId().endsWith(".feature.group"))
+ continue;
+ Collection<ILicense> licenses = feature.getLicenses(null);
+ if (licenses.isEmpty()) {
+ noLicense.add(feature);
+ continue;
+ }
+ if (licenses.size() != 1) {
+ extraLicense.add(feature);
+ continue;
+ }
+ ILicense featureLicense = licenses.iterator().next();
+ if (!platformLicense.getUUID().equals(featureLicense.getUUID())) {
+ badLicense.add(feature);
+// if (featureLicense.getBody().length() < 100) {
+// System.out.println(feature.getId() + " license: " + featureLicense.getBody());
+// }
+ continue;
+ }
+ goodLicense.add(feature);
+ }
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactLockingTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactLockingTest.java
new file mode 100644
index 000000000..8cd7d92e3
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactLockingTest.java
@@ -0,0 +1,488 @@
+package org.eclipse.equinox.p2.tests.artifact.repository;
+
+import java.io.File;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
+import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactDescriptor;
+import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository;
+import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+public class ArtifactLockingTest extends AbstractProvisioningTest {
+
+ private File targetLocation;
+ private SimpleArtifactRepository repo1 = null;
+ private SimpleArtifactRepository repo2 = null;
+ private boolean lockingValue = false;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ lockingValue = Activator.getInstance().enableArtifactLocking();
+ System.setProperty(Activator.ENABLE_ARTIFACT_LOCKING, "true");
+
+ targetLocation = File.createTempFile("bundlepool", ".repo");
+ targetLocation.delete();
+ targetLocation.mkdirs();
+ repo1 = new SimpleArtifactRepository(getAgent(), "TargetRepo", targetLocation.toURI(), null);
+ Thread.sleep(1000);
+ repo2 = new SimpleArtifactRepository(getAgent(), "TargetRepo", targetLocation.toURI(), null);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ System.setProperty(Activator.ENABLE_ARTIFACT_LOCKING, "" + lockingValue);
+ super.tearDown();
+ }
+
+ boolean canContinue = false;
+
+ public void testCancelLoad() throws InterruptedException, ProvisionException {
+ this.canContinue = false;
+ final IProgressMonitor progressMonitor = new NullProgressMonitor();
+ new Thread(new Runnable() {
+ public void run() {
+ status = repo1.executeBatch(new IRunnableWithProgress() {
+
+ public void run(IProgressMonitor monitor) throws OperationCanceledException {
+ try {
+ canContinue = true;
+ Thread.sleep(3 * 1000);
+ repo1.addDescriptor(new SimpleArtifactDescriptor(new ArtifactKey("org.eclipse.test", "test2", Version.create("1.0.0"))), new NullProgressMonitor());
+ progressMonitor.setCanceled(true);
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ // Do nothing
+ }
+ }
+ }, new NullProgressMonitor());
+ }
+ }).start();
+
+ while (!canContinue) {
+ Thread.sleep(100);
+ }
+
+ IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) getAgent().getService(IArtifactRepositoryManager.SERVICE_NAME);
+ boolean expected = false;
+ try {
+ artifactManager.loadRepository(targetLocation.toURI(), progressMonitor);
+ } catch (OperationCanceledException e) {
+ expected = true;
+ }
+ assertTrue("Expected an Operation Cancled Exception", expected);
+
+ }
+
+ public void testWaitForLoad() throws InterruptedException, ProvisionException {
+ this.canContinue = false;
+ new Thread(new Runnable() {
+ public void run() {
+ status = repo1.executeBatch(new IRunnableWithProgress() {
+
+ public void run(IProgressMonitor monitor) throws OperationCanceledException {
+ try {
+ canContinue = true;
+ Thread.sleep(6 * 1000);
+ repo1.addDescriptor(new SimpleArtifactDescriptor(new ArtifactKey("org.eclipse.test", "test2", Version.create("1.0.0"))), new NullProgressMonitor());
+
+ } catch (InterruptedException e) {
+ // Do nothing
+ }
+ }
+ }, new NullProgressMonitor());
+ }
+ }).start();
+
+ while (!canContinue) {
+ Thread.sleep(100);
+ }
+ IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) getAgent().getService(IArtifactRepositoryManager.SERVICE_NAME);
+ SimpleArtifactRepository artifactRepository = (SimpleArtifactRepository) artifactManager.loadRepository(targetLocation.toURI(), new NullProgressMonitor());
+ assertEquals(1, artifactRepository.getDescriptors().size());
+
+ }
+
+ // Helper variables for the following test case
+ private boolean keepRunning = true;
+ IStatus status = null;
+
+ /**
+ * Creates 1 thread that does a long running execute batch. We then try to add descriptors to another
+ * instance of the same repository. This will block. We then cancel the progress monitor to test
+ * that the block terminates.
+ * @throws InterruptedException
+ */
+ public void testCancel() throws InterruptedException {
+ final IProgressMonitor progressMonitor = new NullProgressMonitor();
+ this.keepRunning = true;
+
+ new Thread(new Runnable() {
+ public void run() {
+ status = repo1.executeBatch(new IRunnableWithProgress() {
+
+ public void run(IProgressMonitor monitor) throws OperationCanceledException {
+ long start = System.currentTimeMillis();
+ while (keepRunning) {
+ long current = System.currentTimeMillis();
+ if (current - start > 1000 * 10) {
+ fail("Test case never finished. Likely keep running was never set to false.");
+ return;
+ }
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ // Do nothing
+ }
+ }
+ }
+ }, new NullProgressMonitor());
+ }
+ }).start();
+
+ // Give the execute batch thread a chance to start
+ Thread.sleep(1000);
+
+ // Create a thread that will stop our progress monitor
+ Thread t = new Thread(new Runnable() {
+
+ public void run() {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ // Do nothing
+ }
+ progressMonitor.setCanceled(true);
+ }
+ });
+ t.start();
+
+ // This should block
+ repo2.addDescriptor(new SimpleArtifactDescriptor(new ArtifactKey("org.eclipse.test", "test2", Version.create("1.0.0"))), progressMonitor);
+ keepRunning = false;
+ if (status != null && !status.isOK()) {
+ fail(status.getMessage());
+ }
+ assertEquals(0, repo2.getDescriptors().size()); // The descriptor should not have been added
+ }
+
+ public void testCancelRead() throws InterruptedException {
+ final IProgressMonitor progressMonitor = new NullProgressMonitor();
+ this.keepRunning = true;
+
+ new Thread(new Runnable() {
+ public void run() {
+ status = repo1.executeBatch(new IRunnableWithProgress() {
+
+ public void run(IProgressMonitor monitor) throws OperationCanceledException {
+ long start = System.currentTimeMillis();
+ while (keepRunning) {
+ long current = System.currentTimeMillis();
+ if (current - start > 1000 * 10) {
+ fail("Test case never finished. Likely keep running was never set to false.");
+ return;
+ }
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ // Do nothing
+ }
+ }
+ }
+ }, new NullProgressMonitor());
+ }
+ }).start();
+
+ // Give the execute batch thread a chance to start
+ Thread.sleep(1000);
+
+ // Create a thread that will stop our progress monitor
+ Thread t = new Thread(new Runnable() {
+
+ public void run() {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ // Do nothing
+ }
+ progressMonitor.setCanceled(true);
+ }
+ });
+ t.start();
+
+ // This should block
+ repo2.getDescriptors();
+ keepRunning = false;
+ if (status != null && !status.isOK()) {
+ fail(status.getMessage());
+ }
+ }
+
+ // The following variables are used in the following test case
+
+ IStatus status1 = null;
+ IStatus status2 = null;
+ boolean lockAcquired = false;
+
+ /**
+ * This tests that two 'executeBatch' operations are not executed in
+ * parallel, but rather, the second one waits for the first to complete.
+ * @throws InterruptedException
+ */
+ public void testMultipleExecuteBatch() throws InterruptedException {
+ this.lockAcquired = false;
+ Thread t1 = new Thread(new Runnable() {
+ public void run() {
+ status1 = repo1.executeBatch(new IRunnableWithProgress() {
+
+ public void run(IProgressMonitor monitor) throws OperationCanceledException {
+ try {
+ if (lockAcquired)
+ throw new RuntimeException("Lock already acquired");
+ lockAcquired = true;
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ // Do nothing
+ }
+ } finally {
+ lockAcquired = false;
+ }
+ }
+ }, new NullProgressMonitor());
+ }
+ });
+ t1.start();
+
+ Thread t2 = new Thread(new Runnable() {
+ public void run() {
+ status2 = repo2.executeBatch(new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) throws OperationCanceledException {
+ try {
+ if (lockAcquired)
+ throw new RuntimeException("Lock already acquired");
+ lockAcquired = true;
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ // Do nothing
+ }
+ } finally {
+ lockAcquired = false;
+ }
+ }
+ }, new NullProgressMonitor());
+ }
+ });
+ t2.start();
+
+ t1.join();
+ t2.join();
+
+ if (!status1.isOK() || !status2.isOK())
+ fail("Test failed, a lock acquired simultaneously by both execute batch operations");
+ }
+
+ /**
+ * This tests that we wait for the lock to come off, we then add a descriptor
+ * @throws InterruptedException
+ */
+ public void testWait() throws InterruptedException {
+
+ new Thread(new Runnable() {
+ public void run() {
+ status = repo1.executeBatch(new IRunnableWithProgress() {
+
+ public void run(IProgressMonitor monitor) throws OperationCanceledException {
+ try {
+ Thread.sleep(5000);
+ } catch (InterruptedException e) {
+ // Do nothing
+ }
+
+ }
+ }, new NullProgressMonitor());
+ }
+ }).start();
+
+ // Give the execute batch thread a chance to start
+ Thread.sleep(1000);
+
+ // This should block for 5 seconds, and then add the descriptor
+ repo2.addDescriptor(new SimpleArtifactDescriptor(new ArtifactKey("org.eclipse.test", "test2", Version.create("1.0.0"))), new NullProgressMonitor());
+ assertEquals(1, repo2.getDescriptors().size()); // The descriptor should not have been added
+ }
+
+ public void testMultipleAddDescriptors() throws InterruptedException {
+ Thread.sleep(1000);
+ repo1.addDescriptor(new SimpleArtifactDescriptor(new ArtifactKey("org.eclipse.test", "test1", Version.create("1.0.0"))), new NullProgressMonitor());
+ assertEquals(1, repo1.getDescriptors().size());
+ Thread.sleep(1000);
+ repo2.addDescriptor(new SimpleArtifactDescriptor(new ArtifactKey("org.eclipse.test", "test2", Version.create("1.0.0"))), new NullProgressMonitor());
+ assertEquals(2, repo2.getDescriptors().size());
+ }
+
+ public void testContainsDescriptor() throws InterruptedException {
+ ArtifactKey k = new ArtifactKey("org.eclipse.test", "test1", Version.create("1.0.0"));
+ SimpleArtifactDescriptor d = new SimpleArtifactDescriptor(k);
+ Thread.sleep(1000);
+ repo1.addDescriptor(d, new NullProgressMonitor());
+ Thread.sleep(1000);
+ assertTrue(repo2.contains(d));
+ }
+
+ public void testContainsKey() throws InterruptedException {
+ ArtifactKey k = new ArtifactKey("org.eclipse.test", "test1", Version.create("1.0.0"));
+ SimpleArtifactDescriptor d = new SimpleArtifactDescriptor(k);
+ Thread.sleep(1000);
+ repo1.addDescriptor(d, new NullProgressMonitor());
+ Thread.sleep(1000);
+ assertTrue(repo2.contains(k));
+ }
+
+ public void testMultipleRemoveDescriptors() throws InterruptedException {
+ SimpleArtifactDescriptor d1 = new SimpleArtifactDescriptor(new ArtifactKey("org.eclipse.test", "test1", Version.create("1.0.0")));
+ SimpleArtifactDescriptor d2 = new SimpleArtifactDescriptor(new ArtifactKey("org.eclipse.test", "test2", Version.create("1.0.0")));
+
+ Thread.sleep(1000);
+ repo1.addDescriptor(d1, new NullProgressMonitor());
+ repo1.addDescriptor(d2, new NullProgressMonitor());
+ assertEquals(2, repo1.getDescriptors().size());
+ Thread.sleep(1000);
+ repo1.removeDescriptor(d1, new NullProgressMonitor());
+ assertEquals(1, repo1.getDescriptors().size());
+ Thread.sleep(1000);
+ repo2.removeDescriptor(d2, new NullProgressMonitor());
+ assertEquals(0, repo2.getDescriptors().size());
+ }
+
+ public void testMultipleRemoveKeys() throws InterruptedException {
+ ArtifactKey k1 = new ArtifactKey("org.eclipse.test", "test1", Version.create("1.0.0"));
+ ArtifactKey k2 = new ArtifactKey("org.eclipse.test", "test2", Version.create("1.0.0"));
+ SimpleArtifactDescriptor d1 = new SimpleArtifactDescriptor(k1);
+ SimpleArtifactDescriptor d2 = new SimpleArtifactDescriptor(k2);
+
+ Thread.sleep(1000);
+ repo1.addDescriptor(d1, new NullProgressMonitor());
+ repo1.addDescriptor(d2, new NullProgressMonitor());
+ assertEquals(2, repo1.getDescriptors().size());
+ Thread.sleep(1000);
+ repo1.removeDescriptor(k1, new NullProgressMonitor());
+ assertEquals(1, repo1.getDescriptors().size());
+ Thread.sleep(1000);
+ assertEquals(1, repo2.getDescriptors().size());
+ repo2.removeDescriptor(k2, new NullProgressMonitor());
+ assertEquals(0, repo2.getDescriptors().size());
+ }
+
+ public void testRemoveBulkKeys() throws InterruptedException {
+ ArtifactKey k1 = new ArtifactKey("org.eclipse.test", "test1", Version.create("1.0.0"));
+ ArtifactKey k2 = new ArtifactKey("org.eclipse.test", "test2", Version.create("1.0.0"));
+ ArtifactKey k3 = new ArtifactKey("org.eclipse.test", "test3", Version.create("1.0.0"));
+ SimpleArtifactDescriptor d1 = new SimpleArtifactDescriptor(k1);
+ SimpleArtifactDescriptor d2 = new SimpleArtifactDescriptor(k2);
+ SimpleArtifactDescriptor d3 = new SimpleArtifactDescriptor(k3);
+
+ Thread.sleep(1000);
+ repo1.addDescriptor(d1, new NullProgressMonitor());
+ repo1.addDescriptor(d2, new NullProgressMonitor());
+ repo1.addDescriptor(d3, new NullProgressMonitor());
+ assertEquals(3, repo1.getDescriptors().size());
+ Thread.sleep(1000);
+ repo2.removeDescriptors(new IArtifactKey[] {k1, k2}, new NullProgressMonitor());
+ Thread.sleep(1000);
+ assertEquals(1, repo2.getDescriptors().size());
+ assertEquals(1, repo1.getDescriptors().size());
+ }
+
+ public void testRemoveBulkDescriptors() throws InterruptedException {
+ ArtifactKey k1 = new ArtifactKey("org.eclipse.test", "test1", Version.create("1.0.0"));
+ ArtifactKey k2 = new ArtifactKey("org.eclipse.test", "test2", Version.create("1.0.0"));
+ ArtifactKey k3 = new ArtifactKey("org.eclipse.test", "test3", Version.create("1.0.0"));
+ SimpleArtifactDescriptor d1 = new SimpleArtifactDescriptor(k1);
+ SimpleArtifactDescriptor d2 = new SimpleArtifactDescriptor(k2);
+ SimpleArtifactDescriptor d3 = new SimpleArtifactDescriptor(k3);
+
+ Thread.sleep(1000);
+ repo1.addDescriptor(d1, new NullProgressMonitor());
+ repo1.addDescriptor(d2, new NullProgressMonitor());
+ repo1.addDescriptor(d3, new NullProgressMonitor());
+ assertEquals(3, repo1.getDescriptors().size());
+ Thread.sleep(1000);
+ repo2.removeDescriptors(new IArtifactDescriptor[] {d1, d2}, new NullProgressMonitor());
+ Thread.sleep(1000);
+ assertEquals(1, repo2.getDescriptors().size());
+ assertEquals(1, repo1.getDescriptors().size());
+ }
+
+ public void testRemoveAll() throws InterruptedException {
+ ArtifactKey k1 = new ArtifactKey("org.eclipse.test", "test1", Version.create("1.0.0"));
+ ArtifactKey k2 = new ArtifactKey("org.eclipse.test", "test2", Version.create("1.0.0"));
+ SimpleArtifactDescriptor d1 = new SimpleArtifactDescriptor(k1);
+ SimpleArtifactDescriptor d2 = new SimpleArtifactDescriptor(k2);
+
+ Thread.sleep(1000);
+ repo1.addDescriptor(d1, new NullProgressMonitor());
+ repo1.addDescriptor(d2, new NullProgressMonitor());
+ assertEquals(2, repo1.getDescriptors().size());
+ Thread.sleep(1000);
+ repo2.removeAll(new NullProgressMonitor());
+ Thread.sleep(1000);
+ assertEquals(0, repo2.getDescriptors().size());
+ assertEquals(0, repo1.getDescriptors().size());
+ }
+
+ public void testReloadAdds() throws InterruptedException {
+ // Delay 1 second because some operating systems only give 1 second precision
+ Thread.sleep(1000);
+ repo1.addDescriptor(new SimpleArtifactDescriptor(new ArtifactKey("org.eclipse.test", "test1", Version.create("1.0.0"))), new NullProgressMonitor());
+ Thread.sleep(1000);
+ repo2.addDescriptor(new SimpleArtifactDescriptor(new ArtifactKey("org.eclipse.test", "test2", Version.create("1.0.0"))), new NullProgressMonitor());
+
+ assertEquals(2, repo2.getDescriptors().size());
+ // Does the fist repo get reloaded when reading the descriptors
+ assertEquals(2, repo1.getDescriptors().size());
+ }
+
+ public void _testSetProperty() throws InterruptedException {
+ // Delay 1 second because some operating systems only give 1 second precision
+ Thread.sleep(1000);
+ repo1.setProperty("foo", "bar", new NullProgressMonitor());
+ Thread.sleep(1000);
+ assertEquals("bar", repo1.getProperty("foo"));
+ assertEquals("bar", repo2.getProperty("foo"));
+ }
+
+ public void _testGetProperties() throws InterruptedException {
+ // Delay 1 second because some operating systems only give 1 second precision
+ Thread.sleep(1000);
+ repo1.setProperty("foo", "bar", new NullProgressMonitor());
+ Thread.sleep(1000);
+ assertEquals("bar", repo1.getProperties().get("foo"));
+ assertEquals("bar", repo2.getProperties().get("foo"));
+ }
+
+ public void _testSetName() throws InterruptedException {
+ // Delay 1 second because some operating systems only give 1 second precision
+ Thread.sleep(1000);
+ repo1.setName("Foo");
+ Thread.sleep(1000);
+ assertEquals("Foo", repo1.getName());
+ assertEquals("Foo", repo2.getName());
+ }
+
+ public void _testSetDescription() throws InterruptedException {
+ // Delay 1 second because some operating systems only give 1 second precision
+ Thread.sleep(1000);
+ repo1.setDescription("Foo Bar");
+ Thread.sleep(1000);
+ assertEquals("Foo Bar", repo1.getDescription());
+ assertEquals("Foo Bar", repo2.getDescription());
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/LocationTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/LocationTest.java
new file mode 100644
index 000000000..0fd31ed55
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/LocationTest.java
@@ -0,0 +1,47 @@
+package org.eclipse.equinox.p2.tests.artifact.repository;
+
+import java.io.File;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest;
+import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository;
+import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+public class LocationTest extends AbstractProvisioningTest {
+ private static final String testDataLocation = "testData/artifactRepo/packedSiblingsWithUUID";
+ private File targetLocation;
+ private IArtifactRepository targetRepository, sourceRepository;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ targetLocation = File.createTempFile("target", ".repo");
+ targetLocation.delete();
+ targetLocation.mkdirs();
+ targetRepository = new SimpleArtifactRepository(getAgent(), "TargetRepo", targetLocation.toURI(), null);
+
+ IArtifactRepositoryManager mgr = getArtifactRepositoryManager();
+ sourceRepository = mgr.loadRepository((getTestData("EmptyJar repo", testDataLocation).toURI()), null);
+
+ }
+
+ protected void tearDown() throws Exception {
+ getArtifactRepositoryManager().removeRepository(targetLocation.toURI());
+ getArtifactRepositoryManager().removeRepository(sourceRepository.getLocation());
+ AbstractProvisioningTest.delete(targetLocation);
+ super.tearDown();
+ }
+
+ public void testLocation() throws Exception {
+ IArtifactKey key = new ArtifactKey("osgi.bundle", "org.springframework.ide.eclipse", Version.parseVersion("2.3.2.201003220227-RELEASE"));
+ assertTrue(sourceRepository.contains(key));
+ MirrorRequest req = new MirrorRequest(key, targetRepository, null, null, getTransport());
+ req.perform(sourceRepository, new NullProgressMonitor());
+ IStatus status = req.getResult();
+ assertTrue(status.getMessage(), status.isOK());
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProvisioningContextTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProvisioningContextTest.java
index 5f27bb506..505a6ca76 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProvisioningContextTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProvisioningContextTest.java
@@ -11,18 +11,20 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.engine;
+import java.io.File;
import java.net.URI;
-import java.util.Collections;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import java.util.*;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
-import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.repository.*;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
import org.eclipse.equinox.p2.repository.spi.RepositoryReference;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
@@ -30,139 +32,296 @@ import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
* Test API of the provisioning context
*/
public class ProvisioningContextTest extends AbstractProvisioningTest {
-
- private static final String testDataFileLocation = "testData/provisioningContextTests/";
- private static final int A_UNITCOUNT = 37;
- private static final String TEST = "TestProvisioningContextFollow";
- protected IMetadataRepository repoA, repoB, repoC;
- URI uriA, uriB, uriC;
+ protected File repoLocation;
+ protected File referredRepoLocation1;
+ protected File referredRepoLocation2;
+ protected Set<IRepositoryReference> metadataRepoSnapshot;
+ protected Set<IRepositoryReference> artifactRepoSnapshot;
+ protected int metadataRepoCount, artifactRepoCount;
protected void setUp() throws Exception {
super.setUp();
- uriA = getTestData("A", testDataFileLocation + "A").toURI();
- uriB = getTestData("B", testDataFileLocation + "B").toURI();
- uriC = getTestData("C", testDataFileLocation + "C").toURI();
+ repoLocation = getTempFolder();
+ referredRepoLocation1 = getTempFolder();
+ referredRepoLocation2 = getTempFolder();
- repoA = getMetadataRepositoryManager().loadRepository(uriA, getMonitor());
+ // we add one metadata and one artifact repository at repoLocation
+ Map properties = new HashMap();
+ properties.put(IRepository.PROP_COMPRESSED, "false");
+ URI repoURL = repoLocation.toURI();
+ IMetadataRepository repo = getMetadataRepositoryManager().createRepository(repoURL, "testContextAllReposWithFollow", IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=305565
- repoA.addReferences(Collections.singletonList(new RepositoryReference(uriA, null, IRepository.TYPE_ARTIFACT, IRepository.ENABLED)));
+ getArtifactRepositoryManager().createRepository(repoURL, "testContextAllReposWithFollow", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
- // now create a second set of repos and refer from the first
- repoB = getMetadataRepositoryManager().loadRepository(uriB, getMonitor());
- repoB.addReferences(Collections.singletonList(new RepositoryReference(uriB, null, IRepository.TYPE_ARTIFACT, IRepository.ENABLED)));
- repoA.addReferences(Collections.singletonList(new RepositoryReference(repoB.getLocation(), null, IRepository.TYPE_METADATA, IRepository.ENABLED)));
+ // now create one metadata and one artifact repository at referredRepoLocation1.
+ // remove them (so they manager doesn't know them) but refer to them from the first repo as disabled repos
+ URI repoFollowed1 = referredRepoLocation1.toURI();
+ IMetadataRepository repo1 = getMetadataRepositoryManager().createRepository(repoFollowed1, "referred1", IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
+ getMetadataRepositoryManager().removeRepository(repoFollowed1);
+ getArtifactRepositoryManager().createRepository(repoFollowed1, "referred1", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
+ getArtifactRepositoryManager().removeRepository(repoFollowed1);
+ repo.addReferences(Collections.singletonList(new RepositoryReference(repoFollowed1, "follow1", IRepository.TYPE_METADATA, IRepository.NONE)));
+ repo.addReferences(Collections.singletonList(new RepositoryReference(repoFollowed1, "follow1", IRepository.TYPE_ARTIFACT, IRepository.NONE)));
- // this repo is referred by the previous one
- repoC = getMetadataRepositoryManager().loadRepository(uriC, getMonitor());
- repoC.addReferences(Collections.singletonList(new RepositoryReference(uriC, null, IRepository.TYPE_ARTIFACT, IRepository.ENABLED)));
- repoB.addReferences(Collections.singletonList(new RepositoryReference(repoC.getLocation(), null, IRepository.TYPE_METADATA, IRepository.ENABLED)));
+ // do the same at referredRepoLocation2 (create repos and remove them).
+ // add them as disabled references in repo 1.
+ URI repoFollowed2 = referredRepoLocation2.toURI();
+ getMetadataRepositoryManager().createRepository(repoFollowed2, "referred2", IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
+ getMetadataRepositoryManager().removeRepository(repoFollowed2);
+ getArtifactRepositoryManager().createRepository(repoFollowed2, "referred2", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
+ getArtifactRepositoryManager().removeRepository(repoFollowed2);
+ repo1.addReferences(Collections.singletonList(new RepositoryReference(repoFollowed2, "follow2", IRepository.TYPE_METADATA, IRepository.NONE)));
+ repo1.addReferences(Collections.singletonList(new RepositoryReference(repoFollowed2, "follow2", IRepository.TYPE_ARTIFACT, IRepository.NONE)));
}
protected void tearDown() throws Exception {
- getArtifactRepositoryManager().removeRepository(uriA);
- getArtifactRepositoryManager().removeRepository(uriB);
- getArtifactRepositoryManager().removeRepository(uriC);
- getMetadataRepositoryManager().removeRepository(uriA);
- getMetadataRepositoryManager().removeRepository(uriB);
- getMetadataRepositoryManager().removeRepository(uriC);
+ getMetadataRepositoryManager().removeRepository(repoLocation.toURI());
+ getArtifactRepositoryManager().removeRepository(repoLocation.toURI());
+ getMetadataRepositoryManager().removeRepository(referredRepoLocation1.toURI());
+ getArtifactRepositoryManager().removeRepository(referredRepoLocation1.toURI());
+ getMetadataRepositoryManager().removeRepository(referredRepoLocation2.toURI());
+ getArtifactRepositoryManager().removeRepository(referredRepoLocation2.toURI());
+ delete(repoLocation);
+ delete(referredRepoLocation1);
+ delete(referredRepoLocation2);
+
+ super.tearDown();
+ }
+
+ protected void snapShot() throws ProvisionException {
+ // First load all metadata repositories that are enabled so that any enabled references they have will get added.
+ // This ensures our snapshot is a valid count and that differences are only the result of the provisioning context (vs. loading).
+ URI[] locations = getMetadataRepositoryManager().getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
+ for (int i = 0; i < locations.length; i++)
+ getMetadataRepositoryManager().loadRepository(locations[i], getMonitor());
+
+ metadataRepoCount = 0;
+ metadataRepoSnapshot = new HashSet<IRepositoryReference>();
+ List<URI> all = new ArrayList<URI>();
+ all.addAll(Arrays.asList(getMetadataRepositoryManager().getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL)));
+ all.addAll(Arrays.asList(getMetadataRepositoryManager().getKnownRepositories(IRepositoryManager.REPOSITORIES_DISABLED)));
+
+ for (URI location : all) {
+ int options = getMetadataRepositoryManager().isEnabled(location) ? IRepository.ENABLED : IRepository.NONE;
+ if (options == IRepository.ENABLED)
+ metadataRepoCount++;
+ metadataRepoSnapshot.add(new RepositoryReference(location, getMetadataRepositoryManager().getRepositoryProperty(location, IRepository.PROP_NICKNAME), IRepository.TYPE_METADATA, options));
+ }
+ artifactRepoCount = 0;
+ artifactRepoSnapshot = new HashSet<IRepositoryReference>();
+ all = new ArrayList<URI>();
+ all.addAll(Arrays.asList(getArtifactRepositoryManager().getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL)));
+ all.addAll(Arrays.asList(getArtifactRepositoryManager().getKnownRepositories(IRepositoryManager.REPOSITORIES_DISABLED)));
+ for (URI location : all) {
+ int options = getArtifactRepositoryManager().isEnabled(location) ? IRepository.ENABLED : IRepository.NONE;
+ if (options == IRepository.ENABLED)
+ artifactRepoCount++;
+ artifactRepoSnapshot.add(new RepositoryReference(location, getArtifactRepositoryManager().getRepositoryProperty(location, IRepository.PROP_NICKNAME), IRepository.TYPE_ARTIFACT, options));
+ }
+ }
+
+ protected void checkSnapShots() {
+ List<URI> all = new ArrayList<URI>();
+ all.addAll(Arrays.asList(getMetadataRepositoryManager().getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL)));
+ all.addAll(Arrays.asList(getMetadataRepositoryManager().getKnownRepositories(IRepositoryManager.REPOSITORIES_DISABLED)));
+ assertEquals("snapshot check 1.0", all.size(), metadataRepoSnapshot.size());
+ for (URI location : all) {
+ IRepositoryReference reference = snapshotFor(location, metadataRepoSnapshot);
+ assertNotNull("snapshot check 1.1", reference);
+ assertEquals("snapshot check 1.2", getMetadataRepositoryManager().isEnabled(location), (reference.getOptions() & IRepository.ENABLED) == IRepository.ENABLED);
+ assertEquals("snapshot check 1.3", getMetadataRepositoryManager().getRepositoryProperty(location, IRepository.PROP_NICKNAME), reference.getNickname());
+ }
+ all = new ArrayList<URI>();
+ all.addAll(Arrays.asList(getArtifactRepositoryManager().getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL)));
+ all.addAll(Arrays.asList(getArtifactRepositoryManager().getKnownRepositories(IRepositoryManager.REPOSITORIES_DISABLED)));
+ assertEquals("snapshot check 1.4", all.size(), artifactRepoSnapshot.size());
+ for (URI location : all) {
+ IRepositoryReference reference = snapshotFor(location, artifactRepoSnapshot);
+ assertNotNull("snapshot check 1.5", reference);
+ assertEquals("snapshot check 1.6", getArtifactRepositoryManager().isEnabled(location), (reference.getOptions() & IRepository.ENABLED) == IRepository.ENABLED);
+ assertEquals("snapshot check 1.7", getArtifactRepositoryManager().getRepositoryProperty(location, IRepository.PROP_NICKNAME), reference.getNickname());
+ }
+ }
+
+ protected IRepositoryReference snapshotFor(URI location, Set<IRepositoryReference> refs) {
+ for (IRepositoryReference ref : refs) {
+ if (URIUtil.sameURI(location, ref.getLocation())) {
+ return ref;
+ }
+ }
+ return null;
}
- public void testContextOneRepoNoFollow() {
+ protected int getRepositoryCount(IRepositoryManager manager) {
+ URI[] enabled = manager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
+ URI[] disabled = manager.getKnownRepositories(IRepositoryManager.REPOSITORIES_DISABLED);
+ return enabled.length + disabled.length;
+ }
+
+ public void testContextAllReposNoFollow() throws ProvisionException {
+ snapShot();
ProvisioningContext context = new ProvisioningContext(getAgent());
- context.setMetadataRepositories(new URI[] {repoA.getLocation()});
- context.setArtifactRepositories(new URI[0]);
- IQueryable<IInstallableUnit> queryable = context.getMetadata(getMonitor());
- assertEquals("Only IUs from A", A_UNITCOUNT, queryable.query(QueryUtil.ALL_UNITS, getMonitor()).toUnmodifiableSet().size());
+ context.getMetadata(getMonitor());
IQuery<IArtifactRepository> all = new ExpressionMatchQuery<IArtifactRepository>(IArtifactRepository.class, ExpressionUtil.TRUE_EXPRESSION);
IArtifactRepository[] followed = context.getArtifactRepositories(getMonitor()).query(all, getMonitor()).toArray(IArtifactRepository.class);
- // The immediate artifact repo reference was followed
- assertEquals("1 separately located artifact repos", 1, followed.length);
+ // we only followed what was snapshot and enabled
+ // It is possible that we didn't follow everything because we don't know for sure that every repo was
+ // reachable. The best we can test is that we followed no more than the enabled, but possibly less
+ assertTrue("1.1", artifactRepoCount >= followed.length);
+ // nothing should have changed
+ checkSnapShots();
}
- public void testContextOneRepoWithFollow() {
+ public void testContextAllReposWithFollow() throws ProvisionException {
+ snapShot();
ProvisioningContext context = new ProvisioningContext(getAgent());
- context.setMetadataRepositories(new URI[] {repoA.getLocation()});
- context.setArtifactRepositories(new URI[0]);
+ context.getMetadata(getMonitor());
+ IQuery<IArtifactRepository> all = new ExpressionMatchQuery<IArtifactRepository>(IArtifactRepository.class, ExpressionUtil.TRUE_EXPRESSION);
+ IArtifactRepository[] followed = context.getArtifactRepositories(getMonitor()).query(all, getMonitor()).toArray(IArtifactRepository.class);
+
+ int allThatLoaded = followed.length;
+ // Now try again following references
context.setProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES, "true");
- IQueryable<IInstallableUnit> queryable = context.getMetadata(getMonitor());
- assertTrue("More IUs", queryable.query(QueryUtil.ALL_UNITS, getMonitor()).toUnmodifiableSet().size() >= A_UNITCOUNT + 2);
- IInstallableUnit[] units = queryable.query(QueryUtil.createIUQuery("B"), getMonitor()).toArray(IInstallableUnit.class);
- assertTrue("should find B", units.length > 0);
- units = queryable.query(QueryUtil.createIUQuery("C"), getMonitor()).toArray(IInstallableUnit.class);
- assertTrue("should find C", units.length > 0);
+ context.getMetadata(getMonitor());
+ followed = context.getArtifactRepositories(getMonitor()).query(all, getMonitor()).toArray(IArtifactRepository.class);
+
+ // We should have followed at least two additional repositories (we don't know what disabled references might be in other repos)
+ assertTrue("1.1", followed.length >= allThatLoaded + 2);
+ checkSnapShots();
+ }
+
+ public void testContextOneRepoNoFollow() throws ProvisionException {
+ snapShot();
+ ProvisioningContext context = new ProvisioningContext(getAgent());
+ context.setMetadataRepositories(new URI[] {repoLocation.toURI()});
+ context.setArtifactRepositories(new URI[] {repoLocation.toURI()});
+ context.getMetadata(getMonitor());
IQuery<IArtifactRepository> all = new ExpressionMatchQuery<IArtifactRepository>(IArtifactRepository.class, ExpressionUtil.TRUE_EXPRESSION);
IArtifactRepository[] followed = context.getArtifactRepositories(getMonitor()).query(all, getMonitor()).toArray(IArtifactRepository.class);
- // The artifact repo reference was followed
- assertEquals("3 artifact repos", 3, followed.length);
+ assertEquals("1.1", 1, followed.length);
+ // No repos should have been added since we didn't follow references and used only our repo
+ checkSnapShots();
}
- public void testContextTwoRepoNoFollow() {
+ public void testContextOneRepoWithFollow() throws ProvisionException {
+ snapShot();
ProvisioningContext context = new ProvisioningContext(getAgent());
- context.setMetadataRepositories(new URI[] {repoA.getLocation(), repoB.getLocation()});
- context.setArtifactRepositories(new URI[0]);
- IQueryable<IInstallableUnit> queryable = context.getMetadata(getMonitor());
- assertTrue("IUs from A and B", queryable.query(QueryUtil.ALL_UNITS, getMonitor()).toUnmodifiableSet().size() > A_UNITCOUNT);
- IInstallableUnit[] units = queryable.query(QueryUtil.createIUQuery("B"), getMonitor()).toArray(IInstallableUnit.class);
- assertTrue("should find B", units.length > 0);
- units = queryable.query(QueryUtil.createIUQuery("C"), getMonitor()).toArray(IInstallableUnit.class);
- assertFalse("should not find C", units.length > 0);
+ context.setMetadataRepositories(new URI[] {repoLocation.toURI()});
+ context.setArtifactRepositories(new URI[] {repoLocation.toURI()});
+ context.setProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES, "true");
+ context.getMetadata(getMonitor());
+ IQuery<IArtifactRepository> all = new ExpressionMatchQuery<IArtifactRepository>(IArtifactRepository.class, ExpressionUtil.TRUE_EXPRESSION);
+ IArtifactRepository[] followed = context.getArtifactRepositories(getMonitor()).query(all, getMonitor()).toArray(IArtifactRepository.class);
+ // three repositories, not just one
+ assertEquals("1.1", 3, followed.length);
+ checkSnapShots();
+ }
+
+ public void testContextTwoRepoNoFollow() throws ProvisionException {
+ snapShot();
+ ProvisioningContext context = new ProvisioningContext(getAgent());
+ context.setMetadataRepositories(new URI[] {repoLocation.toURI(), referredRepoLocation1.toURI()});
+ context.setArtifactRepositories(new URI[] {repoLocation.toURI(), referredRepoLocation1.toURI()});
+ assertFalse("1.1", getArtifactRepositoryManager().contains(referredRepoLocation1.toURI()));
+ assertFalse("1.2", getMetadataRepositoryManager().contains(referredRepoLocation1.toURI()));
+ assertFalse("1.3", getArtifactRepositoryManager().contains(referredRepoLocation2.toURI()));
+ assertFalse("1.4", getMetadataRepositoryManager().contains(referredRepoLocation2.toURI()));
+
+ context.getMetadata(getMonitor());
IQuery<IArtifactRepository> all = new ExpressionMatchQuery<IArtifactRepository>(IArtifactRepository.class, ExpressionUtil.TRUE_EXPRESSION);
IArtifactRepository[] followed = context.getArtifactRepositories(getMonitor()).query(all, getMonitor()).toArray(IArtifactRepository.class);
- assertEquals("two artifact repos", 2, followed.length);
+ // With no following, we keep the legacy behavior. Putting a repo in the context will cause it to be loaded (and added)
+ // The snapshot is not the same. We should see referredRepoLocation1 in the manager because it was explicitly added to the context
+ assertEquals("1.5", 2, followed.length);
+ assertTrue("1.6", getArtifactRepositoryManager().isEnabled(referredRepoLocation1.toURI()));
+ assertTrue("1.7", getMetadataRepositoryManager().isEnabled(referredRepoLocation1.toURI()));
+
+ // referredRepoLocation2 was added by reference due to loading of referredRepoLocation1, but should not be enabled
+ assertFalse("1.8", getArtifactRepositoryManager().isEnabled(referredRepoLocation2.toURI()));
+ assertFalse("1.9", getMetadataRepositoryManager().isEnabled(referredRepoLocation2.toURI()));
}
- public void testContextTwoRepoWithFollow() {
+ public void testContextTwoRepoWithFollow() throws ProvisionException {
+ snapShot();
ProvisioningContext context = new ProvisioningContext(getAgent());
- context.setMetadataRepositories(new URI[] {repoA.getLocation(), repoB.getLocation()});
- context.setArtifactRepositories(new URI[0]);
+ context.setMetadataRepositories(new URI[] {repoLocation.toURI(), referredRepoLocation1.toURI()});
+ context.setArtifactRepositories(new URI[] {repoLocation.toURI(), referredRepoLocation1.toURI()});
context.setProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES, "true");
- IQueryable<IInstallableUnit> queryable = context.getMetadata(getMonitor());
- assertTrue("More IUs", queryable.query(QueryUtil.ALL_UNITS, getMonitor()).toUnmodifiableSet().size() >= A_UNITCOUNT + 2);
- IInstallableUnit[] units = queryable.query(QueryUtil.createIUQuery("B"), getMonitor()).toArray(IInstallableUnit.class);
- assertTrue("should find B", units.length > 0);
- units = queryable.query(QueryUtil.createIUQuery("C"), getMonitor()).toArray(IInstallableUnit.class);
- assertTrue("should find C", units.length > 0);
+
+ assertFalse("1.1", getArtifactRepositoryManager().contains(referredRepoLocation1.toURI()));
+ assertFalse("1.2", getMetadataRepositoryManager().contains(referredRepoLocation1.toURI()));
+ assertFalse("1.3", getArtifactRepositoryManager().contains(referredRepoLocation2.toURI()));
+ assertFalse("1.4", getMetadataRepositoryManager().contains(referredRepoLocation2.toURI()));
+
+ context.getMetadata(getMonitor());
IQuery<IArtifactRepository> all = new ExpressionMatchQuery<IArtifactRepository>(IArtifactRepository.class, ExpressionUtil.TRUE_EXPRESSION);
IArtifactRepository[] followed = context.getArtifactRepositories(getMonitor()).query(all, getMonitor()).toArray(IArtifactRepository.class);
- assertEquals("three artifact repos", 3, followed.length);
+ // three repositories, not just two
+ assertEquals("1.5", 3, followed.length);
+
+ // however putting the referred location in the provisioning context caused it to get added.
+ assertTrue("1.6", getArtifactRepositoryManager().isEnabled(referredRepoLocation1.toURI()));
+ assertTrue("1.7", getMetadataRepositoryManager().isEnabled(referredRepoLocation1.toURI()));
+
+ // referredRepoLocation2 was added by reference due to loading of referredRepoLocation1, but should not be enabled
+ assertFalse("1.8", getArtifactRepositoryManager().isEnabled(referredRepoLocation2.toURI()));
+ assertFalse("1.9", getMetadataRepositoryManager().isEnabled(referredRepoLocation2.toURI()));
}
- public void testContextThreeRepoNoFollow() {
+ public void testContextThreeRepoNoFollow() throws ProvisionException {
+ snapShot();
ProvisioningContext context = new ProvisioningContext(getAgent());
- context.setMetadataRepositories(new URI[] {repoA.getLocation(), repoB.getLocation(), repoC.getLocation()});
- context.setArtifactRepositories(new URI[0]);
- IQueryable<IInstallableUnit> queryable = context.getMetadata(getMonitor());
- assertTrue("More IUs", queryable.query(QueryUtil.ALL_UNITS, getMonitor()).toUnmodifiableSet().size() >= A_UNITCOUNT + 2);
- IInstallableUnit[] units = queryable.query(QueryUtil.createIUQuery("B"), getMonitor()).toArray(IInstallableUnit.class);
- assertTrue("should find B", units.length > 0);
- units = queryable.query(QueryUtil.createIUQuery("C"), getMonitor()).toArray(IInstallableUnit.class);
- assertTrue("should find C", units.length > 0);
+ context.setMetadataRepositories(new URI[] {repoLocation.toURI(), referredRepoLocation1.toURI(), referredRepoLocation2.toURI()});
+ context.setArtifactRepositories(new URI[] {repoLocation.toURI(), referredRepoLocation1.toURI(), referredRepoLocation2.toURI()});
+ assertFalse("1.1", getArtifactRepositoryManager().contains(referredRepoLocation1.toURI()));
+ assertFalse("1.2", getMetadataRepositoryManager().contains(referredRepoLocation1.toURI()));
+ assertFalse("1.3", getArtifactRepositoryManager().contains(referredRepoLocation2.toURI()));
+ assertFalse("1.4", getMetadataRepositoryManager().contains(referredRepoLocation2.toURI()));
+
+ context.getMetadata(getMonitor());
IQuery<IArtifactRepository> all = new ExpressionMatchQuery<IArtifactRepository>(IArtifactRepository.class, ExpressionUtil.TRUE_EXPRESSION);
IArtifactRepository[] followed = context.getArtifactRepositories(getMonitor()).query(all, getMonitor()).toArray(IArtifactRepository.class);
- assertEquals("three artifact repos", 3, followed.length);
+ // With no following, we keep the legacy behavior. Putting a repo in the context will cause it to be loaded (and added)
+ // The snapshot is not the same. We should see referredRepoLocation1 and referredRepoLocaiton2 in the manager because both were
+ // explicitly added to the context
+ assertEquals("1.5", 3, followed.length);
+ assertTrue("1.6", getArtifactRepositoryManager().isEnabled(referredRepoLocation1.toURI()));
+ assertTrue("1.7", getMetadataRepositoryManager().isEnabled(referredRepoLocation1.toURI()));
+ assertFalse("1.8", getArtifactRepositoryManager().isEnabled(referredRepoLocation2.toURI()));
+ assertFalse("1.9", getMetadataRepositoryManager().isEnabled(referredRepoLocation2.toURI()));
}
- public void testContextThreeRepoWithFollow() {
+ public void testContextThreeRepoWithFollow() throws ProvisionException {
+ snapShot();
ProvisioningContext context = new ProvisioningContext(getAgent());
- context.setMetadataRepositories(new URI[] {repoA.getLocation(), repoB.getLocation(), repoC.getLocation()});
- context.setArtifactRepositories(new URI[0]);
+ context.setMetadataRepositories(new URI[] {repoLocation.toURI(), referredRepoLocation1.toURI(), referredRepoLocation2.toURI()});
+ context.setArtifactRepositories(new URI[] {repoLocation.toURI(), referredRepoLocation1.toURI(), referredRepoLocation2.toURI()});
context.setProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES, "true");
- IQueryable<IInstallableUnit> queryable = context.getMetadata(getMonitor());
- assertTrue("More IUs", queryable.query(QueryUtil.ALL_UNITS, getMonitor()).toUnmodifiableSet().size() >= A_UNITCOUNT + 2);
- IInstallableUnit[] units = queryable.query(QueryUtil.createIUQuery("B"), getMonitor()).toArray(IInstallableUnit.class);
- assertTrue("should find B", units.length > 0);
- units = queryable.query(QueryUtil.createIUQuery("C"), getMonitor()).toArray(IInstallableUnit.class);
- assertTrue("should find C", units.length > 0);
+
+ assertFalse("1.1", getArtifactRepositoryManager().contains(referredRepoLocation1.toURI()));
+ assertFalse("1.2", getMetadataRepositoryManager().contains(referredRepoLocation1.toURI()));
+ assertFalse("1.3", getArtifactRepositoryManager().contains(referredRepoLocation2.toURI()));
+ assertFalse("1.4", getMetadataRepositoryManager().contains(referredRepoLocation2.toURI()));
+
+ context.getMetadata(getMonitor());
IQuery<IArtifactRepository> all = new ExpressionMatchQuery<IArtifactRepository>(IArtifactRepository.class, ExpressionUtil.TRUE_EXPRESSION);
IArtifactRepository[] followed = context.getArtifactRepositories(getMonitor()).query(all, getMonitor()).toArray(IArtifactRepository.class);
- assertEquals("three artifact repos", 3, followed.length);
+ // three repositories followed
+ assertEquals("1.5", 3, followed.length);
+
+ // however putting all referred locations in the provisioning context caused them to get added.
+ assertTrue("1.6", getArtifactRepositoryManager().isEnabled(referredRepoLocation1.toURI()));
+ assertTrue("1.7", getMetadataRepositoryManager().isEnabled(referredRepoLocation1.toURI()));
+ assertFalse("1.8", getArtifactRepositoryManager().isEnabled(referredRepoLocation2.toURI()));
+ assertFalse("1.9", getMetadataRepositoryManager().isEnabled(referredRepoLocation2.toURI()));
}
- public void testContextNoReposNoFollow() {
+ public void testContextNoReposNoFollow() throws ProvisionException {
+ snapShot();
ProvisioningContext context = new ProvisioningContext(getAgent());
context.setArtifactRepositories(new URI[0]);
context.setMetadataRepositories(new URI[0]);
@@ -170,9 +329,11 @@ public class ProvisioningContextTest extends AbstractProvisioningTest {
IQuery<IArtifactRepository> all = new ExpressionMatchQuery<IArtifactRepository>(IArtifactRepository.class, ExpressionUtil.TRUE_EXPRESSION);
IArtifactRepository[] followed = context.getArtifactRepositories(getMonitor()).query(all, getMonitor()).toArray(IArtifactRepository.class);
assertEquals("1.1", 0, followed.length);
+ checkSnapShots();
}
- public void testContextNoReposWithFollow() {
+ public void testContextNoReposWithFollow() throws ProvisionException {
+ snapShot();
ProvisioningContext context = new ProvisioningContext(getAgent());
context.setProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES, "true");
context.setArtifactRepositories(new URI[0]);
@@ -181,21 +342,6 @@ public class ProvisioningContextTest extends AbstractProvisioningTest {
IQuery<IArtifactRepository> all = new ExpressionMatchQuery<IArtifactRepository>(IArtifactRepository.class, ExpressionUtil.TRUE_EXPRESSION);
IArtifactRepository[] followed = context.getArtifactRepositories(getMonitor()).query(all, getMonitor()).toArray(IArtifactRepository.class);
assertEquals("1.1", 0, followed.length);
- }
-
- public void testFollowHelpsResolve() {
- createProfile(TEST);
- IProfileChangeRequest request = ProfileChangeRequest.createByProfileId(getAgent(), TEST);
- IInstallableUnit[] units = repoA.query(QueryUtil.createIUQuery("A"), getMonitor()).toArray(IInstallableUnit.class);
- assertTrue("should find A in main repo", units.length > 0);
- request.add(units[0]);
- ProvisioningContext context = new ProvisioningContext(getAgent());
- context.setMetadataRepositories(new URI[] {repoA.getLocation()});
- context.setArtifactRepositories(new URI[0]);
- IProvisioningPlan plan = getPlanner(getAgent()).getProvisioningPlan(request, context, getMonitor());
- assertFalse("resolve should fail with missing requirements", plan.getStatus().isOK());
- context.setProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES, "true");
- plan = getPlanner(getAgent()).getProvisioningPlan(request, context, getMonitor());
- assertTrue("resolve should pass", plan.getStatus().isOK());
+ checkSnapShots();
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/From36to37.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/From36to37.java
new file mode 100644
index 000000000..782c9265e
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/From36to37.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this 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.full;
+
+import java.io.File;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
+import org.eclipse.equinox.p2.tests.reconciler.dropins.AbstractReconcilerTest;
+import org.eclipse.equinox.p2.tests.reconciler.dropins.ReconcilerTestSuite;
+
+public class From36to37 extends AbstractReconcilerTest {
+
+ public From36to37(String string) {
+ super(string);
+ }
+
+ public static Test suite() {
+ TestSuite suite = new ReconcilerTestSuite("org.eclipse.equinox.p2.reconciler.tests.lastrelease.platform.archive");
+ suite.addTest(new From36to37("from36To37"));
+ return suite;
+ }
+
+ public void from36To37() {
+ assertInitialized();
+ String currentBuildRepo = System.getProperty("org.eclipse.equinox.p2.tests.current.build.repo");
+ if (currentBuildRepo == null)
+ currentBuildRepo = "http://download.eclipse.org/eclipse/updates/3.7-I-builds";
+ runInitialize("Initializing 3.6 to get the profile paths properly setup.");
+ SimpleProfileRegistry registry = new SimpleProfileRegistry(getAgent(), new File(output, "eclipse/p2/org.eclipse.equinox.p2.engine/profileRegistry/"), null, false);
+ String initialTimestamp = Long.toString(registry.getProfile("PlatformProfile").getTimestamp());
+
+ //Take 3.6 archive, unzip, run it to update to 3.7
+ assertEquals(0, runDirectorToUpdate("Updating from 3.6 to 3.7", currentBuildRepo, "org.eclipse.platform.ide", "org.eclipse.platform.ide"));
+ assertEquals(0, installAndRunVerifierBundle(null));
+
+ // revert to 3.6
+ assertEquals(0, runDirectorToRevert("Reverting from 3.7 to 3.6", "http://download.eclipse.org/eclipse/updates/3.6", initialTimestamp));
+ assertEquals(0, installAndRunVerifierBundle(null));
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/Install37from36.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/Install37from36.java
new file mode 100644
index 000000000..c13e0bebf
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/Install37from36.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this 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.full;
+
+import java.io.*;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.eclipse.equinox.p2.tests.reconciler.dropins.AbstractReconcilerTest;
+import org.eclipse.equinox.p2.tests.reconciler.dropins.ReconcilerTestSuite;
+
+//Install 3.7 using 3.6
+public class Install37from36 extends AbstractReconcilerTest {
+ public Install37from36(String string) {
+ super(string);
+ }
+
+ public static Test suite() {
+ TestSuite suite = new ReconcilerTestSuite("org.eclipse.equinox.p2.reconciler.tests.lastrelease.platform.archive");
+ suite.addTest(new Install37from36("install37From36"));
+ return suite;
+ }
+
+ public void install37From36() throws IOException {
+ assertInitialized();
+ //Create a new installation of 3.7 using 3.6
+ File installFolder = getTestFolder("install37From36");
+ int result = runDirectorToInstall("Installing 3.7 from 3.6", new File(installFolder, "eclipse"), "http://download.eclipse.org/eclipse/updates/3.7-I-builds", "org.eclipse.platform.ide");
+ if (result != 0) {
+ File logFile = new File(installFolder, "log.log");
+ if (logFile.exists()) {
+ StringBuffer fileContents = new StringBuffer();
+ BufferedReader reader = new BufferedReader(new FileReader(logFile));
+ while (reader.ready())
+ fileContents.append(reader.readLine());
+ reader.close();
+ fail("runDirector returned " + result + "\n" + fileContents.toString());
+ } else {
+ fail("runDirector returned " + result);
+ }
+ }
+ assertEquals(0, installAndRunVerifierBundle(installFolder));
+ }
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/PersistFragment.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/PersistFragment.java
new file mode 100644
index 000000000..e5a4ecf6a
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/PersistFragment.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype, Inc and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.metadata;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collection;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.expression.*;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+public class PersistFragment extends AbstractProvisioningTest {
+
+ public void testPersistFragmentIn35Repo() throws ProvisionException {
+ //Pre 3.6, the host requirements were also persisted as part of the requirements
+ IInstallableUnitFragment fragment = createIUFragment(createEclipseIU("A"), "MyHost", Version.createOSGi(1, 0, 0));
+ File repoFolder = getTempFolder();
+ IMetadataRepository repo = createMetadataRepository(repoFolder.toURI(), null);
+ Collection<IInstallableUnit> ius = new ArrayList<IInstallableUnit>();
+ ius.add(fragment);
+ repo.addInstallableUnits(ius);
+
+ getMetadataRepositoryManager().removeRepository(repoFolder.toURI());
+
+ IInstallableUnit iu = getMetadataRepositoryManager().loadRepository(repoFolder.toURI(), null).query(QueryUtil.createIUQuery("MyHost"), null).toArray(IInstallableUnit.class)[0];
+ assertEquals(1, iu.getRequirements().size());
+
+ assertEquals(fragment.getHost().iterator().next(), iu.getRequirements().iterator().next());
+ assertNoContents(new File(repoFolder, "content.xml"), new String[] {"generation='2'"});
+ }
+
+ //Verify that in a 3.6 formatted IU, the host requirements are not persisted as part of the requirements
+ public void testPersistFragmentIn36Repo() throws ProvisionException {
+ String orExpression = "providedCapabilities.exists(pc | pc.namespace == 'org.eclipse.equinox.p2.iu' && (pc.name == 'org.eclipse.mylyn34' || pc.name == 'org.eclipse.mylyn35'))";
+ IExpression expr = ExpressionUtil.parse(orExpression);
+ IMatchExpression matchExpression = ExpressionUtil.getFactory().matchExpression(expr);
+ IRequirement orRequirement = MetadataFactory.createRequirement(matchExpression, null, 0, 1, true);
+
+ IInstallableUnitFragment fragment = createIUFragment(createEclipseIU("A"), "MyHost", Version.createOSGi(1, 0, 0), new IRequirement[] {orRequirement}, null, null);
+ File repoFolder = getTempFolder();
+ IMetadataRepository repo = createMetadataRepository(repoFolder.toURI(), null);
+ Collection<IInstallableUnit> ius = new ArrayList<IInstallableUnit>();
+ ius.add(fragment);
+ repo.addInstallableUnits(ius);
+
+ getMetadataRepositoryManager().removeRepository(repoFolder.toURI());
+
+ IInstallableUnit iu = getMetadataRepositoryManager().loadRepository(repoFolder.toURI(), null).query(QueryUtil.createIUQuery("MyHost"), null).toArray(IInstallableUnit.class)[0];
+ assertEquals(1, iu.getRequirements().size());
+
+ assertFalse(fragment.getHost().iterator().next().equals(iu.getRequirements().iterator().next()));
+ assertContents(new File(repoFolder, "content.xml"), new String[] {"generation='2'"});
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/PersistNegation.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/PersistNegation.java
new file mode 100644
index 000000000..02c4c9c86
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/PersistNegation.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype, Inc and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.metadata;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collection;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.equinox.internal.p2.metadata.ProvidedCapability;
+import org.eclipse.equinox.internal.p2.metadata.RequiredCapability;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+public class PersistNegation extends AbstractProvisioningTest {
+
+ public void testPersistNegation() throws ProvisionException, OperationCanceledException {
+ MetadataFactory.InstallableUnitDescription iud1 = new MetadataFactory.InstallableUnitDescription();
+ iud1.setId("NegateRWT");
+ iud1.setVersion(Version.create("1.0.0"));
+
+ RequiredCapability req1 = new RequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, "org.eclipse.rap.rwt", new VersionRange("[1.0.0, 2.0.0)"), null, 0, 0, false, null);
+ Collection requirements = new ArrayList();
+ requirements.add(req1);
+ iud1.addRequirements(requirements);
+ Collection capabilities = new ArrayList();
+ capabilities.add(new ProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, "NegateRWT", Version.create("1.0.0")));
+ iud1.addProvidedCapabilities(capabilities);
+ IInstallableUnit iu1 = MetadataFactory.createInstallableUnit(iud1);
+ File tmpFolder = getTempFolder();
+ IMetadataRepository repo = getMetadataRepositoryManager().createRepository(tmpFolder.toURI(), "NegationRepo", IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
+ ArrayList<IInstallableUnit> iu = new ArrayList<IInstallableUnit>();
+ iu.add(iu1);
+ repo.addInstallableUnits(iu);
+
+ assertContents(new File(tmpFolder, "content.xml"), new String[] {"max='0'"});
+ assertContents(new File(tmpFolder, "content.xml"), new String[] {"generation='2'"});
+
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/BatchExecuteMetadataRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/BatchExecuteMetadataRepositoryTest.java
new file mode 100644
index 000000000..bac87731b
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/BatchExecuteMetadataRepositoryTest.java
@@ -0,0 +1,400 @@
+/*******************************************************************************
+* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.tests.metadata.repository;
+
+import java.io.*;
+import java.lang.reflect.Field;
+import java.net.URI;
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+/**
+ * This tests Batch Execution for Metadata Repositories
+ */
+public class BatchExecuteMetadataRepositoryTest extends AbstractProvisioningTest {
+
+ //metadata repository to remove on tear down
+ private File repositoryFile = null;
+ private URI repositoryURI = null;
+
+ protected Collection<IInstallableUnit> createIUInCollection(String id, Version version) {
+ IInstallableUnit iu = createIU(id, version);
+ Collection<IInstallableUnit> result = new ArrayList<IInstallableUnit>(1);
+ result.add(iu);
+ return result;
+ }
+
+ boolean fileContainsString(URI location, String string) throws IOException {
+ StringBuffer buffer = new StringBuffer();
+ BufferedReader reader = new BufferedReader(new FileReader(new File(location)));
+ while (reader.ready())
+ buffer.append(reader.readLine());
+ return buffer.toString().contains(string);
+ }
+
+ /*
+ * This tests that in the normal case, the batch process runs fine
+ */
+ public void testAdd() {
+ try {
+ repositoryFile = getTempFolder();
+ repositoryURI = repositoryFile.toURI();
+ Map properties = new HashMap();
+ final LocalMetadataRepository repo = (LocalMetadataRepository) getMetadataRepositoryManager().createRepository(repositoryURI, "My Repo", IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
+ final URI contentXML = new URI(repositoryFile.toURI().toString() + "/content.xml");
+ IStatus status = repo.executeBatch(new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) {
+ repo.addInstallableUnits(createIUInCollection("foo", Version.emptyVersion));
+ try {
+ assertFalse("1.0", fileContainsString(contentXML, "foo"));
+ } catch (IOException e) {
+ fail("0.99");
+ }
+ }
+ }, new NullProgressMonitor());
+ assertTrue(status.isOK());
+ assertTrue("1.0", fileContainsString(contentXML, "foo"));
+ assertEquals("2.0", 1, repo.query(QueryUtil.createIUQuery("foo"), new NullProgressMonitor()).toSet().size());
+ } catch (Exception e) {
+ fail("Test failed", e);
+ }
+ }
+
+ /*
+ * This tests 3 adds
+ */
+ public void testMultiAdd() {
+ try {
+ repositoryFile = getTempFolder();
+ repositoryURI = repositoryFile.toURI();
+ Map properties = new HashMap();
+ final LocalMetadataRepository repo = (LocalMetadataRepository) getMetadataRepositoryManager().createRepository(repositoryURI, "My Repo", IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
+ final URI contentXML = new URI(repositoryFile.toURI().toString() + "/content.xml");
+ IStatus status = repo.executeBatch(new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) {
+ repo.addInstallableUnits(createIUInCollection("foo", Version.emptyVersion));
+ repo.addInstallableUnits(createIUInCollection("bar", Version.emptyVersion));
+ repo.addInstallableUnits(createIUInCollection("baz", Version.emptyVersion));
+ try {
+ assertFalse("1.0", fileContainsString(contentXML, "foo"));
+ assertFalse("1.0", fileContainsString(contentXML, "bar"));
+ assertFalse("1.0", fileContainsString(contentXML, "baz"));
+ } catch (IOException e) {
+ fail("0.99");
+ }
+ }
+ }, new NullProgressMonitor());
+ assertTrue(status.isOK());
+ assertEquals("1.0", 1, repo.query(QueryUtil.createIUQuery("foo"), new NullProgressMonitor()).toSet().size());
+ assertEquals("1.1", 1, repo.query(QueryUtil.createIUQuery("bar"), new NullProgressMonitor()).toSet().size());
+ assertEquals("1.2", 1, repo.query(QueryUtil.createIUQuery("baz"), new NullProgressMonitor()).toSet().size());
+ assertTrue("2.0", fileContainsString(contentXML, "foo"));
+ assertTrue("2.1", fileContainsString(contentXML, "bar"));
+ assertTrue("2.2", fileContainsString(contentXML, "baz"));
+ } catch (Exception e) {
+ fail("Test failed", e);
+ }
+ }
+
+ /*
+ * This tests multiple adds with an exception thrown. Makes sure that the descriptors are added
+ */
+ public void testMultiAddWithException() {
+ try {
+ repositoryFile = getTempFolder();
+ repositoryURI = repositoryFile.toURI();
+ Map properties = new HashMap();
+ final LocalMetadataRepository repo = (LocalMetadataRepository) getMetadataRepositoryManager().createRepository(repositoryURI, "My Repo", IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
+ final URI contentXML = new URI(repositoryFile.toURI().toString() + "/content.xml");
+ IStatus status = repo.executeBatch(new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) {
+ repo.addInstallableUnits(createIUInCollection("foo", Version.emptyVersion));
+ repo.addInstallableUnits(createIUInCollection("bar", Version.emptyVersion));
+ throw new RuntimeException();
+ }
+ }, new NullProgressMonitor());
+ assertFalse(status.isOK());
+ assertEquals("1.0", 1, repo.query(QueryUtil.createIUQuery("foo"), new NullProgressMonitor()).toSet().size());
+ assertEquals("1.1", 1, repo.query(QueryUtil.createIUQuery("bar"), new NullProgressMonitor()).toSet().size());
+ assertTrue("2.0", fileContainsString(contentXML, "foo"));
+ assertTrue("2.1", fileContainsString(contentXML, "bar"));
+ } catch (Exception e) {
+ fail("Test failed", e);
+ }
+ }
+
+ /*
+ * This tests multiple adds with an exception thrown. Makes sure that the descriptors are added
+ */
+ public void testAddAndRemove() {
+ try {
+ repositoryFile = getTempFolder();
+ repositoryURI = repositoryFile.toURI();
+ Map properties = new HashMap();
+ final LocalMetadataRepository repo = (LocalMetadataRepository) getMetadataRepositoryManager().createRepository(repositoryURI, "My Repo", IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
+ final URI contentXML = new URI(repositoryFile.toURI().toString() + "/content.xml");
+ IStatus status = repo.executeBatch(new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) {
+ Collection<IInstallableUnit> foo = createIUInCollection("foo", Version.emptyVersion);
+ repo.addInstallableUnits(foo);
+ repo.addInstallableUnits(createIUInCollection("bar", Version.emptyVersion));
+ repo.removeInstallableUnits(foo);
+ }
+ }, new NullProgressMonitor());
+ assertTrue(status.isOK());
+ assertEquals("1.0", 0, repo.query(QueryUtil.createIUQuery("foo"), new NullProgressMonitor()).toSet().size());
+ assertEquals("1.1", 1, repo.query(QueryUtil.createIUQuery("bar"), new NullProgressMonitor()).toSet().size());
+ assertFalse("2.0", fileContainsString(contentXML, "foo"));
+ assertTrue("2.1", fileContainsString(contentXML, "bar"));
+ } catch (Exception e) {
+ fail("Test failed", e);
+ }
+ }
+
+ /*
+ * This tests multiple adds with an exception thrown. Makes sure that the descriptors are added
+ */
+ public void testMultiAddAndRemove() {
+ try {
+ repositoryFile = getTempFolder();
+ repositoryURI = repositoryFile.toURI();
+ Map properties = new HashMap();
+ final LocalMetadataRepository repo = (LocalMetadataRepository) getMetadataRepositoryManager().createRepository(repositoryURI, "My Repo", IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
+ final URI contentXML = new URI(repositoryFile.toURI().toString() + "/content.xml");
+ IStatus status = repo.executeBatch(new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) {
+ repo.addInstallableUnits(createIUInCollection("1", Version.emptyVersion));
+ repo.addInstallableUnits(createIUInCollection("2", Version.emptyVersion));
+ repo.addInstallableUnits(createIUInCollection("3", Version.emptyVersion));
+ Collection<IInstallableUnit> foo = createIUInCollection("foo", Version.emptyVersion);
+ repo.addInstallableUnits(foo);
+ repo.addInstallableUnits(createIUInCollection("bar", Version.emptyVersion));
+ repo.removeInstallableUnits(foo);
+ }
+ }, new NullProgressMonitor());
+ assertTrue(status.isOK());
+ assertEquals("1.0", 4, repo.query(QueryUtil.createIUAnyQuery(), new NullProgressMonitor()).toSet().size());
+ assertFalse("2.0", fileContainsString(contentXML, "foo"));
+ } catch (Exception e) {
+ fail("Test failed", e);
+ }
+ }
+
+ /*
+ * This tests that in the normal case, the batch process runs fine
+ */
+ public void testBatchProcessingOK() {
+ try {
+ repositoryFile = getTempFolder();
+ repositoryURI = repositoryFile.toURI();
+ Map properties = new HashMap();
+ final LocalMetadataRepository repo = (LocalMetadataRepository) getMetadataRepositoryManager().createRepository(repositoryURI, "My Repo", IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
+ IStatus status = repo.executeBatch(new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) {
+ // empty
+ }
+ }, new NullProgressMonitor());
+ assertTrue(status.isOK());
+ } catch (Exception e) {
+ fail("Test failed", e);
+ }
+ }
+
+ class FailingSimpleMetadataRepository extends LocalMetadataRepository {
+ boolean executeBatch = false;
+
+ /**
+ * @param repositoryName
+ * @param location
+ * @param properties
+ */
+ public FailingSimpleMetadataRepository() {
+ super(getAgent());
+ }
+
+ public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
+ executeBatch = true;
+ return super.executeBatch(runnable, monitor);
+ }
+
+ public void save() {
+ if (executeBatch)
+ throw new RuntimeException("foo");
+ }
+ }
+
+ /*
+ * This tests that exceptions are properly propagated for a SimpleMetadataRepository
+ */
+ public void testBatchProcessingExceptionsSimple() {
+ try {
+ LocalMetadataRepository simpleMetadataRepository = new FailingSimpleMetadataRepository();
+
+ IStatus status = simpleMetadataRepository.executeBatch(new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) {
+ throw new RuntimeException("bar");
+ }
+ }, new NullProgressMonitor());
+ assertFalse(status.isOK());
+ assertEquals("foo", status.getException().getMessage());
+ assertEquals(1, status.getChildren().length);
+ assertEquals("bar", status.getChildren()[0].getMessage());
+ } catch (Exception e) {
+ fail("Test failed", e);
+ }
+ }
+
+ /*
+ * This tests that exceptions are properly propagated for a SimpleMetadataRepository
+ */
+ public void testBatchProcessingSaveExceptionSimple() {
+ try {
+ LocalMetadataRepository simpleMetadataRepository = new FailingSimpleMetadataRepository();
+
+ IStatus status = simpleMetadataRepository.executeBatch(new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) {
+ // empty
+ }
+ }, new NullProgressMonitor());
+ assertFalse(status.isOK());
+ assertEquals("foo", status.getException().getMessage());
+ } catch (Exception e) {
+ fail("Test failed", e);
+ }
+ }
+
+ class TrackSavignSimpleMetadataRepository extends LocalMetadataRepository {
+ boolean executeBatch = false;
+ public boolean didSave = false;
+
+ /**
+ * @param repositoryName
+ * @param location
+ * @param properties
+ */
+ public TrackSavignSimpleMetadataRepository() {
+ super(getAgent());
+ }
+
+ public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
+ executeBatch = true;
+ return super.executeBatch(runnable, monitor);
+ }
+
+ public void save() {
+ if (executeBatch)
+ didSave = true;
+ }
+ }
+
+ /*
+ * This test ensure that a repository did in fact save the results,
+ * if there was no exception
+ */
+ public void testBatchProcessingTrackSaving() {
+ try {
+ TrackSavignSimpleMetadataRepository simpleMetadataRepository = new TrackSavignSimpleMetadataRepository();
+ simpleMetadataRepository.executeBatch(new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) {
+ //do nothing;
+ }
+ }, new NullProgressMonitor());
+ assertTrue(simpleMetadataRepository.didSave);
+ } catch (Exception e) {
+ fail("Test failed", e);
+ }
+ }
+
+ /*
+ * This test ensures that a repository did in fact save the results, even
+ * if there was an exception
+ */
+ public void testBatchProcessingTrackSavingException() {
+ try {
+ TrackSavignSimpleMetadataRepository simpleMetadataRepository = new TrackSavignSimpleMetadataRepository();
+ simpleMetadataRepository.executeBatch(new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) {
+ throw new RuntimeException();
+ }
+ }, new NullProgressMonitor());
+ assertTrue(simpleMetadataRepository.didSave);
+ } catch (Exception e) {
+ fail("Test failed", e);
+ }
+ }
+
+ /*
+ * This test ensures that the simple repository resets the disableSave flag
+ * even if there is an exception
+ */
+ public void testDisableSaveFlagResetSimple() {
+ try {
+ repositoryFile = getTempFolder();
+ repositoryURI = repositoryFile.toURI();
+ Map properties = new HashMap();
+ final LocalMetadataRepository repo = (LocalMetadataRepository) getMetadataRepositoryManager().createRepository(repositoryURI, "My Repo", IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
+ repo.executeBatch(new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) {
+ throw new RuntimeException();
+ }
+ }, new NullProgressMonitor());
+ Field field = LocalMetadataRepository.class.getDeclaredField("disableSave");
+ field.setAccessible(true);
+ boolean disableSave = field.getBoolean(repo);
+ assertFalse("1.0", disableSave);
+
+ } catch (Exception e) {
+ fail("Test failed", e);
+ }
+ }
+
+ /*
+ * This test ensure that the simple metadata repository disables the
+ * save flag during the batch process
+ */
+ public void testDisableSaveFlagDuringExecutionSimple() {
+ try {
+ repositoryFile = getTempFolder();
+ repositoryURI = repositoryFile.toURI();
+ Map properties = new HashMap();
+ final LocalMetadataRepository repo = (LocalMetadataRepository) getMetadataRepositoryManager().createRepository(repositoryURI, "My Repo", IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
+ repo.executeBatch(new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) {
+ Field field;
+ try {
+ field = LocalMetadataRepository.class.getDeclaredField("disableSave");
+ field.setAccessible(true);
+ boolean disableSave = field.getBoolean(repo);
+ assertTrue("1.0", disableSave);
+ } catch (SecurityException e) {
+ fail("1.1" + e.getMessage());
+ } catch (NoSuchFieldException e) {
+ // TODO Auto-generated catch block
+ fail("1.2" + e.getMessage());
+ } catch (IllegalArgumentException e) {
+ fail("1.2" + e.getMessage());
+ } catch (IllegalAccessException e) {
+ fail("1.2" + e.getMessage());
+ }
+ }
+ }, new NullProgressMonitor());
+
+ } catch (Exception e) {
+ fail("Test failed", e);
+ }
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/RepositorManagerDifferentAgentTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/RepositorManagerDifferentAgentTest.java
new file mode 100644
index 000000000..665dd3fee
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/RepositorManagerDifferentAgentTest.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype - initial API and implementation
+ * IBM - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.metadata.repository;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
+import org.eclipse.equinox.p2.core.*;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.tests.*;
+
+public class RepositorManagerDifferentAgentTest extends AbstractProvisioningTest {
+
+ public void testLoadRepo() throws ProvisionException, IOException {
+ IProvisioningAgentProvider agentProvider = (IProvisioningAgentProvider) ServiceHelper.getService(TestActivator.getContext(), IProvisioningAgentProvider.SERVICE_NAME);
+ File testLocation = TestData.getFile("ProfilePreferencesTest", "DifferentAgent");
+ IProvisioningAgent agent = agentProvider.createAgent(testLocation.toURI());
+ IMetadataRepositoryManager mgr = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+ URI[] repositories = mgr.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
+ //HERE WE SHOULD GET MUCH MORE REPOSITORIES THAN THIS.
+ System.out.println(repositories);
+ fail();
+ }
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/StandaloneSerializationTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/StandaloneSerializationTest.java
new file mode 100644
index 000000000..57ee1642d
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/StandaloneSerializationTest.java
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Sonatype, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.metadata.repository;
+
+import java.io.*;
+import java.util.*;
+import junit.framework.TestCase;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.io.IUDeserializer;
+import org.eclipse.equinox.p2.metadata.io.IUSerializer;
+
+public class StandaloneSerializationTest extends TestCase {
+ public void testNothingToWrite() {
+ try {
+ File f = File.createTempFile(getName(), "iu");
+ OutputStream os;
+ os = new FileOutputStream(f);
+ new IUSerializer(os).write(Collections.EMPTY_LIST);
+ os.close();
+ assertTrue(f.length() > 0);
+ f.delete();
+ } catch (FileNotFoundException e) {
+ fail("problem writing: " + e.getCause().getMessage());
+ } catch (UnsupportedEncodingException e) {
+ fail("problem writing: " + e.getCause().getMessage());
+ } catch (IOException e) {
+ fail("problem writing: " + e.getCause().getMessage());
+ }
+ }
+
+ public void testNoContent() {
+ //Write file w/o content
+ File f = null;
+ try {
+ f = File.createTempFile(getName(), "iu");
+ OutputStream os;
+ os = new FileOutputStream(f);
+ new IUSerializer(os).write(Collections.EMPTY_LIST);
+ os.close();
+ } catch (FileNotFoundException e) {
+ fail("problem writing: " + e.getCause().getMessage());
+ } catch (UnsupportedEncodingException e) {
+ fail("problem writing: " + e.getCause().getMessage());
+ } catch (IOException e) {
+ fail("problem writing: " + e.getCause().getMessage());
+ }
+
+ //Read file written
+ boolean exceptionRaised = false;
+ try {
+ InputStream is;
+ is = new FileInputStream(f);
+ Collection<IInstallableUnit> ius = new IUDeserializer().read(is);
+ assertEquals(0, ius.size());
+ is.close();
+ } catch (FileNotFoundException e) {
+ fail("problem writing: " + e.getCause().getMessage());
+ } catch (UnsupportedEncodingException e) {
+ fail("problem writing: " + e.getCause().getMessage());
+ } catch (IOException e) {
+ exceptionRaised = true;
+ }
+ assertTrue(exceptionRaised);
+
+ f.delete();
+ }
+
+ public void testWritingThenLoading() {
+ MetadataFactory.InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
+ iu.setId("foo");
+ iu.setVersion(Version.create("1.0.0"));
+
+ MetadataFactory.InstallableUnitDescription iu2 = new MetadataFactory.InstallableUnitDescription();
+ iu2.setId("bar");
+ iu2.setVersion(Version.create("1.0.0"));
+ Collection<IInstallableUnit> ius = new ArrayList<IInstallableUnit>();
+ ius.add(MetadataFactory.createInstallableUnit(iu));
+ ius.add(MetadataFactory.createInstallableUnit(iu2));
+
+ File f = null;
+ try {
+ f = File.createTempFile(getName(), "iu");
+ OutputStream os;
+ os = new FileOutputStream(f);
+ new IUSerializer(os).write(ius);
+ os.close();
+ } catch (FileNotFoundException e) {
+ fail("problem writing: " + e.getCause().getMessage());
+ } catch (UnsupportedEncodingException e) {
+ fail("problem writing: " + e.getCause().getMessage());
+ } catch (IOException e) {
+ fail("problem writing: " + e.getCause().getMessage());
+ }
+
+ InputStream is = null;
+ try {
+ is = new FileInputStream(f);
+ assertEquals(2, new IUDeserializer().read(is).size());
+ } catch (FileNotFoundException e) {
+ fail("problem writing: " + e.getCause().getMessage());
+ } catch (UnsupportedEncodingException e) {
+ fail("problem writing: " + e.getCause().getMessage());
+ } catch (IOException e) {
+ fail("problem writing: " + e.getCause().getMessage());
+ } finally {
+ try {
+ is.close();
+ f.delete();
+ } catch (IOException e) {
+ //ignore
+ }
+ }
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug270668.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug270668.java
new file mode 100644
index 000000000..1b5301079
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug270668.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype, Inc and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.planner;
+
+import org.eclipse.equinox.internal.p2.metadata.ProvidedCapability;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.planner.*;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+public class Bug270668 extends AbstractProvisioningTest {
+
+ private IInstallableUnit a1;
+ private IInstallableUnit b1;
+ private IProfile profile;
+ private IPlanner planner;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ a1 = createIU("A", Version.create("1.0.0"), "(os=win32)", new IProvidedCapability[] {new ProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, "A", Version.create("1.0.0"))});
+ b1 = createIU("B", Version.create("1.0.0"), true);
+
+ createTestMetdataRepository(new IInstallableUnit[] {a1, b1});
+
+ profile = createProfile("TestProfile." + getName());
+ planner = createPlanner();
+ }
+
+ public void testInstallStrict() {
+ IProfileChangeRequest pcr = planner.createChangeRequest(profile);
+ pcr.add(a1);
+ pcr.add(b1);
+ IProvisioningPlan plan = planner.getProvisioningPlan(pcr, null, null);
+ assertNotOK(plan.getStatus());
+ assertTrue("Explanation does not mention filter!", plan.getStatus().getChildren()[0].getMessage().contains("filter"));
+ }
+
+ public void testInstallOptional() {
+ IProfileChangeRequest pcr = planner.createChangeRequest(profile);
+ pcr.add(a1);
+ pcr.add(b1);
+ pcr.setInstallableUnitInclusionRules(a1, ProfileInclusionRules.createOptionalInclusionRule(a1));
+ IProvisioningPlan plan = planner.getProvisioningPlan(pcr, null, null);
+ assertOK("Optional install", plan.getStatus());
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572.java
new file mode 100644
index 000000000..4c26c8e8a
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype, Inc and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.planner;
+
+import java.util.Iterator;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.p2.core.*;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.planner.*;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+//This test verify that one patch can replace another one.
+public class Bug300572 extends AbstractProvisioningTest {
+ public void testInstallSecondPatch() throws ProvisionException {
+ IProvisioningAgentProvider provider = getAgentProvider();
+ IProvisioningAgent agent = provider.createAgent(getTestData("Bug300572 data", "testData/bug300572/p2").toURI());
+ IMetadataRepositoryManager repoMgr = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+ //The following repo contains the second patch to be installed
+ IMetadataRepository repo = repoMgr.loadRepository(getTestData("bug300572 data", "testData/bug300572/repo/").toURI(), new NullProgressMonitor());
+ IInstallableUnit[] ius = repo.query(QueryUtil.createIUQuery("hellopatch.feature.group"), null).toArray(IInstallableUnit.class);
+ System.out.println(ius);
+
+ IPlanner planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
+ //The profile already contains a a feature (hellofeature) and a patch for it (hellopatch).
+ IProfile sdkProfile = ((IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME)).getProfile("SDKProfile");
+ assertFalse(sdkProfile.query(QueryUtil.createIUQuery("hellopatch.feature.group"), null).isEmpty());
+ assertFalse(sdkProfile.query(QueryUtil.createIUQuery("hellofeature.feature.group"), null).isEmpty());
+
+ //Try to optionally install the second patch. We install all the IUs from the repo since it contains only the patch and its necessary IUs.
+ IProfileChangeRequest request = planner.createChangeRequest(sdkProfile);
+ IQueryResult<IInstallableUnit> allIUs = repo.query(QueryUtil.ALL_UNITS, null);
+ request.addAll(allIUs.toUnmodifiableSet());
+ for (Iterator<IInstallableUnit> allIUsIterator = allIUs.iterator(); allIUsIterator.hasNext();) {
+ IInstallableUnit iu = allIUsIterator.next();
+ request.setInstallableUnitInclusionRules(iu, ProfileInclusionRules.createOptionalInclusionRule(iu));
+ }
+
+ ProvisioningContext pc = new ProvisioningContext(agent);
+
+ IProvisioningPlan plan = planner.getProvisioningPlan(request, pc, new NullProgressMonitor());
+ assertOK("plan is not ok", plan.getStatus());
+ assertFalse("hellopatch.feature.group not found", plan.getAdditions().query(QueryUtil.createIUQuery("hellopatch.feature.group", Version.create("1.0.2.201001211536")), null).isEmpty());
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small.java
new file mode 100644
index 000000000..4910fee57
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype, Inc and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.planner;
+
+import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.planner.ProfileInclusionRules;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+//This test verify that one patch can replace another one.
+public class Bug300572Small extends AbstractProvisioningTest {
+ IInstallableUnit a1;
+ IInstallableUnit b1, b2, b3;
+ IInstallableUnitPatch p1, p2;
+
+ IProfile profile1;
+ IPlanner planner;
+ IEngine engine;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ //A depends on B
+ a1 = createIU("A", Version.create("1.0.0"), new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[1.0.0, 1.0.0]"), null, false, true)});
+ b1 = createIU("B", Version.createOSGi(1, 0, 0), true);
+ b2 = createIU("B", Version.createOSGi(2, 0, 0), true);
+ b3 = createIU("B", Version.createOSGi(3, 0, 0), true);
+
+ //Patch 1 changes B
+ IRequirementChange change = MetadataFactory.createRequirementChange(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", VersionRange.emptyRange, null, false, false, false), MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[2.0.0, 2.0.0]"), null, false, false, true));
+ p1 = createIUPatch("P", Version.create("1.0.0"), true, new IRequirementChange[] {change}, new IRequirement[][] {{MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", VersionRange.emptyRange, null, false, false)}}, null);
+
+ //Patch 2 changes B
+ IRequirementChange changeP2 = MetadataFactory.createRequirementChange(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", VersionRange.emptyRange, null, false, false, false), MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[3.0.0,3.0.0]"), null, false, false, true));
+ p2 = createIUPatch("P", Version.create("2.0.0"), true, new IRequirementChange[] {changeP2}, new IRequirement[][] {{MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", VersionRange.emptyRange, null, false, false)}}, null);
+
+ createTestMetdataRepository(new IInstallableUnit[] {a1, b1, b2, b3, p1});
+
+ planner = createPlanner();
+ engine = createEngine();
+ }
+
+ public void testInstall() {
+ profile1 = createProfile("TestProfile." + getName());
+ ProfileChangeRequest req1 = new ProfileChangeRequest(profile1);
+ req1.addInstallableUnits(new IInstallableUnit[] {a1});
+ IProvisioningPlan plan1 = planner.getProvisioningPlan(req1, null, null);
+ assertEquals(IStatus.OK, plan1.getStatus().getSeverity());
+ }
+
+ public void testInstallAandP1() {
+ profile1 = createProfile("TestProfile." + getName());
+ ProfileChangeRequest req1 = new ProfileChangeRequest(profile1);
+ req1.addInstallableUnits(new IInstallableUnit[] {a1, p1});
+ IProvisioningPlan plan1 = planner.getProvisioningPlan(req1, null, null);
+ assertEquals(IStatus.OK, plan1.getStatus().getSeverity());
+ }
+
+ public void testInstallAandP2() {
+ profile1 = createProfile("TestProfile." + getName());
+ ProfileChangeRequest req1 = new ProfileChangeRequest(profile1);
+ req1.addInstallableUnits(new IInstallableUnit[] {a1, p2});
+ IProvisioningPlan plan1 = planner.getProvisioningPlan(req1, null, null);
+ assertEquals(IStatus.OK, plan1.getStatus().getSeverity());
+ }
+
+ public void testInstallAandP1AndP2() {
+ profile1 = createProfile("TestProfile." + getName());
+ ProfileChangeRequest req1 = new ProfileChangeRequest(profile1);
+ req1.addInstallableUnits(new IInstallableUnit[] {a1, p1, p2});
+ IProvisioningPlan plan1 = planner.getProvisioningPlan(req1, null, null);
+ assertEquals(IStatus.ERROR, plan1.getStatus().getSeverity());
+ }
+
+ public void testInstallAandP1ThenP2() {
+ profile1 = createProfile("TestProfile." + getName());
+ ProfileChangeRequest req1 = new ProfileChangeRequest(profile1);
+ req1.addInstallableUnits(new IInstallableUnit[] {a1, p1});
+ req1.setInstallableUnitInclusionRules(p1, ProfileInclusionRules.createOptionalInclusionRule(p1));
+ IProvisioningPlan plan1 = planner.getProvisioningPlan(req1, null, null);
+ assertEquals(IStatus.OK, plan1.getStatus().getSeverity());
+ assertContains(plan1.getAdditions().query(QueryUtil.ALL_UNITS, null), p1);
+ assertOK("plan execution", engine.perform(plan1, null));
+
+ ProfileChangeRequest req2 = new ProfileChangeRequest(profile1);
+ req2.addInstallableUnits(new IInstallableUnit[] {p2});
+ req2.setInstallableUnitInclusionRules(p2, ProfileInclusionRules.createOptionalInclusionRule(p2));
+ IProvisioningPlan plan2 = planner.getProvisioningPlan(req2, null, null);
+ assertOK("Planning for installing P2", plan2.getStatus());
+ assertContains(plan2.getAdditions().query(QueryUtil.ALL_UNITS, null), p2);
+ assertContains(plan2.getAdditions().query(QueryUtil.ALL_UNITS, null), b3);
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small2.java
new file mode 100644
index 000000000..c5a58c193
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small2.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype, Inc and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.planner;
+
+import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.planner.ProfileInclusionRules;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+//This test verify that one patch can replace another one.
+public class Bug300572Small2 extends AbstractProvisioningTest {
+ IInstallableUnit featureBeingPatched;
+ IInstallableUnitPatch p1, p2;
+
+ IProfile profile1;
+ IPlanner planner;
+ IEngine engine;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ IMetadataRepository repo = getMetadataRepositoryManager().loadRepository(getTestData("bug300572 data", "testData/bug300572Small/repo/").toURI(), new NullProgressMonitor());
+ featureBeingPatched = repo.query(QueryUtil.createIUQuery("hellofeature.feature.group"), null).iterator().next();
+ p1 = (IInstallableUnitPatch) repo.query(QueryUtil.createIUQuery("hellopatch.feature.group", Version.create("1.0.0")), null).iterator().next();
+ p2 = (IInstallableUnitPatch) repo.query(QueryUtil.createIUQuery("hellopatch.feature.group", Version.create("1.0.2.201001211536")), null).iterator().next();
+
+ planner = createPlanner();
+ engine = createEngine();
+ }
+
+ public void testInstall() {
+ profile1 = createProfile("TestProfile." + getName());
+ ProfileChangeRequest req1 = new ProfileChangeRequest(profile1);
+ req1.addInstallableUnits(new IInstallableUnit[] {featureBeingPatched});
+ IProvisioningPlan plan1 = planner.getProvisioningPlan(req1, null, null);
+ assertEquals(IStatus.OK, plan1.getStatus().getSeverity());
+ }
+
+ public void testInstallAandP1() {
+ profile1 = createProfile("TestProfile." + getName());
+ ProfileChangeRequest req1 = new ProfileChangeRequest(profile1);
+ req1.addInstallableUnits(new IInstallableUnit[] {featureBeingPatched, p1});
+ IProvisioningPlan plan1 = planner.getProvisioningPlan(req1, null, null);
+ assertEquals(IStatus.OK, plan1.getStatus().getSeverity());
+ }
+
+ public void testInstallAandP2() {
+ profile1 = createProfile("TestProfile." + getName());
+ ProfileChangeRequest req1 = new ProfileChangeRequest(profile1);
+ req1.addInstallableUnits(new IInstallableUnit[] {featureBeingPatched, p2});
+ IProvisioningPlan plan1 = planner.getProvisioningPlan(req1, null, null);
+ assertEquals(IStatus.OK, plan1.getStatus().getSeverity());
+ }
+
+ public void testInstallAandP1AndP2() {
+ profile1 = createProfile("TestProfile." + getName());
+ ProfileChangeRequest req1 = new ProfileChangeRequest(profile1);
+ req1.addInstallableUnits(new IInstallableUnit[] {featureBeingPatched, p1, p2});
+ IProvisioningPlan plan1 = planner.getProvisioningPlan(req1, null, null);
+ assertEquals(IStatus.ERROR, plan1.getStatus().getSeverity());
+ }
+
+ public void testInstallAandP1ThenP2() {
+ profile1 = createProfile("TestProfile." + getName());
+ ProfileChangeRequest req1 = new ProfileChangeRequest(profile1);
+ req1.addInstallableUnits(new IInstallableUnit[] {featureBeingPatched, p1});
+ req1.setInstallableUnitInclusionRules(p1, ProfileInclusionRules.createOptionalInclusionRule(p1));
+ IProvisioningPlan plan1 = planner.getProvisioningPlan(req1, null, null);
+ assertEquals(IStatus.OK, plan1.getStatus().getSeverity());
+ assertContains(plan1.getAdditions().query(QueryUtil.ALL_UNITS, null), p1);
+ assertFalse(plan1.getAdditions().query(QueryUtil.createIUQuery("hello", Version.create("1.0.1.200911201237")), null).isEmpty());
+ assertOK("plan execution", engine.perform(plan1, null));
+
+ ProfileChangeRequest req2 = new ProfileChangeRequest(profile1);
+ req2.addInstallableUnits(new IInstallableUnit[] {p2});
+ req2.setInstallableUnitInclusionRules(p2, ProfileInclusionRules.createOptionalInclusionRule(p2));
+ IProvisioningPlan plan2 = planner.getProvisioningPlan(req2, null, null);
+ assertOK("Planning for installing P2", plan2.getStatus());
+ assertContains(plan2.getAdditions().query(QueryUtil.ALL_UNITS, null), p2);
+ assertFalse(plan2.getAdditions().query(QueryUtil.createIUQuery("hello", Version.create("1.0.2.201001211536")), null).isEmpty());
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small3.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small3.java
new file mode 100644
index 000000000..cb3671c5a
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small3.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype, Inc and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.planner;
+
+import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.planner.ProfileInclusionRules;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+//This test verify that one patch can replace another one.
+//In this test we use the metadata from the original bug 300572 and simulate the optional addition of the patches
+public class Bug300572Small3 extends AbstractProvisioningTest {
+ IInstallableUnit featureBeingPatched;
+ IInstallableUnitPatch p1, p2;
+
+ IProfile profile1;
+ IPlanner planner;
+ IEngine engine;
+ private IInstallableUnit p1b;
+ private IInstallableUnit p2b;
+
+ // private IInstallableUnit p2c;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ IMetadataRepository repo = getMetadataRepositoryManager().loadRepository(getTestData("bug300572 data", "testData/bug300572Small/repo/").toURI(), new NullProgressMonitor());
+ featureBeingPatched = repo.query(QueryUtil.createIUQuery("hellofeature.feature.group"), null).iterator().next();
+
+ //All the IUs for the patch
+ p1 = (IInstallableUnitPatch) repo.query(QueryUtil.createIUQuery("hellopatch.feature.group", Version.create("1.0.0")), null).iterator().next();
+ p1b = repo.query(QueryUtil.createIUQuery("hello", Version.create("1.0.1.200911201237")), null).iterator().next();
+ // p1c = repo.query(QueryUtil.createIUQuery("hellopatch.feature.jar", Version.create("1.0.0")), null).iterator().next();
+
+ p2 = (IInstallableUnitPatch) repo.query(QueryUtil.createIUQuery("hellopatch.feature.group", Version.create("1.0.2.201001211536")), null).iterator().next();
+ p2b = repo.query(QueryUtil.createIUQuery("hello", Version.create("1.0.2.201001211536")), null).iterator().next();
+ // p2c = repo.query(QueryUtil.createIUQuery("hellopatch.feature.jar", Version.create("1.0.2.201001211536")), null).iterator().next();
+
+ planner = createPlanner();
+ engine = createEngine();
+ }
+
+ public void testInstallAandP1ThenP2() {
+ profile1 = createProfile("TestProfile." + getName());
+ ProfileChangeRequest req1 = new ProfileChangeRequest(profile1);
+ req1.addInstallableUnits(new IInstallableUnit[] {featureBeingPatched, p1, p1b});
+ req1.setInstallableUnitInclusionRules(p1, ProfileInclusionRules.createOptionalInclusionRule(p1));
+ req1.setInstallableUnitInclusionRules(p1b, ProfileInclusionRules.createOptionalInclusionRule(p1b));
+
+ IProvisioningPlan plan1 = planner.getProvisioningPlan(req1, null, null);
+ assertEquals(IStatus.OK, plan1.getStatus().getSeverity());
+ assertContains(plan1.getAdditions().query(QueryUtil.ALL_UNITS, null), p1);
+ assertOK("plan execution", engine.perform(plan1, null));
+ assertProfileContainsAll("Patch 1 not installed", profile1, new IInstallableUnit[] {p1, p1b});
+
+ ProfileChangeRequest req2 = new ProfileChangeRequest(profile1);
+ req2.addInstallableUnits(new IInstallableUnit[] {p2, p2b});
+ req2.setInstallableUnitInclusionRules(p2, ProfileInclusionRules.createOptionalInclusionRule(p2));
+ req2.setInstallableUnitInclusionRules(p2, ProfileInclusionRules.createOptionalInclusionRule(p2b));
+ IProvisioningPlan plan2 = planner.getProvisioningPlan(req2, null, null);
+ assertOK("Planning for installing P2", plan2.getStatus());
+ assertContains(plan2.getAdditions().query(QueryUtil.ALL_UNITS, null), p2);
+ assertFalse(plan2.getAdditions().query(QueryUtil.createIUQuery(p2b), null).isEmpty());
+ assertFalse(plan2.getAdditions().query(QueryUtil.createIUQuery(p2), null).isEmpty());
+ assertFalse(plan2.getRemovals().query(QueryUtil.createIUQuery(p1), null).isEmpty());
+ assertFalse(plan2.getRemovals().query(QueryUtil.createIUQuery(p1b), null).isEmpty());
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small4.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small4.java
new file mode 100644
index 000000000..f9bc9db56
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small4.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype, Inc and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.planner;
+
+import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.planner.ProfileInclusionRules;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+//This test verify that one patch can replace another one.
+public class Bug300572Small4 extends AbstractProvisioningTest {
+ IInstallableUnit a1;
+ IInstallableUnit b2, b3;
+ IInstallableUnitPatch p1, p2;
+
+ IProfile profile1;
+ IPlanner planner;
+ IEngine engine;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ //A depends on B
+ //It is important to note that B 1.0.0 is not included in the repo on purpose.
+ a1 = createIU("A", Version.create("1.0.0"), new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[1.0.0, 1.0.0]"), null, false, true)});
+ b2 = createIU("B", Version.createOSGi(2, 0, 0), true);
+ b3 = createIU("B", Version.createOSGi(3, 0, 0), true);
+
+ //Patch 1 changes B
+ IRequirementChange change = MetadataFactory.createRequirementChange(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", VersionRange.emptyRange, null, false, false, false), MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[2.0.0, 2.0.0]"), null, false, false, true));
+ p1 = createIUPatch("P", Version.create("1.0.0"), true, new IRequirementChange[] {change}, new IRequirement[][] {{MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", VersionRange.emptyRange, null, false, false)}}, null);
+
+ //Patch 2 changes B
+ IRequirementChange changeP2 = MetadataFactory.createRequirementChange(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", VersionRange.emptyRange, null, false, false, false), MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[3.0.0,3.0.0]"), null, false, false, true));
+ p2 = createIUPatch("P", Version.create("2.0.0"), true, new IRequirementChange[] {changeP2}, new IRequirement[][] {{MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", VersionRange.emptyRange, null, false, false)}}, null);
+
+ createTestMetdataRepository(new IInstallableUnit[] {a1, b2, b3, p1});
+
+ planner = createPlanner();
+ engine = createEngine();
+ }
+
+ public void testInstall() {
+ profile1 = createProfile("TestProfile." + getName());
+ ProfileChangeRequest req1 = new ProfileChangeRequest(profile1);
+ req1.addInstallableUnits(new IInstallableUnit[] {a1});
+ IProvisioningPlan plan1 = planner.getProvisioningPlan(req1, null, null);
+ assertEquals(IStatus.ERROR, plan1.getStatus().getSeverity());
+ }
+
+ public void testInstallAandP1() {
+ profile1 = createProfile("TestProfile." + getName());
+ ProfileChangeRequest req1 = new ProfileChangeRequest(profile1);
+ req1.addInstallableUnits(new IInstallableUnit[] {a1, p1});
+ IProvisioningPlan plan1 = planner.getProvisioningPlan(req1, null, null);
+ assertEquals(IStatus.OK, plan1.getStatus().getSeverity());
+ }
+
+ public void testInstallAandP2() {
+ profile1 = createProfile("TestProfile." + getName());
+ ProfileChangeRequest req1 = new ProfileChangeRequest(profile1);
+ req1.addInstallableUnits(new IInstallableUnit[] {a1, p2});
+ IProvisioningPlan plan1 = planner.getProvisioningPlan(req1, null, null);
+ assertEquals(IStatus.OK, plan1.getStatus().getSeverity());
+ }
+
+ public void testInstallAandP1AndP2() {
+ profile1 = createProfile("TestProfile." + getName());
+ ProfileChangeRequest req1 = new ProfileChangeRequest(profile1);
+ req1.addInstallableUnits(new IInstallableUnit[] {a1, p1, p2});
+ IProvisioningPlan plan1 = planner.getProvisioningPlan(req1, null, null);
+ assertEquals(IStatus.ERROR, plan1.getStatus().getSeverity());
+ }
+
+ public void testInstallAandP1ThenP2() {
+ profile1 = createProfile("TestProfile." + getName());
+ ProfileChangeRequest req1 = new ProfileChangeRequest(profile1);
+ req1.addInstallableUnits(new IInstallableUnit[] {a1, p1});
+ req1.setInstallableUnitInclusionRules(p1, ProfileInclusionRules.createOptionalInclusionRule(p1));
+ IProvisioningPlan plan1 = planner.getProvisioningPlan(req1, null, null);
+ assertEquals(IStatus.OK, plan1.getStatus().getSeverity());
+ assertContains(plan1.getAdditions().query(QueryUtil.ALL_UNITS, null), p1);
+ assertOK("plan execution", engine.perform(plan1, null));
+
+ ProfileChangeRequest req2 = new ProfileChangeRequest(profile1);
+ req2.addInstallableUnits(new IInstallableUnit[] {p2});
+ req2.setInstallableUnitInclusionRules(p2, ProfileInclusionRules.createOptionalInclusionRule(p2));
+ IProvisioningPlan plan2 = planner.getProvisioningPlan(req2, null, null);
+ assertOK("Planning for installing P2", plan2.getStatus());
+ assertContains(plan2.getAdditions().query(QueryUtil.ALL_UNITS, null), p2);
+ assertContains(plan2.getAdditions().query(QueryUtil.ALL_UNITS, null), b3);
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small5.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small5.java
new file mode 100644
index 000000000..6f7a3faa0
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small5.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype, Inc and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.planner;
+
+import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+//This test verify that one patch can replace another one.
+public class Bug300572Small5 extends AbstractProvisioningTest {
+ IInstallableUnit a1;
+ IInstallableUnitPatch p1, p2;
+
+ IProfile profile1;
+ IPlanner planner;
+ IEngine engine;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ //A depends on B
+ //It is important to note that B 1.0.0 is not included in the repo on purpose.
+ a1 = createIU("A", Version.create("1.0.0"), new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[1.0.0, 1.0.0]"), null, false, true)});
+
+ //Patch 1 changes B
+ //However IU satisfying the new requirement is not available
+ IRequirementChange change = MetadataFactory.createRequirementChange(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", VersionRange.emptyRange, null, false, false, false), MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[2.0.0, 2.0.0]"), null, false, false, true));
+ p1 = createIUPatch("P", Version.create("1.0.0"), true, new IRequirementChange[] {change}, new IRequirement[][] {{MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", VersionRange.emptyRange, null, false, false)}}, null);
+
+ //Patch 2 changes B
+ //However IU satisfying the new requirement is not available
+ IRequirementChange changeP2 = MetadataFactory.createRequirementChange(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", VersionRange.emptyRange, null, false, false, false), MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[3.0.0,3.0.0]"), null, false, false, true));
+ p2 = createIUPatch("P", Version.create("2.0.0"), true, new IRequirementChange[] {changeP2}, new IRequirement[][] {{MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", VersionRange.emptyRange, null, false, false)}}, null);
+
+ createTestMetdataRepository(new IInstallableUnit[] {a1, p1, p2});
+
+ planner = createPlanner();
+ engine = createEngine();
+ }
+
+ public void testInstallA() {
+ profile1 = createProfile("TestProfile." + getName());
+ ProfileChangeRequest req1 = new ProfileChangeRequest(profile1);
+ req1.addInstallableUnits(new IInstallableUnit[] {a1});
+ IProvisioningPlan plan1 = planner.getProvisioningPlan(req1, null, null);
+ assertEquals(IStatus.ERROR, plan1.getStatus().getSeverity());
+ }
+
+ public void testInstallAandP1() {
+ profile1 = createProfile("TestProfile." + getName());
+ ProfileChangeRequest req1 = new ProfileChangeRequest(profile1);
+ req1.addInstallableUnits(new IInstallableUnit[] {a1, p1});
+ IProvisioningPlan plan1 = planner.getProvisioningPlan(req1, null, null);
+ assertEquals(IStatus.ERROR, plan1.getStatus().getSeverity());
+ }
+
+ public void testInstallAandP1AndP2() {
+ profile1 = createProfile("TestProfile." + getName());
+ ProfileChangeRequest req1 = new ProfileChangeRequest(profile1);
+ req1.addInstallableUnits(new IInstallableUnit[] {a1, p1, p2});
+ IProvisioningPlan plan1 = planner.getProvisioningPlan(req1, null, null);
+ assertEquals(IStatus.ERROR, plan1.getStatus().getSeverity());
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small6.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small6.java
new file mode 100644
index 000000000..40079762d
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300572Small6.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype, Inc and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.planner;
+
+import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+//This test verify that one patch can replace another one.
+public class Bug300572Small6 extends AbstractProvisioningTest {
+ IInstallableUnit a1, b1, b2, x;
+ IInstallableUnitPatch p1;
+
+ IProfile profile1;
+ IPlanner planner;
+ IEngine engine;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ //A depends on B
+ a1 = createIU("A", Version.create("1.0.0"), new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[1.0.0, 1.0.0]"), null, 0, 1, false)});
+ b1 = createIU("B", Version.create("1.0.0"));
+ b2 = createIU("B", Version.create("2.0.0"), new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "C", new VersionRange("[1.0.0, 1.0.0]"), null, false, false)});
+ x = createIU("X", Version.create("1.0.0"), new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[1.0.0, 1.0.0]"), null, false, false)});
+
+ //Patch 1 changes B
+ //However IU satisfying the new requirement is not available (in this case C is missing)
+ IRequirementChange change = MetadataFactory.createRequirementChange(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", VersionRange.emptyRange, null, false, false, false), MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[2.0.0, 2.0.0]"), null, false, false, true));
+ p1 = createIUPatch("P", Version.create("1.0.0"), true, new IRequirementChange[] {change}, new IRequirement[][] {{MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", VersionRange.emptyRange, null, false, false)}}, null);
+
+ createTestMetdataRepository(new IInstallableUnit[] {a1, b1, b2, x});
+
+ planner = createPlanner();
+ engine = createEngine();
+ }
+
+ public void testInstallAandP1() {
+ profile1 = createProfile("TestProfile." + getName());
+ ProfileChangeRequest req1 = new ProfileChangeRequest(profile1);
+ req1.addInstallableUnits(new IInstallableUnit[] {a1, p1, x}); //Here we are installing X just to have b1 be brought into the slice
+ IProvisioningPlan plan1 = planner.getProvisioningPlan(req1, null, null);
+ assertEquals(IStatus.ERROR, plan1.getStatus().getSeverity());
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug301446.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug301446.java
new file mode 100644
index 000000000..f7e19f5ee
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug301446.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this 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.planner;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.internal.p2.engine.*;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+
+public class Bug301446 extends AbstractPlannerTest {
+
+ static final Map EXPECTED_VERSIONS = new HashMap();
+ static {
+ EXPECTED_VERSIONS.put("com.ibm.commerce.toolkit.internal.common", Version.create("7.0.0.1"));
+ EXPECTED_VERSIONS.put("com.ibm.commerce.toolkit.internal.dataaccess", Version.create("7.0.0.1"));
+ EXPECTED_VERSIONS.put("com.ibm.commerce.toolkit.internal.feature.enablement", Version.create("7.0.0.5"));
+ EXPECTED_VERSIONS.put("com.ibm.commerce.toolkit.internal.openlaszlo", Version.create("7.0.0.6"));
+ EXPECTED_VERSIONS.put("com.ibm.commerce.toolkit.internal.openlaszlo.migration", Version.create("7.0.2.0"));
+ EXPECTED_VERSIONS.put("com.ibm.commerce.toolkit.internal.openlaszlo.migration.validation", Version.create("7.0.2.0"));
+ EXPECTED_VERSIONS.put("com.ibm.commerce.toolkit.internal.plugin", Version.create("7.0.0.7"));
+ }
+
+ // path to our data
+ protected String getTestDataPath() {
+ return "testData/bug301446";
+ }
+
+ // profile id
+ protected String getProfileId() {
+ return "bootProfile";
+ }
+
+ public void testInstall() {
+ IPlanner planner = createPlanner();
+
+ // create the actual plan - install everything in the repo as optional (mimic the dropins folder)
+ IQueryResult allIUs = repo.query(QueryUtil.createIUAnyQuery(), new NullProgressMonitor());
+ IProfileChangeRequest actualChangeRequest = createProfileChangeRequest(allIUs.toSet(), null, null);
+ // TODO: verify that we are going to try and install the highest version of everything
+ IProvisioningPlan actualPlan = planner.getProvisioningPlan(actualChangeRequest, null, new NullProgressMonitor());
+
+ // this is the plan that we expect - highest version only
+ Operand[] operands = ((ProvisioningPlan) actualPlan).getOperands();
+ for (int i = 0; i < operands.length; i++) {
+ Operand o = operands[i];
+ if (!(o instanceof InstallableUnitOperand))
+ continue;
+ IInstallableUnit iu = ((InstallableUnitOperand) o).second();
+ if (iu == null) {
+ // we are un-installing an IU, is it interesting?
+ iu = ((InstallableUnitOperand) o).first();
+ Version expected = (Version) EXPECTED_VERSIONS.get(iu.getId());
+ if (expected == null)
+ continue;
+ Version actual = iu.getVersion();
+ assertFalse("Removing IU: " + iu.getId() + " Version: " + expected, actual.equals(expected));
+ continue;
+ }
+ // we are installing an IU
+ Version expected = (Version) EXPECTED_VERSIONS.get(iu.getId());
+ if (expected == null)
+ continue;
+ Version actual = iu.getVersion();
+ assertTrue("Adding IU: " + iu.getId() + " Actual: " + actual + " Expected: " + expected, actual.equals(expected));
+ }
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug306279f.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug306279f.java
new file mode 100644
index 000000000..c77057c4d
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug306279f.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype, Inc and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.planner;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.p2.core.*;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+public class Bug306279f extends AbstractProvisioningTest {
+ public void testInstallBabel() throws ProvisionException {
+ IProvisioningAgentProvider provider = getAgentProvider();
+ IProvisioningAgent agent = provider.createAgent(getTestData("bug306279f data", "testData/bug306279f/p2").toURI());
+ IMetadataRepositoryManager repoMgr = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+ repoMgr.addRepository(getTestData("bug306279f data", "testData/bug306279f/repo/helios/").toURI());
+ repoMgr.addRepository(getTestData("bug306279f data", "testData/bug306279f/repo/babel").toURI());
+
+ IPlanner planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
+ IProfile sdkProfile = ((IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME)).getProfile("SDKProfile");
+ IProfileChangeRequest request = planner.createChangeRequest(sdkProfile);
+ request.add(repoMgr.query(QueryUtil.createIUQuery("org.eclipse.babel.nls_rt.rap_en_AA.feature.group"), null).iterator().next());
+
+ ProvisioningContext pc = new ProvisioningContext(agent);
+
+ IProvisioningPlan plan = planner.getProvisioningPlan(request, pc, new NullProgressMonitor());
+ assertOK("plan is not ok", plan.getStatus());
+ assertTrue("should not contain rap.jface", plan.getAdditions().query(QueryUtil.createIUQuery("org.eclipse.rap.jface"), null).isEmpty());
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug311330.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug311330.java
new file mode 100644
index 000000000..29c56c535
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug311330.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype, Inc and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.planner;
+
+import java.net.URI;
+import java.util.ArrayList;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.internal.p2.metadata.RequiredCapability;
+import org.eclipse.equinox.p2.core.*;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+public class Bug311330 extends AbstractProvisioningTest {
+ public void testValidateProfile() throws ProvisionException {
+ IProvisioningAgentProvider provider = getAgentProvider();
+ IProvisioningAgent agent = provider.createAgent(getTestData("bug311330 data", "testData/bug311330/p2").toURI());
+ IPlanner planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
+ IProfile sdkProfile = ((IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME)).getProfile("SDKProfile");
+ IProfileChangeRequest request = planner.createChangeRequest(sdkProfile);
+ assertFalse("rap.jface not found", sdkProfile.available(QueryUtil.createIUQuery("org.eclipse.rap.jface"), null).isEmpty());
+
+ // Force negation of rwt.
+ RequiredCapability req1 = new RequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, "org.eclipse.rap.jface", new VersionRange("[1.1.0, 1.4.0)"), null, 0, 0, false, null);
+ ArrayList<IRequirement> reqs = new ArrayList();
+ reqs.add(req1);
+ request.addExtraRequirements(reqs);
+
+ ProvisioningContext pc = new ProvisioningContext(agent);
+ pc.setMetadataRepositories(new URI[0]);
+ pc.setArtifactRepositories(new URI[0]);
+
+ IProvisioningPlan plan = planner.getProvisioningPlan(request, pc, new NullProgressMonitor());
+ assertFalse("should remove rap.jface", plan.getRemovals().query(QueryUtil.createIUQuery("org.eclipse.rap.jface"), null).isEmpty());
+ assertOK("plan is not ok", plan.getStatus());
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug329279.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug329279.java
new file mode 100644
index 000000000..5c9814f78
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug329279.java
@@ -0,0 +1,34 @@
+package org.eclipse.equinox.p2.tests.planner;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+public class Bug329279 extends AbstractProvisioningTest {
+
+ private IProfile profile;
+ private IPlanner planner;
+
+ public void testInstallSourceFeature() throws ProvisionException, OperationCanceledException {
+ profile = createProfile("TestProfile." + getName());
+ planner = createPlanner();
+ IMetadataRepository repo = getMetadataRepositoryManager().loadRepository(getTestData("Repo for 329279", "testData/bug329279/repo/").toURI(), new NullProgressMonitor());
+ IInstallableUnit sdk = repo.query(QueryUtil.createIUQuery("org.eclipse.sdk.ide"), new NullProgressMonitor()).iterator().next();
+ assertNotNull(sdk);
+ assertFalse(repo.query(QueryUtil.createIUQuery("org.eclipse.equinox.p2.user.ui.source.feature.group"), new NullProgressMonitor()).isEmpty());
+
+ IProfileChangeRequest req = planner.createChangeRequest(profile);
+ req.add(sdk);
+
+ IProvisioningPlan plan = planner.getProvisioningPlan(req, null, new NullProgressMonitor());
+ assertFalse(plan.getAdditions().query(QueryUtil.createIUQuery("org.eclipse.equinox.p2.user.ui.source.feature.group"), new NullProgressMonitor()).isEmpty());
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/EPPPackageInstallStability_bug323322.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/EPPPackageInstallStability_bug323322.java
new file mode 100644
index 000000000..31524cc2e
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/EPPPackageInstallStability_bug323322.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype - initial API and implementation
+ * IBM Corporation - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.planner;
+
+import java.net.URI;
+import java.util.*;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.p2.core.*;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+public class EPPPackageInstallStability_bug323322 extends AbstractProvisioningTest {
+
+ public void testInstallEppJavaPackage() throws ProvisionException {
+ IProvisioningAgentProvider provider = getAgentProvider();
+ IProvisioningAgent agent = provider.createAgent(getTempFolder().toURI());
+ IMetadataRepositoryManager repoMgr = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+ repoMgr.addRepository(getTestData("Helios SR0", "testData/helios-sr0/").toURI());
+
+ IPlanner planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
+ Map<String, String> profileArgs = new HashMap<String, String>();
+ profileArgs.put("osgi.os", "linux");
+ profileArgs.put("osgi.ws", "gtk");
+ profileArgs.put("osgi.arch", "x86");
+
+ Set<IInstallableUnit> iusFromFirstResolution = new HashSet<IInstallableUnit>();
+ {
+ IProfile eppProfile1 = ((IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME)).addProfile("epp.install.1", profileArgs);
+ IProfileChangeRequest request = planner.createChangeRequest(eppProfile1);
+ request.add(repoMgr.query(QueryUtil.createIUQuery("epp.package.java"), null).iterator().next());
+
+ ProvisioningContext pc = new ProvisioningContext(agent);
+
+ IProvisioningPlan plan = planner.getProvisioningPlan(request, pc, new NullProgressMonitor());
+ assertOK("plan is not ok", plan.getStatus());
+
+ //Extract all the unresolved IUs.
+ Set tmp = plan.getAdditions().query(QueryUtil.ALL_UNITS, new NullProgressMonitor()).query(QueryUtil.ALL_UNITS, null).toSet();
+ for (Iterator iterator = tmp.iterator(); iterator.hasNext();) {
+ IInstallableUnit iu = (IInstallableUnit) iterator.next();
+ iusFromFirstResolution.add(iu.unresolved());
+ }
+ }
+
+ {
+ IProfile eppProfile2 = ((IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME)).addProfile("epp.install.2", profileArgs);
+ IProfileChangeRequest request = planner.createChangeRequest(eppProfile2);
+ request.add(repoMgr.query(QueryUtil.createIUQuery("epp.package.java"), null).iterator().next());
+
+ ProvisioningContext pc = new ProvisioningContext(agent);
+ pc.setMetadataRepositories(new URI[0]);
+ pc.setArtifactRepositories(new URI[0]);
+ pc.setExtraInstallableUnits(new ArrayList(iusFromFirstResolution));
+
+ IProvisioningPlan plan = planner.getProvisioningPlan(request, pc, new NullProgressMonitor());
+ assertOK("plan is not ok", plan.getStatus());
+
+ Set tmp = plan.getAdditions().query(QueryUtil.ALL_UNITS, new NullProgressMonitor()).query(QueryUtil.ALL_UNITS, null).toSet();
+ Set<IInstallableUnit> iusFromSecondResolution = new HashSet<IInstallableUnit>();
+ for (Iterator iterator = tmp.iterator(); iterator.hasNext();) {
+ IInstallableUnit iu = (IInstallableUnit) iterator.next();
+ iusFromSecondResolution.add(iu.unresolved());
+ }
+
+ assertEquals(iusFromFirstResolution.size(), iusFromSecondResolution.size());
+ }
+
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MinimalInstall2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MinimalInstall2.java
new file mode 100644
index 000000000..b80679d41
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MinimalInstall2.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Sonatype, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.planner;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+public class MinimalInstall2 extends AbstractProvisioningTest {
+ IInstallableUnit kernelRoot;
+ IInstallableUnit kernelBundle;
+
+ IInstallableUnit userRegionRoot;
+ IInstallableUnit userRegionBundle;
+
+ IInstallableUnit userRegionRoot2;
+ IInstallableUnit kernelProxy;
+
+ IInstallableUnit commonDep;
+
+ IProfile profile;
+ IPlanner planner;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ kernelRoot = createIU("KernelRoot", Version.create("1.0.0"), createRequiredCapabilities(IInstallableUnit.NAMESPACE_IU_ID, "KernelBundle", new VersionRange("[1.0.0, 2.0.0)")));
+ kernelBundle = createIU("KernelBundle", Version.create("1.0.0"), new IProvidedCapability[] {MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, "KernelBundle", Version.create("1.0.0")), MetadataFactory.createProvidedCapability("java.package", "kernel.package", Version.create("1.0.0"))});
+
+ userRegionRoot = createIU("UserRegionRoot", Version.create("1.0.0"), createRequiredCapabilities(IInstallableUnit.NAMESPACE_IU_ID, "UserRegionBundle", new VersionRange("[1.0.0, 2.0.0)")));
+ userRegionBundle = createIU("UserRegionBundle", Version.create("1.0.0"), createRequiredCapabilities("java.package", "kernel.package"));
+
+ IRequirement[] reqs = new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "UserRegionBundle", new VersionRange("[1.0.0, 2.0.0)"), null, false, false, true), MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "KernelProxy", new VersionRange("[1.0.0, 2.0.0)"), null, false, false, true)};
+ userRegionRoot2 = createIU("UserRegionRoot2", reqs);
+ kernelProxy = createIU("KernelProxy", Version.create("1.0.0"), new IProvidedCapability[] {MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, "KernelProxy", Version.create("1.0.0")), MetadataFactory.createProvidedCapability("java.package", "kernel.package", Version.create("1.0.0"))});
+
+ createTestMetdataRepository(new IInstallableUnit[] {kernelRoot, kernelBundle, userRegionRoot, userRegionBundle, userRegionRoot2, kernelProxy});
+
+ profile = createProfile("TestProfile." + getName());
+ planner = createPlanner();
+ }
+
+ public void testInstallUserRegion() {
+ ProfileChangeRequest req = new ProfileChangeRequest(profile);
+ req.addInstallableUnits(new IInstallableUnit[] {userRegionRoot});
+ IProvisioningPlan pplan = planner.getProvisioningPlan(req, null, null);
+ assertEquals(IStatus.OK, pplan.getStatus().getSeverity());
+ assertEquals(3, pplan.getAdditions().query(QueryUtil.ALL_UNITS, new NullProgressMonitor()).toSet().size());
+ }
+
+ public void testInstallUserRegion2() {
+ ProfileChangeRequest req = new ProfileChangeRequest(profile);
+ req.addInstallableUnits(new IInstallableUnit[] {userRegionRoot2});
+ IProvisioningPlan pplan = planner.getProvisioningPlan(req, null, null);
+ assertEquals(IStatus.OK, pplan.getStatus().getSeverity());
+ assertEquals(3, pplan.getAdditions().query(QueryUtil.ALL_UNITS, new NullProgressMonitor()).toSet().size());
+ assertFalse(pplan.getAdditions().query(QueryUtil.createIUQuery(userRegionRoot2.getId()), new NullProgressMonitor()).isEmpty());
+ assertFalse(pplan.getAdditions().query(QueryUtil.createIUQuery(kernelProxy.getId()), new NullProgressMonitor()).isEmpty());
+ assertFalse(pplan.getAdditions().query(QueryUtil.createIUQuery(userRegionBundle.getId()), new NullProgressMonitor()).isEmpty());
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NoUnecessaryIUProperty.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NoUnecessaryIUProperty.java
new file mode 100644
index 000000000..0eccc26bd
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NoUnecessaryIUProperty.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype, Inc. Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.planner;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+public class NoUnecessaryIUProperty extends AbstractProvisioningTest {
+
+ IProfile profile1;
+ IPlanner planner;
+ IEngine engine;
+ IMetadataRepository repo;
+ IInstallableUnit iuA, iuB;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ profile1 = createProfile("TestProfile." + getName());
+ planner = createPlanner();
+ engine = createEngine();
+ iuA = createIU("A");
+ iuB = createIU("B");
+ }
+
+ //Confirm that the planner will not generate an IUProperty operand if the IU is not in the final profile.
+ public void testIUExtraneousPlanEntry() {
+ IProfileChangeRequest pcr = planner.createChangeRequest(profile1);
+ pcr.add(iuA);
+ pcr.setInstallableUnitProfileProperty(iuB, "theKey", "theValue"); // Try to set a property on an IU that does not end up in plan
+ IProvisioningPlan plan = planner.getProvisioningPlan(pcr, null, new NullProgressMonitor());
+ assertEquals(2, ((ProvisioningPlan) plan).getOperands().length);
+
+ }
+
+ public void testZeroOperands() {
+ IProfileChangeRequest pcr = planner.createChangeRequest(profile1);
+ pcr.setInstallableUnitProfileProperty(iuB, "theKey", "theValue"); // Try to set a property on an IU that does not end up in plan
+ IProvisioningPlan plan = planner.getProvisioningPlan(pcr, null, new NullProgressMonitor());
+ assertEquals(0, ((ProvisioningPlan) plan).getOperands().length);
+
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TopLevelFilterTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TopLevelFilterTest.java
index 5cf1049a4..788c2c815 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TopLevelFilterTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TopLevelFilterTest.java
@@ -12,7 +12,6 @@ package org.eclipse.equinox.p2.tests.planner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.IProvisioningPlan;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
@@ -30,8 +29,7 @@ public class TopLevelFilterTest extends AbstractProvisioningTest {
createTestMetdataRepository(new IInstallableUnit[] {iu});
ProfileChangeRequest req = new ProfileChangeRequest(p);
req.addInstallableUnits(new IInstallableUnit[] {iu});
- IProvisioningPlan plan = createPlanner().getProvisioningPlan(req, null, null);
- assertNotOK(plan.getStatus());
- assertTrue(plan.getStatus().getChildren()[0].getMessage().contains("filter"));
+
+ assertNotOK(createPlanner().getProvisioningPlan(req, null, null).getStatus());
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/UpdateForTwoIUs.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/UpdateForTwoIUs.java
new file mode 100644
index 000000000..fe6dc2447
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/UpdateForTwoIUs.java
@@ -0,0 +1,61 @@
+package org.eclipse.equinox.p2.tests.planner;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collection;
+import org.eclipse.equinox.internal.p2.director.QueryableArray;
+import org.eclipse.equinox.internal.p2.metadata.query.UpdateQuery;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.expression.*;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+public class UpdateForTwoIUs extends AbstractProvisioningTest {
+
+ private IInstallableUnit iua;
+ private Collection<IMatchExpression<IInstallableUnit>> x;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ InstallableUnitDescription iud = new MetadataFactory.InstallableUnitDescription();
+ iud.setId("A");
+ iud.setVersion(Version.create("1.0.0"));
+
+ String orExpression = "providedCapabilities.exists(pc | pc.namespace == 'org.eclipse.equinox.p2.iu' && (pc.name == 'B' || pc.name == 'C'))";
+ IExpression expr = ExpressionUtil.parse(orExpression);
+ IMatchExpression matchExpression = ExpressionUtil.getFactory().matchExpression(expr);
+
+ Collection<IMatchExpression<IInstallableUnit>> updateExpression = new ArrayList<IMatchExpression<IInstallableUnit>>();
+ updateExpression.add(matchExpression);
+ iud.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(updateExpression, IUpdateDescriptor.HIGH, (String) null, (URI) null));
+ iua = MetadataFactory.createInstallableUnit(iud);
+
+ Collection<IInstallableUnit> ius = new ArrayList<IInstallableUnit>();
+ ius.add(iua);
+ URI repoURI = getTempFolder().toURI();
+ createMetadataRepository(repoURI, null).addInstallableUnits(ius);
+ getMetadataRepositoryManager().removeRepository(repoURI);
+
+ x = getMetadataRepositoryManager().loadRepository(repoURI, null).query(QueryUtil.ALL_UNITS, null).iterator().next().getUpdateDescriptor().getIUsBeingUpdated();
+ assertEquals(matchExpression, x.iterator().next());
+ }
+
+ public void testUpdateQueryForTwoIUs() {
+ //This test that A can be an update of B or C. In other words looking for an update of B or an update of C should return A.
+
+ IQueryResult<IInstallableUnit> updates = new QueryableArray(new IInstallableUnit[] {iua}).query(new UpdateQuery(createIU("B")), null);
+ assertFalse(updates.isEmpty());
+ assertEquals(iua, updates.iterator().next());
+
+ IQueryResult<IInstallableUnit> updates2 = new QueryableArray(new IInstallableUnit[] {iua}).query(new UpdateQuery(createIU("C")), null);
+ assertFalse(updates2.isEmpty());
+ assertEquals(iua, updates2.iterator().next());
+
+ IQueryResult<IInstallableUnit> update3 = new QueryableArray(new IInstallableUnit[] {iua}).query(new UpdateQuery(createIU("X")), null);
+ assertTrue(update3.isEmpty());
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ContextRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ContextRepositoryTest.java
new file mode 100644
index 000000000..520bab510
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ContextRepositoryTest.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+* Copyright (c) 2010 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.tests.publisher.actions;
+
+import java.io.File;
+import java.net.URI;
+import org.eclipse.equinox.p2.publisher.*;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+import org.eclipse.equinox.p2.tests.TestActivator;
+
+/**
+ *
+ */
+public class ContextRepositoryTest extends AbstractProvisioningTest {
+
+ /**
+ * runs default director app.
+ */
+ public class TestPublisherApplication extends AbstractPublisherApplication {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.p2.publisher.AbstractPublisherApplication#createActions()
+ */
+ protected IPublisherAction[] createActions() {
+ return new IPublisherAction[0];
+ }
+
+ public IPublisherInfo getInfo() {
+ return info;
+ }
+ }
+
+ public void testContextMetadataRepository() throws Exception {
+ URI tempRepo = getTempFolder().toURI();
+ File repository = new File(TestActivator.getTestDataFolder(), "metadataRepo/good");
+
+ String[] firstRun = new String[] {"-mr", tempRepo.toString(), "-contextMetadata", repository.toURI().toString()};
+ TestPublisherApplication application = new TestPublisherApplication();
+ application.run(firstRun);
+ assertNotNull(application.getInfo().getContextMetadataRepository());
+ }
+
+ public void testContextArtifactRepository() throws Exception {
+ URI tempRepo = getTempFolder().toURI();
+ File repository = new File(TestActivator.getTestDataFolder(), "artifactRepo/simple");
+
+ String[] firstRun = new String[] {"-mr", tempRepo.toString(), "-contextArtifacts", repository.toURI().toString()};
+ TestPublisherApplication application = new TestPublisherApplication();
+ application.run(firstRun);
+ assertNotNull(application.getInfo().getContextArtifactRepository());
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractSharedBundleProductTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractSharedBundleProductTest.java
new file mode 100644
index 000000000..7ae4307d5
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractSharedBundleProductTest.java
@@ -0,0 +1,313 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.reconciler.dropins;
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.internal.p2.update.Configuration;
+import org.eclipse.equinox.internal.p2.update.Site;
+import org.eclipse.equinox.p2.core.ProvisionException;
+
+public class AbstractSharedBundleProductTest extends AbstractReconcilerTest {
+
+ public static final String PLATFORM_BASE = "platform:/base/";
+ protected static String sharedLocationURL = null;
+
+ public AbstractSharedBundleProductTest(String name) {
+ super(name);
+ }
+
+ public AbstractSharedBundleProductTest(String name, String location) {
+ super(name, location);
+ }
+
+ private Map<String, BundleInfo> getBootstrapBundles() {
+ Map<String, BundleInfo> result = new HashMap();
+
+ // TODO deal with fragments
+ // list.add("org.eclipse.core.net.win32.x86");
+ // list.add("org.eclipse.equinox.security.win32.x86");
+ final String[] bootstrap = new String[] { //
+ "org.eclipse.core.contenttype", //
+ "org.eclipse.core.expressions", //
+ "org.eclipse.core.jobs", //
+ "org.eclipse.core.net", //
+ "org.eclipse.core.runtime", //
+ "org.eclipse.core.runtime.compatibility.registry", //
+ "org.eclipse.ecf", //
+ "org.eclipse.ecf.filetransfer", //
+ "org.eclipse.ecf.identity", //
+ "org.eclipse.ecf.provider.filetransfer", //
+ "org.eclipse.ecf.provider.filetransfer.ssl", //
+ "org.eclipse.ecf.ssl", //
+ "org.eclipse.equinox.app", //
+ "org.eclipse.equinox.common", //
+ "org.eclipse.equinox.ds", //
+ "org.eclipse.equinox.frameworkadmin", //
+ "org.eclipse.equinox.frameworkadmin.equinox", //
+ "org.eclipse.equinox.p2.artifact.repository", //
+ "org.eclipse.equinox.p2.core", //
+ "org.eclipse.equinox.p2.director", //
+ "org.eclipse.equinox.p2.directorywatcher", //
+ "org.eclipse.equinox.p2.engine", //
+ "org.eclipse.equinox.p2.extensionlocation", //
+ "org.eclipse.equinox.p2.garbagecollector", //
+ "org.eclipse.equinox.p2.jarprocessor", //
+ "org.eclipse.equinox.p2.metadata", //
+ "org.eclipse.equinox.p2.metadata.repository", //
+ "org.eclipse.equinox.p2.publisher", //
+ "org.eclipse.equinox.p2.ql", //
+ "org.eclipse.equinox.p2.reconciler.dropins", //
+ "org.eclipse.equinox.p2.repository", //
+ "org.eclipse.equinox.p2.touchpoint.eclipse", //
+ "org.eclipse.equinox.p2.touchpoint.natives", //
+ "org.eclipse.equinox.preferences", //
+ "org.eclipse.equinox.registry", //
+ "org.eclipse.equinox.security", //
+ "org.eclipse.equinox.simpleconfigurator", //
+ "org.eclipse.equinox.simpleconfigurator.manipulator", //
+ "org.eclipse.equinox.util", //
+ "org.eclipse.osgi", //
+ "org.eclipse.osgi.services", //
+ "org.sat4j.core", //
+ "org.sat4j.pb"};
+
+ // load the bundles.info and put the results into a map for easier lookup
+ BundleInfo[] infos = null;
+ try {
+ infos = loadBundlesInfo(getBundlesInfo());
+ } catch (IOException e) {
+ fail("Exception occurred loading bundles.info file from: " + getBundlesInfo().getAbsolutePath(), e);
+ }
+ Map<String, BundleInfo> map = new HashMap();
+ for (int i = 0; infos != null && i < infos.length; i++) {
+ map.put(infos[i].getSymbolicName(), infos[i]);
+ // always add the launcher bundles. do it here because we don't know what os/ws config we will have
+ if (infos[i].getSymbolicName().contains("equinox.launcher"))
+ result.put(infos[i].getSymbolicName(), infos[i]);
+ }
+
+ // just add the bootstrap bundles into the result before returning
+ for (int i = 0; i < bootstrap.length; i++) {
+ BundleInfo info = map.get(bootstrap[i]);
+ if (info != null)
+ result.put(info.getSymbolicName(), info);
+ }
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.p2.tests.reconciler.dropins.AbstractReconcilerTest#initialize()
+ */
+ public void initialize() throws Exception {
+
+ // extract the platform archive to the output folder
+ super.initialize();
+
+ // setup the shared bundle location
+ File shared = new File(output, "shared");
+ shared.mkdirs();
+ assertTrue("0.0", shared.isDirectory());
+
+ // move all features to the shared location
+ File features = new File(output, "eclipse/features");
+ File sharedFeatureLocation = new File(shared, "features");
+ move("1.0", features, sharedFeatureLocation);
+
+ // move all bundles (except launchers) to the shared location
+ File bundles = new File(output, "eclipse/plugins");
+ File sharedBundleLocation = new File(shared, "plugins");
+ FileFilter filter = new FileFilter() {
+ public boolean accept(File pathname) {
+ return !pathname.getName().contains("equinox.launcher");
+ }
+ };
+ move("2.0", bundles, sharedBundleLocation, filter);
+
+ // update the bundles.info file to contain only the boostrap bundles
+ // and also update their locations.
+ Map<String, BundleInfo> infos = getBootstrapBundles();
+ updateBundlesInfo(infos, sharedBundleLocation);
+
+ // update the platform.xml file to a user-include policy pointing
+ // to the bundles in the shared location.
+ updateConfiguration(infos, shared);
+
+ // update the config.ini file to make sure the framework JAR
+ // is pointing to the right location
+ updateConfigIni(infos);
+
+ // reconcile to ensure everything is ok
+ reconcile("5.0");
+ }
+
+ private void updateConfigIni(Map<String, BundleInfo> infos) {
+ File location = new File(output, "eclipse/configuration/config.ini");
+ Properties ini = new Properties();
+ InputStream input = null;
+ try {
+ input = new BufferedInputStream(new FileInputStream(location));
+ ini.load(input);
+ } catch (IOException e) {
+ fail("Exception while loading config.ini from: " + location.getAbsolutePath(), e);
+ } finally {
+ if (input != null)
+ try {
+ input.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+ BundleInfo framework = infos.get("org.eclipse.osgi");
+ assertNotNull("Unable to find framework in list of bootstrap bundles.", framework);
+ ini.put("osgi.framework", framework.getLocation().toString());
+ OutputStream out = null;
+ try {
+ out = new BufferedOutputStream(new FileOutputStream(location));
+ ini.store(out, null);
+ } catch (IOException e) {
+ fail("Exception while saving config.ini to: " + location.getAbsolutePath(), e);
+ } finally {
+ if (out != null)
+ try {
+ out.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+ }
+
+ private void updateConfiguration(Map<String, BundleInfo> infos, File shared) {
+ Configuration config = new Configuration();
+ config.setTransient(false);
+ config.setVersion("3.0");
+
+ // add site containing all the bootstrap bundles
+ Site site = new Site();
+ try {
+ sharedLocationURL = shared.toURI().toURL().toExternalForm();
+ site.setUrl(sharedLocationURL);
+ } catch (MalformedURLException e) {
+ fail("Exception occurred while converting site location to URL: " + shared.getAbsolutePath(), e);
+ }
+ site.setPolicy(Site.POLICY_USER_INCLUDE);
+ site.setUpdateable(false);
+ site.setEnabled(true);
+ URI sharedURI = shared.toURI();
+ for (BundleInfo info : infos.values()) {
+ URI relative = URIUtil.makeRelative(info.getLocation(), sharedURI);
+ site.addPlugin(relative.toString());
+ }
+ config.add(site);
+
+ // add a site for platform:/base/
+ site = new Site();
+ site.setUrl(PLATFORM_BASE);
+ site.setPolicy(Site.POLICY_USER_EXCLUDE);
+ site.setUpdateable(true);
+ site.setEnabled(true);
+ config.add(site);
+
+ // save the new config
+ saveConfiguration(config);
+ }
+
+ public void removeBundlesFromConfiguration(Configuration config, String[] locations) {
+ for (String location : locations)
+ removeBundleFromConfiguration(config, location);
+ }
+
+ protected Site getSharedSite(Configuration config) {
+ for (Site site : config.getSites()) {
+ if (sharedLocationURL != null && sharedLocationURL.equals(site.getUrl()))
+ return site;
+ }
+ return null;
+ }
+
+ public boolean removeBundleFromConfiguration(Configuration config, String location) {
+ Site shared = getSharedSite(config);
+ assertNotNull("Unable to determine shared site from configuration.", shared);
+ boolean removed = shared.removePlugin(location);
+ if (removed)
+ return true;
+ // try again with a relative path
+ URI relative = null;
+ try {
+ relative = URIUtil.makeRelative(new URI(location), new URI(sharedLocationURL));
+ } catch (URISyntaxException e) {
+ fail("Exception while converting location to URI.", e);
+ }
+ return shared.removePlugin(relative.toString());
+ }
+
+ public void addBundlesToConfigurations(Configuration config, String[] locations) {
+ for (String location : locations)
+ addBundleToConfiguration(config, location);
+ }
+
+ public void addBundleToConfiguration(Configuration config, String location) {
+ Site shared = getSharedSite(config);
+ assertNotNull("Unable to determine shared site from configuration.", shared);
+ URI relative = null;
+ try {
+ relative = URIUtil.makeRelative(new URI(location), new URI(sharedLocationURL));
+ } catch (URISyntaxException e) {
+ fail("Exception while converting location to URI.", e);
+ }
+ shared.addPlugin(relative.toString());
+ }
+
+ protected File getPlatformXMLLocation() {
+ return new File(output, "eclipse/configuration/org.eclipse.update/platform.xml");
+ }
+
+ public void saveConfiguration(Configuration config) {
+ File configLocation = getPlatformXMLLocation();
+ try {
+ config.save(configLocation, null);
+ } catch (ProvisionException e) {
+ fail("Exception occurred while saving configuration: " + configLocation.getAbsolutePath(), e);
+ }
+ }
+
+ public Configuration loadConfiguration() {
+ File configLocation = getPlatformXMLLocation();
+ try {
+ return Configuration.load(configLocation, null);
+ } catch (ProvisionException e) {
+ fail("Exception loading configuration.", e);
+ }
+ // avoid compile error
+ return null;
+ }
+
+ private void updateBundlesInfo(Map<String, BundleInfo> infos, File sharedBundleLocation) {
+ for (BundleInfo info : infos.values()) {
+ if (info.getSymbolicName().contains("equinox.launcher"))
+ continue;
+ File location = new File(sharedBundleLocation, new Path(info.getLocation().toString()).lastSegment());
+ assertTrue("3.1." + location.getAbsolutePath(), location.exists());
+ info.setLocation(location.toURI());
+ }
+ // re-write the bundles.info file with the new information
+ try {
+ saveBundlesInfo(infos.values().toArray(new BundleInfo[infos.size()]), getBundlesInfo());
+ } catch (IOException e) {
+ fail("Exception occurred while saving bundles.info to: " + getBundlesInfo().getAbsolutePath(), e);
+ }
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/BasicProductTests.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/BasicProductTests.java
new file mode 100644
index 000000000..c144375fb
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/BasicProductTests.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.reconciler.dropins;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.eclipse.equinox.internal.p2.update.Configuration;
+
+public class BasicProductTests extends AbstractSharedBundleProductTest {
+
+ public BasicProductTests(String name) {
+ super(name);
+ }
+
+ public static Test suite() {
+ TestSuite suite = new SharedBundleProductTestSuite();
+ suite.setName(BasicProductTests.class.getName());
+ suite.addTest(new BasicProductTests("testAddRemove"));
+ suite.addTest(new BasicProductTests("testReplace"));
+ return suite;
+ }
+
+ public void testAddRemove() {
+ // setup
+ assertInitialized();
+ File jar = getTestData("1.0", "testData/reconciler/plugins/myBundle_1.0.0.jar");
+ File shared = new File(output, "shared/plugins");
+ File target = new File(shared, jar.getName());
+ copy("1.1", jar, target);
+ String targetURLString = null;
+ try {
+ targetURLString = target.toURI().toURL().toExternalForm();
+ } catch (MalformedURLException e) {
+ fail("1.99", e);
+ }
+
+ // add the bundle to the platform.xml and reconcile
+ Configuration config = loadConfiguration();
+ addBundleToConfiguration(config, targetURLString);
+ saveConfiguration(config);
+ reconcile("4.0");
+ assertExistsInBundlesInfo("5.0", "myBundle");
+
+ // cleanup/remove the bundle and verify
+ assertTrue("6.0", delete(target));
+ removeBundleFromConfiguration(config, targetURLString);
+ reconcile("6.5");
+ assertDoesNotExistInBundlesInfo("7.0", "myBundle");
+ }
+
+ public void testReplace() {
+ // setup
+ assertInitialized();
+ File jar = getTestData("1.0", "testData/reconciler/plugins/myBundle_1.0.0.jar");
+ File shared = new File(output, "shared/plugins");
+ File target = new File(shared, jar.getName());
+ copy("1.1", jar, target);
+ String targetURLString = null;
+ try {
+ targetURLString = target.toURI().toURL().toExternalForm();
+ } catch (MalformedURLException e) {
+ fail("1.99", e);
+ }
+
+ // add bundle to platform.xml and reconcile
+ Configuration config = loadConfiguration();
+ addBundleToConfiguration(config, targetURLString);
+ saveConfiguration(config);
+ reconcile("2.0");
+ assertExistsInBundlesInfo("2.1", "myBundle", "1.0.0");
+
+ // replace with a higher version and reconcile
+ // leave the old version in the shared bundle area
+ File higherJAR = getTestData("3.0", "testData/reconciler/plugins/myBundle_2.0.0.jar");
+ File higherTarget = new File(shared, higherJAR.getName());
+ copy("3.1", higherJAR, higherTarget);
+ String higherTargetURLString = null;
+ try {
+ higherTargetURLString = higherTarget.toURI().toURL().toExternalForm();
+ } catch (MalformedURLException e) {
+ fail("3.99", e);
+ }
+ removeBundleFromConfiguration(config, targetURLString);
+ addBundleToConfiguration(config, higherTargetURLString);
+ saveConfiguration(config);
+ reconcile("3.5");
+ assertExistsInBundlesInfo("3.6", "myBundle", "2.0.0");
+ assertDoesNotExistInBundlesInfo("3.7.0", "myBundle", "1.0.0");
+
+ // cleanup/remove and verify
+ assertTrue("6.0", delete(target));
+ assertTrue("6.1", delete(higherTarget));
+ removeBundleFromConfiguration(config, higherTargetURLString);
+ reconcile("6.5");
+ assertDoesNotExistInBundlesInfo("7.0", "myBundle");
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/ProfileSynchronizerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/ProfileSynchronizerTest.java
new file mode 100644
index 000000000..4b23a4c49
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/ProfileSynchronizerTest.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype Inc. - Initial API and implementation
+ * IBM Corporation - Ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.reconciler.dropins;
+
+import java.io.File;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Set;
+import org.eclipse.equinox.internal.p2.reconciler.dropins.ProfileSynchronizer;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+import org.eclipse.equinox.p2.tests.TestActivator;
+
+public class ProfileSynchronizerTest extends AbstractProvisioningTest {
+ private IProfile sdkProfile;
+ private IProvisioningAgent agent;
+ private IProfileRegistry registry;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ initializeReconciler();
+ File tmpFolder = getTempFolder();
+
+ copy("copying initialProfile", getTestData("p2 folder for synchronizer test", "testData/profileSynchronizerTest/"), tmpFolder);
+ agent = getAgentProvider().createAgent(new File(tmpFolder, "p2").toURI());
+ registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+ IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
+ sdkProfile = registry.getProfile("SDKProfile");
+
+ //Reset some properties to not break local install
+ IProvisioningPlan plan = engine.createPlan(sdkProfile, null);
+ File installFolder = getTempFolder();
+ plan.setProfileProperty("org.eclipse.equinox.p2.installFolder", installFolder.getAbsolutePath());
+ plan.setProfileProperty("org.eclipse.equinox.p2.cache", installFolder.getAbsolutePath());
+ engine.perform(plan, null);
+ }
+
+ //This test case will remove the plugin aniefer,junit.headless that has been installed through the dropins.
+ //The test checks that the roots properties are preserved
+ public void testPropertyAreProperlyPutBack() throws IllegalArgumentException {
+ Set<IInstallableUnit> oldRoots = sdkProfile.query(new IUProfilePropertyQuery("org.eclipse.equinox.p2.type.root", Boolean.TRUE.toString()), null).toUnmodifiableSet();
+
+ assertFalse(sdkProfile.query(QueryUtil.createIUQuery("aniefer.junit.headless"), null).isEmpty());
+ int originalSize = sdkProfile.query(QueryUtil.ALL_UNITS, null).toUnmodifiableSet().size();
+ ProfileSynchronizer sync = new ProfileSynchronizer(agent, sdkProfile, new ArrayList<IMetadataRepository>());
+ sync.synchronize(null);
+ Set<IInstallableUnit> newRoots = registry.getProfile("SDKProfile").query(new IUProfilePropertyQuery("org.eclipse.equinox.p2.type.root", Boolean.TRUE.toString()), null).toSet();
+ newRoots.removeAll(oldRoots);
+ assertEquals(0, newRoots.size());
+ assertTrue(registry.getProfile("SDKProfile").query(QueryUtil.createIUQuery("aniefer.junit.headless"), null).isEmpty());
+ assertEquals(originalSize - 1, registry.getProfile("SDKProfile").query(QueryUtil.ALL_UNITS, null).toUnmodifiableSet().size());
+ }
+
+ private void initializeReconciler() throws IllegalAccessException {
+ Field[] fields = org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.class.getDeclaredFields();
+ for (int i = 0; i < fields.length; i++) {
+ if (fields[i].getName().equals("bundleContext")) {
+ fields[i].setAccessible(true);
+ fields[i].set(org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.class, TestActivator.getContext());
+ break;
+ }
+ }
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/ProfileSynchronizerTest2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/ProfileSynchronizerTest2.java
new file mode 100644
index 000000000..9a25c43e1
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/ProfileSynchronizerTest2.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype Inc. - Initial API and implementation
+ * IBM Corporation - Ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.reconciler.dropins;
+
+import java.io.File;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Set;
+import org.eclipse.equinox.internal.p2.reconciler.dropins.ProfileSynchronizer;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+import org.eclipse.equinox.p2.tests.TestActivator;
+
+public class ProfileSynchronizerTest2 extends AbstractProvisioningTest {
+ private IProfile sdkProfile;
+ private IProvisioningAgent agent;
+ private IProfileRegistry registry;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ initializeReconciler();
+
+ File tmpFolder = getTempFolder();
+ copy("copying initialProfile", getTestData("p2 folder for synchronizer test", "testData/profileSynchronizerTest2/"), tmpFolder);
+ agent = getAgentProvider().createAgent(new File(tmpFolder, "p2").toURI());
+ registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+ IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
+ sdkProfile = registry.getProfile("SDKProfile");
+
+ //Reset some properties to not break local install
+ IProvisioningPlan plan = engine.createPlan(sdkProfile, null);
+ File installFolder = getTempFolder();
+ plan.setProfileProperty("org.eclipse.equinox.p2.installFolder", installFolder.getAbsolutePath());
+ plan.setProfileProperty("org.eclipse.equinox.p2.cache", installFolder.getAbsolutePath());
+ engine.perform(plan, null);
+ }
+
+ //In this case GEF is installed through dropins and GMF is installed strictly.
+ //GEF will be removed by the reconciliation, which should cause GMF to be removed
+ public void testRemovalOfStrictRoot() throws IllegalArgumentException {
+ Set<IInstallableUnit> oldRoots = sdkProfile.query(new IUProfilePropertyQuery("org.eclipse.equinox.p2.type.root", Boolean.TRUE.toString()), null).toUnmodifiableSet();
+
+ assertFalse("could not find gmf", sdkProfile.query(QueryUtil.createIUQuery("org.eclipse.gmf.sdk.feature.group"), null).isEmpty());
+ ProfileSynchronizer sync = new ProfileSynchronizer(agent, sdkProfile, new ArrayList<IMetadataRepository>());
+ sync.synchronize(null);
+ Set<IInstallableUnit> newRoots = registry.getProfile("SDKProfile").query(new IUProfilePropertyQuery("org.eclipse.equinox.p2.type.root", Boolean.TRUE.toString()), null).toSet();
+ newRoots.removeAll(oldRoots);
+ assertEquals(0, newRoots.size());
+ assertTrue("gmf should not be there", registry.getProfile("SDKProfile").query(QueryUtil.createIUQuery("org.eclipse.gmf.sdk.feature.group"), null).isEmpty());
+ }
+
+ //We need to initialize the reconciler this way to bypass the automatic reconciliation that happens when the bundle is started
+ private void initializeReconciler() throws IllegalAccessException {
+ Field[] fields = org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.class.getDeclaredFields();
+ for (int i = 0; i < fields.length; i++) {
+ if (fields[i].getName().equals("bundleContext")) {
+ fields[i].setAccessible(true);
+ fields[i].set(org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.class, TestActivator.getContext());
+ break;
+ }
+ }
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/SharedBundleProductTestSuite.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/SharedBundleProductTestSuite.java
new file mode 100644
index 000000000..c2f11b9c5
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/SharedBundleProductTestSuite.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.reconciler.dropins;
+
+import junit.framework.Test;
+
+public class SharedBundleProductTestSuite extends ReconcilerTestSuite {
+
+ public SharedBundleProductTestSuite() {
+ super();
+ }
+
+ public SharedBundleProductTestSuite(String propertyToPlatformArchive) {
+ super(propertyToPlatformArchive);
+ }
+
+ public Test getInitializationTest() {
+ return new AbstractSharedBundleProductTest("initialize", getPlatformArchive());
+ }
+
+ public Test getCleanUpTest() {
+ return new AbstractSharedBundleProductTest("cleanup");
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramPropertyActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramPropertyActionTest.java
new file mode 100644
index 000000000..74a62eecc
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramPropertyActionTest.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this 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.touchpoint.eclipse;
+
+import java.util.*;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
+import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
+import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.AddProgramPropertyAction;
+import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
+import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+public class AddProgramPropertyActionTest extends AbstractProvisioningTest {
+
+ public AddProgramPropertyActionTest(String name) {
+ super(name);
+ }
+
+ public AddProgramPropertyActionTest() {
+ super("");
+ }
+
+ public void testExecuteUndo() {
+ // setup
+ Map parameters = new HashMap();
+ parameters.put(ActionConstants.PARM_AGENT, getAgent());
+ EclipseTouchpoint touchpoint = new EclipseTouchpoint();
+ Properties profileProperties = new Properties();
+ profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
+ IProfile profile = createProfile("test", profileProperties);
+ InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
+ touchpoint.initializePhase(null, profile, "test", parameters);
+ parameters.put("iu", operand.second());
+ touchpoint.initializeOperand(profile, parameters);
+ Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
+ assertNotNull(manipulator);
+ ConfigData data = manipulator.getConfigData();
+
+ String key = getUniqueString();
+ String value1 = "foo";
+ String value2 = "bar";
+ assertNull(data.getProperty(key));
+ parameters.put(ActionConstants.PARM_PROP_NAME, key);
+ parameters.put(ActionConstants.PARM_PROP_VALUE, value1);
+
+ // execute the action and check the values
+ AddProgramPropertyAction action = new AddProgramPropertyAction();
+ action.execute(parameters);
+ String current = data.getProperty(key);
+ assertNotNull(current);
+ assertEquals(value1, current);
+
+ // add another value. expecting a comma-separated list of values
+ parameters.put(ActionConstants.PARM_PROP_VALUE, value2);
+ action.execute(parameters);
+ current = data.getProperty(key);
+ assertNotNull(current);
+ assertEquals(value1 + "," + value2, current);
+
+ // remove a value
+ parameters.put(ActionConstants.PARM_PROP_VALUE, value2);
+ action.undo(parameters);
+ current = data.getProperty(key);
+ assertNotNull(current);
+ assertEquals(value1, current);
+
+ // cleanup
+ data.setProperty(key, null);
+ }
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/PathUtilTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/PathUtilTest.java
new file mode 100644
index 000000000..a3dd65191
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/PathUtilTest.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import org.eclipse.equinox.internal.p2.update.PathUtil;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+/**
+ * Tests for {@link org.eclipse.equinox.internal.p2.update.PathUtil}.
+ */
+public class PathUtilTest extends AbstractProvisioningTest {
+ /** Constant value indicating if the current platform is Windows */
+ private static final boolean WINDOWS = java.io.File.separatorChar == '\\';
+
+ public void testMakeRelative() throws MalformedURLException {
+ if (!WINDOWS)
+ return;
+ Object[][] data = new Object[][] {
+ // simple path
+ new Object[] {"file:/c:/a/b", new URL("file:/c:/a/x"), "file:../b"},
+ // common root
+ new Object[] {"file:/c:/eclipse/plugins/foo.jar", new URL("file:/c:/eclipse/"), "file:plugins\\foo.jar"},
+ // different drives
+ new Object[] {"file:/c:/a/b", new URL("file:/d:/a/x"), "file:/c:/a/b"}, //
+ new Object[] {"file:/c:/eclipse/plugins/foo.jar", new URL("file:/d:/eclipse/"), "file:/c:/eclipse/plugins/foo.jar"},
+ // non-local
+ new Object[] {"http:/c:/a/b", new URL("file:/c:/a/x"), "http:/c:/a/b"}, //
+ new Object[] {"file:/c:/a/b", new URL("http:/c:/a/x"), "file:/c:/a/b"}, //
+ //
+ new Object[] {"file:/c:/a/b", new URL("file:/C:/a/x"), "file:../b"}, //
+ new Object[] {"file:/c:/", new URL("file:/d:/"), "file:/c:/"}, //
+ new Object[] {"file:/c:/", new URL("file:/c:/"), "file:/c:/"}, //
+ };
+ for (int i = 0; i < data.length; i++) {
+ String location = data[i][0].toString();
+ URL root = (URL) data[i][1];
+ String expected = data[i][2].toString();
+ String actual = PathUtil.makeRelative(location, root);
+ assertEquals("2." + Integer.toString(i), expected, actual);
+ }
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramPropertyActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramPropertyActionTest.java
new file mode 100644
index 000000000..10587b926
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramPropertyActionTest.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this 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.touchpoint.eclipse;
+
+import java.util.*;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
+import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
+import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.RemoveProgramPropertyAction;
+import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
+import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+public class RemoveProgramPropertyActionTest extends AbstractProvisioningTest {
+
+ public RemoveProgramPropertyActionTest(String name) {
+ super(name);
+ }
+
+ public RemoveProgramPropertyActionTest() {
+ super("");
+ }
+
+ public void testExecuteUndo() {
+ // setup
+ Map parameters = new HashMap();
+ parameters.put(ActionConstants.PARM_AGENT, getAgent());
+ EclipseTouchpoint touchpoint = new EclipseTouchpoint();
+ Properties profileProperties = new Properties();
+ profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
+ IProfile profile = createProfile("test", profileProperties);
+ InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
+ touchpoint.initializePhase(null, profile, "test", parameters);
+ parameters.put("iu", operand.second());
+ touchpoint.initializeOperand(profile, parameters);
+ Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
+ assertNotNull(manipulator);
+ ConfigData data = manipulator.getConfigData();
+
+ String key = getUniqueString();
+ String value1 = "foo";
+ String value2 = "bar";
+ String value3 = "quux";
+ String initial = value1 + "," + value2 + "," + value3;
+ assertNull(data.getProperty(key));
+ data.setProperty(key, initial);
+
+ // set the parms
+ parameters.put(ActionConstants.PARM_PROP_NAME, key);
+ parameters.put(ActionConstants.PARM_PROP_VALUE, value2);
+
+ // execute the action and check the values
+ RemoveProgramPropertyAction action = new RemoveProgramPropertyAction();
+ action.execute(parameters);
+ String current = data.getProperty(key);
+ assertNotNull(current);
+ assertEquals(value1 + "," + value3, current);
+
+ // undo action
+ action.undo(parameters);
+ current = data.getProperty(key);
+ assertNotNull(current);
+ assertEquals(initial, current);
+
+ // cleanup
+ data.setProperty(key, null);
+ }
+
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/BundlesActionTest/test3/BundleMeUp.txt b/bundles/org.eclipse.equinox.p2.tests/testData/BundlesActionTest/test3/BundleMeUp.txt
new file mode 100644
index 000000000..ad961ffbb
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/BundlesActionTest/test3/BundleMeUp.txt
@@ -0,0 +1,17 @@
+12345
+12345
+12345
+12345
+12345
+
+12345
+12345
+12345
+12345
+12345
+
+12345
+12345
+12345
+12345
+12345 \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/BundlesActionTest/test3/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests/testData/BundlesActionTest/test3/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..45bce0b7d
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/BundlesActionTest/test3/META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: test3
+Bundle-SymbolicName: test3;singleton:=true
+Bundle-Version: 0.1.0.qualifier
+Import-Package: iud;version="1.3.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.4,
+ CDC-1.1/Foundation-1.1
+Export-Package: iuz;x-friends:="friend1,friend2"
+Eclipse-SourceBundle: test2;version="1.0.0.qualifier"
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/BundlesActionTest/test3/META-INF/p2.inf b/bundles/org.eclipse.equinox.p2.tests/testData/BundlesActionTest/test3/META-INF/p2.inf
new file mode 100644
index 000000000..bc2511d86
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/BundlesActionTest/test3/META-INF/p2.inf
@@ -0,0 +1,3 @@
+update.range = (0.0.1,$version$]
+update.description = Some description about this update
+update.severity = 8
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/BundlesActionTest/test3/subFolder/BundleMeUpToo.txt b/bundles/org.eclipse.equinox.p2.tests/testData/BundlesActionTest/test3/subFolder/BundleMeUpToo.txt
new file mode 100644
index 000000000..eee8bccc9
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/BundlesActionTest/test3/subFolder/BundleMeUpToo.txt
@@ -0,0 +1,10 @@
+54321
+54321
+54321
+54321
+54321
+54321
+54321
+54321
+54321
+54321
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/EquinoxExecutableActionTest/linux/eclipse.xpm b/bundles/org.eclipse.equinox.p2.tests/testData/EquinoxExecutableActionTest/linux/eclipse.xpm
new file mode 100644
index 000000000..c743782f5
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/EquinoxExecutableActionTest/linux/eclipse.xpm
@@ -0,0 +1,24 @@
+/* XPM */
+static char *eclipse[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 2 1",
+" c #FE1D16",
+". c None",
+/* pixels */
+"................",
+". .",
+". .",
+". .",
+". .",
+". .",
+". .",
+". .",
+". .",
+". .",
+". .",
+". .",
+". .",
+". .",
+". .",
+"................"
+};
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/EquinoxExecutableActionTest/win/eclipse.ico b/bundles/org.eclipse.equinox.p2.tests/testData/EquinoxExecutableActionTest/win/eclipse.ico
new file mode 100644
index 000000000..53fafc0df
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/EquinoxExecutableActionTest/win/eclipse.ico
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/ProductActionTest/launcherFlags/falseLauncherFlag.product b/bundles/org.eclipse.equinox.p2.tests/testData/ProductActionTest/launcherFlags/falseLauncherFlag.product
new file mode 100644
index 000000000..e2499ceb8
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/ProductActionTest/launcherFlags/falseLauncherFlag.product
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.5"?>
+
+<product name="SampleProduct" version="1.0.0" useFeatures="false" includeLaunchers="false">
+
+ <configIni use="">
+ </configIni>
+
+ <launcherArgs>
+ </launcherArgs>
+
+ <windowImages/>
+
+ <launcher>
+ <solaris/>
+ <win useIco="false">
+ <bmp
+ winSmallLow="icon.bmp"/>
+ </win>
+ </launcher>
+
+ <vm>
+ </vm>
+
+ <plugins>
+ <plugin id="org.eclipse.core.commands" version="5.0.0"/>
+ </plugins>
+
+ <configurations>
+ <plugin id="org.eclipse.core.commands" autoStart="false" startLevel="2" />
+ </configurations>
+
+</product>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/ProductActionTest/launcherFlags/noLauncherFlag.product b/bundles/org.eclipse.equinox.p2.tests/testData/ProductActionTest/launcherFlags/noLauncherFlag.product
new file mode 100644
index 000000000..bfcb55b5a
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/ProductActionTest/launcherFlags/noLauncherFlag.product
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.5"?>
+
+<product name="SampleProduct" version="1.0.0" useFeatures="false">
+
+
+ <configIni>
+ </configIni>
+
+ <launcherArgs>
+ </launcherArgs>
+
+ <windowImages/>
+
+
+ <launcher>
+ <solaris/>
+ <win useIco="false">
+ <bmp
+ winSmallLow="icon.bmp"/>
+ </win>
+ </launcher>
+
+
+ <vm>
+ </vm>
+
+ <plugins>
+ <plugin id="org.eclipse.core.commands" version="5.0.0"/>
+ </plugins>
+
+ <configurations>
+ <plugin id="org.eclipse.core.commands" autoStart="false" startLevel="2" />
+ </configurations>
+
+</product>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/ProductActionTest/launcherFlags/trueLauncherFlag.product b/bundles/org.eclipse.equinox.p2.tests/testData/ProductActionTest/launcherFlags/trueLauncherFlag.product
new file mode 100644
index 000000000..5238f30b6
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/ProductActionTest/launcherFlags/trueLauncherFlag.product
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.5"?>
+
+<product name="SampleProduct" version="1.0.0" useFeatures="false" includeLaunchers="true">
+
+ <configIni use="">
+ </configIni>
+
+ <launcherArgs>
+ </launcherArgs>
+
+ <windowImages/>
+
+ <launcher>
+ <solaris/>
+ <win useIco="false">
+ <bmp
+ winSmallLow="icon.bmp"/>
+ </win>
+ </launcher>
+
+ <vm>
+ </vm>
+
+ <plugins>
+ <plugin id="org.eclipse.core.commands" version="5.0.0"/>
+ </plugins>
+
+ <configurations>
+ <plugin id="org.eclipse.core.commands" autoStart="false" startLevel="2" />
+ </configurations>
+
+</product>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/ProfilePreferencesTest/DifferentAgent/p2/org.eclipse.equinox.p2.engine/profileRegistry/TestProfile.profile/.data/.settings/org.eclipse.equinox.p2.artifact.repository.prefs b/bundles/org.eclipse.equinox.p2.tests/testData/ProfilePreferencesTest/DifferentAgent/p2/org.eclipse.equinox.p2.engine/profileRegistry/TestProfile.profile/.data/.settings/org.eclipse.equinox.p2.artifact.repository.prefs
new file mode 100644
index 000000000..64f56bc0c
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/ProfilePreferencesTest/DifferentAgent/p2/org.eclipse.equinox.p2.engine/profileRegistry/TestProfile.profile/.data/.settings/org.eclipse.equinox.p2.artifact.repository.prefs
@@ -0,0 +1,2426 @@
+#Fri Apr 30 14:09:12 EDT 2010
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository_wtp-buildTools/uri=http\://download.eclipse.org/webtools/downloads/drops/T3.2.0/I-3.2.0-20100424021000/repository/wtp-buildTools
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090604-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-0100/version=1.0.0
+repositories/file\:_C\:_1target_provmiddle_test.plugin_update/nickname=NL Test Repo
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091209-1800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1300/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100423-0906/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M6-201003121448/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090714-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_dsdp_tm_updates_3.0/uri=http\://download.eclipse.org/dsdp/tm/updates/3.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090604-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_releases_helios_200912172200/uri=http\://download.eclipse.org/releases/helios/200912172200
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1710/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100323-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090922-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100330-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipse.org_tptp_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091206-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090707-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090421-0930/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100323-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_releases_helios_200910011616_aggregate/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091210-1301/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1300/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_helios_200912172200/name=Helios artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100224-2242/enabled=false
+repositories/http\:__download.eclipse.org_webtools_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090514-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1300/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_releases_helios_200911122150/type=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090601-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090503-2055/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090401-1325/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090401-1325
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-2300/provider=
+repositories/http\:__download.eclipse.org_releases_helios_200910011616/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090331-0901/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100121-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140_aggregate/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090428-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090426-2000/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_releases_helios_200910011616/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090917-0100/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090430-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100420-0800/name="Eclipse Project Test Site"
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090914-1800
+repositories/http\:__download.eclipse.org_rt_riena_1.1.0.1_update/uri=http\://download.eclipse.org/rt/riena/1.1.0.1/update/
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330_aggregate/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100128-1731/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090707-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0100/provider=
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository_wtp-buildTools/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091027-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091020-0931/name="Eclipse Project Test Site"
+repositories/file\:_C\:_1target_eclipseweb_.metadata_.plugins_org.eclipse.pde.core_install/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100217-1031/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090531-2000/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0100/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090520-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090915-0100/suffix=artifacts.xml
+repositories/file\:_C\:_1target_provmiddle_.metadata_.plugins_org.eclipse.pde.core_.bundle_pool/uri=file\:/C\:/1target/provmiddle/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool/
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900/suffix=compositeArtifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1126/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091217-0819/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100302-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090525-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090525-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090526-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100225-1936/enabled=false
+repositories/http\:__update.eclemma.org/uri=http\://update.eclemma.org/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090730-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091030-1201/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090609-1400/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0100/name="Eclipse Project Test Site"
+repositories/file\:_C\:_eclipse_dropins_eclemma/provider=
+repositories/file\:_C\:_eclipse_p2_org.eclipse.equinox.p2.core_cache/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090518-2000/provider=
+repositories/http\:__download.eclipse.org_releases_galileo_aggregate/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100115-1100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_rt_eclipselink_incremental-updates_milestone/enabled=false
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository/type=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090611-1540/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090611-1540
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100115-1100/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091103-0941/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090416-1053/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090714-0800/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M4-200912101301/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090331-0901/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1300/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1126/suffix=artifacts.xml
+repositories/file\:_C\:_1target_provmiddle_test.plugin_update/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-0800/version=1.0.0
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330/type=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
+repositories/file\:_C\:_eclipse_p2_org.eclipse.equinox.p2.core_cache/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090730-2000/suffix=artifacts.xml
+repositories/file\:_C\:_1target_provmiddle_test.plugin_update/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M2-200909170100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090818-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091217-0819/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1300/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-0800/description=
+repositories/http\:__download.eclipse.org_technology_linuxtools_update/enabled=false
+repositories/http\:__download.eclipse.org_releases_helios_201003190900/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090922-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1023/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M3-200910301201/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1300/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-2200/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100216-2200
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository_wtp-buildTools/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1414/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1300/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100217-1031/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones/enabled=false
+repositories/http\:__download.eclipse.org_releases_helios_200911122150_aggregate/name=Helios artifacts
+repositories/http\:__download.eclipse.org_rt_rap_1.2_update/uri=http\://download.eclipse.org/rt/rap/1.2/update
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100420-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100420-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090901-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M6-201003121448/uri=http\://download.eclipse.org/eclipse/updates/3.6milestones/S-3.6M6-201003121448
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090401-1325/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090511-2000/enabled=false
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330/version=1.0.0
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository_wtp-buildTools/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091118-1342/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091118-1342
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-1320/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090503-2055/name=file\:/builds/I200905032055/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/file\:_C\:_eclipse_p2_org.eclipse.equinox.p2.core_cache/uri=file\:/C\:/eclipse/p2/org.eclipse.equinox.p2.core/cache/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-2000/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090611-1540/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100127-1800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091030-1201/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090511-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091030-1201/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5-200906111540/uri=http\://download.eclipse.org/eclipse/updates/3.5/R-3.5-200906111540
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090929-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100124-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-0800/isSystem=true
+repositories/file\:_C\:_eclipse_p2_org.eclipse.equinox.p2.touchpoint.eclipse/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090611-1540/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090923-1538/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090609-1400/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100308-1800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100115-1100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090603-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_releases_helios_200911122150/uri=http\://download.eclipse.org/releases/helios/200911122150
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100425-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-1400/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100310-1300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090530-2000/isSystem=true
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330_aggregate/uri=http\://fullmoon.ottawa.ibm.com/releases/helios/201002042330/aggregate
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090429-1300
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC1-200905151143/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090604-2000/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091103-0941/isSystem=true
+repositories/http\:__download.eclipse.org_rt_eclipselink_incremental-updates_milestone/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090521-2000/description=
+repositories/http\:__download.eclipse.org_tools_mylyn_update_extras/isSystem=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M5-200902021535/description=
+repositories/http\:__download.eclipse.org_modeling_m2m_updates_releases/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090529-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100224-2242/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100224-2242
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090421-0930/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090531-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100424-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090521-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100426-0852/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100426-0852
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090527-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090923-1538/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090521-2000/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M5-201001291300/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100414-1200/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100106-1349/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090518-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090428-0100/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090901-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090901-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1300/description=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC2-200905221710/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1310/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1300/name=file\:/builds/I200904291300/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-0100/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_rt_eclipselink_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1800/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC2-200905221710/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1300/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100311-1616/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1414/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090513-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100112-0800/description=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M5-201001291300/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090811-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-1400/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090917-0100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100310-0800
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M1-200908061400/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0100/version=1.0.0
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900/type=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository/uri=http\://download.eclipse.org/webtools/downloads/drops/T3.2.0/I-3.2.0-20100410204757/repository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100425-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090429-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090915-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091215-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100420-0800/description=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1442/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M3-200910301201/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090529-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090529-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090531-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091217-0819/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090428-0100/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100413-1521/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_releases_helios_201003190900_aggregate/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-1125/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090630-1125
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090602-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-0804/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091013-1302/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1400/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100125-1400
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090729-1307/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100425-2000/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090707-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090511-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100302-0800/isSystem=true
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090730-2000/version=1.0.0
+repositories/http\:__download.eclipse.org_modeling_emft_updates_releases/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100316-0859/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-1300/description=
+repositories/file\:_C\:_eclipse_.eclipseextension/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090805-1300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100128-1731/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-0731/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090908-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1100/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1800/version=1.0.0
+repositories/http\:__download.eclipse.org_datatools_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-1125/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-1545/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090416-1053/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090416-1053
+repositories/http\:__download.eclipse.org_tools_ptp_releases_helios/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090913-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-2200/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0800/isSystem=true
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository/version=1.0.0
+repositories/file\:_C\:_1target_provmiddle_.metadata_.plugins_org.eclipse.pde.core_.bundle_pool/enabled=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1036/suffix=artifacts.xml
+repositories/file\:_C\:_1target_provmiddle_.metadata_.plugins_org.eclipse.pde.core_.bundle_pool/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090504-2055/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_webtools_releng_repository/enabled=true
+repositories/http\:__download.eclipse.org_releases_helios_201003190900/provider=
+repositories/http\:__download.eclipse.org_releases_helios_200911122150_aggregate/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-1300/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M6-200903130100/description=
+repositories/http\:__download.eclipse.org_egit_updates/uri=http\://download.eclipse.org/egit/updates
+repositories/http\:__download.eclipse.org_tools_cdt_releases_helios/uri=http\://download.eclipse.org/tools/cdt/releases/helios
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090916-1300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-1032/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090605-1444/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090331-0901/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_modeling_emft_eef_updates_releases/isSystem=false
+repositories/http\:__download.eclipse.org_rt_eclipselink_incremental-updates_milestone/uri=http\://download.eclipse.org/rt/eclipselink/incremental-updates/milestone
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M1-200908061400/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-2300/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091103-0941/description=
+repositories/http\:__download.eclipse.org_releases_helios_200910011616/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090818-0800/name="Eclipse Project Test Site"
+repositories/file\:_C\:_1target_eclipseweb_.metadata_.plugins_org.eclipse.pde.core_install/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090818-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090802-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-0731/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100316-0859/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090504-2055/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100124-2000/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090917-0100/enabled=false
+repositories/file\:_C\:_eclipse/uri=file\:/C\:/eclipse/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090604-2000/description=
+repositories/http\:__dev.eclipse.org_svnroot_dsdp_org.eclipse.tm.tcf_releases_0.2.0/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1442/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1600/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090929-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100413-1521/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090506-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0840/provider=
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900_aggregate/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090602-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-1125/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090707-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-1600/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100413-1521/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100316-0859/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100305-1011/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090504-2055/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091013-1302/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M6-200903130100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100122-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100119-0800/provider=
+repositories/http\:__download.eclipse.org_rt_rap_1.2_runtime-update/uri=http\://download.eclipse.org/rt/rap/1.2/runtime-update
+repositories/http\:__download.eclipse.org_releases_helios_200912172200/type=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5/nickname="Eclipse Project Test Site"
+repositories/file\:_C\:_1target_eclipseweb_.metadata_.plugins_org.eclipse.pde.core_install/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090525-2000/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository_wtp-buildTools/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-0731/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100112-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100414-1200/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1800/isSystem=true
+repositories/http\:__download.eclipse.org_releases_galileo_aggregate/uri=http\://download.eclipse.org/releases/galileo/aggregate
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091206-2000/description=
+repositories/http\:__download.eclipse.org_technology_subversive_0.7_update-site/uri=http\://download.eclipse.org/technology/subversive/0.7/update-site/
+repositories/file\:_C\:_1target_dev_.metadata_.plugins_org.eclipse.pde.core_.bundle_pool/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100420-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_galileo_releases/isSystem=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5/uri=http\://download.eclipse.org/eclipse/updates/3.5
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090916-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091027-0100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/file\:_C\:_1target_dev_.metadata_.plugins_org.eclipse.pde.core_.bundle_pool/uri=file\:/C\:/1target/dev/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091020-0931/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090514-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100414-1200/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100414-1200
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-0206/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-1545/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1300/isSystem=true
+repositories/http\:__download.eclipse.org_technology_emft_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090818-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090802-2000/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1300/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1126/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M7-I200904302300/name=file\:/builds/I200904302300/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M6-200903130100/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.1-200909170800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090506-2000/isSystem=true
+repositories/http\:__download.eclipse.org_modeling_m2t_updates/uri=http\://download.eclipse.org/modeling/m2t/updates/
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900_aggregate/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090730-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.1-200909170800/uri=http\://download.eclipse.org/eclipse/updates/3.5/R-3.5.1-200909170800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100129-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100129-1300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090913-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100425-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100425-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091025-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100225-1936/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090917-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090917-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100302-0800/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900/suffix=compositeArtifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090602-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-0800/version=1.0.0
+repositories/http\:__www.eclipse.org_egit_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100124-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090519-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090519-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-0800/description=
+repositories/file\:_C\:_eclipse_.eclipseextension/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-1320/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091215-1320
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-0800/enabled=false
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330_aggregate/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-1032/isSystem=true
+repositories/http\:__download.eclipse.org_tptp_updates/uri=http\://download.eclipse.org/tptp/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091208-0100/provider=
+repositories/http\:__download.eclipse.org_releases_helios_201002042330_aggregate/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091110-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091110-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100128-1731/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100128-1731
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC3-200905282000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1300/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091206-2000/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0100/name="Eclipse Project Test Site"
+repositories/file\:_C\:_tmp_extension_eclipse_.eclipseextension/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1300/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC3-200905282000/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5/isSystem=false
+repositories/http\:__download.eclipse.org_releases_helios_200910011616_aggregate/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-1320/provider=
+repositories/http\:__download.eclipse.org_releases_helios_200911122150_aggregate/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1800/description=
+repositories/file\:_C\:_eclipse_p2_org.eclipse.equinox.p2.touchpoint.eclipse/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100311-1616/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091103-0941/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0840/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090901-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1710/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1400/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-1400/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090806-1400
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-1800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100122-0800/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC4-200906051444/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090503-2055/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M5-200902021535/name="Eclipse Project Test Site"
+repositories/file\:_C\:_eclipse/version=1.0.0
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1800/version=1.0.0
+repositories/file\:_C\:_tmp_extension_eclipse_.eclipseextension/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090611-1540/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090729-1307/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091030-1201/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0100/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1100/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_birt_update-site_2.5/uri=http\://download.eclipse.org/birt/update-site/2.5
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900_aggregate/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1300/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-1600/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-2300/name=file\:/builds/I200904302300/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-0800/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC3-200905282000/uri=http\://download.eclipse.org/eclipse/updates/3.5milestones/S-3.5RC3-200905282000/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-2200/enabled=false
+repositories/http\:__download.eclipse.org_modeling_mdt_updates_releases/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090525-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091025-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091025-2000
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository/uri=http\://download.eclipse.org/webtools/downloads/drops/T3.2.0/I-3.2.0-20100424021000/repository
+repositories/http\:__download.eclipse.org_releases_helios_200912172200_aggregate/description=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M6-201003121448/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091110-0800/isSystem=true
+repositories/http\:__download.eclipse.org_dsdp_tm_updates_3.0/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M4-200912101301/uri=http\://download.eclipse.org/eclipse/updates/3.6milestones/S-3.6M4-200912101301
+repositories/http\:__download.eclipse.org_releases_helios_200910011616/suffix=compositeArtifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090922-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091206-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-0100/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-0800/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M1-200908061400/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC3-200905282000/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090515-1143/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090512-2000/description=
+repositories/http\:__download.eclipse.org_dsdp_mtj_updates_1.0.1_stable/uri=http\://download.eclipse.org/dsdp/mtj/updates/1.0.1/stable/
+repositories/http\:__download.eclipse.org_releases_helios_200912172200/suffix=compositeArtifacts.xml
+repositories/http\:__download.eclipse.org_releases_helios_aggregate/isSystem=true
+repositories/http\:__download.eclipse.org_modeling_m2m_updates/uri=http\://download.eclipse.org/modeling/m2m/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090519-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-2300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-1549/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100305-1011/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091204-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1300/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0800/enabled=false
+repositories/http\:__download.eclipse.org_releases_helios_201002042330/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-1410/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100107-1410
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090630-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090428-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-1057/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M5-201001291300/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100106-1349/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_releases_helios_201002042330_aggregate/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090508-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090730-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090730-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1300/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-2200/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-0100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090707-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-0800/enabled=false
+repositories/http\:__download.eclipse.org_technology_subversive_0.7_update-site/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-0100/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5-200906111540/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1300/name=file\:/builds/I200904271300/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/http\:__download.eclipse.org_modeling_emf_updates_releases/enabled=false
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository/uri=http\://download.eclipse.org/webtools/downloads/drops/T3.2.0/I-3.2.0-20100415032236/repository/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090508-2000/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100106-1349/description=
+repositories/http\:__download.eclipse.org_galileo_releases/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1600/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-0206/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1310/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100422-1310
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-1400/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0809/enabled=false
+repositories/http\:__download.eclipse.org_releases_helios_200911122150_aggregate/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1100/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1710/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090603-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091020-0931/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090825-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090714-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_technology_dltk_updates/uri=http\://download.eclipse.org/technology/dltk/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100225-1936/version=1.0.0
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios/suffix=compositeArtifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_discoveryfeature/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090915-0100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M3-200910301201/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090803-1800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091013-1302/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-1448/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100312-1448
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090331-0901/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-1545/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-0731/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0100/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900/enabled=false
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-1320/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100217-1031/name="Eclipse Project Test Site"
+repositories/file\:_C\:_1target_eclipseweb_.metadata_.plugins_org.eclipse.pde.core_install/nickname=Exported Repository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091125-2200/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091208-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100129-1300/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900_aggregate/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-2300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1400/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC1-200905151143/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090917-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090913-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_modeling_m2m_updates_releases/enabled=false
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository_wtp-buildTools/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC4-200906051444/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_releases_galileo_aggregate/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1023/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100422-1023
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091208-0100/suffix=artifacts.xml
+repositories/http\:__www.eclipse.org_modeling_emft_updates/uri=http\://www.eclipse.org/modeling/emft/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090520-2000/enabled=false
+repositories/http\:__download.eclipse.org_modeling_m2t_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0100/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090527-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090511-2000/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M6-201003121448/description=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.1-200909170800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-2000/enabled=false
+repositories/file\:_C\:_eclipse/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090818-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M5-200902021535/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100307-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100311-1616/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090526-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100316-0859/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090802-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091206-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100119-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100119-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090605-1444/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091030-1201/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-1300/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100305-1011/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC4-200906051444/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090929-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100305-1011/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100307-2000/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0809/description=
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900_aggregate/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090923-1538/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC4-200906051444/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091030-1201/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091025-2000/name="Eclipse Project Test Site"
+repositories/file\:_C\:_eclipse_dropins_eclemma/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-1600/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090511-2000/isSystem=true
+repositories/http\:__download.eclipse.org_releases_helios_201003190900_aggregate/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090518-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1800/isSystem=true
+repositories/http\:__download.eclipse.org_releases_helios_201002042330/name=Helios artifacts
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M6-200903130100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091217-0819/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091217-0819
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-0206/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100124-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100124-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-1400/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090514-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090514-2000
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M7-I200904302300/description=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_discoveryfeature/name=P2 Discovery
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090908-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090609-1400/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090609-1400
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090611-1540/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-1034/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100420-0800/provider=
+repositories/http\:__download.eclipse.org_modeling_mdt_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-0800/isSystem=true
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140_aggregate/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-1410/isSystem=true
+repositories/http\:__www.eclipse.org_pde_pde-api-tools_updates/uri=http\://www.eclipse.org/pde/pde-api-tools/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1414/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-1200/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.2-201002111343/uri=http\://download.eclipse.org/eclipse/updates/3.5/R-3.5.2-201002111343
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090929-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090416-1053/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1442/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-1410/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091025-2000/description=
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1414/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090527-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1126/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100414-1200/version=1.0.0
+repositories/file\:_C\:_1target_eclipseweb_.metadata_.plugins_org.eclipse.pde.core_install/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1800/provider=
+repositories/http\:__download.eclipse.org_tools_ptp_releases_galileo/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-0100/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100310-0100
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC2-200905221710/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M4-200912101301/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090429-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1300/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090515-1143/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-2300/enabled=false
+repositories/http\:__download.eclipse.org_tools_cdt_releases_galileo/uri=http\://download.eclipse.org/tools/cdt/releases/galileo
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1414/version=1.0.0
+repositories/http\:__download.eclipse.org_technology_mat_0.8_update-site/uri=http\://download.eclipse.org/technology/mat/0.8/update-site/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-1032/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M7-I200904302300/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140_aggregate/description=
+repositories/http\:__download.eclipse.org_tools_ptp_releases_2.0/uri=http\://download.eclipse.org/tools/ptp/releases/2.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M6-201003121448/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-1800/description=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M5-201001291300/uri=http\://download.eclipse.org/eclipse/updates/3.6milestones/S-3.6M5-201001291300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090811-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091013-1302/description=
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900/name=Galileo artifacts
+repositories/http\:__download.eclipse.org_tools_mylyn_update_e3.4/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100225-1936/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100225-1936
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140/name=Galileo artifacts
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900_aggregate/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091013-1302/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_rt_swordfish_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091006-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100124-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090331-0901/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090331-0901
+repositories/http\:__download.eclipse.org_technology_subversive_0.7_update-site/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-0100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090915-0100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_webtools_releng_repository/suffix=compositeArtifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090526-2000/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-0100/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091125-2200/enabled=false
+repositories/http\:__download.eclipse.org_technology_actf_0.7_update-site/isSystem=false
+repositories/http\:__download.eclipse.org_releases_helios/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-1410/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-1800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0809/provider=
+repositories/http\:__download.eclipse.org_modeling_emf_cdo_updates_3.0/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090528-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100129-1300/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-2300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090430-2300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090421-0930/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091103-0941/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090421-0930/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090923-1538/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090521-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-1800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090729-1307/name="Eclipse Project Test Site"
+repositories/file\:_C\:_1target_provmiddle_.metadata_.plugins_org.eclipse.pde.core_.bundle_pool/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M5-200902021535/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090518-2000/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_modeling_emf_cdo_updates_3.0/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-0731/name=file\:/builds/I200905070731/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/http\:__download.eclipse.org_webtools_releng_repository/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100115-1100/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090506-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_modeling_gmt_modisco_updates_release/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090609-1400/provider=
+repositories/http\:__download.eclipse.org_tools_mylyn_update_e3.4/isSystem=false
+repositories/file\:_C\:_1target_dev_.metadata_.plugins_org.eclipse.pde.core_.bundle_pool/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-1300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100119-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-0804/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100107-0804
+repositories/http\:__download.eclipse.org_modeling_mdt_ocl_3_0_updates/uri=http\://download.eclipse.org/modeling/mdt/ocl/3_0/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090512-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-0800/description=
+repositories/http\:__download.eclipse.org_releases_helios_201003190900/name=Helios artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091210-1301/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100420-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-2300/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100426-0852/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090908-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0809/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090917-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0100/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC4-200906051444/uri=http\://download.eclipse.org/eclipse/updates/3.5milestones/S-3.5RC4-200906051444/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091030-1201/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_tools_ptp_releases_2.0/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091026-1800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100129-1300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100414-1200/suffix=artifacts.xml
+repositories/file\:_C\:_tmp_extension_eclipse_.eclipseextension/enabled=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1442/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0100/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100413-1521/version=1.0.0
+repositories/http\:__download.eclipse.org_datatools_updates/uri=http\://download.eclipse.org/datatools/updates
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090504-2055/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5/type=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100424-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100424-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-1448/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100122-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090916-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-1600/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0809/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100309-0809
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M7-I200904302300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-0800/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M5-200902021535/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090428-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091125-2200/description=
+repositories/http\:__download.eclipse.org_releases_helios/enabled=true
+repositories/http\:__download.eclipse.org_releases_helios_201003190900/uri=http\://download.eclipse.org/releases/helios/201003190900
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091207-1800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090811-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091204-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091204-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090421-0930/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090518-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090518-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100307-2000/description=
+repositories/http\:__download.eclipse.org_tools_ptp_releases_galileo/uri=http\://download.eclipse.org/tools/ptp/releases/galileo
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-0100/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090521-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1600/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091201-1600
+repositories/http\:__download.eclipse.org_birt_update-site_2.6/enabled=false
+repositories/file\:_C\:_1target_provmiddle_test.plugin_update/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090512-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-2200/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100209-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1126/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090522-1126
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090508-2000/enabled=false
+repositories/file\:_C\:_1target_provmiddle_.metadata_.plugins_org.eclipse.pde.core_.bundle_pool/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M3-200910301201/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100106-1349/enabled=false
+repositories/http\:__download.eclipse.org_releases_helios_201003190900/isSystem=true
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository_wtp-buildTools/uri=http\://download.eclipse.org/webtools/downloads/drops/T3.2.0/I-3.2.0-20100410204757/repository/wtp-buildTools
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140_aggregate/name=Galileo artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1300/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090527-2000/description=
+repositories/http\:__download.eclipse.org_technology_jwt_update-site/uri=http\://download.eclipse.org/technology/jwt/update-site
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100202-0800/description=
+repositories/http\:__download.eclipse.org_releases_helios_aggregate/description=
+repositories/http\:__download.eclipse.org_releases_helios/provider=
+repositories/http\:__download.eclipse.org_releases_helios_200911122150_aggregate/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M1-200908061400/isSystem=true
+repositories/http\:__download.eclipse.org_releases_galileo_aggregate/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100426-0852/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090917-0100/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091204-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091124-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090604-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090604-2000
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M6-200903130100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-0731/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090503-2055/provider=
+repositories/http\:__download.eclipse.org_modeling_emf_cdo_updates_3.0/uri=http\://download.eclipse.org/modeling/emf/cdo/updates/3.0/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100202-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090714-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-0731/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090531-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090426-2000/provider=
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900_aggregate/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M3-200910301201/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090511-2000/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC1-200905151143/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100413-1521/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100413-1521
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository_wtp-buildTools/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090913-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091025-2000/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_helios_201002042330/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090401-1325/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090805-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0100/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_modeling_emf_updates_releases/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100224-2242/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0840/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-1448/enabled=false
+repositories/file\:_C\:_eclipse_p2_org.eclipse.equinox.p2.touchpoint.eclipse/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090601-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100119-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/file\:_C\:_eclipse_p2_org.eclipse.equinox.p2.core_cache/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-1320/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100217-1031/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090811-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091125-2200/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091208-0100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository_wtp-buildTools/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091118-1342/enabled=false
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100225-1936/provider=
+repositories/file\:_C\:_1target_provmiddle_.metadata_.plugins_org.eclipse.pde.core_.bundle_pool/description=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC4-200906051444/description=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.1-200909170800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090512-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091110-0800/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC1-200905151143/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1400/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090421-0930/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090421-0930
+repositories/http\:__download.eclipse.org_releases_helios/name=Helios Milestone Repository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090416-1053/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC4-200906051444/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091124-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090806-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1400/provider=
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090802-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0840/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1710/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090522-1710
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1400/version=1.0.0
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.1-200909170800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_releases_helios_200912172200_aggregate/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-0206/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-1545/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-0800/isSystem=true
+repositories/http\:__download.eclipse.org_rt_rap_1.3_runtime/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1600/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100307-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100223-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091206-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091125-2200/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090401-1325/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091118-1342/isSystem=true
+repositories/http\:__download.eclipse.org_tools_cdt_releases_galileo/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100119-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100323-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-1300/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100305-1011/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_modeling_mdt_updates/enabled=false
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1442/description=
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-1034/description=
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository_wtp-buildTools/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_tools_ptp_releases_helios/uri=http\://download.eclipse.org/tools/ptp/releases/helios
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090505-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090504-2055/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090504-2055
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0100/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-2200/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090730-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091025-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1300/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0100/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-1125/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_releases_helios_201002042330/type=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
+repositories/file\:_C\:_1target_dev_.metadata_.plugins_org.eclipse.pde.core_.bundle_pool/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-0206/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100125-1800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100124-2000/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_discoveryfeature/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090908-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/file\:_C\:_eclipse_p2_org.eclipse.equinox.p2.touchpoint.eclipse/enabled=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091030-1201/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091030-1201
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository_wtp-buildTools/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100428-1300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090602-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0800/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M1-200908061400/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-1034/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0800/isSystem=true
+repositories/file\:_C\:_eclipse_.eclipseextension/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090528-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1414/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-1200/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100311-1616/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.1-200909170800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090730-2000/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M2-200909170100/uri=http\://download.eclipse.org/eclipse/updates/3.6milestones/S-3.6M2-200909170100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091020-0931/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091020-0931
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090519-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091208-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-0800/version=1.0.0
+repositories/http\:__www.eclipse.org_modeling_emft_?project\=search\#search/enabled=false
+repositories/http\:__download.eclipse.org_releases_helios_201002042330_aggregate/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0840/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100413-1521/description=
+repositories/file\:_C\:_eclipse_configuration_org.eclipse.osgi_bundles_908_data_listener_1925729951/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_birt_update-site_2.6/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090508-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090508-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091124-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091124-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091204-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100307-2000/enabled=false
+repositories/http\:__download.eclipse.org_tools_cdt_releases_helios/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1036/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090428-0100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_helios_201002042330/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090428-0100/name=file\:/builds/I200904280100/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090908-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-1320/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-0206/enabled=false
+repositories/file\:_C\:_eclipse_p2_org.eclipse.equinox.p2.touchpoint.eclipse/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones/type=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
+repositories/http\:__download.eclipse.org_releases_helios_200910011616/uri=http\://download.eclipse.org/releases/helios/200910011616
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090427-1300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-0100/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100122-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M1-200908061400/uri=http\://download.eclipse.org/eclipse/updates/3.6milestones/S-3.6M1-200908061400
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090915-0100/isSystem=true
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100128-1731/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_releases_helios_200912172200_aggregate/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1023/provider=
+repositories/http\:__download.eclipse.org_releases_helios_201002042330/description=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.2-201002111343/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6/enabled=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091027-0100/isSystem=true
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900/type=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0809/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140/type=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository_wtp-buildTools/description=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_discoveryfeature/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100330-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-0800/isSystem=true
+repositories/file\:_C\:_tmp_extension_eclipse_.eclipseextension/suffix=eclipse
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1710/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090603-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100423-0906/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091206-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-1300/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-0100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1300/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100112-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091028-1300
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M7-I200904302300/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_dsdp_tml_updates_0.3/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_tools_emf_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100307-2000/isSystem=true
+repositories/http\:__download.eclipse.org_releases_helios_201003190900_aggregate/uri=http\://download.eclipse.org/releases/helios/201003190900/aggregate
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090515-1143/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-1545/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091006-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090513-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090513-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1800/isSystem=true
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900/version=1.0.0
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330_aggregate/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-0100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-1410/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_technology_emft_updates/uri=http\://download.eclipse.org/technology/emft/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_webtools_releng_repository/name=Releng repository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090427-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1800/version=1.0.0
+repositories/http\:__www.eclipse.org_egit_updates/uri=http\://www.eclipse.org/egit/updates
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090913-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1800/name=file\:/builds/I200904291800/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/file\:_C\:_eclipse_dropins_eclemma/description=
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900_aggregate/version=1.0.0
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330_aggregate/name=Helios artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091209-1300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090714-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090714-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-1057/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1710/description=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.2-201002111343/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090729-1307/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090811-0800/description=
+repositories/http\:__download.eclipse.org_tools_pdt_updates/uri=http\://download.eclipse.org/tools/pdt/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091025-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-2000/provider=
+repositories/http\:__download.eclipse.org_releases_galileo_aggregate/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091204-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090528-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-0731/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090520-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5-200906111540/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M2-200909170100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090416-1053/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-1448/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100119-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091118-1342/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091217-0819/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1310/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_releases_helios_201003190900/type=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100311-1616/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090802-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090604-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1600/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100223-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090428-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090428-0100
+repositories/http\:__download.eclipse.org_releases_helios_200911122150_aggregate/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1300/version=1.0.0
+repositories/http\:__download.eclipse.org_technology_actf_0.7_update-site/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100305-1011/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.1-200909170800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091028-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090603-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090503-2055/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC4-200906051444/version=1.0.0
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository_wtp-buildTools/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-1549/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090914-1300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091118-1342/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_releases_helios_200910011616_aggregate/isSystem=true
+repositories/http\:__download.eclipse.org_modeling_tmf_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-0100/provider=
+repositories/http\:__download.eclipse.org_releases_helios_aggregate/name=Helios artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100119-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1036/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-1400/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_dsdp_tm_updates_3.0/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090513-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100426-0852/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090611-1540/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC3-200905282000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090527-2000/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_tptp_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090401-1325/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-1545/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091117-1545
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140/suffix=compositeArtifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090929-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_modeling_m2t_xpand_updates/uri=http\://download.eclipse.org/modeling/m2t/xpand/updates/
+repositories/http\:__download.eclipse.org_releases_helios_200911122150/description=
+repositories/http\:__download.eclipse.org_modeling_emft_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091110-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091029-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC1-200905151143/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0100/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5-200906111540/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100223-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100223-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091125-2200/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091125-2200
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091124-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0840/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091029-0840
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140_aggregate/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-2000/name=file\:/builds/I200905072000/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0100/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090519-2000/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_tools_emf_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100106-1349/provider=
+repositories/http\:__download.eclipse.org_modeling_m2t_updates_releases/uri=http\://download.eclipse.org/modeling/m2t/updates/releases/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091006-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1800/description=
+repositories/file\:_C\:_eclipse/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-2300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090914-0800
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository_wtp-buildTools/uri=http\://download.eclipse.org/webtools/downloads/drops/T3.2.0/I-3.2.0-20100415032236/repository/wtp-buildTools
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091210-1301/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5/enabled=true
+repositories/http\:__download.eclipse.org_tools_mylyn_update_e3.3/isSystem=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC4-200906051444/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090922-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1300/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_webtools_releng_repository/provider=
+repositories/http\:__download.eclipse.org_modeling_m2t_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-0800/provider=
+repositories/file\:_C\:_eclipse_configuration_org.eclipse.osgi_bundles_908_data_listener_1925729951/uri=file\:/C\:/eclipse/configuration/org.eclipse.osgi/bundles/908/data/listener_1925729951/
+repositories/http\:__download.eclipse.org_modeling_mdt_ocl_3_0_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090401-1325/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_rt_rap_1.3_tooling/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-1034/provider=
+repositories/http\:__download.eclipse.org_releases_helios/suffix=compositeArtifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-1057/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100115-1100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100128-1731/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M5-201001291300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-0800/provider=
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository_wtp-buildTools/name=file\:/shared/webtools/projects/wtpbuildTools-T3.2.0-I/workdir/I-3.2.0-20100424021000/repository/wtp-buildTools - artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091006-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090331-0901/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-1320/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090528-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090528-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-2300/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100323-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100323-0800
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository/suffix=compositeArtifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090811-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/file\:_C\:_1target_dev_.metadata_.plugins_org.eclipse.pde.core_.bundle_pool/enabled=true
+repositories/file\:_C\:_eclipse_configuration_org.eclipse.osgi_bundles_908_data_listener_1925729951/enabled=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-1545/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_rt_riena_1.1.0.0_update/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091125-2200/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC2-200905221710/uri=http\://download.eclipse.org/eclipse/updates/3.5milestones/S-3.5RC2-200905221710/
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M2-200909170100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1300/description=
+repositories/http\:__download.eclipse.org_tools_mylyn_update_extras/uri=http\://download.eclipse.org/tools/mylyn/update/extras
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090915-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090915-0100
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC1-200905151143/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090802-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-0804/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090922-0800/isSystem=true
+repositories/http\:__download.eclipse.org_releases_helios/type=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900/uri=http\://download.eclipse.org/releases/galileo/201002260900
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_discoveryfeature/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M6-201003121448/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100105-1537/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090416-1053/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC1-200905151143/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_webtools_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0800/enabled=false
+repositories/http\:__download.eclipse.org_releases_helios_200910011616_aggregate/uri=http\://download.eclipse.org/releases/helios/200910011616/aggregate
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090401-1325/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100426-0852/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-1057/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository/isSystem=true
+repositories/http\:__download.eclipse.org_releases_helios_201003190900_aggregate/suffix=artifacts.xml
+repositories/file\:_C\:_eclipse_.eclipseextension/name=C\:\\eclipse\\.eclipseextension
+repositories/http\:__download.eclipse.org_releases_galileo_aggregate/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1126/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100308-1300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090901-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.2-201002111343/description=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC2-200905221710/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090520-2000/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100423-0906/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100423-0906
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-0100/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_technology_jwt_update-site/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC1-200905151143/uri=http\://download.eclipse.org/eclipse/updates/3.5milestones/S-3.5RC1-200905151143
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios/name=Helios Milestone Repository
+repositories/http\:__download.eclipse.org_releases_helios_200912172200_aggregate/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC2-200905221710/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100420-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1710/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M7-I200904302300/enabled=false
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository/name=Build repository I-3.2.0-20100415032236
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-1200/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-1800/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M5-200902021535/uri=http\://download.eclipse.org/eclipse/updates/3.5milestones/S-3.5M5-200902021535
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090707-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091208-0100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-1200/description=
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900_aggregate/uri=http\://fullmoon.ottawa.ibm.com/releases/helios/201003190900/aggregate
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900_aggregate/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090513-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100129-1300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100224-2242/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090603-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090603-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090512-2000/suffix=artifacts.xml
+repositories/file\:_C\:_tmp_extension_eclipse_.eclipseextension/version=1
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100316-0859/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100316-0859
+repositories/http\:__www.eclipse.org_modeling_emf_updates/uri=http\://www.eclipse.org/modeling/emf/updates/
+repositories/http\:__download.eclipse.org_modeling_m2t_updates_releases/isSystem=false
+repositories/http\:__download.eclipse.org_datatools_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100225-1936/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091103-0941/enabled=false
+repositories/http\:__download.eclipse.org_tools_ptp_releases_helios/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091208-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1800/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M6-200903130100/uri=http\://download.eclipse.org/eclipse/updates/3.5milestones/S-3.5M6-200903130100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1300/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900_aggregate/name=Helios artifacts
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.2-201002111343/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-1200/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090611-1540/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1800/suffix=artifacts.xml
+repositories/file\:_C\:_eclipse_dropins_eclemma/uri=file\:/C\:/eclipse/dropins/eclemma/
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_discoveryfeature/uri=http\://download.eclipse.org/eclipse/updates/3.6milestones/discoveryfeature
+repositories/http\:__download.eclipse.org_dsdp_mtj_updates_1.0.1_stable/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-2200/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-1400/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090421-0930/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100105-1537/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100105-1537
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100424-2000/isSystem=true
+repositories/http\:__download.eclipse.org_tools_ptp_releases_2.0/isSystem=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones/suffix=compositeArtifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100308-0800
+repositories/http\:__download.eclipse.org_releases_helios_200910011616_aggregate/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0809/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090530-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090428-0100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090528-2000/isSystem=true
+repositories/http\:__download.eclipse.org_rt_rap_1.2_runtime-update/enabled=false
+repositories/file\:_C\:_eclipse_dropins_eclemma/suffix=eclipse
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090521-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1310/isSystem=true
+repositories/http\:__download.eclipse.org_dsdp_tml_updates_0.3/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090520-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-2300/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-1600/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1600/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090508-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1442/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091026-1442
+repositories/http\:__download.eclipse.org_stp_helios/uri=http\://download.eclipse.org/stp/helios
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090604-2000/enabled=false
+repositories/http\:__download.eclipse.org_releases_helios_200912172200/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100106-1349/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090818-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090506-2000/name=file\:/builds/I200905062000/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-1057/name=file\:/builds/I200904301057/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/http\:__download.eclipse.org_modeling_tmf_updates/uri=http\://download.eclipse.org/modeling/tmf/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090805-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-1057/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1300/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_helios_200911122150_aggregate/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100413-1521/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090519-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091125-2200/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090929-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090929-0800
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M5-201001291300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090609-1400/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100128-1731/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091110-0800/description=
+repositories/http\:__download.eclipse.org_releases_helios_200911122150_aggregate/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.2-201002111343/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_rt_riena_1.1.0.1_update/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100426-0852/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090512-2000/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M6-200903130100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100309-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-1800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100202-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100202-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100202-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100414-1200/description=
+repositories/http\:__download.eclipse.org_modeling_emf_updates/uri=http\://download.eclipse.org/modeling/emf/updates/
+repositories/http\:__www.eclipse.org_modeling_emf_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090601-2000/suffix=artifacts.xml
+repositories/file\:_C\:_eclipse_dropins_eclemma/name=C\:\\eclipse\\dropins\\eclemma
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-0100/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100311-1616/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1800/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC1-200905151143/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1800/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_tools_mylyn_update_e3.4/uri=http\://download.eclipse.org/tools/mylyn/update/e3.4
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090503-2055/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090503-2055
+repositories/http\:__download.eclipse.org_releases_galileo/enabled=false
+repositories/file\:_C\:_1target_provmiddle_.metadata_.plugins_org.eclipse.pde.core_.bundle_pool/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-1448/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091201-1100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-0804/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100330-0800/enabled=false
+repositories/http\:__download.eclipse.org_modeling_emft_updates_releases/uri=http\://download.eclipse.org/modeling/emft/updates/releases/
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M1-200908061400/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-1448/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090818-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091006-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100112-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-0100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100330-0800/suffix=artifacts.xml
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios/nickname=Helios Milestone Repository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091118-1342/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_webtools_releng_repository/type=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0100/name=file\:/builds/I200904290100/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090605-1444/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-2300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330_aggregate/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090929-0800/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_releases_helios_200910011616_aggregate/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0809/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091110-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090714-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-1600/enabled=false
+repositories/file\:_C\:_1target_provmiddle_.metadata_.plugins_org.eclipse.pde.core_.bundle_pool/name=Bundle pool
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100124-2000/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090416-1053/version=1.0.0
+repositories/http\:__www.eclipse.org_egit_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-0800/description=
+repositories/http\:__download.eclipse.org_birt_update-site_2.5/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1800/name=file\:/builds/I200904271800/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100225-1936/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090507-2000
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository_wtp-buildTools/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100302-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100302-0800
+repositories/http\:__update.eclemma.org/isSystem=false
+repositories/http\:__dev.eclipse.org_svnroot_dsdp_org.eclipse.tm.tcf_releases_0.2.0/uri=http\://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/releases/0.2.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M2-200909170100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M3-200910301201/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100302-0800/description=
+repositories/file\:_C\:_eclipse/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-1448/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091118-1342/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_releases_helios_200912172200_aggregate/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1310/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1600/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090401-1325/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100121-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-1549/provider=
+repositories/http\:__download.eclipse.org_releases_helios_aggregate/uri=http\://download.eclipse.org/releases/helios/aggregate
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1710/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_tools_mylyn_update_e3.3/enabled=false
+repositories/http\:__download.eclipse.org_modeling_gmf_updates_releases/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100122-0800/name="Eclipse Project Test Site"
+repositories/file\:_C\:_tmp_extension_eclipse_.eclipseextension/name=C\:\\tmp\\extension\\eclipse\\.eclipseextension
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090531-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091103-0941/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091103-0941
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090426-2000/isSystem=true
+repositories/file\:_C\:_1target_provmiddle_test.plugin_update/uri=file\:/C\:/1target/provmiddle/test.plugin_update/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-1549/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-1125/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100413-1521/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090505-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090811-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1800/version=1.0.0
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository_wtp-buildTools/isSystem=true
+repositories/http\:__download.eclipse.org_technology_mat_0.8_update-site/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090526-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0840/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M2-200909170100/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository/suffix=compositeArtifacts.xml
+repositories/http\:__download.eclipse.org_releases_helios_aggregate/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-1200/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100330-0800/description=
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330_aggregate/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090519-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-1600/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100209-1600
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900_aggregate/uri=http\://download.eclipse.org/releases/galileo/201002260900/aggregate
+repositories/file\:_C\:_eclipse_p2_org.eclipse.equinox.p2.touchpoint.eclipse/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100425-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100223-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100426-0852/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5/suffix=compositeArtifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100112-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100423-0906/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091025-2000/suffix=artifacts.xml
+repositories/http\:__www.eclipse.org_modeling_emft_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-1410/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100425-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090528-2000/version=1.0.0
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository_wtp-buildTools/enabled=false
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090929-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-2300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100209-2300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1600/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091013-1302/enabled=false
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100310-1800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1300/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090512-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090512-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100307-2000/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_helios_200911122150/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090429-1800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1036/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090514-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-1300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1300/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-0206/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1800/description=
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1023/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-1034/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100428-0100
+repositories/http\:__download.eclipse.org_modeling_gmf_updates_releases/uri=http\://download.eclipse.org/modeling/gmf/updates/releases/
+repositories/file\:_C\:_1target_eclipseweb_.metadata_.plugins_org.eclipse.pde.core_install/enabled=true
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-1320/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-0100/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090505-2000/name=file\:/builds/I200905052000/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090922-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090529-2000/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_tools_mylyn_update_extras/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090525-2000/version=1.0.0
+repositories/http\:__www.eclipse.org_modeling_emft_?project\=search\#search/uri=http\://www.eclipse.org/modeling/emft/?project\=search\#search
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330/uri=http\://fullmoon.ottawa.ibm.com/releases/helios/201002042330
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090922-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100217-1031/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100217-1031
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1800/suffix=artifacts.xml
+repositories/file\:_C\:_eclipse_dropins_eclemma/enabled=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_discoveryfeature/version=1.0.0
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository/name=Build repository I-3.2.0-20100410204757
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100122-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100122-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090504-2055/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_galileo_releases/uri=http\://download.eclipse.org/galileo/releases/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-0804/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository_wtp-buildTools/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100423-0906/version=1.0.0
+repositories/http\:__download.eclipse.org_modeling_m2t_xpand_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-1549/enabled=false
+repositories/file\:_C\:_1target_provmiddle_test.plugin_update/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100202-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-0800/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_rt_rap_1.3_tooling/uri=http\://download.eclipse.org/rt/rap/1.3/tooling
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090908-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090908-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-2300/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100302-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090601-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-0100/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1300/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0800/provider=
+repositories/http\:__download.eclipse.org_releases_helios_201002042330/suffix=compositeArtifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1300/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091006-0800/suffix=artifacts.xml
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330/suffix=compositeArtifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090515-1143/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100302-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090515-1143/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100311-1616/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-0800/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M3-200910301201/uri=http\://download.eclipse.org/eclipse/updates/3.6milestones/S-3.6M3-200910301201
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090730-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090528-2000/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090913-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090913-2000
+repositories/http\:__download.eclipse.org_birt_update-site_2.5/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090508-2000/name=file\:/builds/I200905082000/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090531-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090531-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090901-0800/isSystem=true
+repositories/file\:_C\:_eclipse_.eclipseextension/type=org.eclipse.equinox.p2.extensionlocation.artifactRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090908-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090923-1538/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090901-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100105-1537/provider=
+repositories/http\:__www.eclipse.org_modeling_emft_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090805-1800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091028-0100
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M2-200909170100/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0100/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100128-1731/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-0100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090525-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100121-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-1549/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100429-1549
+repositories/http\:__download.eclipse.org_stp_updates/uri=http\://download.eclipse.org/stp/updates
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1800/version=1.0.0
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios/type=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100115-1100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100115-1100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1126/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1023/isSystem=true
+repositories/http\:__download.eclipse.org_releases_helios_200911122150/suffix=compositeArtifacts.xml
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository/type=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100105-1537/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090426-2000/name=file\:/builds/I200904262000/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090605-1444/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091209-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100115-1100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1300/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090916-1800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100119-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100121-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.1-200909170800/version=1.0.0
+repositories/http\:__download.eclipse.org_modeling_emf_updates/isSystem=false
+repositories/http\:__download.eclipse.org_stp_updates/isSystem=false
+repositories/http\:__download.eclipse.org_stp_updates/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M4-200912101301/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091206-2000/isSystem=true
+repositories/http\:__download.eclipse.org_technology_emft_updates/isSystem=false
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090525-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091027-0100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090518-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090426-2000/version=1.0.0
+repositories/http\:__download.eclipse.org_technology_linuxtools_update/uri=http\://download.eclipse.org/technology/linuxtools/update
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-0206/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100429-0206
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0100/provider=
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900_aggregate/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository_wtp-buildTools/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090513-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090609-1400/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100424-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090527-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090527-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091027-0100/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-1125/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-1300/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090913-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100129-1300/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_releases_helios_200911122150_aggregate/uri=http\://download.eclipse.org/releases/helios/200911122150/aggregate
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090913-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-1300/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1300/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5-200906111540/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091204-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1600/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-1125/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090803-1300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091025-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090506-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M4-200912101301/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-1057/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091217-0819/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090521-2000/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_releases_helios/uri=http\://download.eclipse.org/releases/helios
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900/description=
+repositories/http\:__download.eclipse.org_technology_jwt_update-site/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091217-0819/isSystem=true
+repositories/http\:__download.eclipse.org_modeling_gmt_modisco_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds/enabled=true
+repositories/http\:__www.eclipse.org_pde_pde-api-tools_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090528-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1300/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091210-1301/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-0800/enabled=false
+repositories/file\:_C\:_eclipse_dropins_eclemma/type=org.eclipse.equinox.p2.extensionlocation.artifactRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100223-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100307-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100307-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091013-1302/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091013-1302
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090602-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090426-2000/enabled=false
+repositories/file\:_C\:_eclipse_.eclipseextension/enabled=true
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository/description=
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository_wtp-buildTools/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100311-1616/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100311-1616
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-1300/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090513-2000/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-1057/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_helios/count=3
+repositories/file\:_C\:_eclipse_configuration_org.eclipse.osgi_bundles_908_data_listener_1925729951/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100112-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100112-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090915-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091027-0100/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M5-201001291300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090923-1538/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090605-1444/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090529-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0100/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090602-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090602-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1036/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_discoveryfeature/provider=
+repositories/http\:__download.eclipse.org_dsdp_tml_updates_0.3/uri=http\://download.eclipse.org/dsdp/tml/updates/0.3/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100112-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_releases_helios_aggregate/enabled=false
+repositories/http\:__download.eclipse.org_rt_eclipselink_updates/uri=http\://download.eclipse.org/rt/eclipselink/updates
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100129-1300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100126-0800
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository/suffix=compositeArtifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds/suffix=compositeArtifacts.xml
+repositories/file\:_C\:_eclipse/name=Bundle pool
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-0800/name="Eclipse Project Test Site"
+repositories/file\:_C\:_1target_dev_.metadata_.plugins_org.eclipse.pde.core_.bundle_pool/version=1.0.0
+repositories/file\:_C\:_eclipse_configuration_org.eclipse.osgi_bundles_908_data_listener_1925729951/version=1.0.0
+repositories/file\:_C\:_1target_provmiddle_test.plugin_update/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0100/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090530-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090803-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0809/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100224-2242/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090505-2000/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-0804/version=1.0.0
+repositories/file\:_C\:_1target_provmiddle_.metadata_.plugins_org.eclipse.pde.core_.bundle_pool/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_modeling_emft_eef_updates_releases/enabled=false
+eclipse.preferences.version=1
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090901-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090518-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090514-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100225-1936/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_tools_pdt_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100217-1031/description=
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140/uri=http\://download.eclipse.org/releases/galileo/200909241140
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_modeling_gmt_modisco_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090521-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090521-2000
+repositories/http\:__download.eclipse.org_releases_helios_201002042330_aggregate/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100202-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0100/enabled=false
+repositories/http\:__download.eclipse.org_tools_pdt_updates_2.0/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090729-1307/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090526-2000/isSystem=true
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140_aggregate/uri=http\://download.eclipse.org/releases/galileo/200909241140/aggregate
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091006-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100127-0100
+repositories/http\:__download.eclipse.org_releases_helios_200910011616_aggregate/name=Helios artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1310/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1710/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091117-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100121-0800/description=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC3-200905282000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100122-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/file\:_C\:_tmp_extension_eclipse_.eclipseextension/type=org.eclipse.equinox.p2.extensionlocation.artifactRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100323-0800/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M7-I200904302300/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_helios_200911122150/provider=
+repositories/http\:__download.eclipse.org_dsdp_mtj_updates_1.0.1_stable/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-0100/enabled=false
+repositories/http\:__download.eclipse.org_releases_helios_200912172200/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090917-0100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090602-2000/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091020-0931/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090529-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090526-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC3-200905282000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100305-1011/provider=
+repositories/http\:__download.eclipse.org_technology_mat_0.8_update-site/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090519-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091210-1301/provider=
+repositories/http\:__download.eclipse.org_releases_galileo/uri=http\://download.eclipse.org/releases/galileo
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds/nickname="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-0800/isSystem=true
+repositories/http\:__download.eclipse.org_releases_helios_201002042330_aggregate/name=Helios artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100420-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091103-0941/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140_aggregate/isSystem=true
+repositories/file\:_C\:_1target_provmiddle_test.plugin_update/enabled=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-1032/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1414/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091208-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100425-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091020-0931/description=
+repositories/http\:__www.eclipse.org_modeling_emf_updates/enabled=false
+repositories/http\:__download.eclipse.org_tools_ptp_releases_galileo/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090714-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090929-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100223-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090520-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1300/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0800/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.2-201002111343/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100202-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-1400/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-1200/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100217-1031/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1442/isSystem=true
+repositories/http\:__download.eclipse.org_releases_helios_201002042330/uri=http\://download.eclipse.org/releases/helios/201002042330
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0800/name=file\:/builds/I200904290800/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100129-1300/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090508-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090508-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100312-0800
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M4-200912101301/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090530-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090922-0800/description=
+repositories/http\:__download.eclipse.org_modeling_mdt_updates/uri=http\://download.eclipse.org/modeling/mdt/updates/
+repositories/http\:__update.eclemma.org/enabled=false
+repositories/http\:__download.eclipse.org_releases_galileo/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1300/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.2-201002111343/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6/name="Eclipse Project 3.6 repo"
+repositories/http\:__download.eclipse.org_releases_helios_201003190900_aggregate/enabled=false
+repositories/http\:__download.eclipse.org_technology_epp_updates_1.1/uri=http\://download.eclipse.org/technology/epp/updates/1.1/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090526-2000/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC2-200905221710/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090401-1325/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-0804/description=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5-200906111540/provider=
+repositories/http\:__download.eclipse.org_releases_helios_200910011616/name=Helios artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100426-0852/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1414/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository_wtp-buildTools/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1442/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090908-0800/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC2-200905221710/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-1549/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100323-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-0100/name=file\:/builds/I200904300100/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090505-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100424-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090604-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090506-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090506-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090529-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__dev.eclipse.org_svnroot_dsdp_org.eclipse.tm.tcf_releases_0.2.0/isSystem=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M6-201003121448/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091020-0931/provider=
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090707-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100414-1200/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_releases_helios_201002042330_aggregate/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100122-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090527-2000/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_releases_helios/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-1800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090707-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090707-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1300/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository/type=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
+repositories/http\:__download.eclipse.org_rt_eclipselink_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-1200/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-1800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-0804/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100424-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090602-2000/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1036/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090728-1036
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090922-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090922-0800
+repositories/file\:_C\:_eclipse_configuration_org.eclipse.osgi_bundles_908_data_listener_1925729951/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100224-2242/name="Eclipse Project Test Site"
+repositories/file\:_C\:_eclipse_configuration_org.eclipse.osgi_bundles_908_data_listener_1925729951/name=artifact listener dropins
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1300/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-0800/isSystem=true
+repositories/http\:__download.eclipse.org_modeling_gmf_updates_releases/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1300/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_releases_helios_200910011616/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100330-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1300/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090515-1143/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090515-1143/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090515-1143
+repositories/http\:__download.eclipse.org_modeling_gmt_modisco_updates_release/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100420-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090818-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090818-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091030-1201/description=
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900_aggregate/name=Galileo artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-0100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0100/provider=
+repositories/http\:__download.eclipse.org_rt_riena_1.1.0.1_update/isSystem=false
+repositories/http\:__download.eclipse.org_modeling_mdt_ocl_3_0_updates/enabled=false
+repositories/http\:__download.eclipse.org_modeling_emft_updates/uri=http\://download.eclipse.org/modeling/emft/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0800/enabled=false
+repositories/file\:_C\:_eclipse_p2_org.eclipse.equinox.p2.touchpoint.eclipse/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1300/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_releases_helios/nickname=Helios
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-1400/isSystem=true
+repositories/http\:__www.eclipse.org_pde_pde-api-tools_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-2300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090529-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090508-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_releases_helios_200910011616_aggregate/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090520-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository_wtp-buildTools/enabled=false
+repositories/file\:_C\:_eclipse_p2_org.eclipse.equinox.p2.core_cache/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1300/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090527-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090513-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090923-1538/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090923-1538
+repositories/http\:__download.eclipse.org_modeling_emf_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090511-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090511-2000
+repositories/http\:__download.eclipse.org_releases_helios_200912172200/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1300/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091118-1342/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-0100/enabled=false
+repositories/http\:__download.eclipse.org_releases_helios_201003190900/suffix=compositeArtifacts.xml
+repositories/file\:_C\:_1target_dev_.metadata_.plugins_org.eclipse.pde.core_.bundle_pool/isSystem=true
+repositories/http\:__download.eclipse.org_releases_helios_200912172200/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090515-1143/description=
+repositories/http\:__download.eclipse.org_releases_helios_201002042330_aggregate/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1036/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090714-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090426-2000/description=
+repositories/http\:__download.eclipse.org_tools_pdt_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-1545/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091124-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090519-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100323-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091207-1300
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6/count=10
+repositories/http\:__download.eclipse.org_rt_swordfish_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1023/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090426-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090605-1444/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090511-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090603-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100105-1537/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090714-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100121-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/file\:_C\:_1target_provmiddle_test.plugin_update/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100216-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-0804/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090514-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-2300/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090901-0800/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M4-200912101301/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090505-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090525-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios/enabled=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090416-1053/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-1410/description=
+repositories/http\:__download.eclipse.org_rt_rap_1.3_tooling/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090601-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090503-2055/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090518-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090530-2000/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_releases_helios_200910011616/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M5-200902021535/isSystem=true
+repositories/file\:_C\:_1target_dev_.metadata_.plugins_org.eclipse.pde.core_.bundle_pool/name=Bundle pool
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-1410/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-2200/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0800/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5-200906111540/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_releases_helios_200912172200_aggregate/name=Helios artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090331-0901/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100121-0800/enabled=false
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140_aggregate/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100121-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100121-0800
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M5-201001291300/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090811-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0840/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100112-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6/uri=http\://download.eclipse.org/eclipse/updates/3.6
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090531-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100424-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091026-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100217-1031/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-1410/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090605-1444/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090605-1444
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900_aggregate/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5/description=
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository_wtp-buildTools/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090519-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091013-1302/version=1.0.0
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091110-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100217-1031/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090529-2000/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M6-201003121448/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100129-1300/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/file\:_C\:_1target_eclipseweb_.metadata_.plugins_org.eclipse.pde.core_install/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-1300/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090503-2055/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-0800/provider=
+repositories/http\:__download.eclipse.org_releases_helios_200911122150/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091204-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-1125/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100106-1349/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-1300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091207-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091217-0819/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090611-1540/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090530-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090530-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-1034/version=1.0.0
+repositories/file\:_C\:_1target_eclipseweb_.metadata_.plugins_org.eclipse.pde.core_install/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-0100/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M7-I200904302300/uri=http\://download.eclipse.org/eclipse/updates/3.5milestones/S-3.5M7-I200904302300/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-1320/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090331-0901/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100122-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090503-2055/isSystem=true
+repositories/http\:__download.eclipse.org_rt_swordfish_updates/uri=http\://download.eclipse.org/rt/swordfish/updates
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091027-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091027-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090528-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_modeling_gmt_modisco_updates_release/uri=http\://download.eclipse.org/modeling/gmt/modisco/updates/release/
+repositories/http\:__download.eclipse.org_technology_epp_updates_1.1/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090426-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090426-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-1549/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090818-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100223-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds/type=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-2300/description=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M4-200912101301/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-1448/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0800/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M5-200902021535/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_helios_201003190900_aggregate/name=Helios artifacts
+repositories/file\:_C\:_eclipse_dropins_eclemma/version=1
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091210-1301/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091210-1301
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090530-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-0800/enabled=false
+repositories/file\:_C\:_eclipse_p2_org.eclipse.equinox.p2.core_cache/enabled=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091210-1301/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1300/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091103-0941/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones/uri=http\://download.eclipse.org/eclipse/updates/3.6milestones/
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M2-200909170100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090421-0930/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090923-1538/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091208-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091208-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091217-0819/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090601-2000/name="Eclipse Project Test Site"
+repositories/file\:_C\:_eclipse_p2_org.eclipse.equinox.p2.core_cache/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-1549/version=1.0.0
+repositories/http\:__download.eclipse.org_modeling_m2m_updates/enabled=false
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330_aggregate/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090529-2000/provider=
+repositories/http\:__download.eclipse.org_stp_helios/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100425-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1023/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100223-0800/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M3-200910301201/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100105-1537/name="Eclipse Project Test Site"
+repositories/file\:_C\:_eclipse/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100423-0906/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100225-1936/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_releases_helios_200912172200_aggregate/uri=http\://download.eclipse.org/releases/helios/200912172200/aggregate
+repositories/http\:__download.eclipse.org_releases_galileo_aggregate/name=Galileo artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1310/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0800/version=1.0.0
+repositories/http\:__eclipse.org_tptp_updates/uri=http\://eclipse.org/tptp/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100302-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090901-0800/enabled=false
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090530-2000/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090514-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0100/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100423-0906/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_rt_rap_1.3_runtime/uri=http\://download.eclipse.org/rt/rap/1.3/runtime
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1400/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090526-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090526-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090513-2000/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5-200906111540/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090512-2000/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_birt_update-site_2.6/uri=http\://download.eclipse.org/birt/update-site/2.6
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100202-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1036/description=
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140_aggregate/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100425-2000/description=
+repositories/http\:__download.eclipse.org_tools_pdt_updates_2.0/uri=http\://download.eclipse.org/tools/pdt/updates/2.0/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-1300/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-1200/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090721-1200
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1126/description=
+repositories/http\:__download.eclipse.org_webtools_updates/uri=http\://download.eclipse.org/webtools/updates
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091125-2200/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090923-1538/enabled=false
+repositories/http\:__download.eclipse.org_rt_rap_1.2_runtime-update/isSystem=false
+repositories/http\:__download.eclipse.org_releases_helios_200910011616_aggregate/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1300/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-0100/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-1034/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M5-200902021535/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100115-1100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090514-2000/description=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC3-200905282000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090604-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090505-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1126/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090609-1400/version=1.0.0
+repositories/http\:__www.eclipse.org_modeling_emft_?project\=search\#search/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100105-1537/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100330-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0100/isSystem=true
+repositories/http\:__download.eclipse.org_releases_helios_201003190900_aggregate/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090421-0930/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090802-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090802-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100323-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090729-1307/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091210-1301/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090707-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100119-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_modeling_emft_eef_updates_releases/uri=http\://download.eclipse.org/modeling/emft/eef/updates/releases
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-1600/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-1600/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-0800/description=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M7-I200904302300/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091006-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_releases_helios_201002042330_aggregate/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090514-2000/suffix=artifacts.xml
+repositories/file\:_C\:_1target_eclipseweb_.metadata_.plugins_org.eclipse.pde.core_install/uri=file\:/C\:/1target/eclipseweb/.metadata/.plugins/org.eclipse.pde.core/install/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100316-0859/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_helios_200911122150/name=Helios artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1300/provider=
+repositories/http\:__download.eclipse.org_egit_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-1032/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/file\:_C\:_eclipse_.eclipseextension/uri=file\:/C\:/eclipse/.eclipseextension
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090531-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1414/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090728-1414
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090601-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-2200/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090518-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100316-0859/description=
+repositories/http\:__download.eclipse.org_webtools_releng_repository/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090601-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090601-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100125-0800
+repositories/http\:__download.eclipse.org_modeling_m2m_updates_releases/uri=http\://download.eclipse.org/modeling/m2m/updates/releases/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1300/enabled=false
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository_wtp-buildTools/name=file\:/shared/webtools/projects/wtpbuildTools-T3.2.0-I/workdir/I-3.2.0-20100415032236/repository/wtp-buildTools - artifacts
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090506-2000/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-1032/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-0800/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC2-200905221710/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-0800/name=file\:/builds/I200904270800/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/http\:__download.eclipse.org_rt_riena_1.1.0.0_update/isSystem=false
+repositories/http\:__download.eclipse.org_releases_helios_200910011616/type=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
+repositories/http\:__download.eclipse.org_modeling_m2m_updates/isSystem=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M1-200908061400/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090504-2055/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100105-1537/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090611-1540/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_releases_galileo_aggregate/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-0100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_tptp_updates/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M2-200909170100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100302-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100128-1731/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091124-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100121-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090520-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090520-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090609-1400/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100426-0852/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-1032/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090825-1032
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090729-1307/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090729-1307
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100414-1200/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900_aggregate/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090609-1400/name="Eclipse Project Test Site"
+repositories/file\:_C\:_eclipse_p2_org.eclipse.equinox.p2.core_cache/name=download cache
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100316-0859/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1400/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100330-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090527-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091013-1302/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100115-1100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-0731/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090507-0731
+repositories/http\:__download.eclipse.org_releases_helios_201002042330/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-1057/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090430-1057
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1300/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0800/description=
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository/name=Build repository I-3.2.0-20100424021000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100126-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090721-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_tools_cdt_releases_galileo/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090602-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090416-1053/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100112-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100414-1200/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090603-2000/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1300/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090730-2000/enabled=false
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330/name=Helios artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100316-0859/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100224-2242/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/file\:_C\:_eclipse_.eclipseextension/version=1
+repositories/file\:_C\:_eclipse_configuration_org.eclipse.osgi_bundles_908_data_listener_1925729951/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/file\:_C\:_eclipse_p2_org.eclipse.equinox.p2.core_cache/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090915-0100/version=1.0.0
+repositories/http\:__download.eclipse.org_modeling_mdt_updates_releases/uri=http\://download.eclipse.org/modeling/mdt/updates/releases/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091027-0100/version=1.0.0
+repositories/http\:__download.eclipse.org_tools_mylyn_update_e3.3/uri=http\://download.eclipse.org/tools/mylyn/update/e3.3
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100128-1731/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-1034/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100406-1034
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090908-0800/enabled=false
+repositories/file\:_C\:_1target_provmiddle_test.plugin_update/name=Update Site
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1300/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-1125/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091204-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-0800/description=
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900_aggregate/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_releases_helios_aggregate/version=1.0.0
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository/enabled=false
+repositories/http\:__download.eclipse.org_tools_emf_updates/uri=http\://download.eclipse.org/tools/emf/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1300/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_releases_helios_aggregate/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1310/version=1.0.0
+repositories/http\:__download.eclipse.org_technology_linuxtools_update/isSystem=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M6-200903130100/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090504-2055/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100406-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-1300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090520-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_rt_rap_1.2_update/enabled=false
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios/uri=http\://fullmoon.ottawa.ibm.com/releases/helios
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository_wtp-buildTools/description=
+repositories/http\:__download.eclipse.org_modeling_m2t_updates_releases/enabled=false
+repositories/http\:__download.eclipse.org_modeling_emft_updates/isSystem=false
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository_wtp-buildTools/name=file\:/shared/webtools/projects/wtpbuildTools-T3.2.0-I/workdir/I-3.2.0-20100410204757/repository/wtp-buildTools - artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090513-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-1032/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090605-1444/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1800/description=
+repositories/file\:_C\:_eclipse_p2_org.eclipse.equinox.p2.touchpoint.eclipse/uri=file\:/C\:/eclipse/p2/org.eclipse.equinox.p2.touchpoint.eclipse/
+repositories/file\:_C\:_eclipse/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091204-0800/isSystem=true
+repositories/http\:__download.eclipse.org_modeling_tmf_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1300/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-0800/provider=
+repositories/http\:__download.eclipse.org_webtools_releng_repository/nickname=Releng repository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100124-2000/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M6-200903130100/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090511-2000/name=file\:/builds/I200905112000/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/http\:__download.eclipse.org_modeling_mdt_updates_releases/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091118-1342/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090506-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1036/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091124-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/file\:_C\:_eclipse_p2_org.eclipse.equinox.p2.touchpoint.eclipse/name=Bundle pool
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090506-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090525-2000/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1023/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-1448/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-1300/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090603-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090505-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090505-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090603-2000/isSystem=true
+repositories/http\:__download.eclipse.org_modeling_m2t_xpand_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100124-2000/provider=
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100424-2000/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-1032/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091020-0931/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100423-0906/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1300/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-1300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090530-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/file\:_C\:_eclipse_configuration_org.eclipse.osgi_bundles_908_data_listener_1925729951/isSystem=true
+repositories/file\:_C\:_1target_dev_.metadata_.plugins_org.eclipse.pde.core_.bundle_pool/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5-200906111540/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_releases_helios_200912172200_aggregate/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.1-200909170800/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M3-200910301201/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090605-1444/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0840/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1310/enabled=false
+repositories/http\:__download.eclipse.org_tools_pdt_updates_2.0/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_discoveryfeature/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5/provider=
+repositories/http\:__download.eclipse.org_technology_epp_updates_1.1/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090521-2000/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_egit_updates/isSystem=false
+repositories/http\:__download.eclipse.org_webtools_releng_repository/uri=http\://download.eclipse.org/webtools/releng/repository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100223-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M5-201001291300/description=
+repositories/http\:__download.eclipse.org_releases_helios_201003190900/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091110-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0100/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M6-201003121448/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090913-2000/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091006-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091006-0800
+repositories/http\:__download.eclipse.org_rt_rap_1.2_update/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100224-2242/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-0800/suffix=artifacts.xml
+repositories/file\:_C\:_tmp_extension_eclipse_.eclipseextension/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1300/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_modeling_gmt_modisco_updates/uri=http\://download.eclipse.org/modeling/gmt/modisco/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0800/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0800/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100311-1616/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1300/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_helios_201003190900_aggregate/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091020-0931/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090915-0100/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090526-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090729-1307/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091124-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100106-1349/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100330-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100330-0800
+repositories/http\:__download.eclipse.org_technology_dltk_updates/isSystem=false
+repositories/http\:__download.eclipse.org_releases_helios_200912172200_aggregate/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091027-0100/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090917-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090525-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091110-0800/provider=
+repositories/file\:_C\:_tmp_extension_eclipse_.eclipseextension/uri=file\:/C\:/tmp/extension/eclipse/.eclipseextension
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M1-200908061400/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_modeling_emft_updates_releases/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6/nickname=The Eclipse Project Updates
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090427-1800
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900/name=Helios artifacts
+repositories/http\:__download.eclipse.org_rt_rap_1.3_runtime/enabled=false
+repositories/http\:__download.eclipse.org_webtools_releng_repository/isSystem=false
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-0800/isSystem=true
+repositories/http\:__download.eclipse.org_tools_cdt_releases_helios/enabled=false
+repositories/http\:__download.eclipse.org_releases_helios_201003190900_aggregate/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-0800/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100323-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-1034/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090515-1143/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1300/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1442/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_releases_helios_aggregate/provider=
+repositories/http\:__download.eclipse.org_releases_helios_200911122150/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090531-2000/name="Eclipse Project Test Site"
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330_aggregate/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-0100/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0100/version=1.0.0
+repositories/http\:__download.eclipse.org_stp_helios/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100413-1521/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100305-1011/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100305-1011
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090601-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-2300/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100424-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100305-1011/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100307-2000/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091210-1301/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC3-200905282000/enabled=false
+repositories/http\:__download.eclipse.org_technology_dltk_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100224-2242/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1800/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091206-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091206-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds/description=
+repositories/http\:__eclipse.org_tptp_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100105-1537/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-0800/description=
+repositories/http\:__download.eclipse.org_releases_helios_201003190900/enabled=false
+repositories/http\:__download.eclipse.org_modeling_emf_updates_releases/uri=http\://download.eclipse.org/modeling/emf/updates/releases/
+repositories/http\:__download.eclipse.org_technology_actf_0.7_update-site/uri=http\://download.eclipse.org/technology/actf/0.7/update-site/
+repositories/http\:__download.eclipse.org_releases_galileo_aggregate/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-0800/provider=
+repositories/http\:__download.eclipse.org_releases_helios_201002042330_aggregate/uri=http\://download.eclipse.org/releases/helios/201002042330/aggregate
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090802-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1300/suffix=artifacts.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-1545/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1023/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1300/suffix=artifacts.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100202-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100106-1349/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100106-1349
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900_aggregate/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100423-0906/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0800/version=1.0.0
+repositories/file\:_C\:_eclipse/enabled=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090504-2055/name=file\:/builds/I200905042055/org.eclipse.releng.eclipsebuilder/../src/buildRepo - artifacts
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091124-0800/enabled=false
+repositories/file\:_C\:_eclipse_.eclipseextension/suffix=eclipse
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6milestones_S-3.6M4-200912101301/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090729-1307/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1400/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-0206/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090512-2000/type=org.eclipse.equinox.p2.artifact.repository.simpleRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1800/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.2-201002111343/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090331-0901/name="Eclipse Project Test Site"
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900/uri=http\://fullmoon.ottawa.ibm.com/releases/helios/201003190900
+repositories/file\:_C\:_1target_eclipseweb_.metadata_.plugins_org.eclipse.pde.core_install/name=Exported Repository
+repositories/http\:__download.eclipse.org_rt_riena_1.1.0.0_update/uri=http\://download.eclipse.org/rt/riena/1.1.0.0/update/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090802-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090811-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090811-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090505-2000/description=
+repositories/http\:__download.eclipse.org_releases_helios_200912172200/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1800/provider=
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/ProfilePreferencesTest/DifferentAgent/p2/org.eclipse.equinox.p2.engine/profileRegistry/TestProfile.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs b/bundles/org.eclipse.equinox.p2.tests/testData/ProfilePreferencesTest/DifferentAgent/p2/org.eclipse.equinox.p2.engine/profileRegistry/TestProfile.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs
new file mode 100644
index 000000000..a6ff46e91
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/ProfilePreferencesTest/DifferentAgent/p2/org.eclipse.equinox.p2.engine/profileRegistry/TestProfile.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs
@@ -0,0 +1,1970 @@
+#Fri Apr 30 14:07:04 EDT 2010
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090929-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-0800/suffix=content.xml
+repositories/http\:__download.eclipse.org_webtools_releng_repository/uri=http\://download.eclipse.org/webtools/releng/repository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-0206/enabled=false
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_categories/uri=http\://download.eclipse.org/eclipse/updates/3.5/categories
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-1034/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100406-1034
+eclipse.preferences.version=1
+repositories/http\:__download.eclipse.org_stp_helios/isSystem=false
+repositories/http\:__download.eclipse.org_dsdp_tml_updates_0.3/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M5-200902021535/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090611-1540/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091210-1301/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091025-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-0731/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090514-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090514-2000
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090721-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100202-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100112-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100424-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090520-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090520-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1126/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090901-0800/enabled=false
+repositories/http\:__download.eclipse.org_modeling_gmt_modisco_updates_release/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090805-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090504-2055/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090504-2055
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090811-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090811-0800
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090514-2000/uri=http\://download.eclipse.org/eclipse/updates/3.5-I-builds/I20090514-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100423-0906/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090915-0100/name="Eclipse Project Test Site"
+repositories/file\:_C\:_eclipse_dropins_eclemma/enabled=true
+repositories/http\:__download.eclipse.org_tools_mylyn_update_e3.3/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0100/suffix=content.xml
+repositories/http\:__download.eclipse.org_modeling_m2m_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091207-1800
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository/name=Build repository I-3.2.0-20100415032236
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090504-2055/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090504-2055/uri=http\://download.eclipse.org/eclipse/updates/3.5-I-builds/I20090504-2055
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091029-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090508-2000/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090714-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090714-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090714-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090929-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090609-1400/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090421-0930/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100124-2000/suffix=content.xml
+repositories/http\:__download.eclipse.org_modeling_emf_updates/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090505-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090714-0800/uri=http\://download.eclipse.org/eclipse/updates/3.6-I-builds/I20090714-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-0731/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091118-1342/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-1400/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090806-1400
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1300/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090513-2000/version=1.0.0
+repositories/http\:__download.eclipse.org_rt_eclipselink_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1126/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1442/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090416-1053/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090605-1444/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1126/enabled=false
+repositories/http\:__download.eclipse.org_modeling_emft_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090508-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-0804/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100107-0804
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090508-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-2300/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-0206/suffix=content.xml
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository_wtp-buildTools/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1300/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_dsdp_mtj_updates_1.0.1_stable/uri=http\://download.eclipse.org/dsdp/mtj/updates/1.0.1/stable/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-1448/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100312-1448
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090908-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100425-2000/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090609-1400/enabled=false
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090908-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0100/isSystem=true
+repositories/http\:__update.eclemma.org/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090609-1400/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090609-1400
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_categories/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5-200906111540/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090525-2000/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.2-201002111343/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-1400/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository_wtp-buildTools/uri=http\://download.eclipse.org/webtools/downloads/drops/T3.2.0/I-3.2.0-20100424021000/repository/wtp-buildTools
+repositories/http\:__download.eclipse.org_releases_helios/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090514-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090504-2055/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0800/name="Eclipse Project Test Site"
+repositories/file\:_C\:_eclipse_configuration_org.eclipse.osgi_bundles_908_data_listener_1925729951/name=metadata listener dropins
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1442/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100121-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1710/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090522-1710
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090507-0731/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091006-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091006-0800
+repositories/http\:__download.eclipse.org_datatools_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0840/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100105-1537/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1300/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-1057/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100128-1731/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_tools_pdt_updates_2.0/isSystem=false
+repositories/http\:__download.eclipse.org_releases_helios_200910011616/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5-200906111540/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091110-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090916-1800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100106-1349/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_releases_helios_200910011616/uri=http\://download.eclipse.org/releases/helios/200910011616
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091110-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100311-1616/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090505-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-1200/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090721-1200
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090929-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090929-0800
+repositories/http\:__download.eclipse.org_modeling_m2t_xpand_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090520-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100311-1616/enabled=false
+repositories/file\:_C\:_tmp_extension_eclipse_.eclipseextension/suffix=eclipse
+repositories/http\:__download.eclipse.org_releases_helios/enabled=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1300/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds/nickname="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100121-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1036/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC1-200905151143/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090721-1200/uri=http\://download.eclipse.org/eclipse/updates/3.6-I-builds/I20090721-1200
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository_wtp-buildTools/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100414-1200/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090519-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090519-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_modeling_mdt_ocl_3_0_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090601-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1300/isSystem=true
+repositories/http\:__download.eclipse.org_rt_rap_1.3_runtime/uri=http\://download.eclipse.org/rt/rap/1.3/runtime
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090401-1325/isSystem=true
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios/name=Helios Milestone Repository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090526-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100106-1349/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0100/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090504-2055/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100223-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090513-2000/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090519-2000/uri=http\://download.eclipse.org/eclipse/updates/3.5-I-builds/I20090519-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100424-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100424-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090605-1444/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090427-1300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100316-0859/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-1034/version=1.0.0
+repositories/http\:__download.eclipse.org_rt_swordfish_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1300/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140/name=Galileo
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091125-2200/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090531-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090529-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100105-1537/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100128-1731/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100128-1731
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-0804/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100122-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090506-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091124-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090714-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_dsdp_tm_updates_3.0/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090415-1348/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/file\:_C\:_1target_provmiddle_test.plugin_update/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1800/suffix=content.xml
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios/enabled=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090521-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090521-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100124-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100217-1031/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090728-1036/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1800/isSystem=true
+repositories/http\:__download.eclipse.org_webtools_releng_repository/enabled=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090811-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1800/version=1.0.0
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1300/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100413-1521/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-1410/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100122-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_webtools_releng_repository/provider=
+repositories/http\:__download.eclipse.org_technology_dltk_updates/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6/uri=http\://download.eclipse.org/eclipse/updates/3.6
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090512-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090603-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090721-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090818-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090901-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090430-2300/isSystem=true
+repositories/http\:__update.eclemma.org/uri=http\://update.eclemma.org/
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090721-0800/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090721-0800/uri=http\://download.eclipse.org/eclipse/updates/3.6-I-builds/I20090721-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090714-0800/enabled=false
+repositories/http\:__download.eclipse.org_modeling_emf_updates_releases/uri=http\://download.eclipse.org/modeling/emf/updates/releases/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_categories/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090521-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090730-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-1600/suffix=content.xml
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-0800/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090518-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100121-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0809/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091206-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1300/enabled=false
+repositories/http\:__download.eclipse.org_releases_helios_201002042330/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090511-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090515-1143/suffix=content.xml
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository_wtp-buildTools/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0809/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091026-1800
+repositories/file\:_C\:_eclipse_dropins_eclemma/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100223-0800/isSystem=true
+repositories/http\:__download.eclipse.org_modeling_gmt_modisco_updates/isSystem=false
+repositories/http\:__download.eclipse.org_technology_mat_0.8_update-site/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090601-2000/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_releases_helios_200911122150/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-1320/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091125-2200/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100128-1731/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090518-2000/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_releases_helios_200912172200/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_modeling_mdt_updates_releases/isSystem=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090728-1414/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100129-1300/suffix=content.xml
+repositories/http\:__download.eclipse.org_modeling_m2m_updates/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M5-200902021535/uri=http\://download.eclipse.org/eclipse/updates/3.5milestones/S-3.5M5-200902021535
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100414-1200/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-0100/suffix=content.xml
+repositories/http\:__eclipse.org_tptp_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090427-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100307-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091206-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-2300/name=file\:/builds/I200904302300/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090729-1307/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090421-0930/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100217-1031/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100217-1031
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090504-2055/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090531-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-1034/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100428-1300
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090508-2000/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_categories/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090922-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091204-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_webtools_updates/uri=http\://download.eclipse.org/webtools/updates
+repositories/http\:__download.eclipse.org_technology_mat_0.8_update-site/uri=http\://download.eclipse.org/technology/mat/0.8/update-site/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100423-0906/version=1.0.0
+repositories/http\:__download.eclipse.org_modeling_emft_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100423-0906/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090512-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100217-1031/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1300/suffix=content.xml
+repositories/http\:__download.eclipse.org_technology_linuxtools_update/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090604-2000/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090513-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090506-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100106-1349/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-0206/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091027-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1400/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090908-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090908-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090416-1053/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090917-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090529-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091206-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090515-1143/enabled=false
+repositories/http\:__download.eclipse.org_tools_emf_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-1125/version=1.0.0
+repositories/http\:__download.eclipse.org_stp_helios/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-2300/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_helios_201003190900/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_rt_rap_1.3_runtime/isSystem=false
+repositories/http\:__download.eclipse.org_modeling_mdt_ocl_3_0_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090511-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100425-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100425-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-1300/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100112-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0800/name=file\:/builds/I200904290800/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091030-1201/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090923-1538/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090609-1400/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-1125/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0840/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091029-0840
+repositories/http\:__download.eclipse.org_rt_riena_1.1.0.1_update/enabled=false
+repositories/http\:__dev.eclipse.org_svnroot_dsdp_org.eclipse.tm.tcf_releases_0.2.0/uri=http\://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/releases/0.2.0
+repositories/file\:_C\:_1target_provmiddle_test.plugin_update/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090529-2000/enabled=false
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091204-0800/suffix=content.xml
+repositories/http\:__download.eclipse.org_releases_helios_200911122150/enabled=false
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository/suffix=compositeContent.xml
+tawa.ibm.com_downloads_updates_3.6-I-builds_I20100414-1200/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1100/isSystem=true
+repositories/http\:__download.eclipse.org_releases_helios/nickname=Helios
+repositories/http\:__download.eclipse.org_technology_epp_updates_1.1/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-0804/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100119-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-1410/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100112-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100112-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100323-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1300/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090527-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.1-200909170800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091209-1800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100420-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-1600/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091208-0100/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_helios_200910011616/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-1800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1800/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090508-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/file\:_C\:_tmp_repoTest_I20090520-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100420-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-1800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091208-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1600/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-0100/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100119-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_rt_eclipselink_incremental-updates_milestone/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0100/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090908-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_tools_pdt_updates/uri=http\://download.eclipse.org/tools/pdt/updates/
+repositories/http\:__download.eclipse.org_dsdp_tml_updates_0.3/uri=http\://download.eclipse.org/dsdp/tml/updates/0.3/
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_categories/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-1057/name=file\:/builds/I200904301057/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090519-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100202-0800/isSystem=true
+repositories/http\:__download.eclipse.org_releases_helios/suffix=compositeContent.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-1320/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090521-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090506-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-2200/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-1200/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100423-0906/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090730-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090504-2055/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0100/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090503-2055/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090504-2055/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_technology_emft_updates/uri=http\://download.eclipse.org/technology/emft/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1310/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-1600/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090508-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1800/suffix=content.xml
+repositories/http\:__download.eclipse.org_galileo_releases/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090707-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090528-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090528-2000/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository_wtp-buildTools/isSystem=true
+repositories/http\:__download.eclipse.org_technology_subversive_0.7_update-site/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090414-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090415-1348/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090415-1348
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-1032/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100426-0852/enabled=false
+repositories/http\:__download.eclipse.org_modeling_m2t_updates_releases/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090415-1348/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100305-1011/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-1549/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090416-1053/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090416-1053
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1600/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090605-1444/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090605-1444
+repositories/http\:__download.eclipse.org_releases_helios/name=Helios Milestone Repository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100225-1936/version=1.0.0
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios/description=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090514-2000/isSystem=true
+repositories/file\:_C\:_tmp_repoTest_I20090520-2000/version=1.0.0
+repositories/http\:__www.eclipse.org_egit_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1710/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1300/enabled=false
+repositories/http\:__download.eclipse.org_modeling_m2t_xpand_updates/enabled=false
+repositories/file\:_C\:_tmp_extension_eclipse_.eclipseextension/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_categories/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-0800/suffix=content.xml
+repositories/http\:__download.eclipse.org_tools_cdt_releases_helios/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M6-200903130100/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090421-0930/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-2000/name=file\:/builds/I200905072000/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100129-1300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090514-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091006-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100413-1521/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100413-1521
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100413-1521/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090602-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090507-2000/isSystem=true
+repositories/http\:__download.eclipse.org_releases_helios_200911122150/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091125-2200/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091125-2200
+repositories/file\:_C\:_1target_eclipseweb_.metadata_.plugins_org.eclipse.pde.core_install/nickname=Exported Repository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-1200/suffix=content.xml
+repositories/http\:__download.eclipse.org_releases_helios_200912172200/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090922-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_rt_rap_1.2_runtime-update/isSystem=false
+repositories/http\:__download.eclipse.org_webtools_releng_repository/name=Releng repository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090805-1800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090805-0100
+repositories/http\:__download.eclipse.org_egit_updates/isSystem=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090514-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1100/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090714-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0809/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/file\:_C\:_1target_provmiddle_test.plugin_update/name=Update Site
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0800/suffix=content.xml
+repositories/http\:__download.eclipse.org_galileo_releases/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090429-1300
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository_wtp-buildTools/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-1200/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1414/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090728-1414
+repositories/file\:_C\:_eclipse_dropins_eclemma/description=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090513-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100330-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090728-1414/uri=http\://download.eclipse.org/eclipse/updates/3.6-I-builds/I20090728-1414
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100307-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100307-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1414/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090603-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-0800/version=1.0.0
+repositories/file\:_C\:_tmp_repoTest_categories/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090428-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090602-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090818-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091208-0100/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.1-200909170800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090506-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0800/isSystem=true
+repositories/http\:__www.eclipse.org_modeling_emf_updates/enabled=false
+repositories/http\:__download.eclipse.org_tools_ptp_releases_galileo/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090426-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090426-2000
+repositories/http\:__www.eclipse.org_egit_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-1300/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091206-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090331-0901/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_rt_rap_1.2_update/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1310/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_technology_jwt_update-site/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090415-1348/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090609-1400/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090518-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090729-1307/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-1600/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1300/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_stp_updates/isSystem=false
+repositories/http\:__www.eclipse.org_modeling_emf_updates/uri=http\://www.eclipse.org/modeling/emf/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090414-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090430-2300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1800/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090512-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090521-2000/suffix=content.xml
+repositories/http\:__download.eclipse.org_rt_rap_1.3_runtime/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090602-2000/enabled=false
+repositories/http\:__download.eclipse.org_technology_mat_0.8_update-site/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090922-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-1200/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090818-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-2300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090527-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090915-0100/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.1-200909170800/uri=http\://download.eclipse.org/eclipse/updates/3.5/R-3.5.1-200909170800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100420-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_technology_epp_updates_1.1/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090515-1143/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1300/suffix=content.xml
+repositories/file\:_C\:_tmp_repoTest_I20090520-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090913-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090913-2000
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090507-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091210-1301/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090611-1540/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100305-1011/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090604-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090729-1307/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090729-1307
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090430-2300/name=file\:/builds/I200904302300/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100115-1100/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090512-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090729-1307/uri=http\://download.eclipse.org/eclipse/updates/3.6-I-builds/I20090729-1307
+repositories/file\:_C\:_tmp_extension_eclipse_.eclipseextension/version=1
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100311-1616/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100217-1031/suffix=content.xml
+repositories/http\:__download.eclipse.org_tools_cdt_releases_galileo/uri=http\://download.eclipse.org/tools/cdt/releases/galileo
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090429-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090908-0800/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5/version=1.0.0
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100223-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-1800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090519-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330/uri=http\://fullmoon.ottawa.ibm.com/releases/helios/201002042330
+repositories/file\:_C\:_tmp_repoTest_categories/name=The Eclipse Project Updates
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.2-201002111343/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090714-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100209-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100122-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100330-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1300/suffix=content.xml
+repositories/http\:__download.eclipse.org_modeling_emft_updates_releases/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100423-0906/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100217-1031/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090915-0100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090729-1307/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository/type=org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1300/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository/name=Build repository I-3.2.0-20100410204757
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100115-1100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-1448/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091210-1301/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090806-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-1549/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100429-1549
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090513-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091110-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090929-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-0206/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC1-200905151143/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-1545/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091006-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091027-0100/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090503-2055/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_categories/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/categories
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0840/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100302-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100106-1349/enabled=false
+repositories/http\:__download.eclipse.org_releases_helios/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091025-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1300/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100112-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090527-2000/suffix=content.xml
+repositories/http\:__dev.eclipse.org_svnroot_dsdp_org.eclipse.tm.tcf_releases_0.2.0/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090901-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100425-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090530-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090530-2000
+repositories/http\:__download.eclipse.org_modeling_emf_updates/isSystem=false
+repositories/file\:_C\:_eclipse_dropins_eclemma/version=1
+repositories/http\:__download.eclipse.org_technology_actf_0.7_update-site/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090605-1444/enabled=false
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0100/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5-200906111540/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-1400/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090525-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC1-200905151143/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_technology_dltk_updates/uri=http\://download.eclipse.org/technology/dltk/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100307-2000/name="Eclipse Project Test Site"
+repositories/file\:_C\:_eclipse_configuration_org.eclipse.osgi_bundles_908_data_listener_1925729951/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1126/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090721-1200/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090729-1307/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090901-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091118-1342/version=1.0.0
+repositories/http\:__download.eclipse.org_modeling_m2t_xpand_updates/uri=http\://download.eclipse.org/modeling/m2t/xpand/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090527-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1126/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100105-1537/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100115-1100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-1545/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090601-2000/suffix=content.xml
+repositories/http\:__download.eclipse.org_modeling_emft_updates/uri=http\://download.eclipse.org/modeling/emft/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-2200/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091110-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091103-0941/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100330-0800/enabled=false
+repositories/http\:__download.eclipse.org_releases_helios_201003190900/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0100/name=file\:/builds/I200904290100/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090721-1200/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100224-2242/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090513-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-0100/version=1.0.0
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository_wtp-buildTools/enabled=false
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091204-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091204-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100425-2000/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090728-1414/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090504-2055/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090416-1053/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090508-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1414/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-0800/name="Eclipse Project Test Site"
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios/type=org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090504-2055/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100105-1537/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090526-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_datatools_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090611-1540/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-1125/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090630-1125
+repositories/file\:_C\:_eclipse_dropins_eclemma/uri=file\:/C\:/eclipse/dropins/eclemma/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1442/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091125-2200/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_tools_ptp_releases_helios/uri=http\://download.eclipse.org/tools/ptp/releases/helios
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-1034/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090526-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-1400/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-0100/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090714-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-0100/enabled=false
+repositories/http\:__download.eclipse.org_technology_epp_updates_1.1/uri=http\://download.eclipse.org/technology/epp/updates/1.1/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090331-0901/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090331-0901
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090802-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100217-1031/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100124-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100424-2000/enabled=false
+repositories/http\:__download.eclipse.org_modeling_m2m_updates_releases/uri=http\://download.eclipse.org/modeling/m2m/updates/releases/
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.1-200909170800/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090505-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090519-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100216-0800
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M6-200903130100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090520-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100311-1616/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1300/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090530-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-1057/isSystem=true
+repositories/file\:_C\:_1target_eclipseweb_.metadata_.plugins_org.eclipse.pde.core_install/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-1410/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100122-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_tools_ptp_releases_galileo/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1036/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091206-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091206-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090529-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090529-2000
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090506-2000/name=file\:/builds/I200905062000/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090421-0930/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100119-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100119-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090520-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100125-0800
+repositories/http\:__www.eclipse.org_modeling_emft_?project\=search\#search/uri=http\://www.eclipse.org/modeling/emft/?project\=search\#search
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100223-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091025-2000/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_categories/isSystem=true
+repositories/http\:__download.eclipse.org_releases_helios_200911122150/name=Helios
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090818-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-1300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090525-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100308-1300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1442/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090428-0100/isSystem=true
+repositories/http\:__download.eclipse.org_tptp_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-1320/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100428-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100224-2242/name="Eclipse Project Test Site"
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090803-1800
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090728-1036/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090518-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090525-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090525-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090601-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-1300/isSystem=true
+repositories/http\:__download.eclipse.org_webtools_releng_repository/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090531-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090531-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090811-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100121-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100121-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100129-1300/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090518-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090531-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1300/name=file\:/builds/I200904291300/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090519-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090611-1540/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090611-1540
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0100/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090515-1143/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-2300/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_birt_update-site_2.6/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100310-1300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090730-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-0206/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100429-0206
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090531-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-1034/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090721-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090714-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090730-2000/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M6-200903130100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090416-1053/isSystem=true
+repositories/http\:__eclipse.org_tptp_updates/uri=http\://eclipse.org/tptp/updates/
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090518-2000/version=1.0.0
+repositories/http\:__download.eclipse.org_modeling_gmt_modisco_updates_release/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090428-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090428-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091206-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090331-0901/isSystem=true
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository_wtp-buildTools/uri=http\://download.eclipse.org/webtools/downloads/drops/T3.2.0/I-3.2.0-20100415032236/repository/wtp-buildTools
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1036/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090728-1036
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-0100/suffix=content.xml
+repositories/http\:__download.eclipse.org_modeling_emf_updates_releases/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090914-1300
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090512-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091027-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-1800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091030-1201/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090728-1036/uri=http\://download.eclipse.org/eclipse/updates/3.6-I-builds/I20090728-1036
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090416-1053/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090721-1200/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090602-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090530-2000/isSystem=true
+repositories/http\:__download.eclipse.org_releases_helios_201003190900/suffix=content.xml
+repositories/http\:__download.eclipse.org_tools_mylyn_update_e3.4/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090507-0731/version=1.0.0
+repositories/http\:__download.eclipse.org_technology_subversive_0.7_update-site/isSystem=false
+repositories/http\:__www.eclipse.org_egit_updates/uri=http\://www.eclipse.org/egit/updates
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090519-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-0100/name=file\:/builds/I200904300100/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-1300/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090505-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090603-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100307-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090630-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090430-0100
+repositories/http\:__download.eclipse.org_releases_helios_200911122150/uri=http\://download.eclipse.org/releases/helios/200911122150
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_categories/uri=http\://download.eclipse.org/eclipse/updates/3.6-I-builds/categories
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100323-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090421-0930/version=1.0.0
+repositories/http\:__download.eclipse.org_rt_rap_1.3_tooling/uri=http\://download.eclipse.org/rt/rap/1.3/tooling
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090526-2000/suffix=content.xml
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository/suffix=compositeContent.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090504-2055/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100308-0800
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090508-2000/version=1.0.0
+repositories/http\:__download.eclipse.org_technology_jwt_update-site/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091217-0819/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1800/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090729-1307/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1710/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090922-0800/version=1.0.0
+repositories/file\:_C\:_tmp_repoTest_categories/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-1320/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100119-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090917-0100/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100323-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090507-0731/enabled=false
+repositories/http\:__download.eclipse.org_datatools_updates/uri=http\://download.eclipse.org/datatools/updates
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090513-2000/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090513-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090506-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091027-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1400/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090511-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090415-1348/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090515-1143/version=1.0.0
+repositories/http\:__download.eclipse.org_rt_riena_1.1.0.0_update/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091110-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091110-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_categories/name=The Eclipse Project Updates
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-2300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100209-2300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1710/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090511-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100126-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-0731/name=file\:/builds/I200905070731/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100225-1936/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100310-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-1800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091208-0100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/file\:_C\:_1target_eclipseweb_.metadata_.plugins_org.eclipse.pde.core_install/enabled=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1600/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1310/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091217-0819/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-1057/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_categories/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1800/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090512-2000/suffix=content.xml
+repositories/http\:__download.eclipse.org_modeling_gmt_modisco_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090914-0800
+repositories/http\:__download.eclipse.org_releases_helios_200911122150/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090503-2055/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-1200/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090507-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-0800/enabled=false
+repositories/http\:__download.eclipse.org_galileo_releases/uri=http\://download.eclipse.org/galileo/releases/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1023/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100422-1023
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090526-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090526-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-1410/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100119-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090923-1538/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100122-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100122-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-1400/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository/uri=http\://download.eclipse.org/webtools/downloads/drops/T3.2.0/I-3.2.0-20100415032236/repository/
+repositories/http\:__download.eclipse.org_tools_ptp_releases_helios/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-0100/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1310/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090528-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-2300/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090426-2000/version=1.0.0
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository_wtp-buildTools/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-1800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0100/suffix=content.xml
+repositories/http\:__download.eclipse.org_releases_helios_201002042330/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100330-0800/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091013-1302/enabled=false
+repositories/http\:__download.eclipse.org_technology_actf_0.7_update-site/enabled=false
+repositories/http\:__download.eclipse.org_releases_helios/type=org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-1410/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100107-1410
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100307-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090429-0100
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090519-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090421-0930/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100112-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100305-1011/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090913-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-1549/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100323-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_rt_swordfish_updates/uri=http\://download.eclipse.org/rt/swordfish/updates
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091210-1301/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1414/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091217-0819/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090729-1307/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090426-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-0100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100124-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090922-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090913-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100124-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100124-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090514-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1300/enabled=false
+repositories/http\:__download.eclipse.org_webtools_releng_repository/type=org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository
+repositories/http\:__download.eclipse.org_modeling_tmf_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1800/isSystem=true
+repositories/http\:__download.eclipse.org_modeling_tmf_updates/uri=http\://download.eclipse.org/modeling/tmf/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090707-0800/version=1.0.0
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330/name=Helios
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090714-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/file\:_C\:_1target_provmiddle_test.plugin_update/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_rt_riena_1.1.0.1_update/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100406-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091110-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090529-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-2300/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100302-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100426-0852/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1442/isSystem=true
+repositories/http\:__download.eclipse.org_releases_helios_200910011616/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-1032/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100330-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100305-1011/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090401-1325/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_categories/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090421-0930/name="Eclipse Project Test Site"
+repositories/file\:_C\:_tmp_repoTest_categories/uri=file\:/C\:/tmp/repoTest/categories
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090518-2000/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.1-200909170800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090714-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090401-1325/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090730-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090514-2000/version=1.0.0
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository/uri=http\://download.eclipse.org/webtools/downloads/drops/T3.2.0/I-3.2.0-20100410204757/repository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.2-201002111343/uri=http\://download.eclipse.org/eclipse/updates/3.5/R-3.5.2-201002111343
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.2-201002111343/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-1600/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100209-1600
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090917-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091207-1300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_categories/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/categories
+repositories/http\:__download.eclipse.org_egit_updates/uri=http\://download.eclipse.org/egit/updates
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090730-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090730-2000
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M5-200902021535/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090519-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091103-0941/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090929-0800/isSystem=true
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository/name=Build repository I-3.2.0-20100424021000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100112-0800/suffix=content.xml
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository_wtp-buildTools/isSystem=true
+repositories/http\:__download.eclipse.org_modeling_emft_eef_updates_releases/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1100/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M6-200903130100/uri=http\://download.eclipse.org/eclipse/updates/3.5milestones/S-3.5M6-200903130100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090707-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091217-0819/isSystem=true
+repositories/http\:__download.eclipse.org_technology_emft_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1023/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0100/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090609-1400/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_modeling_gmf_updates_releases/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100323-0800/suffix=content.xml
+repositories/http\:__download.eclipse.org_modeling_gmf_updates_releases/uri=http\://download.eclipse.org/modeling/gmf/updates/releases/
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090730-2000/uri=http\://download.eclipse.org/eclipse/updates/3.6-I-builds/I20090730-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-1600/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_technology_emft_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1300/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1300/isSystem=true
+repositories/file\:_C\:_eclipse_dropins_eclemma/name=C\:\\eclipse\\dropins\\eclemma
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090730-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090414-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090728-1036/isSystem=true
+repositories/http\:__www.eclipse.org_pde_pde-api-tools_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090503-2055/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-1300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090515-1143/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091020-0931/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091020-0931
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-2200/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100216-2200
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100316-0859/isSystem=true
+repositories/http\:__download.eclipse.org_releases_galileo/uri=http\://download.eclipse.org/releases/galileo
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091025-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1036/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090527-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090527-2000
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090421-0930/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090604-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090505-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090505-2000
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M5-200902021535/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1800/suffix=content.xml
+repositories/http\:__download.eclipse.org_rt_eclipselink_incremental-updates_milestone/uri=http\://download.eclipse.org/rt/eclipselink/incremental-updates/milestone
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_categories/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090818-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090818-0800
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090430-2300/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_stp_helios/uri=http\://download.eclipse.org/stp/helios
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0800/enabled=false
+repositories/http\:__download.eclipse.org_tools_cdt_releases_galileo/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091208-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091118-1342/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091118-1342
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0100/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090505-2000/uri=http\://download.eclipse.org/eclipse/updates/3.5-I-builds/I20090505-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1800/isSystem=true
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository_wtp-buildTools/name=file\:/shared/webtools/projects/wtpbuildTools-T3.2.0-I/workdir/I-3.2.0-20100415032236/repository/wtp-buildTools - metadata
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091027-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100311-1616/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090525-2000/suffix=content.xml
+repositories/http\:__download.eclipse.org_modeling_m2t_updates/uri=http\://download.eclipse.org/modeling/m2t/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090503-2055/name=file\:/builds/I200905032055/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091020-0931/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090506-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090415-1348/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_helios_200912172200/enabled=false
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios/suffix=compositeContent.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090818-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0100/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090515-1143/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100223-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090901-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090519-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1800/name=file\:/builds/I200904291800/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090430-2300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091124-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100302-0800/isSystem=true
+repositories/http\:__download.eclipse.org_rt_riena_1.1.0.0_update/uri=http\://download.eclipse.org/rt/riena/1.1.0.0/update/
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090511-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-2300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090527-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090915-0100/version=1.0.0
+repositories/file\:_C\:_tmp_repoTest_categories/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090730-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090916-1300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-0800/suffix=content.xml
+repositories/file\:_C\:_tmp_extension_eclipse_.eclipseextension/name=C\:\\tmp\\extension\\eclipse\\.eclipseextension
+repositories/http\:__download.eclipse.org_tools_mylyn_update_extras/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090729-1307/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090611-1540/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100414-1200/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-0800/isSystem=true
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1300/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository/type=org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091207-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100115-1100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-1448/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_tools_mylyn_update_extras/isSystem=false
+repositories/http\:__download.eclipse.org_birt_update-site_2.5/uri=http\://download.eclipse.org/birt/update-site/2.5
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090513-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_categories/name=The Eclipse Project Updates
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090511-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100121-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091118-1342/name="Eclipse Project Test Site"
+repositories/file\:_C\:_eclipse_.eclipseextension/uri=file\:/C\:/eclipse/.eclipseextension
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1800/version=1.0.0
+repositories/http\:__www.eclipse.org_modeling_emf_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1300/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1023/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091125-2200/enabled=false
+repositories/file\:_C\:_eclipse_dropins_eclemma/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090506-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-1545/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091117-1545
+repositories/http\:__download.eclipse.org_dsdp_tml_updates_0.3/isSystem=false
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository_wtp-buildTools/name=file\:/shared/webtools/projects/wtpbuildTools-T3.2.0-I/workdir/I-3.2.0-20100424021000/repository/wtp-buildTools - metadata
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090505-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090530-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_modeling_emf_cdo_updates_3.0/uri=http\://download.eclipse.org/modeling/emf/cdo/updates/3.0/
+repositories/http\:__download.eclipse.org_rt_eclipselink_updates/uri=http\://download.eclipse.org/rt/eclipselink/updates
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.2-201002111343/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-1125/isSystem=true
+repositories/http\:__download.eclipse.org_modeling_gmf_updates_releases/isSystem=false
+repositories/file\:_C\:_eclipse_.eclipseextension/provider=
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090507-0731/name=file\:/builds/I200905070731/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100425-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100316-0859/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-1448/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090519-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-1545/enabled=false
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios/nickname=Helios Milestone Repository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100115-1100/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC1-200905151143/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100307-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090511-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090514-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100312-0800
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090721-1200/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_releases_helios/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1100/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-1032/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090825-1032
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091006-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_modeling_m2m_updates/uri=http\://download.eclipse.org/modeling/m2m/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090503-2055/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-2200/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1023/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0840/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091103-0941/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_releases_helios_200910011616/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100302-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_modeling_emf_updates_releases/isSystem=false
+repositories/file\:_C\:_eclipse_configuration_org.eclipse.osgi_bundles_908_data_listener_1925729951/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090721-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090916-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100106-1349/version=1.0.0
+repositories/http\:__www.eclipse.org_modeling_emft_updates/isSystem=false
+repositories/http\:__download.eclipse.org_releases_galileo_200909241140/uri=http\://download.eclipse.org/releases/galileo/200909241140
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090513-2000/suffix=content.xml
+repositories/http\:__download.eclipse.org_dsdp_tm_updates_3.0/uri=http\://download.eclipse.org/dsdp/tm/updates/3.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090922-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090922-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090811-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090528-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090528-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100414-1200/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100414-1200
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-1034/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090506-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090506-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090508-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090512-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100202-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_tools_pdt_updates_2.0/uri=http\://download.eclipse.org/tools/pdt/updates/2.0/
+repositories/http\:__download.eclipse.org_releases_helios_200912172200/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090825-0800
+repositories/http\:__www.eclipse.org_pde_pde-api-tools_updates/uri=http\://www.eclipse.org/pde/pde-api-tools/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090605-1444/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-1400/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-2200/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090506-2000/uri=http\://download.eclipse.org/eclipse/updates/3.5-I-builds/I20090506-2000
+repositories/http\:__download.eclipse.org_modeling_m2m_updates_releases/isSystem=false
+repositories/http\:__download.eclipse.org_tptp_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1310/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100422-1310
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090917-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090526-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100105-1537/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-0800/name=file\:/builds/I200904270800/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100129-1300/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100129-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100129-1300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091013-1302/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090514-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100426-0852/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090811-0800/isSystem=true
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900/uri=http\://fullmoon.ottawa.ibm.com/releases/helios/201003190900
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1400/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100125-1400
+repositories/http\:__download.eclipse.org_stp_updates/uri=http\://download.eclipse.org/stp/updates
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100115-1100/version=1.0.0
+repositories/http\:__download.eclipse.org_modeling_emft_eef_updates_releases/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1300/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090512-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090401-1325/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090923-1538/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090802-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100330-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_tools_ptp_releases_2.0/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091118-1342/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090721-1200/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090520-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_webtools_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-1300/suffix=content.xml
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository_wtp-buildTools/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090728-1414/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5/description=
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository_wtp-buildTools/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds/enabled=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090506-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090421-0930/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0100/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090728-1414/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100413-1521/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1800/isSystem=true
+repositories/http\:__download.eclipse.org_releases_helios_200911122150/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090802-2000/suffix=content.xml
+repositories/http\:__download.eclipse.org_technology_linuxtools_update/enabled=false
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900/enabled=false
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository/provider=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090427-1800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0100/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090923-1538/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_tools_ptp_releases_2.0/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091117-0800
+repositories/http\:__download.eclipse.org_releases_helios_201003190900/uri=http\://download.eclipse.org/releases/helios/201003190900
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100126-0100
+repositories/http\:__download.eclipse.org_releases_galileo/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100310-0100
+repositories/file\:_C\:_eclipse_.eclipseextension/suffix=eclipse
+repositories/http\:__download.eclipse.org_tools_pdt_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091204-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-1448/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-1448/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090525-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1600/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M5-200902021535/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091026-0800
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.1-200909170800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100224-2242/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1400/suffix=content.xml
+repositories/http\:__download.eclipse.org_modeling_mdt_updates/uri=http\://download.eclipse.org/modeling/mdt/updates/
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100424-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100413-1521/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M6-200903130100/version=1.0.0
+repositories/http\:__download.eclipse.org_tools_ptp_releases_helios/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1600/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091201-1600
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100128-1731/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090530-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100106-1349/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100106-1349
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090519-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090915-0100/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091209-1300
+repositories/http\:__download.eclipse.org_technology_subversive_0.7_update-site/uri=http\://download.eclipse.org/technology/subversive/0.7/update-site/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1300/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090414-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090414-0800
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090507-2000/name=file\:/builds/I200905072000/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090515-1143/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091025-2000/version=1.0.0
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900/name=Helios
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-1300/version=1.0.0
+repositories/file\:_C\:_tmp_extension_eclipse_.eclipseextension/isSystem=true
+repositories/file\:_C\:_tmp_extension_eclipse_.eclipseextension/uri=file\:/C\:/tmp/extension/eclipse/.eclipseextension
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091103-0941/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090611-1540/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_modeling_gmt_modisco_updates_release/uri=http\://download.eclipse.org/modeling/gmt/modisco/updates/release/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090913-2000/suffix=content.xml
+repositories/http\:__download.eclipse.org_rt_rap_1.2_runtime-update/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091204-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090525-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091030-1201/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091013-1302/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091013-1302
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M6-200903130100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1300/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090728-1036/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090401-1325/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090401-1325
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5-200906111540/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091030-1201/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090331-0901/enabled=false
+repositories/http\:__download.eclipse.org_modeling_emf_cdo_updates_3.0/enabled=false
+repositories/file\:_C\:_tmp_repoTest_categories/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090505-2000/name=file\:/builds/I200905052000/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100424-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5/suffix=compositeContent.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090503-2055/name=file\:/builds/I200905032055/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__www.eclipse.org_modeling_emft_?project\=search\#search/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090503-2055/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090507-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090602-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090811-0800/version=1.0.0
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100129-1300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091118-1342/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090505-2000/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090507-2000/uri=http\://download.eclipse.org/eclipse/updates/3.5-I-builds/I20090507-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-2300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090430-2300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1400/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6/enabled=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090519-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-0100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1300/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090430-2300/uri=http\://download.eclipse.org/eclipse/updates/3.5-I-builds/I20090430-2300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090707-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090707-0800
+repositories/http\:__download.eclipse.org_technology_jwt_update-site/uri=http\://download.eclipse.org/technology/jwt/update-site
+repositories/file\:_C\:_eclipse_configuration_org.eclipse.osgi_bundles_908_data_listener_1925729951/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090729-1307/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100424-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0800/suffix=content.xml
+repositories/http\:__www.eclipse.org_modeling_emft_?project\=search\#search/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100202-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090520-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0800/enabled=false
+repositories/file\:_C\:_eclipse_configuration_org.eclipse.osgi_bundles_908_data_listener_1925729951/version=1.0.0
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository_wtp-buildTools/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090513-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091013-1302/suffix=content.xml
+repositories/http\:__www.eclipse.org_modeling_emft_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100309-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091030-1201/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-0100/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090503-2055/enabled=false
+http\:__download.eclipse.org_technology_mat_latest_update-site/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_categories/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090515-1143/isSystem=true
+repositories/file\:_C\:_eclipse_configuration_org.eclipse.osgi_bundles_908_data_listener_1925729951/uri=file\:/C\:/eclipse/configuration/org.eclipse.osgi/bundles/908/data/listener_1925729951/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091215-0800
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090507-0731/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090805-1300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-0731/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-1545/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090603-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090505-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1300/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1600/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_tools_pdt_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090512-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-2200/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100323-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900/name=Galileo
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091217-0819/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_webtools_releng_repository/nickname=Releng repository
+repositories/http\:__download.eclipse.org_modeling_mdt_ocl_3_0_updates/uri=http\://download.eclipse.org/modeling/mdt/ocl/3_0/updates/
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository_wtp-buildTools/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090605-1444/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091124-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091020-0931/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100127-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091217-0819/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M5-200902021535/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1710/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100316-0859/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-1320/version=1.0.0
+repositories/http\:__download.eclipse.org_modeling_m2t_updates_releases/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_categories/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090802-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090802-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0800/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090514-2000/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_categories/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090915-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090915-0100
+repositories/file\:_C\:_1target_eclipseweb_.metadata_.plugins_org.eclipse.pde.core_install/suffix=content.xml
+repositories/http\:__download.eclipse.org_rt_rap_1.2_update/uri=http\://download.eclipse.org/rt/rap/1.2/update
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100105-1537/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100105-1537
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091013-1302/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090531-2000/suffix=content.xml
+repositories/http\:__download.eclipse.org_tools_ptp_releases_galileo/uri=http\://download.eclipse.org/tools/ptp/releases/galileo
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-0804/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1800/isSystem=true
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090528-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-2300/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091020-0931/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100119-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090802-2000/enabled=false
+repositories/http\:__download.eclipse.org_modeling_mdt_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1036/enabled=false
+repositories/http\:__download.eclipse.org_technology_actf_0.7_update-site/uri=http\://download.eclipse.org/technology/actf/0.7/update-site/
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5-200906111540/uri=http\://download.eclipse.org/eclipse/updates/3.5/R-3.5-200906111540
+repositories/file\:_C\:_1target_eclipseweb_.metadata_.plugins_org.eclipse.pde.core_install/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100311-1616/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100225-1936/suffix=content.xml
+repositories/file\:_C\:_eclipse_.eclipseextension/enabled=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-0100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_categories/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-1549/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-1032/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-0804/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100223-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100223-0800
+repositories/http\:__download.eclipse.org_modeling_m2t_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091028-1300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1300/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090508-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090508-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090913-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090923-1538/version=1.0.0
+repositories/file\:_C\:_eclipse_.eclipseextension/name=C\:\\eclipse\\.eclipseextension
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090428-0100/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-1400/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090414-0800/enabled=false
+repositories/http\:__download.eclipse.org_releases_helios_201002042330/name=Helios
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090511-2000/name=file\:/builds/I200905112000/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090508-2000/uri=http\://download.eclipse.org/eclipse/updates/3.5-I-builds/I20090508-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090518-2000/enabled=false
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090707-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090426-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100414-1200/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091030-1201/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091030-1201
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090529-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1800/isSystem=true
+repositories/http\:__download.eclipse.org_tools_pdt_updates_2.0/enabled=false
+repositories/http\:__download.eclipse.org_tools_mylyn_update_e3.3/uri=http\://download.eclipse.org/tools/mylyn/update/e3.3
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100302-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090421-0930/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090421-0930
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_rt_riena_1.1.0.1_update/uri=http\://download.eclipse.org/rt/riena/1.1.0.1/update/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090601-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090601-2000
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds/name="Eclipse Project Test Site"
+repositories/file\:_C\:_1target_eclipseweb_.metadata_.plugins_org.eclipse.pde.core_install/name=Exported Repository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091013-1302/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100225-1936/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100225-1936
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090421-0930/uri=http\://download.eclipse.org/eclipse/updates/3.5-I-builds/I20090421-0930
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100225-1936/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1414/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_tools_cdt_releases_galileo/enabled=false
+repositories/http\:__download.eclipse.org_tptp_updates/uri=http\://download.eclipse.org/tptp/updates/
+repositories/http\:__eclipse.org_tptp_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091025-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091025-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090426-2000/name=file\:/builds/I200904262000/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1442/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091026-1442
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-0100/enabled=false
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository/uri=http\://download.eclipse.org/webtools/downloads/drops/T3.2.0/I-3.2.0-20100424021000/repository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090518-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100305-1011/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090515-1143/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090515-1143
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-1549/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090421-0930/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_egit_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-0800/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090515-1143/uri=http\://download.eclipse.org/eclipse/updates/3.5-I-builds/I20090515-1143
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-1057/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090430-1057
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090428-0100/name=file\:/builds/I200904280100/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090729-1307/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_rt_swordfish_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100124-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090504-2055/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090913-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0809/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090508-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090521-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0840/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100305-1011/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100305-1011
+repositories/http\:__download.eclipse.org_modeling_tmf_updates/enabled=false
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository/type=org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository
+repositories/http\:__download.eclipse.org_modeling_emf_cdo_updates_3.0/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091110-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090429-1800
+repositories/http\:__download.eclipse.org_modeling_emft_eef_updates_releases/uri=http\://download.eclipse.org/modeling/emft/eef/updates/releases
+repositories/file\:_C\:_eclipse_dropins_eclemma/type=org.eclipse.equinox.p2.extensionlocation.metadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090730-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090513-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100115-1100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100115-1100
+repositories/file\:_C\:_tmp_repoTest_I20090520-2000/uri=file\:/C\:/tmp/repoTest/I20090520-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090416-1053/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-1032/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091210-1301/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1300/suffix=content.xml
+repositories/http\:__dev.eclipse.org_svnroot_dsdp_org.eclipse.tm.tcf_releases_0.2.0/isSystem=false
+repositories/http\:__download.eclipse.org_releases_helios/count=3
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091028-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091025-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_categories/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1036/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100424-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-0100/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090714-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090401-1325/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090730-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090916-0100
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900/uri=http\://download.eclipse.org/releases/galileo/201002260900
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_categories/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100423-0906/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100423-0906
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository_wtp-buildTools/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091125-2200/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091027-0100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090503-2055/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_releases_helios_201003190900/version=1.0.0
+repositories/http\:__download.eclipse.org_webtools_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091103-0941/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090929-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090604-2000/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090505-2000/name=file\:/builds/I200905052000/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0100/isSystem=true
+repositories/http\:__download.eclipse.org_dsdp_tm_updates_3.0/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1126/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090522-1126
+repositories/http\:__download.eclipse.org_modeling_mdt_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1023/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090901-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1126/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1442/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-1410/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100425-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-1057/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-1300/version=1.0.0
+repositories/http\:__download.eclipse.org_webtools_releng_repository/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1800/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5-200906111540/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-1032/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090508-2000/name=file\:/builds/I200905082000/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/file\:_C\:_eclipse_.eclipseextension/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100202-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100202-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100426-0852/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100426-0852
+repositories/http\:__download.eclipse.org_releases_helios_201003190900/enabled=false
+repositories/file\:_C\:_tmp_extension_eclipse_.eclipseextension/type=org.eclipse.equinox.p2.extensionlocation.metadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090421-0930/version=1.0.0
+repositories/http\:__download.eclipse.org_technology_dltk_updates/isSystem=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090430-2300/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090908-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0800/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC1-200905151143/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090511-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-1320/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091215-1320
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-0731/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090507-0731
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090601-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090526-2000/enabled=false
+repositories/http\:__download.eclipse.org_rt_rap_1.2_runtime-update/uri=http\://download.eclipse.org/rt/rap/1.2/runtime-update
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_categories/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.2-201002111343/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090603-2000/isSystem=true
+repositories/file\:_C\:_1target_provmiddle_test.plugin_update/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090506-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091118-1342/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090507-0731/uri=http\://download.eclipse.org/eclipse/updates/3.5-I-builds/I20090507-0731
+repositories/http\:__download.eclipse.org_tools_emf_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090504-2055/name=file\:/builds/I200905042055/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1400/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100425-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091201-1100
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090506-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100316-0859/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100406-1034/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091208-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091208-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090602-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090602-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1023/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1300/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100420-0800/suffix=content.xml
+repositories/http\:__download.eclipse.org_releases_helios_200912172200/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090531-2000/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090515-1143/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-0804/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090802-2000/isSystem=true
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository_wtp-buildTools/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1800/isSystem=true
+repositories/http\:__download.eclipse.org_modeling_emft_updates_releases/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090530-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090511-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1300/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100128-1731/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090530-2000/suffix=content.xml
+repositories/http\:__download.eclipse.org_releases_helios_200910011616/name=Helios
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090511-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090511-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100106-1349/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1800/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090511-2000/uri=http\://download.eclipse.org/eclipse/updates/3.5-I-builds/I20090511-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1300/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090507-0731/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090518-2000/isSystem=true
+repositories/file\:_C\:_tmp_extension_eclipse_.eclipseextension/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100316-0859/type=org.eclipse.equinox.i\:_C\:_1target_provmiddle_test.plugin_update/enabled\=true
+repositories/http\:__download.eclipse.org_tools_mylyn_update_e3.3/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1300/name=file\:/builds/I200904271300/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100121-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1023/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1800/suffix=content.xml
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository/version=1.0.0
+repositories/http\:__download.eclipse.org_birt_update-site_2.6/uri=http\://download.eclipse.org/birt/update-site/2.6
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100223-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_technology_linuxtools_update/uri=http\://download.eclipse.org/technology/linuxtools/update
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100224-2242/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100224-2242
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-1549/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090602-2000/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5/uri=http\://download.eclipse.org/eclipse/updates/3.5
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090514-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100121-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_rt_riena_1.1.0.0_update/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090515-1143/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091125-2200/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090521-2000/enabled=false
+repositories/http\:__download.eclipse.org_rt_eclipselink_incremental-updates_milestone/enabled=false
+repositories/http\:__download.eclipse.org_webtools_releng_repository/isSystem=false
+repositories/http\:__download.eclipse.org_releases_helios_201002042330/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090923-1538/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090923-1538
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090721-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_tools_cdt_releases_helios/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0809/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090915-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1710/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1300/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090803-1300
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090811-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100202-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090806-0100/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M6-200903130100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090917-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090917-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-1057/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090818-0800/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090519-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-1545/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090917-0100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090601-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100129-1300/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100125-1800
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios/uri=http\://fullmoon.ottawa.ibm.com/releases/helios
+repositories/http\:__download.eclipse.org_modeling_mdt_updates_releases/uri=http\://download.eclipse.org/modeling/mdt/updates/releases/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090414-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090929-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100426-0852/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090729-1307/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1800/version=1.0.0
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository/suffix=compositeContent.xml
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository_wtp-buildTools/uri=http\://download.eclipse.org/webtools/downloads/drops/T3.2.0/I-3.2.0-20100410204757/repository/wtp-buildTools
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090401-1325/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100423-0906/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090511-2000/name=file\:/builds/I200905112000/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100217-1031/enabled=false
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository_wtp-buildTools/name=file\:/shared/webtools/projects/wtpbuildTools-T3.2.0-I/workdir/I-3.2.0-20100410204757/repository/wtp-buildTools - metadata
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091210-1301/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091210-1301
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090604-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1300/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090515-1143/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090917-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-1320/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_rt_rap_1.3_tooling/enabled=false
+repositories/http\:__download.eclipse.org_birt_update-site_2.5/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-1125/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-2300/enabled=false
+repositories/http\:__download.eclipse.org_modeling_m2m_updates_releases/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-2200/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_helios/uri=http\://download.eclipse.org/releases/helios
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-1300/suffix=content.xml
+repositories/http\:__download.eclipse.org_releases_helios_200912172200/name=Helios
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100413-1521/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-0800/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090728-1414/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__update.eclemma.org/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100105-1537/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_rt_rap_1.3_tooling/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100414-1200/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090729-1307/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091209-0100
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090603-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090603-2000
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090514-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091206-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0100/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5/nickname="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-0800/isSystem=true
+repositories/http\:__download.eclipse.org_tools_mylyn_update_extras/uri=http\://download.eclipse.org/tools/mylyn/update/extras
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-1800/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5/type=org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-1410/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_categories/name=The Eclipse Project Updates
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5M5-200902021535/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091204-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090512-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090512-2000
+repositories/http\:__download.eclipse.org_tools_ptp_releases_2.0/uri=http\://download.eclipse.org/tools/ptp/releases/2.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091006-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090714-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090803-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-0206/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090512-2000/uri=http\://download.eclipse.org/eclipse/updates/3.5-I-builds/I20090512-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090421-0930/isSystem=true
+repositories/http\:__download.eclipse.org_tools_cdt_releases_helios/uri=http\://download.eclipse.org/tools/cdt/releases/helios
+repositories/http\:__download.eclipse.org_tools_mylyn_update_e3.4/isSystem=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.1-200909170800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-0100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091027-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091027-0100
+repositories/http\:__download.eclipse.org_dsdp_mtj_updates_1.0.1_stable/isSystem=false
+repositories/http\:__download.eclipse.org_releases_helios_201003190900/name=Helios
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090707-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091208-0100/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091217-0819/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091217-0819
+repositories/http\:__download.eclipse.org_releases_helios_200910011616/enabled=false
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090507-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-0800/suffix=content.xml
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090611-1540/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100112-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0840/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-0100/enabled=false
+repositories/http\:__download.eclipse.org_releases_helios_201002042330/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090728-1036/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100119-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091030-1201/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090923-1538/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090908-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-1125/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100308-1800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-2300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090505-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-1448/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC1-200905151143/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090922-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100124-2000/isSystem=true
+repositories/file\:_C\:_eclipse_dropins_eclemma/suffix=eclipse
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090503-2055/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_stp_updates/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1800/suffix=content.xml
+repositories/http\:__download.eclipse.org_releases_galileo/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-1800/enabled=false
+repositories/http\:__www.eclipse.org_modeling_emft_updates/uri=http\://www.eclipse.org/modeling/emft/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090505-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100128-1731/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090527-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100216-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-1400/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5.2-201002111343/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100420-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100420-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-0731/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-1600/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1300/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100420-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_tools_emf_updates/uri=http\://download.eclipse.org/tools/emf/updates/
+repositories/http\:__download.eclipse.org_rt_rap_1.2_update/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090730-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100310-1800
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090508-2000/name=file\:/builds/I200905082000/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-0100/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100323-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100323-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-1125/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091204-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1300/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091201-1600/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100224-2242/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100225-1936/enabled=false
+repositories/file\:_C\:_tmp_repoTest_I20090520-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090331-0901/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_categories/name=The Eclipse Project Updates
+repositories/file\:_C\:_tmp_repoTest_categories/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090914-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090914-1800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090521-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090506-2000/name=file\:/builds/I200905062000/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_I20090730-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091215-0800/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100413-1521/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_categories/isSystem=true
+repositories/http\:__www.eclipse.org_pde_pde-api-tools_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-0100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-0100/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090504-2055/name=file\:/builds/I200905042055/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__download.eclipse.org_modeling_mdt_updates_releases/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090507-0731/suffix=content.xml
+repositories/http\:__download.eclipse.org_webtools_releng_repository/suffix=compositeContent.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100312-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_birt_update-site_2.6/isSystem=false
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201002042330/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090630-0800/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091103-0941/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091103-0941
+repositories/file\:_C\:_tmp_repoTest_I20090520-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091117-1545/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090825-1032/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-1300/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_releases_helios_200912172200/uri=http\://download.eclipse.org/releases/helios/200912172200
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090604-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090604-2000
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100415032236_repository_wtp-buildTools/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090415-1348/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-1200/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100125-0800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6/nickname=The Eclipse Project Updates
+repositories/http\:__download.eclipse.org_releases_galileo_201002260900/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100305-1011/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100316-0859/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100316-0859
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090605-1444/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091124-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090901-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20090901-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-1300/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1414/enabled=false
+repositories/file\:_C\:_1target_eclipseweb_.metadata_.plugins_org.eclipse.pde.core_install/uri=file\:/C\:/1target/eclipseweb/.metadata/.plugins/org.eclipse.pde.core/install/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090522-1710/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-1800/suffix=content.xml
+repositories/file\:_C\:_1target_provmiddle_test.plugin_update/nickname=NL Test Repo
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100202-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090520-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090513-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090513-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100122-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090429-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091124-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090428-0100/enabled=false
+repositories/http\:__download.eclipse.org_releases_helios/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090503-2055/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090503-2055
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090513-2000/uri=http\://download.eclipse.org/eclipse/updates/3.5-I-builds/I20090513-2000
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090514-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_rt_eclipselink_updates/isSystem=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091006-0800/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100311-1616/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100311-1616
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091013-1302/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091209-1800/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090503-2055/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090430-2300/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091028-0100/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091028-0100
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090503-2055/uri=http\://download.eclipse.org/eclipse/updates/3.5-I-builds/I20090503-2055
+repositories/http\:__download.eclipse.org_modeling_m2t_updates_releases/uri=http\://download.eclipse.org/modeling/m2t/updates/releases/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100128-1731/isSystem=true
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100410204757_repository/version=1.0.0
+repositories/http\:__download.eclipse.org_webtools_downloads_drops_T3.2.0_I-3.2.0-20100424021000_repository/description=
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091020-0931/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_modeling_m2t_updates/enabled=false
+repositories/http\:__fullmoon.ottawa.ibm.com_releases_helios_201003190900/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0809/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090427-1800/name=file\:/builds/I200904271800/org.eclipse.releng.eclipsebuilder/../src/buildRepo - metadata
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100224-2242/version=1.0.0
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5_R-3.5-200906111540/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090512-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090505-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100209-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091124-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-1549/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091020-0931/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100107-0804/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100420-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100309-0809/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100309-0809
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1800/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090507-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091210-1301/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090803-1300/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090529-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090603-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_categories/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090913-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_modeling_emft_updates_releases/uri=http\://download.eclipse.org/modeling/emft/updates/releases/
+repositories/file\:_C\:_eclipse_.eclipseextension/type=org.eclipse.equinox.p2.extensionlocation.metadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-1300/isSystem=true
+repositories/http\:__download.eclipse.org_releases_helios_201002042330/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100307-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090511-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6-I-builds_categories/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100126-0100/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100224-2242/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091020-0931/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090512-2000/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090707-0800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/file\:_C\:_tmp_extension_eclipse_.eclipseextension/enabled=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090528-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090916-0100/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091207-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100428-1300/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091124-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20091124-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100429-0206/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100127-1800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100127-1800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091006-0800/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090331-0901/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5/enabled=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5milestones_S-3.5RC1-200905151143/uri=http\://download.eclipse.org/eclipse/updates/3.5milestones/S-3.5RC1-200905151143
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1310/name="Eclipse Project Test Site"
+repositories/http\:__download.eclipse.org_modeling_gmt_modisco_updates/uri=http\://download.eclipse.org/modeling/gmt/modisco/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090802-2000/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090805-1300/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1036/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds/type=org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100422-1310/isSystem=true
+repositories/http\:__download.eclipse.org_dsdp_mtj_updates_1.0.1_stable/enabled=false
+repositories/file\:_C\:_1target_eclipseweb_.metadata_.plugins_org.eclipse.pde.core_install/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090518-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091026-1800/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100302-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100302-0800
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100310-0100/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090609-1400/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100225-1936/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090728-1414/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100330-0800/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.6-I-builds/I20100330-0800
+repositories/file\:_C\:_eclipse_.eclipseextension/isSystem=true
+repositories/file\:_C\:_eclipse_.eclipseextension/version=1
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100426-0852/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090426-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091103-0941/isSystem=true
+repositories/http\:__download.eclipse.org_eclipse_updates_3.6/count=10
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090604-2000/suffix=content.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090426-2000/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds/suffix=compositeContent.xml
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090528-2000/isSystem=true
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100122-0800/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100302-0800/suffix=content.xml
+repositories/file\:_C\:_tmp_repoTest_I20090520-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100426-0852/suffix=content.xml
+repositories/http\:__download.eclipse.org_modeling_emf_updates/uri=http\://download.eclipse.org/modeling/emf/updates/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100308-0800/version=1.0.0
+repositories/http\:__download.eclipse.org_releases_helios_201002042330/uri=http\://download.eclipse.org/releases/helios/201002042330
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090428-0100/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/file\:_C\:_1target_provmiddle_test.plugin_update/uri=file\:/C\:/1target/provmiddle/test.plugin_update/
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20090721-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090518-2000/uri=http\://eclipsebuildserv.ottawa.ibm.com/downloads/updates/3.5-I-builds/I20090518-2000
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090414-0800/version=1.0.0
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090512-2000/name="Eclipse Project Test Site"
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20091029-0840/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090518-2000/version=1.0.0
+repositories/http\:__download.eclipse.org_tools_mylyn_update_e3.4/uri=http\://download.eclipse.org/tools/mylyn/update/e3.4
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.5-I-builds_I20090331-0901/suffix=content.xml
+repositories/http\:__download.eclipse.org_eclipse_updates_3.5-I-builds_I20090518-2000/uri=http\://download.eclipse.org/eclipse/updates/3.5-I-builds/I20090518-2000
+repositories/http\:__download.eclipse.org_birt_update-site_2.5/enabled=false
+repositories/http\:__eclipsebuildserv.ottawa.ibm.com_downloads_updates_3.6-I-builds_I20100414-1200/version=1.0.0
diff --git a/bundles/ie.wombat.jbdiff.test/testData/null.data b/bundles/org.eclipse.equinox.p2.tests/testData/ProfilePreferencesTest/DifferentAgent/p2/org.eclipse.equinox.p2.engine/profileRegistry/TestProfile.profile/1345.profile.gz
index e69de29bb..e69de29bb 100644
--- a/bundles/ie.wombat.jbdiff.test/testData/null.data
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/ProfilePreferencesTest/DifferentAgent/p2/org.eclipse.equinox.p2.engine/profileRegistry/TestProfile.profile/1345.profile.gz
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/packedSiblingsWithUUID/.blobstore/5e/00c3579a3138001f1093800c21638bce b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/packedSiblingsWithUUID/.blobstore/5e/00c3579a3138001f1093800c21638bce
new file mode 100644
index 000000000..c57eff55e
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/packedSiblingsWithUUID/.blobstore/5e/00c3579a3138001f1093800c21638bce
@@ -0,0 +1 @@
+Hello World! \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/packedSiblingsWithUUID/artifacts.xml b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/packedSiblingsWithUUID/artifacts.xml
new file mode 100644
index 000000000..3152de6f9
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/packedSiblingsWithUUID/artifacts.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?artifactRepository class='org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository' version='1.0.0'?>
+<repository type="org.eclipse.equinox.p2.artifact.repository.simpleRepository" name="P2 Third Party 2" version="1">
+ <artifacts size="1">
+ <artifact classifier="osgi.bundle" id="org.springframework.ide.eclipse" version="2.3.2.201003220227-RELEASE">
+ <properties size="4">
+ <property value="19735" name="artifact.size" />
+ <property value="18193" name="download.size" />
+ <property value="packed" name="format" />
+ <property value="00c3579a3138001f1093800c21638bce" name="artifact.uuid" />
+ </properties>
+ </artifact>
+ </artifacts>
+ <mappings size="5">
+ <rule filter="(&amp; (classifier=osgi.bundle) (format=packed))" output="${repoUrl}/plugins/${id}_${version}.jar.pack.gz" />
+ <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) (format=packed))" output="${repoUrl}/features/${id}_${version}.jar.pack.gz" />
+ <rule filter="(&amp; (classifier=org.eclipse.update.feature))" output="${repoUrl}/features/${id}_${version}.jar" />
+ </mappings>
+ <properties size="3">
+ <property value="1277315460101" name="p2.timestamp" />
+ <property value="true" name="publishPackFilesAsSiblings" />
+ <property value="false" name="p2.compressed" />
+ </properties>
+</repository>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/bug300572/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/1273605777280.profile.gz b/bundles/org.eclipse.equinox.p2.tests/testData/bug300572/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/1273605777280.profile.gz
new file mode 100644
index 000000000..045dbe762
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/bug300572/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/1273605777280.profile.gz
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/bug300572/repo/content.xml b/bundles/org.eclipse.equinox.p2.tests/testData/bug300572/repo/content.xml
new file mode 100644
index 000000000..0f5a62c48
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/bug300572/repo/content.xml
@@ -0,0 +1,119 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?metadataRepository version='1.1.0'?>
+<repository name='file:/Users/Pascal/tmp/generated - metadata' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1'>
+ <properties size='2'>
+ <property name='p2.timestamp' value='1273607589060'/>
+ <property name='p2.compressed' value='false'/>
+ </properties>
+ <units size='3'>
+ <unit id='hello' version='1.0.2.201001211536'>
+ <update id='hello' range='[0.0.0,1.0.2.201001211536)' severity='0'/>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.name' value='Hello'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='hello' version='1.0.2.201001211536'/>
+ <provided namespace='osgi.bundle' name='hello' version='1.0.2.201001211536'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ </provides>
+ <requires size='2'>
+ <required namespace='osgi.bundle' name='org.eclipse.ui' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.core.runtime' range='0.0.0'/>
+ </requires>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle' id='hello' version='1.0.2.201001211536'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-ManifestVersion: 2&#xA;Bundle-ActivationPolicy: lazy&#xA;Bundle-Name: Hello&#xA;Bundle-Version: 1.0.2.201001211536&#xA;Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime&#xA;Bundle-RequiredExecutionEnvironment: JavaSE-1.6&#xA;Bundle-SymbolicName: hello; singleton:=true&#xA;Manifest-Version: 1.0&#xA;Bundle-Activator: hello.Activator&#xA;
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='hellopatch.feature.group' version='1.0.2.201001211536' singleton='false'>
+ <patchScope>
+ <scope>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hellofeature.feature.group' range='[1.0.0.200911201237,1.0.0.200911201237]'/>
+ </requires>
+ </scope>
+ </patchScope>
+ <changes>
+ <change>
+ <from>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hello' range='0.0.0'/>
+ </from>
+ <to>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hello' range='[1.0.2.201001211536,1.0.2.201001211536]'/>
+ </to>
+ </change>
+ </changes>
+ <lifeCycle>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hellofeature.feature.group' range='[1.0.0.200911201237,1.0.0.200911201237]' greedy='false'/>
+ </lifeCycle>
+ <update id='hellopatch.feature.group' range='[0.0.0,1.0.2.201001211536)' severity='0'/>
+ <properties size='5'>
+ <property name='org.eclipse.equinox.p2.type.patch' value='true'/>
+ <property name='org.eclipse.equinox.p2.name' value='Hellopatch 2 helloOnly'/>
+ <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'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='hellopatch.feature.group' version='1.0.2.201001211536'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hellopatch.feature.jar' range='[1.0.2.201001211536,1.0.2.201001211536]'>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ </required>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ <licenses size='1'>
+ <license uri='http://www.example.com/license' url='http://www.example.com/license'>
+ [Enter License Description here.]
+ </license>
+ </licenses>
+ <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
+ [Enter Copyright Description here.]
+ </copyright>
+ </unit>
+ <unit id='hellopatch.feature.jar' version='1.0.2.201001211536'>
+ <properties size='3'>
+ <property name='org.eclipse.equinox.p2.name' value='Hellopatch 2 helloOnly'/>
+ <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'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='hellopatch.feature.jar' version='1.0.2.201001211536'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' version='1.0.0'/>
+ <provided namespace='org.eclipse.update.feature' name='hellopatch' version='1.0.2.201001211536'/>
+ </provides>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ <artifacts size='1'>
+ <artifact classifier='org.eclipse.update.feature' id='hellopatch' version='1.0.2.201001211536'/>
+ </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 uri='http://www.example.com/license' url='http://www.example.com/license'>
+ [Enter License Description here.]
+ </license>
+ </licenses>
+ <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
+ [Enter Copyright Description here.]
+ </copyright>
+ </unit>
+ </units>
+</repository>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/bug300572Small/repo/content.xml b/bundles/org.eclipse.equinox.p2.tests/testData/bug300572Small/repo/content.xml
new file mode 100644
index 000000000..d4249709e
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/bug300572Small/repo/content.xml
@@ -0,0 +1,356 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?metadataRepository version='1.1.0'?>
+<repository name='file:/Users/Pascal/tmp/300372/ - metadata' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1.0.0'>
+ <properties size='2'>
+ <property name='p2.timestamp' value='1273714010101'/>
+ <property name='p2.compressed' value='false'/>
+ </properties>
+ <units size='9'>
+ <unit id='hellopatch.feature.group' version='1.0.0' singleton='false'>
+ <patchScope>
+ <scope>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hellofeature.feature.group' range='[1.0.0.200911201237,1.0.0.200911201237]'/>
+ </requires>
+ </scope>
+ </patchScope>
+ <changes>
+ <change>
+ <from>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hello' range='0.0.0'/>
+ </from>
+ <to>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hello' range='[1.0.1.200911201237,1.0.1.200911201237]'/>
+ </to>
+ </change>
+ </changes>
+ <lifeCycle>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hellofeature.feature.group' range='[1.0.0.200911201237,1.0.0.200911201237]' greedy='false'/>
+ </lifeCycle>
+ <update id='hellopatch.feature.group' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='5'>
+ <property name='org.eclipse.equinox.p2.type.patch' value='true'/>
+ <property name='org.eclipse.equinox.p2.name' value='Hellopatch'/>
+ <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'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='hellopatch.feature.group' version='1.0.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hellopatch.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 uri='http://www.example.com/license' url='http://www.example.com/license'>
+ [Enter License Description here.]
+ </license>
+ </licenses>
+ <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
+ [Enter Copyright Description here.]
+ </copyright>
+ </unit>
+ <unit id='hello' version='1.0.2.201001211536'>
+ <update id='hello' range='[0.0.0,1.0.2.201001211536)' severity='0'/>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.name' value='Hello'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='hello' version='1.0.2.201001211536'/>
+ <provided namespace='osgi.bundle' name='hello' version='1.0.2.201001211536'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ </provides>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-ManifestVersion: 2&#xA;Bundle-ActivationPolicy: lazy&#xA;Bundle-Name: Hello&#xA;Bundle-Version: 1.0.2.201001211536&#xA;Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime&#xA;Bundle-RequiredExecutionEnvironment: JavaSE-1.6&#xA;Bundle-SymbolicName: hello; singleton:=true&#xA;Manifest-Version: 1.0&#xA;Bundle-Activator: hello.Activator
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='hellopatch.feature.jar' version='1.0.0'>
+ <properties size='3'>
+ <property name='org.eclipse.equinox.p2.name' value='Hellopatch'/>
+ <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'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='hellopatch.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='hellopatch' version='1.0.0'/>
+ </provides>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ <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 uri='http://www.example.com/license' url='http://www.example.com/license'>
+ [Enter License Description here.]
+ </license>
+ </licenses>
+ <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
+ [Enter Copyright Description here.]
+ </copyright>
+ </unit>
+ <unit id='hellopatch.unrelated.feature.group' version='1.0.0.201001211543' singleton='false'>
+ <patchScope>
+ <scope>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hellofeature.feature.group' range='[1.0.0.200911201237,1.0.0.200911201237]'/>
+ </requires>
+ </scope>
+ </patchScope>
+ <changes>
+ <change>
+ <from>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hello' range='0.0.0'/>
+ </from>
+ <to>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hello' range='[1.0.2.201001211543,1.0.2.201001211543]'/>
+ </to>
+ </change>
+ </changes>
+ <lifeCycle>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hellofeature.feature.group' range='[1.0.0.200911201237,1.0.0.200911201237]' greedy='false'/>
+ </lifeCycle>
+ <update id='hellopatch.unrelated.feature.group' range='[0.0.0,1.0.0.201001211543)' severity='0'/>
+ <properties size='5'>
+ <property name='org.eclipse.equinox.p2.type.patch' value='true'/>
+ <property name='org.eclipse.equinox.p2.name' value='Hellopatch unrelated helloOnly'/>
+ <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'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='hellopatch.unrelated.feature.group' version='1.0.0.201001211543'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hellopatch.unrelated.feature.jar' range='[1.0.0.201001211543,1.0.0.201001211543]'>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ </required>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ <licenses size='1'>
+ <license uri='http://www.example.com/license' url='http://www.example.com/license'>
+ [Enter License Description here.]
+ </license>
+ </licenses>
+ <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
+ [Enter Copyright Description here.]
+ </copyright>
+ </unit>
+ <unit id='hellopatch.feature.group' version='1.0.2.201001211536' singleton='false'>
+ <patchScope>
+ <scope>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hellofeature.feature.group' range='[1.0.0.200911201237,1.0.0.200911201237]'/>
+ </requires>
+ </scope>
+ </patchScope>
+ <changes>
+ <change>
+ <from>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hello' range='0.0.0'/>
+ </from>
+ <to>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hello' range='[1.0.2.201001211536,1.0.2.201001211536]'/>
+ </to>
+ </change>
+ </changes>
+ <lifeCycle>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hellofeature.feature.group' range='[1.0.0.200911201237,1.0.0.200911201237]' greedy='false'/>
+ </lifeCycle>
+ <update id='hellopatch.feature.group' range='[0.0.0,1.0.2.201001211536)' severity='0'/>
+ <properties size='5'>
+ <property name='org.eclipse.equinox.p2.type.patch' value='true'/>
+ <property name='org.eclipse.equinox.p2.name' value='Hellopatch 2 helloOnly'/>
+ <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'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='hellopatch.feature.group' version='1.0.2.201001211536'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hellopatch.feature.jar' range='[1.0.2.201001211536,1.0.2.201001211536]'>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ </required>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ <licenses size='1'>
+ <license uri='http://www.example.com/license' url='http://www.example.com/license'>
+ [Enter License Description here.]
+ </license>
+ </licenses>
+ <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
+ [Enter Copyright Description here.]
+ </copyright>
+ </unit>
+ <unit id='hello' version='1.0.2.201001211543'>
+ <update id='hello' range='[0.0.0,1.0.2.201001211543)' severity='0'/>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.name' value='Hello'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='hello' version='1.0.2.201001211543'/>
+ <provided namespace='osgi.bundle' name='hello' version='1.0.2.201001211543'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ </provides>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-ManifestVersion: 2&#xA;Bundle-ActivationPolicy: lazy&#xA;Bundle-Name: Hello&#xA;Bundle-Version: 1.0.2.201001211543&#xA;Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime&#xA;Bundle-RequiredExecutionEnvironment: JavaSE-1.6&#xA;Bundle-SymbolicName: hello; singleton:=true&#xA;Manifest-Version: 1.0&#xA;Bundle-Activator: hello.Activator&#xA;
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='hello' version='1.0.1.200911201237'>
+ <update id='hello' range='[0.0.0,1.0.1.200911201237)' severity='0'/>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.name' value='Hello'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='hello' version='1.0.1.200911201237'/>
+ <provided namespace='osgi.bundle' name='hello' version='1.0.1.200911201237'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ </provides>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-ManifestVersion: 2&#xA;Bundle-ActivationPolicy: lazy&#xA;Bundle-Name: Hello&#xA;Bundle-Version: 1.0.1.200911201237&#xA;Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime&#xA;Bundle-RequiredExecutionEnvironment: JavaSE-1.6&#xA;Bundle-SymbolicName: hello; singleton:=true&#xA;Manifest-Version: 1.0&#xA;Bundle-Activator: hello.Activator
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='hellopatch.unrelated.feature.jar' version='1.0.0.201001211543'>
+ <properties size='3'>
+ <property name='org.eclipse.equinox.p2.name' value='Hellopatch unrelated helloOnly'/>
+ <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'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='hellopatch.unrelated.feature.jar' version='1.0.0.201001211543'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' version='1.0.0'/>
+ <provided namespace='org.eclipse.update.feature' name='hellopatch.unrelated' version='1.0.0.201001211543'/>
+ </provides>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ <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 uri='http://www.example.com/license' url='http://www.example.com/license'>
+ [Enter License Description here.]
+ </license>
+ </licenses>
+ <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
+ [Enter Copyright Description here.]
+ </copyright>
+ </unit>
+ <unit id='hellopatch.feature.jar' version='1.0.2.201001211536'>
+ <properties size='3'>
+ <property name='org.eclipse.equinox.p2.name' value='Hellopatch 2 helloOnly'/>
+ <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'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='hellopatch.feature.jar' version='1.0.2.201001211536'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' version='1.0.0'/>
+ <provided namespace='org.eclipse.update.feature' name='hellopatch' version='1.0.2.201001211536'/>
+ </provides>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ <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 uri='http://www.example.com/license' url='http://www.example.com/license'>
+ [Enter License Description here.]
+ </license>
+ </licenses>
+ <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
+ [Enter Copyright Description here.]
+ </copyright>
+ </unit>
+ <unit id='hellofeature.feature.group' version='1.0.0.200911201237' singleton='false'>
+ <update id='hellofeature.feature.group' range='[0.0.0,1.0.0.200911201237)' severity='0'/>
+ <properties size='4'>
+ <property name='org.eclipse.equinox.p2.name' value='Hellofeature'/>
+ <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'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='hellofeature.feature.group' version='1.0.0.200911201237'/>
+ </provides>
+ <requires size='2'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hello' range='[1.0.0.200911201237,1.0.0.200911201237]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='hellofeature.feature.jar' range='[1.0.0.200911201237,1.0.0.200911201237]'>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ </required>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ <licenses size='1'>
+ <license uri='http://www.example.com/license' url='http://www.example.com/license'>
+ [Enter License Description here.]
+ </license>
+ </licenses>
+ <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
+ [Enter Copyright Description here.]
+ </copyright>
+ </unit>
+ <unit id='hello' version='1.0.0.200911201237'>
+ <update id='hello' range='[0.0.0,1.0.0.200911201237)' severity='0'/>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.name' value='Hello'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='hello' version='1.0.0.200911201237'/>
+ <provided namespace='osgi.bundle' name='hello' version='1.0.0.200911201237'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ </provides>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-Activator: hello.Activator&#xA;Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime&#xA;Manifest-Version: 1.0&#xA;Bundle-RequiredExecutionEnvironment: JavaSE-1.6&#xA;Bundle-Name: Hello&#xA;Bundle-Version: 1.0.0.200911201237&#xA;Bundle-ManifestVersion: 2&#xA;Bundle-ActivationPolicy: lazy&#xA;Bundle-SymbolicName: hello; singleton:=true
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+
+ </units>
+</repository>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/bug301446/p2/org.eclipse.equinox.p2.engine/profileRegistry/bootProfile.profile/1297370265829.profile.gz b/bundles/org.eclipse.equinox.p2.tests/testData/bug301446/p2/org.eclipse.equinox.p2.engine/profileRegistry/bootProfile.profile/1297370265829.profile.gz
new file mode 100644
index 000000000..67203fac9
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/bug301446/p2/org.eclipse.equinox.p2.engine/profileRegistry/bootProfile.profile/1297370265829.profile.gz
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/bug301446/repo/content.jar b/bundles/org.eclipse.equinox.p2.tests/testData/bug301446/repo/content.jar
new file mode 100644
index 000000000..08dc74768
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/bug301446/repo/content.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/bug306279/repo/helios/content.jar b/bundles/org.eclipse.equinox.p2.tests/testData/bug306279/repo/helios/content.jar
new file mode 100644
index 000000000..1d452af72
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/bug306279/repo/helios/content.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/bug306279/repo/rienatoolbox-a/content.jar b/bundles/org.eclipse.equinox.p2.tests/testData/bug306279/repo/rienatoolbox-a/content.jar
new file mode 100644
index 000000000..363b81fcf
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/bug306279/repo/rienatoolbox-a/content.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/bug306279f/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/1272734955914.profile.gz b/bundles/org.eclipse.equinox.p2.tests/testData/bug306279f/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/1272734955914.profile.gz
new file mode 100644
index 000000000..b5a99f9fe
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/bug306279f/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/1272734955914.profile.gz
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/bug306279f/repo/babel/content.jar b/bundles/org.eclipse.equinox.p2.tests/testData/bug306279f/repo/babel/content.jar
new file mode 100644
index 000000000..931ca22c1
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/bug306279f/repo/babel/content.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/bug306279f/repo/helios/content.jar b/bundles/org.eclipse.equinox.p2.tests/testData/bug306279f/repo/helios/content.jar
new file mode 100644
index 000000000..1d452af72
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/bug306279f/repo/helios/content.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/bug311330/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/1272735176616.profile.gz b/bundles/org.eclipse.equinox.p2.tests/testData/bug311330/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/1272735176616.profile.gz
new file mode 100644
index 000000000..68ae7cc4b
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/bug311330/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/1272735176616.profile.gz
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/bug329279/repo/content.jar b/bundles/org.eclipse.equinox.p2.tests/testData/bug329279/repo/content.jar
new file mode 100644
index 000000000..268b93b63
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/bug329279/repo/content.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/helios-sr0/content.jar b/bundles/org.eclipse.equinox.p2.tests/testData/helios-sr0/content.jar
new file mode 100644
index 000000000..522af510e
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/helios-sr0/content.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_1.0.0.qualifier.jar b/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_1.0.0.qualifier.jar
new file mode 100644
index 000000000..f8f42facd
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_1.0.0.qualifier.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_default/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_default/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..54aa697a9
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_default/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %name
+Bundle-SymbolicName: foobundle
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: %provider
+Require-Bundle: org.eclipse.core.runtime
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_default/OSGI-INF/l10n/bundle.properties b/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_default/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 000000000..9a0f12777
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_default/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,2 @@
+name=Foo English Bundle
+provider=Foo English Provider \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_default/OSGI-INF/l10n/bundle_de.properties b/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_default/OSGI-INF/l10n/bundle_de.properties
new file mode 100644
index 000000000..cbd6d5c5b
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_default/OSGI-INF/l10n/bundle_de.properties
@@ -0,0 +1,2 @@
+name=Foo German Bundle
+provider=Foo German Provider \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_osgi-inf/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_osgi-inf/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..e69b74ad9
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_osgi-inf/META-INF/MANIFEST.MF
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %name
+Bundle-SymbolicName: foobundle
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: %provider
+Require-Bundle: org.eclipse.core.runtime
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-Localization: OSGI-INF/bundle
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_osgi-inf/OSGI-INF/bundle.properties b/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_osgi-inf/OSGI-INF/bundle.properties
new file mode 100644
index 000000000..9a0f12777
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_osgi-inf/OSGI-INF/bundle.properties
@@ -0,0 +1,2 @@
+name=Foo English Bundle
+provider=Foo English Provider \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_osgi-inf/OSGI-INF/bundle_de.properties b/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_osgi-inf/OSGI-INF/bundle_de.properties
new file mode 100644
index 000000000..cbd6d5c5b
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/localizationtests/foobundle_osgi-inf/OSGI-INF/bundle_de.properties
@@ -0,0 +1,2 @@
+name=Foo German Bundle
+provider=Foo German Provider \ 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.tests/testData/metadataRepo/compositeBadChildren/compositeContent.xml
index af4be35bc..6c8fd790c 100644
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/compositeContent.xml
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/compositeContent.xml
@@ -4,6 +4,7 @@
<properties size='2'>
<property name='p2.compressed' value='false'/>
<property name='p2.timestamp' value='1234'/>
+ <property name='composite.restrictive.loading' value='true'/>
</properties>
<children size='2'>
<child location='one'/>
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/one/content.xml b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/one/content.xml
index 41f172f48..41f172f48 100644
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/one/content.xml
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/one/content.xml
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/qltest/content.xml b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/qltest/content.xml
new file mode 100644
index 000000000..d12974563
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/qltest/content.xml
@@ -0,0 +1,123 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?metadataRepository class='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1.0.0'?>
+<repository name='QL Test Repository' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1' description='QL 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='7'>
+ <unit id='test.bundle.A' version='1.0.0' singleton='false'>
+ <update id='test.bundle.A' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.group' value='true'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='test.bundle.A' version='1.0.0'/>
+ <provided namespace='osgi.bundle' name='test.bundle.A' 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.a' version='1.0.0'/>
+ </artifacts>
+ </unit>
+ <unit id='test.bundle.B' version='1.0.0' singleton='false'>
+ <update id='test.bundle.B' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.group' value='true'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='test.bundle.B' version='1.0.0'/>
+ <provided namespace='osgi.bundle' name='test.bundle.B' 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.b' version='1.0.0'/>
+ </artifacts>
+ </unit>
+ <unit id='test.bundle.C' version='1.0.0' singleton='false'>
+ <update id='test.bundle.C' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.group' value='true'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='test.bundle.C' version='1.0.0'/>
+ <provided namespace='osgi.bundle' name='test.bundle.C' 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.c' version='1.0.0'/>
+ </artifacts>
+ </unit>
+ <unit id='test.bundle.D' version='1.0.0' singleton='false'>
+ <update id='test.bundle.D' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.group' value='true'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='test.bundle.D' version='1.0.0'/>
+ <provided namespace='osgi.bundle' name='test.bundle.D' 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.d' version='1.0.0'/>
+ </artifacts>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='test.bundle.A' range='[1.0.0,1.0.0]'/>
+ </requires>
+ </unit>
+ <unit id='test.bundle.E' version='1.0.0' singleton='false'>
+ <update id='test.bundle.E' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.group' value='true'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='test.bundle.E' version='1.0.0'/>
+ <provided namespace='osgi.bundle' name='test.bundle.E' 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.e' version='1.0.0'/>
+ </artifacts>
+ <requires size='2'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='test.bundle.A' range='[1.0.0,1.0.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='test.bundle.B' range='[1.0.0,1.0.0]'/>
+ </requires>
+ </unit>
+ <unit id='test.bundle.F' version='1.0.0' singleton='false'>
+ <update id='test.bundle.F' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.group' value='true'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='test.bundle.F' version='1.0.0'/>
+ <provided namespace='osgi.bundle' name='test.bundle.F' 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.f' version='1.0.0'/>
+ </artifacts>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='test.bundle.B' range='[1.0.0,1.0.0]'/>
+ </requires>
+ </unit>
+ <unit id='test.bundle.G' version='1.0.0' singleton='false'>
+ <update id='test.bundle.E' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.group' value='false'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='test.bundle.G' version='1.0.0'/>
+ <provided namespace='osgi.bundle' name='test.bundle.G' 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.g' version='1.0.0'/>
+ </artifacts>
+ <requires size='2'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='test.bundle.A' range='[1.0.0,1.0.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='test.bundle.B' range='[1.0.0,1.0.0]'/>
+ </requires>
+ </unit>
+ </units>
+</repository> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/profileSynchronizerTest/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/1273437276701.profile.gz b/bundles/org.eclipse.equinox.p2.tests/testData/profileSynchronizerTest/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/1273437276701.profile.gz
new file mode 100644
index 000000000..f7219d939
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/profileSynchronizerTest/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/1273437276701.profile.gz
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/profileSynchronizerTest2/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/1273512748503.profile.gz b/bundles/org.eclipse.equinox.p2.tests/testData/profileSynchronizerTest2/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/1273512748503.profile.gz
new file mode 100644
index 000000000..f16f35abe
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/profileSynchronizerTest2/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/1273512748503.profile.gz
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/A/content.xml b/bundles/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/A/content.xml
index 9d8be6ac3..a7ae072e9 100644
--- a/bundles/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/A/content.xml
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/A/content.xml
@@ -3,30 +3,32 @@
<repository name='file:/C:/_workspaces/p2/org.eclipse.equinox.p2.tests/testData/testRepos/updateSite/ - metadata' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1.0.0'>
<properties size='2'>
<property name='p2.compressed' value='false'/>
- <property name='p2.timestamp' value='1271975857194'/>
+ <property name='p2.timestamp' value='1272593820612'/>
</properties>
- <references size='2'>
- <repository uri='file:/C:/_workspaces/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/A/' url='file:/C:/_workspaces/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/A/' type='1' options='1'/>
+ <references size='4'>
+ <repository uri='file:/Users/Pascal/dev/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/A/' url='file:/Users/Pascal/dev/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/A/' type='1' options='1'/>
<repository uri='file:/C:/_workspaces/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/B/' url='file:/C:/_workspaces/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/B/' type='0' options='1'/>
+ <repository uri='file:/Users/Pascal/dev/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/B/' url='file:/Users/Pascal/dev/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/B/' type='0' options='1'/>
+ <repository uri='file:/C:/_workspaces/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/A/' url='file:/C:/_workspaces/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/A/' type='1' options='1'/>
</references>
<units size='37'>
- <unit id='Readme_Example.feature.jar' version='1.0.0'>
- <update id='Readme_Example.feature.jar' range='[0.0.0,1.0.0)' severity='0'/>
+ <unit id='RCP_Browser_Example.feature.jar' version='1.0.0'>
+ <update id='RCP_Browser_Example.feature.jar' range='[0.0.0,1.0.0)' severity='0'/>
<properties size='3'>
- <property name='org.eclipse.equinox.p2.name' value='Readme_Example Feature'/>
- <property name='org.eclipse.equinox.p2.description' value='[Enter Feature Description here.]'/>
+ <property name='org.eclipse.equinox.p2.name' value='RCP_Browser_Example Feature'/>
+ <property name='org.eclipse.equinox.p2.description' value='Browser Example, but it has dependencies that it won&apos;t find.'/>
<property name='org.eclipse.equinox.p2.description.url' value='http://www.example.com/description'/>
</properties>
<provides size='3'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='Readme_Example.feature.jar' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='RCP_Browser_Example.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='Readme_Example' version='1.0.0'/>
+ <provided namespace='org.eclipse.update.feature' name='RCP_Browser_Example' version='1.0.0'/>
</provides>
<filter>
(org.eclipse.update.install.features=true)
</filter>
<artifacts size='1'>
- <artifact classifier='org.eclipse.update.feature' id='Readme_Example' version='1.0.0'/>
+ <artifact classifier='org.eclipse.update.feature' id='RCP_Browser_Example' version='1.0.0'/>
</artifacts>
<touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
<touchpointData size='1'>
@@ -45,114 +47,32 @@
[Enter Copyright Description here.]
</copyright>
</unit>
- <unit id='Examples' version='0.0.0'>
+ <unit id='Undo_Example.feature.jar' version='1.0.0'>
+ <update id='Undo_Example.feature.jar' range='[0.0.0,1.0.0)' severity='0'/>
<properties size='3'>
- <property name='org.eclipse.equinox.p2.name' value='Platform Examples'/>
- <property name='org.eclipse.equinox.p2.description' value='Some of the examples'/>
- <property name='org.eclipse.equinox.p2.type.category' value='true'/>
- </properties>
- <provides size='1'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='Examples' version='0.0.0'/>
- </provides>
- <requires size='5'>
- <required namespace='org.eclipse.equinox.p2.iu' name='Multi_Page_Editor_Example.feature.group' range='[1.0.0,1.0.0]'/>
- <required namespace='org.eclipse.equinox.p2.iu' name='Field_Assist_Example.feature.group' range='[2.0.0,2.0.0]'/>
- <required namespace='org.eclipse.equinox.p2.iu' name='Field_Assist_Example.feature.group' range='[1.0.1,1.0.1]'/>
- <required namespace='org.eclipse.equinox.p2.iu' name='Field_Assist_Example.feature.group' range='[1.0.0,1.0.0]'/>
- <required namespace='org.eclipse.equinox.p2.iu' name='Readme_Example.feature.group' range='[1.0.0,1.0.0]'/>
- </requires>
- <touchpoint id='null' version='0.0.0'/>
- </unit>
- <unit id='org.eclipse.ui.examples.job' version='3.0.0'>
- <update id='org.eclipse.ui.examples.job' range='[0.0.0,3.0.0)' severity='0'/>
- <properties size='2'>
- <property name='org.eclipse.equinox.p2.name' value='Progress Examples Plug-in'/>
- <property name='org.eclipse.equinox.p2.provider' value='Eclipse.org'/>
+ <property name='org.eclipse.equinox.p2.name' value='Undo_Example Feature'/>
+ <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'/>
</properties>
- <provides size='6'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui.examples.job' version='3.0.0'/>
- <provided namespace='osgi.bundle' name='org.eclipse.ui.examples.job' version='3.0.0'/>
- <provided namespace='java.package' name='org.eclipse.ui.examples.jobs' version='0.0.0'/>
- <provided namespace='java.package' name='org.eclipse.ui.examples.jobs.actions' version='0.0.0'/>
- <provided namespace='java.package' name='org.eclipse.ui.examples.jobs.views' version='0.0.0'/>
- <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='Undo_Example.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='Undo_Example' version='1.0.0'/>
</provides>
- <requires size='7'>
- <required namespace='osgi.bundle' name='org.eclipse.ui' range='0.0.0'/>
- <required namespace='osgi.bundle' name='org.eclipse.core.resources' range='0.0.0'/>
- <required namespace='osgi.bundle' name='org.eclipse.core.runtime' range='0.0.0'/>
- <required namespace='osgi.bundle' name='org.eclipse.ui.ide' range='0.0.0'/>
- <required namespace='osgi.bundle' name='org.eclipse.jface.text' range='0.0.0'/>
- <required namespace='osgi.bundle' name='org.eclipse.ui.workbench.texteditor' range='0.0.0'/>
- <required namespace='osgi.bundle' name='org.eclipse.ui.editors' range='0.0.0'/>
- </requires>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
<artifacts size='1'>
- <artifact classifier='osgi.bundle' id='org.eclipse.ui.examples.job' version='3.0.0'/>
+ <artifact classifier='org.eclipse.update.feature' id='Undo_Example' version='1.0.0'/>
</artifacts>
<touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
<touchpointData size='1'>
- <instructions size='2'>
- <instruction key='manifest'>
- Bundle-ManifestVersion: 2&#xA;Eclipse-AutoStart: true&#xA;Export-Package: org.eclipse.ui.examples.jobs,org.eclipse.ui.examples.jobs.actions,org.eclipse.ui.examples.jobs.views&#xA;Bundle-Localization: plugin&#xA;Require-Bundle: org.eclipse.ui,org.eclipse.core.resources,org.eclipse.core.runtime,org.eclipse.ui.ide,org.eclipse.jface.text,org.eclipse.ui.workbench.texteditor,org.eclipse.ui.editors&#xA;Bundle-Activator: org.eclipse.ui.examples.jobs.ProgressExamplesPlugin&#xA;Bundle-Name: Progress Examples Plug-in&#xA;Bundle-Version: 3.0.0&#xA;Bundle-Vendor: Eclipse.org&#xA;Bundle-SymbolicName: org.eclipse.ui.examples.job; singleton:=true&#xA;Bundle-ClassPath: ProgressExamples.jar&#xA;Manifest-Version: 1.0
- </instruction>
+ <instructions size='1'>
<instruction key='zipped'>
true
</instruction>
</instructions>
</touchpointData>
- </unit>
- <unit id='tooling.osgi.bundle.default' version='1.0.0' singleton='false'>
- <hostRequirements size='1'>
- <required namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' range='0.0.0' multiple='true' greedy='false'/>
- </hostRequirements>
- <properties size='1'>
- <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
- </properties>
- <provides size='2'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='tooling.osgi.bundle.default' version='1.0.0'/>
- <provided namespace='org.eclipse.equinox.p2.flavor' name='tooling' version='1.0.0'/>
- </provides>
- <requires size='1'>
- <required namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' range='0.0.0' multiple='true' greedy='false'/>
- </requires>
- <touchpoint id='null' version='0.0.0'/>
- <touchpointData size='1'>
- <instructions size='4'>
- <instruction key='install'>
- installBundle(bundle:${artifact})
- </instruction>
- <instruction key='uninstall'>
- uninstallBundle(bundle:${artifact})
- </instruction>
- <instruction key='unconfigure'>
-
- </instruction>
- <instruction key='configure'>
- setStartLevel(startLevel:4);
- </instruction>
- </instructions>
- </touchpointData>
- </unit>
- <unit id='Readme_Example.feature.group' version='1.0.0' singleton='false'>
- <update id='Readme_Example.feature.group' range='[0.0.0,1.0.0)' severity='0'/>
- <properties size='4'>
- <property name='org.eclipse.equinox.p2.name' value='Readme_Example Feature'/>
- <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'/>
- </properties>
- <provides size='1'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='Readme_Example.feature.group' version='1.0.0'/>
- </provides>
- <requires size='2'>
- <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui.examples.readmetool' range='[3.3.0.200810301029,3.3.0.200810301029]'/>
- <required namespace='org.eclipse.equinox.p2.iu' name='Readme_Example.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 uri='http://www.example.com/license' url='http://www.example.com/license'>
[Enter License Description here.]
@@ -162,20 +82,23 @@
[Enter Copyright Description here.]
</copyright>
</unit>
- <unit id='Field_Assist_Example.feature.group' version='1.0.0' singleton='false'>
- <update id='Field_Assist_Example.feature.group' range='[0.0.0,1.0.0)' severity='0'/>
- <properties size='4'>
- <property name='org.eclipse.equinox.p2.name' value='Field_Assist_Example Feature'/>
+ <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='1'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='Field_Assist_Example.feature.group' version='1.0.0'/>
+ <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='2'>
- <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui.examples.fieldassist' range='[1.1.0,1.1.0]'/>
- <required namespace='org.eclipse.equinox.p2.iu' name='Field_Assist_Example.feature.jar' range='[1.0.0,1.0.0]'>
+ <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>
@@ -191,88 +114,69 @@
[Enter Copyright Description here.]
</copyright>
</unit>
- <unit id='Undo_Example.feature.group' version='1.0.0' singleton='false'>
- <update id='Undo_Example.feature.group' range='[0.0.0,1.0.0)' severity='0'/>
+ <unit id='org.eclipse.ui.examples.readmetool' version='3.3.0.200810301029'>
+ <update id='org.eclipse.ui.examples.readmetool' range='[0.0.0,3.3.0.200810301029)' severity='0'/>
<properties size='4'>
- <property name='org.eclipse.equinox.p2.name' value='Undo_Example Feature'/>
- <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'/>
- </properties>
- <provides size='1'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='Undo_Example.feature.group' version='1.0.0'/>
- </provides>
- <requires size='2'>
- <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui.examples.undo' range='[3.2.100.200810301029,3.2.100.200810301029]'/>
- <required namespace='org.eclipse.equinox.p2.iu' name='Undo_Example.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 uri='http://www.example.com/license' url='http://www.example.com/license'>
- [Enter License Description here.]
- </license>
- </licenses>
- <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
- [Enter Copyright Description here.]
- </copyright>
- </unit>
- <unit id='Field_Assist_Example.feature.group' version='2.0.0' singleton='false'>
- <update id='Field_Assist_Example.feature.group' range='[0.0.0,2.0.0)' severity='0'/>
- <properties size='3'>
- <property name='org.eclipse.equinox.p2.name' value='Field_Assist_Example Feature'/>
- <property name='org.eclipse.equinox.p2.description' value='Even better than the last one!'/>
- <property name='org.eclipse.equinox.p2.type.group' value='true'/>
+ <property name='df_LT.Plugin.name' value='Readme File Editing Tool'/>
+ <property name='df_LT.Plugin.providerName' value='Eclipse.org'/>
+ <property name='org.eclipse.equinox.p2.name' value='%Plugin.name'/>
+ <property name='org.eclipse.equinox.p2.provider' value='%Plugin.providerName'/>
</properties>
- <provides size='1'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='Field_Assist_Example.feature.group' version='2.0.0'/>
+ <provides size='5'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui.examples.readmetool' version='3.3.0.200810301029'/>
+ <provided namespace='osgi.bundle' name='org.eclipse.ui.examples.readmetool' version='3.3.0.200810301029'/>
+ <provided namespace='java.package' name='org.eclipse.ui.examples.readmetool' version='0.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.localization' name='df_LT' version='1.0.0'/>
</provides>
- <requires size='2'>
- <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui.examples.fieldassist' range='[1.1.0,1.1.0]'/>
- <required namespace='org.eclipse.equinox.p2.iu' name='Field_Assist_Example.feature.jar' range='[2.0.0,2.0.0]'>
- <filter>
- (org.eclipse.update.install.features=true)
- </filter>
- </required>
+ <requires size='9'>
+ <required namespace='osgi.bundle' name='org.eclipse.ui' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.core.resources' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.core.runtime' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.ui.views' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.ui.ide' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.jface.text' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.text' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.ui.workbench.texteditor' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.ui.editors' range='0.0.0'/>
</requires>
- <touchpoint id='null' version='0.0.0'/>
- <licenses size='1'>
- <license uri='http://www.example.com/license' url='http://www.example.com/license'>
- We can&apos;t make up our mind on this license agreement!
- </license>
- </licenses>
- <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
- Copyright 2008
- </copyright>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle' id='org.eclipse.ui.examples.readmetool' version='3.3.0.200810301029'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='2'>
+ <instruction key='manifest'>
+ Bundle-ManifestVersion: 2&#xA;Export-Package: org.eclipse.ui.examples.readmetool&#xA;Bundle-Localization: plugin&#xA;Require-Bundle: org.eclipse.ui,org.eclipse.core.resources,org.eclipse.core.runtime,org.eclipse.ui.views,org.eclipse.ui.ide,org.eclipse.jface.text,org.eclipse.text,org.eclipse.ui.workbench.texteditor,org.eclipse.ui.editors&#xA;Bundle-Activator: org.eclipse.ui.examples.readmetool.ReadmePlugin&#xA;Bundle-Name: %Plugin.name&#xA;Bundle-Version: 3.3.0.200810301029&#xA;Bundle-Vendor: %Plugin.providerName&#xA;Bundle-SymbolicName: org.eclipse.ui.examples.readmetool; singleton:=true&#xA;Bundle-ClassPath: readmetool.jar&#xA;Manifest-Version: 1.0&#xA;Eclipse-LazyStart: true
+ </instruction>
+ <instruction key='zipped'>
+ true
+ </instruction>
+ </instructions>
+ </touchpointData>
</unit>
- <unit id='tooling.org.eclipse.update.feature.default' version='1.0.0' singleton='false'>
+ <unit id='tooling.source.default' version='1.0.0' singleton='false'>
<hostRequirements size='1'>
- <required namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='source' range='0.0.0' optional='true' multiple='true' greedy='false'/>
</hostRequirements>
<properties size='1'>
<property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
</properties>
<provides size='2'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='tooling.org.eclipse.update.feature.default' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='tooling.source.default' version='1.0.0'/>
<provided namespace='org.eclipse.equinox.p2.flavor' name='tooling' version='1.0.0'/>
</provides>
<requires size='1'>
- <required namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='source' range='0.0.0' optional='true' multiple='true' greedy='false'/>
</requires>
- <filter>
- (org.eclipse.update.install.features=true)
- </filter>
<touchpoint id='null' version='0.0.0'/>
<touchpointData size='1'>
<instructions size='2'>
<instruction key='install'>
- installFeature(feature:${artifact},featureId:default,featureVersion:default)
+ addSourceBundle(bundle:${artifact})
</instruction>
<instruction key='uninstall'>
- uninstallFeature(feature:${artifact},featureId:default,featureVersion:default)
+ removeSourceBundle(bundle:${artifact})
</instruction>
</instructions>
</touchpointData>
@@ -317,20 +221,49 @@
</instructions>
</touchpointData>
</unit>
- <unit id='Jobs_Example.feature.group' version='1.0.0' singleton='false'>
- <update id='Jobs_Example.feature.group' range='[0.0.0,1.0.0)' severity='0'/>
+ <unit id='tooling.org.eclipse.update.feature.default' version='1.0.0' singleton='false'>
+ <hostRequirements size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ </hostRequirements>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
+ </properties>
+ <provides size='2'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='tooling.org.eclipse.update.feature.default' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.flavor' name='tooling' version='1.0.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ </requires>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ <touchpoint id='null' version='0.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='2'>
+ <instruction key='install'>
+ installFeature(feature:${artifact},featureId:default,featureVersion:default)
+ </instruction>
+ <instruction key='uninstall'>
+ uninstallFeature(feature:${artifact},featureId:default,featureVersion:default)
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='Readme_Example.feature.group' version='1.0.0' singleton='false'>
+ <update id='Readme_Example.feature.group' range='[0.0.0,1.0.0)' severity='0'/>
<properties size='4'>
- <property name='org.eclipse.equinox.p2.name' value='Jobs_Example Feature'/>
+ <property name='org.eclipse.equinox.p2.name' value='Readme_Example Feature'/>
<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'/>
</properties>
<provides size='1'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='Jobs_Example.feature.group' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='Readme_Example.feature.group' version='1.0.0'/>
</provides>
<requires size='2'>
- <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui.examples.job' range='[3.0.0,3.0.0]'/>
- <required namespace='org.eclipse.equinox.p2.iu' name='Jobs_Example.feature.jar' range='[1.0.0,1.0.0]'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui.examples.readmetool' range='[3.3.0.200810301029,3.3.0.200810301029]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='Readme_Example.feature.jar' range='[1.0.0,1.0.0]'>
<filter>
(org.eclipse.update.install.features=true)
</filter>
@@ -346,69 +279,114 @@
[Enter Copyright Description here.]
</copyright>
</unit>
- <unit id='A' version='1.0.0' singleton='false'>
- <update id='RCP_Browser_Example.feature.group' range='[0.0.0,1.0.0)' severity='0'/>
+ <unit id='org.eclipse.ui.examples.undo' version='3.2.100.200901051626'>
+ <update id='org.eclipse.ui.examples.undo' range='[0.0.0,3.2.100.200901051626)' severity='0'/>
<properties size='4'>
- <property name='org.eclipse.equinox.p2.name' value='RCP_Browser_Example Feature'/>
- <property name='org.eclipse.equinox.p2.description' value='Browser Example, but it has dependencies that it won&apos;t find.'/>
- <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.Plugin.name' value='Undo Example'/>
+ <property name='df_LT.Plugin.providerName' value='Eclipse.org'/>
+ <property name='org.eclipse.equinox.p2.name' value='%Plugin.name'/>
+ <property name='org.eclipse.equinox.p2.provider' value='%Plugin.providerName'/>
</properties>
- <provides size='1'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='A' version='1.0.0'/>
+ <provides size='4'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui.examples.undo' version='3.2.100.200901051626'/>
+ <provided namespace='osgi.bundle' name='org.eclipse.ui.examples.undo' version='3.2.100.200901051626'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.localization' name='df_LT' version='1.0.0'/>
</provides>
- <requires size='1'>
- <required namespace='org.eclipse.equinox.p2.iu' name='B' range='[1.0.0,2.0.0)'/>
+ <requires size='3'>
+ <required namespace='osgi.bundle' name='org.eclipse.ui' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.core.runtime' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.jface.text' range='0.0.0'/>
</requires>
- <touchpoint id='null' version='0.0.0'/>
- <licenses size='1'>
- <license uri='http://www.example.com/license' url='http://www.example.com/license'>
- [Enter License Description here.]
- </license>
- </licenses>
- <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
- [Enter Copyright Description here.]
- </copyright>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle' id='org.eclipse.ui.examples.undo' version='3.2.100.200901051626'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-ManifestVersion: 2&#xA;Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime,org.eclipse.jface.text&#xA;Bundle-Activator: org.eclipse.ui.examples.undo.UndoPlugin&#xA;Manifest-Version: 1.0&#xA;Bundle-Version: 3.2.100.200901051626&#xA;Bundle-SymbolicName: org.eclipse.ui.examples.undo; singleton:=true&#xA;Bundle-Localization: plugin&#xA;Bundle-ActivationPolicy: lazy&#xA;Bundle-Name: %Plugin.name&#xA;Bundle-Vendor: %Plugin.providerName
+ </instruction>
+ </instructions>
+ </touchpointData>
</unit>
- <unit id='test.bundle' version='1.0.0' singleton='false'>
- <update id='test.bundle' range='[0.0.0,1.0.0)' severity='0'/>
+ <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.name' value='Bundle Plug-in'/>
+ <property name='org.eclipse.equinox.p2.name' value='Fragment Fragment'/>
</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'/>
+ <provides size='4'>
+ <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'/>
+ <provided namespace='osgi.fragment' name='test.bundle' version='1.0.0'/>
</provides>
<requires size='1'>
- <required namespace='java.package' name='org.osgi.framework' range='1.3.0'/>
+ <required namespace='osgi.bundle' name='test.bundle' range='1.0.0'/>
</requires>
<artifacts size='1'>
- <artifact classifier='osgi.bundle' id='test.bundle' version='1.0.0'/>
+ <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'>
- Bundle-ManifestVersion: 2&#xA;Import-Package: org.osgi.framework;version=&quot;1.3.0&quot;&#xA;Bundle-Version: 1.0.0&#xA;Bundle-Activator: test.bundle.Activator&#xA;Manifest-Version: 1.0&#xA;Bundle-SymbolicName: test.bundle&#xA;Bundle-Name: Bundle Plug-in&#xA;Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+ Bundle-Name: Fragment Fragment&#xA;Bundle-Version: 1.0.0&#xA;Bundle-SymbolicName: test.fragment&#xA;Manifest-Version: 1.0&#xA;Fragment-Host: test.bundle;bundle-version=&quot;1.0.0&quot;&#xA;Bundle-ManifestVersion: 2&#xA;Bundle-RequiredExecutionEnvironment: JavaSE-1.6
</instruction>
</instructions>
</touchpointData>
</unit>
- <unit id='Multi_Page_Editor_Example.feature.group' version='1.0.0' singleton='false'>
- <update id='Multi_Page_Editor_Example.feature.group' range='[0.0.0,1.0.0)' severity='0'/>
+ <unit id='test.feature.feature.jar' version='1.0.0'>
+ <update id='test.feature.feature.jar' range='[0.0.0,1.0.0)' severity='0'/>
<properties size='4'>
- <property name='org.eclipse.equinox.p2.name' value='Multi_Page_Editor_Example Feature'/>
+ <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='df_LT.featurename' value='j the feature'/>
+ </properties>
+ <provides size='4'>
+ <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'/>
+ <provided namespace='org.eclipse.equinox.p2.localization' name='df_LT' 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 uri='http://www.example.com/license' url='http://www.example.com/license'>
+ [Enter License Description here.]
+ </license>
+ </licenses>
+ <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
+ [Enter Copyright Description here.]
+ </copyright>
+ </unit>
+ <unit id='Jobs_Example.feature.group' version='1.0.0' singleton='false'>
+ <update id='Jobs_Example.feature.group' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='4'>
+ <property name='org.eclipse.equinox.p2.name' value='Jobs_Example Feature'/>
<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'/>
</properties>
<provides size='1'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='Multi_Page_Editor_Example.feature.group' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='Jobs_Example.feature.group' version='1.0.0'/>
</provides>
<requires size='2'>
- <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui.examples.multipageeditor' range='[3.2.100.200810301029,3.2.100.200810301029]'/>
- <required namespace='org.eclipse.equinox.p2.iu' name='Multi_Page_Editor_Example.feature.jar' range='[1.0.0,1.0.0]'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui.examples.job' range='[3.0.0,3.0.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='Jobs_Example.feature.jar' range='[1.0.0,1.0.0]'>
<filter>
(org.eclipse.update.install.features=true)
</filter>
@@ -424,44 +402,41 @@
[Enter Copyright Description here.]
</copyright>
</unit>
- <unit id='config.a.jre' version='1.6.0' singleton='false'>
- <hostRequirements size='1'>
- <required namespace='org.eclipse.equinox.p2.iu' name='a.jre' range='1.6.0'/>
- </hostRequirements>
- <properties size='1'>
- <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
+ <unit id='Examples' version='0.0.0'>
+ <properties size='3'>
+ <property name='org.eclipse.equinox.p2.name' value='Platform Examples'/>
+ <property name='org.eclipse.equinox.p2.description' value='Some of the examples'/>
+ <property name='org.eclipse.equinox.p2.type.category' value='true'/>
</properties>
<provides size='1'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='config.a.jre' version='1.6.0'/>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='Examples' version='0.0.0'/>
</provides>
- <requires size='1'>
- <required namespace='org.eclipse.equinox.p2.iu' name='a.jre' range='1.6.0'/>
+ <requires size='5'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='Multi_Page_Editor_Example.feature.group' range='[1.0.0,1.0.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='Field_Assist_Example.feature.group' range='[2.0.0,2.0.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='Field_Assist_Example.feature.group' range='[1.0.1,1.0.1]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='Field_Assist_Example.feature.group' range='[1.0.0,1.0.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='Readme_Example.feature.group' range='[1.0.0,1.0.0]'/>
</requires>
- <touchpoint id='org.eclipse.equinox.p2.native' version='1.0.0'/>
- <touchpointData size='1'>
- <instructions size='1'>
- <instruction key='install'>
-
- </instruction>
- </instructions>
- </touchpointData>
+ <touchpoint id='null' version='0.0.0'/>
</unit>
- <unit id='Field_Assist_Example.feature.jar' version='2.0.0'>
- <update id='Field_Assist_Example.feature.jar' range='[0.0.0,2.0.0)' severity='0'/>
- <properties size='2'>
- <property name='org.eclipse.equinox.p2.name' value='Field_Assist_Example Feature'/>
- <property name='org.eclipse.equinox.p2.description' value='Even better than the last one!'/>
+ <unit id='Jobs_Example.feature.jar' version='1.0.0'>
+ <update id='Jobs_Example.feature.jar' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='3'>
+ <property name='org.eclipse.equinox.p2.name' value='Jobs_Example Feature'/>
+ <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'/>
</properties>
<provides size='3'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='Field_Assist_Example.feature.jar' version='2.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='Jobs_Example.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='Field_Assist_Example' version='2.0.0'/>
+ <provided namespace='org.eclipse.update.feature' name='Jobs_Example' version='1.0.0'/>
</provides>
<filter>
(org.eclipse.update.install.features=true)
</filter>
<artifacts size='1'>
- <artifact classifier='org.eclipse.update.feature' id='Field_Assist_Example' version='2.0.0'/>
+ <artifact classifier='org.eclipse.update.feature' id='Jobs_Example' version='1.0.0'/>
</artifacts>
<touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
<touchpointData size='1'>
@@ -473,11 +448,11 @@
</touchpointData>
<licenses size='1'>
<license uri='http://www.example.com/license' url='http://www.example.com/license'>
- We can&apos;t make up our mind on this license agreement!
+ [Enter License Description here.]
</license>
</licenses>
<copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
- Copyright 2008
+ [Enter Copyright Description here.]
</copyright>
</unit>
<unit id='org.eclipse.ui.examples.rcp.browser' version='3.3.0.200810301035'>
@@ -513,31 +488,68 @@
</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.name' value='Fragment Fragment'/>
+ <unit id='Field_Assist_Example.feature.jar' version='1.0.1'>
+ <update id='Field_Assist_Example.feature.jar' range='[0.0.0,1.0.1)' severity='0'/>
+ <properties size='2'>
+ <property name='org.eclipse.equinox.p2.name' value='Field_Assist_Example Feature'/>
+ <property name='org.eclipse.equinox.p2.description' value='New and improved descriptions, tougher licenses!'/>
</properties>
- <provides size='4'>
- <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'/>
- <provided namespace='osgi.fragment' name='test.bundle' version='1.0.0'/>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='Field_Assist_Example.feature.jar' version='1.0.1'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' version='1.0.0'/>
+ <provided namespace='org.eclipse.update.feature' name='Field_Assist_Example' version='1.0.1'/>
</provides>
- <requires size='1'>
- <required namespace='osgi.bundle' name='test.bundle' range='1.0.0'/>
- </requires>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
<artifacts size='1'>
- <artifact classifier='osgi.bundle' id='test.fragment' version='1.0.0'/>
+ <artifact classifier='org.eclipse.update.feature' id='Field_Assist_Example' version='1.0.1'/>
</artifacts>
<touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
<touchpointData size='1'>
<instructions size='1'>
- <instruction key='manifest'>
- Bundle-Name: Fragment Fragment&#xA;Bundle-Version: 1.0.0&#xA;Bundle-SymbolicName: test.fragment&#xA;Manifest-Version: 1.0&#xA;Fragment-Host: test.bundle;bundle-version=&quot;1.0.0&quot;&#xA;Bundle-ManifestVersion: 2&#xA;Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+ <instruction key='zipped'>
+ true
</instruction>
</instructions>
</touchpointData>
+ <licenses size='1'>
+ <license uri='http://www.example.com/license' url='http://www.example.com/license'>
+ This is a unique license agreement, new to this version
+ </license>
+ </licenses>
+ <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
+ Copyright 2008
+ </copyright>
+ </unit>
+ <unit id='Better Undo_Example.feature.group' version='1.0.2' singleton='false'>
+ <update id='Better Undo_Example.feature.group' range='[0.0.0,1.0.2)' severity='0'/>
+ <properties size='4'>
+ <property name='org.eclipse.equinox.p2.name' value='Better Undo Example'/>
+ <property name='org.eclipse.equinox.p2.description' value='This feature should not be visible, as it is not categorized and&#xA; is not referenced in the site.xml'/>
+ <property name='org.eclipse.equinox.p2.description.url' value='http://www.example.com/description'/>
+ <property name='org.eclipse.equinox.p2.type.group' value='true'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='Better Undo_Example.feature.group' version='1.0.2'/>
+ </provides>
+ <requires size='2'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui.examples.undo' range='[3.2.100.200901051626,3.2.100.200901051626]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='Better Undo_Example.feature.jar' range='[1.0.2,1.0.2]'>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ </required>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ <licenses size='1'>
+ <license uri='http://www.example.com/license' url='http://www.example.com/license'>
+ This feature should not be visible, as it is not categorized and&#xA; is not referenced in the site.xml
+ </license>
+ </licenses>
+ <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
+ This feature should not be visible, as it is not categorized and&#xA; is not referenced in the site.xml
+ </copyright>
</unit>
<unit id='org.eclipse.ui.examples.undo' version='3.2.100.200810301029'>
<update id='org.eclipse.ui.examples.undo' range='[0.0.0,3.2.100.200810301029)' severity='0'/>
@@ -570,23 +582,20 @@
</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'/>
+ <unit id='Multi_Page_Editor_Example.feature.group' version='1.0.0' singleton='false'>
+ <update id='Multi_Page_Editor_Example.feature.group' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='4'>
+ <property name='org.eclipse.equinox.p2.name' value='Multi_Page_Editor_Example Feature'/>
<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 size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='Multi_Page_Editor_Example.feature.group' 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]'>
+ <requires size='2'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui.examples.multipageeditor' range='[3.2.100.200810301029,3.2.100.200810301029]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='Multi_Page_Editor_Example.feature.jar' range='[1.0.0,1.0.0]'>
<filter>
(org.eclipse.update.install.features=true)
</filter>
@@ -602,89 +611,15 @@
[Enter Copyright Description here.]
</copyright>
</unit>
- <unit id='Field_Assist_Example.feature.jar' version='1.0.0'>
- <update id='Field_Assist_Example.feature.jar' range='[0.0.0,1.0.0)' severity='0'/>
- <properties size='3'>
- <property name='org.eclipse.equinox.p2.name' value='Field_Assist_Example Feature'/>
- <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'/>
- </properties>
- <provides size='3'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='Field_Assist_Example.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='Field_Assist_Example' version='1.0.0'/>
- </provides>
- <filter>
- (org.eclipse.update.install.features=true)
- </filter>
- <artifacts size='1'>
- <artifact classifier='org.eclipse.update.feature' id='Field_Assist_Example' 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 uri='http://www.example.com/license' url='http://www.example.com/license'>
- [Enter License Description here.]
- </license>
- </licenses>
- <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
- [Enter Copyright Description here.]
- </copyright>
- </unit>
- <unit id='Undo_Example.feature.jar' version='1.0.0'>
- <update id='Undo_Example.feature.jar' range='[0.0.0,1.0.0)' severity='0'/>
- <properties size='3'>
- <property name='org.eclipse.equinox.p2.name' value='Undo_Example Feature'/>
- <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'/>
- </properties>
- <provides size='3'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='Undo_Example.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='Undo_Example' version='1.0.0'/>
- </provides>
- <filter>
- (org.eclipse.update.install.features=true)
- </filter>
- <artifacts size='1'>
- <artifact classifier='org.eclipse.update.feature' id='Undo_Example' 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 uri='http://www.example.com/license' url='http://www.example.com/license'>
- [Enter License Description here.]
- </license>
- </licenses>
- <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
- [Enter Copyright Description here.]
- </copyright>
- </unit>
- <unit id='More Examples' version='0.0.0'>
- <properties size='3'>
- <property name='org.eclipse.equinox.p2.name' value='More Fine Examples'/>
- <property name='org.eclipse.equinox.p2.description' value='This is another category'/>
- <property name='org.eclipse.equinox.p2.type.category' value='true'/>
+ <unit id='test.fragment.translated_host_properties' version='1.0.0'>
+ <hostRequirements size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='test.bundle' range='1.0.0' greedy='false'/>
+ </hostRequirements>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
</properties>
- <provides size='1'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='More Examples' version='0.0.0'/>
- </provides>
- <requires size='3'>
- <required namespace='org.eclipse.equinox.p2.iu' name='RCP_Browser_Example.feature.group' range='[1.0.0,1.0.0]'/>
- <required namespace='org.eclipse.equinox.p2.iu' name='Jobs_Example.feature.group' range='[1.0.0,1.0.0]'/>
- <required namespace='org.eclipse.equinox.p2.iu' name='Undo_Example.feature.group' range='[1.0.0,1.0.0]'/>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='test.bundle' range='1.0.0' greedy='false'/>
</requires>
<touchpoint id='null' version='0.0.0'/>
</unit>
@@ -716,58 +651,109 @@
</instructions>
</touchpointData>
</unit>
- <unit id='RCP_Browser_Example.feature.jar' version='1.0.0'>
- <update id='RCP_Browser_Example.feature.jar' range='[0.0.0,1.0.0)' severity='0'/>
- <properties size='3'>
- <property name='org.eclipse.equinox.p2.name' value='RCP_Browser_Example Feature'/>
- <property name='org.eclipse.equinox.p2.description' value='Browser Example, but it has dependencies that it won&apos;t find.'/>
+ <unit id='Field_Assist_Example.feature.group' version='1.0.0' singleton='false'>
+ <update id='Field_Assist_Example.feature.group' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='4'>
+ <property name='org.eclipse.equinox.p2.name' value='Field_Assist_Example Feature'/>
+ <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'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='Field_Assist_Example.feature.group' version='1.0.0'/>
+ </provides>
+ <requires size='2'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui.examples.fieldassist' range='[1.1.0,1.1.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='Field_Assist_Example.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 uri='http://www.example.com/license' url='http://www.example.com/license'>
+ [Enter License Description here.]
+ </license>
+ </licenses>
+ <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
+ [Enter Copyright Description here.]
+ </copyright>
+ </unit>
+ <unit id='tooling.osgi.bundle.default' version='1.0.0' singleton='false'>
+ <hostRequirements size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' range='0.0.0' multiple='true' greedy='false'/>
+ </hostRequirements>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
+ </properties>
+ <provides size='2'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='tooling.osgi.bundle.default' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.flavor' name='tooling' version='1.0.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' range='0.0.0' multiple='true' greedy='false'/>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='4'>
+ <instruction key='install'>
+ installBundle(bundle:${artifact})
+ </instruction>
+ <instruction key='uninstall'>
+ uninstallBundle(bundle:${artifact})
+ </instruction>
+ <instruction key='unconfigure'>
+
+ </instruction>
+ <instruction key='configure'>
+ setStartLevel(startLevel:4);
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </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.name' value='Bundle Plug-in'/>
</properties>
<provides size='3'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='RCP_Browser_Example.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='RCP_Browser_Example' version='1.0.0'/>
+ <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>
- <filter>
- (org.eclipse.update.install.features=true)
- </filter>
+ <requires size='1'>
+ <required namespace='java.package' name='org.osgi.framework' range='1.3.0'/>
+ </requires>
<artifacts size='1'>
- <artifact classifier='org.eclipse.update.feature' id='RCP_Browser_Example' version='1.0.0'/>
+ <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='zipped'>
- true
+ <instruction key='manifest'>
+ Bundle-ManifestVersion: 2&#xA;Import-Package: org.osgi.framework;version=&quot;1.3.0&quot;&#xA;Bundle-Version: 1.0.0&#xA;Bundle-Activator: test.bundle.Activator&#xA;Manifest-Version: 1.0&#xA;Bundle-SymbolicName: test.bundle&#xA;Bundle-Name: Bundle Plug-in&#xA;Bundle-RequiredExecutionEnvironment: JavaSE-1.6
</instruction>
</instructions>
</touchpointData>
- <licenses size='1'>
- <license uri='http://www.example.com/license' url='http://www.example.com/license'>
- [Enter License Description here.]
- </license>
- </licenses>
- <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
- [Enter Copyright Description here.]
- </copyright>
</unit>
- <unit id='Multi_Page_Editor_Example.feature.jar' version='1.0.0'>
- <update id='Multi_Page_Editor_Example.feature.jar' range='[0.0.0,1.0.0)' severity='0'/>
+ <unit id='Field_Assist_Example.feature.jar' version='1.0.0'>
+ <update id='Field_Assist_Example.feature.jar' range='[0.0.0,1.0.0)' severity='0'/>
<properties size='3'>
- <property name='org.eclipse.equinox.p2.name' value='Multi_Page_Editor_Example Feature'/>
+ <property name='org.eclipse.equinox.p2.name' value='Field_Assist_Example Feature'/>
<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'/>
</properties>
<provides size='3'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='Multi_Page_Editor_Example.feature.jar' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='Field_Assist_Example.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='Multi_Page_Editor_Example' version='1.0.0'/>
+ <provided namespace='org.eclipse.update.feature' name='Field_Assist_Example' version='1.0.0'/>
</provides>
<filter>
(org.eclipse.update.install.features=true)
</filter>
<artifacts size='1'>
- <artifact classifier='org.eclipse.update.feature' id='Multi_Page_Editor_Example' version='1.0.0'/>
+ <artifact classifier='org.eclipse.update.feature' id='Field_Assist_Example' version='1.0.0'/>
</artifacts>
<touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
<touchpointData size='1'>
@@ -786,20 +772,20 @@
[Enter Copyright Description here.]
</copyright>
</unit>
- <unit id='Better Undo_Example.feature.group' version='1.0.2' singleton='false'>
- <update id='Better Undo_Example.feature.group' range='[0.0.0,1.0.2)' severity='0'/>
+ <unit id='Undo_Example.feature.group' version='1.0.0' singleton='false'>
+ <update id='Undo_Example.feature.group' range='[0.0.0,1.0.0)' severity='0'/>
<properties size='4'>
- <property name='org.eclipse.equinox.p2.name' value='Better Undo Example'/>
- <property name='org.eclipse.equinox.p2.description' value='This feature should not be visible, as it is not categorized and&#xA; is not referenced in the site.xml'/>
+ <property name='org.eclipse.equinox.p2.name' value='Undo_Example Feature'/>
+ <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'/>
</properties>
<provides size='1'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='Better Undo_Example.feature.group' version='1.0.2'/>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='Undo_Example.feature.group' version='1.0.0'/>
</provides>
<requires size='2'>
- <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui.examples.undo' range='[3.2.100.200901051626,3.2.100.200901051626]'/>
- <required namespace='org.eclipse.equinox.p2.iu' name='Better Undo_Example.feature.jar' range='[1.0.2,1.0.2]'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui.examples.undo' range='[3.2.100.200810301029,3.2.100.200810301029]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='Undo_Example.feature.jar' range='[1.0.0,1.0.0]'>
<filter>
(org.eclipse.update.install.features=true)
</filter>
@@ -808,44 +794,13 @@
<touchpoint id='null' version='0.0.0'/>
<licenses size='1'>
<license uri='http://www.example.com/license' url='http://www.example.com/license'>
- This feature should not be visible, as it is not categorized and&#xA; is not referenced in the site.xml
+ [Enter License Description here.]
</license>
</licenses>
<copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
- This feature should not be visible, as it is not categorized and&#xA; is not referenced in the site.xml
+ [Enter Copyright Description here.]
</copyright>
</unit>
- <unit id='org.eclipse.ui.examples.undo' version='3.2.100.200901051626'>
- <update id='org.eclipse.ui.examples.undo' range='[0.0.0,3.2.100.200901051626)' severity='0'/>
- <properties size='4'>
- <property name='df_LT.Plugin.name' value='Undo Example'/>
- <property name='df_LT.Plugin.providerName' value='Eclipse.org'/>
- <property name='org.eclipse.equinox.p2.name' value='%Plugin.name'/>
- <property name='org.eclipse.equinox.p2.provider' value='%Plugin.providerName'/>
- </properties>
- <provides size='4'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui.examples.undo' version='3.2.100.200901051626'/>
- <provided namespace='osgi.bundle' name='org.eclipse.ui.examples.undo' version='3.2.100.200901051626'/>
- <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
- <provided namespace='org.eclipse.equinox.p2.localization' name='df_LT' version='1.0.0'/>
- </provides>
- <requires size='3'>
- <required namespace='osgi.bundle' name='org.eclipse.ui' range='0.0.0'/>
- <required namespace='osgi.bundle' name='org.eclipse.core.runtime' range='0.0.0'/>
- <required namespace='osgi.bundle' name='org.eclipse.jface.text' range='0.0.0'/>
- </requires>
- <artifacts size='1'>
- <artifact classifier='osgi.bundle' id='org.eclipse.ui.examples.undo' version='3.2.100.200901051626'/>
- </artifacts>
- <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
- <touchpointData size='1'>
- <instructions size='1'>
- <instruction key='manifest'>
- Bundle-ManifestVersion: 2&#xA;Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime,org.eclipse.jface.text&#xA;Bundle-Activator: org.eclipse.ui.examples.undo.UndoPlugin&#xA;Manifest-Version: 1.0&#xA;Bundle-Version: 3.2.100.200901051626&#xA;Bundle-SymbolicName: org.eclipse.ui.examples.undo; singleton:=true&#xA;Bundle-Localization: plugin&#xA;Bundle-ActivationPolicy: lazy&#xA;Bundle-Name: %Plugin.name&#xA;Bundle-Vendor: %Plugin.providerName
- </instruction>
- </instructions>
- </touchpointData>
- </unit>
<unit id='a.jre' version='1.6.0' singleton='false'>
<provides size='157'>
<provided namespace='org.eclipse.equinox.p2.iu' name='a.jre' version='1.6.0'/>
@@ -1008,22 +963,51 @@
</provides>
<touchpoint id='org.eclipse.equinox.p2.native' version='1.0.0'/>
</unit>
- <unit id='Field_Assist_Example.feature.jar' version='1.0.1'>
- <update id='Field_Assist_Example.feature.jar' range='[0.0.0,1.0.1)' severity='0'/>
- <properties size='2'>
+ <unit id='Field_Assist_Example.feature.group' version='2.0.0' singleton='false'>
+ <update id='Field_Assist_Example.feature.group' range='[0.0.0,2.0.0)' severity='0'/>
+ <properties size='3'>
<property name='org.eclipse.equinox.p2.name' value='Field_Assist_Example Feature'/>
- <property name='org.eclipse.equinox.p2.description' value='New and improved descriptions, tougher licenses!'/>
+ <property name='org.eclipse.equinox.p2.description' value='Even better than the last one!'/>
+ <property name='org.eclipse.equinox.p2.type.group' value='true'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='Field_Assist_Example.feature.group' version='2.0.0'/>
+ </provides>
+ <requires size='2'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui.examples.fieldassist' range='[1.1.0,1.1.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='Field_Assist_Example.feature.jar' range='[2.0.0,2.0.0]'>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ </required>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ <licenses size='1'>
+ <license uri='http://www.example.com/license' url='http://www.example.com/license'>
+ We can&apos;t make up our mind on this license agreement!
+ </license>
+ </licenses>
+ <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
+ Copyright 2008
+ </copyright>
+ </unit>
+ <unit id='Better Undo_Example.feature.jar' version='1.0.2'>
+ <update id='Better Undo_Example.feature.jar' range='[0.0.0,1.0.2)' severity='0'/>
+ <properties size='3'>
+ <property name='org.eclipse.equinox.p2.name' value='Better Undo Example'/>
+ <property name='org.eclipse.equinox.p2.description' value='This feature should not be visible, as it is not categorized and&#xA; is not referenced in the site.xml'/>
+ <property name='org.eclipse.equinox.p2.description.url' value='http://www.example.com/description'/>
</properties>
<provides size='3'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='Field_Assist_Example.feature.jar' version='1.0.1'/>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='Better Undo_Example.feature.jar' version='1.0.2'/>
<provided namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' version='1.0.0'/>
- <provided namespace='org.eclipse.update.feature' name='Field_Assist_Example' version='1.0.1'/>
+ <provided namespace='org.eclipse.update.feature' name='Better Undo_Example' version='1.0.2'/>
</provides>
<filter>
(org.eclipse.update.install.features=true)
</filter>
<artifacts size='1'>
- <artifact classifier='org.eclipse.update.feature' id='Field_Assist_Example' version='1.0.1'/>
+ <artifact classifier='org.eclipse.update.feature' id='Better Undo_Example' version='1.0.2'/>
</artifacts>
<touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
<touchpointData size='1'>
@@ -1035,11 +1019,46 @@
</touchpointData>
<licenses size='1'>
<license uri='http://www.example.com/license' url='http://www.example.com/license'>
- This is a unique license agreement, new to this version
+ This feature should not be visible, as it is not categorized and&#xA; is not referenced in the site.xml
</license>
</licenses>
<copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
- Copyright 2008
+ This feature should not be visible, as it is not categorized and&#xA; is not referenced in the site.xml
+ </copyright>
+ </unit>
+ <unit id='Readme_Example.feature.jar' version='1.0.0'>
+ <update id='Readme_Example.feature.jar' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='3'>
+ <property name='org.eclipse.equinox.p2.name' value='Readme_Example Feature'/>
+ <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'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='Readme_Example.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='Readme_Example' version='1.0.0'/>
+ </provides>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ <artifacts size='1'>
+ <artifact classifier='org.eclipse.update.feature' id='Readme_Example' 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 uri='http://www.example.com/license' url='http://www.example.com/license'>
+ [Enter License Description here.]
+ </license>
+ </licenses>
+ <copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
+ [Enter Copyright Description here.]
</copyright>
</unit>
<unit id='Field_Assist_Example.feature.group' version='1.0.1' singleton='false'>
@@ -1070,102 +1089,38 @@
Copyright 2008
</copyright>
</unit>
- <unit id='org.eclipse.ui.examples.readmetool' version='3.3.0.200810301029'>
- <update id='org.eclipse.ui.examples.readmetool' range='[0.0.0,3.3.0.200810301029)' severity='0'/>
- <properties size='4'>
- <property name='df_LT.Plugin.name' value='Readme File Editing Tool'/>
- <property name='df_LT.Plugin.providerName' value='Eclipse.org'/>
- <property name='org.eclipse.equinox.p2.name' value='%Plugin.name'/>
- <property name='org.eclipse.equinox.p2.provider' value='%Plugin.providerName'/>
- </properties>
- <provides size='5'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui.examples.readmetool' version='3.3.0.200810301029'/>
- <provided namespace='osgi.bundle' name='org.eclipse.ui.examples.readmetool' version='3.3.0.200810301029'/>
- <provided namespace='java.package' name='org.eclipse.ui.examples.readmetool' version='0.0.0'/>
- <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
- <provided namespace='org.eclipse.equinox.p2.localization' name='df_LT' version='1.0.0'/>
- </provides>
- <requires size='9'>
- <required namespace='osgi.bundle' name='org.eclipse.ui' range='0.0.0'/>
- <required namespace='osgi.bundle' name='org.eclipse.core.resources' range='0.0.0'/>
- <required namespace='osgi.bundle' name='org.eclipse.core.runtime' range='0.0.0'/>
- <required namespace='osgi.bundle' name='org.eclipse.ui.views' range='0.0.0'/>
- <required namespace='osgi.bundle' name='org.eclipse.ui.ide' range='0.0.0'/>
- <required namespace='osgi.bundle' name='org.eclipse.jface.text' range='0.0.0'/>
- <required namespace='osgi.bundle' name='org.eclipse.text' range='0.0.0'/>
- <required namespace='osgi.bundle' name='org.eclipse.ui.workbench.texteditor' range='0.0.0'/>
- <required namespace='osgi.bundle' name='org.eclipse.ui.editors' range='0.0.0'/>
- </requires>
- <artifacts size='1'>
- <artifact classifier='osgi.bundle' id='org.eclipse.ui.examples.readmetool' version='3.3.0.200810301029'/>
- </artifacts>
- <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
- <touchpointData size='1'>
- <instructions size='2'>
- <instruction key='manifest'>
- Bundle-ManifestVersion: 2&#xA;Export-Package: org.eclipse.ui.examples.readmetool&#xA;Bundle-Localization: plugin&#xA;Require-Bundle: org.eclipse.ui,org.eclipse.core.resources,org.eclipse.core.runtime,org.eclipse.ui.views,org.eclipse.ui.ide,org.eclipse.jface.text,org.eclipse.text,org.eclipse.ui.workbench.texteditor,org.eclipse.ui.editors&#xA;Bundle-Activator: org.eclipse.ui.examples.readmetool.ReadmePlugin&#xA;Bundle-Name: %Plugin.name&#xA;Bundle-Version: 3.3.0.200810301029&#xA;Bundle-Vendor: %Plugin.providerName&#xA;Bundle-SymbolicName: org.eclipse.ui.examples.readmetool; singleton:=true&#xA;Bundle-ClassPath: readmetool.jar&#xA;Manifest-Version: 1.0&#xA;Eclipse-LazyStart: true
- </instruction>
- <instruction key='zipped'>
- true
- </instruction>
- </instructions>
- </touchpointData>
- </unit>
- <unit id='test.fragment.translated_host_properties' version='1.0.0'>
- <hostRequirements size='1'>
- <required namespace='org.eclipse.equinox.p2.iu' name='test.bundle' range='1.0.0' greedy='false'/>
- </hostRequirements>
- <properties size='1'>
- <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
- </properties>
- <requires size='1'>
- <required namespace='org.eclipse.equinox.p2.iu' name='test.bundle' range='1.0.0' greedy='false'/>
- </requires>
- <touchpoint id='null' version='0.0.0'/>
- </unit>
- <unit id='tooling.source.default' version='1.0.0' singleton='false'>
- <hostRequirements size='1'>
- <required namespace='org.eclipse.equinox.p2.eclipse.type' name='source' range='0.0.0' optional='true' multiple='true' greedy='false'/>
- </hostRequirements>
- <properties size='1'>
- <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
+ <unit id='More Examples' version='0.0.0'>
+ <properties size='3'>
+ <property name='org.eclipse.equinox.p2.name' value='More Fine Examples'/>
+ <property name='org.eclipse.equinox.p2.description' value='This is another category'/>
+ <property name='org.eclipse.equinox.p2.type.category' value='true'/>
</properties>
- <provides size='2'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='tooling.source.default' version='1.0.0'/>
- <provided namespace='org.eclipse.equinox.p2.flavor' name='tooling' version='1.0.0'/>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='More Examples' version='0.0.0'/>
</provides>
- <requires size='1'>
- <required namespace='org.eclipse.equinox.p2.eclipse.type' name='source' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ <requires size='3'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='RCP_Browser_Example.feature.group' range='[1.0.0,1.0.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='Jobs_Example.feature.group' range='[1.0.0,1.0.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='Undo_Example.feature.group' range='[1.0.0,1.0.0]'/>
</requires>
<touchpoint id='null' version='0.0.0'/>
- <touchpointData size='1'>
- <instructions size='2'>
- <instruction key='install'>
- addSourceBundle(bundle:${artifact})
- </instruction>
- <instruction key='uninstall'>
- removeSourceBundle(bundle:${artifact})
- </instruction>
- </instructions>
- </touchpointData>
</unit>
- <unit id='Better Undo_Example.feature.jar' version='1.0.2'>
- <update id='Better Undo_Example.feature.jar' range='[0.0.0,1.0.2)' severity='0'/>
- <properties size='3'>
- <property name='org.eclipse.equinox.p2.name' value='Better Undo Example'/>
- <property name='org.eclipse.equinox.p2.description' value='This feature should not be visible, as it is not categorized and&#xA; is not referenced in the site.xml'/>
- <property name='org.eclipse.equinox.p2.description.url' value='http://www.example.com/description'/>
+ <unit id='Field_Assist_Example.feature.jar' version='2.0.0'>
+ <update id='Field_Assist_Example.feature.jar' range='[0.0.0,2.0.0)' severity='0'/>
+ <properties size='2'>
+ <property name='org.eclipse.equinox.p2.name' value='Field_Assist_Example Feature'/>
+ <property name='org.eclipse.equinox.p2.description' value='Even better than the last one!'/>
</properties>
<provides size='3'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='Better Undo_Example.feature.jar' version='1.0.2'/>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='Field_Assist_Example.feature.jar' version='2.0.0'/>
<provided namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' version='1.0.0'/>
- <provided namespace='org.eclipse.update.feature' name='Better Undo_Example' version='1.0.2'/>
+ <provided namespace='org.eclipse.update.feature' name='Field_Assist_Example' version='2.0.0'/>
</provides>
<filter>
(org.eclipse.update.install.features=true)
</filter>
<artifacts size='1'>
- <artifact classifier='org.eclipse.update.feature' id='Better Undo_Example' version='1.0.2'/>
+ <artifact classifier='org.eclipse.update.feature' id='Field_Assist_Example' version='2.0.0'/>
</artifacts>
<touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
<touchpointData size='1'>
@@ -1177,30 +1132,30 @@
</touchpointData>
<licenses size='1'>
<license uri='http://www.example.com/license' url='http://www.example.com/license'>
- This feature should not be visible, as it is not categorized and&#xA; is not referenced in the site.xml
+ We can&apos;t make up our mind on this license agreement!
</license>
</licenses>
<copyright uri='http://www.example.com/copyright' url='http://www.example.com/copyright'>
- This feature should not be visible, as it is not categorized and&#xA; is not referenced in the site.xml
+ Copyright 2008
</copyright>
</unit>
- <unit id='Jobs_Example.feature.jar' version='1.0.0'>
- <update id='Jobs_Example.feature.jar' range='[0.0.0,1.0.0)' severity='0'/>
+ <unit id='Multi_Page_Editor_Example.feature.jar' version='1.0.0'>
+ <update id='Multi_Page_Editor_Example.feature.jar' range='[0.0.0,1.0.0)' severity='0'/>
<properties size='3'>
- <property name='org.eclipse.equinox.p2.name' value='Jobs_Example Feature'/>
+ <property name='org.eclipse.equinox.p2.name' value='Multi_Page_Editor_Example Feature'/>
<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'/>
</properties>
<provides size='3'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='Jobs_Example.feature.jar' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='Multi_Page_Editor_Example.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='Jobs_Example' version='1.0.0'/>
+ <provided namespace='org.eclipse.update.feature' name='Multi_Page_Editor_Example' version='1.0.0'/>
</provides>
<filter>
(org.eclipse.update.install.features=true)
</filter>
<artifacts size='1'>
- <artifact classifier='org.eclipse.update.feature' id='Jobs_Example' version='1.0.0'/>
+ <artifact classifier='org.eclipse.update.feature' id='Multi_Page_Editor_Example' version='1.0.0'/>
</artifacts>
<touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
<touchpointData size='1'>
@@ -1219,34 +1174,43 @@
[Enter Copyright Description here.]
</copyright>
</unit>
- <unit id='test.feature.feature.jar' version='1.0.0'>
- <update id='test.feature.feature.jar' range='[0.0.0,1.0.0)' severity='0'/>
- <properties size='4'>
- <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='df_LT.featurename' value='j the feature'/>
+ <unit id='config.a.jre' version='1.6.0' singleton='false'>
+ <hostRequirements size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='a.jre' range='1.6.0'/>
+ </hostRequirements>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
</properties>
- <provides size='4'>
- <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'/>
- <provided namespace='org.eclipse.equinox.p2.localization' name='df_LT' version='1.0.0'/>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='config.a.jre' version='1.6.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'/>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='a.jre' range='1.6.0'/>
+ </requires>
+ <touchpoint id='org.eclipse.equinox.p2.native' version='1.0.0'/>
<touchpointData size='1'>
<instructions size='1'>
- <instruction key='zipped'>
- true
+ <instruction key='install'>
+
</instruction>
</instructions>
</touchpointData>
+ </unit>
+ <unit id='A' version='1.0.0' singleton='false'>
+ <update id='RCP_Browser_Example.feature.group' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='4'>
+ <property name='org.eclipse.equinox.p2.name' value='RCP_Browser_Example Feature'/>
+ <property name='org.eclipse.equinox.p2.description' value='Browser Example, but it has dependencies that it won&apos;t find.'/>
+ <property name='org.eclipse.equinox.p2.description.url' value='http://www.example.com/description'/>
+ <property name='org.eclipse.equinox.p2.type.group' value='true'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='A' version='1.0.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='B' range='[1.0.0,2.0.0)'/>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
<licenses size='1'>
<license uri='http://www.example.com/license' url='http://www.example.com/license'>
[Enter License Description here.]
@@ -1256,5 +1220,43 @@
[Enter Copyright Description here.]
</copyright>
</unit>
+ <unit id='org.eclipse.ui.examples.job' version='3.0.0'>
+ <update id='org.eclipse.ui.examples.job' range='[0.0.0,3.0.0)' severity='0'/>
+ <properties size='2'>
+ <property name='org.eclipse.equinox.p2.name' value='Progress Examples Plug-in'/>
+ <property name='org.eclipse.equinox.p2.provider' value='Eclipse.org'/>
+ </properties>
+ <provides size='6'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui.examples.job' version='3.0.0'/>
+ <provided namespace='osgi.bundle' name='org.eclipse.ui.examples.job' version='3.0.0'/>
+ <provided namespace='java.package' name='org.eclipse.ui.examples.jobs' version='0.0.0'/>
+ <provided namespace='java.package' name='org.eclipse.ui.examples.jobs.actions' version='0.0.0'/>
+ <provided namespace='java.package' name='org.eclipse.ui.examples.jobs.views' version='0.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ </provides>
+ <requires size='7'>
+ <required namespace='osgi.bundle' name='org.eclipse.ui' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.core.resources' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.core.runtime' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.ui.ide' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.jface.text' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.ui.workbench.texteditor' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.ui.editors' range='0.0.0'/>
+ </requires>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle' id='org.eclipse.ui.examples.job' version='3.0.0'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='2'>
+ <instruction key='manifest'>
+ Bundle-ManifestVersion: 2&#xA;Eclipse-AutoStart: true&#xA;Export-Package: org.eclipse.ui.examples.jobs,org.eclipse.ui.examples.jobs.actions,org.eclipse.ui.examples.jobs.views&#xA;Bundle-Localization: plugin&#xA;Require-Bundle: org.eclipse.ui,org.eclipse.core.resources,org.eclipse.core.runtime,org.eclipse.ui.ide,org.eclipse.jface.text,org.eclipse.ui.workbench.texteditor,org.eclipse.ui.editors&#xA;Bundle-Activator: org.eclipse.ui.examples.jobs.ProgressExamplesPlugin&#xA;Bundle-Name: Progress Examples Plug-in&#xA;Bundle-Version: 3.0.0&#xA;Bundle-Vendor: Eclipse.org&#xA;Bundle-SymbolicName: org.eclipse.ui.examples.job; singleton:=true&#xA;Bundle-ClassPath: ProgressExamples.jar&#xA;Manifest-Version: 1.0
+ </instruction>
+ <instruction key='zipped'>
+ true
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
</units>
</repository>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/B/content.xml b/bundles/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/B/content.xml
index d725473a4..41e371076 100644
--- a/bundles/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/B/content.xml
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/B/content.xml
@@ -3,9 +3,11 @@
<repository name='file:/C:/_workspaces/p2/org.eclipse.equinox.p2.tests/testData/testRepos/updateSite/ - metadata' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1.0.0'>
<properties size='2'>
<property name='p2.compressed' value='false'/>
- <property name='p2.timestamp' value='1271975857446'/>
+ <property name='p2.timestamp' value='1272593820620'/>
</properties>
- <references size='2'>
+ <references size='4'>
+ <repository uri='file:/Users/Pascal/dev/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/B/' url='file:/Users/Pascal/dev/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/B/' type='1' options='1'/>
+ <repository uri='file:/Users/Pascal/dev/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/C/' url='file:/Users/Pascal/dev/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/C/' type='0' options='1'/>
<repository uri='file:/C:/_workspaces/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/B/' url='file:/C:/_workspaces/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/B/' type='1' options='1'/>
<repository uri='file:/C:/_workspaces/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/C/' url='file:/C:/_workspaces/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/C/' type='0' options='1'/>
</references>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/C/content.xml b/bundles/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/C/content.xml
index 112e2cd37..d1d79bd2f 100644
--- a/bundles/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/C/content.xml
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/C/content.xml
@@ -3,9 +3,10 @@
<repository name='file:/C:/_workspaces/p2/org.eclipse.equinox.p2.tests/testData/testRepos/updateSite/ - metadata' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1.0.0'>
<properties size='2'>
<property name='p2.compressed' value='false'/>
- <property name='p2.timestamp' value='1271975857444'/>
+ <property name='p2.timestamp' value='1272593820620'/>
</properties>
- <references size='1'>
+ <references size='2'>
+ <repository uri='file:/Users/Pascal/dev/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/C/' url='file:/Users/Pascal/dev/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/C/' type='1' options='1'/>
<repository uri='file:/C:/_workspaces/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/C/' url='file:/C:/_workspaces/p2/org.eclipse.equinox.p2.tests/testData/provisioningContextTests/C/' type='1' options='1'/>
</references>
<units size='1'>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/updatesite/CategoryXMLActionTest/category01.xml b/bundles/org.eclipse.equinox.p2.tests/testData/updatesite/CategoryXMLActionTest/category01.xml
new file mode 100644
index 000000000..41994fabc
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/updatesite/CategoryXMLActionTest/category01.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site associateSitesURL="associateSites.xml" mirrorsURL="http://www.eclipse.org/downloads/download.php?file=/eclipse/updates/3.4&amp;format=xml">
+ <feature url="features/test.feature_1.0.0.jar" id="test.feature" version="0.0.0">
+ <category name="Test Category"/>
+ </feature>
+ <category-def label="Test Category Label" name="Test Category">
+ <description>Test Category Description</description>
+ </category-def>
+</site>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/updatesite/CategoryXMLActionTest/category02.xml b/bundles/org.eclipse.equinox.p2.tests/testData/updatesite/CategoryXMLActionTest/category02.xml
new file mode 100644
index 000000000..3a0cf7755
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/updatesite/CategoryXMLActionTest/category02.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site associateSitesURL="associateSites.xml" mirrorsURL="http://www.eclipse.org/downloads/download.php?file=/eclipse/updates/3.4&amp;format=xml">
+ <feature url="features/test.feature_1.0.0.jar" id="test.feature" version="1.0.0.qualifier">
+ <category name="Test Category"/>
+ </feature>
+ <category-def label="Test Category Label" name="Test Category">
+ <description>Test Category Description</description>
+ </category-def>
+</site>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/updatesite/CategoryXMLActionTest/features/test.feature_1.0.0.v20100101.jar b/bundles/org.eclipse.equinox.p2.tests/testData/updatesite/CategoryXMLActionTest/features/test.feature_1.0.0.v20100101.jar
new file mode 100644
index 000000000..23dafae28
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/updatesite/CategoryXMLActionTest/features/test.feature_1.0.0.v20100101.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/updatesite/CategoryXMLActionTest/features/test.feature_2.0.0.jar b/bundles/org.eclipse.equinox.p2.tests/testData/updatesite/CategoryXMLActionTest/features/test.feature_2.0.0.jar
new file mode 100644
index 000000000..020c5c13f
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/updatesite/CategoryXMLActionTest/features/test.feature_2.0.0.jar
Binary files differ
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 3e35f7599..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Testserver
-Bundle-SymbolicName: org.eclipse.equinox.p2.testserver;singleton:=true
-Bundle-Version: 1.0.0
-Bundle-Activator: org.eclipse.equinox.p2.testserver.Activator
-Bundle-Vendor: Eclipse
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4
-Import-Package: org.eclipse.equinox.http,
- org.osgi.framework;version="1.3.0"
-Bundle-ActivationPolicy: lazy
-Require-Bundle: javax.servlet;bundle-version="2.4.0",
- org.eclipse.equinox.http.registry,
- org.eclipse.equinox.http.servlet;bundle-version="1.0.200",
- org.eclipse.osgi.services;bundle-version="3.2.0",
- org.eclipse.osgi.util;bundle-version="3.2.0",
- org.eclipse.osgi;bundle-version="3.5.0"
diff --git a/bundles/org.eclipse.equinox.p2.testserver/build.properties b/bundles/org.eclipse.equinox.p2.testserver/build.properties
deleted file mode 100644
index e9863e281..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml
diff --git a/bundles/org.eclipse.equinox.p2.testserver/p2 test server.launch b/bundles/org.eclipse.equinox.p2.testserver/p2 test server.launch
deleted file mode 100644
index 9038d3958..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/p2 test server.launch
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="true"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/p2 test server"/>
-<booleanAttribute key="default_auto_start" value="true"/>
-<intAttribute key="default_start_level" value="4"/>
-<stringAttribute key="deselected_workspace_plugins" value="org.eclipse.platform.doc.user,org.eclipse.equinox.p2.ui.admin,org.eclipse.equinox.p2.artifact.optimizers,org.eclipse.equinox.p2.ui,org.eclipse.jface,org.eclipse.equinox.p2.examples.rcp.sdkui,org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.text,org.eclipse.equinox.p2.tests.ui,org.eclipse.jface.text,org.eclipse.equinox.p2.core,org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.concurrent,org.eclipse.jdt.core,org.eclipse.equinox.p2.artifact.repository,org.sat4j.core*2.1.1.v20090825,org.eclipse.equinox.frameworkadmin.equinox,org.sat4j.pb*2.1.1.v20090825,org.eclipse.update.scheduler,org.eclipse.equinox.p2.updatesite,org.eclipse.core.databinding.beans,org.eclipse.core.filebuffers,org.eclipse.ui.examples.undo,org.eclipse.equinox.p2.metadata.repository,org.eclipse.ui,org.apache.xml.resolver,org.eclipse.search,org.eclipse.equinox.p2.sar,org.eclipse.equinox.p2.repository,org.eclipse.ui.tests,org.eclipse.ui.examples.fieldassist,org.eclipse.test.performance,org.eclipse.core.databinding,org.eclipse.core.tests.harness,org.eclipse.platform.doc.isv,org.eclipse.ui.examples.job,org.eclipse.equinox.frameworkadmin,org.eclipse.core.expressions,org.eclipse.equinox.p2.selfhosting,org.eclipse.equinox.p2.jarprocessor,org.eclipse.ui.forms,org.eclipse.equinox.p2.extensionlocation,org.eclipse.equinox.p2.directorywatcher,org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates,org.eclipse.equinox.p2.examples.rcp.cloud*1.0.0.qualifier,org.sat4j.pb*2.1.0.v20090520,org.eclipse.equinox.p2.tests,Snippets,org.easymock,org.eclipse.core.commands,org.eclipse.equinox.p2.director,org.eclipse.equinox.p2.director.app,org.eclipse.equinox.p2.examples.rcp.prestartupdate,org.eclipse.equinox.p2.publisher,org.eclipse.jface.databinding,ie.wombat.jbdiff,test271339,org.eclipse.ui.console,org.eclipse.equinox.preferences,org.eclipse.equinox.p2.metadata.generator,org.eclipse.equinox.p2.ui.sdk,org.sat4j.core*2.1.0.v20090520,org.eclipse.equinox.p2.engine,org.eclipse.equinox.p2.tests.optimizers,JobTest,org.eclipse.equinox.p2.metadata,org.eclipse.equinox.p2.touchpoint.natives,org.eclipse.ui.tests.harness,org.eclipse.equinox.p2.tests.verifier,org.eclipse.equinox.p2.repository.tools,org.eclipse.ui.workbench,org.eclipse.equinox.p2.exemplarysetup,org.eclipse.equinox.p2.console,org.eclipse.core.databinding.observable,org.eclipse.equinox.simpleconfigurator.manipulator,org.eclipse.equinox.p2.artifact.processors,RCPMail,org.eclipse.ui.ide,org.eclipse.equinox.p2.installer,org.eclipse.update.ui,org.eclipse.core.databinding.property,org.eclipse.equinox.p2.tools,org.eclipse.equinox.p2.examples.rcp.cloud*1.0.0.qualifier,org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility,org.eclipse.core.runtime,org.eclipse.equinox.p2.garbagecollector,org.eclipse.equinox.p2.ui.admin.rcp,org.eclipse.equinox.frameworkadmin.test,org.eclipse.equinox.simpleconfigurator,org.eclipse.equinox.p2.updatechecker,org.eclipse.equinox.p2.ui.sdk.scheduler"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -console"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dorg.osgi.service.http.port=8080 -Dorg.osgi.service.http.port.secure=8443"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="javax.servlet@default:default,org.eclipse.osgi.services@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.equinox.http.servlet@default:default,org.eclipse.osgi.util@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.registry@default:default,javax.xml@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.http@default:default,org.eclipse.osgi,org.eclipse.equinox.common@default:default,org.eclipse.equinox.p2.testserver@default:default"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.testserver/plugin.xml b/bundles/org.eclipse.equinox.p2.testserver/plugin.xml
deleted file mode 100644
index 2b35d936a..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/plugin.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.equinox.http.registry.servlets">
- <servlet
- alias="/helloworld"
- class="org.eclipse.equinox.p2.testserver.servlets.HelloWorld">
- </servlet>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.testserver/pom.xml b/bundles/org.eclipse.equinox.p2.testserver/pom.xml
deleted file mode 100644
index c512ff098..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.testserver</artifactId>
- <version>1.0.0</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/Activator.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/Activator.java
deleted file mode 100644
index 3a9860e89..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/Activator.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver;
-
-import java.net.URI;
-import javax.servlet.ServletException;
-import org.eclipse.equinox.p2.testserver.servlets.BasicResourceDelivery;
-import org.eclipse.equinox.p2.testserver.servlets.ChopAndDelay;
-import org.eclipse.equinox.p2.testserver.servlets.ContentLengthLier;
-import org.eclipse.equinox.p2.testserver.servlets.FileMolester;
-import org.eclipse.equinox.p2.testserver.servlets.LastModifiedLier;
-import org.eclipse.equinox.p2.testserver.servlets.Redirector;
-import org.eclipse.equinox.p2.testserver.servlets.StatusCodeResponse;
-import org.eclipse.equinox.p2.testserver.servlets.TimeOut;
-import org.eclipse.equinox.p2.testserver.servlets.Truncator;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.http.HttpService;
-import org.osgi.service.http.NamespaceException;
-import org.osgi.util.tracker.ServiceTracker;
-import org.osgi.util.tracker.ServiceTrackerCustomizer;
-
-public class Activator implements BundleActivator, ServiceTrackerCustomizer {
- private static BundleContext context;
- private ServiceTracker httpTracker;
- private SecureContext secureHttpContext;
- private SecuredArtifactsContext artifactSecuredHttpContext;
- private static Activator instance;
- private HttpService httpService;
- private AlwaysFailContext alwaysFail;
- private FlipFlopFailContext flipFlop;
-
- private static final String SITE = "http://download.eclipse.org/eclipse/updates/3.4"; //$NON-NLS-1$
- private static final String SITE2 = "http://www.eclipse.org/equinox/p2/testing/updateSite"; //$NON-NLS-1$
- private static final String SITE3 = "http://download.eclipse.org/eclipse/updates/3.5-I-builds/"; //$NON-NLS-1$
-
- public void start(BundleContext aContext) throws Exception {
- context = aContext;
-
- httpTracker = new ServiceTracker(context, HttpService.class.getName(), this);
- httpTracker.open();
- instance = this;
- }
-
- public void stop(BundleContext aContext) throws Exception {
- httpTracker.close();
- context = null;
- }
-
- public Object addingService(ServiceReference reference) {
- httpService = (HttpService) context.getService(reference);
- secureHttpContext = new SecureContext(httpService.createDefaultHttpContext());
- artifactSecuredHttpContext = new SecuredArtifactsContext(httpService.createDefaultHttpContext());
- alwaysFail = new AlwaysFailContext(httpService.createDefaultHttpContext());
- flipFlop = new FlipFlopFailContext(httpService.createDefaultHttpContext());
-
- try {
- httpService.registerResources("/public", "/webfiles", null); //$NON-NLS-1$ //$NON-NLS-2$
- httpService.registerResources("/private", "/webfiles", secureHttpContext); //$NON-NLS-1$ //$NON-NLS-2$
- httpService.registerResources("/never", "/webfiles", alwaysFail); //$NON-NLS-1$ //$NON-NLS-2$
- httpService.registerResources("/flipflop", "/webfiles", flipFlop); //$NON-NLS-1$ //$NON-NLS-2$
-
- httpService.registerServlet("/status", new StatusCodeResponse(), null, null); //$NON-NLS-1$
- httpService.registerServlet("/timeout", new TimeOut(), null, null); //$NON-NLS-1$
- httpService.registerServlet("/redirect", new Redirector(), null, null); //$NON-NLS-1$
-
- httpService.registerServlet("/truncated", new Truncator("/truncated", URI.create("/webfiles"), 50), null, null); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
- httpService.registerServlet("/molested", new FileMolester("/molested", URI.create("/webfiles"), 40), null, null); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
- // 8 bytes at a time, delay from 0 to 100 ms, in steps of 5
- httpService.registerServlet("/decelerate", new ChopAndDelay("/decelerate", URI.create("/webfiles"), 3, 0, new LinearChange(0, 5, 100, 0)), null, null); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
-
- addProxyServices(httpService, SITE, "/proxy/"); //$NON-NLS-1$
- addProxyServices(httpService, SITE2, "/proxy2/"); //$NON-NLS-1$
-
- httpService.registerServlet("/proxy3/aprivate", new BasicResourceDelivery("/proxy3/aprivate", URI.create(SITE2)), null, artifactSecuredHttpContext); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet("/proxy4/aprivate", new BasicResourceDelivery("/proxy4/aprivate", URI.create(SITE3)), null, artifactSecuredHttpContext); //$NON-NLS-1$//$NON-NLS-2$
-
- } catch (NamespaceException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (ServletException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return httpService;
- }
-
- /**
- * Adds services to a location
- * @param site
- * @param root the "mount dir" e.g. "/proxy/" "/proxy2/" etc.
- * @throws NamespaceException
- * @throws ServletException
- */
- private void addProxyServices(HttpService httpService, String site, String root) throws ServletException, NamespaceException {
- httpService.registerServlet(root + "truncated", new Truncator(root + "truncated", URI.create(site), 50), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "public", new BasicResourceDelivery(root + "public", URI.create(site)), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "private", new BasicResourceDelivery(root + "private", URI.create(site)), null, secureHttpContext); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "never", new BasicResourceDelivery(root + "private", URI.create(site)), null, alwaysFail); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "flipFlop", new BasicResourceDelivery(root + "private", URI.create(site)), null, flipFlop); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "molested", new FileMolester(root + "molested", URI.create(site), 40), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "decelerate", new ChopAndDelay(root + "decelerate", URI.create(site), 3, 0, new LinearChange(0, 5, 100, 0)), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "decelerate2", new ChopAndDelay(root + "decelerate2", URI.create(site), 3, 80, new LinearChange(100, 5, 105, 0)), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "readtimeout", new ChopAndDelay(root + "readtimeout", URI.create(site), 3, 10, new LinearChange(10 * 60 * 1000, 5, 5 + 10 * 60 * 1000, 0)), null, null); //$NON-NLS-1$//$NON-NLS-2$
-
- // lie about modified time
- httpService.registerServlet(root + "modified/zero", new LastModifiedLier(root + "modified/zero", URI.create(site), LastModifiedLier.TYPE_ZERO), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "modified/old", new LastModifiedLier(root + "modified/old", URI.create(site), LastModifiedLier.TYPE_OLD), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "modified/now", new LastModifiedLier(root + "modified/now", URI.create(site), LastModifiedLier.TYPE_NOW), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "modified/future", new LastModifiedLier(root + "modified/future", URI.create(site), LastModifiedLier.TYPE_FUTURE), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "modified/bad", new LastModifiedLier(root + "modified/bad", URI.create(site), LastModifiedLier.TYPE_BAD), null, null); //$NON-NLS-1$//$NON-NLS-2$
-
- // lie about length
- httpService.registerServlet(root + "length/zero", new ContentLengthLier(root + "length/zero", URI.create(site), 0), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "length/less", new ContentLengthLier(root + "length/less", URI.create(site), 90), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "length/more", new ContentLengthLier(root + "length/more", URI.create(site), 200), null, null); //$NON-NLS-1$//$NON-NLS-2$
-
- }
-
- public static Activator getInstance() {
- return instance;
- }
-
- public HttpService getHttp() {
- return httpService;
- }
-
- public void modifiedService(ServiceReference reference, Object service) {
- // do nothing
- }
-
- public void removedService(ServiceReference reference, Object service) {
- httpService = (HttpService) service;
- httpService.unregister("/public"); //$NON-NLS-1$
- httpService.unregister("/private"); //$NON-NLS-1$
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/AlwaysFailContext.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/AlwaysFailContext.java
deleted file mode 100644
index 6d4711897..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/AlwaysFailContext.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver;
-
-import java.net.URL;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.osgi.service.http.HttpContext;
-
-/**
- * The AlwaysFailContext can be used to add basic authentication to a path.
- * This implementation will always fail (easier to test failure logic) this way.
- */
-public class AlwaysFailContext implements HttpContext {
- private HttpContext theDefaultContext;
-
- public AlwaysFailContext(HttpContext defaultContext) {
- theDefaultContext = defaultContext;
- }
-
- public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) {
- // always fail
- response.setHeader("WWW-Authenticate", "BASIC realm=\"p2 Http Testing Server (Aladdin, open sesame)\""); //$NON-NLS-1$//$NON-NLS-2$
- response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
- return false;
-
- }
-
- public String getMimeType(String name) {
- return theDefaultContext.getMimeType(name);
- }
-
- public URL getResource(String name) {
- return theDefaultContext.getResource(name);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/FlipFlopFailContext.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/FlipFlopFailContext.java
deleted file mode 100644
index 2ac9e7d04..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/FlipFlopFailContext.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver;
-
-import java.net.URL;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.osgi.service.http.HttpContext;
-
-/**
- * The SecureContext can be used to add basic authentication to a path.
- * It will fail on every other request to enable flaky server, or authentication testing.
- * This implementation requires the user "Aladdin" to log in with the password "open sesame".
- */
-public class FlipFlopFailContext implements HttpContext {
- private HttpContext theDefaultContext;
- public static int flipFlop = 0;
-
- public FlipFlopFailContext(HttpContext defaultContext) {
- theDefaultContext = defaultContext;
- }
-
- public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) {
- String auth = request.getHeader("Authorization"); //$NON-NLS-1$
- // Response is Aladdin:open sesame in Base64 encoding (from RFC example)
- if (auth != null && "QWxhZGRpbjpvcGVuIHNlc2FtZQ==".equals(auth.substring(6))) //$NON-NLS-1$
- return (flipFlop ^= 1) == 1 ? true : false;
-
- // if not authorized or wrong user/password
- response.setHeader("WWW-Authenticate", "BASIC realm=\"p2 Http Testing Server (Aladdin, open sesame)\""); //$NON-NLS-1$//$NON-NLS-2$
- response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
- return false;
-
- }
-
- public String getMimeType(String name) {
- return theDefaultContext.getMimeType(name);
- }
-
- public URL getResource(String name) {
- return theDefaultContext.getResource(name);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/LinearChange.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/LinearChange.java
deleted file mode 100644
index a203a1d30..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/LinearChange.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.testserver;
-
-import java.util.NoSuchElementException;
-
-public class LinearChange {
- boolean started;
- long startValue;
- long current;
- long step;
- long max;
- long min;
- public static final LinearChange NoChange = new LinearChange(0, 0);
-
- public LinearChange() {
- started = false;
- startValue = 0;
- current = 0;
- step = 1;
- max = Long.MAX_VALUE;
- min = Long.MIN_VALUE;
- }
-
- public void reset() {
- started = false;
- current = startValue;
- }
-
- public LinearChange fork() {
- LinearChange forked = new LinearChange();
- forked.started = started;
- forked.startValue = startValue;
- forked.current = current;
- forked.step = step;
- forked.max = max;
- forked.min = min;
- return forked;
- }
-
- public LinearChange(long firstValue, long step) {
- this();
- current = startValue = firstValue;
- this.step = step;
- }
-
- public LinearChange(long firstValue, long step, long max, long min) {
- this(firstValue, step);
- this.max = max;
- this.min = min;
- }
-
- public long next() {
- if (!hasNext())
- throw new NoSuchElementException();
- if (started)
- current += step;
- started = true;
-
- return current;
- }
-
- public boolean hasNext() {
- if (step == 0)
- return false;
- if (step > 0 && current + step > max)
- return false;
- if (step < 0 && current + step < min)
- return false;
- return true;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/MimeLookup.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/MimeLookup.java
deleted file mode 100644
index 71c09f80d..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/MimeLookup.java
+++ /dev/null
@@ -1,738 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.testserver;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class MimeLookup {
-
- public static final String JAR_PACK_GZ = "jar.pack.gz"; //$NON-NLS-1$
-
- public static String getMimeType(String name) {
- if (extMap == null)
- initNameToMime();
-
- // treat names with multiple "." in a special way (currently only one)
- if (name.endsWith(JAR_PACK_GZ))
- return (String) extMap.get(JAR_PACK_GZ);
- int dot = name.lastIndexOf("."); //$NON-NLS-1$
- // get the suffix, use "a" for empty as this gives the default "application/octet-stream"
- String tmp = dot == -1 ? "a" : name.substring(dot + 1); //$NON-NLS-1$
- tmp = (String) extMap.get(tmp);
- return tmp == null ? "application/octet-stream" : tmp; //$NON-NLS-1$
- }
-
- private static Map extMap;
- private static Map mimeMap;
-
- public static void initNameToMime() {
- extMap = new HashMap(data.length);
- for (int i = 0; i < data.length; i += 2) {
- Object key = data[i];
- Object val = extMap.get(key);
- if (val == null)
- extMap.put(key, data[i]);
- }
-
- }
-
- public static void initMimeToExt() {
- mimeMap = new HashMap(data.length);
- for (int i = 0; i < data.length; i += 2) {
- Object key = data[i + 1];
- Object val = mimeMap.get(key);
- if (val == null)
- mimeMap.put(key, data[i]);
- }
-
- }
-
- public final static String[] data = { //
- //--- typical java related mime types - higher priority
- "bat", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "batfrag", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "class", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "css", "text/css", //$NON-NLS-1$ //$NON-NLS-2$
- "cssfrag", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "exe", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "gif", "image/gif", //$NON-NLS-1$ //$NON-NLS-2$
- "html", "text/html", //$NON-NLS-1$ //$NON-NLS-2$
- "htmlfrag", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "jad", "text/vnd.sun.j2me.app-descriptor", //$NON-NLS-1$ //$NON-NLS-2$
- "jar", "application/java-archive", //$NON-NLS-1$ //$NON-NLS-2$
- "jar.pack.gz", "application/x-java-pack200", //$NON-NLS-1$ //$NON-NLS-2$
- "jardiff", "application/x-java-archive-diff", //$NON-NLS-1$ //$NON-NLS-2$
- "java", "text/x-java-source", //$NON-NLS-1$ //$NON-NLS-2$
- "javafrag", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "jnlp", "application/x-java-jnlp-file", //$NON-NLS-1$ //$NON-NLS-2$
- "jpg", "image/jpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "js", "application/x-javascript", //$NON-NLS-1$ //$NON-NLS-2$
- "mp3", "audio/mp3", //$NON-NLS-1$ //$NON-NLS-2$
- "png", "image/png", //$NON-NLS-1$ //$NON-NLS-2$
- "rss", "application/rss+xml", //$NON-NLS-1$ //$NON-NLS-2$
- "ser", "application/x-java-serialized-object", //$NON-NLS-1$ //$NON-NLS-2$
- "sql", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "sqlfrag", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "swf", "application/x-shockwave-flash", //$NON-NLS-1$ //$NON-NLS-2$
- "txt", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "wav", "audio/wav", //$NON-NLS-1$ //$NON-NLS-2$
- "xml", "application/xml", //$NON-NLS-1$ //$NON-NLS-2$
- "xmlfrag", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "zip", "application/zip", //$NON-NLS-1$ //$NON-NLS-2$
-
- //--- misc definitions
- "3dm", "x-world/x-3dmf", //$NON-NLS-1$ //$NON-NLS-2$
- "3dmf", "x-world/x-3dmf", //$NON-NLS-1$ //$NON-NLS-2$
-
- "a", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "aab", "application/x-authorware-bin", //$NON-NLS-1$ //$NON-NLS-2$
- "aam", "application/x-authorware-map", //$NON-NLS-1$ //$NON-NLS-2$
- "aas", "application/x-authorware-seg", //$NON-NLS-1$ //$NON-NLS-2$
- "abc", "text/vnd.abc", //$NON-NLS-1$ //$NON-NLS-2$
- "acgi", "text/html", //$NON-NLS-1$ //$NON-NLS-2$
- "afl", "video/animaflex", //$NON-NLS-1$ //$NON-NLS-2$
- "ai", "application/postscript", //$NON-NLS-1$ //$NON-NLS-2$
- "aif", "audio/aiff", //$NON-NLS-1$ //$NON-NLS-2$
- "aif", "audio/x-aiff", //$NON-NLS-1$ //$NON-NLS-2$
- "aifc", "audio/aiff", //$NON-NLS-1$ //$NON-NLS-2$
- "aifc", "audio/x-aiff", //$NON-NLS-1$ //$NON-NLS-2$
- "aiff", "audio/aiff", //$NON-NLS-1$ //$NON-NLS-2$
- "aiff", "audio/x-aiff", //$NON-NLS-1$ //$NON-NLS-2$
- "aim", "application/x-aim", //$NON-NLS-1$ //$NON-NLS-2$
- "aip", "text/x-audiosoft-intra", //$NON-NLS-1$ //$NON-NLS-2$
- "ani", "application/x-navi-animation", //$NON-NLS-1$ //$NON-NLS-2$
- "aps", "application/mime", //$NON-NLS-1$ //$NON-NLS-2$
- "arc", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "arj", "application/arj", //$NON-NLS-1$ //$NON-NLS-2$
- "arj", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "art", "image/x-jg", //$NON-NLS-1$ //$NON-NLS-2$
- "asf", "video/x-ms-asf", //$NON-NLS-1$ //$NON-NLS-2$
- "asm", "text/x-asm", //$NON-NLS-1$ //$NON-NLS-2$
- "asp", "text/asp", //$NON-NLS-1$ //$NON-NLS-2$
- "asx", "application/x-mplayer2", //$NON-NLS-1$ //$NON-NLS-2$
- "asx", "video/x-ms-asf", //$NON-NLS-1$ //$NON-NLS-2$
- "asx", "video/x-ms-asf-plugin", //$NON-NLS-1$ //$NON-NLS-2$
- "au", "audio/basic", //$NON-NLS-1$ //$NON-NLS-2$
- "au", "audio/x-au", //$NON-NLS-1$ //$NON-NLS-2$
- "avi", "video/avi", //$NON-NLS-1$ //$NON-NLS-2$
- "avi", "application/x-troff-msvideo", //$NON-NLS-1$ //$NON-NLS-2$
- "avi", "video/msvideo", //$NON-NLS-1$ //$NON-NLS-2$
- "avi", "video/x-msvideo", //$NON-NLS-1$ //$NON-NLS-2$
- "avs", "video/avs-video", //$NON-NLS-1$ //$NON-NLS-2$
-
- "bcpio", "application/x-bcpio", //$NON-NLS-1$ //$NON-NLS-2$
- "bin", "application/mac-binary", //$NON-NLS-1$ //$NON-NLS-2$
- "bin", "application/macbinary", //$NON-NLS-1$ //$NON-NLS-2$
- "bin", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "bin", "application/x-binary", //$NON-NLS-1$ //$NON-NLS-2$
- "bin", "application/x-macbinary", //$NON-NLS-1$ //$NON-NLS-2$
- "bm", "image/bmp", //$NON-NLS-1$ //$NON-NLS-2$
- "bmp", "image/bmp", //$NON-NLS-1$ //$NON-NLS-2$
- "bmp", "image/x-windows-bmp", //$NON-NLS-1$ //$NON-NLS-2$
- "boo", "application/book", //$NON-NLS-1$ //$NON-NLS-2$
- "book", "application/book", //$NON-NLS-1$ //$NON-NLS-2$
- "boz", "application/x-bzip2", //$NON-NLS-1$ //$NON-NLS-2$
- "bsh", "application/x-bsh", //$NON-NLS-1$ //$NON-NLS-2$
- "bz", "application/x-bzip", //$NON-NLS-1$ //$NON-NLS-2$
- "bz2", "application/x-bzip2", //$NON-NLS-1$ //$NON-NLS-2$
- "c", "text/x-c", //$NON-NLS-1$ //$NON-NLS-2$
- "c", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "c++", "text/x-c", //$NON-NLS-1$ //$NON-NLS-2$
- "c++", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "cat", "application/vnd.ms-pki.seccat", //$NON-NLS-1$ //$NON-NLS-2$
- "cc", "text/x-c", //$NON-NLS-1$ //$NON-NLS-2$
- "cc", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "ccad", "application/clariscad", //$NON-NLS-1$ //$NON-NLS-2$
- "cco", "application/x-cocoa", //$NON-NLS-1$ //$NON-NLS-2$
- "cdf", "application/cdf", //$NON-NLS-1$ //$NON-NLS-2$
- "cdf", "application/x-cdf", //$NON-NLS-1$ //$NON-NLS-2$
- "cdf", "application/x-netcdf", //$NON-NLS-1$ //$NON-NLS-2$
- "cer", "application/pkix-cert", //$NON-NLS-1$ //$NON-NLS-2$
- "cer", "application/x-x509-ca-cert", //$NON-NLS-1$ //$NON-NLS-2$
- "cha", "application/x-chat", //$NON-NLS-1$ //$NON-NLS-2$
- "chat", "application/x-chat", //$NON-NLS-1$ //$NON-NLS-2$
- "class", "application/java", //$NON-NLS-1$ //$NON-NLS-2$
- "class", "application/java-byte-code", //$NON-NLS-1$ //$NON-NLS-2$
- "class", "application/x-java-class", //$NON-NLS-1$ //$NON-NLS-2$
- "com", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "com", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "conf", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "cpio", "application/x-cpio", //$NON-NLS-1$ //$NON-NLS-2$
- "cpp", "text/x-c", //$NON-NLS-1$ //$NON-NLS-2$
- "cpt", "application/mac-compactpro", //$NON-NLS-1$ //$NON-NLS-2$
- "cpt", "application/x-compactpro", //$NON-NLS-1$ //$NON-NLS-2$
- "cpt", "application/x-cpt", //$NON-NLS-1$ //$NON-NLS-2$
- "crl", "application/pkcs-crl", //$NON-NLS-1$ //$NON-NLS-2$
- "crl", "application/pkix-crl", //$NON-NLS-1$ //$NON-NLS-2$
- "crt", "application/pkix-cert", //$NON-NLS-1$ //$NON-NLS-2$
- "crt", "application/x-x509-ca-cert", //$NON-NLS-1$ //$NON-NLS-2$
- "crt", "application/x-x509-user-cert", //$NON-NLS-1$ //$NON-NLS-2$
- "csh", "application/x-csh", //$NON-NLS-1$ //$NON-NLS-2$
- "csh", "text/x-script.csh", //$NON-NLS-1$ //$NON-NLS-2$
- "css", "text/css", //$NON-NLS-1$ //$NON-NLS-2$
- "cxx", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "css", "application/x-pointplus", //$NON-NLS-1$ //$NON-NLS-2$
-
- "dcr", "application/x-director", //$NON-NLS-1$ //$NON-NLS-2$
- "deepv", "application/x-deepv", //$NON-NLS-1$ //$NON-NLS-2$
- "der", "application/x-x509-ca-cert", //$NON-NLS-1$ //$NON-NLS-2$
- "def", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "dif", "video/x-dv", //$NON-NLS-1$ //$NON-NLS-2$
- "dir", "application/x-director", //$NON-NLS-1$ //$NON-NLS-2$
- "dl", "video/dl", //$NON-NLS-1$ //$NON-NLS-2$
- "dl", "video/x-dl", //$NON-NLS-1$ //$NON-NLS-2$
- "doc", "application/msword", //$NON-NLS-1$ //$NON-NLS-2$
- "dot", "application/msword", //$NON-NLS-1$ //$NON-NLS-2$
- "dp", "application/commonground", //$NON-NLS-1$ //$NON-NLS-2$
- "drw", "application/drafting", //$NON-NLS-1$ //$NON-NLS-2$
- "dump", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "dv", "video/x-dv", //$NON-NLS-1$ //$NON-NLS-2$
- "dvi", "application/x-dvi", //$NON-NLS-1$ //$NON-NLS-2$
- "dwf", "model/vnd.dwf", //$NON-NLS-1$ //$NON-NLS-2$
- "dwg", "application/acad", //$NON-NLS-1$ //$NON-NLS-2$
- "dwg", "image/vnd.dwg", //$NON-NLS-1$ //$NON-NLS-2$
- "dwg", "image/x-dwg", //$NON-NLS-1$ //$NON-NLS-2$
- "dxf", "application/dxf", //$NON-NLS-1$ //$NON-NLS-2$
- "dxf", "image/vnd.dwg", //$NON-NLS-1$ //$NON-NLS-2$
- "dxf", "image/x-dwg", //$NON-NLS-1$ //$NON-NLS-2$
- "dxr", "application/x-director", //$NON-NLS-1$ //$NON-NLS-2$
-
- "elc", "application/x-elc", //$NON-NLS-1$ //$NON-NLS-2$
- "env", "application/x-envoy", //$NON-NLS-1$ //$NON-NLS-2$
- "eps", "application/postscript", //$NON-NLS-1$ //$NON-NLS-2$
- "es", "application/x-esrehber", //$NON-NLS-1$ //$NON-NLS-2$
- "etx", "text/x-setext", //$NON-NLS-1$ //$NON-NLS-2$
- "exe", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "f", "text/x-fortran", //$NON-NLS-1$ //$NON-NLS-2$
- "f", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "f77", "text/x-fortran", //$NON-NLS-1$ //$NON-NLS-2$
- "f90", "text/x-fortran", //$NON-NLS-1$ //$NON-NLS-2$
- "f90", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "fdf", "application/vnd.fdf", //$NON-NLS-1$ //$NON-NLS-2$
- "fli", "video/fli", //$NON-NLS-1$ //$NON-NLS-2$
- "fli", "video/x-fli", //$NON-NLS-1$ //$NON-NLS-2$
- "for", "text/x-fortran", //$NON-NLS-1$ //$NON-NLS-2$
- "for", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "fpx", "image/vnd.fpx", //$NON-NLS-1$ //$NON-NLS-2$
- "fpx", "image/vnd.net-fpx", //$NON-NLS-1$ //$NON-NLS-2$
- "frl", "application/freeloader", //$NON-NLS-1$ //$NON-NLS-2$
- "funk", "audio/make", //$NON-NLS-1$ //$NON-NLS-2$
-
- "g", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "g3", "image/g3fax", //$NON-NLS-1$ //$NON-NLS-2$
- "gif", "image/gif", //$NON-NLS-1$ //$NON-NLS-2$
- "gl", "video/gl", //$NON-NLS-1$ //$NON-NLS-2$
- "gl", "video/x-gl", //$NON-NLS-1$ //$NON-NLS-2$
- "gsd", "audio/x-gsm", //$NON-NLS-1$ //$NON-NLS-2$
- "gsm", "audio/x-gsm", //$NON-NLS-1$ //$NON-NLS-2$
- "gsp", "application/x-gsp", //$NON-NLS-1$ //$NON-NLS-2$
- "gss", "application/x-gss", //$NON-NLS-1$ //$NON-NLS-2$
- "gtar", "application/x-gtar", //$NON-NLS-1$ //$NON-NLS-2$
- "gz", "application/x-compressed", //$NON-NLS-1$ //$NON-NLS-2$
- "gz", "application/x-gzip", //$NON-NLS-1$ //$NON-NLS-2$
- "gzip", "application/x-gzip", //$NON-NLS-1$ //$NON-NLS-2$
- "gzip", "multipart/x-gzip", //$NON-NLS-1$ //$NON-NLS-2$
-
- "h", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "h", "text/x-h", //$NON-NLS-1$ //$NON-NLS-2$
- "hdf", "application/x-hdf", //$NON-NLS-1$ //$NON-NLS-2$
- "help", "application/x-helpfile", //$NON-NLS-1$ //$NON-NLS-2$
- "hgl", "application/vnd.hp-hpgl", //$NON-NLS-1$ //$NON-NLS-2$
- "hh", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "hh", "text/x-h", //$NON-NLS-1$ //$NON-NLS-2$
- "hlb", "text/x-script", //$NON-NLS-1$ //$NON-NLS-2$
- "hlp", "application/hlp", //$NON-NLS-1$ //$NON-NLS-2$
- "hlp", "application/x-helpfile", //$NON-NLS-1$ //$NON-NLS-2$
- "hlp", "application/x-winhelp", //$NON-NLS-1$ //$NON-NLS-2$
- "hpg", "application/vnd.hp-hpgl", //$NON-NLS-1$ //$NON-NLS-2$
- "hpgl", "application/vnd.hp-hpgl", //$NON-NLS-1$ //$NON-NLS-2$
- "hqx", "application/binhex", //$NON-NLS-1$ //$NON-NLS-2$
- "hqx", "application/binhex4", //$NON-NLS-1$ //$NON-NLS-2$
- "hqx", "application/mac-binhex", //$NON-NLS-1$ //$NON-NLS-2$
- "hqx", "application/mac-binhex40", //$NON-NLS-1$ //$NON-NLS-2$
- "hqx", "application/x-binhex40", //$NON-NLS-1$ //$NON-NLS-2$
- "hqx", "application/x-mac-binhex40", //$NON-NLS-1$ //$NON-NLS-2$
- "hta", "application/hta", //$NON-NLS-1$ //$NON-NLS-2$
- "htc", "text/x-component", //$NON-NLS-1$ //$NON-NLS-2$
- "htm", "text/html", //$NON-NLS-1$ //$NON-NLS-2$
- "html", "text/html", //$NON-NLS-1$ //$NON-NLS-2$
- "htmls", "text/html", //$NON-NLS-1$ //$NON-NLS-2$
- "htt", "text/webviewhtml", //$NON-NLS-1$ //$NON-NLS-2$
- "htx", "text/html", //$NON-NLS-1$ //$NON-NLS-2$
-
- "ice", "x-conference/x-cooltalk", //$NON-NLS-1$ //$NON-NLS-2$
- "ico", "image/x-icon", //$NON-NLS-1$ //$NON-NLS-2$
- "idc", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "ief", "image/ief", //$NON-NLS-1$ //$NON-NLS-2$
- "iefs", "image/ief", //$NON-NLS-1$ //$NON-NLS-2$
- "iges", "application/iges", //$NON-NLS-1$ //$NON-NLS-2$
- "iges", "model/iges", //$NON-NLS-1$ //$NON-NLS-2$
- "igs", "application/iges", //$NON-NLS-1$ //$NON-NLS-2$
- "igs", "model/iges", //$NON-NLS-1$ //$NON-NLS-2$
- "ima", "application/x-ima", //$NON-NLS-1$ //$NON-NLS-2$
- "imap", "application/x-httpd-imap", //$NON-NLS-1$ //$NON-NLS-2$
- "inf", "application/inf", //$NON-NLS-1$ //$NON-NLS-2$
- "ins", "application/x-internett-signup", //$NON-NLS-1$ //$NON-NLS-2$
- "ip", "application/x-ip2", //$NON-NLS-1$ //$NON-NLS-2$
- "isu", "video/x-isvideo", //$NON-NLS-1$ //$NON-NLS-2$
- "it", "audio/it", //$NON-NLS-1$ //$NON-NLS-2$
- "iv", "application/x-inventor", //$NON-NLS-1$ //$NON-NLS-2$
- "ivr", "i-world/i-vrml", //$NON-NLS-1$ //$NON-NLS-2$
- "ivy", "application/x-livescreen", //$NON-NLS-1$ //$NON-NLS-2$
-
- "jam", "audio/x-jam", //$NON-NLS-1$ //$NON-NLS-2$
- "jav", "text/x-java-source", //$NON-NLS-1$ //$NON-NLS-2$
- "jav", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "java", "text/x-java-source", //$NON-NLS-1$ //$NON-NLS-2$
- "java", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "jcm", "application/x-java-commerce", //$NON-NLS-1$ //$NON-NLS-2$
- "jfif", "image/jpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "jfif", "image/pjpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "jfif-tbnl", "image/jpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "jpe", "image/jpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "jpe", "image/pjpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "jpeg", "image/jpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "jpeg", "image/pjpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "jpg", "image/jpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "jpg", "image/pjpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "jps", "image/x-jps", //$NON-NLS-1$ //$NON-NLS-2$
- "js", "application/x-javascript", //$NON-NLS-1$ //$NON-NLS-2$
- "jut", "image/jutvision", //$NON-NLS-1$ //$NON-NLS-2$
-
- "kar", "audio/midi", //$NON-NLS-1$ //$NON-NLS-2$
- "kar", "music/x-karaoke", //$NON-NLS-1$ //$NON-NLS-2$
- "ksh", "application/x-ksh", //$NON-NLS-1$ //$NON-NLS-2$
- "ksh", "text/x-script.ksh", //$NON-NLS-1$ //$NON-NLS-2$
-
- "la", "audio/nspaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "la", "audio/x-nspaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "lam", "audio/x-liveaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "latex", "application/x-latex", //$NON-NLS-1$ //$NON-NLS-2$
- "lha", "application/lha", //$NON-NLS-1$ //$NON-NLS-2$
- "lha", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "lha", "application/x-lha", //$NON-NLS-1$ //$NON-NLS-2$
- "lhx", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "list", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "lma", "audio/nspaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "lma", "audio/x-nspaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "log", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "lsp", "application/x-lisp", //$NON-NLS-1$ //$NON-NLS-2$
- "lsp", "text/x-script.lisp", //$NON-NLS-1$ //$NON-NLS-2$
- "lst", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "lsx", "text/x-la-asf", //$NON-NLS-1$ //$NON-NLS-2$
- "ltx", "application/x-latex", //$NON-NLS-1$ //$NON-NLS-2$
- "lzh", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "lzh", "application/x-lzh", //$NON-NLS-1$ //$NON-NLS-2$
- "lzx", "application/lzx", //$NON-NLS-1$ //$NON-NLS-2$
- "lzx", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "lzx", "application/x-lzx", //$NON-NLS-1$ //$NON-NLS-2$
-
- "m", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "m", "text/x-m", //$NON-NLS-1$ //$NON-NLS-2$
- "m1v", "video/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "m2a", "audio/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "m2v", "video/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "m3u", "audio/x-mpequrl", //$NON-NLS-1$ //$NON-NLS-2$
- "man", "application/x-troff-man", //$NON-NLS-1$ //$NON-NLS-2$
- "map", "application/x-navimap", //$NON-NLS-1$ //$NON-NLS-2$
- "mar", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "mbd", "application/mbedlet", //$NON-NLS-1$ //$NON-NLS-2$
- "mcd", "application/mcad", //$NON-NLS-1$ //$NON-NLS-2$
- "mcd", "application/x-mathcad", //$NON-NLS-1$ //$NON-NLS-2$
- "mcf", "image/vasa", //$NON-NLS-1$ //$NON-NLS-2$
- "mcf", "text/mcf", //$NON-NLS-1$ //$NON-NLS-2$
- "mcp", "application/netmc", //$NON-NLS-1$ //$NON-NLS-2$
- "me", "application/x-troff-me", //$NON-NLS-1$ //$NON-NLS-2$
- "mht", "message/rfc822", //$NON-NLS-1$ //$NON-NLS-2$
- "mhtml", "message/rfc822", //$NON-NLS-1$ //$NON-NLS-2$
- "mid", "audio/midi", //$NON-NLS-1$ //$NON-NLS-2$
- "mid", "application/x-midi", //$NON-NLS-1$ //$NON-NLS-2$
- "mid", "audio/x-mid", //$NON-NLS-1$ //$NON-NLS-2$
- "mid", "audio/x-midi", //$NON-NLS-1$ //$NON-NLS-2$
- "mid", "music/crescendo", //$NON-NLS-1$ //$NON-NLS-2$
- "mid", "x-music/x-midi", //$NON-NLS-1$ //$NON-NLS-2$
- "midi", "audio/midi", //$NON-NLS-1$ //$NON-NLS-2$
- "midi", "application/x-midi", //$NON-NLS-1$ //$NON-NLS-2$
- "midi", "audio/x-mid", //$NON-NLS-1$ //$NON-NLS-2$
- "midi", "audio/x-midi", //$NON-NLS-1$ //$NON-NLS-2$
- "midi", "music/crescendo", //$NON-NLS-1$ //$NON-NLS-2$
- "midi", "x-music/x-midi", //$NON-NLS-1$ //$NON-NLS-2$
- "mif", "application/x-frame", //$NON-NLS-1$ //$NON-NLS-2$
- "mif", "application/x-mif", //$NON-NLS-1$ //$NON-NLS-2$
- "mime", "www/mime", //$NON-NLS-1$ //$NON-NLS-2$
- "mime", "message/rfc822", //$NON-NLS-1$ //$NON-NLS-2$
- "mjpg", "video/x-motion-jpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mm", "application/base64", //$NON-NLS-1$ //$NON-NLS-2$
- "mm", "application/x-meme", //$NON-NLS-1$ //$NON-NLS-2$
- "mme", "application/base64", //$NON-NLS-1$ //$NON-NLS-2$
- "mod", "audio/mod", //$NON-NLS-1$ //$NON-NLS-2$
- "mod", "audio/x-mod", //$NON-NLS-1$ //$NON-NLS-2$
- "moov", "video/quicktime", //$NON-NLS-1$ //$NON-NLS-2$
- "mov", "video/quicktime", //$NON-NLS-1$ //$NON-NLS-2$
- "movie", "video/x-sgi-movie", //$NON-NLS-1$ //$NON-NLS-2$
- "mp2", "audio/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mp2", "audio/x-mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mp2", "video/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mp2", "video/x-mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mp2", "video/x-mpeq2a", //$NON-NLS-1$ //$NON-NLS-2$
- "mp3", "audio/mpeg3", //$NON-NLS-1$ //$NON-NLS-2$
- "mp3", "audio/x-mpeg-3", //$NON-NLS-1$ //$NON-NLS-2$
- "mp3", "video/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mp3", "video/x-mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mpa", "audio/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mpa", "video/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mpc", "application/x-project", //$NON-NLS-1$ //$NON-NLS-2$
- "mpe", "video/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mpeg", "video/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mpg", "audio/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mpg", "video/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mpga", "audio/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mpp", "application/vnd.ms-project", //$NON-NLS-1$ //$NON-NLS-2$
- "mpt", "application/x-project", //$NON-NLS-1$ //$NON-NLS-2$
- "mpv", "application/x-project", //$NON-NLS-1$ //$NON-NLS-2$
- "mpx", "application/x-project", //$NON-NLS-1$ //$NON-NLS-2$
- "mrc", "application/marc", //$NON-NLS-1$ //$NON-NLS-2$
- "ms", "application/x-troff-ms", //$NON-NLS-1$ //$NON-NLS-2$
- "mv", "video/x-sgi-movie", //$NON-NLS-1$ //$NON-NLS-2$
- "my", "audio/make", //$NON-NLS-1$ //$NON-NLS-2$
- "mzz", "application/x-vnd.audioexplosion.mzz", //$NON-NLS-1$ //$NON-NLS-2$
-
- "nap", "image/naplps", //$NON-NLS-1$ //$NON-NLS-2$
- "naplps", "image/naplps", //$NON-NLS-1$ //$NON-NLS-2$
- "nc", "application/x-netcdf", //$NON-NLS-1$ //$NON-NLS-2$
- "ncm", "application/vnd.nokia.configuration-message", //$NON-NLS-1$ //$NON-NLS-2$
- "nif", "image/x-niff", //$NON-NLS-1$ //$NON-NLS-2$
- "niff", "image/x-niff", //$NON-NLS-1$ //$NON-NLS-2$
- "nix", "application/x-mix-transfer", //$NON-NLS-1$ //$NON-NLS-2$
- "nsc", "application/x-conference", //$NON-NLS-1$ //$NON-NLS-2$
- "nvd", "application/x-navidoc", //$NON-NLS-1$ //$NON-NLS-2$
- "o", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "oda", "application/oda", //$NON-NLS-1$ //$NON-NLS-2$
- "omc", "application/x-omc", //$NON-NLS-1$ //$NON-NLS-2$
- "omcd", "application/x-omcdatamaker", //$NON-NLS-1$ //$NON-NLS-2$
- "omcr", "application/x-omcregerator", //$NON-NLS-1$ //$NON-NLS-2$
-
- "p", "text/x-pascal", //$NON-NLS-1$ //$NON-NLS-2$
- "p10", "application/pkcs10", //$NON-NLS-1$ //$NON-NLS-2$
- "p10", "application/x-pkcs10", //$NON-NLS-1$ //$NON-NLS-2$
- "p12", "application/pkcs-12", //$NON-NLS-1$ //$NON-NLS-2$
- "p12", "application/x-pkcs12", //$NON-NLS-1$ //$NON-NLS-2$
- "p7a", "application/x-pkcs7-signature", //$NON-NLS-1$ //$NON-NLS-2$
- "p7c", "application/pkcs7-mime", //$NON-NLS-1$ //$NON-NLS-2$
- "p7c", "application/x-pkcs7-mime", //$NON-NLS-1$ //$NON-NLS-2$
- "p7m", "application/pkcs7-mime", //$NON-NLS-1$ //$NON-NLS-2$
- "p7m", "application/x-pkcs7-mime", //$NON-NLS-1$ //$NON-NLS-2$
- "p7r", "application/x-pkcs7-certreqresp", //$NON-NLS-1$ //$NON-NLS-2$
- "p7s", "application/pkcs7-signature", //$NON-NLS-1$ //$NON-NLS-2$
- "part", "application/pro_eng", //$NON-NLS-1$ //$NON-NLS-2$
- "pas", "text/pascal", //$NON-NLS-1$ //$NON-NLS-2$
- "pbm", "image/x-portable-bitmap", //$NON-NLS-1$ //$NON-NLS-2$
- "pcl", "application/vnd.hp-pcl", //$NON-NLS-1$ //$NON-NLS-2$
- "pcl", "application/x-pcl", //$NON-NLS-1$ //$NON-NLS-2$
- "pct", "image/x-pict", //$NON-NLS-1$ //$NON-NLS-2$
- "pcx", "image/x-pcx", //$NON-NLS-1$ //$NON-NLS-2$
- "pdb", "chemical/x-pdb", //$NON-NLS-1$ //$NON-NLS-2$
- "pdf", "application/pdf", //$NON-NLS-1$ //$NON-NLS-2$
- "pfunk", "audio/make", //$NON-NLS-1$ //$NON-NLS-2$
- "pfunk", "audio/make.my.funk", //$NON-NLS-1$ //$NON-NLS-2$
- "pgm", "image/x-portable-graymap", //$NON-NLS-1$ //$NON-NLS-2$
- "pgm", "image/x-portable-greymap", //$NON-NLS-1$ //$NON-NLS-2$
- "pic", "image/pict", //$NON-NLS-1$ //$NON-NLS-2$
- "pict", "image/pict", //$NON-NLS-1$ //$NON-NLS-2$
- "pkg", "application/x-newton-compatible-pkg", //$NON-NLS-1$ //$NON-NLS-2$
- "pko", "application/vnd.ms-pki.pko", //$NON-NLS-1$ //$NON-NLS-2$
- "pl", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "pl", "text/x-script.perl", //$NON-NLS-1$ //$NON-NLS-2$
- "plx", "application/x-pixclscript", //$NON-NLS-1$ //$NON-NLS-2$
- "pm", "image/x-xpixmap", //$NON-NLS-1$ //$NON-NLS-2$
- "pm", "text/x-script.perl-module", //$NON-NLS-1$ //$NON-NLS-2$
- "pm4", "application/x-pagemaker", //$NON-NLS-1$ //$NON-NLS-2$
- "pm5", "application/x-pagemaker", //$NON-NLS-1$ //$NON-NLS-2$
- "png", "image/png", //$NON-NLS-1$ //$NON-NLS-2$
- "pnm", "application/x-portable-anymap", //$NON-NLS-1$ //$NON-NLS-2$
- "pnm", "image/x-portable-anymap", //$NON-NLS-1$ //$NON-NLS-2$
- "pot", "application/mspowerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "pot", "application/vnd.ms-powerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "pov", "model/x-pov", //$NON-NLS-1$ //$NON-NLS-2$
- "ppa", "application/vnd.ms-powerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "ppm", "image/x-portable-pixmap", //$NON-NLS-1$ //$NON-NLS-2$
- "pps", "application/mspowerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "pps", "application/vnd.ms-powerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "ppt", "application/mspowerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "ppt", "application/powerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "ppt", "application/vnd.ms-powerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "ppt", "application/x-mspowerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "ppz", "application/mspowerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "pre", "application/x-freelance", //$NON-NLS-1$ //$NON-NLS-2$
- "prt", "application/pro_eng", //$NON-NLS-1$ //$NON-NLS-2$
- "ps", "application/postscript", //$NON-NLS-1$ //$NON-NLS-2$
- "psd", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "pvu", "paleovu/x-pv", //$NON-NLS-1$ //$NON-NLS-2$
- "pwz", "application/vnd.ms-powerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "py", "text/x-script.phyton", //$NON-NLS-1$ //$NON-NLS-2$
- "pyc", "applicaiton/x-bytecode.python", //$NON-NLS-1$ //$NON-NLS-2$
- "qcp", "audio/vnd.qcelp", //$NON-NLS-1$ //$NON-NLS-2$
- "qd3", "x-world/x-3dmf", //$NON-NLS-1$ //$NON-NLS-2$
- "qd3d", "x-world/x-3dmf", //$NON-NLS-1$ //$NON-NLS-2$
- "qif", "image/x-quicktime", //$NON-NLS-1$ //$NON-NLS-2$
- "qt", "video/quicktime", //$NON-NLS-1$ //$NON-NLS-2$
- "qtc", "video/x-qtc", //$NON-NLS-1$ //$NON-NLS-2$
- "qti", "image/x-quicktime", //$NON-NLS-1$ //$NON-NLS-2$
- "qtif", "image/x-quicktime", //$NON-NLS-1$ //$NON-NLS-2$
- "ra", "audio/x-pn-realaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "ra", "audio/x-pn-realaudio-plugin", //$NON-NLS-1$ //$NON-NLS-2$
- "ra", "audio/x-realaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "ram", "audio/x-pn-realaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "ras", "application/x-cmu-raster", //$NON-NLS-1$ //$NON-NLS-2$
- "ras", "image/cmu-raster", //$NON-NLS-1$ //$NON-NLS-2$
- "ras", "image/x-cmu-raster", //$NON-NLS-1$ //$NON-NLS-2$
- "rast", "image/cmu-raster", //$NON-NLS-1$ //$NON-NLS-2$
- "rexx", "text/x-script.rexx", //$NON-NLS-1$ //$NON-NLS-2$
- "rf", "image/vnd.rn-realflash", //$NON-NLS-1$ //$NON-NLS-2$
- "rgb", "image/x-rgb", //$NON-NLS-1$ //$NON-NLS-2$
- "rm", "application/vnd.rn-realmedia", //$NON-NLS-1$ //$NON-NLS-2$
- "rm", "audio/x-pn-realaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "rmi", "audio/mid", //$NON-NLS-1$ //$NON-NLS-2$
- "rmm", "audio/x-pn-realaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "rmp", "audio/x-pn-realaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "rmp", "audio/x-pn-realaudio-plugin", //$NON-NLS-1$ //$NON-NLS-2$
- "rng", "application/ringing-tones", //$NON-NLS-1$ //$NON-NLS-2$
- "rng", "application/vnd.nokia.ringing-tone", //$NON-NLS-1$ //$NON-NLS-2$
- "rnx", "application/vnd.rn-realplayer", //$NON-NLS-1$ //$NON-NLS-2$
- "roff", "application/x-troff", //$NON-NLS-1$ //$NON-NLS-2$
- "rp", "image/vnd.rn-realpix", //$NON-NLS-1$ //$NON-NLS-2$
- "rpm", "audio/x-pn-realaudio-plugin", //$NON-NLS-1$ //$NON-NLS-2$
- "rt", "text/richtext", //$NON-NLS-1$ //$NON-NLS-2$
- "rt", "text/vnd.rn-realtext", //$NON-NLS-1$ //$NON-NLS-2$
- "rtf", "application/rtf", //$NON-NLS-1$ //$NON-NLS-2$
- "rtf", "application/x-rtf", //$NON-NLS-1$ //$NON-NLS-2$
- "rtf", "text/richtext", //$NON-NLS-1$ //$NON-NLS-2$
- "rtx", "application/rtf", //$NON-NLS-1$ //$NON-NLS-2$
- "rtx", "text/richtext", //$NON-NLS-1$ //$NON-NLS-2$
- "rv", "video/vnd.rn-realvideo", //$NON-NLS-1$ //$NON-NLS-2$
-
- "s", "text/x-asm", //$NON-NLS-1$ //$NON-NLS-2$
- "s3m", "audio/s3m", //$NON-NLS-1$ //$NON-NLS-2$
- "saveme", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "sbk", "application/x-tbook", //$NON-NLS-1$ //$NON-NLS-2$
- "scm", "application/x-lotusscreencam", //$NON-NLS-1$ //$NON-NLS-2$
- "scm", "text/x-script.guile", //$NON-NLS-1$ //$NON-NLS-2$
- "scm", "text/x-script.scheme", //$NON-NLS-1$ //$NON-NLS-2$
- "scm", "video/x-scm", //$NON-NLS-1$ //$NON-NLS-2$
- "sdml", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "sdp", "application/sdp", //$NON-NLS-1$ //$NON-NLS-2$
- "sdp", "application/x-sdp", //$NON-NLS-1$ //$NON-NLS-2$
- "sdr", "application/sounder", //$NON-NLS-1$ //$NON-NLS-2$
- "sea", "application/sea", //$NON-NLS-1$ //$NON-NLS-2$
- "sea", "application/x-sea", //$NON-NLS-1$ //$NON-NLS-2$
- "set", "application/set", //$NON-NLS-1$ //$NON-NLS-2$
- "sgm", "text/sgml", //$NON-NLS-1$ //$NON-NLS-2$
- "sgm", "text/x-sgml", //$NON-NLS-1$ //$NON-NLS-2$
- "sgml", "text/sgml", //$NON-NLS-1$ //$NON-NLS-2$
- "sgml", "text/x-sgml", //$NON-NLS-1$ //$NON-NLS-2$
- "sh", "application/x-bsh", //$NON-NLS-1$ //$NON-NLS-2$
- "sh", "application/x-sh", //$NON-NLS-1$ //$NON-NLS-2$
- "sh", "application/x-shar", //$NON-NLS-1$ //$NON-NLS-2$
- "sh", "text/x-script.sh", //$NON-NLS-1$ //$NON-NLS-2$
- "shar", "application/x-bsh", //$NON-NLS-1$ //$NON-NLS-2$
- "shar", "application/x-shar", //$NON-NLS-1$ //$NON-NLS-2$
- "shtml", "text/html", //$NON-NLS-1$ //$NON-NLS-2$
- "shtml", "text/x-server-parsed-html", //$NON-NLS-1$ //$NON-NLS-2$
- "sid", "audio/x-psid", //$NON-NLS-1$ //$NON-NLS-2$
- "sit", "application/x-sit", //$NON-NLS-1$ //$NON-NLS-2$
- "sit", "application/x-stuffit", //$NON-NLS-1$ //$NON-NLS-2$
- "skd", "application/x-koan", //$NON-NLS-1$ //$NON-NLS-2$
- "skm", "application/x-koan", //$NON-NLS-1$ //$NON-NLS-2$
- "skp", "application/x-koan", //$NON-NLS-1$ //$NON-NLS-2$
- "skt", "application/x-koan", //$NON-NLS-1$ //$NON-NLS-2$
- "sl", "application/x-seelogo", //$NON-NLS-1$ //$NON-NLS-2$
- "smi", "application/smil", //$NON-NLS-1$ //$NON-NLS-2$
- "smil", "application/smil", //$NON-NLS-1$ //$NON-NLS-2$
- "snd", "audio/basic", //$NON-NLS-1$ //$NON-NLS-2$
- "snd", "audio/x-adpcm", //$NON-NLS-1$ //$NON-NLS-2$
- "sol", "application/solids", //$NON-NLS-1$ //$NON-NLS-2$
- "spc", "application/x-pkcs7-certificates", //$NON-NLS-1$ //$NON-NLS-2$
- "spc", "text/x-speech", //$NON-NLS-1$ //$NON-NLS-2$
- "spl", "application/futuresplash", //$NON-NLS-1$ //$NON-NLS-2$
- "spr", "application/x-sprite", //$NON-NLS-1$ //$NON-NLS-2$
- "sprite", "application/x-sprite", //$NON-NLS-1$ //$NON-NLS-2$
- "src", "application/x-wais-source", //$NON-NLS-1$ //$NON-NLS-2$
- "ssi", "text/x-server-parsed-html", //$NON-NLS-1$ //$NON-NLS-2$
- "ssm", "application/streamingmedia", //$NON-NLS-1$ //$NON-NLS-2$
- "sst", "application/vnd.ms-pki.certstore", //$NON-NLS-1$ //$NON-NLS-2$
- "step", "application/step", //$NON-NLS-1$ //$NON-NLS-2$
- "stl", "application/sla", //$NON-NLS-1$ //$NON-NLS-2$
- "stl", "application/vnd.ms-pki.stl", //$NON-NLS-1$ //$NON-NLS-2$
- "stl", "application/x-navistyle", //$NON-NLS-1$ //$NON-NLS-2$
- "stp", "application/step", //$NON-NLS-1$ //$NON-NLS-2$
- "sv4cpio", "application/x-sv4cpio", //$NON-NLS-1$ //$NON-NLS-2$
- "sv4crc", "application/x-sv4crc", //$NON-NLS-1$ //$NON-NLS-2$
- "svf", "image/vnd.dwg", //$NON-NLS-1$ //$NON-NLS-2$
- "svf", "image/x-dwg", //$NON-NLS-1$ //$NON-NLS-2$
- "svr", "application/x-world", //$NON-NLS-1$ //$NON-NLS-2$
- "svr", "x-world/x-svr", //$NON-NLS-1$ //$NON-NLS-2$
- "swf", "application/x-shockwave-flash", //$NON-NLS-1$ //$NON-NLS-2$
-
- "t", "application/x-troff", //$NON-NLS-1$ //$NON-NLS-2$
- "talk", "text/x-speech", //$NON-NLS-1$ //$NON-NLS-2$
- "tar", "application/x-tar", //$NON-NLS-1$ //$NON-NLS-2$
- "tbk", "application/toolbook", //$NON-NLS-1$ //$NON-NLS-2$
- "tbk", "application/x-tbook", //$NON-NLS-1$ //$NON-NLS-2$
- "tcl", "application/x-tcl", //$NON-NLS-1$ //$NON-NLS-2$
- "tcl", "text/x-script.tcl", //$NON-NLS-1$ //$NON-NLS-2$
- "tcsh", "text/x-script.tcsh", //$NON-NLS-1$ //$NON-NLS-2$
- "tex", "application/x-tex", //$NON-NLS-1$ //$NON-NLS-2$
- "texi", "application/x-texinfo", //$NON-NLS-1$ //$NON-NLS-2$
- "texinfo", "application/x-texinfo", //$NON-NLS-1$ //$NON-NLS-2$
- "text", "application/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "text", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "tgz", "application/gnutar", //$NON-NLS-1$ //$NON-NLS-2$
- "tgz", "application/x-compressed", //$NON-NLS-1$ //$NON-NLS-2$
- "tif", "image/tiff", //$NON-NLS-1$ //$NON-NLS-2$
- "tif", "image/x-tiff", //$NON-NLS-1$ //$NON-NLS-2$
- "tiff", "image/tiff", //$NON-NLS-1$ //$NON-NLS-2$
- "tiff", "image/x-tiff", //$NON-NLS-1$ //$NON-NLS-2$
- "tr", "application/x-troff", //$NON-NLS-1$ //$NON-NLS-2$
- "tsi", "audio/tsp-audio", //$NON-NLS-1$ //$NON-NLS-2$
- "tsp", "application/dsptype", //$NON-NLS-1$ //$NON-NLS-2$
- "tsp", "audio/tsplayer", //$NON-NLS-1$ //$NON-NLS-2$
- "tsv", "text/tab-separated-values", //$NON-NLS-1$ //$NON-NLS-2$
- "turbot", "image/florian", //$NON-NLS-1$ //$NON-NLS-2$
- "txt", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
-
- "uil", "text/x-uil", //$NON-NLS-1$ //$NON-NLS-2$
- "uni", "text/uri-list", //$NON-NLS-1$ //$NON-NLS-2$
- "unis", "text/uri-list", //$NON-NLS-1$ //$NON-NLS-2$
- "unv", "application/i-deas", //$NON-NLS-1$ //$NON-NLS-2$
- "uri", "text/uri-list", //$NON-NLS-1$ //$NON-NLS-2$
- "uris", "text/uri-list", //$NON-NLS-1$ //$NON-NLS-2$
- "ustar", "application/x-ustar", //$NON-NLS-1$ //$NON-NLS-2$
- "ustar", "multipart/x-ustar", //$NON-NLS-1$ //$NON-NLS-2$
- "uu", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "uu", "text/x-uuencode", //$NON-NLS-1$ //$NON-NLS-2$
- "uue", "text/x-uuencode", //$NON-NLS-1$ //$NON-NLS-2$
-
- "vcd", "application/x-cdlink", //$NON-NLS-1$ //$NON-NLS-2$
- "vcs", "text/x-vcalendar", //$NON-NLS-1$ //$NON-NLS-2$
- "vda", "application/vda", //$NON-NLS-1$ //$NON-NLS-2$
- "vdo", "video/vdo", //$NON-NLS-1$ //$NON-NLS-2$
- "vew", "application/groupwise", //$NON-NLS-1$ //$NON-NLS-2$
- "viv", "video/vivo", //$NON-NLS-1$ //$NON-NLS-2$
- "viv", "video/vnd.vivo", //$NON-NLS-1$ //$NON-NLS-2$
- "vivo", "video/vivo", //$NON-NLS-1$ //$NON-NLS-2$
- "vivo", "video/vnd.vivo", //$NON-NLS-1$ //$NON-NLS-2$
- "vmd", "application/vocaltec-media-desc", //$NON-NLS-1$ //$NON-NLS-2$
- "vmf", "application/vocaltec-media-file", //$NON-NLS-1$ //$NON-NLS-2$
- "voc", "audio/voc", //$NON-NLS-1$ //$NON-NLS-2$
- "voc", "audio/x-voc", //$NON-NLS-1$ //$NON-NLS-2$
- "vos", "video/vosaic", //$NON-NLS-1$ //$NON-NLS-2$
- "vox", "audio/voxware", //$NON-NLS-1$ //$NON-NLS-2$
- "vqe", "audio/x-twinvq-plugin", //$NON-NLS-1$ //$NON-NLS-2$
- "vqf", "audio/x-twinvq", //$NON-NLS-1$ //$NON-NLS-2$
- "vql", "audio/x-twinvq-plugin", //$NON-NLS-1$ //$NON-NLS-2$
- "vrml", "application/x-vrml", //$NON-NLS-1$ //$NON-NLS-2$
- "vrml", "model/vrml", //$NON-NLS-1$ //$NON-NLS-2$
- "vrml", "x-world/x-vrml", //$NON-NLS-1$ //$NON-NLS-2$
- "vrt", "x-world/x-vrt", //$NON-NLS-1$ //$NON-NLS-2$
- "vsd", "application/x-visio", //$NON-NLS-1$ //$NON-NLS-2$
- "vst", "application/x-visio", //$NON-NLS-1$ //$NON-NLS-2$
- "vsw", "application/x-visio", //$NON-NLS-1$ //$NON-NLS-2$
-
- "w60", "application/wordperfect6.0", //$NON-NLS-1$ //$NON-NLS-2$
- "w61", "application/wordperfect6.1", //$NON-NLS-1$ //$NON-NLS-2$
- "w6w", "application/msword", //$NON-NLS-1$ //$NON-NLS-2$
- "wav", "audio/wav", //$NON-NLS-1$ //$NON-NLS-2$
- "wav", "audio/x-wav", //$NON-NLS-1$ //$NON-NLS-2$
- "wb1", "application/x-qpro", //$NON-NLS-1$ //$NON-NLS-2$
- "wbmp", "image/vnd.wap.wbmp", //$NON-NLS-1$ //$NON-NLS-2$
- "web", "application/vnd.xara", //$NON-NLS-1$ //$NON-NLS-2$
- "wiz", "application/msword", //$NON-NLS-1$ //$NON-NLS-2$
- "wk1", "application/x-123", //$NON-NLS-1$ //$NON-NLS-2$
- "wmf", "windows/metafile", //$NON-NLS-1$ //$NON-NLS-2$
- "wml", "text/vnd.wap.wml", //$NON-NLS-1$ //$NON-NLS-2$
- "wmlc", "application/vnd.wap.wmlc", //$NON-NLS-1$ //$NON-NLS-2$
- "wmls", "text/vnd.wap.wmlscript", //$NON-NLS-1$ //$NON-NLS-2$
- "wmlsc", "application/vnd.wap.wmlscriptc", //$NON-NLS-1$ //$NON-NLS-2$
- "word", "application/msword", //$NON-NLS-1$ //$NON-NLS-2$
- "wpd", "application/x-wpwin", //$NON-NLS-1$ //$NON-NLS-2$
- "wq1", "application/x-lotus", //$NON-NLS-1$ //$NON-NLS-2$
- "wri", "application/mswrite", //$NON-NLS-1$ //$NON-NLS-2$
- "wri", "application/x-wri", //$NON-NLS-1$ //$NON-NLS-2$
- "wrl", "application/x-world", //$NON-NLS-1$ //$NON-NLS-2$
- "wrl", "model/vrml", //$NON-NLS-1$ //$NON-NLS-2$
- "wrl", "x-world/x-vrml", //$NON-NLS-1$ //$NON-NLS-2$
- "wrz", "model/vrml", //$NON-NLS-1$ //$NON-NLS-2$
- "wrz", "x-world/x-vrml", //$NON-NLS-1$ //$NON-NLS-2$
- "wsc", "text/scriplet", //$NON-NLS-1$ //$NON-NLS-2$
- "wsrc", "application/x-wais-source", //$NON-NLS-1$ //$NON-NLS-2$
- "wtk", "application/x-wintalk", //$NON-NLS-1$ //$NON-NLS-2$
- "xbm", "image/x-xbitmap", //$NON-NLS-1$ //$NON-NLS-2$
- "xbm", "image/x-xbm", //$NON-NLS-1$ //$NON-NLS-2$
- "xbm", "image/xbm", //$NON-NLS-1$ //$NON-NLS-2$
- "xdr", "video/x-amt-demorun", //$NON-NLS-1$ //$NON-NLS-2$
- "xgz", "xgl/drawing", //$NON-NLS-1$ //$NON-NLS-2$
- "xif", "image/vnd.xiff", //$NON-NLS-1$ //$NON-NLS-2$
- "xl", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xla", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xla", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xla", "application/x-msexcel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlb", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlb", "application/vnd.ms-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlb", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlc", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlc", "application/vnd.ms-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlc", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xld", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xld", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlk", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlk", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xll", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xll", "application/vnd.ms-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xll", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlm", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlm", "application/vnd.ms-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlm", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xls", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xls", "application/vnd.ms-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xls", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xls", "application/x-msexcel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlt", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlt", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlv", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlv", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlw", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlw", "application/vnd.ms-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlw", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlw", "application/x-msexcel", //$NON-NLS-1$ //$NON-NLS-2$
- "xm", "audio/xm", //$NON-NLS-1$ //$NON-NLS-2$
- "xml", "application/xml", //$NON-NLS-1$ //$NON-NLS-2$
- "xml", "text/xml", //$NON-NLS-1$ //$NON-NLS-2$
- "xmz", "xgl/movie", //$NON-NLS-1$ //$NON-NLS-2$
- "xpix", "application/x-vnd.ls-xpix", //$NON-NLS-1$ //$NON-NLS-2$
- "xpm", "image/x-xpixmap", //$NON-NLS-1$ //$NON-NLS-2$
- "xpm", "image/xpm", //$NON-NLS-1$ //$NON-NLS-2$
- "x-png", "image/png", //$NON-NLS-1$ //$NON-NLS-2$
- "xsr", "video/x-amt-showrun", //$NON-NLS-1$ //$NON-NLS-2$
- "xwd", "image/x-xwd", //$NON-NLS-1$ //$NON-NLS-2$
- "xwd", "image/x-xwindowdump", //$NON-NLS-1$ //$NON-NLS-2$
- "xyz", "chemical/x-pdb", //$NON-NLS-1$ //$NON-NLS-2$
-
- "z", "application/x-compress", //$NON-NLS-1$ //$NON-NLS-2$
- "z", "application/x-compressed", //$NON-NLS-1$ //$NON-NLS-2$
- "zip", "application/x-compressed", //$NON-NLS-1$ //$NON-NLS-2$
- "zip", "application/x-zip-compressed", //$NON-NLS-1$ //$NON-NLS-2$
- "zip", "application/zip", //$NON-NLS-1$ //$NON-NLS-2$
- "zip", "multipart/x-zip", //$NON-NLS-1$ //$NON-NLS-2$
- "zoo", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "zsh", "text/x-script.zsh", //$NON-NLS-1$ //$NON-NLS-2$
- };
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecureAction.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecureAction.java
deleted file mode 100755
index 93a536db0..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecureAction.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver;
-
-import java.io.IOException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.security.AccessControlContext;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import org.osgi.framework.Bundle;
-
-/**
- * Utility class to execute common privileged code.
- */
-public class SecureAction {
- // make sure we use the correct controlContext;
- private AccessControlContext controlContext;
-
- /**
- * Constructs a new SecureAction object. The constructed SecureAction object
- * uses the caller's AccessControlContext to perform security checks
- */
- public SecureAction() {
- // save the control context to be used.
- this.controlContext = AccessController.getContext();
- }
-
- /**
- * Gets a resource from a bundle.
- * @param bundle the bundle to get the resource from
- * @param name The name of the resource
- * @return The URL of the resource
- */
-
- public URL getBundleResource(final Bundle bundle, final String name) {
- if (System.getSecurityManager() == null)
- return bundle.getResource(name);
- return (URL) AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- return bundle.getResource(name);
- }
- }, controlContext);
- }
-
- public URLConnection openURL(final URL url) throws IOException {
- if (System.getSecurityManager() == null)
- return open(url);
- try {
- return (URLConnection) AccessController.doPrivileged(new PrivilegedExceptionAction() {
- public Object run() throws IOException {
- return open(url);
- }
- }, controlContext);
- } catch(PrivilegedActionException ex) {
- throw (IOException) ex.getException();
- }
- }
-
- URLConnection open(final URL url)throws IOException
- {
- URLConnection connection = url.openConnection();
- connection.connect(); /* establish connection to check permissions */
- return connection;
- }
-
- /**
- * Returns a system property. Same as calling
- * System.getProperty(String,String).
- * @param property the property key.
- * @param def the default value if the property key does not exist.
- * @return the value of the property or the def value if the property
- * does not exist.
- */
- public String getProperty(final String property, final String def) {
- if (System.getSecurityManager() == null)
- return System.getProperty(property, def);
- return (String) AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- return System.getProperty(property, def);
- }
- }, controlContext);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecureContext.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecureContext.java
deleted file mode 100644
index a9fc4e5f4..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecureContext.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver;
-
-import java.net.URL;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.osgi.service.http.HttpContext;
-
-/**
- * The SecureContext can be used to add basic authentication to a path.
- * This implementation requires the user "Aladdin" to log in with the password "open sesame".
- */
-public class SecureContext implements HttpContext {
- private HttpContext theDefaultContext;
-
- public SecureContext(HttpContext defaultContext) {
- theDefaultContext = defaultContext;
- }
-
- public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) {
- String auth = request.getHeader("Authorization"); //$NON-NLS-1$
- // Response is Aladdin:open sesame in Base64 encoding (from RFC example)
- if (auth != null && "QWxhZGRpbjpvcGVuIHNlc2FtZQ==".equals(auth.substring(6))) //$NON-NLS-1$
- return true;
-
- // if not authorized or wrong user/password
- response.setHeader("WWW-Authenticate", "BASIC realm=\"p2 Http Testing Server (Aladdin, open sesame)\""); //$NON-NLS-1$//$NON-NLS-2$
- response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
- return false;
-
- }
-
- public String getMimeType(String name) {
- return theDefaultContext.getMimeType(name);
- }
-
- public URL getResource(String name) {
- return theDefaultContext.getResource(name);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecuredArtifactsContext.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecuredArtifactsContext.java
deleted file mode 100644
index 4b627f6eb..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecuredArtifactsContext.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.osgi.service.http.HttpContext;
-
-/**
- * The SecureContext can be used to add basic authentication to a path.
- * This implementation requires the user "Aladdin" to log in with the password "open sesame".
- */
-public class SecuredArtifactsContext extends SecureContext {
-
- public SecuredArtifactsContext(HttpContext defaultContext) {
- super(defaultContext);
- }
-
- public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) {
- String path = request.getRequestURI();
- if (path == null)
- return true;
-
- if (path.indexOf("features/") != -1 //$NON-NLS-1$
- || path.indexOf("plugins/") != -1 //$NON-NLS-1$
- || path.indexOf("binaries/") != -1) //$NON-NLS-1$
- return super.handleSecurity(request, response);
-
- return true;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/BasicResourceDelivery.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/BasicResourceDelivery.java
deleted file mode 100644
index 13dc0cf99..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/BasicResourceDelivery.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Cloudsmith Inc. - this copy and adaption to abstract servlet
- *******************************************************************************/
-package org.eclipse.equinox.p2.testserver.servlets;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Locale;
-import java.util.TimeZone;
-import javax.servlet.ServletException;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.eclipse.equinox.p2.testserver.Activator;
-import org.eclipse.equinox.p2.testserver.HttpConstants;
-import org.eclipse.equinox.p2.testserver.MimeLookup;
-import org.eclipse.equinox.p2.testserver.SecureAction;
-import org.osgi.service.http.HttpService;
-
-public class BasicResourceDelivery extends HttpServlet {
- private static final long serialVersionUID = 1L;
- // private static final String CHARSET = "utf-8"; //$NON-NLS-1$
- private SecureAction secureAction;
- private String alias;
- private URI path;
- protected static final String defaultMimeType = "application/octet-stream"; //$NON-NLS-1$
-
- /**
- * Delivers resources from the bundle, or from an absolute URI
- */
- public BasicResourceDelivery(String theAlias, URI thePath) {
- secureAction = new SecureAction();
- alias = theAlias;
- path = thePath;
- }
-
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
- URI resource = null;
- try {
- resource = getFilename(request.getRequestURI());
- } catch (URISyntaxException e) {
- /* ignore - just leave resource == null */
- }
-
- URL url = null;
- if (resource != null) {
- if (!resource.isAbsolute())
- url = getServletContext().getResource(resource.getPath());
- else
- url = resource.toURL();
- }
-
- if (url == null) {
- fileNotFound(resource, request, response);
- return;
- }
-
- // process cache control
- URLConnection conn = secureAction.openURL(url);
-
- long modifiedSince = request.getDateHeader("If-Modified-Since"); //$NON-NLS-1$
- if (modifiedSince >= 0) {
- long modified = getLastModified(conn);
- if ((modified > 0) && (modifiedSince >= modified)) {
- response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
- return;
- }
- }
- InputStream in;
- try {
- in = conn.getInputStream();
- } catch (IOException ex) {
- fileNotFound(resource, request, response);
- return;
- }
- try {
- // always set the default charset
- // not in Servlet 2.1 // response.setCharacterEncoding(CHARSET);
- deliver(conn, in, resource.toString(), request, response); // TODO: modify to resource==URI ?
- } finally {
- in.close();
- }
- }
-
- protected void deliver(URLConnection conn, InputStream in, String filename, HttpServletRequest request, HttpServletResponse response) throws IOException {
- this.doDeliver(conn, in, filename, request, response);
- }
-
- /**
- * Default method delivering content from a file. Subclasses should override this method
- * to deliver "broken content" (e.g. truncated, mismatched content length etc.).
- * This default method performs the same delivery as the default "register resource" in the
- * http service.
- * @param conn - The URLConnection to the resource
- * @param in - InputStream to read from
- * @param filename - the filename being read
- * @param request - the servlet request
- * @param response - the servlet response
- * @throws IOException - on errors
- */
- protected void doDeliver(URLConnection conn, InputStream in, String filename, HttpServletRequest request, HttpServletResponse response) throws IOException {
- // set when the resource was modified
- addDateHeader(response, HttpConstants.LAST_MODIFIED, getLastModified(conn));
- int statusCode = HttpHeaderToStatus(conn.getHeaderField(0));
-
- response.setStatus(statusCode != -1 ? HttpServletResponse.SC_OK : statusCode);
-
- int contentlength = getContentLength(conn);
- if (contentlength >= 0) {
- response.setContentLength(contentlength);
-
- String mimeType = computeMimeType(filename, conn);
- response.setContentType(mimeType);
-
- // We want to use a writer if we are sending text
- if (mimeType.startsWith("text/")) //$NON-NLS-1$
- {
- PrintWriter writer = response.getWriter();
-
- writer.flush(); /* write the headers and unbuffer the output */
-
- BufferedReader reader = new BufferedReader(new InputStreamReader(in));
-
- char buffer[] = new char[4096];
- int read;
- while ((read = reader.read(buffer, 0, buffer.length)) != -1) {
- writer.write(buffer, 0, read);
- }
- } else {
- ServletOutputStream out = response.getOutputStream();
-
- out.flush(); /* write the headers and unbuffer the output */
-
- byte buffer[] = new byte[4096];
- int read;
- while ((read = in.read(buffer, 0, buffer.length)) != -1) {
- out.write(buffer, 0, read);
- out.flush();
- }
- }
- }
- }
-
- protected void fileNotFound(URI file, HttpServletRequest request, HttpServletResponse response) throws IOException {
- response.sendError(HttpServletResponse.SC_NOT_FOUND, (file == null ? "<no file>" : file.toString()) + " not found"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- protected void doHead(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- URI resource = null;
- try {
- resource = getFilename(request.getRequestURI());
- } catch (URISyntaxException e) {
- /* ignore - just leave resource == null */
- }
-
- URL url = null;
- if (resource != null) {
- if (!resource.isAbsolute())
- url = getServletContext().getResource(resource.getPath());
- else
- url = resource.toURL();
- }
-
- if (url == null) {
- fileNotFound(resource, request, response);
- return;
- }
- URLConnection conn = secureAction.openURL(url);
- // always set default charset
- // Not in Servlet 2.1 // response.setCharacterEncoding(CHARSET);
- doDeliverHead(resource.toString(), conn, request, response); // TODO: change API to use URI?
- }
-
- protected void deliverHead(String filename, URLConnection conn, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- this.doDeliverHead(filename, conn, request, response);
- }
-
- protected void doDeliverHead(String filename, URLConnection conn, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- int contentlength = getContentLength(conn);
- int statusCode = HttpHeaderToStatus(conn.getHeaderField(0));
- // set status = ok if there was no http header...
- response.setStatus(statusCode == -1 ? HttpServletResponse.SC_OK : statusCode);
- if (contentlength >= 0) {
- response.setContentLength(contentlength);
-
- String mimeType = computeMimeType(filename, conn);
- response.setContentType(mimeType);
- long modified = getLastModified(conn);
- addDateHeader(response, HttpConstants.LAST_MODIFIED, modified);
- } else {
- super.doHead(request, response);
- }
-
- }
-
- public int HttpHeaderToStatus(String httpHeader) {
- if (httpHeader == null)
- return -1;
- try {
- return Integer.valueOf((httpHeader.substring(9, 12))).intValue();
- } catch (IndexOutOfBoundsException e) {
- return -1;
- } catch (NumberFormatException e) {
- return -1;
- }
- }
-
- /**
- * Override to lie about last modified
- * @param conn
- * @return time in ms
- */
- protected long getLastModified(URLConnection conn) {
- return conn.getLastModified();
- }
-
- /**
- * Override to lie about content length
- * @param conn
- * @return length in bytes
- */
- protected int getContentLength(URLConnection conn) {
- return conn.getContentLength();
- }
-
- protected URI getFilename(String filename) throws URISyntaxException {
- //If the requested URI is equal to the Registeration's alias, send the file
- //corresponding to the alias. Otherwise, we have request for a file in an
- //registered directory (the file was not directly registered itself).
- if (filename.equals(alias)) {
- filename = path.getPath();
- } else {
- // The file we re looking for is the registered resource (alias) + the rest of the
- // filename that is not part of the registered resource. For example, if we export
- // /a to /tmp and we have a request for /a/b/foo.txt, then /tmp is our directory
- // (file.toString()) and /b/foo.txt is the rest.
- // The result is that we open the file /tmp/b/foo.txt.
-
- int aliaslen = alias.length();
- int pathlen = path.getPath().length();
-
- if (pathlen == 1) /* path == "/" */
- {
- if (aliaslen > 1) /* alias != "/" */
- {
- filename = filename.substring(aliaslen);
- }
- } else /* path != "/" */
- {
- StringBuffer buf = new StringBuffer(aliaslen + pathlen);
- buf.append(path.getPath());
-
- if (aliaslen == 1) /* alias == "/" */
- {
- buf.append(filename);
- } else /* alias != "/" */
- {
- buf.append(filename.substring(aliaslen));
- }
-
- filename = buf.toString();
- }
- }
- return new URI(path.getScheme(), path.getUserInfo(), path.getHost(), path.getPort(), filename, path.getQuery(), path.getFragment());
- // return (filename);
- }
-
- /**
- * This method returns the correct MIME type of a given URI by first checking
- * the HttpContext::getMimeType and, if null, checking the httpservice's MIMETypes table.
- * return mimetype with charset=utf-8 for all text/... types
- */
- protected String computeMimeType(String name, URLConnection conn) {
- String mimeType = computeMimeType2(name, conn);
- if (mimeType.startsWith("text/")) //$NON-NLS-1$
- return mimeType + "; charset=utf-8"; //$NON-NLS-1$
- return mimeType;
- }
-
- protected String computeMimeType2(String name, URLConnection conn) {
- // use type set in connection if it is available
- String mimeType = conn.getContentType();
- if (mimeType != null) {
- return (mimeType);
- }
- // use type from context
- mimeType = getServletContext().getMimeType(name);
- if (mimeType != null) {
- return (mimeType);
- }
- // try the "extras"
- return MimeLookup.getMimeType(name);
- }
-
- public HttpService getHttpService() {
- return Activator.getInstance().getHttp();
- }
-
- public static final DateFormat PATTERN_RFC1123 = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US); //$NON-NLS-1$
-
- /**
- * Support setting date header - in servlet > 2.1 it is possible to call this method directly on the HttpResponse.
- * @param response
- * @param name
- * @param timestamp
- */
- public void addDateHeader(HttpServletResponse response, String name, long timestamp) {
- DateFormat df = PATTERN_RFC1123;
- // must always be GMT
- df.setTimeZone(TimeZone.getTimeZone("GMT")); //$NON-NLS-1$
- response.setHeader(name, df.format(new Date(timestamp)));
-
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/ChopAndDelay.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/ChopAndDelay.java
deleted file mode 100644
index c8e823c8f..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/ChopAndDelay.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver.servlets;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.net.URI;
-import java.net.URLConnection;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.eclipse.equinox.p2.testserver.LinearChange;
-
-/**
- * The ChopAndDelay deliver the content chopped up in smaller packets and adds delay
- * between packets.
- *
- */
-public class ChopAndDelay extends BasicResourceDelivery {
-
- int chopFactor;
- private LinearChange delayFunction;
- private long msDelay;
- private int fastPercent;
-
- /**
- * Create a file molester that turns content into gibberish.
- *
- * @param theAlias the path this servlet is registered under
- * @param thePath the path to use as root for the alias
- * @param chopFactor - a value between 1 and 12 where 1 is one byte, and 12 is 4k bytes at a time.
- * @param delayFunction - function returning a series of delay values
- */
- public ChopAndDelay(String theAlias, URI thePath, int chopFactor, int fastPercent, LinearChange delayFunction) {
- super(theAlias, thePath);
- if (chopFactor < 1 || chopFactor > 12)
- throw new IllegalArgumentException("chopFactor must be between 1 and 12 (inclusive) - was:" + Integer.valueOf(chopFactor)); //$NON-NLS-1$
- this.chopFactor = chopFactor;
- if (fastPercent < 0 || fastPercent > 100)
- throw new IllegalArgumentException("fastPercent must be 0-100 - was:" + Integer.valueOf(fastPercent)); //$NON-NLS-1$
- this.fastPercent = fastPercent;
- this.delayFunction = delayFunction;
- msDelay = 0L;
- this.delayFunction = delayFunction;
- if (this.delayFunction.hasNext())
- msDelay = delayFunction.next();
- }
-
- private static final long serialVersionUID = 1L;
-
- protected void deliver(URLConnection conn, InputStream in, String filename, HttpServletRequest request, HttpServletResponse response) throws IOException {
- // chop up all files
- doChop(conn, in, filename, request, response);
- }
-
- protected void doChop(URLConnection conn, InputStream in, String filename, HttpServletRequest request, HttpServletResponse response) throws IOException {
- LinearChange delayer = delayFunction.fork();
- int contentlength = conn.getContentLength();
- if (contentlength >= 0) {
- response.setContentLength(contentlength);
-
- String mimeType = computeMimeType(filename, conn);
- response.setContentType(mimeType);
-
- // We want to use a writer if we are sending text
- if (mimeType.startsWith("text/")) //$NON-NLS-1$
- {
- PrintWriter writer = response.getWriter();
-
- writer.flush(); /* write the headers and unbuffer the output */
-
- BufferedReader reader = new BufferedReader(new InputStreamReader(in));
-
- int chunksize = 1 << chopFactor;
- char buffer[] = new char[4096];
- int read;
- int totalRead = 0;
- boolean delay = fastPercent == 0 ? true : false;
- while ((read = reader.read(buffer, 0, buffer.length)) != -1) {
- int nChunks = read / chunksize + (read % chunksize > 0 ? 1 : 0);
- for (int i = 0; i < nChunks; i++) {
- writer.write(buffer, i * chunksize, Math.min(chunksize, read - i * chunksize));
- writer.flush();
- if (delay && msDelay > 0)
- try {
- Thread.sleep(msDelay);
- } catch (InterruptedException e) {
- // ignore
- }
- if (delay && delayer.hasNext())
- msDelay = delayer.next();
- }
- totalRead += read;
- if (totalRead > contentlength * fastPercent / 100)
- delay = true;
- }
- } else {
- ServletOutputStream out = response.getOutputStream();
-
- out.flush(); /* write the headers and unbuffer the output */
-
- int chunksize = 1 << chopFactor;
- byte buffer[] = new byte[4096];
- int read;
- int totalRead = 0;
- boolean delay = fastPercent == 0 ? true : false;
- while ((read = in.read(buffer, 0, buffer.length)) != -1) {
- int nChunks = read / chunksize + (read % chunksize > 0 ? 1 : 0);
- for (int i = 0; i < nChunks; i++) {
- out.write(buffer, i * chunksize, Math.min(chunksize, read - i * chunksize));
- out.flush();
- if (delay && msDelay > 0)
- try {
- Thread.sleep(msDelay);
- } catch (InterruptedException e) {
- // ignore
- }
- if (delay && delayer.hasNext())
- msDelay = delayer.next();
- }
- totalRead += read;
- if (totalRead > contentlength * fastPercent / 100)
- delay = true;
- }
- }
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/ContentLengthLier.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/ContentLengthLier.java
deleted file mode 100644
index 98a037736..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/ContentLengthLier.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver.servlets;
-
-import java.net.URI;
-import java.net.URLConnection;
-
-public class ContentLengthLier extends BasicResourceDelivery {
-
- double keepFactor;
-
- /**
- * The ContentLengthLier sets the content length to a percentage of the original length.
- * Values between 0 and 200 can be used (to lie about files being both smaller < 100, or larger > 100).
- *
- * @param theAlias
- * @param thePath
- * @param keepPercent - how much to lie between 0 and 200 (inclusive)
- */
- public ContentLengthLier(String theAlias, URI thePath, int keepPercent) {
- super(theAlias, thePath);
- if (keepPercent < 0 || keepPercent > 200)
- throw new IllegalArgumentException("keepPercent must be between 0 and 200 - was:" + Integer.valueOf(keepPercent)); //$NON-NLS-1$
- keepFactor = keepPercent / 100.0;
- }
-
- private static final long serialVersionUID = 1L;
-
- protected int getContentLength(URLConnection conn) {
- int contentLength = conn.getContentLength();
- return (contentLength >= 0) ? (int) (contentLength * keepFactor) : contentLength;
-
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/FileMolester.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/FileMolester.java
deleted file mode 100644
index 3a5485230..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/FileMolester.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver.servlets;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.net.URI;
-import java.net.URLConnection;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * The FileMolester will keep a certain amount of the file from the beginning, and return
- * garbage/gibberish for the rest of the file's content. The garbage is produced by shifting every
- * byte 1 bit to the left.
- *
- * The idea for keeping some percentage is to support keeping xml headers / doctype etc.
- */
-public class FileMolester extends BasicResourceDelivery {
-
- int keepLength;
-
- /**
- * Create a file molester that turns content into gibberish.
- *
- * @param theAlias the path this servlet is registered under
- * @param thePath the path to use as root for the alias
- * @param keepLength - how many bytes in the beginning that will be unmolested
- */
- public FileMolester(String theAlias, URI thePath, int keepLength) {
- super(theAlias, thePath);
- if (keepLength < 0)
- throw new IllegalArgumentException("keepLength must be >= 0 - was:" + Integer.valueOf(keepLength)); //$NON-NLS-1$
- this.keepLength = keepLength;
- }
-
- private static final long serialVersionUID = 1L;
-
- protected void deliver(URLConnection conn, InputStream in, String filename, HttpServletRequest request, HttpServletResponse response) throws IOException {
- // molest all files
- doMolest(conn, in, filename, request, response);
- }
-
- protected void doMolest(URLConnection conn, InputStream in, String filename, HttpServletRequest request, HttpServletResponse response) throws IOException {
- int contentlength = conn.getContentLength();
- if (contentlength >= 0) {
- response.setContentLength(contentlength);
-
- String mimeType = computeMimeType(filename, conn);
- response.setContentType(mimeType);
-
- // We want to use a writer if we are sending text
- if (mimeType.startsWith("text/")) //$NON-NLS-1$
- {
- PrintWriter writer = response.getWriter();
-
- writer.flush(); /* write the headers and unbuffer the output */
-
- BufferedReader reader = new BufferedReader(new InputStreamReader(in));
-
- char buffer[] = new char[4096];
- int read;
- int written = 0;
- while ((read = reader.read(buffer, 0, buffer.length)) != -1) {
- if (written + read > keepLength)
- molest(buffer, written, read);
- writer.write(buffer, 0, read);
- written += read;
- }
- } else {
- ServletOutputStream out = response.getOutputStream();
-
- out.flush(); /* write the headers and unbuffer the output */
-
- byte buffer[] = new byte[4096];
- int read;
- int written = 0;
- while ((read = in.read(buffer, 0, buffer.length)) != -1) {
- if (written + read > keepLength)
- molest(buffer, written, read);
- out.write(buffer, 0, read);
- written += read;
- }
- }
- }
- }
-
- /** Molest a char buffer */
- private void molest(char[] buffer, int written, int read) {
- int start = keepLength - written;
- if (start > read)
- return;
- for (int i = start < 0 ? 0 : start; i < read; i++)
- buffer[i] = (char) (buffer[i] << 1);
- }
-
- /** Molest a byte buffer */
- private void molest(byte[] buffer, int written, int read) {
- int start = keepLength - written;
- if (start > read)
- return;
- for (int i = start < 0 ? 0 : start; i < read; i++)
- buffer[i] = (byte) (buffer[i] << 1);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/HelloWorld.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/HelloWorld.java
deleted file mode 100644
index 7bc682803..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/HelloWorld.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver.servlets;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Simple "smoke test" servlet - for manual testing that the http server is running and is
- * capable of running servlets.
- */
-public class HelloWorld extends HttpServlet {
-
- private static final long serialVersionUID = 1L;
-
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
- response.setContentType("text/html"); //$NON-NLS-1$
- PrintWriter writer = response.getWriter();
- writer.println("<html>"); //$NON-NLS-1$
- writer.println("<body>"); //$NON-NLS-1$
- writer.println("Hello, Equinox Embedded HTTP World"); //$NON-NLS-1$
- writer.println("<br/>"); //$NON-NLS-1$
- writer.println("</body>"); //$NON-NLS-1$
- writer.println("</html>"); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/LastModifiedLier.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/LastModifiedLier.java
deleted file mode 100644
index 84d568ca1..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/LastModifiedLier.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver.servlets;
-
-import java.net.URI;
-import java.net.URLConnection;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Manipulates the last modified time of serviced files.
- * The manipulator will set all modified times to 0 if TYPE_ZERO is used, to 1 if TYPE_OLD is used,
- * to the current time if TYPE_NOW is used, and a value 24 hours into the future if TYPE_FUTURE is used.
- * (Future values are not allowed in HTTP - the server should guard against them and force the value
- * to be no bigger than the response date).
- * The TYPE_BAD will produce a HTTP header with wrong format for the date value (fails date parsing).
- *
- */
-public class LastModifiedLier extends BasicResourceDelivery {
-
- public static final int TYPE_ZERO = 1;
- public static final int TYPE_OLD = 2;
- public static final int TYPE_NOW = 3;
- public static final int TYPE_FUTURE = 4;
- public static final int TYPE_BAD = 5;
- private static final int TYPE_LAST = TYPE_BAD;
-
- private int type;
-
- /**
- * The LastModifiedLier returns a last modified time according to the parameter timeType.
- * It can be TYPE_ZERO, TYPE_OLD, TYPE_NOW, TYPE_FUTURE, or TYPE_BAD.
- *
- * @param theAlias
- * @param thePath
- * @param timeType - a TYPE_XXX constant defining what time to return
- */
- public LastModifiedLier(String theAlias, URI thePath, int timeType) {
- super(theAlias, thePath);
- if (timeType < TYPE_ZERO || timeType > TYPE_LAST)
- throw new IllegalArgumentException("unknown timeType, was:" + Integer.valueOf(timeType)); //$NON-NLS-1$
- type = timeType;
- }
-
- private static final long serialVersionUID = 1L;
-
- protected long getLastModified(URLConnection conn) {
- // ignore real value and lie based on constant
- return getLastModified();
- }
-
- private long getLastModified() {
- switch (type) {
- case TYPE_ZERO :
- return 0L;
- case TYPE_OLD :
- return 1000L;
- case TYPE_NOW :
- return System.currentTimeMillis();
- case TYPE_FUTURE :
- return System.currentTimeMillis() + 24 * 60 * 60 * 1000;
- }
- // should not happen
- return 0L;
- }
-
- public void addDateHeader(HttpServletResponse response, String name, long timestamp) {
- if (type != TYPE_BAD)
- super.addDateHeader(response, name, timestamp);
- else
- response.setHeader(name, "intentionally-bad-date"); //$NON-NLS-1$
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Redirector.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Redirector.java
deleted file mode 100644
index ab875afb0..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Redirector.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver.servlets;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.net.URI;
-import java.net.URISyntaxException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Redirects n times, before redirecting to final location (a path on same server).
- *
- */
-public class Redirector extends HttpServlet {
-
- private static final long serialVersionUID = 1L;
-
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
- response.setContentType("text/html"); //$NON-NLS-1$
- PrintWriter writer = response.getWriter();
- doStatus(request, response, writer);
- }
-
- protected void doStatus(HttpServletRequest request, HttpServletResponse response, PrintWriter writer) {
- String requestPath = request.getRequestURI();
- String[] result = requestPath.split("/"); //$NON-NLS-1$
- if (result.length < 3 && !"redirect".equalsIgnoreCase(result[1])) //$NON-NLS-1$
- {
- getServletContext().log("Error Servlet requires being configured to get /redirect/count paths. Example /redirect/500, got" + requestPath); //$NON-NLS-1$
- return;
- }
- // get the error code
- int iterations = 0;
- try {
- iterations = Integer.parseInt(result[2]);
- } catch (NumberFormatException e) {
- response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
- getServletContext().log("Number format exception in /redirect/count path.", e); //$NON-NLS-1$
- return;
- }
- String redirectPath;
- if (iterations == 0) {
- if (result.length > 3)
- redirectPath = requestPath.substring("/redirect/0".length()); //$NON-NLS-1$
- else
- redirectPath = null;
- } else {
- redirectPath = "/redirect/" + Integer.valueOf(iterations - 1); //$NON-NLS-1$
- for (int i = 3; i < result.length; i++)
- redirectPath += "/" + result[i]; //$NON-NLS-1$
- }
-
- if (redirectPath != null) {
- // perform a redirect
- URI location = null;
- try {
- location = new URI(request.getScheme(), null, request.getServerName(), request.getServerPort(), //
- redirectPath, null, null);
- } catch (URISyntaxException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
- htmlPage(writer, "Internal error constructing redirect URL", false); //$NON-NLS-1$
- return;
- }
-
- response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
- response.setHeader("Location", location.toString()); //$NON-NLS-1$
- } else {
- // set the errorCode as the response and write a message
- if (writer != null)
- htmlPage(writer, "Redirected Successfully", false); //$NON-NLS-1$
- }
- }
-
- public void doHead(HttpServletRequest request, HttpServletResponse response) {
- // produce same response as for GET, but no content (writer == null)
- doStatus(request, response, null);
- }
-
- private void htmlPage(PrintWriter writer, String body, boolean consoleOutput) {
- if (consoleOutput)
- System.err.println(body);
-
- writer.println("<html>"); //$NON-NLS-1$
- writer.println("<body>"); //$NON-NLS-1$
- writer.println(body);
- writer.println("<br/>"); //$NON-NLS-1$
- writer.println("</body>"); //$NON-NLS-1$
- writer.println("</html>"); //$NON-NLS-1$
- writer.flush();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/StatusCodeResponse.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/StatusCodeResponse.java
deleted file mode 100644
index d162dcd75..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/StatusCodeResponse.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver.servlets;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Produces a response with a status code specified in the request URI.
- * Requires to be registered for "/status" path. The request is made on the format
- * "/status/code/" where code is the HTTP integer status code. The path after /code/ can be
- * anything - it is always ignored.
- * The response to GET produces HTML text "Requested status: code".
- * The response to HEAD just produces the status header response.
- *
- */
-public class StatusCodeResponse extends HttpServlet {
-
- private static final long serialVersionUID = 1L;
-
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
- response.setContentType("text/html"); //$NON-NLS-1$
- PrintWriter writer = response.getWriter();
- doStatus(request, response, writer);
- }
-
- protected void doStatus(HttpServletRequest request, HttpServletResponse response, PrintWriter writer) {
- String requestPath = request.getRequestURI();
- String[] result = requestPath.split("/"); //$NON-NLS-1$
- if (result.length < 3 && !"status".equalsIgnoreCase(result[1])) //$NON-NLS-1$
- {
- getServletContext().log("Error Servlet requires being configured to get /status/statuscode paths. Example /status/500, got" + requestPath); //$NON-NLS-1$
- return;
- }
- // get the error code
- int errorCode = 0;
- try {
- errorCode = Integer.parseInt(result[2]);
- } catch (NumberFormatException e) {
- response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
- getServletContext().log("Number format exception in /status/statuscode path.", e); //$NON-NLS-1$
- return;
- }
-
- // set the errorCode as the response and write a message
- response.setStatus(errorCode);
- if (writer != null)
- htmlPage(writer, "Requested Status: " + Integer.valueOf(errorCode), false); //$NON-NLS-1$
- }
-
- public void doHead(HttpServletRequest request, HttpServletResponse response) {
- // produce same reponse as for GET, but no content (writer == null)
- doStatus(request, response, null);
- }
-
- private void htmlPage(PrintWriter writer, String body, boolean consoleOutput) {
- if (consoleOutput)
- System.err.println(body);
-
- writer.println("<html>"); //$NON-NLS-1$
- writer.println("<body>"); //$NON-NLS-1$
- writer.println(body);
- writer.println("<br/>"); //$NON-NLS-1$
- writer.println("</body>"); //$NON-NLS-1$
- writer.println("</html>"); //$NON-NLS-1$
- writer.flush();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/TimeOut.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/TimeOut.java
deleted file mode 100644
index e5544cd91..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/TimeOut.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver.servlets;
-
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * This servlet is a "black hole" - it just sleeps for an hour on any request.
- *
- */
-public class TimeOut extends HttpServlet {
-
- private static final long serialVersionUID = 1L;
- private static long MINUTES_MS = 1000 * 60; // minutes in ms
-
- protected void doGet(HttpServletRequest request, HttpServletResponse response) {
- doDelay();
- }
-
- private void doDelay() {
- // Do nothing...
- try {
- Thread.sleep(10 * MINUTES_MS); // sleep 10 minutes
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- protected void doHead(HttpServletRequest request, HttpServletResponse response) {
- doDelay();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Truncator.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Truncator.java
deleted file mode 100644
index 17c4bf636..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Truncator.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver.servlets;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.net.URI;
-import java.net.URLConnection;
-import javax.servlet.ServletException;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-public class Truncator extends BasicResourceDelivery {
-
- double keepFactor;
-
- public Truncator(String theAlias, URI thePath, int keepPercent) {
- super(theAlias, thePath);
- if (keepPercent < 0 || keepPercent > 100)
- throw new IllegalArgumentException("keepPercent must be between 0 and 100 - was:" + Integer.valueOf(keepPercent)); //$NON-NLS-1$
- keepFactor = keepPercent / 100.0;
- }
-
- private static final long serialVersionUID = 1L;
-
- protected void deliver(URLConnection conn, InputStream in, String filename, HttpServletRequest request, HttpServletResponse response) throws IOException {
- // truncate all files
- doTruncate(conn, in, filename, request, response);
- }
-
- protected void doTruncate(URLConnection conn, InputStream in, String filename, HttpServletRequest request, HttpServletResponse response) throws IOException {
- int contentlength = conn.getContentLength();
- if (contentlength >= 0) {
- response.setContentLength(contentlength);
-
- String mimeType = computeMimeType(filename, conn);
- response.setContentType(mimeType);
-
- // We want to use a writer if we are sending text
- if (mimeType.startsWith("text/")) //$NON-NLS-1$
- {
- PrintWriter writer = response.getWriter();
-
- writer.flush(); /* write the headers and unbuffer the output */
-
- BufferedReader reader = new BufferedReader(new InputStreamReader(in));
-
- char buffer[] = new char[4096];
- int read;
- int written = 0;
- while ((read = reader.read(buffer, 0, buffer.length)) != -1) {
- read = cap(contentlength, written, read);
- writer.write(buffer, 0, read);
- written += read;
- }
- } else {
- ServletOutputStream out = response.getOutputStream();
-
- out.flush(); /* write the headers and unbuffer the output */
-
- byte buffer[] = new byte[4096];
- int read;
- int written = 0;
- while ((read = in.read(buffer, 0, buffer.length)) != -1) {
- read = cap(contentlength, written, read);
- out.write(buffer, 0, read);
- written += read;
- }
- }
- }
- }
-
- /**
- * Returns read if entire amount should be read. Returns a lower number if
- * written + read > keepPercent of total
- * @param total
- * @param written
- * @param read
- * @return read, or a lower number if cap is reached
- */
- private int cap(int total, int written, int read) {
- int cap = (int) (keepFactor * total);
- return (read + written) > cap ? cap - written : read;
- }
-
- protected void deliverHead(String filename, URLConnection conn, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- // deliver normal head response
- super.doDeliverHead(filename, conn, request, response);
-
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/artifacts.xml b/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/artifacts.xml
deleted file mode 100644
index 19e55d746..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/artifacts.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<?artifactRepository class='org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository' version='1.0.0'?>
-<repository name='Good Test Repository' type='org.eclipse.equinox.p2.artifact.repository.simpleRepository' version='1' description='Good test repository description'>
- <properties size='3'>
- <property name='p2.compressed' value='false'/>
- <property name='p2.timestamp' value='1218734853468'/>
- <property name='p2.system' value='false'/>
- </properties>
- <mappings size='3'>
- <rule filter='(&amp; (classifier=osgi.bundle))' output='${repoUrl}/plugins/${id}_${version}.jar'/>
- <rule filter='(&amp; (classifier=binary))' output='${repoUrl}/binary/${id}_${version}'/>
- <rule filter='(&amp; (classifier=org.eclipse.update.feature))' output='${repoUrl}/features/${id}_${version}.jar'/>
- </mappings>
- <artifacts size='2'>
- <artifact classifier='osgi.bundle' id='aaPlugin' version='1.0.0'>
- <properties size='3'>
- <property name='artifact.size' value='469'/>
- <property name='download.size' value='469'/>
- <property name='download.contentType' value='application/zip'/>
- </properties>
- </artifact>
- <artifact classifier='org.eclipse.update.feature' id='aaFeature' version='1.0.0'>
- <properties size='2'>
- <property name='artifact.size' value='670'/>
- <property name='download.size' value='670'/>
- </properties>
- </artifact>
- </artifacts>
-</repository>
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/features/aaFeature_1.0.0.jar b/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/features/aaFeature_1.0.0.jar
deleted file mode 100644
index f800a9ad2..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/features/aaFeature_1.0.0.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/plugins/aaPlugin_1.0.0.jar b/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/plugins/aaPlugin_1.0.0.jar
deleted file mode 100644
index 65ff62b79..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/plugins/aaPlugin_1.0.0.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/readme.txt b/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/readme.txt
deleted file mode 100644
index 6fcc19b18..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/readme.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-This is a very simple artifact repository containing a single group IU (a feature), and
-a single bundle IU. This repository is used by ArtifactRepositoryManagerTest \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/index.html b/bundles/org.eclipse.equinox.p2.testserver/webfiles/index.html
deleted file mode 100644
index c07f8d265..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/index.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<html>
-<body>
-<h1>Welcome to the p2 test server</h1>
-<p>You can access all files under the "webfiles" folder in this bundle via either a "public" or "private"
-pseudoroot. Try the public link <a href="http://localhost:8080/public/index.html">here</a></p>
-<p>To access using a login, password, you simply use the pseudoroot "/private", and you will be asked to
-log in. The credentials are: user: <b>Aladdin</b>, password: <b>open sesame</b>. Try it
-<a href="http://localhost:8080/private/index.html">here</a></p>
-<p>The following real content is registered:</p>
-<ul>
-<li>/proxy/private/ - goes to http://http://download.eclipse.org/eclipse/updates/3.4, but requires authentication.</li>
-<li>/proxy/public/ - goes to http://http://download.eclipse.org/eclipse/updates/3.4, (useful in redirects).</li>
-<li>/proxy/never/ - goes to http://http://download.eclipse.org/eclipse/updates/3.4, but always fail authentication.</li>
-<li>/proxy/flipFlop/ - goes to http://http://download.eclipse.org/eclipse/updates/3.4, but fails authentication every second attempt.</li>
-<li>/proxy/truncated - goes to updates/3.4, but truncates all files</li>
-<li>/proxy/molested - goes to updates/3.4, but generates gibberish for all files</li>
-<li>/proxy/decelerate - goes to updates/3.4, but delivers files in very small delayed packets - delay increases.</li>
-<li>/proxy/decelerate2 - like /proxy/decelerate, but does not start delay until 80% of file has been processed. Good for progress bar testing.</li>
-<li>/proxy/readtimeout - When 10% of file has been processed, it delays deliver 10 minutes. Good for progress bar/cancel testing.</li>
-<li>/proxy/modified/... - goes to updates/3.4, but delivers various errors in "last modified" (see below)
- <ul><li>.../zero - all times are returned as 0</li>
- <li>.../old - all times are very old</li>
- <li>.../now - all times are the same as the request time</li>
- <li>.../future - all times are in the future (which is illegal in HTTP)</li>
- <li>.../bad - the time is not a date at all - the client should throw an error</li>
- </ul>
-</li>
-<li>/proxy/length/... - goes to updates/3.4, but delivers various content length errors (see below)
- <ul><li>.../zero - length is reported as 0 (but all content written to stream)</li>
- <li>.../less - less than the correct size is reported (all content written)</li>
- <li>.../more - double the correct size is reported (but only available content is written)</li>
- </ul>
-</li>
-</li>/proxy2/... - goes to http://www.eclipse.org/equinox/p2/testing/updateSite - the same
-paths as for /proxy/... are available.
-</li>
-</li>/proxy3/aprivate/... - goes to http://www.eclipse.org/equinox/p2/testing/updateSite. This proxy makes
-the subpaths .../plugins, and .../features, private.
-</li>
-</ul>
-<p>The content listed below is also available and can be accessed under:
-<ul><li>/public</li>
-<li>/private</li>
-<li>/never</li>
-<li>/flipFlop</li>
-<li>/truncated</li>
-<li>/molested</li>
-</ul>
-<p>Content</p>
-<ul>
-<li>.../ar/simple - a simple artifact repo with a feature and a plugin, uses artifact.xml</li>
-<li>.../mdr/composite - a composite meta data repository - consisting of two mdrs</li>
-<li>.../mdr/composite/one - a regular meta data repostory, uses content.xml</li>
-<li>.../updatesite - a classic update site with site.xml, features and plugins subdirectory</li>
-</ul>
-<p>The following two URL's are also available</p>
-<ul>
-<li>/timeout/ - a black hole - sleeps 10 minutes and produces no response.</li>
-<li>/status/nnn/xxxxx - returns the status-code "nnn", and text/html
-content, The xxxxx part is ignored. e.g. http://localhost:8080/status/500/ignored/part</li>
-<li>/redirect/nnn[/location] - redirects nnn times before redirecting to "location" - if no
-location is stated, a final page with message 'Redirected Successfully' is displayed.
-</ul>
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/index.xml b/bundles/org.eclipse.equinox.p2.testserver/webfiles/index.xml
deleted file mode 100644
index 9e25031b4..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/index.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<body>
-<h1>Welcome to the p2 test server</h1>
-<p>You can access all files under the "webfiles" folder in this bundle via either a "public" or "private"
-pseudoroot. Try the public link <a href="http://localhost:8080/public/index.html">here</a></p>
-<p>To access using a login, password, you simply use the pseudoroot "/private", and you will be asked to
-log in. The credentials are: user: <b>Aladdin</b>, password: <b>open sesame</b>. Try it
-<a href="http://localhost:8080/private/index.html">here</a></p>
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/two/content.xml b/bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/two/content.xml
deleted file mode 100644
index fd315dbb3..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/two/content.xml
+++ /dev/null
@@ -1,128 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<?metadataRepository class='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1.0.0'?>
-<repository name='update site: file:/C:/1target/provmiddle/org.eclipse.equinox.p2.tests/testData/updatesite/site' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1'>
- <properties size='3'>
- <property name='p2.system' value='true'/>
- <property name='p2.timestamp' value='1221680367875'/>
- <property name='site.checksum' value='2404093275'/>
- </properties>
- <units size='5'>
- <unit id='test.feature.feature.jar' version='1.0.0'>
- <provides size='3'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='test.feature.feature.jar' version='1.0.0'/>
- <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' version='1.0.0'/>
- <provided namespace='org.eclipse.update.feature' name='test.feature' version='1.0.0'/>
- </provides>
- <filter>
- (org.eclipse.update.install.features=true)
- </filter>
- <artifacts size='1'>
- <artifact classifier='org.eclipse.update.feature' id='test.feature' version='1.0.0'/>
- </artifacts>
- <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
- <touchpointData size='1'>
- <instructions size='1'>
- <instruction key='zipped'>
- true
- </instruction>
- </instructions>
- </touchpointData>
- <licenses size='1'>
- <license url='http://www.example.com/license'>
- [Enter License Description here.]
- </license>
- </licenses>
- <copyright url='http://www.example.com/copyright'>
- [Enter Copyright Description here.]
- </copyright>
- </unit>
- <unit id='test.bundle' version='1.0.0' singleton='false'>
- <update id='test.bundle' range='[0.0.0,1.0.0)' severity='0'/>
- <properties size='1'>
- <property name='org.eclipse.equinox.p2.partial.iu' value='true'/>
- </properties>
- <provides size='3'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='test.bundle' version='1.0.0'/>
- <provided namespace='osgi.bundle' name='test.bundle' version='1.0.0'/>
- <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
- </provides>
- <artifacts size='1'>
- <artifact classifier='osgi.bundle' id='test.bundle' version='1.0.0'/>
- </artifacts>
- <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
- <touchpointData size='1'>
- <instructions size='1'>
- <instruction key='manifest'>
- </instruction>
- </instructions>
- </touchpointData>
- </unit>
- <unit id='test.fragment' version='1.0.0' singleton='false'>
- <update id='test.fragment' range='[0.0.0,1.0.0)' severity='0'/>
- <properties size='1'>
- <property name='org.eclipse.equinox.p2.partial.iu' value='true'/>
- </properties>
- <provides size='3'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='test.fragment' version='1.0.0'/>
- <provided namespace='osgi.bundle' name='test.fragment' version='1.0.0'/>
- <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
- </provides>
- <artifacts size='1'>
- <artifact classifier='osgi.bundle' id='test.fragment' version='1.0.0'/>
- </artifacts>
- <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
- <touchpointData size='1'>
- <instructions size='1'>
- <instruction key='manifest'>
- </instruction>
- </instructions>
- </touchpointData>
- </unit>
- <unit id='test.feature.feature.group' version='1.0.0' singleton='false'>
- <update id='test.feature.feature.group' range='[0.0.0,1.0.0)' severity='0'/>
- <properties size='5'>
- <property name='org.eclipse.equinox.p2.name' value='%featurename'/>
- <property name='org.eclipse.equinox.p2.description' value='[Enter Feature Description here.]'/>
- <property name='org.eclipse.equinox.p2.description.url' value='http://www.example.com/description'/>
- <property name='org.eclipse.equinox.p2.type.group' value='true'/>
- <property name='df_LT.featurename' value='j the feature'/>
- </properties>
- <provides size='2'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='test.feature.feature.group' version='1.0.0'/>
- <provided namespace='org.eclipse.equinox.p2.localization' name='df_LT' version='1.0.0'/>
- </provides>
- <requires size='3'>
- <required namespace='org.eclipse.equinox.p2.iu' name='test.bundle' range='[1.0.0,1.0.0]'/>
- <required namespace='org.eclipse.equinox.p2.iu' name='test.fragment' range='[1.0.0,1.0.0]'/>
- <required namespace='org.eclipse.equinox.p2.iu' name='test.feature.feature.jar' range='[1.0.0,1.0.0]'>
- <filter>
- (org.eclipse.update.install.features=true)
- </filter>
- </required>
- </requires>
- <touchpoint id='null' version='0.0.0'/>
- <licenses size='1'>
- <license url='http://www.example.com/license'>
- [Enter License Description here.]
- </license>
- </licenses>
- <copyright url='http://www.example.com/copyright'>
- [Enter Copyright Description here.]
- </copyright>
- </unit>
- <unit id='Default' version='0.0.0'>
- <properties size='3'>
- <property name='org.eclipse.equinox.p2.name' value='Uncategorized'/>
- <property name='org.eclipse.equinox.p2.description' value='Default category for otherwise uncategorized features'/>
- <property name='org.eclipse.equinox.p2.type.category' value='true'/>
- </properties>
- <provides size='1'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='Default' version='0.0.0'/>
- </provides>
- <requires size='1'>
- <required namespace='org.eclipse.equinox.p2.iu' name='test.feature.feature.group' range='[1.0.0,1.0.0]'/>
- </requires>
- <touchpoint id='null' version='0.0.0'/>
- </unit>
- </units>
-</repository>
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/features/test.feature_1.0.0.jar b/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/features/test.feature_1.0.0.jar
deleted file mode 100644
index 80bbc69fd..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/features/test.feature_1.0.0.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/plugins/test.bundle_1.0.0.jar b/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/plugins/test.bundle_1.0.0.jar
deleted file mode 100644
index 00dd829d8..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/plugins/test.bundle_1.0.0.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/plugins/test.fragment_1.0.0.jar b/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/plugins/test.fragment_1.0.0.jar
deleted file mode 100644
index d033e2eda..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/plugins/test.fragment_1.0.0.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/site.xml b/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/site.xml
deleted file mode 100644
index 4e619773e..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/site.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <feature url="features/test.feature_1.0.0.jar" id="test.feature" version="1.0.0"/>
-</site>
diff --git a/bundles/org.eclipse.equinox.p2.tools/.project b/bundles/org.eclipse.equinox.p2.tools/.project
deleted file mode 100644
index a0af60111..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.tools</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.tools/README.txt b/bundles/org.eclipse.equinox.p2.tools/README.txt
deleted file mode 100644
index 295eb9a2f..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/README.txt
+++ /dev/null
@@ -1 +0,0 @@
-This project is now defunct and replaced by the org.eclipse.equinox.p2.repository.tools. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.classpath b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.project b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.project
deleted file mode 100644
index 18fa42e35..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.touchpoint.eclipse</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 1c4f1002d..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,330 +0,0 @@
-#Tue Dec 22 18:23:28 CET 2009
-eclipse.preferences.version=1
-instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 8bc0190ce..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:59:03 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF
deleted file mode 100644
index ded4824cf..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,49 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.touchpoint.eclipse;singleton:=true
-Bundle-Version: 2.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.touchpoint.eclipse.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.touchpoint.eclipse;version="2.0.0";x-friends:="org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.p2.extensionlocation",
- org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;version="2.0.0";x-internal:=true,
- org.eclipse.equinox.internal.p2.update;version="2.0.0";x-friends:="org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.p2.extensionlocation,org.eclipse.equinox.p2.directorywatcher",
- org.eclipse.equinox.p2.touchpoint.eclipse.query;version="2.0.0"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: javax.xml.parsers,
- org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.engine,
- org.eclipse.equinox.internal.p2.garbagecollector,
- org.eclipse.equinox.internal.provisional.frameworkadmin,
- org.eclipse.equinox.internal.provisional.p2.director;resolution:=optional,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.simpleconfigurator.manipulator,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.planner;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.publisher;resolution:=optional,
- org.eclipse.equinox.p2.publisher.eclipse;resolution:=optional,
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.simpleconfigurator.manipulator;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.service.datalocation;version="1.0.0",
- org.eclipse.osgi.service.environment;version="1.0.0",
- org.eclipse.osgi.service.resolver;version="1.2.0";resolution:=optional,
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.service.prefs;version="1.1.1",
- org.osgi.util.tracker;version="1.3.0",
- org.w3c.dom,
- org.xml.sax
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/about.html b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/build.properties b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/build.properties
deleted file mode 100644
index 0328daa18..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- about.html,\
- plugin.properties
-src.includes = about.html
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.properties b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.properties
deleted file mode 100644
index 079bdd86f..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Equinox Provisioning Eclipse Touchpoint
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.xml b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.xml
deleted file mode 100644
index ab256c131..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.xml
+++ /dev/null
@@ -1,236 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.5"?>
-<plugin>
- <extension point="org.eclipse.equinox.p2.engine.touchpoints" id="eclipse" name="Eclipse Touchpoint">
- <touchpoint
- type="org.eclipse.equinox.p2.osgi"
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint"
- version="1.0.0"/>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.AddJVMArgumentAction"
- name="addJvmArg"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.AddProgramArgumentAction"
- name="addProgramArg"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.AddRepositoryAction"
- name="addRepository"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.AddSourceBundleAction"
- name="addSourceBundle"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.CheckTrustAction"
- name="checkTrust"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ChmodAction"
- name="chmod"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.LinkAction"
- name="ln"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.CollectAction"
- name="collect"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction"
- name="installBundle"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallFeatureAction"
- name="installFeature"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.MarkStartedAction"
- name="markStarted"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.RemoveJVMArgumentAction"
- name="removeJvmArg"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.RemoveProgramArgumentAction"
- name="removeProgramArg"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.RemoveRepositoryAction"
- name="removeRepository"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.RemoveSourceBundleAction"
- name="removeSourceBundle"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetProgramPropertyAction"
- name="setFrameworkDependentProperty"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetProgramPropertyAction"
- name="setFrameworkIndependentProperty"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetLauncherNameAction"
- name="setLauncherName"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetProgramPropertyAction"
- name="setProgramProperty"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetStartLevelAction"
- name="setStartLevel"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.UninstallBundleAction"
- name="uninstallBundle"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.UninstallFeatureAction"
- name="uninstallFeature"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.garbagecollector.marksetproviders"
- id="EclipseTouchpoint">
- <run
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseMarkSetProvider"/>
- </extension>
- </plugin>
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml
deleted file mode 100644
index 1196437a4..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.touchpoint.eclipse</artifactId>
- <version>2.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Activator.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Activator.java
deleted file mode 100644
index 77f55296c..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Activator.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
- public static final String ID = "org.eclipse.equinox.p2.touchpoint.eclipse"; //$NON-NLS-1$
- private static BundleContext context = null;
-
- public void start(BundleContext ctx) throws Exception {
- Activator.context = ctx;
- }
-
- public void stop(BundleContext ctx) throws Exception {
- Activator.context = null;
- }
-
- public static BundleContext getContext() {
- return Activator.context;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/AggregatedBundleRepository.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/AggregatedBundleRepository.java
deleted file mode 100644
index b268d65ba..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/AggregatedBundleRepository.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import java.io.File;
-import java.io.OutputStream;
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.AbstractArtifactRepository;
-
-public class AggregatedBundleRepository extends AbstractArtifactRepository implements IFileArtifactRepository {
-
- private static final String REPOSITORY_TYPE = AggregatedBundleRepository.class.getName();
- private final Collection<IFileArtifactRepository> bundleRepositories;
-
- public AggregatedBundleRepository(IProvisioningAgent agent, Collection<IFileArtifactRepository> bundleRepositories) {
- super(agent, REPOSITORY_TYPE, REPOSITORY_TYPE, "1.0", null, null, null, null); //$NON-NLS-1$
- this.bundleRepositories = bundleRepositories;
- }
-
- public File getArtifactFile(IArtifactKey key) {
- for (IFileArtifactRepository repository : bundleRepositories) {
- File artifactFile = repository.getArtifactFile(key);
- if (artifactFile != null)
- return artifactFile;
- }
- return null;
- }
-
- public File getArtifactFile(IArtifactDescriptor descriptor) {
- for (IFileArtifactRepository repository : bundleRepositories) {
- File artifactFile = repository.getArtifactFile(descriptor);
- if (artifactFile != null)
- return artifactFile;
- }
- return null;
- }
-
- public boolean contains(IArtifactDescriptor descriptor) {
- for (IFileArtifactRepository repository : bundleRepositories) {
- if (repository.contains(descriptor))
- return true;
- }
- return false;
- }
-
- public boolean contains(IArtifactKey key) {
- for (IFileArtifactRepository repository : bundleRepositories) {
- if (repository.contains(key))
- return true;
- }
- return false;
- }
-
- public IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key) {
- Set<IArtifactDescriptor> artifactDescriptors = new HashSet<IArtifactDescriptor>();
- for (IFileArtifactRepository repository : bundleRepositories) {
- IArtifactDescriptor[] descriptors = repository.getArtifactDescriptors(key);
- if (descriptors != null)
- artifactDescriptors.addAll(Arrays.asList(descriptors));
- }
- return artifactDescriptors.toArray(new IArtifactDescriptor[artifactDescriptors.size()]);
- }
-
- public IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- throw new UnsupportedOperationException(Messages.artifact_retrieval_unsupported);
- }
-
- public IStatus getRawArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- throw new UnsupportedOperationException(Messages.artifact_retrieval_unsupported);
- }
-
- public IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor) {
- throw new UnsupportedOperationException(Messages.artifact_retrieval_unsupported);
- }
-
- public OutputStream getOutputStream(IArtifactDescriptor descriptor) {
- throw new UnsupportedOperationException(Messages.artifact_write_unsupported);
- }
-
- /**
- * Exposed for testing and debugging purposes.
- * @noreference This method is not intended to be referenced by clients.
- */
- public Collection<IFileArtifactRepository> testGetBundleRepositories() {
- return bundleRepositories;
- }
-
- public IQueryResult<IArtifactKey> query(IQuery<IArtifactKey> query, IProgressMonitor monitor) {
- // Query all the all the repositories
- IQueryable<IArtifactKey> queryable = QueryUtil.compoundQueryable(bundleRepositories);
- return queryable.query(query, monitor);
- }
-
- public IQueryable<IArtifactDescriptor> descriptorQueryable() {
- List<IQueryable<IArtifactDescriptor>> descQueryables = new ArrayList<IQueryable<IArtifactDescriptor>>(bundleRepositories.size());
- for (IFileArtifactRepository repository : bundleRepositories)
- descQueryables.add(repository.descriptorQueryable());
-
- return QueryUtil.compoundQueryable(descQueryables);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/DirectorUtil.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/DirectorUtil.java
deleted file mode 100644
index 42c022ed9..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/DirectorUtil.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009-2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import java.net.URI;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.p2.planner.IPlanner;
-
-public class DirectorUtil {
-
- public static IStatus validateProfile(IProfile profile) {
- ProfileChangeRequest pcr = new ProfileChangeRequest(profile);
- ProvisioningContext ctx = new ProvisioningContext(profile.getProvisioningAgent());
- ctx.setMetadataRepositories(new URI[0]);
- IPlanner planner = (IPlanner) profile.getProvisioningAgent().getService(IPlanner.SERVICE_NAME);
- return planner.getProvisioningPlan(pcr, ctx, null).getStatus();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java
deleted file mode 100644
index faf6c666f..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.garbagecollector.MarkSet;
-import org.eclipse.equinox.internal.p2.garbagecollector.MarkSetProvider;
-import org.eclipse.equinox.internal.p2.update.*;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.equinox.p2.repository.artifact.ArtifactKeyQuery;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-
-/**
- * MarkSetProvider implementation for the Eclipse touchpoint.
- */
-public class EclipseMarkSetProvider extends MarkSetProvider {
- private static final String ARTIFACT_CLASSIFIER_OSGI_BUNDLE = "osgi.bundle"; //$NON-NLS-1$
- private static final String ARTIFACT_CLASSIFIER_FEATURE = "org.eclipse.update.feature"; //$NON-NLS-1$
-
- private Collection<IArtifactKey> artifactKeyList = null;
-
- public MarkSet[] getMarkSets(IProvisioningAgent agent, IProfile inProfile) {
- artifactKeyList = new HashSet<IArtifactKey>();
- IArtifactRepository repositoryToGC = Util.getBundlePoolRepository(agent, inProfile);
- if (repositoryToGC == null)
- return new MarkSet[0];
- addArtifactKeys(inProfile);
- IProfile currentProfile = getCurrentProfile(agent);
- if (currentProfile != null && inProfile.getProfileId().equals(currentProfile.getProfileId())) {
- addRunningBundles(repositoryToGC);
- addRunningFeatures(inProfile, repositoryToGC);
- }
- return new MarkSet[] {new MarkSet(artifactKeyList.toArray(new IArtifactKey[artifactKeyList.size()]), repositoryToGC)};
- }
-
- private void addRunningFeatures(IProfile profile, IArtifactRepository repositoryToGC) {
- try {
- List<Feature> allFeatures = getAllFeatures(Configuration.load(new File(Util.getConfigurationFolder(profile), "org.eclipse.update/platform.xml"), null)); //$NON-NLS-1$
- for (Feature f : allFeatures) {
- IArtifactKey match = searchArtifact(f.getId(), Version.create(f.getVersion()), ARTIFACT_CLASSIFIER_FEATURE, repositoryToGC);
- if (match != null)
- artifactKeyList.add(match);
- }
- } catch (ProvisionException e) {
- //Ignore the exception
- }
- }
-
- private List<Feature> getAllFeatures(Configuration cfg) {
- if (cfg == null)
- return CollectionUtils.emptyList();
- List<Site> sites = cfg.getSites();
- ArrayList<Feature> result = new ArrayList<Feature>();
- for (Site object : sites) {
- Feature[] features = object.getFeatures();
- for (int i = 0; i < features.length; i++) {
- result.add(features[i]);
- }
- }
- return result;
- }
-
- private IProfile getCurrentProfile(IProvisioningAgent agent) {
- IProfileRegistry pr = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (pr == null)
- return null;
- return pr.getProfile(IProfileRegistry.SELF);
- }
-
- private void addArtifactKeys(IProfile aProfile) {
- Iterator<IInstallableUnit> installableUnits = aProfile.query(QueryUtil.createIUAnyQuery(), null).iterator();
- while (installableUnits.hasNext()) {
- Collection<IArtifactKey> keys = installableUnits.next().getArtifacts();
- if (keys == null)
- continue;
- artifactKeyList.addAll(keys);
- }
- }
-
- public IArtifactRepository getRepository(IProvisioningAgent agent, IProfile aProfile) {
- return Util.getBundlePoolRepository(agent, aProfile);
- }
-
- private void addRunningBundles(IArtifactRepository repo) {
- artifactKeyList.addAll(findCorrespondinArtifacts(new WhatIsRunning().getBundlesBeingRun(), repo));
- }
-
- private IArtifactKey searchArtifact(String searchedId, Version searchedVersion, String classifier, IArtifactRepository repo) {
- //This is somewhat cheating since normally we should get the artifact key from the IUs that were representing the running system (e.g. we could get that info from the rollback repo)
- VersionRange range = searchedVersion != null ? new VersionRange(searchedVersion, true, searchedVersion, true) : null;
- ArtifactKeyQuery query = new ArtifactKeyQuery(classifier, searchedId, range);
- //TODO short-circuit the query when we find one?
- IQueryResult<IArtifactKey> keys = repo.query(query, null);
- if (!keys.isEmpty())
- return keys.iterator().next();
- return null;
- }
-
- //Find for each bundle info a corresponding artifact in repo
- private List<IArtifactKey> findCorrespondinArtifacts(BundleInfo[] bis, IArtifactRepository repo) {
- ArrayList<IArtifactKey> toRetain = new ArrayList<IArtifactKey>();
- for (int i = 0; i < bis.length; i++) {
- // if version is "0.0.0", we will use null to find all versions, see bug 305710
- Version version = BundleInfo.EMPTY_VERSION.equals(bis[i].getVersion()) ? null : Version.create(bis[i].getVersion());
- IArtifactKey match = searchArtifact(bis[i].getSymbolicName(), version, ARTIFACT_CLASSIFIER_OSGI_BUNDLE, repo);
- if (match != null)
- toRetain.add(match);
- }
- return toRetain;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java
deleted file mode 100644
index cfa60c064..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Code 9 - ongoing development
- * Eclipse Source - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdminRuntimeException;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.Touchpoint;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class EclipseTouchpoint extends Touchpoint {
- public static final String PROFILE_PROP_LAUNCHER_NAME = "eclipse.touchpoint.launcherName"; //$NON-NLS-1$
- public static final String PARM_MANIPULATOR = "manipulator"; //$NON-NLS-1$
- public static final String PARM_PLATFORM_CONFIGURATION = "platformConfiguration"; //$NON-NLS-1$
- public static final String PARM_SOURCE_BUNDLES = "sourceBundles"; //$NON-NLS-1$
- public static final String PARM_IU = "iu"; //$NON-NLS-1$
- public static final String PARM_ARTIFACT = "artifact"; //$NON-NLS-1$
- public static final String PARM_ARTIFACT_LOCATION = "artifact.location"; //$NON-NLS-1$
- private static final Object PARM_AGENT = "agent"; //$NON-NLS-1$
-
- private static final String NATIVE_TOUCHPOINT_ID = "org.eclipse.equinox.p2.touchpoint.natives"; //$NON-NLS-1$
- private static List<String> NATIVE_ACTIONS = Arrays.asList(new String[] {"mkdir", "rmdir"}); //$NON-NLS-1$//$NON-NLS-2$
- private static final String VALIDATE_PROFILE = "org.eclipse.equinox.internal.p2.touchpoint.eclipse.validateProfile"; //$NON-NLS-1$
-
- private static Map<IProfile, LazyManipulator> manipulators = new WeakHashMap<IProfile, LazyManipulator>();
- private static Map<IProfile, PlatformConfigurationWrapper> wrappers = new WeakHashMap<IProfile, PlatformConfigurationWrapper>();
- private static Map<IProfile, SourceManipulator> sourceManipulators = new WeakHashMap<IProfile, SourceManipulator>();
- private static Map<IProfile, Map<IInstallableUnit, IInstallableUnit>> preparedIUs = new WeakHashMap<IProfile, Map<IInstallableUnit, IInstallableUnit>>();
-
- private static synchronized LazyManipulator getManipulator(IProvisioningAgent agent, IProfile profile) {
- LazyManipulator manipulator = manipulators.get(profile);
- if (manipulator == null) {
- manipulator = new LazyManipulator(agent, profile);
- manipulators.put(profile, manipulator);
- }
- return manipulator;
- }
-
- private static synchronized void saveManipulator(IProfile profile) throws FrameworkAdminRuntimeException, IOException {
- LazyManipulator manipulator = manipulators.remove(profile);
- if (manipulator != null)
- manipulator.save(false);
- }
-
- private static synchronized PlatformConfigurationWrapper getPlatformConfigurationWrapper(IProvisioningAgent agent, IProfile profile, LazyManipulator manipulator) {
- PlatformConfigurationWrapper wrapper = wrappers.get(profile);
- if (wrapper == null) {
- File configLocation = Util.getConfigurationFolder(profile);
- URI poolURI = Util.getBundlePoolLocation(agent, profile);
- wrapper = new PlatformConfigurationWrapper(configLocation, poolURI, manipulator);
- wrappers.put(profile, wrapper);
- }
- return wrapper;
- }
-
- private static synchronized void savePlatformConfigurationWrapper(IProfile profile) throws ProvisionException {
- PlatformConfigurationWrapper wrapper = wrappers.remove(profile);
- if (wrapper != null)
- wrapper.save();
- }
-
- private static synchronized SourceManipulator getSourceManipulator(IProfile profile) {
- SourceManipulator sourceManipulator = sourceManipulators.get(profile);
- if (sourceManipulator == null) {
- sourceManipulator = new SourceManipulator(profile);
- sourceManipulators.put(profile, sourceManipulator);
- }
- return sourceManipulator;
- }
-
- private static synchronized void saveSourceManipulator(IProfile profile) throws IOException {
- SourceManipulator sourceManipulator = sourceManipulators.remove(profile);
- if (sourceManipulator != null)
- sourceManipulator.save();
- }
-
- private static synchronized IInstallableUnit getPreparedIU(IProfile profile, IInstallableUnit iu) {
- Map<IInstallableUnit, IInstallableUnit> preparedProfileIUs = preparedIUs.get(profile);
- if (preparedProfileIUs == null)
- return null;
-
- return preparedProfileIUs.get(iu);
- }
-
- private static synchronized void savePreparedIU(IProfile profile, IInstallableUnit iu) {
- Map<IInstallableUnit, IInstallableUnit> preparedProfileIUs = preparedIUs.get(profile);
- if (preparedProfileIUs == null) {
- preparedProfileIUs = new HashMap<IInstallableUnit, IInstallableUnit>();
- preparedIUs.put(profile, preparedProfileIUs);
- }
- preparedProfileIUs.put(iu, iu);
- }
-
- private static synchronized boolean hasPreparedIUs(IProfile profile) {
- return preparedIUs.get(profile) != null;
- }
-
- private static synchronized void clearProfileState(IProfile profile) {
- manipulators.remove(profile);
- wrappers.remove(profile);
- sourceManipulators.remove(profile);
- preparedIUs.remove(profile);
- }
-
- public IStatus prepare(IProfile profile) {
- try {
- if (hasPreparedIUs(profile))
- return validateProfile(profile);
- } catch (RuntimeException e) {
- return Util.createError(NLS.bind(Messages.error_validating_profile, profile.getProfileId()), e);
- }
- return Status.OK_STATUS;
- }
-
- public IStatus commit(IProfile profile) {
- MultiStatus status = new MultiStatus(Activator.ID, IStatus.OK, null, null);
- try {
- saveManipulator(profile);
- } catch (RuntimeException e) {
- status.add(Util.createError(Messages.error_saving_manipulator, e));
- } catch (IOException e) {
- status.add(Util.createError(Messages.error_saving_manipulator, e));
- }
- try {
- savePlatformConfigurationWrapper(profile);
- } catch (RuntimeException e) {
- status.add(Util.createError(Messages.error_saving_platform_configuration, e));
- } catch (ProvisionException pe) {
- status.add(Util.createError(Messages.error_saving_platform_configuration, pe));
- }
-
- try {
- saveSourceManipulator(profile);
- } catch (RuntimeException e) {
- status.add(Util.createError(Messages.error_saving_source_bundles_list, e));
- } catch (IOException e) {
- status.add(Util.createError(Messages.error_saving_source_bundles_list, e));
- }
- return status;
- }
-
- public IStatus rollback(IProfile profile) {
- clearProfileState(profile);
- return Status.OK_STATUS;
- }
-
- public String qualifyAction(String actionId) {
- String touchpointQualifier = NATIVE_ACTIONS.contains(actionId) ? NATIVE_TOUCHPOINT_ID : Activator.ID;
- return touchpointQualifier + "." + actionId; //$NON-NLS-1$
- }
-
- public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map<String, Object> touchpointParameters) {
- IProvisioningAgent agent = (IProvisioningAgent) touchpointParameters.get(PARM_AGENT);
- LazyManipulator manipulator = getManipulator(agent, profile);
- touchpointParameters.put(PARM_MANIPULATOR, manipulator);
- touchpointParameters.put(PARM_SOURCE_BUNDLES, getSourceManipulator(profile));
- touchpointParameters.put(PARM_PLATFORM_CONFIGURATION, getPlatformConfigurationWrapper(agent, profile, manipulator));
- return null;
- }
-
- public IStatus initializeOperand(IProfile profile, Map<String, Object> parameters) {
- IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
- IArtifactKey artifactKey = (IArtifactKey) parameters.get(PARM_ARTIFACT);
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
- if (iu != null && Boolean.valueOf(iu.getProperty(IInstallableUnit.PROP_PARTIAL_IU)).booleanValue()) {
- IInstallableUnit preparedIU = prepareIU(agent, profile, iu, artifactKey);
- if (preparedIU == null)
- return Util.createError(NLS.bind(Messages.failed_prepareIU, iu));
-
- parameters.put(PARM_IU, preparedIU);
- }
-
- if (!parameters.containsKey(PARM_ARTIFACT_LOCATION) && artifactKey != null) {
- File fileLocation = Util.getArtifactFile(agent, artifactKey, profile);
- if (fileLocation != null && fileLocation.exists())
- parameters.put(PARM_ARTIFACT_LOCATION, fileLocation.getAbsolutePath());
- }
- return Status.OK_STATUS;
- }
-
- public IInstallableUnit prepareIU(IProvisioningAgent agent, IProfile profile, IInstallableUnit iu, IArtifactKey artifactKey) {
- IInstallableUnit preparedIU = getPreparedIU(profile, iu);
- if (preparedIU != null)
- return preparedIU;
-
- Class<?> c = null;
- try {
- c = Class.forName("org.eclipse.equinox.p2.publisher.eclipse.BundlesAction"); //$NON-NLS-1$
- if (c != null)
- c = Class.forName("org.eclipse.osgi.service.resolver.PlatformAdmin"); //$NON-NLS-1$
- } catch (ClassNotFoundException e) {
- LogHelper.log(Util.createError(NLS.bind(Messages.publisher_not_available, e.getMessage())));
- return null;
- }
-
- if (c != null) {
- if (artifactKey == null)
- return iu;
-
- File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
- if (bundleFile == null) {
- LogHelper.log(Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey.toString())));
- return null;
- }
- preparedIU = PublisherUtil.createBundleIU(artifactKey, bundleFile);
- if (preparedIU == null) {
- LogHelper.log(Util.createError("The bundle manifest could not be read: " + bundleFile.toString())); //$NON-NLS-1$
- return null;
- }
- savePreparedIU(profile, preparedIU);
- return preparedIU;
- }
-
- // should not occur
- throw new IllegalStateException(Messages.unexpected_prepareiu_error);
- }
-
- private IStatus validateProfile(IProfile profile) {
- // by default we validate
- if (Boolean.FALSE.toString().equals(profile.getProperty(VALIDATE_PROFILE)))
- return Status.OK_STATUS;
-
- Class<?> c = null;
- try {
- c = Class.forName("org.eclipse.equinox.p2.planner.IPlanner"); //$NON-NLS-1$
- } catch (ClassNotFoundException e) {
- //ignore and proceed without validation
- return null;
- }
-
- if (c != null) {
- return DirectorUtil.validateProfile(profile);
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/LazyManipulator.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/LazyManipulator.java
deleted file mode 100644
index 4303c60e8..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/LazyManipulator.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import java.io.IOException;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.osgi.framework.*;
-import org.osgi.util.tracker.ServiceTracker;
-
-public class LazyManipulator implements Manipulator {
-
- private final static String FILTER_OBJECTCLASS = "(" + Constants.OBJECTCLASS + '=' + FrameworkAdmin.class.getName() + ')'; //$NON-NLS-1$
- private final static String filterFwName = "(" + FrameworkAdmin.SERVICE_PROP_KEY_FW_NAME + "=Equinox)"; //$NON-NLS-1$ //$NON-NLS-2$
- private final static String filterLauncherName = "(" + FrameworkAdmin.SERVICE_PROP_KEY_LAUNCHER_NAME + "=Eclipse.exe)"; //$NON-NLS-1$ //$NON-NLS-2$
- private final static String filterFwAdmin = "(&" + FILTER_OBJECTCLASS + filterFwName + filterLauncherName + ')'; //$NON-NLS-1$;
-
- private Manipulator manipulator;
- private final IProfile profile;
- private final IProvisioningAgent agent;
-
- public LazyManipulator(IProvisioningAgent agent, IProfile profile) {
- this.profile = profile;
- this.agent = agent;
- }
-
- private void loadDelegate() {
- if (manipulator != null)
- return;
-
- manipulator = getFrameworkManipulator();
- if (manipulator == null)
- throw new IllegalStateException(Messages.failed_acquire_framework_manipulator);
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(Util.getConfigurationFolder(profile));
- launcherData.setLauncher(Util.getLauncherPath(profile));
- launcherData.setLauncherConfigLocation(Util.getLauncherConfigLocation(profile));
- launcherData.setOS(Util.getOSFromProfile(profile));
- launcherData.setHome(Util.getInstallFolder(profile));
-
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //if fwJar is not included, this exception will be thrown. But ignore it.
- LogHelper.log(Util.createError(Messages.error_loading_manipulator, e));
- throw new IllegalStateException(Messages.error_loading_manipulator);
- } catch (FrameworkAdminRuntimeException e) {
- LogHelper.log(Util.createError(Messages.error_loading_manipulator, e));
- } catch (IOException e) {
- LogHelper.log(Util.createError(Messages.error_loading_manipulator, e));
- throw new IllegalStateException(Messages.error_loading_manipulator);
- }
- //TODO These values should be inserted by a configuration unit (bug 204124)
- manipulator.getConfigData().setProperty("eclipse.p2.profile", profile.getProfileId()); //$NON-NLS-1$
- manipulator.getConfigData().setProperty("eclipse.p2.data.area", Util.getAgentLocation(agent).getRootLocation().toString()); //$NON-NLS-1$
- }
-
- public static FrameworkAdmin getFrameworkAdmin() {
- ServiceTracker 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 22f91b576..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Messages.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.touchpoint.eclipse.messages"; //$NON-NLS-1$
- public static String error_loading_manipulator;
- public static String BundlePool;
- public static String failed_acquire_framework_manipulator;
- public static String failed_prepareIU;
- public static String error_saving_manipulator;
- public static String error_saving_platform_configuration;
- public static String error_saving_source_bundles_list;
- public static String error_parsing_configuration;
- public static String publisher_not_available;
- public static String artifact_write_unsupported;
- public static String iu_contains_no_arifacts;
- public static String artifact_file_not_found;
- public static String artifact_retrieval_unsupported;
- public static String bundle_pool_not_writeable;
- public static String cannot_calculate_extension_location;
- public static String parent_dir_features;
- public static String platform_config_unavailable;
- public static String unexpected_prepareiu_error;
- public static String error_validating_profile;
-
- static {
- // load message values from bundle file and assign to fields below
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java
deleted file mode 100644
index bb0a87c5e..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import java.io.File;
-import java.net.*;
-import java.util.List;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.update.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * This class provides a wrapper for reading and writing platform.xml.
- *
- * Only a minimal set of operations is exposed.
- */
-public class PlatformConfigurationWrapper {
-
- private Configuration configuration = null;
- private Site poolSite = null;
- private File configFile;
- private URI poolURI;
- private Manipulator manipulator;
-
- private static String FEATURES = "features/"; //$NON-NLS-1$
-
- private static URL getOSGiInstallArea(Manipulator manipulator) {
- final String OSGI = "org.eclipse.osgi"; //$NON-NLS-1$
- BundleInfo[] bis = manipulator.getConfigData().getBundles();
- String searchFor = "org.eclipse.equinox.launcher"; //$NON-NLS-1$
- for (int i = 0; i < bis.length; i++) {
- if (bis[i].getSymbolicName().equals(searchFor)) {
- if (bis[i].getLocation() != null) {
- try {
- if (bis[i].getLocation().getScheme().equals("file")) //$NON-NLS-1$
- return fromOSGiJarToOSGiInstallArea(bis[i].getLocation().getPath()).toURL();
- } catch (MalformedURLException e) {
- //do nothing
- }
- }
- if (searchFor.equals(OSGI))
- return null;
- searchFor = OSGI;
- i = -1;
- }
- }
- return null;
- }
-
- private static File fromOSGiJarToOSGiInstallArea(String path) {
- IPath parentFolder = new Path(path).removeLastSegments(1);
- if (parentFolder.lastSegment().equals("plugins")) //$NON-NLS-1$
- return parentFolder.removeLastSegments(1).toFile();
- return parentFolder.toFile();
- }
-
- public PlatformConfigurationWrapper(File configDir, URI featurePool, Manipulator manipulator) {
- this.configuration = null;
- this.configFile = new File(configDir, "/org.eclipse.update/platform.xml"); //$NON-NLS-1$
- this.poolURI = featurePool;
- this.manipulator = manipulator;
- }
-
- private void loadDelegate() {
- if (configuration != null)
- return;
-
- try {
- if (configFile.exists()) {
- configuration = Configuration.load(configFile, getOSGiInstallArea(manipulator));
- } else {
- configuration = new Configuration();
- }
- } catch (ProvisionException pe) {
- // TODO: Make this a real message
- throw new IllegalStateException(Messages.error_parsing_configuration);
- }
- if (poolURI == null)
- throw new IllegalStateException("Error creating platform configuration. No bundle pool defined."); //$NON-NLS-1$
-
- poolSite = getSite(poolURI);
- if (poolSite == null) {
- poolSite = createSite(poolURI, getDefaultPolicy());
- configuration.add(poolSite);
- }
- }
-
- /*
- * Return the default policy to use when creating a new site. If there are
- * any sites with the MANAGED-ONLY policy, then that is the default.
- * Otherwise the default is USER-EXCLUDE.
- */
- private String getDefaultPolicy() {
- for (Site site : configuration.getSites()) {
- if (Site.POLICY_MANAGED_ONLY.equals(site.getPolicy()))
- return Site.POLICY_MANAGED_ONLY;
- }
- return Site.POLICY_USER_EXCLUDE;
- }
-
- /*
- * Create and return a site object based on the given location.
- */
- private Site createSite(URI location, String policy) {
- Site result = new Site();
- result.setUrl(location.toString());
- result.setPolicy(policy);
- result.setEnabled(true);
- return result;
- }
-
- /*
- * Look in the configuration and return the site object whose location matches
- * the given URL. Return null if there is no match.
- */
- private Site getSite(URI url) {
- List<Site> sites = configuration.getSites();
- File file = URIUtil.toFile(url);
- for (Site nextSite : sites) {
- try {
- File nextFile = URIUtil.toFile(new URI(nextSite.getUrl()));
- if (nextFile == null)
- continue;
- if (nextFile.equals(file))
- return nextSite;
- } catch (URISyntaxException e) {
- //ignore incorrectly formed site
- }
- }
- return null;
- }
-
- /*
- * Look in the configuration and return the site which contains the feature
- * with the given identifier and version. Return null if there is none.
- */
- private Site getSite(String id, String version) {
- List<Site> sites = configuration.getSites();
- for (Site site : sites) {
- Feature[] features = site.getFeatures();
- for (int i = 0; i < features.length; i++) {
- if (id.equals(features[i].getId()) && version.equals(features[i].getVersion()))
- return site;
- }
- }
- return null;
- }
-
- /*
- * @see org.eclipse.update.configurator.IPlatformConfiguration#createFeatureEntry(java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, java.lang.String, java.net.URL[])
- */
- public IStatus addFeatureEntry(File file, String id, String version, String pluginIdentifier, String pluginVersion, boolean primary, String application, URL[] root, String linkFile) {
- loadDelegate();
- if (configuration == null)
- return new Status(IStatus.WARNING, Activator.ID, Messages.platform_config_unavailable, null);
-
- URI fileURL = null;
- File featureDir = file.getParentFile();
- if (featureDir == null || !featureDir.getName().equals("features")) //$NON-NLS-1$
- return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.parent_dir_features, file.getAbsolutePath()), null);
- File locationDir = featureDir.getParentFile();
- if (locationDir == null)
- return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.cannot_calculate_extension_location, file.getAbsolutePath()), null);
-
- fileURL = locationDir.toURI();
- Site site = getSite(fileURL);
- if (site == null) {
- site = createSite(fileURL, getDefaultPolicy());
- if (linkFile != null)
- site.setLinkFile(linkFile);
- configuration.add(site);
- } else {
- // check to see if the feature already exists in this site
- if (site.getFeature(id, version) != null)
- return Status.OK_STATUS;
- }
- Feature addedFeature = new Feature(site);
- addedFeature.setId(id);
- addedFeature.setVersion(version);
- addedFeature.setUrl(makeFeatureURL(id, version));
- addedFeature.setApplication(application);
- addedFeature.setPluginIdentifier(pluginIdentifier);
- addedFeature.setPluginVersion(pluginVersion);
- addedFeature.setRoots(root);
- addedFeature.setPrimary(primary);
- site.addFeature(addedFeature);
- return Status.OK_STATUS;
- }
-
- /*
- * @see org.eclipse.update.configurator.IPlatformConfiguration#findConfiguredFeatureEntry(java.lang.String)
- */
- public IStatus removeFeatureEntry(String id, String version) {
- loadDelegate();
- if (configuration == null)
- return new Status(IStatus.WARNING, Activator.ID, Messages.platform_config_unavailable, null);
-
- Site site = getSite(id, version);
- if (site == null)
- site = poolSite;
- site.removeFeature(makeFeatureURL(id, version));
- // if we weren't able to remove the feature from the site because it
- // didn't exist, then someone already did our job for us and it is ok.
- return Status.OK_STATUS;
- }
-
- public boolean containsFeature(URI siteURI, String featureId, String featureVersion) {
- loadDelegate();
- if (configuration == null)
- return false;
-
- Site site = getSite(siteURI);
- if (site == null)
- return false;
-
- return site.getFeature(featureId, featureVersion) != null;
- }
-
- /*
- * @see org.eclipse.update.configurator.IPlatformConfiguration#save()
- */
- public void save() throws ProvisionException {
- if (configuration != null) {
- configFile.getParentFile().mkdirs();
- configuration.save(configFile, getOSGiInstallArea(manipulator));
- }
- }
-
- private static String makeFeatureURL(String id, String version) {
- return FEATURES + id + "_" + version + "/"; //$NON-NLS-1$ //$NON-NLS-2$;
- }
-
- // }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PublisherUtil.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PublisherUtil.java
deleted file mode 100644
index 1f6151b6d..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PublisherUtil.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import java.io.File;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.publisher.PublisherInfo;
-import org.eclipse.equinox.p2.publisher.eclipse.*;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-
-public class PublisherUtil {
-
- /**
- * Returns an IU corresponding to the given artifact key and bundle, or <code>null</code>
- * if an IU could not be created.
- */
- public static IInstallableUnit createBundleIU(IArtifactKey artifactKey, File bundleFile) {
- BundleDescription bundleDescription = BundlesAction.createBundleDescription(bundleFile);
- if (bundleDescription == null)
- return null;
- PublisherInfo info = new PublisherInfo();
- Version version = Version.create(bundleDescription.getVersion().toString());
- AdviceFileAdvice advice = new AdviceFileAdvice(bundleDescription.getSymbolicName(), version, new Path(bundleFile.getAbsolutePath()), AdviceFileAdvice.BUNDLE_ADVICE_FILE);
- if (advice.containsAdvice())
- info.addAdvice(advice);
- String shape = bundleFile.isDirectory() ? IBundleShapeAdvice.DIR : IBundleShapeAdvice.JAR;
- info.addAdvice(new BundleShapeAdvice(bundleDescription.getSymbolicName(), version, shape));
- return BundlesAction.createBundleIU(bundleDescription, artifactKey, info);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/SourceManipulator.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/SourceManipulator.java
deleted file mode 100644
index 54fe1fce8..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/SourceManipulator.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import java.io.*;
-import java.net.MalformedURLException;
-import java.util.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.simpleconfigurator.manipulator.SimpleConfiguratorManipulatorImpl;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
-
-//This class deals with source bundles and how their addition to the source.info
-public class SourceManipulator {
- private List<BundleInfo> sourceBundles;
- private IProfile profile;
- boolean changed = false;
- private SimpleConfiguratorManipulatorImpl manipulator;
-
- public SourceManipulator(IProfile profile) {
- this.profile = profile;
- this.manipulator = new SimpleConfiguratorManipulatorImpl();
- }
-
- public BundleInfo[] getBundles() throws IOException {
- if (sourceBundles == null)
- load();
- return sourceBundles.toArray(new BundleInfo[sourceBundles.size()]);
- }
-
- public void addBundle(File bundleFile, String bundleId, Version bundleVersion) throws IOException {
- if (sourceBundles == null)
- load();
- BundleInfo sourceInfo = new BundleInfo(bundleFile.toURI());
- sourceInfo.setSymbolicName(bundleId);
- sourceInfo.setVersion(bundleVersion.toString());
- sourceBundles.add(sourceInfo);
- }
-
- public void removeBundle(File bundleFile, String bundleId, Version bundleVersion) throws MalformedURLException, IOException {
- if (sourceBundles == null)
- load();
-
- BundleInfo sourceInfo = new BundleInfo();
- if (bundleFile != null)
- sourceInfo.setLocation(bundleFile.toURI());
- sourceInfo.setSymbolicName(bundleId);
- sourceInfo.setVersion(bundleVersion.toString());
- sourceBundles.remove(sourceInfo);
- }
-
- public void save() throws IOException {
- if (sourceBundles != null)
- manipulator.saveConfiguration(sourceBundles.toArray(new BundleInfo[sourceBundles.size()]), getFileLocation(), getLauncherLocation().toURI());
- }
-
- private void load() throws MalformedURLException, IOException {
- if (getFileLocation().exists())
- //input stream is bufferd and closed for us
- sourceBundles = new ArrayList<BundleInfo>(Arrays.asList(manipulator.loadConfiguration(new FileInputStream(getFileLocation()), getLauncherLocation().toURI())));
- else
- sourceBundles = new ArrayList<BundleInfo>();
- }
-
- private File getFileLocation() {
- return new File(Util.getConfigurationFolder(profile), SimpleConfiguratorManipulator.SOURCE_INFO_PATH);
- }
-
- private File getLauncherLocation() {
- return Util.getInstallFolder(profile);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java
deleted file mode 100644
index d0cb5c6d5..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java
+++ /dev/null
@@ -1,355 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Red Hat Incorporated - fix for bug 225145
- * Code 9 - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.p2.core.*;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.osgi.service.datalocation.Location;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-import org.eclipse.osgi.util.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 IAgentLocation getAgentLocation(IProvisioningAgent agent) {
- return (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
- }
-
- public static IArtifactRepositoryManager getArtifactRepositoryManager(IProvisioningAgent agent) {
- return (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- }
-
- public static URI getBundlePoolLocation(IProvisioningAgent agent, IProfile profile) {
- String path = profile.getProperty(IProfile.PROP_CACHE);
- if (path != null)
- return new File(path).toURI();
- IAgentLocation location = getAgentLocation(agent);
- if (location == null)
- return null;
- return location.getDataArea(Activator.ID);
- }
-
- public static synchronized IFileArtifactRepository getBundlePoolRepository(IProvisioningAgent agent, IProfile profile) {
- URI location = getBundlePoolLocation(agent, profile);
- if (location == null)
- return null;
- IArtifactRepositoryManager manager = getArtifactRepositoryManager(agent);
- try {
- return (IFileArtifactRepository) manager.loadRepository(location, null);
- } catch (ProvisionException e) {
- //the repository doesn't exist, so fall through and create a new one
- }
- try {
- String repositoryName = Messages.BundlePool;
- Map<String, String> properties = new HashMap<String, String>(1);
- properties.put(IRepository.PROP_SYSTEM, Boolean.TRUE.toString());
- return (IFileArtifactRepository) manager.createRepository(location, repositoryName, REPOSITORY_TYPE, properties);
- } catch (ProvisionException e) {
- LogHelper.log(e);
- throw new IllegalArgumentException(NLS.bind(Messages.bundle_pool_not_writeable, location));
- }
- }
-
- public static IFileArtifactRepository getAggregatedBundleRepository(IProvisioningAgent agent, IProfile profile) {
- return getAggregatedBundleRepository(agent, profile, AGGREGATE_CACHE | AGGREGATE_SHARED_CACHE | AGGREGATE_CACHE_EXTENSIONS);
- }
-
- public static IFileArtifactRepository getAggregatedBundleRepository(IProvisioningAgent agent, IProfile profile, int repoFilter) {
- List<IFileArtifactRepository> bundleRepositories = new ArrayList<IFileArtifactRepository>();
-
- // we check for a shared bundle pool first as it should be preferred over the user bundle pool in a shared install
- IArtifactRepositoryManager manager = getArtifactRepositoryManager(agent);
- if ((repoFilter & AGGREGATE_SHARED_CACHE) != 0) {
- String sharedCache = profile.getProperty(IProfile.PROP_SHARED_CACHE);
- if (sharedCache != null) {
- try {
- URI repoLocation = new File(sharedCache).toURI();
- IArtifactRepository repository = manager.loadRepository(repoLocation, null);
- if (repository != null && repository instanceof IFileArtifactRepository && !bundleRepositories.contains(repository))
- bundleRepositories.add((IFileArtifactRepository) repository);
- } catch (ProvisionException e) {
- //skip repository if it could not be read
- }
- }
- }
-
- if ((repoFilter & AGGREGATE_CACHE) != 0) {
- IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(agent, profile);
- if (bundlePool != null)
- bundleRepositories.add(bundlePool);
- }
-
- if ((repoFilter & AGGREGATE_CACHE_EXTENSIONS) != 0) {
- List<String> repos = getListProfileProperty(profile, CACHE_EXTENSIONS);
- for (String repo : repos) {
- try {
- URI repoLocation;
- try {
- repoLocation = new URI(repo);
- } catch (URISyntaxException e) {
- //in 1.0 we wrote unencoded URL strings, so try as an unencoded string
- repoLocation = URIUtil.fromString(repo);
- }
- IArtifactRepository repository = manager.loadRepository(repoLocation, null);
- if (repository != null && repository instanceof IFileArtifactRepository && !bundleRepositories.contains(repository))
- bundleRepositories.add((IFileArtifactRepository) repository);
- } catch (ProvisionException e) {
- //skip repositories that could not be read
- } catch (URISyntaxException e) {
- // unexpected, URLs should be pre-checked
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e));
- }
- }
- }
- return new AggregatedBundleRepository(agent, bundleRepositories);
- }
-
- private static List<String> getListProfileProperty(IProfile profile, String key) {
- List<String> listProperty = new ArrayList<String>();
- String dropinRepositories = profile.getProperty(key);
- if (dropinRepositories != null) {
- StringTokenizer tokenizer = new StringTokenizer(dropinRepositories, PIPE);
- while (tokenizer.hasMoreTokens()) {
- listProperty.add(tokenizer.nextToken());
- }
- }
- return listProperty;
- }
-
- public static BundleInfo createBundleInfo(File bundleFile, String manifest) {
- BundleInfo bundleInfo = new BundleInfo();
- if (bundleFile != null)
- bundleInfo.setLocation(bundleFile.toURI());
-
- bundleInfo.setManifest(manifest);
- try {
- @SuppressWarnings("unchecked")
- Map<String, String> headers = ManifestElement.parseBundleManifest(new ByteArrayInputStream(manifest.getBytes("UTF-8")), new HashMap<String, String>()); //$NON-NLS-1$
- ManifestElement[] element = ManifestElement.parseHeader("bsn", headers.get(Constants.BUNDLE_SYMBOLICNAME)); //$NON-NLS-1$
- if (element == null || element.length == 0)
- return null;
- bundleInfo.setSymbolicName(element[0].getValue());
-
- String version = 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 = 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(IProvisioningAgent agent, IArtifactKey artifactKey, IProfile profile) {
- IFileArtifactRepository aggregatedView = getAggregatedBundleRepository(agent, profile);
- File bundleJar = aggregatedView.getArtifactFile(artifactKey);
- return bundleJar;
- }
-
- public static File getConfigurationFolder(IProfile profile) {
- String config = profile.getProperty(IProfile.PROP_CONFIGURATION_FOLDER);
- if (config != null)
- return new File(config);
- return new File(getInstallFolder(profile), "configuration"); //$NON-NLS-1$
- }
-
- /*
- * Do a look-up and return the OSGi install area if it is set.
- */
- public static URL getOSGiInstallArea() {
- Location location = (Location) ServiceHelper.getService(Activator.getContext(), Location.class.getName(), Location.INSTALL_FILTER);
- if (location == null)
- return null;
- if (!location.isSet())
- return null;
- return location.getURL();
- }
-
- /*
- * Helper method to return the eclipse.home location. Return
- * null if it is unavailable.
- */
- public static File getEclipseHome() {
- Location eclipseHome = (Location) ServiceHelper.getService(Activator.getContext(), Location.class.getName(), Location.ECLIPSE_HOME_FILTER);
- if (eclipseHome == null || !eclipseHome.isSet())
- return null;
- URL url = eclipseHome.getURL();
- if (url == null)
- return null;
- return URLUtil.toFile(url);
- }
-
- /**
- * Returns the install folder for the profile, or <code>null</code>
- * if no install folder is defined.
- */
- public static File getInstallFolder(IProfile profile) {
- String folder = profile.getProperty(IProfile.PROP_INSTALL_FOLDER);
- return folder == null ? null : new File(folder);
- }
-
- public static File getLauncherPath(IProfile profile) {
- String name = profile.getProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME);
- if (name == null || name.length() == 0)
- name = "eclipse"; //$NON-NLS-1$
- String launcherName = getLauncherName(name, getOSFromProfile(profile), getInstallFolder(profile));
- return launcherName == null ? null : new File(getInstallFolder(profile), launcherName);
- }
-
- /**
- * Returns the name of the Eclipse application launcher.
- */
- private static String getLauncherName(String name, String os, File installFolder) {
- if (os == null) {
- EnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName());
- if (info == null)
- return null;
- os = info.getOS();
- }
-
- if (os.equals(org.eclipse.osgi.service.environment.Constants.OS_WIN32)) {
- IPath path = new Path(name);
- if ("exe".equals(path.getFileExtension())) //$NON-NLS-1$
- return name;
- return name + ".exe"; //$NON-NLS-1$
- }
- if (os.equals(org.eclipse.osgi.service.environment.Constants.OS_MACOSX)) {
- IPath path = new Path(name);
- if (path.segment(0).endsWith(".app")) //$NON-NLS-1$
- return name;
-
- String appName = null;
- if (installFolder != null) {
- File appFolder = new File(installFolder, name + ".app"); //$NON-NLS-1$
- if (appFolder.exists()) {
- try {
- appName = appFolder.getCanonicalFile().getName();
- } catch (IOException e) {
- appName = appFolder.getName();
- }
- }
- }
-
- StringBuffer buffer = new StringBuffer();
- if (appName != null) {
- buffer.append(appName);
- } else {
- buffer.append(name.substring(0, 1).toUpperCase());
- buffer.append(name.substring(1));
- buffer.append(".app"); //$NON-NLS-1$
- }
- buffer.append("/Contents/MacOS/"); //$NON-NLS-1$
- buffer.append(name);
- return buffer.toString();
- }
- return name;
- }
-
- public static String getOSFromProfile(IProfile profile) {
- String environments = profile.getProperty(IProfile.PROP_ENVIRONMENTS);
- if (environments == null)
- return null;
- for (StringTokenizer tokenizer = new StringTokenizer(environments, ","); tokenizer.hasMoreElements();) { //$NON-NLS-1$
- String entry = tokenizer.nextToken();
- int i = entry.indexOf('=');
- String key = entry.substring(0, i).trim();
- if (!key.equals("osgi.os")) //$NON-NLS-1$
- continue;
- return entry.substring(i + 1).trim();
- }
- return null;
- }
-
- public static String getManifest(Collection<ITouchpointData> data) {
- for (ITouchpointData td : data) {
- ITouchpointInstruction manifestInstruction = td.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);
- }
-
- public static String resolveArtifactParam(Map<String, Object> parameters) throws CoreException {
- String artifactLocation = (String) parameters.get(EclipseTouchpoint.PARM_ARTIFACT_LOCATION);
- if (artifactLocation != null)
- return artifactLocation;
-
- IArtifactKey artifactKey = (IArtifactKey) parameters.get(EclipseTouchpoint.PARM_ARTIFACT);
- if (artifactKey == null) {
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- throw new CoreException(Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu)));
- }
-
- throw new CoreException(Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey)));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/WhatIsRunning.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/WhatIsRunning.java
deleted file mode 100644
index 28ea86371..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/WhatIsRunning.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-
-public class WhatIsRunning {
- public BundleInfo[] getBundlesBeingRun() {
- return getFrameworkManipulator().getConfigData().getBundles();
- }
-
- private Manipulator getFrameworkManipulator() {
- FrameworkAdmin fwAdmin = LazyManipulator.getFrameworkAdmin();
- if (fwAdmin != null)
- return fwAdmin.getRunningManipulator();
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ActionConstants.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ActionConstants.java
deleted file mode 100644
index f0201a787..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ActionConstants.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2009 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-public class ActionConstants {
-
- public static final String PARM_AGENT = "agent"; //$NON-NLS-1$
- public static final String PARM_AT_ARTIFACT = "@artifact"; //$NON-NLS-1$
- public static final String PARM_ARTIFACT_FILES = "artifactFiles"; //$NON-NLS-1$
- public static final String PARM_ARTIFACT_REQUESTS = "artifactRequests"; //$NON-NLS-1$
- public static final String PARM_BUNDLE = "bundle"; //$NON-NLS-1$
- public static final String PARM_FEATURE = "feature"; //$NON-NLS-1$
- public static final String PARM_FEATURE_ID = "featureId"; //$NON-NLS-1$
- public static final String PARM_FEATURE_VERSION = "featureVersion"; //$NON-NLS-1$
- public static final String PARM_IGNORE = "@ignore"; //$NON-NLS-1$
- public static final String PARM_IU = "iu"; //$NON-NLS-1$
- public static final String PARM_JVM_ARG = "jvmArg"; //$NON-NLS-1$
- public static final String PARM_PREVIOUS_START_LEVEL = "previousStartLevel"; //$NON-NLS-1$
- public static final String PARM_PREVIOUS_STARTED = "previousStarted"; //$NON-NLS-1$
- public static final String PARM_PREVIOUS_VALUE = "previousValue"; //$NON-NLS-1$
- public static final String PARM_PROFILE = "profile"; //$NON-NLS-1$
- public static final String PARM_PROGRAM_ARG = "programArg"; //$NON-NLS-1$
- public static final String PARM_PROGRAM_ARG_VALUE = "programArgValue"; //$NON-NLS-1$
- public static final String PARM_PROP_NAME = "propName"; //$NON-NLS-1$
- public static final String PARM_PROP_VALUE = "propValue"; //$NON-NLS-1$
- public static final String PARM_START_LEVEL = "startLevel"; //$NON-NLS-1$
- public static final String PARM_STARTED = "started"; //$NON-NLS-1$
- public static final String PARM_DEFAULT_VALUE = "default"; //$NON-NLS-1$
- public static final String PARM_LAUNCHERNAME = "name"; //$NON-NLS-1$
- public static final String PARM_PATH = "path"; //$NON-NLS-1$
- public static final String PARM_TARGET_DIR = "targetDir"; //$NON-NLS-1$
- public static final String PARM_LINK_NAME = "linkName"; //$NON-NLS-1$
- public static final String PARM_LINK_FORCE = "force"; //$NON-NLS-1$
- public static final String PARM_LINK_TARGET = "linkTarget"; //$NON-NLS-1$
- public static final String PARM_TARGET_FILE = "targetFile"; //$NON-NLS-1$
- public static final String PARM_PERMISSIONS = "permissions"; //$NON-NLS-1$
- public static final String PARM_PROFILE_DATA_DIRECTORY = "profileDataDirectory"; //$NON-NLS-1$
-
- public static final String PARM_REPOSITORY_LOCATION = "location"; //$NON-NLS-1$
- public static final String PARM_REPOSITORY_TYPE = "type"; //$NON-NLS-1$
- public static final String PARM_REPOSITORY_ENABLEMENT = "enabled"; //$NON-NLS-1$
- public static final String PARM_REPOSITORY_NICKNAME = "name"; //$NON-NLS-1$
- public static final Object PARM_OPTIONS = "options"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java
deleted file mode 100644
index 9268549a8..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2009 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.io.*;
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class AddJVMArgumentAction extends ProvisioningAction {
- public static final String ID = "addJvmArg"; //$NON-NLS-1$
- protected static final String STORAGE = "org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions" + File.separator + "jvmargs"; //$NON-NLS-1$//$NON-NLS-2$
-
- protected static final String XMX = "-Xmx"; //$NON-NLS-1$
- protected static final String XMS = "-Xms"; //$NON-NLS-1$
- protected static final String XX_MAX_PERM_SIZE = "-XX:MaxPermSize="; //$NON-NLS-1$
- protected static final String PREFIX_USER_VALUE = "eclipse.userDefined:"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- String jvmArg = (String) parameters.get(ActionConstants.PARM_JVM_ARG);
- if (jvmArg == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_JVM_ARG, ID));
- return addArg(jvmArg, parameters);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- String jvmArg = (String) parameters.get(ActionConstants.PARM_JVM_ARG);
- if (jvmArg == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_JVM_ARG, ID));
- return RemoveJVMArgumentAction.removeArg(jvmArg, parameters);
- }
-
- protected static String getUserArg(Properties storedValues, String flag) {
- return storedValues.getProperty(PREFIX_USER_VALUE + flag);
- }
-
- protected static IStatus addArg(String arg, Map<String, Object> parameters) {
- LauncherData launcherData = ((Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR)).getLauncherData();
- File storageArea = (File) parameters.get(ActionConstants.PARM_PROFILE_DATA_DIRECTORY);
- try {
- if (arg.startsWith(XMS))
- addByteArg(arg, XMS, launcherData, storageArea);
- else if (arg.startsWith(XMX))
- addByteArg(arg, XMX, launcherData, storageArea);
- else if (arg.startsWith(XX_MAX_PERM_SIZE))
- addByteArg(arg, XX_MAX_PERM_SIZE, launcherData, storageArea);
- else
- // Argument with a non-byte value, no special handling
- launcherData.addJvmArg(arg);
- } catch (IOException e) {
- return new Status(IStatus.ERROR, Activator.ID, Messages.error_processing_vmargs, e);
- } catch (IllegalArgumentException e) {
- return new Status(IStatus.ERROR, Activator.ID, Messages.error_processing_vmargs, e);
- }
- return Status.OK_STATUS;
- }
-
- protected static void addByteArg(String arg, String flag, LauncherData launcherData, File storageArea) throws IOException {
- Properties storedValues = load(storageArea);
- String currentArg = getCurrentArg(flag, launcherData.getJvmArgs());
-
- // Check for user changes
- detectUserValue(currentArg, flag, storedValues);
- validateValue(arg.substring(flag.length()));
-
- rememberArg(storedValues, arg.substring(flag.length()), flag);
- launcherData.removeJvmArg(currentArg);
-
- // Set the argument to use & save stored values
- setToMax(flag, storedValues, launcherData);
- save(storedValues, storageArea);
- }
-
- // Throws exception if the argument is not a valid byte argument
- protected static void validateValue(String arg) {
- getByteValue(arg, getBytePower(arg));
- }
-
- // Determine if the user has changed config, if so save their value
- protected static void detectUserValue(String currentValue, String flag, Properties storedValues) {
- String maxValue = getMaxValue(getArgs(storedValues, flag));
-
- if (currentValue == null)
- // User has removed value from file
- setUserArg(storedValues, flag, null);
- else if (maxValue == null || !maxValue.equals(currentValue.substring(flag.length())))
- // User has set an initial value, or modified the file
- setUserArg(storedValues, flag, currentValue.substring(flag.length()));
- }
-
- protected static String getMaxValue(String[] values) {
- if (values == null || values.length == 0)
- return null;
-
- int max = 0;
- for (int i = 1; i < values.length; i++)
- if (compareSize(values[max], values[i]) < 0)
- max = i;
- return values[max];
- }
-
- protected static void setToMax(String flag, Properties storedValues, LauncherData launcherData) {
- String maxStored = getMaxValue(getArgs(storedValues, flag));
- String userDefined = AddJVMArgumentAction.getUserArg(storedValues, flag);
-
- if (maxStored != null || userDefined != null) {
- // Replacement is available either stored, or user defined
- if (maxStored == null)
- launcherData.addJvmArg(flag + userDefined);
- else if (userDefined == null)
- launcherData.addJvmArg(flag + maxStored);
- else if (AddJVMArgumentAction.compareSize(maxStored, userDefined) > 0)
- launcherData.addJvmArg(flag + maxStored);
- else
- launcherData.addJvmArg(flag + userDefined);
- }
- }
-
- // Returns: 1 when a>b, 0 when a=b, -1 when a<b
- protected static int compareSize(String a, String b) {
- double aVal, bVal;
- int aPower = getBytePower(a);
- int bPower = getBytePower(b);
-
- aVal = getByteValue(a, aPower);
- bVal = getByteValue(b, bPower);
- // Ensure a value is expressed with the highest power (e.g. 2G not 2048M)
- while (aVal > 1024) {
- aVal /= 1024;
- aPower += 10;
- }
- while (bVal > 1024) {
- bVal /= 1024;
- bPower += 10;
- }
-
- if (aPower > bPower && aVal != 0)
- return 1;
- else if (aPower < bPower && bVal != 0)
- return -1;
- // Both have same power, so direct comparison
- else if (aVal > bVal)
- return 1;
- else if (aVal < bVal)
- return -1;
- else
- return 0;
- }
-
- // Parse the numeric portion of an argument
- private static double getByteValue(String arg, int power) {
- try {
- if (power == 0)
- return Integer.parseInt(arg);
- return Integer.parseInt(arg.substring(0, arg.length() - 1));
- } catch (NumberFormatException e) {
- throw new IllegalArgumentException(NLS.bind(Messages.invalid_byte_format, arg));
- }
- }
-
- private static int getBytePower(String arg) {
- // If last digit determines if the value is in bytes,
- // kilobytes, megabytes, or gigabytes
- switch (arg.charAt(arg.length() - 1)) {
- case 'k' :
- case 'K' :
- return 10;
- case 'm' :
- case 'M' :
- return 20;
- case 'g' :
- case 'G' :
- return 30;
- default :
- return 0;
- }
- }
-
- // Get the current used argument if there is one
- protected static String getCurrentArg(String flag, String[] jvmArgs) {
- for (int i = 0; i < jvmArgs.length; i++)
- if (jvmArgs[i] != null && jvmArgs[i].startsWith(flag))
- return jvmArgs[i];
- return null;
- }
-
- // Add one new value to those stored
- protected static void rememberArg(Properties storedValues, String value, String flag) {
- String argString = storedValues.getProperty(flag);
-
- if (argString == null)
- argString = ""; //$NON-NLS-1$
- else if (argString.length() > 0)
- argString += ',';
-
- argString += value;
-
- if (argString.length() != 0)
- storedValues.put(flag, argString);
- }
-
- protected static String[] getArgs(Properties storage, String flag) {
- String argString = storage.getProperty(flag);
- if (argString == null || argString.length() == 0)
- return new String[0];
-
- List<String> list = new ArrayList<String>();
- int i = 0;
- String arg = ""; //$NON-NLS-1$
-
- // Split comma-separated list into a List
- while (i < argString.length()) {
- char c = argString.charAt(i++);
- if (c == ',') {
- list.add(arg);
- arg = ""; //$NON-NLS-1$
- } else
- arg += c;
- }
-
- list.add(arg);
- return list.toArray(new String[list.size()]);
- }
-
- // Store a single user argument, null removes stored values
- private static void setUserArg(Properties storage, String flag, String value) {
- if (value == null)
- storage.remove(PREFIX_USER_VALUE + flag);
- else
- storage.setProperty(PREFIX_USER_VALUE + flag, value);
- }
-
- protected static Properties load(File storageArea) throws IOException {
- Properties args = new Properties();
- File file = new File(storageArea, STORAGE);
- if (file.exists()) {
- // Only load if file already exists
- FileInputStream in = null;
- try {
- try {
- in = new FileInputStream(file);
- args.load(in);
- } finally {
- if (in != null)
- in.close();
- }
- } catch (FileNotFoundException e) {
- // Should not occur as we check to see if it exists
- }
- }
- return args;
- }
-
- protected static void save(Properties args, File storageArea) throws IOException {
- FileOutputStream out = null;
- File file = new File(storageArea, STORAGE);
- if (!file.exists())
- // Ensure parent directory exists
- file.getParentFile().mkdirs();
-
- try {
- try {
- out = new FileOutputStream(file);
- args.store(out, null);
- } finally {
- if (out != null)
- out.close();
- }
- } catch (FileNotFoundException e) {
- throw new IllegalStateException(NLS.bind(Messages.unable_to_open_file, file));
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramArgumentAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramArgumentAction.java
deleted file mode 100644
index b44806f9d..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramArgumentAction.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class AddProgramArgumentAction extends ProvisioningAction {
- public static final String ID = "addProgramArg"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- String programArg = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG);
- if (programArg == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROGRAM_ARG, ID));
-
- String programArgValue = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG_VALUE);
- if (ActionConstants.PARM_IGNORE.equals(programArgValue))
- return Status.OK_STATUS;
-
- if (programArg.equals(ActionConstants.PARM_AT_ARTIFACT)) {
- try {
- programArg = Util.resolveArtifactParam(parameters);
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
- manipulator.getLauncherData().addProgramArg(programArg);
-
- if (programArgValue != null) {
- if (programArgValue.equals(ActionConstants.PARM_AT_ARTIFACT)) {
- try {
- programArgValue = Util.resolveArtifactParam(parameters);
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
- manipulator.getLauncherData().addProgramArg(programArgValue);
- }
-
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- String programArg = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG);
- if (programArg == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROGRAM_ARG, ID));
-
- String programArgValue = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG_VALUE);
- if (ActionConstants.PARM_IGNORE.equals(programArgValue))
- return Status.OK_STATUS;
-
- if (programArg.startsWith("-")) //$NON-NLS-1$
- manipulator.getLauncherData().removeProgramArg(programArg);
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddRepositoryAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddRepositoryAction.java
deleted file mode 100644
index 03d624dc8..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddRepositoryAction.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-
-/**
- * An action that adds a repository to the list of known repositories.
- */
-public class AddRepositoryAction extends RepositoryAction {
- public static final String ID = "addRepository"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- try {
- IProvisioningAgent agent = getAgent(parameters);
- IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- IAgentLocation agentLocation = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
- final RepositoryEvent event = createEvent(parameters);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- if (profile != null)
- addRepositoryToProfile(agentLocation, profile, event.getRepositoryLocation(), event.getRepositoryNickname(), event.getRepositoryType(), event.isRepositoryEnabled());
- //if provisioning into the current profile, broadcast an event to add this repository directly to the current repository managers.
- if (isSelfProfile(registry, profile))
- addToSelf(agent, agentLocation, event);
- return Status.OK_STATUS;
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
-
- protected String getId() {
- return ID;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- try {
- IProvisioningAgent agent = getAgent(parameters);
- IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- IAgentLocation agentLocation = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
- final RepositoryEvent event = createEvent(parameters);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- if (profile != null)
- removeRepositoryFromProfile(agentLocation, profile, event.getRepositoryLocation(), event.getRepositoryType());
- //if provisioning into the current profile, broadcast an event to add this repository directly to the current repository managers.
- if (isSelfProfile(registry, profile))
- removeFromSelf(agent, agentLocation, event);
- return Status.OK_STATUS;
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddSourceBundleAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddSourceBundleAction.java
deleted file mode 100644
index 640132ec5..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddSourceBundleAction.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class AddSourceBundleAction extends ProvisioningAction {
- public static final String ID = "addSourceBundle"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- return AddSourceBundleAction.addSourceBundle(parameters);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return RemoveSourceBundleAction.removeSourceBundle(parameters);
- }
-
- public static IStatus addSourceBundle(Map<String, Object> parameters) {
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- SourceManipulator manipulator = (SourceManipulator) parameters.get(EclipseTouchpoint.PARM_SOURCE_BUNDLES);
- String bundleId = (String) parameters.get(ActionConstants.PARM_BUNDLE);
- if (bundleId == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_BUNDLE, ID));
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.size() == 0)
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = null;
- for (IArtifactKey candidate : artifacts) {
- if (candidate.toString().equals(bundleId)) {
- artifactKey = candidate;
- break;
- }
- }
- if (artifactKey == null)
- throw new IllegalArgumentException(NLS.bind(Messages.no_matching_artifact, bundleId));
-
- File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
- if (bundleFile == null || !bundleFile.exists())
- return Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey));
-
- try {
- manipulator.addBundle(bundleFile, artifactKey.getId(), artifactKey.getVersion());
- } catch (IOException e) {
- return Util.createError(NLS.bind(Messages.cannot_configure_source_bundle, artifactKey));
- }
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java
deleted file mode 100644
index 713977723..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import org.eclipse.equinox.p2.query.QueryUtil;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-
-/**
- * This action collects the set of bundle files on which the signature trust check
- * should be performed. The actual trust checking is done by the CheckTrust phase.
- */
-public class CheckTrustAction extends ProvisioningAction {
-
- public static final String ID = "checkTrust"; //$NON-NLS-1$
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction#execute(java.util.Map)
- */
- public IStatus execute(Map<String, Object> parameters) {
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- if (iu == null)
- return null;
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- //if the IU is already in the profile there is nothing to do
- if (!profile.available(QueryUtil.createIUQuery(iu), null).isEmpty())
- return null;
- @SuppressWarnings("unchecked")
- Collection<File> bundleFiles = (Collection<File>) parameters.get(ActionConstants.PARM_ARTIFACT_FILES);
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null)
- return null;
- for (IArtifactKey key : artifacts) {
- File bundleFile = Util.getArtifactFile(agent, key, profile);
- if (!bundleFiles.contains(bundleFile))
- bundleFiles.add(bundleFile);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction#undo(java.util.Map)
- */
- public IStatus undo(Map<String, Object> parameters) {
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ChmodAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ChmodAction.java
deleted file mode 100644
index 6b49224f5..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ChmodAction.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat Incorporated - initial API and implementation
- * IBM Corporation - ongoing development
- * Cloudsmith Inc - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.io.*;
-import java.util.ArrayList;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-// This basically a copy of the chmod action in the native touchpoint only it provides @artifact support.
-// We should just use the native touchpoint copy when we have a replacement for the use of @artifact in parameters
-public class ChmodAction extends ProvisioningAction {
- private static final String ACTION_CHMOD = "chmod"; //$NON-NLS-1$
- private static final boolean WINDOWS = java.io.File.separatorChar == '\\';
-
- public IStatus execute(Map<String, Object> parameters) {
- String targetDir = (String) parameters.get(ActionConstants.PARM_TARGET_DIR);
- if (targetDir == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_TARGET_DIR, ACTION_CHMOD));
- if (targetDir.equals(ActionConstants.PARM_AT_ARTIFACT)) {
- try {
- targetDir = Util.resolveArtifactParam(parameters);
- } catch (CoreException e) {
- return e.getStatus();
- }
-
- File dir = new File(targetDir);
- if (!dir.isDirectory()) {
- return Util.createError(NLS.bind(Messages.artifact_not_directory, dir));
- }
- }
-
- String targetFile = (String) parameters.get(ActionConstants.PARM_TARGET_FILE);
- if (targetFile == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_TARGET_FILE, ACTION_CHMOD));
- String permissions = (String) parameters.get(ActionConstants.PARM_PERMISSIONS);
- if (permissions == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PERMISSIONS, ACTION_CHMOD));
- String optionsString = (String) parameters.get(ActionConstants.PARM_OPTIONS);
-
- // Check that file exist
- File probe = new File(targetDir + IPath.SEPARATOR + targetFile);
- if (!probe.exists())
- return Util.createError(NLS.bind(Messages.action_0_failed_file_1_doesNotExist, ACTION_CHMOD, probe.toString()));
-
- String options[] = null;
- if (optionsString != null) {
- ArrayList<String> collect = new ArrayList<String>();
- String r = optionsString.trim();
- while (r.length() > 0) {
- int spaceIdx = r.indexOf(' ');
- if (spaceIdx < 0) {
- collect.add(r);
- r = ""; //$NON-NLS-1$
- } else {
- collect.add(r.substring(0, spaceIdx));
- r = r.substring(spaceIdx + 1);
- r = r.trim();
- }
- }
- if (collect.size() > 0) {
- options = collect.toArray(new String[collect.size()]);
- }
- }
-
- chmod(targetDir, targetFile, permissions, options);
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- //TODO: implement undo ??
- return Status.OK_STATUS;
- }
-
- public void chmod(String targetDir, String targetFile, String perms, String[] options) {
- if (WINDOWS)
- return;
- Runtime r = Runtime.getRuntime();
- try {
- // Note: 3 is from chmod, permissions, and target
- String[] args = new String[3 + (options == null ? 0 : options.length)];
- int i = 0;
- args[i++] = "chmod"; //$NON-NLS-1$
- if (options != null) {
- for (int j = 0; j < options.length; j++)
- args[i++] = options[j];
- }
- args[i++] = perms;
- args[i] = targetDir + IPath.SEPARATOR + targetFile;
- Process process = r.exec(args);
- readOffStream(process.getErrorStream());
- readOffStream(process.getInputStream());
- try {
- process.waitFor();
- } catch (InterruptedException e) {
- // mark thread interrupted and continue
- Thread.currentThread().interrupt();
- }
- } catch (IOException e) {
- // ignore
- }
- }
-
- private void readOffStream(InputStream inputStream) {
- BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
- try {
- while (reader.readLine() != null) {
- // do nothing
- }
- } catch (IOException e) {
- // ignore
- } finally {
- try {
- reader.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CollectAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CollectAction.java
deleted file mode 100644
index fac359050..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CollectAction.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.osgi.util.NLS;
-
-public class CollectAction extends ProvisioningAction {
- public static final String ID = "collect"; //$NON-NLS-1$
- public static final String ARTIFACT_FOLDER = "artifact.folder"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(ActionConstants.PARM_IU);
- IArtifactRequest[] requests;
- try {
- requests = CollectAction.collect(agent, profile, iu);
- } catch (ProvisionException e) {
- return e.getStatus();
- }
-
- @SuppressWarnings("unchecked")
- Collection<IArtifactRequest[]> artifactRequests = (Collection<IArtifactRequest[]>) parameters.get(ActionConstants.PARM_ARTIFACT_REQUESTS);
- artifactRequests.add(requests);
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- // nothing to do for now
- return Status.OK_STATUS;
- }
-
- public static boolean isZipped(Collection<ITouchpointData> data) {
- if (data == null || data.size() == 0)
- return false;
- for (ITouchpointData td : data) {
- if (td.getInstruction("zipped") != null) //$NON-NLS-1$
- return true;
- }
- return false;
- }
-
- public static Map<String, String> createArtifactDescriptorProperties(IInstallableUnit installableUnit) {
- Map<String, String> descriptorProperties = null;
- if (CollectAction.isZipped(installableUnit.getTouchpointData())) {
- descriptorProperties = new HashMap<String, String>();
- descriptorProperties.put(CollectAction.ARTIFACT_FOLDER, Boolean.TRUE.toString());
- }
- return descriptorProperties;
- }
-
- // TODO: Here we may want to consult multiple caches
- static IArtifactRequest[] collect(IProvisioningAgent agent, IProfile profile, IInstallableUnit installableUnit) throws ProvisionException {
- Collection<IArtifactKey> toDownload = installableUnit.getArtifacts();
- if (toDownload == null || toDownload.size() == 0)
- return IArtifactRepositoryManager.NO_ARTIFACT_REQUEST;
-
- IArtifactRepository aggregatedRepositoryView = Util.getAggregatedBundleRepository(agent, profile);
- IArtifactRepository bundlePool = Util.getBundlePoolRepository(agent, profile);
- if (bundlePool == null)
- throw new ProvisionException(Util.createError(NLS.bind(Messages.no_bundle_pool, profile.getProfileId())));
-
- List<IArtifactRequest> requests = new ArrayList<IArtifactRequest>();
- for (IArtifactKey key : toDownload) {
- if (!aggregatedRepositoryView.contains(key)) {
- Map<String, String> repositoryProperties = CollectAction.createArtifactDescriptorProperties(installableUnit);
- requests.add(Util.getArtifactRepositoryManager(agent).createMirrorRequest(key, bundlePool, null, repositoryProperties));
- }
- }
-
- if (requests.isEmpty())
- return IArtifactRepositoryManager.NO_ARTIFACT_REQUEST;
-
- IArtifactRequest[] result = requests.toArray(new IArtifactRequest[requests.size()]);
- return result;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java
deleted file mode 100644
index fab1f90b7..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.osgi.util.NLS;
-
-public class InstallBundleAction extends ProvisioningAction {
- public static final String ID = "installBundle"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- return InstallBundleAction.installBundle(parameters);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return UninstallBundleAction.uninstallBundle(parameters);
- }
-
- public static IStatus installBundle(Map<String, Object> parameters) {
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- String bundleId = (String) parameters.get(ActionConstants.PARM_BUNDLE);
- if (bundleId == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_BUNDLE, ID));
-
- //TODO: eventually remove this. What is a fragment doing here??
- if (QueryUtil.isFragment(iu)) {
- System.out.println("What is a fragment doing here!!! -- " + iu); //$NON-NLS-1$
- return Status.OK_STATUS;
- }
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.isEmpty())
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = null;
- for (IArtifactKey candidate : artifacts) {
- if (candidate.toString().equals(bundleId)) {
- artifactKey = candidate;
- break;
- }
- }
- if (artifactKey == null)
- throw new IllegalArgumentException(NLS.bind(Messages.no_matching_artifact, bundleId));
-
- File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
- if (bundleFile == null || !bundleFile.exists())
- return Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey));
-
- //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 b9d55ba06..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallFeatureAction.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
-import org.eclipse.equinox.internal.p2.update.Site;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class InstallFeatureAction extends ProvisioningAction {
- public static final String ID = "installFeature"; //$NON-NLS-1$
- private static final String UPDATE_FEATURE_APPLICATION_PROP = "org.eclipse.update.feature.application"; //$NON-NLS-1$
- private static final String UPDATE_FEATURE_PLUGIN_PROP = "org.eclipse.update.feature.plugin"; //$NON-NLS-1$
- private static final String UPDATE_FEATURE_PRIMARY_PROP = "org.eclipse.update.feature.primary"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- return InstallFeatureAction.installFeature(parameters);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return UninstallFeatureAction.uninstallFeature(parameters);
- }
-
- public static IStatus installFeature(Map<String, Object> parameters) {
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- PlatformConfigurationWrapper configuration = (PlatformConfigurationWrapper) parameters.get(EclipseTouchpoint.PARM_PLATFORM_CONFIGURATION);
- String feature = (String) parameters.get(ActionConstants.PARM_FEATURE);
- String featureId = (String) parameters.get(ActionConstants.PARM_FEATURE_ID);
- String featureVersion = (String) parameters.get(ActionConstants.PARM_FEATURE_VERSION);
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.isEmpty())
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = null;
- for (IArtifactKey candidate : artifacts) {
- if (candidate.toString().equals(feature)) {
- artifactKey = candidate;
- break;
- }
- }
-
- if (featureId == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_FEATURE_ID, ID));
- else if (ActionConstants.PARM_DEFAULT_VALUE.equals(featureId)) {
- featureId = artifactKey.getId();
- }
-
- if (featureVersion == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_FEATURE_VERSION, ID));
- else if (ActionConstants.PARM_DEFAULT_VALUE.equals(featureVersion)) {
- featureVersion = artifactKey.getVersion().toString();
- }
-
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- File file = Util.getArtifactFile(agent, artifactKey, profile);
- if (file == null || !file.exists()) {
- return Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey));
- }
- String pluginId = iu.getProperty(UPDATE_FEATURE_PLUGIN_PROP);
- boolean isPrimary = Boolean.valueOf(iu.getProperty(UPDATE_FEATURE_PRIMARY_PROP)).booleanValue();
- String application = iu.getProperty(UPDATE_FEATURE_APPLICATION_PROP);
- // TODO this isn't right... but we will leave it for now because we don't actually use the value in the install
- String pluginVersion = artifactKey.getVersion().toString();
- return configuration.addFeatureEntry(file, featureId, featureVersion, pluginId, pluginVersion, isPrimary, application, /*root*/null, iu.getProperty(Site.PROP_LINK_FILE));
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java
deleted file mode 100644
index fa8825e88..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.io.*;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-//This is basically a copy of the ln action in the native touchpoint only it provides @artifact support and does not support the backup store.
-//We should just use the native touchpoint copy when we have a replacement for the use of @artifact in parameters
-public class LinkAction extends ProvisioningAction {
- public static final String ID = "ln"; //$NON-NLS-1$
- private static final boolean WINDOWS = java.io.File.separatorChar == '\\';
-
- public IStatus execute(Map<String, Object> parameters) {
- String targetDir = (String) parameters.get(ActionConstants.PARM_TARGET_DIR);
- if (targetDir == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_TARGET_DIR, ID));
-
- if (targetDir.equals(ActionConstants.PARM_AT_ARTIFACT)) {
- try {
- targetDir = Util.resolveArtifactParam(parameters);
- } catch (CoreException e) {
- return e.getStatus();
- }
- File dir = new File(targetDir);
- if (!dir.isDirectory()) {
- return Util.createError(NLS.bind(Messages.artifact_not_directory, dir));
- }
- }
-
- String linkTarget = (String) parameters.get(ActionConstants.PARM_LINK_TARGET);
- if (linkTarget == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_LINK_TARGET, ID));
-
- String linkName = (String) parameters.get(ActionConstants.PARM_LINK_NAME);
- if (linkName == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_LINK_NAME, ID));
-
- String force = (String) parameters.get(ActionConstants.PARM_LINK_FORCE);
-
- ln(targetDir, linkTarget, linkName, Boolean.valueOf(force).booleanValue());
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return null;
- }
-
- /**
- * Creates a link to the source file linkTarget - the created link is targetDir/linkName.
- * TODO: Only runs on systems with a "ln -s" command supported.
- * TODO: Does not report errors if the "ln -s" fails
- * @param targetDir the directory where the link is created
- * @param linkTarget the source
- * @param linkName the name of the created link
- * @param force if overwrite of existing file should be performed.
- */
- private void ln(String targetDir, String linkTarget, String linkName, boolean force) {
- if (WINDOWS)
- return;
-
- Runtime r = Runtime.getRuntime();
- try {
- Process process = r.exec(new String[] {"ln", "-s" + (force ? "f" : ""), linkTarget, targetDir + IPath.SEPARATOR + linkName}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- readOffStream(process.getErrorStream());
- readOffStream(process.getInputStream());
- try {
- process.waitFor();
- } catch (InterruptedException e) {
- // mark thread interrupted and continue
- Thread.currentThread().interrupt();
- }
- } catch (IOException e) {
- // ignore
- }
- }
-
- private void readOffStream(InputStream inputStream) {
- BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
- try {
- while (reader.readLine() != null) {
- // do nothing
- }
- } catch (IOException e) {
- // ignore
- } finally {
- try {
- reader.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java
deleted file mode 100644
index 52e1f68d4..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java
+++ /dev/null
@@ -1,107 +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.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class MarkStartedAction extends ProvisioningAction {
- public static final String ID = "markStarted"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- String started = (String) parameters.get(ActionConstants.PARM_STARTED);
- if (started == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_STARTED, ID));
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.isEmpty())
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = artifacts.iterator().next();
-
- // the bundleFile might be null here, that's OK.
- File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
-
- 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<String, Object> parameters) {
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- Boolean previousStarted = (Boolean) getMemento().get(ActionConstants.PARM_PREVIOUS_STARTED);
- if (previousStarted == null)
- return Status.OK_STATUS;
-
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.isEmpty())
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = artifacts.iterator().next();
- // the bundleFile might be null here, that's OK.
- File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
-
- 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 10d00d6ad..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveJVMArgumentAction.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2009 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Map;
-import java.util.Properties;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class RemoveJVMArgumentAction extends ProvisioningAction {
- public static final String ID = "removeJvmArg"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- String jvmArg = (String) parameters.get(ActionConstants.PARM_JVM_ARG);
- if (jvmArg == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_JVM_ARG, ID));
- removeArg(jvmArg, parameters);
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- String jvmArg = (String) parameters.get(ActionConstants.PARM_JVM_ARG);
- if (jvmArg == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_JVM_ARG, ID));
- AddJVMArgumentAction.addArg(jvmArg, parameters);
- return Status.OK_STATUS;
- }
-
- public static IStatus removeArg(String arg, Map<String, Object> parameters) {
- LauncherData launcherData = ((Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR)).getLauncherData();
- File storageArea = (File) parameters.get(ActionConstants.PARM_PROFILE_DATA_DIRECTORY);
-
- try {
- if (arg.startsWith(AddJVMArgumentAction.XMS))
- removeByteArg(arg, AddJVMArgumentAction.XMS, launcherData, storageArea);
- else if (arg.startsWith(AddJVMArgumentAction.XMX))
- removeByteArg(arg, AddJVMArgumentAction.XMX, launcherData, storageArea);
- else if (arg.startsWith(AddJVMArgumentAction.XX_MAX_PERM_SIZE))
- removeByteArg(arg, AddJVMArgumentAction.XX_MAX_PERM_SIZE, launcherData, storageArea);
- else
- // Argument with a non-byte value, no special handling
- launcherData.removeJvmArg(arg);
- } catch (IOException e) {
- return new Status(IStatus.ERROR, Activator.ID, Messages.error_processing_vmargs, e);
- } catch (IllegalArgumentException e) {
- return new Status(IStatus.ERROR, Activator.ID, Messages.error_processing_vmargs, e);
- }
- return Status.OK_STATUS;
- }
-
- private static void removeByteArg(String arg, String flag, LauncherData launcherData, File storageArea) throws IOException {
- Properties storedValues = AddJVMArgumentAction.load(storageArea);
-
- String argValue = arg.substring(flag.length());
- String currentArg = AddJVMArgumentAction.getCurrentArg(flag, launcherData.getJvmArgs());
- // Check for user changes
- AddJVMArgumentAction.detectUserValue(currentArg, flag, storedValues);
- AddJVMArgumentAction.validateValue(arg.substring(flag.length()));
-
- removeArg(storedValues, argValue, flag);
- launcherData.removeJvmArg(currentArg);
-
- // Set the argument to use & save stored values
- AddJVMArgumentAction.setToMax(flag, storedValues, launcherData);
- AddJVMArgumentAction.save(storedValues, storageArea);
- }
-
- private static void removeArg(Properties storage, String value, String flag) {
- String[] args = AddJVMArgumentAction.getArgs(storage, flag);
- for (int i = 0; i < args.length; i++)
- if (args[i].equals(value)) {
- args[i] = null;
- // Stop now that we've removed a matching argument
- break;
- }
- setArgs(storage, flag, args);
- }
-
- private static void setArgs(Properties storedValues, String flag, String[] args) {
- if (args == null || args.length == 0)
- // Null or empty list, unset flag
- storedValues.remove(flag);
- else {
- // Build a comma separated list of values for this flag
- String argString = ""; //$NON-NLS-1$
- for (int i = 0; i < args.length; i++)
- if (args[i] != null)
- argString += args[i] + ',';
-
- if (argString.length() > 0)
- // Strip the trailing comma
- storedValues.setProperty(flag, argString.substring(0, argString.length() - 1));
- else
- // Array was full of null values, unset flag
- storedValues.remove(flag);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramArgumentAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramArgumentAction.java
deleted file mode 100644
index e61c38692..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramArgumentAction.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class RemoveProgramArgumentAction extends ProvisioningAction {
- public static final String ID = "removeProgramArg"; //$NON-NLS-1$
- public static final String EMPTY_ARGUMENT = ""; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- String programArg = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG);
- if (programArg == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROGRAM_ARG, ID));
-
- if (programArg.startsWith("-")) {//$NON-NLS-1$
- List<String> programArgs = Arrays.asList(manipulator.getLauncherData().getProgramArgs());
-
- int index = programArgs.indexOf(programArg);
- if (index == -1)
- return Status.OK_STATUS;
-
- index++; // move index to potential programArgValue
- if (programArgs.size() > index) {
- String programArgValue = programArgs.get(index);
- if (!programArgValue.startsWith("-")) //$NON-NLS-1$
- getMemento().put(ActionConstants.PARM_PROGRAM_ARG_VALUE, programArgValue);
- }
- manipulator.getLauncherData().removeProgramArg(programArg);
- }
-
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- String programArg = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG);
- if (programArg == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROGRAM_ARG, ID));
-
- if (programArg.startsWith("-")) {//$NON-NLS-1$ {
- manipulator.getLauncherData().addProgramArg(programArg);
-
- String programArgValue = (String) getMemento().get(ActionConstants.PARM_PROGRAM_ARG_VALUE);
- if (programArgValue != null)
- manipulator.getLauncherData().addProgramArg(programArgValue);
- }
- return Status.OK_STATUS;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveRepositoryAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveRepositoryAction.java
deleted file mode 100644
index 0d63482a9..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveRepositoryAction.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-
-/**
- * An action that adds a repository to the list of known repositories.
- */
-public class RemoveRepositoryAction extends RepositoryAction {
- public static final String ID = "removeRepository"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- try {
- IProvisioningAgent agent = getAgent(parameters);
- IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- IAgentLocation agentLocation = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
- RepositoryEvent event = createEvent(parameters);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- if (profile != null)
- removeRepositoryFromProfile(agentLocation, profile, event.getRepositoryLocation(), event.getRepositoryType());
- //if we are provisioning into the self profile, update the current set of repositories in this configuration
- if (isSelfProfile(registry, profile))
- removeFromSelf(agent, agentLocation, event);
- } catch (CoreException e) {
- return e.getStatus();
- }
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- try {
- IProvisioningAgent agent = getAgent(parameters);
- IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- IAgentLocation agentLocation = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
- RepositoryEvent event = createEvent(parameters);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- if (profile != null)
- addRepositoryToProfile(agentLocation, profile, event.getRepositoryLocation(), event.getRepositoryNickname(), event.getRepositoryType(), event.isRepositoryEnabled());
- //if we are provisioning into the self profile, update the current set of repositories in this configuration
- if (isSelfProfile(registry, profile))
- addToSelf(agent, agentLocation, event);
- return Status.OK_STATUS;
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
-
- protected String getId() {
- return ID;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveSourceBundleAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveSourceBundleAction.java
deleted file mode 100644
index c94490478..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveSourceBundleAction.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class RemoveSourceBundleAction extends ProvisioningAction {
- public static final String ID = "removeSourceBundle"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- return RemoveSourceBundleAction.removeSourceBundle(parameters);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return AddSourceBundleAction.addSourceBundle(parameters);
- }
-
- public static IStatus removeSourceBundle(Map<String, Object> parameters) {
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- SourceManipulator manipulator = (SourceManipulator) parameters.get(EclipseTouchpoint.PARM_SOURCE_BUNDLES);
- String bundleId = (String) parameters.get(ActionConstants.PARM_BUNDLE);
- if (bundleId == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_BUNDLE, ID));
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.isEmpty())
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = null;
- for (IArtifactKey candidate : artifacts) {
- if (candidate.toString().equals(bundleId)) {
- artifactKey = candidate;
- break;
- }
- }
- if (artifactKey == null)
- throw new IllegalArgumentException(NLS.bind(Messages.no_matching_artifact, bundleId));
-
- // the bundleFile might be null here, that's OK.
- File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
-
- try {
- manipulator.removeBundle(bundleFile, artifactKey.getId(), artifactKey.getVersion());
- } catch (IOException e) {
- return Util.createError(NLS.bind(Messages.cannot_configure_source_bundle, artifactKey));
- }
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java
deleted file mode 100644
index 2ded7cfa3..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Map;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * Helper base class for dealing with repositories associated with profiles. Repositories
- * are associated with a profile by encoding the repository locations in a comma-delimited
- * list in a profile property.
- * @see AddRepositoryAction
- * @see RemoveRepositoryAction
- */
-abstract class RepositoryAction extends ProvisioningAction {
-
- private static final String METADATA_REPOSITORY = "org.eclipse.equinox.p2.metadata.repository"; //$NON-NLS-1$
- private static final String ARTIFACT_REPOSITORY = "org.eclipse.equinox.p2.artifact.repository"; //$NON-NLS-1$
-
- private static final String NODE_REPOSITORIES = "repositories"; //$NON-NLS-1$
- private static final String REPOSITORY_COUNT = "count"; //$NON-NLS-1$
- private static final String KEY_URI = "uri"; //$NON-NLS-1$
- private static final String KEY_ENABLED = "enabled"; //$NON-NLS-1$
- private static final String KEY_NICKNAME = "nickname"; //$NON-NLS-1$
-
- /**
- * Returns the repository manager of the given type, or <code>null</code>
- * if not available.
- */
- private static IRepositoryManager<?> getRepositoryManager(IProvisioningAgent agent, int type) {
- if (type == IRepository.TYPE_METADATA) {
- return (IRepositoryManager<?>) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- } else if (type == IRepository.TYPE_ARTIFACT) {
- return (IRepositoryManager<?>) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- }
- return null;
- }
-
- /**
- * Associates the repository described by the given event with the given profile.
- * Has no effect if the repository is already associated with this profile.
- */
- protected void addRepositoryToProfile(IAgentLocation agentLocation, IProfile profile, URI location, String nickname, int type, boolean enabled) {
- Preferences node = getRepositoryPreferenceNode(agentLocation, profile, location, type);
- int count = 0;
-
- if (repositoryExists(node)) {
- count = getRepositoryCount(node);
- // If a user has added a repository we need to set the initial count manually
- if (count == 0)
- count = 1;
- }
- node.put(KEY_URI, location.toString());
- node.put(KEY_ENABLED, Boolean.toString(enabled));
- if (nickname != null)
- node.put(KEY_NICKNAME, nickname);
- count++;
- setRepositoryCount(node, count);
- try {
- node.flush();
- } catch (BackingStoreException e) {
- // TODO: perhaps an Exception should be passed backwards and associated with State
- }
- }
-
- /**
- * Adds the repository corresponding to the given event to the currently running instance.
- */
- protected void addToSelf(IProvisioningAgent agent, IAgentLocation agentLocation, RepositoryEvent event) {
- IRepositoryManager<?> manager = getRepositoryManager(agent, event.getRepositoryType());
- final URI location = event.getRepositoryLocation();
- Preferences node = getRepositoryPreferenceNode(agentLocation, null, location, event.getRepositoryType());
-
- int count = getRepositoryCount(node);
- if (manager.contains(location)) {
- // If a user as added a repository we need to set the initial count manually
- if (count == 0)
- count = 1;
- } else {
- if (manager != null)
- manager.addRepository(location);
- }
- // increment the counter & send to preferences
- count++;
- setRepositoryCount(node, count);
-
- if (!event.isRepositoryEnabled())
- manager.setEnabled(location, false);
- final String name = event.getRepositoryNickname();
- if (name != null)
- manager.setRepositoryProperty(location, IRepository.PROP_NICKNAME, name);
- }
-
- protected RepositoryEvent createEvent(Map<String, Object> parameters) throws CoreException {
- String parm = (String) parameters.get(ActionConstants.PARM_REPOSITORY_LOCATION);
- if (parm == null)
- throw new CoreException(Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_REPOSITORY_LOCATION, getId())));
- URI location = null;
- try {
- location = new URI(parm);
- } catch (URISyntaxException e) {
- throw new CoreException(Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_REPOSITORY_LOCATION, getId()), e));
- }
- parm = (String) parameters.get(ActionConstants.PARM_REPOSITORY_TYPE);
- if (parm == null)
- throw new CoreException(Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_REPOSITORY_TYPE, getId())));
- int type = 0;
- try {
- type = Integer.parseInt(parm);
- } catch (NumberFormatException e) {
- throw new CoreException(Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_REPOSITORY_TYPE, getId()), e));
- }
- String name = (String) parameters.get(ActionConstants.PARM_REPOSITORY_NICKNAME);
- //default is to be enabled
- String enablement = (String) parameters.get(ActionConstants.PARM_REPOSITORY_ENABLEMENT);
- boolean enabled = enablement == null ? true : Boolean.valueOf(enablement).booleanValue();
- return RepositoryEvent.newDiscoveryEvent(location, name, type, enabled);
- }
-
- /**
- * Returns the id of this action.
- */
- protected abstract String getId();
-
- /**
- * Return <code>true</code> if the given profile is the currently running profile,
- * and <code>false</code> otherwise.
- */
- protected boolean isSelfProfile(IProfileRegistry registry, IProfile profile) {
- //if we can't determine the current profile, assume we are running on self
- if (profile == null)
- return true;
- if (registry == null)
- return false;
- final IProfile selfProfile = registry.getProfile(IProfileRegistry.SELF);
- //if we can't determine the self profile, assume we are running on self
- if (selfProfile == null)
- return true;
- return profile.getProfileId().equals(selfProfile.getProfileId());
- }
-
- /**
- * Removes the repository corresponding to the given event from the currently running instance.
- */
- protected void removeFromSelf(IProvisioningAgent agent, IAgentLocation agentLocation, RepositoryEvent event) {
- IRepositoryManager<?> manager = getRepositoryManager(agent, event.getRepositoryType());
- Preferences node = getRepositoryPreferenceNode(agentLocation, null, event.getRepositoryLocation(), event.getRepositoryType());
- int count = getRepositoryCount(node);
- if (--count < 1 && manager != null)
- manager.removeRepository(event.getRepositoryLocation());
- setRepositoryCount(node, count);
- }
-
- /**
- * Removes the association between the repository described by the given event
- * and the given profile. Has no effect if the location is not already associated with
- * this profile.
- */
- protected void removeRepositoryFromProfile(IAgentLocation agentLocation, IProfile profile, URI location, int type) {
- Preferences node = getRepositoryPreferenceNode(agentLocation, profile, location, type);
-
- int count = getRepositoryCount(node);
- if (--count < 1) {
- // TODO: Remove all associated values
- try {
- String[] keys = node.keys();
-
- for (int i = 0; i < keys.length; i++)
- node.remove(keys[i]);
- } catch (BackingStoreException e) {
- // TODO: Should this be passed back to be associated with State?
- }
-
- } else
- setRepositoryCount(node, count);
-
- try {
- node.flush();
- } catch (BackingStoreException e) {
- // TODO: perhaps an Exception should be passed backwards and associated with State
- }
- }
-
- /*
- * Get the counter associated with a repository
- */
- protected int getRepositoryCount(Preferences node) {
- return node.getInt(REPOSITORY_COUNT, 0);
- }
-
- /*
- * Sets the counter associated with this repository to a specific value
- */
- protected void setRepositoryCount(Preferences node, int count) {
- if (count < 1)
- node.remove(REPOSITORY_COUNT);
- else
- node.putInt(REPOSITORY_COUNT, count);
- }
-
- /*
- * Determine if a repository is already known
- */
- protected boolean repositoryExists(Preferences node) {
- if (node.get(KEY_URI, null) == null)
- return false;
- return true;
- }
-
- /*
- * Get the preference node associated with profile & location
- */
- protected Preferences getRepositoryPreferenceNode(IAgentLocation agentLocation, IProfile profile, URI location, int type) {
- String key = type == IRepository.TYPE_METADATA ? METADATA_REPOSITORY : ARTIFACT_REPOSITORY;
- String profileId = profile == null ? IProfileRegistry.SELF : profile.getProfileId();
- return new ProfileScope(agentLocation, profileId).getNode(key + '/' + NODE_REPOSITORIES + '/' + getKey(location));
- }
-
- /*
- * Copied from AbstractRepositoryManager
- */
- private String getKey(URI location) {
- String key = location.toString().replace('/', '_');
- //remove trailing slash
- if (key.endsWith("_")) //$NON-NLS-1$
- key = key.substring(0, key.length() - 1);
- return key;
- }
-
- protected IProvisioningAgent getAgent(Map<String, Object> parameters) throws CoreException {
- //We shouldn't really know about the session parameter
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get("agent"); //$NON-NLS-1$
- if (agent == null)
- throw new CoreException(Util.createError(NLS.bind(Messages.parameter_not_set, "agent", getId()))); //$NON-NLS-1$
- return agent;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetLauncherNameAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetLauncherNameAction.java
deleted file mode 100644
index 01220b8ea..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetLauncherNameAction.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.engine.Profile;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-
-public class SetLauncherNameAction extends ProvisioningAction {
- public static final String ID = "setLauncherName"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- getMemento().put(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME, profile.getProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME));
- String launcherName = (String) parameters.get(ActionConstants.PARM_LAUNCHERNAME);
- setLauncher(manipulator, profile, launcherName);
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- String previousLauncherName = (String) getMemento().get(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME);
- setLauncher(manipulator, profile, previousLauncherName);
- return Status.OK_STATUS;
- }
-
- private static void setLauncher(Manipulator manipulator, IProfile profile, String launcherName) {
- //Get the launcherData before changing the name so we don't lose anything from the old launcher.ini
- LauncherData launcherData = manipulator.getLauncherData();
- ((Profile) 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 e334402a8..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetProgramPropertyAction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class SetProgramPropertyAction extends ProvisioningAction {
- public static final String ID = "setProgramProperty"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- String propName = (String) parameters.get(ActionConstants.PARM_PROP_NAME);
- if (propName == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROP_NAME, ID));
- String propValue = (String) parameters.get(ActionConstants.PARM_PROP_VALUE);
- if (propValue != null && propValue.equals(ActionConstants.PARM_AT_ARTIFACT)) {
- try {
- propValue = Util.resolveArtifactParam(parameters);
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
-
- getMemento().put(ActionConstants.PARM_PREVIOUS_VALUE, manipulator.getConfigData().getProperty(propName));
- manipulator.getConfigData().setProperty(propName, propValue);
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- String propName = (String) parameters.get(ActionConstants.PARM_PROP_NAME);
- if (propName == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROP_NAME, ID));
- String previousValue = (String) getMemento().get(ActionConstants.PARM_PREVIOUS_VALUE);
- manipulator.getConfigData().setProperty(propName, previousValue);
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java
deleted file mode 100644
index 9d2f3c456..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java
+++ /dev/null
@@ -1,110 +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.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class SetStartLevelAction extends ProvisioningAction {
- public static final String ID = "setStartLevel"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- String startLevel = (String) parameters.get(ActionConstants.PARM_START_LEVEL);
- if (startLevel == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_START_LEVEL, ID));
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.isEmpty())
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = artifacts.iterator().next();
- // the bundleFile might be null here, that's OK.
- File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
-
- 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<String, Object> parameters) {
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- Integer previousStartLevel = (Integer) getMemento().get(ActionConstants.PARM_PREVIOUS_START_LEVEL);
- if (previousStartLevel == null)
- return Status.OK_STATUS;
-
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.isEmpty())
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = artifacts.iterator().next();
- // the bundleFile might be null here, that's OK.
- File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
-
- 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 0d4070995..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallBundleAction.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.osgi.util.NLS;
-
-public class UninstallBundleAction extends ProvisioningAction {
- public static final String ID = "uninstallBundle"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- return UninstallBundleAction.uninstallBundle(parameters);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return InstallBundleAction.installBundle(parameters);
- }
-
- public static IStatus uninstallBundle(Map<String, Object> parameters) {
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- String bundleId = (String) parameters.get(ActionConstants.PARM_BUNDLE);
- if (bundleId == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_BUNDLE, ID));
-
- //TODO: eventually remove this. What is a fragment doing here??
- if (QueryUtil.isFragment(iu)) {
- System.out.println("What is a fragment doing here!!! -- " + iu); //$NON-NLS-1$
- return Status.OK_STATUS;
- }
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.isEmpty())
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = null;
- for (IArtifactKey candidate : artifacts) {
- if (candidate.toString().equals(bundleId)) {
- artifactKey = candidate;
- break;
- }
- }
- if (artifactKey == null)
- throw new IllegalArgumentException(NLS.bind(Messages.no_matching_artifact, bundleId));
-
- // the bundleFile might be null here, that's OK.
- File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
-
- 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 33bee8ef9..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallFeatureAction.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class UninstallFeatureAction extends ProvisioningAction {
- public static final String ID = "uninstallFeature"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- return UninstallFeatureAction.uninstallFeature(parameters);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return InstallFeatureAction.installFeature(parameters);
- }
-
- public static IStatus uninstallFeature(Map<String, Object> parameters) {
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- PlatformConfigurationWrapper configuration = (PlatformConfigurationWrapper) parameters.get(EclipseTouchpoint.PARM_PLATFORM_CONFIGURATION);
- String feature = (String) parameters.get(ActionConstants.PARM_FEATURE);
- String featureId = (String) parameters.get(ActionConstants.PARM_FEATURE_ID);
- String featureVersion = (String) parameters.get(ActionConstants.PARM_FEATURE_VERSION);
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.isEmpty())
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = null;
- for (IArtifactKey candidate : artifacts) {
- if (candidate.toString().equals(feature)) {
- artifactKey = candidate;
- break;
- }
- }
-
- if (featureId == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_FEATURE_ID, ID));
- else if (ActionConstants.PARM_DEFAULT_VALUE.equals(featureId)) {
- featureId = artifactKey.getId();
- }
-
- if (featureVersion == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_FEATURE_VERSION, ID));
- else if (ActionConstants.PARM_DEFAULT_VALUE.equals(featureVersion)) {
- featureVersion = artifactKey.getVersion().toString();
- }
-
- return configuration.removeFeatureEntry(featureId, featureVersion);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/messages.properties b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/messages.properties
deleted file mode 100644
index 74c1907e1..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/messages.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-artifact_file_not_found=The artifact file for {0} was not found.
-artifact_not_directory=The artifact {0} is not a directory.
-parameter_not_set=The \"{0}\" parameter was not set in the \"{1}\" action.
-iu_contains_no_arifacts=Installable unit contains no artifacts: {0}.
-no_matching_artifact=No matching artifact found for: {0}.
-missing_manifest=The manifest is missing for: {0}.
-failed_bundleinfo=Failed to create bundleInfo for: {0}.
-cannot_configure_source_bundle=Cannot configure {0} as a source bundle.
-error_parsing_startlevel=Error parsing start level: {0} for bundle: {1}.
-no_bundle_pool=No bundle pool defined for profile: {0}.
-error_processing_vmargs=An error occurred while processing the JVM argument.
-invalid_byte_format=Invalid format for byte argument: {0}.
-unable_to_open_file=Unable to open file: {0}.
-action_0_failed_file_1_doesNotExist=The action {0} failed - file {1} does not exist.
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/messages.properties b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/messages.properties
deleted file mode 100644
index 81f1ab022..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/messages.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-error_loading_manipulator=Error while loading manipulator.
-failed_acquire_framework_manipulator=Could not acquire the framework manipulator service.
-failed_prepareIU=Failed to prepare partial IU: {0}.
-error_saving_manipulator=Error saving manipulator.
-error_saving_platform_configuration=Error saving platform configuration.
-error_saving_source_bundles_list=Error saving source bundles list.
-error_parsing_configuration=Error parsing platform configuration.
-publisher_not_available=The partial IU could not be updated. Publisher not available: {0}.
-artifact_write_unsupported=Repository not writeable.
-artifact_file_not_found=The artifact file for {0} was not found.
-artifact_retrieval_unsupported=Repository does not support artifact retrieval
-bundle_pool_not_writeable=Bundle pool repository not writeable: {0}
-BundlePool=Bundle pool
-cannot_calculate_extension_location=Unable to calculate extension location for: {0}.
-parent_dir_features=Parent directory should be "features": {0}.
-platform_config_unavailable=Platform configuration not available.
-unexpected_prepareiu_error=Unexpected state: prepareIU
-error_validating_profile=Error validating profile {0}.
-iu_contains_no_arifacts=Installable unit contains no artifacts: {0}.
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Configuration.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Configuration.java
deleted file mode 100644
index 588a5c767..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Configuration.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.URLUtil;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Activator;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.p2.core.ProvisionException;
-
-/**
- * @since 1.0
- */
-public class Configuration {
-
- private List<Site> sites = new ArrayList<Site>();
- String date;
- boolean transientProperty;
- String version;
- String shared_ur;
-
- public static Configuration load(File location, URL osgiInstallArea) throws ProvisionException {
- return ConfigurationIO.read(location, osgiInstallArea);
- }
-
- public Configuration() {
- super();
- }
-
- public void save(File location, URL osgiInstallArea) throws ProvisionException {
- ConfigurationIO.write(location, this, osgiInstallArea);
- }
-
- public String getSharedUR() {
- return shared_ur;
- }
-
- public void setSharedUR(String value) {
- shared_ur = value;
- }
-
- public List<Site> getSites() {
- return internalGetSites(true);
- }
-
- List<Site> internalGetSites(boolean includeParent) {
- if (!includeParent)
- return sites;
- String shared = getSharedUR();
- if (shared == null)
- return sites;
- List<Site> result = new ArrayList<Site>(sites);
- try {
- URL url = new URL(shared);
- File location = URLUtil.toFile(url);
- if (location == null)
- return result;
-
- if (!location.isAbsolute()) {
- File eclipseHome = Util.getEclipseHome();
- if (eclipseHome == null)
- return null;
-
- location = new File(eclipseHome, location.getPath());
- }
- Configuration parent = Configuration.load(location, Util.getOSGiInstallArea());
- if (parent == null)
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Unable to load parent configuration from: " + location)); //$NON-NLS-1$
- else
- result.addAll(parent.getSites());
- } catch (MalformedURLException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error occurred while getting parent configuration location.", e)); //$NON-NLS-1$
- } catch (ProvisionException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error occurred while loading parent configuratin from: " + shared, e)); //$NON-NLS-1$
- }
- return result;
- }
-
- public void add(Site site) {
- sites.add(site);
- }
-
- public boolean removeSite(Site site) {
- return sites.remove(site);
- }
-
- public String getDate() {
- return date;
- }
-
- public void setDate(String date) {
- this.date = date;
- }
-
- public void setVersion(String value) {
- version = value;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setTransient(boolean value) {
- transientProperty = value;
- }
-
- public boolean isTransient() {
- return transientProperty;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationCache.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationCache.java
deleted file mode 100644
index 53c5c65f5..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationCache.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * TODO ensure thread safety
- *
- */
-public class ConfigurationCache {
- private static Map<String, CacheEntry> cache = new HashMap<String, CacheEntry>();
-
- // class used to represent cache values
- static class CacheEntry {
- long timestamp;
- Configuration config;
- }
-
- // helper method to convert the file to a cache key. convert to an absolute
- // path to ensure equality between relative and absolute comparisons
- private static String toKey(File file) {
- try {
- return file.getCanonicalPath();
- } catch (IOException e) {
- // ignore and return the absolute value instead
- }
- return file.getAbsolutePath();
- }
-
- /*
- * Return the configuration object in the cache which is represented
- * by the given file. Do a check on disk to see if the cache is up-to-date.
- * If not, then treat it as a cache miss.
- */
- public static Configuration get(File file) {
- String key = toKey(file);
- CacheEntry entry = cache.get(key);
- if (entry == null)
- return null;
- return file.lastModified() == entry.timestamp ? entry.config : null;
- }
-
- /*
- * Store the given configuration in the cache.
- */
- public static void put(File file, Configuration config) {
- String key = toKey(file);
- if (config == null) {
- cache.remove(key);
- return;
- }
- CacheEntry entry = new CacheEntry();
- entry.config = config;
- entry.timestamp = file.lastModified();
- cache.put(key, entry);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationConstants.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationConstants.java
deleted file mode 100644
index 04fa2b325..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationConstants.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-/**
- * @since 1.0
- */
-public interface ConfigurationConstants {
-
- final String ELEMENT_CONFIG = "config"; //$NON-NLS-1$
- final String ELEMENT_FEATURE = "feature"; //$NON-NLS-1$
- final String ELEMENT_SITE = "site"; //$NON-NLS-1$
-
- final String ATTRIBUTE_APPLICATION = "application"; //$NON-NLS-1$
- final String ATTRIBUTE_DATE = "date"; //$NON-NLS-1$
- final String ATTRIBUTE_ENABLED = "enabled"; //$NON-NLS-1$
- final String ATTRIBUTE_ID = "id"; //$NON-NLS-1$
- final String ATTRIBUTE_LINKFILE = "linkfile"; //$NON-NLS-1$
- final String ATTRIBUTE_LIST = "list"; //$NON-NLS-1$
- final String ATTRIBUTE_PLUGIN_IDENTIFIER = "plugin-identifier"; //$NON-NLS-1$
- final String ATTRIBUTE_PLUGIN_VERSION = "plugin-version"; //$NON-NLS-1$
- final String ATTRIBUTE_PRIMARY = "primary"; //$NON-NLS-1$
- final String ATTRIBUTE_POLICY = "policy"; //$NON-NLS-1$
- final String ATTRIBUTE_ROOT = "root"; //$NON-NLS-1$
- final String ATTRIBUTE_SHARED_UR = "shared_ur"; //$NON-NLS-1$
- final String ATTRIBUTE_TRANSIENT = "transient"; //$NON-NLS-1$
- final String ATTRIBUTE_UPDATEABLE = "updateable"; //$NON-NLS-1$
- final String ATTRIBUTE_URL = "url"; //$NON-NLS-1$
- final String ATTRIBUTE_VERSION = "version"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationIO.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationIO.java
deleted file mode 100644
index 44dfae151..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationIO.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-import java.io.File;
-import java.net.URL;
-import org.eclipse.equinox.p2.core.ProvisionException;
-
-/*
- * Class which controls the reading and writing of Configuration (platform.xml) objects.
- * We keep a local cached copy to avoid multiple reads. When we install new features we
- * seem to only write out the platform.xml in the "commit" phase so we don't need to
- * batch the writes.
- */
-public class ConfigurationIO {
- private static CacheEntry cache = null;
-
- // class used to represent cache values
- static class CacheEntry {
- Configuration config;
- URL osgiInstallArea;
- File location;
- long timestamp;
- }
-
- /*
- * Return the configuration object which is represented by the given file.
- */
- static Configuration read(File file, URL osgiInstallArea) throws ProvisionException {
- // check the cached copy first
- if (cache != null && file.lastModified() == cache.timestamp)
- return cache.config;
-
- // cache miss or file is out of date, read from disk
- Configuration config = ConfigurationParser.parse(file, osgiInstallArea);
- if (config == null)
- return null;
-
- // successful read, store in the cache before we return
- cache(file, config, osgiInstallArea);
- return config;
- }
-
- /*
- * Store the given configuration file in the local cache.
- */
- private static void cache(File location, Configuration config, URL osgiInstallArea) {
- CacheEntry entry = new CacheEntry();
- entry.config = config;
- entry.osgiInstallArea = osgiInstallArea;
- entry.location = location;
- entry.timestamp = location.lastModified();
- cache = entry;
- }
-
- /*
- * Save the given configuration to the file-system.
- */
- static void write(File location, Configuration config, URL osgiInstallArea) throws ProvisionException {
- // write it to disk
- ConfigurationWriter.save(config, location, osgiInstallArea);
- // save a copy in the cache
- cache(location, config, osgiInstallArea);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java
deleted file mode 100644
index ae3e2c3c4..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-import java.io.*;
-import java.net.*;
-import java.util.ArrayList;
-import java.util.StringTokenizer;
-import javax.xml.parsers.*;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.osgi.util.NLS;
-import org.w3c.dom.*;
-import org.xml.sax.SAXException;
-
-/**
- * Parser for platform.xml files.
- *
- * @since 1.0
- */
-public class ConfigurationParser implements ConfigurationConstants {
- static final String PLATFORM_BASE = "platform:/base/"; //$NON-NLS-1$
- private URL osgiInstallArea;
-
- /*
- * Parse the given file handle which points to a platform.xml file and a configuration object.
- * Returns null if the file doesn't exist.
- */
- static Configuration parse(File file, URL osgiInstallArea) throws ProvisionException {
- return new ConfigurationParser(osgiInstallArea).internalParse(file);
- }
-
- private ConfigurationParser(URL osgiInstallArea) {
- this.osgiInstallArea = osgiInstallArea;
- }
-
- /*
- * Create a feature object based on the given DOM node.
- * Return the new feature.
- */
- private Feature createFeature(Node node, Site site) {
- Feature result = new Feature(site);
- String id = getAttribute(node, ATTRIBUTE_ID);
- if (id != null)
- result.setId(id);
- String url = getAttribute(node, ATTRIBUTE_URL);
- if (url != null)
- result.setUrl(url);
- String version = getAttribute(node, ATTRIBUTE_VERSION);
- if (version != null)
- result.setVersion(version);
- String pluginIdentifier = getAttribute(node, ATTRIBUTE_PLUGIN_IDENTIFIER);
- if (pluginIdentifier != null)
- result.setPluginIdentifier(pluginIdentifier);
- String pluginVersion = getAttribute(node, ATTRIBUTE_PLUGIN_VERSION);
- // plug-in version is the same as the feature version if it is missing
- if (pluginVersion == null)
- pluginVersion = version;
- if (pluginVersion != null)
- result.setPluginVersion(pluginVersion);
- String application = getAttribute(node, ATTRIBUTE_APPLICATION);
- if (application != null)
- result.setApplication(application);
-
- // get primary flag
- String flag = getAttribute(node, ATTRIBUTE_PRIMARY);
- if (flag != null && Boolean.valueOf(flag).booleanValue())
- result.setPrimary(true);
-
- // get install locations
- String locations = getAttribute(node, ATTRIBUTE_ROOT);
- if (locations != null) {
- StringTokenizer tokenizer = new StringTokenizer(locations, ","); //$NON-NLS-1$
- ArrayList<URL> rootList = new ArrayList<URL>();
- while (tokenizer.hasMoreTokens()) {
- try {
- URL rootEntry = new URL(tokenizer.nextToken().trim());
- rootList.add(rootEntry);
- } catch (MalformedURLException e) {
- // skip bad entries ...
- }
- }
- URL[] roots = rootList.toArray(new URL[rootList.size()]);
- result.setRoots(roots);
- }
-
- return result;
- }
-
- /*
- * Create the features from the given DOM node.
- */
- private void createFeatures(Node node, Site site) {
- NodeList children = node.getChildNodes();
- int size = children.getLength();
- for (int i = 0; i < size; i++) {
- Node child = children.item(i);
- if (child.getNodeType() != Node.ELEMENT_NODE)
- continue;
- if (!ELEMENT_FEATURE.equalsIgnoreCase(child.getNodeName()))
- continue;
- Feature feature = createFeature(child, site);
- if (feature != null)
- site.addFeature(feature);
- }
- }
-
- /*
- * Create a site based on the given DOM node.
- */
- private Site createSite(Node node) {
- Site result = new Site();
- String policy = getAttribute(node, ATTRIBUTE_POLICY);
- if (policy != null)
- result.setPolicy(policy);
- String enabled = getAttribute(node, ATTRIBUTE_ENABLED);
- if (enabled != null)
- result.setEnabled(Boolean.valueOf(enabled).booleanValue());
- String updateable = getAttribute(node, ATTRIBUTE_UPDATEABLE);
- if (updateable != null)
- result.setUpdateable(Boolean.valueOf(updateable).booleanValue());
- String url = getAttribute(node, ATTRIBUTE_URL);
- if (url != null) {
- try {
- // do this to ensure the location is an encoded URI
- URI uri = URIUtil.fromString(url);
- URI osgiURI = osgiInstallArea != null ? URIUtil.toURI(osgiInstallArea) : null;
- result.setUrl(getLocation(uri, osgiURI).toString());
- } catch (URISyntaxException e) {
- result.setUrl(url);
- }
- }
- String linkFile = getAttribute(node, ATTRIBUTE_LINKFILE);
- if (linkFile != null)
- result.setLinkFile(linkFile);
- String list = getAttribute(node, ATTRIBUTE_LIST);
- if (list != null)
- for (StringTokenizer tokenizer = new StringTokenizer(list, ","); tokenizer.hasMoreTokens();) //$NON-NLS-1$
- result.addPlugin(tokenizer.nextToken());
- createFeatures(node, result);
- return result;
- }
-
- /*
- * Convert the given url string to an absolute url. If the string is
- * platform:/base/ then return a string which represents the osgi
- * install area.
- */
- private URI getLocation(URI location, URI osgiArea) {
- if (osgiArea == null)
- return location;
- if (PLATFORM_BASE.equals(location.toString()))
- return osgiArea;
- return URIUtil.makeAbsolute(location, osgiArea);
- }
-
- /*
- * Return the attribute with the given name, or null if it does
- * not exist.
- */
- private String getAttribute(Node node, String name) {
- NamedNodeMap attributes = node.getAttributes();
- Node temp = attributes.getNamedItem(name);
- return temp == null ? null : temp.getNodeValue();
- }
-
- /*
- * Load the given file into a DOM document.
- */
- private Document load(InputStream input) throws ParserConfigurationException, IOException, SAXException {
- // load the feature xml
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- DocumentBuilder builder = factory.newDocumentBuilder();
- input = new BufferedInputStream(input);
- try {
- return builder.parse(input);
- } finally {
- if (input != null)
- try {
- input.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-
- /*
- * Parse the given file handle which points to a platform.xml file and a configuration object.
- * Returns null if the file doesn't exist.
- */
- private Configuration internalParse(File file) throws ProvisionException {
- if (!file.exists()) {
- // remove from cache since it doesn't exist anymore on disk
- ConfigurationCache.put(file, null);
- return null;
- }
- // have we read this before?
- Configuration result = ConfigurationCache.get(file);
- if (result != null)
- return result;
- try {
- InputStream input = new BufferedInputStream(new FileInputStream(file));
- Document document = load(input);
- result = process(document);
- // save for future use
- ConfigurationCache.put(file, result);
- return result;
- } catch (IOException e) {
- throw new ProvisionException(NLS.bind(Messages.error_reading_config, file), e);
- } catch (ParserConfigurationException e) {
- throw new ProvisionException(Messages.error_parsing_config, e);
- } catch (SAXException e) {
- throw new ProvisionException(Messages.error_parsing_config, e);
- }
- }
-
- /*
- * Process the given DOM document and create the appropriate
- * site objects.
- */
- private Configuration process(Document document) {
- Node node = getConfigElement(document);
- if (node == null)
- return null;
- Configuration configuration = createConfiguration(node);
- NodeList children = node.getChildNodes();
- int size = children.getLength();
- for (int i = 0; i < size; i++) {
- Node child = children.item(i);
- if (child.getNodeType() != Node.ELEMENT_NODE)
- continue;
- if (!ELEMENT_SITE.equalsIgnoreCase(child.getNodeName()))
- continue;
- Site site = createSite(child);
- if (site != null)
- configuration.add(site);
- }
- return configuration;
- }
-
- private Configuration createConfiguration(Node node) {
- Configuration result = new Configuration();
- String value = getAttribute(node, ATTRIBUTE_DATE);
- if (value != null)
- result.setDate(value);
- value = getAttribute(node, ATTRIBUTE_TRANSIENT);
- if (value != null)
- result.setTransient(Boolean.valueOf(value).booleanValue());
- value = getAttribute(node, ATTRIBUTE_SHARED_UR);
- if (value != null)
- result.setSharedUR(value);
- value = getAttribute(node, ATTRIBUTE_VERSION);
- if (value != null)
- result.setVersion(value);
- return result;
- }
-
- private Node getConfigElement(Document doc) {
- NodeList children = doc.getChildNodes();
- int size = children.getLength();
- for (int i = 0; i < size; i++) {
- Node child = children.item(i);
- if (child.getNodeType() != Node.ELEMENT_NODE)
- continue;
- if (ELEMENT_CONFIG.equalsIgnoreCase(child.getNodeName()))
- return child;
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java
deleted file mode 100644
index 7ee7ae534..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-import java.io.*;
-import java.net.*;
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.URLUtil;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Activator;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @since 1.0
- */
-public class ConfigurationWriter implements ConfigurationConstants {
-
- /*
- * Save the given configuration to the specified location.
- */
- static void save(Configuration configuration, File location, URL osgiInstallArea) throws ProvisionException {
- XMLWriter writer = null;
- try {
- OutputStream output = new BufferedOutputStream(new FileOutputStream(location));
- writer = new XMLWriter(output);
- Map<String, String> args = new HashMap<String, String>();
-
- 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 (Site site : configuration.internalGetSites(false)) {
- write(writer, site, osgiInstallArea);
- }
-
- writer.endTag(ELEMENT_CONFIG);
- } catch (UnsupportedEncodingException e) {
- throw new ProvisionException(NLS.bind(Messages.error_saving_config, location), e);
- } catch (FileNotFoundException e) {
- throw new ProvisionException(NLS.bind(Messages.error_saving_config, location), e);
- } finally {
- if (writer != null) {
- writer.flush();
- writer.close();
- }
- }
- // put the config in the cache in case someone in the same session wants to read it
- ConfigurationCache.put(location, configuration);
- }
-
- /*
- * Write out the given site.
- */
- private static void write(XMLWriter writer, Site site, URL osgiInstallArea) {
- Map<String, String> args = new HashMap<String, String>();
-
- String value = site.getLinkFile();
- if (value != null)
- args.put(ATTRIBUTE_LINKFILE, value);
-
- value = site.getPolicy();
- if (value != null)
- args.put(ATTRIBUTE_POLICY, value);
-
- value = site.getUrl();
- if (value != null) {
- try {
- value = URIUtil.toUnencodedString(new URI(value));
- } catch (URISyntaxException e) {
- // ignore this error and just use the value straight as-is
- }
- args.put(ATTRIBUTE_URL, getLocation(value, osgiInstallArea));
- }
-
- value = toString(site.getList());
- if (value != null)
- args.put(ATTRIBUTE_LIST, value);
-
- args.put(ATTRIBUTE_UPDATEABLE, Boolean.toString(site.isUpdateable()));
- args.put(ATTRIBUTE_ENABLED, Boolean.toString(site.isEnabled()));
-
- writer.startTag(ELEMENT_SITE, args);
- write(writer, site.getFeatures());
- writer.endTag(ELEMENT_SITE);
- }
-
- /*
- * Return the location for the given location which is a url string. Take into account
- * the specified osgi install area. This method should make the path relative if
- * possible and could potentially return platform:/base/.
- */
- private static String getLocation(String value, URL osgiInstallArea) {
- if (osgiInstallArea == null || !value.startsWith("file:")) //$NON-NLS-1$
- return value;
- try {
- // if our site represents the osgi install area, then write out platform:/base/
- File installArea = URLUtil.toFile(osgiInstallArea);
- File path = URLUtil.toFile(new URL(value));
- if (installArea.getAbsoluteFile().equals(path.getAbsoluteFile()))
- return ConfigurationParser.PLATFORM_BASE;
- } catch (MalformedURLException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error occurred while writing configuration.", e)); //$NON-NLS-1$
- }
- return PathUtil.makeRelative(value, osgiInstallArea);
- }
-
- /*
- * Convert the given list to a comma-separated string.
- */
- private static String toString(Object[] list) {
- if (list == null || list.length == 0)
- return null;
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < list.length; i++) {
- buffer.append(list[i].toString());
- if (i + 1 < list.length)
- buffer.append(',');
- }
- return buffer.toString();
- }
-
- /*
- * Write out the given list of features.
- */
- private static void write(XMLWriter writer, Feature[] features) {
- if (features == null || features.length == 0)
- return;
- for (int i = 0; i < features.length; i++) {
- Feature feature = features[i];
- Map<String, String> args = new HashMap<String, String>();
- String value = feature.getId();
- if (value != null)
- args.put(ATTRIBUTE_ID, value);
- value = feature.getUrl();
- if (value != null)
- args.put(ATTRIBUTE_URL, value);
- value = feature.getVersion();
- if (value != null)
- args.put(ATTRIBUTE_VERSION, value);
- value = feature.getPluginIdentifier();
- // only write out the plug-in identifier if it is different from the feature id
- if (value != null && !value.equals(feature.getId()))
- args.put(ATTRIBUTE_PLUGIN_IDENTIFIER, value);
- value = feature.getPluginVersion();
- // only write out the plug-in version if it is different from the feature version
- if (value != null && !value.equals(feature.getVersion()))
- args.put(ATTRIBUTE_PLUGIN_VERSION, value);
- if (feature.isPrimary())
- args.put(ATTRIBUTE_PRIMARY, "true"); //$NON-NLS-1$
- value = feature.getApplication();
- if (value != null)
- args.put(ATTRIBUTE_APPLICATION, value);
-
- // collect the roots
- URL[] roots = feature.getRoots();
- if (roots != null && roots.length > 0)
- args.put(ATTRIBUTE_ROOT, toString(roots));
-
- writer.startTag(ELEMENT_FEATURE, args);
- writer.endTag(ELEMENT_FEATURE);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Feature.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Feature.java
deleted file mode 100644
index 0866b2b99..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Feature.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-import java.net.URL;
-
-/*
- * Represents a feature entry in a platform.xml file.
- */
-public class Feature {
-
- private String id;
- private String url;
- private String version;
- private Site site;
- private String pluginIdentifier;
- private String pluginVersion;
- private String application;
- private URL[] roots;
- private boolean primary = false;
-
- public Feature(Site site) {
- super();
- if (site == null)
- throw new IllegalArgumentException(Messages.empty_feature_site);
- this.site = site;
- }
-
- public String getApplication() {
- return application;
- }
-
- public String getId() {
- return id;
- }
-
- public String getPluginIdentifier() {
- return pluginIdentifier;
- }
-
- public String getPluginVersion() {
- return pluginVersion;
- }
-
- public URL[] getRoots() {
- return roots;
- }
-
- public Site getSite() {
- return site;
- }
-
- public String getUrl() {
- return url;
- }
-
- public String getVersion() {
- return version;
- }
-
- public boolean isPrimary() {
- return primary;
- }
-
- public void setApplication(String application) {
- this.application = application;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public void setPluginIdentifier(String pluginIdentifier) {
- this.pluginIdentifier = pluginIdentifier;
- }
-
- public void setPluginVersion(String pluginVersion) {
- this.pluginVersion = pluginVersion;
- }
-
- public void setPrimary(boolean primary) {
- this.primary = primary;
- }
-
- public void setRoots(URL[] roots) {
- this.roots = roots;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (!(obj instanceof Feature))
- return false;
- Feature other = (Feature) obj;
- if (!equals(getId(), other.getId()))
- return false;
- // shallow equals here. sites should never be null
- if (!equals(getSite().getUrl(), other.getSite().getUrl()))
- return false;
- if (!equals(getUrl(), other.getUrl()))
- return false;
- if (!equals(getVersion(), other.getVersion()))
- return false;
- return true;
- }
-
- private boolean equals(Object one, Object two) {
- return one == null ? two == null : one.equals(two);
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return id.hashCode() + version.hashCode();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Messages.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Messages.java
deleted file mode 100644
index 845e206e5..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Messages.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.update.messages"; //$NON-NLS-1$
- public static String empty_feature_site;
- public static String error_saving_config;
- public static String error_reading_config;
- public static String error_parsing_config;
-
- static {
- // load message values from bundle file and assign to fields below
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/PathUtil.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/PathUtil.java
deleted file mode 100644
index 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 10411b29c..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-import java.util.*;
-
-/*
- * Represents a site in a platform.xml file.
- */
-public class Site {
-
- public final static String POLICY_MANAGED_ONLY = "MANAGED-ONLY"; //$NON-NLS-1$
- public final static String POLICY_USER_EXCLUDE = "USER-EXCLUDE"; //$NON-NLS-1$
- public final static String POLICY_USER_INCLUDE = "USER-INCLUDE"; //$NON-NLS-1$
- public final static String PROP_LINK_FILE = "org.eclipse.update.site.linkFile"; //$NON-NLS-1$
-
- private String policy;
- private boolean enabled = true;
- private boolean updateable = true;
- private String url;
- private String linkFile;
- private Collection<Feature> features = new HashSet<Feature>();
- private List<String> list = new ArrayList<String>();
-
- public void addFeature(Feature feature) {
- this.features.add(feature);
- }
-
- public void addPlugin(String plugin) {
- this.list.add(plugin);
- }
-
- public Feature[] getFeatures() {
- return features.toArray(new Feature[features.size()]);
- }
-
- /*
- * Return the feature object with the specific id and version. Return null
- * if there is no match or the id is null. If the version is null then return the
- * first feature with a matching id.
- */
- public Feature getFeature(String id, String version) {
- if (id == null)
- return null;
- for (Feature feature : features) {
- if (id.equals(feature.getId())) {
- if (version == null || version.equals(feature.getVersion()))
- return feature;
- }
- }
- return null;
- }
-
- public Feature removeFeature(String featureURL) {
- for (Feature feature : features) {
- String nextURL = feature.getUrl();
- if (nextURL != null && nextURL.equals(featureURL))
- return features.remove(feature) ? feature : null;
- }
- return null;
- }
-
- public String getLinkFile() {
- return linkFile;
- }
-
- public String[] getList() {
- return list.toArray(new String[list.size()]);
- }
-
- public String getPolicy() {
- return policy;
- }
-
- /**
- * Note the string that we are returning is an <em>ENCODED</em> URI string.
- */
- public String getUrl() {
- return url;
- }
-
- public boolean isEnabled() {
- return enabled;
- }
-
- public boolean isUpdateable() {
- return updateable;
- }
-
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- }
-
- public void setLinkFile(String linkFile) {
- this.linkFile = linkFile;
- }
-
- public void setPolicy(String policy) {
- this.policy = policy;
- }
-
- public void setUpdateable(boolean updateable) {
- this.updateable = updateable;
- }
-
- /**
- * Note that the string should be an <em>ENCODED</em> URI string.
- */
- public void setUrl(String url) {
- this.url = url;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return getUrl().hashCode();
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (!(obj instanceof Site))
- return false;
- Site other = (Site) obj;
- if (isEnabled() != other.isEnabled())
- return false;
- if (isUpdateable() != other.isUpdateable())
- return false;
- if (!getUrl().equals(other.getUrl()))
- return false;
- if (!Site.equals(getLinkFile(), other.getLinkFile()))
- return false;
- if (!Site.equals(getPolicy(), other.getPolicy()))
- return false;
- if (!Site.equals(getList(), other.getList()))
- return false;
- if (!Site.equals(getFeatures(), other.getFeatures()))
- return false;
- return true;
- }
-
- /*
- * Return a boolean value indicating whether or not the given
- * objects are considered equal.
- */
- public static boolean equals(Object one, Object two) {
- return one == null ? two == null : one.equals(two);
- }
-
- /*
- * Return a boolean value indicating whether or not the given
- * lists are considered equal.
- */
- public static boolean equals(Object[] one, Object[] two) {
- if (one == null && two == null)
- return true;
- if (one == null || two == null)
- return false;
- if (one.length != two.length)
- return false;
- for (int i = 0; i < one.length; i++) {
- boolean found = false;
- for (int j = 0; !found && j < two.length; j++)
- found = one[i].equals(two[j]);
- if (!found)
- return false;
- }
- return true;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java
deleted file mode 100644
index 192f1d708..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-import java.io.*;
-import java.util.Map;
-
-/**
- * A simple XML writer.
- *
- * Copied from the org.eclipse.core.resources bundle.
- */
-public class XMLWriter extends PrintWriter {
- protected int tab;
-
- /* constants */
- protected static final String XML_VERSION = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; //$NON-NLS-1$
-
- public XMLWriter(OutputStream output) throws UnsupportedEncodingException {
- super(new OutputStreamWriter(output, "UTF8")); //$NON-NLS-1$
- tab = 0;
- println(XML_VERSION);
- }
-
- public void endTag(String name) {
- tab--;
- printTag('/' + name, null);
- }
-
- public void printSimpleTag(String name, Object value) {
- if (value != null) {
- printTag(name, null, true, false);
- print(getEscaped(String.valueOf(value)));
- printTag('/' + name, null, false, true);
- }
- }
-
- public void printTabulation() {
- for (int i = 0; i < tab; i++)
- super.print('\t');
- }
-
- public void printTag(String name, Map<String, String> parameters) {
- printTag(name, parameters, true, true);
- }
-
- public void printTag(String name, Map<String, String> parameters, boolean shouldTab, boolean newLine) {
- StringBuffer sb = new StringBuffer();
- sb.append("<"); //$NON-NLS-1$
- sb.append(name);
- if (parameters != null)
- for (String key : parameters.keySet()) {
- sb.append(" "); //$NON-NLS-1$
- sb.append(key);
- sb.append("=\""); //$NON-NLS-1$
- sb.append(getEscaped(String.valueOf(parameters.get(key))));
- sb.append("\""); //$NON-NLS-1$
- }
- sb.append(">"); //$NON-NLS-1$
- if (shouldTab)
- printTabulation();
- if (newLine)
- println(sb.toString());
- else
- print(sb.toString());
- }
-
- public void startTag(String name, Map<String, String> parameters) {
- startTag(name, parameters, true);
- }
-
- public void startTag(String name, Map<String, String> parameters, boolean newLine) {
- printTag(name, parameters, true, newLine);
- tab++;
- }
-
- private static void appendEscapedChar(StringBuffer buffer, char c) {
- String replacement = getReplacement(c);
- if (replacement != null) {
- buffer.append('&');
- buffer.append(replacement);
- buffer.append(';');
- } else {
- buffer.append(c);
- }
- }
-
- public static String getEscaped(String s) {
- StringBuffer result = new StringBuffer(s.length() + 10);
- for (int i = 0; i < s.length(); ++i)
- appendEscapedChar(result, s.charAt(i));
- return result.toString();
- }
-
- private static String getReplacement(char c) {
- // Encode special XML characters into the equivalent character references.
- // These five are defined by default for all XML documents.
- switch (c) {
- case '<' :
- return "lt"; //$NON-NLS-1$
- case '>' :
- return "gt"; //$NON-NLS-1$
- case '"' :
- return "quot"; //$NON-NLS-1$
- case '\'' :
- return "apos"; //$NON-NLS-1$
- case '&' :
- return "amp"; //$NON-NLS-1$
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/messages.properties b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/messages.properties
deleted file mode 100644
index d32135ecb..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/messages.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-empty_feature_site=Features should not have an empty site.
-error_parsing_config=An error occurred parsing the platform configuration
-error_reading_config=An error occurred reading the platform configuration file: {0}.
-error_saving_config=Exception when saving configuration to: {0}.
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/OSGiBundleQuery.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/OSGiBundleQuery.java
deleted file mode 100644
index 35f14fee3..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/OSGiBundleQuery.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Cloudsmith Inc. - converted into expression based query
- *******************************************************************************/
-package org.eclipse.equinox.p2.touchpoint.eclipse.query;
-
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
-
-/**
- * A query matching every {@link IInstallableUnit} that describes an OSGi bundle.
- * @since 2.0
- */
-public final class OSGiBundleQuery extends ExpressionMatchQuery<IInstallableUnit> {
-
- private static final IMatchExpression<IInstallableUnit> bundleTest = ExpressionUtil.getFactory().matchExpression(ExpressionUtil.parse("providedCapabilities.exists(p | p.namespace == 'osgi.bundle')")); //$NON-NLS-1$
-
- public OSGiBundleQuery() {
- super(IInstallableUnit.class, bundleTest);
- }
-
- /**
- * Test if the {@link IInstallableUnit} describes an OSGi bundle.
- * @param iu the element being tested.
- * @return <tt>true</tt> if the parameter describes an OSGi bundle.
- */
- public static boolean isOSGiBundle(IInstallableUnit iu) {
- return bundleTest.isMatch(iu);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/package.html b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/package.html
deleted file mode 100644
index 1af2a8419..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/package.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides query utilities specific to provisioning of OSGi bundles
-<h2>
-Package Specification</h2>
-<p>
-This package specifies API for querying and manipulating provisioning metadata that
-is specific to OSGi bundles or Eclipse-specific constructs such as features.
-<p>
-@since 2.0
-<p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/.classpath b/bundles/org.eclipse.equinox.p2.touchpoint.natives/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/.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.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 03fbcd48d..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,25 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.touchpoint.natives;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.touchpoint.natives.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.touchpoint.natives;x-internal:=true,
- org.eclipse.equinox.internal.p2.touchpoint.natives.actions;x-internal:=true
-Require-Bundle: org.eclipse.equinox.common
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.engine,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.util;version="1.0.0",
- org.osgi.framework;version="1.3.0"
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/about.html b/bundles/org.eclipse.equinox.p2.touchpoint.natives/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/build.properties b/bundles/org.eclipse.equinox.p2.touchpoint.natives/build.properties
deleted file mode 100644
index 0328daa18..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- about.html,\
- plugin.properties
-src.includes = about.html
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.properties b/bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.properties
deleted file mode 100644
index 31cfe1f41..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Equinox Provisioning Native Touchpoint
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.xml b/bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.xml
deleted file mode 100644
index 2565253a1..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.5"?>
-<plugin>
- <extension point="org.eclipse.equinox.p2.engine.touchpoints" id="native" name="Native Touchpoint">
- <touchpoint
- type="org.eclipse.equinox.p2.native"
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.NativeTouchpoint"
- version="1.0.0"/>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.actions.ChmodAction"
- name="chmod"
- touchpointType="org.eclipse.equinox.p2.native"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CleanupzipAction"
- name="cleanupzip"
- touchpointType="org.eclipse.equinox.p2.native"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CollectAction"
- name="collect"
- touchpointType="org.eclipse.equinox.p2.native"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.actions.LinkAction"
- name="ln"
- touchpointType="org.eclipse.equinox.p2.native"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.actions.MkdirAction"
- name="mkdir"
- touchpointType="org.eclipse.equinox.p2.native"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.actions.RmdirAction"
- name="rmdir"
- touchpointType="org.eclipse.equinox.p2.native"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.actions.UnzipAction"
- name="unzip"
- touchpointType="org.eclipse.equinox.p2.native"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CopyAction"
- description="copy(source,target[,overwrite])"
- name="copy"
- touchpointType="org.eclipse.equinox.p2.native"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CleanupcopyAction"
- description="cleanupcopy(source,target)"
- name="cleanupcopy"
- touchpointType="org.eclipse.equinox.p2.native"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.actions.RemoveAction"
- description="remove(path)"
- name="remove"
- touchpointType="org.eclipse.equinox.p2.native"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/pom.xml b/bundles/org.eclipse.equinox.p2.touchpoint.natives/pom.xml
deleted file mode 100644
index 1d86bdb60..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.touchpoint.natives</artifactId>
- <version>1.0.200.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Activator.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Activator.java
deleted file mode 100644
index e3c7010d5..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Activator.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
- public static final String ID = "org.eclipse.equinox.p2.touchpoint.natives"; //$NON-NLS-1$
- private static BundleContext context = null;
-
- public static BundleContext getContext() {
- return context;
- }
-
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext aContext) throws Exception {
- Activator.context = aContext;
- }
-
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext aContext) throws Exception {
- context = null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java
deleted file mode 100644
index 82a3503cf..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java
+++ /dev/null
@@ -1,722 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.touchpoint.natives;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Stores files by copying them to a uniquely named temporary directory.
- * The BackupStore remembers filenames and can recreate them in their original location.
- *
- * <h3>Usage</h3>
- * The user of this class should instantiate the BackupStore with some prefix that is
- * meaningful to a human. Uniqueness is obtained without the prefix - the prefix is used to
- * be able to differentiate between different backup directories by a human (in case of crashes etc).
- *
- * If instantiated with a directory this directory will be used to store the backup root directory. If
- * this directory is null, the users home directory is used by default.
- *
- * Once instantiated, use the {@link #backup(File)} and {@link #backupDirectory(File)} methods
- * to move files to backup instead of deleting them. A file that
- * is backed up should not be deleted - it is simply moved out of the way.
- * Use {@link #backupCopy(File)} to
- * move the file out of harms way, but keep a copy of it in the original location.
- * The methods {@link #backupAll(File)} and {@link #backupCopyAll(File)} backs up an entire structure.
- *
- * When backup is finished - the user should either call {@link #restore()} to put all
- * of the files back, or call {@link #discard()} to remove all of the backed up "copies".
- *
- * If {@link #restore()} or {@link #discard()} is not called the backup files will never be deleted.
- *
- * The backup store does not synchronize directories - actions that write new files are
- * responsible for removing them. Overwriting existing files should be done by first backing
- * up the file, and then creating a new file. Modifying a file, should be done by
- * using {@link #backupCopy(File)} or
- * first making a copy, then backing up the original, and then renaming the copy.
- *
- * <h3>Read Only and Permissions</h3>
- * Directories that are read only (to current user) can not be backed up.
- * Backup is performed using {@link File#renameTo(File)} and handling of permissions
- * is operating system dependent. It is expected that a Un*x type system retains the
- * permissions as a file is moved to the backup store and later gets restored.
- * Backup directories are created as they are needed and will (at least on Un*x) inherit the
- * permissions from its parent directory.
- *
- * If a rename can not be performed, the backup store will make a copy and delete the original
- * file. This makes it possible to backup and restore across volume boundaries.
- *
- * When restoring directories they
- * will be created with permissions in a platform specific way (on UN*IX they will inherit the permissions
- * of the parent directory).
- *
- * <h3>Checkpointing</h3>
- * Checkpointing (i.e. to be able to rollback to a particular point) can be implemented by using
- * multiple instances of BackupStore. The client code will need to remember the individual order
- * among the backup stores.
- *
- * <h3>Restartability</h3>
- * Not implemented - it is possible to obtain the name of the backup directories,
- * so manual restore is possible after a crash. An idea is to add persistence to a file, and
- * be able to read it back in again.
- *
- * <h3>A note about exceptions</h3>
- * In general {@link IllegalArgumentException} is thrown when attempting an operation
- * that is considered "wrong use", and an {@link IllegalStateException} or subclass thereof is thrown on an overall
- * wrong use of BackupStore (i.e. attempt to backup when store has been restored). Some cases of
- * "wrong use" can not be differentiated from I/O errors (like a "file not found" as this could
- * be caused by an entire disk disappearing - in these case an {@link IOException} is thrown.
- *
- * <h3>Implementation Note</h3>
- * The backup root directory will contain folders that reflects file system roots. These are encoded using
- * "_" for the UNI*X root directory, "__" for a Windows network mounted directory, and single "drive letter" folders
- * corresponding to Windows drive letters. Typically, on UN*X there will only be a "_" directory in the backup root,
- * and on windows there will typically be a single directory called "C".
- *
- *
- */
-public class BackupStore implements IBackupStore {
-
- /**
- * The name to use for a directory that represents leading separator (i.e. "/" or "\").
- */
- private static final String ROOTCHAR = "_"; //$NON-NLS-1$
-
- /**
- * Map of directory File to backup root (File) - the backup root has
- * a directory named {@link #backupName} where the backup is found.
- */
- //private Map backups = new HashMap();
- private final File backupRoot;
-
- /**
- * The name of the backup directory (no path - relative to the backup root).
- */
- private String backupName;
-
- /**
- * The name of a dummy file used to backup empty directories
- */
- private String dummyName;
-
- /**
- * A server socket that is used to obtain a port (a shared resource on this machine)
- * and thus create a unique number. Used as part of the unique id of backup directories
- * and probe files.
- */
- private ServerSocket socket = null;
-
- /**
- * Counter of how many files where backed up. Used as a simple check mechanism if
- * everything was restored (a guard against manual/external tampering with the backup directories).
- */
- private long backupCounter;
-
- /**
- * Counter of how many files where restored. See {@link #backupCounter}.
- */
- private long restoreCounter;
-
- /**
- * Flag indicating if this BackupStore has been restored or canceled.
- */
- private boolean closed;
-
- /**
- * Generates a BackupStore with a default prefix of ".p2bu" for backup directory and
- * probe file.
- * The full id of the store is on the format "prefix_hextime_hexIPport"
- * - see {@link #genUnique()} for more info.
- */
- public BackupStore() {
- this(null, ".p2bu"); //$NON-NLS-1$
- }
-
- /**
- * Generates a BackupStore with a specified prefix for backup directories and
- * probe file.
- * The full id of the store is on the format "prefix_hextime_hexipport"
- * - see {@link #genUnique()} for more info.
- *
- * @param buParentDirectory - name of directory where the backup directory should be created - if null, java.io.tmpdir is used
- * @param prefix - prefix used for human identification of backup directories
- */
- public BackupStore(File buParentDirectory, String prefix) {
- if (buParentDirectory == null)
- buParentDirectory = new File(System.getProperty("java.io.tmpdir")); //$NON-NLS-1$
- backupRoot = buParentDirectory;
-
- // generate a name for the backup store and the dummy file used for empty directories
- String unique = genUnique();
- dummyName = prefix + "d_" + unique; //$NON-NLS-1$
- backupName = prefix + "_" + unique; //$NON-NLS-1$
- backupCounter = 0;
- restoreCounter = 0;
- closed = false;
- }
-
- /**
- * Since a socket port is used to create a unique number, the socket
- * must be closed if this instance is garbage collected and the user
- * of the instance has not either restored or discarded.
- */
- protected void finalize() throws Throwable {
- try {
- if (socket != null && !socket.isClosed())
- socket.close();
- } finally {
- super.finalize();
- }
- }
-
- /**
- * Returns the unique backup name (this is the name of generated backup directories).
- * @return the backup name.
- */
- public String getBackupName() {
- return backupName;
- }
-
- public File getBackupRoot() {
- return backupRoot;
- }
-
- /**
- * Backup the file by moving it to the backup store (for later (optional) restore).
- * Calling this method with a file that represents a directory is equivalent to calling
- * {@link #backupDirectory(File)}.
- *
- * A file (path) can only be backed up once per BackupStore instance.
- * When the file is backed up, it is moved to a directory under this BackupStore instance's directory
- * with a relative path corresponding to the original relative path from the backup root e.g.
- * the file /A/B/C/foo.txt could be moved to /A/.p2bu_ffffff_ffffff/B/C/foo.txt when /A is the
- * backup root.
- *
- * If a directory is first backed up, and later replaced by a regular file, and this file
- * is backed up (or vice versa) - an {@link IllegalArgumentException} is thrown
- *
- * A backup can not be performed on a closed BackupStore.
- *
- * @param file - the file (or directory) to backup
- * @return true if the file was backed up, false if this file (path) has already been backed up (the file is not moved to the store).
- * @throws IOException - if the backup operation fails, or the file does not exist
- * @throws ClosedBackupStoreException - if the BackupStore has been closed
- * @throws IllegalArgumentException - on type mismatch (file vs. directory) of earlier backup, or if file does not exist
- */
- public boolean backup(File file) throws IOException {
- if (closed)
- throw new ClosedBackupStoreException("Can not perform backup()"); //$NON-NLS-1$
- if (!file.exists())
- throw new IOException(NLS.bind(Messages.BackupStore_file_not_found, file.getAbsolutePath()));
- if (file.isDirectory())
- return backupDirectory(file);
- file = makeParentCanonical(file);
- File buRoot = backupRoot;
- // File buRoot = findBackupRoot(file);
- File buDir = new File(buRoot, backupName);
- // move the file
- // create the relative path from root and use that in buDir
- File buFile = new File(buDir, makeRelativeFromRoot(file).getPath());
- // already backed up, but was a directory = wrong usage
- if (buFile.isDirectory())
- throw new IllegalArgumentException(NLS.bind(Messages.BackupStore_directory_file_mismatch, buFile.getAbsolutePath()));
- // has already been backed up - can only be done once with one BackupStore
- if (buFile.exists())
- return false;
-
- // make sure all of the directories exist / gets created
- buFile.getParentFile().mkdirs();
- if (buFile.getParentFile().exists() && !buFile.getParentFile().isDirectory())
- throw new IllegalArgumentException(NLS.bind(Messages.BackupStore_file_directory_mismatch, buFile.getParentFile().getAbsolutePath()));
- if (file.renameTo(buFile)) {
- backupCounter++;
- return true;
- }
- // could not move - this can happen because source and target are on different volumes, or
- // that source is locked "in use" on a windows machine. The copy will work across volumes,
- // but the locked file will fail on the subsequent delete.
- //
- Util.copyStream(new FileInputStream(file), true, new FileOutputStream(buFile), true);
- backupCounter++;
-
- // need to remove the backed up file
- if (!file.delete())
- throw new IOException(NLS.bind(Messages.BackupStore_can_not_delete_after_copy_0, file));
-
- return true;
- }
-
- /**
- * Backs up a file, or everything under a directory.
- *
- * @param file - file to backup or directory
- * @throws IOException if backup operation failed
- */
- public void backupAll(File file) throws IOException {
- if (!file.exists())
- return;
- file = makeParentCanonical(file);
- if (file.isDirectory()) {
- File[] files = file.listFiles();
- if (files != null)
- for (int i = 0; i < files.length; i++)
- backupAll(files[i]);
- }
- backup(file);
- }
-
- /**
- * Backs up a file, or everything under a directory.
- * A copy of the backup is left in the original place.
- * @param file
- * @throws IOException
- */
- public void backupCopyAll(File file) throws IOException {
- if (!file.exists())
- return;
- file = makeParentCanonical(file);
- if (file.isDirectory()) {
- File[] files = file.listFiles();
- if (files != null)
- for (int i = 0; i < files.length; i++)
- backupCopyAll(files[i]);
- // if directory was empty, it needs to be backed up and then recreated
- //
- if (files == null || files.length == 0) {
- backupDirectory(file);
- file.mkdir();
- }
- } else
- backupCopy(file);
- }
-
- /**
- * Backup the file by moving it to the backup store (for later (optional) restore) but leaving
- * a copy of the contents in the original location.
- * Calling this method with a file that represents a directory throws an {@link IllegalArgumentException}.
- *
- * A file (path) can only be backed up once per BackupStore instance.
- * When the file is backed up, it is moved to a directory under this BackupStore instance's directory
- * with a relative path corresponding to the original relative path from the backup root e.g.
- * the file /A/B/C/foo.txt could be moved to /A/.p2bu_ffffff_ffffff/B/C/foo.txt when /A is the
- * backup root.
- *
- * If a directory is first backed up, and later replaced by a regular file, and this file
- * is backed up (or vice versa) - an {@link IllegalArgumentException} is thrown
- *
- * A backup can not be performed on a closed BackupStore.
- *
- * @param file - the file (or directory) to backup
- * @return true if the file was backed up, false if this file (path) has already been backed up (the file is not moved to the store).
- * @throws IOException - if the backup operation fails, or the file does not exist
- * @throws ClosedBackupStoreException - if the BackupStore has been closed
- * @throws IllegalArgumentException - on type mismatch (file vs. directory) of earlier backup, or if file is a Directory
- */
- public boolean backupCopy(File file) throws IOException {
- if (closed)
- throw new ClosedBackupStoreException(Messages.BackupStore_backupCopy_closed_store);
- if (!file.exists())
- throw new IOException(NLS.bind(Messages.BackupStore_file_not_found, file.getAbsolutePath()));
- if (file.isDirectory())
- throw new IllegalArgumentException(NLS.bind(Messages.BackupStore_can_not_copy_directory, file.getAbsolutePath()));
- file = makeParentCanonical(file);
- //File buRoot = backupRoot;
- // File buRoot = findBackupRoot(file);
- File buDir = new File(backupRoot, backupName);
- // move the file
- // create the relative path from root and use that in buDir
- File buFile = new File(buDir, makeRelativeFromRoot(file).getPath());
- // already backed up, but was a directory = wrong usage
- if (buFile.isDirectory())
- throw new IllegalArgumentException(NLS.bind(Messages.BackupStore_directory_file_mismatch, buFile.getAbsolutePath()));
- // has already been backed up - can only be done once with one BackupStore
- if (buFile.exists())
- return false;
-
- // make sure all of the directories exist / gets created
- buFile.getParentFile().getCanonicalFile().mkdirs();
- if (buFile.getParentFile().exists() && !buFile.getParentFile().isDirectory())
- throw new IllegalArgumentException(NLS.bind(Messages.BackupStore_file_directory_mismatch, buFile.getParentFile().getAbsolutePath()));
-
- // just make a copy - one has to be made in one direction anyway
- // A renameTo followed by a copy is preferred as it preserves file permissions on the moved file
- // but it is easier to just copy and keep original.
- Util.copyStream(new FileInputStream(file), true, new FileOutputStream(buFile), true);
- backupCounter++;
- return true;
- }
-
- /**
- * Performs backup of an empty directory. The directory must be empty before it can be backed up (i.e.
- * similar to a delete of a directory). Backup the files of the directory first.
- * A call to backup a directory is really only needed for empty directories as a restore
- * of a file will also restore all of its parent directories.
- * @param file - the (empty) directory to back up
- * @return true if the directory was moved to backup. false if the directory was already backed up and remains.
- * @throws IllegalArgumentException if file is not a directory, or is not empty.
- * @throws IOException if directory can not be moved to the backup store, or if the directory is not writeable
- */
- public boolean backupDirectory(File file) throws IOException {
- if (!file.isDirectory())
- throw new IllegalArgumentException(NLS.bind(Messages.BackupStore_not_a_directory, file.getAbsolutePath()));
- file = makeParentCanonical(file);
- if (file.list().length != 0)
- throw new IllegalArgumentException(NLS.bind(Messages.BackupStore_directory_not_empty, file.getAbsolutePath()));
- // the easiest is to create a dummy file and back that up (the dummy is simply ignored when restoring).
- File dummy = new File(file, dummyName);
- if (!dummy.createNewFile())
- throw new IOException(NLS.bind(Messages.BackupStore_can_not_create_dummy, dummy.getAbsolutePath()));
- boolean result = backup(dummy);
- // if already backed up - do not delete the directory
- if (result && !file.delete())
- throw new IOException(NLS.bind(Messages.BackupStore_can_not_remove, dummy.getAbsolutePath()));
- return result;
- }
-
- /**
- * Restores all backup files from backup store.
- * Note that restore of a (non directory) file deletes an existing file or directory found
- * in the restore location.
- * When the backup has been restored this BackupStore instance is closed and can not be
- * used for further backup or restore.
- *
- * If there are unrestorable items (non writable directories, or general IO exceptions) these items
- * are written to the log, and the backup copies remain in the file system and can be manually restored
- * (using a simple zip of the backup directory, and an unzip to the buRoot once the problem has been corrected).
- *
- * @throws IOException if the backup was not fully restored - unrestored items have been logged.
- * @throws ClosedBackupStoreException if the backup is already closed.
- */
- public void restore() throws IOException {
- if (closed)
- throw new ClosedBackupStoreException(Messages.BackupStore_restore_closed_store);
- // put back all files
- // collect things that could not be restored (so final status can be reported)
- Set<File> unrestorable = new HashSet<File>();
- boolean restored = true;
- if (!backupRoot.exists()) {
- logError(NLS.bind(Messages.BackupStore_missing_backup_directory, backupRoot.getAbsolutePath()));
- restored = false;
- } else
- restoreRoots(new File(backupRoot, backupName), unrestorable);
-
- logUnrestorables(unrestorable);
- if (unrestorable.size() > 0)
- restored = false;
- close(restored);
- closed = true;
- }
-
- private void logUnrestorables(Set<File> unrestorable) {
- // if there are unrestorable units log them
- //
- if (unrestorable != null && unrestorable.size() > 0) {
- for (File file : unrestorable)
- logError(NLS.bind(Messages.BackupStore_manual_restore_needed, file.getAbsolutePath()));
- }
- }
-
- /**
- * Discards and closes this BackupStore. Does nothing if this store is already
- * restored or discarded.
- */
- public void discard() {
- if (closed)
- return;
- closeSocket();
- removeBackups();
- closed = true;
- }
-
- private void close(boolean fullyRestored) throws IOException {
- closeSocket();
- // check external tampering with backup store
- if (backupCounter != restoreCounter) {
- if (!fullyRestored)
- logError(NLS.bind(Messages.BackupStore_0_of_1_items_restored, new Long(restoreCounter), new Long(backupCounter)));
- else {
- logError(NLS.bind(Messages.BackupStore_externally_modified_0_of_1_restored, new Long(restoreCounter), new Long(backupCounter)));
- fullyRestored = false;
- }
- }
- if (!fullyRestored)
- throw new IOException(Messages.BackupStore_errors_while_restoring_see_log);
- // everything has been restored - the backup can now be removed
- removeBackups();
- }
-
- private void closeSocket() {
- if (socket != null && !socket.isClosed())
- try {
- socket.close();
- } catch (IOException e) { /* ignored */
- logWarning(NLS.bind(Messages.BackupStore_can_not_close_tcp_port, new Integer(socket.getLocalPort())));
- }
- }
-
- private void removeBackups() {
- File buRoot = new File(backupRoot, backupName);
- if (!fullyDelete(buRoot))
- logWarning(NLS.bind(Messages.BackupStore_can_not_remove_bu_directory, buRoot.getAbsolutePath()));
- }
-
- private static void logWarning(String message) {
- LogHelper.log(createWarning(message));
- }
-
- private static IStatus createWarning(String message) {
- return new Status(IStatus.WARNING, Activator.ID, message);
- }
-
- private static void logError(String message) {
- LogHelper.log(createError(message));
- }
-
- private static IStatus createError(String message) {
- return new Status(IStatus.ERROR, Activator.ID, message);
- }
-
- /**
- * Deletes a file, or a directory with all of it's children.
- * @param file the file or directory to fully delete
- * @return true if, and only if the file is deleted without errors
- */
- private boolean fullyDelete(File file) {
- if (!file.exists())
- return true;
- if (file.isDirectory()) {
- File[] children = file.listFiles();
- if (children == null)
- return false;
- for (int i = 0; i < children.length; i++)
- if (!fullyDelete(new File(file, children[i].getName())))
- return false;
- }
- return file.delete();
- }
-
- private void restore(File root, File buRoot, Set<File> unrestorable) {
- File[] children = buRoot.listFiles();
- if (children == null) { // error - can't read the backup directory
- unrestorable.add(buRoot);
- return;
- }
- for (int i = 0; i < children.length; i++) {
- File bu = new File(buRoot, children[i].getName());
- File target = new File(root, bu.getName());
- if (bu.isDirectory()) {
- if (!target.exists() && !target.mkdir()) {
- unrestorable.add(bu);
- continue; // give up on this branch
- } else if (target.exists() && !target.isDirectory()) {
- // ouch, there is a file where we need a directory
- // that must be deleted.
- target.delete();
- if (!target.mkdir()) {
- unrestorable.add(bu);
- continue; // give up on branch
- }
- }
- restore(target, bu, unrestorable);
- } else {
- // do not restore the dummies (as they are used to trigger creation of
- // empty directories and are not wanted in the restored location.
- if (bu.getName().equals(dummyName)) {
- restoreCounter++; // count of the restored directory in this case.
- continue;
- }
- // if the original was overwritten by something and this file was not
- // removed, it needs to be deleted now. If it can't be deleted, the
- // renameTo will fail, and the bu is reported as not restorable.
- // fullyDelete will remove a directory completely - we are restoring a file so it can
- // not be kept.
- if (target.exists())
- fullyDelete(target);
-
- // rename if possible, but must copy if not possible to just rename
- if (!bu.renameTo(target)) {
- // did not work to rename, probably because of volume boundaries. Try to copy instead,
- try {
- Util.copyStream(new FileInputStream(bu), true, new FileOutputStream(target), true);
- restoreCounter++; // consider it restored
- } catch (FileNotFoundException e) {
- unrestorable.add(bu);
- continue;
- } catch (IOException e) {
- unrestorable.add(bu);
- continue;
- }
- if (!bu.delete()) { // cleanup
- // could not remove the backup after copy - log, safe to remove manually
- logWarning(NLS.bind(Messages.BackupStore_can_not_delete_tmp_file, bu.getAbsolutePath()));
- }
- } else
- restoreCounter++;
- }
- }
- }
-
- /**
- * Restores everything backed up in the buRoot. Responsible for decoding the specially named root
- * target directories (i.e. _/, __/, C/, etc.) into the real system names.
- * @param buRoot
- * @param unrestorable
- */
- private void restoreRoots(File buRoot, Set<File> unrestorable) {
- File[] children = buRoot.listFiles();
- if (children == null) { // error - can't read the backup directory
- unrestorable.add(buRoot);
- return;
- }
- for (int i = 0; i < children.length; i++) {
- // Names are root-chars, or drive letters in the root bu directory
- String name = children[i].getName();
- String rName = name;
- String prefix = ""; //$NON-NLS-1$
- while (rName.startsWith(ROOTCHAR)) {
- prefix += File.separator;
- rName = rName.substring(1);
- }
- if (prefix.length() < 1) {
- // The name is a drive name
- rName = rName + ":" + File.separator; //$NON-NLS-1$
- } else
- rName = prefix + rName;
- // File root = new File(rName);
- File bu = new File(buRoot, name);
- File target = new File(rName);
- if (!bu.isDirectory()) {
- // the roots should all be directories - so this can only happen if someone manually
- // stored files in the backup root - mark them as unrestorable and continue.
- unrestorable.add(bu);
- continue;
- }
- // the backup roots are system roots, and can not be created - but check root is directory and exists.
- // (Network drives could have gone away etc).
- //
- if (!(target.exists() && target.isDirectory())) {
- unrestorable.add(bu);
- continue; // give up on this branch
- }
- // then perform a recursive restore
- restore(target, bu, unrestorable);
- }
- }
-
- private static long msCounter = 0;
-
- /**
- * Generates a unique hex string by taking currentTimeMillis + sequence
- * number at the end allowing for 32 numbers to be generated per ms.
- * This is sufficient uniqueness in the same VM. (And is still just a fallback solution
- * if there is no access to a TCP port)
- *
- * To make number unique over multiple VMs - the PID of the process would be enough, but
- * it is complicated to get hold of - a separate program must be launched and its PPID
- * investigated. There is no standard API in Java to get the PID. Instead, a socket port is bound
- * to ensure local uniqueness.
- *
- * To make number unique across multiple hosts (we may be provisioning over NFS), the
- * 48 LS bits of the IP address is used (this is more than enough for an IPv4 address).
- * (If there is no IP address, the machine is not on a
- * network) - unfortunately the MAC address can not be used as this requires Java 6 (where
- * there also is a UUID that should be used instead of this method).
- *
- * This method needs to be modified when IPv6 addressing is the norm - at that time, the
- * restriction on Java 1.4 has hopefully been lifted, and it is possible to use the MAC address,
- * or the UUID provided since java 1.6
- *
- * @return a unique string
- */
- private String genUnique() {
- // use 5 LSB bits for counter within ms - i.e. 32 instances can be created
- // per millisecond.
- long timePart = (System.currentTimeMillis() << 5) | (msCounter++ & 31);
- // can't use the MAC address - but take IP address if provisioning across NFS
- long ipPart = 0;
- try {
- // the returned address can be 32 bits IPv4, or 128 bits IPv6 (?)
- // In any case use the LSB bits (as many as will fit
- byte[] address = InetAddress.getLocalHost().getAddress();
- for (int i = 0; i < address.length; i++)
- ipPart = ((ipPart << 8) | (address[i] & 0xff));
- } catch (UnknownHostException e) {
- // there is no IP address, and there and hence no concurrency from other machines.
- // use the default ip part 0
- }
- int port = 0;
- try {
- socket = new ServerSocket(0);
- port = socket.getLocalPort();
- } catch (IOException e) {
- try {
- if (socket != null)
- socket.close();
- } catch (IOException e1) { // ignore failure to close -
- }
- // use a random number as port in this case
- port = new Random().nextInt() & 0xffff;
- }
- // port is never > 0xffff
- long aPart = (ipPart << 16) | (port & 0xffff);
- return Long.toHexString(timePart) + "_" + Long.toHexString(aPart); //$NON-NLS-1$
-
- }
-
- /**
- * Turns a file into a "relativized" absolute file.
- * A leading "root" is transformed to the ROOTCHAR character. On Windows, network mapped drives starts
- * with two separators - and are encoded as two ROOTCHAR.
- * e.g.
- * \\Host\C$\File becomes __\Host\C$\File
- * /users/test/file becomes _/users/test/file
- * C:/somewhere/file becomes C/somewhere/file
- *
- * @param file
- * @return a relativized absolute abstract file
- */
- private File makeRelativeFromRoot(File file) {
- File absolute = file.getAbsoluteFile();
- String path = absolute.getPath();
- String prefix = ""; //$NON-NLS-1$
- while (path.startsWith(File.separator)) {
- prefix += ROOTCHAR;
- path = path.substring(1);
- }
- if (prefix.length() > 0) {
- path = prefix + File.separator + path;
- return new File(path);
- }
- // it is a windows drive letter first.
- // Transform C:/foo to C/foo
- //
- int idx = path.indexOf(":"); //$NON-NLS-1$
- if (idx < 1)
- throw new InternalError("File is neither absolute nor has a drive name: " + path); //$NON-NLS-1$
- path = path.substring(0, idx) + path.substring(idx + 1);
-
- return new File(path);
- }
-
- /**
- * The parent path may include ".." as a directory name - this must be made canonical. But if the file itself is
- * a symbolic link, it should not be resolved.
- */
- private File makeParentCanonical(File file) throws IOException {
- return new File(file.getParentFile().getCanonicalFile(), file.getName());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/ClosedBackupStoreException.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/ClosedBackupStoreException.java
deleted file mode 100644
index 7a19da549..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/ClosedBackupStoreException.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives;
-
-public class ClosedBackupStoreException extends IllegalStateException {
- private static final long serialVersionUID = -5030940685029643678L;
-
- public ClosedBackupStoreException() {
- super();
- }
-
- public ClosedBackupStoreException(String message) {
- super(message);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/IBackupStore.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/IBackupStore.java
deleted file mode 100644
index 4b08dca09..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/IBackupStore.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.touchpoint.natives;
-
-import java.io.File;
-import java.io.IOException;
-
-public interface IBackupStore {
-
- /**
- * Backup the file.
- * Calling this method with a file that represents a directory is equivalent to calling
- * {@link #backupDirectory(File)}.
- *
- * A file (path) can only be backed up once per IBackupStore instance.
- *
- * If a directory is first backed up, and later replaced by a regular file, and this file
- * is also backed up (or vice versa) - an {@link IllegalArgumentException} is thrown
- *
- * A backup can not be performed on a closed IBackupStore.
- *
- * @param file - the file (or directory) to backup
- * @return true if the file was backed up, false if this file (path) has already been backed up (the file is not moved to the store).
- * @throws IOException - if the backup operation fails, or the file does not exist
- * @throws IllegalStateException - if the IBackupStore has been closed
- * @throws IllegalArgumentException - on type mismatch (file vs. directory) of earlier backup, or if file does not exist
- */
- public boolean backup(File file) throws IOException;
-
- /**
- * Same as {@link #backup(File)} except that a copy is kept in the original location.
- * Can not be used to copy directories.
- * @param file to backup and copy
- * @return true if the file was backed up, false if this file (path) has already been backed up (the file is not moved to the store).
- * @throws IOException - if the backup operation fails, if the file does not exist, or if the copy can not be created.
- * @throws IllegalStateException - if the IBackupStore has been closed
- * @throws IllegalArgumentException - on type mismatch (file vs. directory) of earlier backup, or if file is a directory.
- */
- public boolean backupCopy(File file) throws IOException;
-
- /**
- * Performs backup of an empty directory. The directory must be empty before it can be backed up (i.e.
- * similar to a delete of a directory). Backup the files of the directory first.
- * A call to backup a directory is really only needed for empty directories as a restore
- * of a file will also restore all of its parent directories.
- * @param file - the (empty) directory to back up
- * @return true if the directory was moved to backup. false if the directory was already backed up and remains.
- * @throws IllegalArgumentException if file is not a directory, or is not empty.
- * @throws IOException if directory can not be moved to the backup store, or if the directory is not writeable
- */
- public boolean backupDirectory(File file) throws IOException;
-
- /**
- * Discards and closes this BackupStore. Does nothing if this store is already
- * restored or discarded.
- */
- public void discard();
-
- /**
- * Restores all backup files from backup store.
- * Note that restore of a (non directory) file deletes an existing file or directory found
- * in the restore location.
- * When the backup has been restored it can not be
- * used for further backup or restore.
- *
- * If there are unrestorable items (non writeable directories, or general IO exceptions) these items
- * should be written to the log, and the backup copies should be retained
- * for manual restore.
- *
- * @throws IOException if the backup was not fully restored - unrestored items should have been logged.
- * @throws IllegalStateException if the backup is already closed.
- */
- public void restore() throws IOException;
-
- /**
- * Returns the unique backup name (this is the name of generated backup directories).
- * @return the backup name.
- */
- public String getBackupName();
-
- /**
- * Backs up a file, or everything under a directory.
- *
- * @param file - file to backup or directory
- * @throws IOException if backup operation failed
- */
- public void backupAll(File file) throws IOException;
-
- /**
- * Backs up a file, or everything under a directory.
- * A copy of the backup is left in the original place.
- * @param file
- * @throws IOException
- */
- public void backupCopyAll(File file) throws IOException;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/LazyBackupStore.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/LazyBackupStore.java
deleted file mode 100644
index e3dbc4c6f..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/LazyBackupStore.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * LazyBackupStore is a BackupStore that only instantiates a real backup store
- * when needed.
- *
- *
- */
-public class LazyBackupStore implements IBackupStore {
- private BackupStore delegate;
- private final String prefix;
-
- /**
- * Creates a new lazy backup store
- * @param prefix The prefix to use in constructing the backup store directory
- */
- public LazyBackupStore(String prefix) {
- this.prefix = prefix;
- }
-
- public boolean backup(File file) throws IOException {
- loadDelegate();
- return delegate.backup(file);
- }
-
- public boolean backupDirectory(File file) throws IOException {
- loadDelegate();
- return delegate.backupDirectory(file);
- }
-
- public void discard() {
- if (delegate == null)
- return;
- delegate.discard();
- }
-
- public void restore() throws IOException {
- if (delegate == null)
- return;
- delegate.restore();
- }
-
- private void loadDelegate() {
- if (delegate != null)
- return;
- delegate = new BackupStore(null, prefix);
- }
-
- public String getBackupName() {
- loadDelegate();
- return delegate.getBackupName();
- }
-
- public boolean backupCopy(File file) throws IOException {
- loadDelegate();
- return delegate.backupCopy(file);
- }
-
- public void backupCopyAll(File file) throws IOException {
- loadDelegate();
- delegate.backupCopyAll(file);
- }
-
- public void backupAll(File file) throws IOException {
- loadDelegate();
- delegate.backupAll(file);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Messages.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Messages.java
deleted file mode 100644
index 0d73c2a72..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Messages.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.touchpoint.natives.messages"; //$NON-NLS-1$
-
- static {
- // load message values from bundle file and assign to fields below
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- public static String BackupStore_0_of_1_items_restored;
- public static String BackupStore_backupCopy_closed_store;
- public static String BackupStore_can_not_close_tcp_port;
- public static String BackupStore_can_not_copy_directory;
- public static String BackupStore_can_not_create_dummy;
- public static String BackupStore_can_not_delete_after_copy_0;
- public static String BackupStore_can_not_delete_tmp_file;
- public static String BackupStore_can_not_remove;
- public static String BackupStore_can_not_remove_bu_directory;
- public static String BackupStore_directory_file_mismatch;
- public static String BackupStore_directory_not_empty;
- public static String BackupStore_errors_while_restoring_see_log;
- public static String BackupStore_externally_modified_0_of_1_restored;
- public static String BackupStore_file_directory_mismatch;
- public static String BackupStore_file_not_found;
- public static String BackupStore_manual_restore_needed;
- public static String BackupStore_missing_backup_directory;
- public static String BackupStore_not_a_directory;
- public static String BackupStore_restore_closed_store;
-
- public static String action_0_failed_file_1_doesNotExist;
- public static String artifact_not_available;
- public static String artifact_repo_not_found;
- public static String could_not_obtain_download_cache;
- public static String download_cache_not_writeable;
- public static String unzipping;
- public static String param_not_set;
- public static String copy_failed;
- public static String failed_backup_restore;
- public static String backup_file_failed;
- public static String Error_list_children_0;
- public static String link_failed;
- public static String mkdir_failed;
- public static String rmdir_failed;
- public static String Util_Invalid_Zip_File_Format;
- public static String Util_Error_Unzipping;
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java
deleted file mode 100644
index cd8eef4a4..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives;
-
-import org.eclipse.equinox.p2.core.ProvisionException;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Map;
-import java.util.WeakHashMap;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.actions.ActionConstants;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.Touchpoint;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepository;
-import org.eclipse.osgi.util.NLS;
-
-public class NativeTouchpoint extends Touchpoint {
-
- public static final String PARM_BACKUP = "backup"; //$NON-NLS-1$
-
- public static final String PARM_ARTIFACT = "artifact"; //$NON-NLS-1$
-
- public static final String PARM_ARTIFACT_LOCATION = "artifact.location"; //$NON-NLS-1$
-
- private static Map<IProfile, IBackupStore> backups = new WeakHashMap<IProfile, IBackupStore>();
-
- public IStatus initializeOperand(IProfile profile, Map<String, Object> parameters) {
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IArtifactKey artifactKey = (IArtifactKey) parameters.get(PARM_ARTIFACT);
- if (!parameters.containsKey(PARM_ARTIFACT_LOCATION) && artifactKey != null) {
- try {
- IFileArtifactRepository downloadCache = Util.getDownloadCacheRepo(agent);
- File fileLocation = downloadCache.getArtifactFile(artifactKey);
- if (fileLocation != null && fileLocation.exists())
- parameters.put(PARM_ARTIFACT_LOCATION, fileLocation.getAbsolutePath());
- } catch (ProvisionException e) {
- return e.getStatus();
- }
- }
- return Status.OK_STATUS;
- }
-
- public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map<String, Object> touchpointParameters) {
- touchpointParameters.put(PARM_BACKUP, getBackupStore(profile));
- return null;
- }
-
- public String qualifyAction(String actionId) {
- return Activator.ID + "." + actionId; //$NON-NLS-1$
- }
-
- public IStatus prepare(IProfile profile) {
- // does not have to do anything - everything is already in the correct place
- // the commit means that the backup is discarded - if that fails it is not a
- // terrible problem.
- return super.prepare(profile);
- }
-
- public IStatus commit(IProfile profile) {
- IBackupStore store = getBackupStore(profile);
- store.discard();
- return Status.OK_STATUS;
- }
-
- /**
- * Converts a profile id into a string that can be used as a file name in any file system.
- */
- public static String escape(String toEscape) {
- StringBuffer buffer = new StringBuffer();
- int length = toEscape.length();
- for (int i = 0; i < length; ++i) {
- char ch = toEscape.charAt(i);
- switch (ch) {
- case '\\' :
- case '/' :
- case ':' :
- case '*' :
- case '?' :
- case '"' :
- case '<' :
- case '>' :
- case '|' :
- case '%' :
- buffer.append("%" + (int) ch + ";"); //$NON-NLS-1$ //$NON-NLS-2$
- break;
- default :
- buffer.append(ch);
- }
- }
- return buffer.toString();
- }
-
- public IStatus rollback(IProfile profile) {
- IStatus returnStatus = Status.OK_STATUS;
- IBackupStore store = getBackupStore(profile);
- try {
- store.restore();
- } catch (IOException e) {
- returnStatus = new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.failed_backup_restore, store.getBackupName()), e);
- } catch (ClosedBackupStoreException e) {
- returnStatus = new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.failed_backup_restore, store.getBackupName()), e);
- }
- clearProfileState(profile);
- return returnStatus;
- }
-
- /**
- * Cleans up the transactional state associated with a profile.
- */
- private static synchronized void clearProfileState(IProfile profile) {
- backups.remove(profile);
- }
-
- /**
- * Gets the transactional state associated with a profile. A transactional state is
- * created if it did not exist.
- * @param profile
- * @return a lazily initialized backup store
- */
- private static synchronized IBackupStore getBackupStore(IProfile profile) {
- IBackupStore store = backups.get(profile);
- if (store == null) {
- store = new LazyBackupStore(escape(profile.getProfileId()));
- backups.put(profile, store);
- }
- return store;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Util.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Util.java
deleted file mode 100644
index 60c1c0a86..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Util.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives;
-
-import java.io.*;
-import java.net.URI;
-import java.util.*;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.p2.core.*;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.osgi.util.NLS;
-
-public class Util {
-
- public static void log(String message) {
- LogHelper.log(createError(message));
- }
-
- public static IStatus createError(String message) {
- return new Status(IStatus.ERROR, Activator.ID, message);
- }
-
- public static String getInstallFolder(IProfile profile) {
- return profile.getProperty(IProfile.PROP_INSTALL_FOLDER);
- }
-
- private static IAgentLocation getAgentLocation(IProvisioningAgent agent) {
- return (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
- }
-
- public static IArtifactRepositoryManager getArtifactRepositoryManager(IProvisioningAgent agent) {
- return (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- }
-
- public static IFileArtifactRepository getDownloadCacheRepo(IProvisioningAgent agent) throws ProvisionException {
- URI location = getDownloadCacheLocation(agent);
- if (location == null)
- throw new IllegalStateException(Messages.could_not_obtain_download_cache);
- IArtifactRepositoryManager manager = getArtifactRepositoryManager(agent);
- if (manager == null)
- throw new IllegalStateException(Messages.artifact_repo_not_found);
- IArtifactRepository repository;
- try {
- repository = manager.loadRepository(location, null);
- } catch (ProvisionException e) {
- // the download cache doesn't exist or couldn't be read. Create new cache.
- String repositoryName = location + " - Agent download cache"; //$NON-NLS-1$
- Map<String, String> properties = new HashMap<String, String>(1);
- properties.put(IRepository.PROP_SYSTEM, Boolean.TRUE.toString());
- repository = manager.createRepository(location, repositoryName, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
- }
-
- IFileArtifactRepository downloadCache = (IFileArtifactRepository) repository.getAdapter(IFileArtifactRepository.class);
- if (downloadCache == null)
- throw new ProvisionException(NLS.bind(Messages.download_cache_not_writeable, location));
- return downloadCache;
- }
-
- static private URI getDownloadCacheLocation(IProvisioningAgent agent) {
- IAgentLocation location = getAgentLocation(agent);
- if (location == null)
- return null;
- return URIUtil.append(location.getDataArea("org.eclipse.equinox.p2.core"), "cache/"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Unzip from a File to an output directory, with progress indication and backup.
- * monitor and backup store may be null.
- */
- public static File[] unzipFile(File zipFile, File outputDir, IBackupStore store, String taskName, IProgressMonitor monitor) throws IOException {
- InputStream in = new FileInputStream(zipFile);
- try {
- return unzipStream(in, zipFile.length(), outputDir, store, taskName, monitor);
- } catch (IOException e) {
- // add the file name to the message
- throw new IOException(NLS.bind(Messages.Util_Error_Unzipping, zipFile, e.getMessage()));
- } finally {
- in.close();
- }
- }
-
- /**
- * Unzip from an InputStream to an output directory using backup of overwritten files
- * if backup store is not null.
- */
- public static File[] unzipStream(InputStream stream, long size, File outputDir, IBackupStore store, String taskName, IProgressMonitor monitor) throws IOException {
- InputStream is = monitor == null ? stream : stream; // new ProgressMonitorInputStream(stream, size, size, taskName, monitor); TODO Commented code
- ZipInputStream in = new ZipInputStream(new BufferedInputStream(is));
- ZipEntry ze = in.getNextEntry();
- if (ze == null) {
- // There must be at least one entry in a zip file.
- // When there isn't getNextEntry returns null.
- in.close();
- throw new IOException(Messages.Util_Invalid_Zip_File_Format);
- }
- ArrayList<File> unzippedFiles = new ArrayList<File>();
- do {
- File outFile = new File(outputDir, ze.getName());
- unzippedFiles.add(outFile);
- if (ze.isDirectory()) {
- outFile.mkdirs();
- } else {
- if (outFile.exists()) {
- if (store != null)
- store.backup(outFile);
- else
- outFile.delete();
- } else {
- outFile.getParentFile().mkdirs();
- }
- try {
- copyStream(in, false, new FileOutputStream(outFile), true);
- } catch (FileNotFoundException e) {
- // TEMP: ignore this for now in case we're trying to replace
- // a running eclipse.exe
- }
- outFile.setLastModified(ze.getTime());
- }
- in.closeEntry();
- } while ((ze = in.getNextEntry()) != null);
- in.close();
-
- return unzippedFiles.toArray(new File[unzippedFiles.size()]);
- }
-
- /**
- * Copy an input stream to an output stream.
- * Optionally close the streams when done.
- * Return the number of bytes written.
- */
- public static int copyStream(InputStream in, boolean closeIn, OutputStream out, boolean closeOut) throws IOException {
- try {
- int written = 0;
- byte[] buffer = new byte[16 * 1024];
- int len;
- while ((len = in.read(buffer)) != -1) {
- out.write(buffer, 0, len);
- written += len;
- }
- return written;
- } finally {
- try {
- if (closeIn) {
- in.close();
- }
- } finally {
- if (closeOut) {
- out.close();
- }
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ActionConstants.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ActionConstants.java
deleted file mode 100644
index a3357eb03..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ActionConstants.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-public class ActionConstants {
-
- public static final String PARM_AGENT = "agent"; //$NON-NLS-1$
- public static final String PARM_PATH = "path"; //$NON-NLS-1$
- public static final String PARM_TARGET_FILE = "targetFile"; //$NON-NLS-1$
- public static final String PARM_PERMISSIONS = "permissions"; //$NON-NLS-1$
- public static final String PARM_TARGET_DIR = "targetDir"; //$NON-NLS-1$
- public static final String PARM_TARGET = "target"; //$NON-NLS-1$
- public static final String PARM_SOURCE = "source"; //$NON-NLS-1$
- public static final String PARM_IU = "iu"; //$NON-NLS-1$
- public static final String PIPE = "|"; //$NON-NLS-1$
- public static final String PARM_AT_ARTIFACT = "@artifact"; //$NON-NLS-1$
- public static final String PARM_ARTIFACT_REQUESTS = "artifactRequests"; //$NON-NLS-1$
- public static final String PARM_PROFILE = "profile"; //$NON-NLS-1$
- public static final String PARM_LINK_NAME = "linkName"; //$NON-NLS-1$
- public static final String PARM_LINK_TARGET = "linkTarget"; //$NON-NLS-1$
- public static final String PARM_LINK_FORCE = "force"; //$NON-NLS-1$
- public static final String PARM_COPY_TARGET = "target"; //$NON-NLS-1$
- public static final String PARM_COPY_SOURCE = "source"; //$NON-NLS-1$
- public static final String PARM_COPY_OVERWRITE = "overwrite"; //$NON-NLS-1$
- public static final String PARM_OPTIONS = "options"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ChmodAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ChmodAction.java
deleted file mode 100644
index 5de59d276..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ChmodAction.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat Incorporated - initial API and implementation
- * IBM Corporation - ongoing development
- * Cloudsmith Inc - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-import java.io.*;
-import java.util.ArrayList;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.Messages;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.Util;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class ChmodAction extends ProvisioningAction {
- private static final String ACTION_CHMOD = "chmod"; //$NON-NLS-1$
- private static final boolean WINDOWS = java.io.File.separatorChar == '\\';
-
- public IStatus execute(Map<String, Object> parameters) {
- String targetDir = (String) parameters.get(ActionConstants.PARM_TARGET_DIR);
- if (targetDir == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_TARGET_DIR, ACTION_CHMOD));
- String targetFile = (String) parameters.get(ActionConstants.PARM_TARGET_FILE);
- if (targetFile == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_TARGET_FILE, ACTION_CHMOD));
- String permissions = (String) parameters.get(ActionConstants.PARM_PERMISSIONS);
- if (permissions == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_PERMISSIONS, ACTION_CHMOD));
- String optionsString = (String) parameters.get(ActionConstants.PARM_OPTIONS);
-
- // Check that file exist
- File probe = new File(targetDir + IPath.SEPARATOR + targetFile);
- if (!probe.exists())
- return Util.createError(NLS.bind(Messages.action_0_failed_file_1_doesNotExist, ACTION_CHMOD, probe.toString()));
-
- String options[] = null;
- if (optionsString != null) {
- ArrayList<String> collect = new ArrayList<String>();
- String r = optionsString.trim();
- while (r.length() > 0) {
- int spaceIdx = r.indexOf(' ');
- if (spaceIdx < 0) {
- collect.add(r);
- r = ""; //$NON-NLS-1$
- } else {
- collect.add(r.substring(0, spaceIdx));
- r = r.substring(spaceIdx + 1);
- r = r.trim();
- }
- }
- if (collect.size() > 0) {
- options = new String[collect.size()];
- collect.toArray(options);
- }
- }
-
- chmod(targetDir, targetFile, permissions, options);
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- //TODO: implement undo ??
- return Status.OK_STATUS;
- }
-
- public void chmod(String targetDir, String targetFile, String perms, String[] options) {
- if (WINDOWS)
- return;
- Runtime r = Runtime.getRuntime();
- try {
- // Note: 3 is from chmod, permissions, and target
- String[] args = new String[3 + (options == null ? 0 : options.length)];
- int i = 0;
- args[i++] = "chmod"; //$NON-NLS-1$
- if (options != null) {
- for (int j = 0; j < options.length; j++)
- args[i++] = options[j];
- }
- args[i++] = perms;
- args[i] = targetDir + IPath.SEPARATOR + targetFile;
- Process process = r.exec(args);
- readOffStream(process.getErrorStream());
- readOffStream(process.getInputStream());
- try {
- process.waitFor();
- } catch (InterruptedException e) {
- // mark thread interrupted and continue
- Thread.currentThread().interrupt();
- }
- } catch (IOException e) {
- // ignore
- }
- }
-
- private void readOffStream(InputStream inputStream) {
- BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
- try {
- while (reader.readLine() != null) {
- // do nothing
- }
- } catch (IOException e) {
- // ignore
- } finally {
- try {
- reader.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupcopyAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupcopyAction.java
deleted file mode 100644
index b394f0adf..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupcopyAction.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class CleanupcopyAction extends ProvisioningAction {
-
- public static final String ACTION_CLEANUPCOPY = "cleanupcopy"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- return cleanupcopy(parameters, true);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return CopyAction.copy(parameters, false);
- }
-
- /**
- * Perform a cleanup of a previously made copy action.
- * @param parameters action parameters
- * @param restoreable flag indicating if the operation should be backed up
- * @return status
- */
- public static IStatus cleanupcopy(Map<String, Object> parameters, boolean restoreable) {
- String source = (String) parameters.get(ActionConstants.PARM_SOURCE);
- if (source == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_SOURCE, ACTION_CLEANUPCOPY));
- String target = (String) parameters.get(ActionConstants.PARM_TARGET);
- if (target == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_TARGET, ACTION_CLEANUPCOPY));
- IBackupStore backupStore = (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP);
-
- IInstallableUnit iu = (IInstallableUnit) parameters.get(ActionConstants.PARM_IU);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
-
- String copied = profile.getInstallableUnitProperty(iu, "copied" + ActionConstants.PIPE + source + ActionConstants.PIPE + target); //$NON-NLS-1$
-
- if (copied == null)
- return Status.OK_STATUS;
-
- StringTokenizer tokenizer = new StringTokenizer(copied, ActionConstants.PIPE);
- List<File> directories = new ArrayList<File>();
- while (tokenizer.hasMoreTokens()) {
- String fileName = tokenizer.nextToken();
- File file = new File(fileName);
- if (!file.exists())
- continue;
-
- //directories need to be deleted from the bottom-up, but directories are listed
- //in traversal order during copy, so we need to reverse the directory list
- if (file.isDirectory())
- directories.add(0, file);
- else {
- if (restoreable)
- try {
- backupStore.backup(file);
- } catch (IOException e) {
- return Util.createError(NLS.bind(Messages.backup_file_failed, file));
- }
- else
- file.delete();
- }
- }
-
- for (File directory : directories) {
- File[] children = directory.listFiles();
- if (children == null)
- return Util.createError(NLS.bind(Messages.Error_list_children_0, directory));
-
- if (children.length == 0) {
- if (restoreable)
- try {
- backupStore.backup(directory);
- } catch (IOException e) {
- return Util.createError(NLS.bind(Messages.backup_file_failed, directory));
- }
- else
- directory.delete();
- }
- }
-
- return Status.OK_STATUS;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupzipAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupzipAction.java
deleted file mode 100644
index 7ef7d5413..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupzipAction.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.engine.Profile;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class CleanupzipAction extends ProvisioningAction {
-
- private static final String UNZIPPED = "unzipped"; //$NON-NLS-1$
- public static final String ACTION_CLEANUPZIP = "cleanupzip"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- return cleanupzip(parameters, true);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return UnzipAction.unzip(parameters, false);
- }
-
- public static IStatus cleanupzip(Map<String, Object> parameters, boolean restoreable) {
- String source = (String) parameters.get(ActionConstants.PARM_SOURCE);
- if (source == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_SOURCE, ACTION_CLEANUPZIP));
- String target = (String) parameters.get(ActionConstants.PARM_TARGET);
- if (target == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_TARGET, ACTION_CLEANUPZIP));
-
- IInstallableUnit iu = (IInstallableUnit) parameters.get(ActionConstants.PARM_IU);
- Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
-
- String iuPropertyKey = UNZIPPED + ActionConstants.PIPE + source + ActionConstants.PIPE + target;
-
- String unzipped = profile.getInstallableUnitProperty(iu, iuPropertyKey);
- if (unzipped == null) {
- // best effort
- // we try to substitute the current target with what was written.
- Map<String, String> iuProperties = profile.getInstallableUnitProperties(iu);
- String sourcePrefix = UNZIPPED + ActionConstants.PIPE + source + ActionConstants.PIPE;
- for (String key : iuProperties.keySet()) {
- if (key.startsWith(sourcePrefix)) {
- if (unzipped == null) {
- iuPropertyKey = key;
- String storedTarget = key.substring(sourcePrefix.length());
- unzipped = substituteTarget(storedTarget, target, iuProperties.get(key));
- } else
- return Status.OK_STATUS; // possible two unzips of this source - give up on best effort
- }
- }
- // no match
- if (unzipped == null)
- return Status.OK_STATUS;
- }
-
- IBackupStore store = restoreable ? (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP) : null;
- StringTokenizer tokenizer = new StringTokenizer(unzipped, ActionConstants.PIPE);
- List<File> directories = new ArrayList<File>();
- while (tokenizer.hasMoreTokens()) {
- String fileName = tokenizer.nextToken();
- File file = new File(fileName);
- if (!file.exists())
- continue;
-
- if (file.isDirectory())
- directories.add(file);
- else {
- if (store != null)
- try {
- store.backup(file);
- } catch (IOException e) {
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.backup_file_failed, file.getPath()), e);
- }
- else
- file.delete();
- }
- }
- // sort directories by path length longest path is in top
- // this will make sure that a sub folder will be removed before its parent
- Collections.sort(directories, new Comparator<File>() {
-
- public int compare(File f1, File f2) {
- if (f1 == f2)
- return 0;
- if (f1 != null && f2 == null)
- return -1;
- if (f1 == null)
- return 1;
- try {
- return Integer.valueOf(f2.getCanonicalPath().length()).compareTo(f1.getCanonicalPath().length());
- } catch (IOException e) {
- // did our best. try an absolute path compare
- return Integer.valueOf(f2.getAbsolutePath().length()).compareTo(f1.getAbsolutePath().length());
- }
- }
-
- });
- for (File directory : directories) {
- if (store != null) {
- File[] children = directory.listFiles();
- // Since backup will deny backup of non empty directory a check must be made
- if (children == null || children.length == 0)
- try {
- store.backupDirectory(directory);
- } catch (IOException e) {
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.backup_file_failed, directory.getPath()), e);
- }
- } else
- directory.delete();
- }
-
- profile.removeInstallableUnitProperty(iu, iuPropertyKey);
- return Status.OK_STATUS;
- }
-
- private static String substituteTarget(String oldTarget, String newTarget, String value) {
- StringBuffer buffer = new StringBuffer();
- StringTokenizer tokenizer = new StringTokenizer(value, ActionConstants.PIPE);
- while (tokenizer.hasMoreTokens()) {
- String fileName = tokenizer.nextToken().trim();
- if (fileName.length() == 0)
- continue;
- if (fileName.startsWith(oldTarget))
- fileName = newTarget + fileName.substring(oldTarget.length());
-
- buffer.append(fileName).append(ActionConstants.PIPE);
- }
- return buffer.toString();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CollectAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CollectAction.java
deleted file mode 100644
index 21c3cf159..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CollectAction.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.Util;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRequest;
-
-public class CollectAction extends ProvisioningAction {
-
- public static final String ACTION_COLLECT = "collect"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(ActionConstants.PARM_IU);
- try {
- IArtifactRequest[] requests = collect(agent, iu, profile);
- @SuppressWarnings("unchecked")
- Collection<IArtifactRequest[]> artifactRequests = (Collection<IArtifactRequest[]>) parameters.get(ActionConstants.PARM_ARTIFACT_REQUESTS);
- artifactRequests.add(requests);
- } catch (ProvisionException e) {
- return e.getStatus();
- }
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- // nothing to do for now
- return Status.OK_STATUS;
- }
-
- IArtifactRequest[] collect(IProvisioningAgent agent, IInstallableUnit installableUnit, IProfile profile) throws ProvisionException {
- Collection<IArtifactKey> toDownload = installableUnit.getArtifacts();
- if (toDownload == null)
- return new IArtifactRequest[0];
- IArtifactRepository destination = Util.getDownloadCacheRepo(agent);
- IArtifactRequest[] requests = new IArtifactRequest[toDownload.size()];
- int count = 0;
- for (IArtifactKey key : toDownload) {
- //TODO Here there are cases where the download is not necessary again because what needs to be done is just a configuration step
- requests[count++] = Util.getArtifactRepositoryManager(agent).createMirrorRequest(key, destination, null, null);
- }
-
- if (requests.length == count)
- return requests;
- IArtifactRequest[] result = new IArtifactRequest[count];
- System.arraycopy(requests, 0, result, 0, count);
- return result;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CopyAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CopyAction.java
deleted file mode 100644
index d9dab3c98..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CopyAction.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-import java.io.File;
-
-import java.io.*;
-import java.util.ArrayList;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.engine.Profile;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Copies from PARM_COPY_SOURCE to PARAM_COPY_TARGET
- * The optional parameter PARAM_COPY_OVERWRITE overwrites and existing file if set to true, else
- * and existing file with the same name is an error. The default is false.
- * If the source is a directory, a merge copy to the target is performed.
- * Copy will copy files and directories (recursively).
- *
- */
-public class CopyAction extends ProvisioningAction {
- public static final String ID = "cp"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- return copy(parameters, true);
- }
-
- /** Perform the copy.
- *
- * @param parameters action parameters
- * @param restoreable flag indicating if the operation should be backed up
- * @return status
- */
- public static IStatus copy(Map<String, Object> parameters, boolean restoreable) {
- String target = (String) parameters.get(ActionConstants.PARM_COPY_TARGET);
- IBackupStore backupStore = restoreable ? (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP) : null;
-
- if (target == null)
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.param_not_set, ActionConstants.PARM_COPY_TARGET, ID), null);
-
- String source = (String) parameters.get(ActionConstants.PARM_COPY_SOURCE);
- if (source == null)
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.param_not_set, ActionConstants.PARM_COPY_SOURCE, ID), null);
-
- String overwrite = (String) parameters.get(ActionConstants.PARM_COPY_OVERWRITE);
- Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(ActionConstants.PARM_IU);
-
- String originalSource = source;
- if (source.equals(ActionConstants.PARM_AT_ARTIFACT)) {
- String artifactLocation = (String) parameters.get(NativeTouchpoint.PARM_ARTIFACT_LOCATION);
- if (artifactLocation == null) {
- IArtifactKey artifactKey = (IArtifactKey) parameters.get(NativeTouchpoint.PARM_ARTIFACT);
- return Util.createError(NLS.bind(Messages.artifact_not_available, artifactKey));
- }
- source = artifactLocation;
- }
-
- File sourceFile = new File(source);
- File targetFile = new File(target);
- File[] copiedFiles = null;
- try {
- copiedFiles = mergeCopy(sourceFile, targetFile, Boolean.valueOf(overwrite).booleanValue(), backupStore);
- } catch (IOException e) {
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.copy_failed, sourceFile.getPath()), e);
- }
- // keep copied file in the profile as memento for CleanupCopy
- StringBuffer copiedFileNameBuffer = new StringBuffer();
- for (int i = 0; i < copiedFiles.length; i++)
- copiedFileNameBuffer.append(copiedFiles[i].getAbsolutePath()).append(ActionConstants.PIPE);
-
- profile.setInstallableUnitProperty(iu, "copied" + ActionConstants.PIPE + originalSource + ActionConstants.PIPE + target, copiedFileNameBuffer.toString()); //$NON-NLS-1$
-
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return CleanupcopyAction.cleanupcopy(parameters, false);
- }
-
- /**
- * Merge-copy file or directory.
- * @param source
- * @param target
- * @param overwrite
- * @throws IOException
- */
- private static File[] mergeCopy(File source, File target, boolean overwrite, IBackupStore backupStore) throws IOException {
- ArrayList<File> copiedFiles = new ArrayList<File>();
- xcopy(copiedFiles, source, target, overwrite, backupStore);
- return copiedFiles.toArray(new File[copiedFiles.size()]);
- }
-
- /**
- * Merge-copy file or directory.
- * @param copiedFiles - ArrayList where copied files are collected
- * @param source
- * @param target
- * @param overwrite
- * @throws IOException
- */
- private static void xcopy(ArrayList<File> copiedFiles, File source, File target, boolean overwrite, IBackupStore backupStore) throws IOException {
- if (!source.exists())
- throw new IOException("Source: " + source + "does not exists"); //$NON-NLS-1$//$NON-NLS-2$
-
- if (source.isDirectory()) {
- if (target.exists() && target.isFile()) {
- if (!overwrite)
- throw new IOException("Target: " + target + " already exists"); //$NON-NLS-1$//$NON-NLS-2$
- if (backupStore != null)
- backupStore.backup(target);
- else
- target.delete();
- }
- if (!target.exists())
- target.mkdirs();
- copiedFiles.add(target);
- File[] children = source.listFiles();
- if (children == null)
- throw new IOException("Error while retrieving children of directory: " + source); //$NON-NLS-1$
- for (int i = 0; i < children.length; i++)
- xcopy(copiedFiles, children[i], new File(target, children[i].getName()), overwrite, backupStore);
- return;
- }
- if (target.exists() && !overwrite)
- throw new IOException("Target: " + target + " already exists"); //$NON-NLS-1$//$NON-NLS-2$
-
- if (!target.getParentFile().exists() && !target.getParentFile().mkdirs())
- throw new IOException("Target: Path " + target.getParent() + " could not be created"); //$NON-NLS-1$//$NON-NLS-2$
-
- try {
- Util.copyStream(new FileInputStream(source), true, new FileOutputStream(target), true);
- } catch (IOException e) {
- // get the original IOException to the log
- e.printStackTrace();
- throw new IOException("Error while copying:" + source.getAbsolutePath()); //$NON-NLS-1$
- }
- copiedFiles.add(target);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/LinkAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/LinkAction.java
deleted file mode 100644
index a27777cec..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/LinkAction.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-import java.io.*;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class LinkAction extends ProvisioningAction {
- public static final String ID = "ln"; //$NON-NLS-1$
- private static final boolean WINDOWS = java.io.File.separatorChar == '\\';
-
- public IStatus execute(Map<String, Object> parameters) {
- String targetDir = (String) parameters.get(ActionConstants.PARM_TARGET_DIR);
- if (targetDir == null)
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.param_not_set, ActionConstants.PARM_TARGET_DIR, ID), null);
-
- String linkTarget = (String) parameters.get(ActionConstants.PARM_LINK_TARGET);
- if (linkTarget == null)
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.param_not_set, ActionConstants.PARM_LINK_TARGET, ID), null);
-
- String linkName = (String) parameters.get(ActionConstants.PARM_LINK_NAME);
- if (linkName == null)
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.param_not_set, ActionConstants.PARM_LINK_NAME, ID), null);
-
- String force = (String) parameters.get(ActionConstants.PARM_LINK_FORCE);
-
- IBackupStore store = (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP);
-
- try {
- ln(targetDir, linkTarget, linkName, Boolean.valueOf(force).booleanValue(), store);
- } catch (IOException e) {
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.link_failed, linkName, ID), e);
- }
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- if (WINDOWS)
- return Status.OK_STATUS;
- String targetDir = (String) parameters.get(ActionConstants.PARM_TARGET_DIR);
- String linkName = (String) parameters.get(ActionConstants.PARM_LINK_NAME);
-
- if (targetDir != null && linkName != null) {
- File linkFile = new File(targetDir, linkName);
- linkFile.delete(); // ok since if something was overwritten - it is restored from backup
- }
- return Status.OK_STATUS;
- }
-
- /**
- * Creates a link to the source file linkTarget - the created link is targetDir/linkName.
- * TODO: Only runs on systems with a "ln -s" command supported.
- * TODO: Does not report errors if the "ln -s" fails
- * @param targetDir the directory where the link is created
- * @param linkTarget the source
- * @param linkName the name of the created link
- * @param force if overwrite of existing file should be performed.
- * @param store an (optional - set to null) backup store to use
- * @throws IOException if backup of existing file fails
- */
- private void ln(String targetDir, String linkTarget, String linkName, boolean force, IBackupStore store) throws IOException {
- if (WINDOWS)
- return;
- // backup a file that would be overwritten using "force == true"
- if (force && store != null) {
- File xFile = new File(targetDir, linkName);
- if (xFile.exists())
- store.backup(xFile);
- }
- Runtime r = Runtime.getRuntime();
- try {
- Process process = r.exec(new String[] {"ln", "-s" + (force ? "f" : ""), linkTarget, targetDir + IPath.SEPARATOR + linkName}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- readOffStream(process.getErrorStream());
- readOffStream(process.getInputStream());
- try {
- process.waitFor();
- } catch (InterruptedException e) {
- // mark thread interrupted and continue
- Thread.currentThread().interrupt();
- }
- } catch (IOException e) {
- // ignore
- }
- }
-
- private void readOffStream(InputStream inputStream) {
- BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
- try {
- while (reader.readLine() != null) {
- // do nothing
- }
- } catch (IOException e) {
- // ignore
- } finally {
- try {
- reader.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/MkdirAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/MkdirAction.java
deleted file mode 100644
index bea5668c0..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/MkdirAction.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-import java.io.File;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.Messages;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.Util;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class MkdirAction extends ProvisioningAction {
- public static final String ID = "mkdir"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- String path = (String) parameters.get(ActionConstants.PARM_PATH);
- if (path == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_PATH, ID));
- File dir = new File(path);
- // A created or existing directory is ok
- dir.mkdir();
- if (dir.isDirectory())
- return Status.OK_STATUS;
- // mkdir could have failed because of permissions, or because of an existing file
- return Util.createError(NLS.bind(Messages.mkdir_failed, path, ID));
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- String path = (String) parameters.get(ActionConstants.PARM_PATH);
- if (path == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_PATH, ID));
- File dir = new File(path);
- // although not perfect, it at least prevents a faulty mkdir to delete a file on undo
- // worst case is that an empty directory could be deleted
- if (dir.isDirectory())
- dir.delete();
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RemoveAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RemoveAction.java
deleted file mode 100644
index c820a9bbd..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RemoveAction.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class RemoveAction extends ProvisioningAction {
- public static final String ID = "remove"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- String path = (String) parameters.get(ActionConstants.PARM_PATH);
- if (path == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_PATH, ID));
- File file = new File(path);
- // ignore if the file is already removed
- if (!file.exists())
- return Status.OK_STATUS;
- IBackupStore store = (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP);
- if (store == null)
- return Util.createError(NLS.bind(Messages.param_not_set, NativeTouchpoint.PARM_BACKUP, ID));
- try {
- store.backupAll(file);
- } catch (IOException e) {
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.backup_file_failed, file.getPath()), e);
- }
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- // Does not have to do anything as the backup will restore what was deleted
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RmdirAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RmdirAction.java
deleted file mode 100644
index 8473a2ae8..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RmdirAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class RmdirAction extends ProvisioningAction {
- public static final String ID = "rmdir"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- String path = (String) parameters.get(ActionConstants.PARM_PATH);
- if (path == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_PATH, ID));
-
- IBackupStore store = (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP);
-
- File dir = new File(path);
- if (!dir.isDirectory())
- return Util.createError(NLS.bind(Messages.rmdir_failed, path, ID));
- if (store != null)
- try {
- store.backupDirectory(dir);
- } catch (IOException e) {
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.rmdir_failed, path, ID), e);
- } catch (IllegalArgumentException e) {
- // Ignore the delete/backup if the directory was not empty as this preserves the
- // the original semantics.
- // See Bug 272312 for more detail.
- // return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.rmdir_failed, ActionConstants.PARM_PATH, ID), e);
- //
- }
- else
- dir.delete();
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- String path = (String) parameters.get(ActionConstants.PARM_PATH);
- IBackupStore store = (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP);
- if (path == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_PATH, ID));
- // only need to create a dir if backup was not used
- if (store == null)
- new File(path).mkdir();
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/UnzipAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/UnzipAction.java
deleted file mode 100644
index 108161650..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/UnzipAction.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.engine.Profile;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class UnzipAction extends ProvisioningAction {
-
- public static final String ACTION_UNZIP = "unzip"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- return unzip(parameters, true);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return CleanupzipAction.cleanupzip(parameters, false);
- }
-
- /**
- * Unzip as directed by parameters.
- * Record what was zipped in the profile.
- * @param parameters
- * @param restoreable - if the unzip should be backed up
- * @return status
- */
- public static IStatus unzip(Map<String, Object> parameters, boolean restoreable) {
- String source = (String) parameters.get(ActionConstants.PARM_SOURCE);
- if (source == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_SOURCE, ACTION_UNZIP));
-
- String originalSource = source;
- String target = (String) parameters.get(ActionConstants.PARM_TARGET);
- if (target == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_TARGET, ACTION_UNZIP));
-
- IInstallableUnit iu = (IInstallableUnit) parameters.get(ActionConstants.PARM_IU);
- Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
-
- if (source.equals(ActionConstants.PARM_AT_ARTIFACT)) {
- String artifactLocation = (String) parameters.get(NativeTouchpoint.PARM_ARTIFACT_LOCATION);
- if (artifactLocation == null) {
- IArtifactKey artifactKey = (IArtifactKey) parameters.get(NativeTouchpoint.PARM_ARTIFACT);
- return Util.createError(NLS.bind(Messages.artifact_not_available, artifactKey));
- }
- source = artifactLocation;
- }
- IBackupStore store = restoreable ? (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP) : null;
- File[] unzippedFiles = unzip(source, target, store);
- StringBuffer unzippedFileNameBuffer = new StringBuffer();
- for (int i = 0; i < unzippedFiles.length; i++)
- unzippedFileNameBuffer.append(unzippedFiles[i].getAbsolutePath()).append(ActionConstants.PIPE);
-
- profile.setInstallableUnitProperty(iu, "unzipped" + ActionConstants.PIPE + originalSource + ActionConstants.PIPE + target, unzippedFileNameBuffer.toString()); //$NON-NLS-1$
-
- return Status.OK_STATUS;
- }
-
- /**
- * Unzips a source zip into the given destination. Any existing contents in the destination
- * are backed up in the provided backup store.
- */
- private static File[] unzip(String source, String destination, IBackupStore store) {
- File zipFile = new File(source);
- if (zipFile == null || !zipFile.exists()) {
- Util.log(UnzipAction.class.getName() + " the files to be unzipped is not here"); //$NON-NLS-1$
- }
- try {
- String taskName = NLS.bind(Messages.unzipping, source);
- return Util.unzipFile(zipFile, new File(destination), store, taskName, new NullProgressMonitor());
- } catch (IOException e) {
- Util.log(UnzipAction.class.getName() + " error unzipping zipfile: " + zipFile.getAbsolutePath() + "destination: " + destination); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return new File[0];
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/messages.properties b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/messages.properties
deleted file mode 100644
index 1dbe1a176..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/messages.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-BackupStore_backupCopy_closed_store=Can not perform backup on closed backup store.
-BackupStore_0_of_1_items_restored={0} items out of {1} items restored.
-BackupStore_can_not_close_tcp_port=Could not close tcp socket for port: {0}
-BackupStore_can_not_copy_directory=Can not copy a directory: {0}
-BackupStore_can_not_create_dummy=Can not create dummy file: {0}
-BackupStore_can_not_delete_after_copy_0=File that was copied to backup could not be deleted: {0}
-BackupStore_can_not_delete_tmp_file=Can not delete temporary file - it is safe to delete it manually: {0}
-BackupStore_can_not_remove=Can not remove : {0}
-BackupStore_can_not_remove_bu_directory=Could not remove temporary backup directory (it is safe to manually delete it and its contents): {0}
-BackupStore_directory_file_mismatch=File already backed up as a directory: {0}
-BackupStore_directory_not_empty=Directory is not empty: {0}
-BackupStore_errors_while_restoring_see_log=Errors while restoring - see earlier logged errors
-BackupStore_externally_modified_0_of_1_restored=Backup store modified externally\! {0} items out of {1} items restored. Remaining items can not be found.
-BackupStore_file_directory_mismatch=File already backed up as a file - and is now required as a directory: {0}
-BackupStore_file_not_found=File does not exist: {0}.
-BackupStore_manual_restore_needed=Manual restore of backup needed for: {0}
-BackupStore_missing_backup_directory=Missing backup directory - can not restore: {0}
-BackupStore_not_a_directory=File is not a directory: {0}
-BackupStore_restore_closed_store=Can not perform restore on closed backup store
-
-action_0_failed_file_1_doesNotExist=The action {0} failed - file {1} does not exist
-artifact_not_available=The artifact for {0} is not available.
-unzipping=Extracting {0}
-param_not_set=The \"{0}\" parameter was not set in the \"{1}\" action.
-artifact_repo_not_found=The artifact repository manager could not be found.
-could_not_obtain_download_cache=Could not obtain the download cache location.
-download_cache_not_writeable=Agent download cache not writeable: {0}.
-copy_failed=I/O Error while copying {0} - see details.
-failed_backup_restore=Restore of backup failed - see log for details. Backup directory name: {0}.
-backup_file_failed=Backup of file {0} failed.
-Error_list_children_0=Error while retrieving children of directory: {0}
-link_failed=Could not create link {0}.
-mkdir_failed=Could not create directory {0}.
-rmdir_failed=Could not remove directory {0}.
-Util_Invalid_Zip_File_Format=Invalid zip file format
-Util_Error_Unzipping=Error unzipping {0}: {1}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.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/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 7126f905d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/config.ini
+++ /dev/null
@@ -1,49 +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.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/pom.xml b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/pom.xml
deleted file mode 100644
index b84e33c33..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.ui.admin.rcp</artifactId>
- <version>1.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
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 4bea2a835..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/rcp.product
+++ /dev/null
@@ -1,232 +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.1.0.@qualifier@" useFeatures="false" includeLaunchers="true">
-
- <aboutInfo>
- <text>
- %aboutText
- </text>
- </aboutInfo>
-
- <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.codec"/>
- <plugin id="org.apache.commons.httpclient"/>
- <plugin id="org.apache.commons.logging"/>
- <plugin id="org.eclipse.compare"/>
- <plugin id="org.eclipse.compare.core"/>
- <plugin id="org.eclipse.core.commands"/>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.databinding"/>
- <plugin id="org.eclipse.core.databinding.observable"/>
- <plugin id="org.eclipse.core.databinding.property"/>
- <plugin id="org.eclipse.core.expressions"/>
- <plugin id="org.eclipse.core.filebuffers"/>
- <plugin id="org.eclipse.core.filesystem"/>
- <plugin id="org.eclipse.core.filesystem.linux.x86" fragment="true"/>
- <plugin id="org.eclipse.core.filesystem.macosx" fragment="true"/>
- <plugin id="org.eclipse.core.filesystem.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.net"/>
- <plugin id="org.eclipse.core.resources"/>
- <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.ds"/>
- <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.director.app"/>
- <plugin id="org.eclipse.equinox.p2.engine"/>
- <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
- <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
- <plugin id="org.eclipse.equinox.p2.metadata"/>
- <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
- <plugin id="org.eclipse.equinox.p2.operations"/>
- <plugin id="org.eclipse.equinox.p2.publisher"/>
- <plugin id="org.eclipse.equinox.p2.ql"/>
- <plugin id="org.eclipse.equinox.p2.repository"/>
- <plugin id="org.eclipse.equinox.p2.repository.tools"/>
- <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"/>
- <plugin id="org.eclipse.equinox.p2.ui.admin.rcp"/>
- <plugin id="org.eclipse.equinox.p2.updatechecker"/>
- <plugin id="org.eclipse.equinox.preferences"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <plugin id="org.eclipse.equinox.security"/>
- <plugin id="org.eclipse.equinox.security.macosx" fragment="true"/>
- <plugin id="org.eclipse.equinox.security.ui"/>
- <plugin id="org.eclipse.equinox.security.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
- <plugin id="org.eclipse.equinox.util"/>
- <plugin id="org.eclipse.help"/>
- <plugin id="org.eclipse.jface"/>
- <plugin id="org.eclipse.jface.databinding"/>
- <plugin id="org.eclipse.jface.text"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.services"/>
- <plugin id="org.eclipse.swt"/>
- <plugin id="org.eclipse.swt.cocoa.macosx" 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.text"/>
- <plugin id="org.eclipse.ui"/>
- <plugin id="org.eclipse.ui.editors"/>
- <plugin id="org.eclipse.ui.forms"/>
- <plugin id="org.eclipse.ui.ide"/>
- <plugin id="org.eclipse.ui.net"/>
- <plugin id="org.eclipse.ui.views"/>
- <plugin id="org.eclipse.ui.workbench"/>
- <plugin id="org.eclipse.ui.workbench.texteditor"/>
- <plugin id="org.sat4j.core"/>
- <plugin id="org.sat4j.pb"/>
- </plugins>
-
- <configurations>
- <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="4" />
- <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
- <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />
- <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
- <plugin id="org.eclipse.update.configurator" autoStart="true" startLevel="3" />
- </configurations>
-
-</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 dc31db156..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchAdvisor.java
+++ /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
- *******************************************************************************/
-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$
- }
-
- public void initialize(IWorkbenchConfigurer configurer) {
- configurer.setSaveAndRestore(true);
- }
-}
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 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/.cvsignore b/bundles/org.eclipse.equinox.p2.ui.admin/.cvsignore
deleted file mode 100644
index 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 eba723b85..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,329 +0,0 @@
-#Tue Dec 22 23:48:18 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index c94f55995..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:59:19 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ui.admin/META-INF/MANIFEST.MF
deleted file mode 100644
index 5b61245bf..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,41 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-SymbolicName: org.eclipse.equinox.p2.ui.admin;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIActivator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.ui.admin;x-friends:="org.eclipse.equinox.internal.p2.ui.analysis",
- org.eclipse.equinox.internal.p2.ui.admin.dialogs;x-internal:=true,
- org.eclipse.equinox.internal.p2.ui.admin.preferences;x-internal:=true
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.ui
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.ui,
- org.eclipse.equinox.internal.p2.ui.actions,
- org.eclipse.equinox.internal.p2.ui.dialogs,
- org.eclipse.equinox.internal.p2.ui.model,
- org.eclipse.equinox.internal.p2.ui.query,
- org.eclipse.equinox.internal.p2.ui.viewers,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.p2.updatechecker,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.operations;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.ui;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.service.environment;version="1.0.0",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0"
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/about.html b/bundles/org.eclipse.equinox.p2.ui.admin/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/build.properties b/bundles/org.eclipse.equinox.p2.ui.admin/build.properties
deleted file mode 100644
index b7d66df9b..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.properties,\
- icons/,\
- .,\
- plugin.xml,\
- about.html,\
- META-INF/
-src.includes = about.html
-source.. = src/
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/artifact_repo_obj.gif b/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/artifact_repo_obj.gif
deleted file mode 100644
index 0470e1588..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/artifact_repo_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/iu_obj.gif b/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/iu_obj.gif
deleted file mode 100644
index 8706680c7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/iu_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/metadata_repo_obj.gif b/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/metadata_repo_obj.gif
deleted file mode 100644
index b8568f4f8..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/metadata_repo_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/profile_obj.gif b/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/profile_obj.gif
deleted file mode 100644
index c984fba70..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/profile_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/uninstalled_iu.gif b/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/uninstalled_iu.gif
deleted file mode 100644
index f192b8486..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/uninstalled_iu.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/icons/provision.gif b/bundles/org.eclipse.equinox.p2.ui.admin/icons/provision.gif
deleted file mode 100644
index c984fba70..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/icons/provision.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/plugin.properties b/bundles/org.eclipse.equinox.p2.ui.admin/plugin.properties
deleted file mode 100644
index 7298725a6..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/plugin.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-#
-# Provisioning Admin UI plugin resources
-#
-providerName = Eclipse.org - Equinox
-bundleName=p2 Admin UI
-
-perspectiveName=Provisioning
-viewCategoryName=Provisioning
-MetadataRepositories.name=Metadata Repositories
-ArtifactRepositories.name=Artifact Repositories
-Profiles.name=Profiles
-Provisioning.title=Provisioning Admin
-Profile.name=Profile Admin Info
-IU.name=IU Admin Info
-InstalledIU.name=IU Profile Properties
-Repository.name=Repository Admin Info
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/plugin.xml b/bundles/org.eclipse.equinox.p2.ui.admin/plugin.xml
deleted file mode 100644
index 6aa850827..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/plugin.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%Provisioning.title"
- class="org.eclipse.equinox.internal.p2.ui.admin.preferences.ProvisioningPrefPage"
- id="org.eclipse.p2.ui.preferences.ProvisioningPrefPage">
- </page>
- </extension>
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.equinox.internal.p2.ui.admin.preferences.ProvUIPreferenceInitializer">
- </initializer>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <category
- name="%viewCategoryName"
- id="org.eclipse.p2.ui.admin">
- </category>
- <view
- name="%MetadataRepositories.name"
- icon="$nl$/icons/obj/metadata_repo_obj.gif"
- category="org.eclipse.p2.ui.admin"
- class="org.eclipse.equinox.internal.p2.ui.admin.MetadataRepositoriesView"
- id="org.eclipse.p2.ui.admin.MetadataRepositoriesView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- name="%ArtifactRepositories.name"
- icon="$nl$/icons/obj/artifact_repo_obj.gif"
- category="org.eclipse.p2.ui.admin"
- class="org.eclipse.equinox.internal.p2.ui.admin.ArtifactRepositoriesView"
- id="org.eclipse.p2.ui.admin.ArtifactRepositoriesView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- name="%Profiles.name"
- icon="$nl$/icons/obj/profile_obj.gif"
- category="org.eclipse.p2.ui.admin"
- class="org.eclipse.equinox.internal.p2.ui.admin.ProfilesView"
- id="org.eclipse.p2.ui.admin.ProfilesView">
- </view>
- </extension>
-
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="%perspectiveName"
- icon="$nl$/icons/provision.gif"
- class="org.eclipse.equinox.internal.p2.ui.admin.ProvisioningPerspective"
- id="org.eclipse.equinox.p2.ui.admin.ProvisioningPerspective">
- </perspective>
- </extension>
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- name="%Profile.name"
- class="org.eclipse.equinox.internal.p2.ui.admin.dialogs.ProfilePropertyPage"
- id="org.eclipse.equinox.internal.p2.ui.admin.dialogs.ProfilePropertyPage">
- <enabledWhen>
- <adapt type="org.eclipse.equinox.p2.engine.IProfile"/>
- </enabledWhen>
- </page>
- <page
- name="%IU.name"
- class="org.eclipse.equinox.internal.p2.ui.admin.dialogs.IUImplementationPropertyPage"
- id="org.eclipse.equinox.internal.p2.ui.admin.dialogs.IUImplementationPropertyPage">
- <enabledWhen>
- <adapt type="org.eclipse.equinox.p2.metadata.IInstallableUnit"/>
- </enabledWhen>
- </page>
- <page
- name="%InstalledIU.name"
- class="org.eclipse.equinox.internal.p2.ui.admin.dialogs.InstalledIUPropertyPage"
- id="org.eclipse.equinox.internal.p2.ui.admin.dialogs.InstalledIUPropertyPage">
- <enabledWhen>
- <instanceof
- value="org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement">
- </instanceof>
- </enabledWhen>
- </page>
- <page
- name="%Repository.name"
- class="org.eclipse.equinox.internal.p2.ui.admin.dialogs.RepositoryImplementationPropertyPage"
- id="org.eclipse.equinox.internal.p2.ui.admin.dialogs.RepositoryImplementationPropertyPage">
- <enabledWhen>
- <adapt type="org.eclipse.equinox.p2.repository.IRepository"/>
- </enabledWhen>
- </page>
-
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java
deleted file mode 100644
index ecc86f052..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.operations.ProvisioningJob;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-
-/**
- * Operation that adds the given profile to the profile registry.
- *
- * @since 3.6
- */
-public class AddProfileJob extends ProvisioningJob {
- private String profileId;
- private Map<String, String> profileProperties;
-
- public AddProfileJob(String label, ProvisioningSession session, String profileId, Map<String, String> profileProperties) {
- super(label, session);
- this.profileId = profileId;
- this.profileProperties = profileProperties;
- }
-
- public IStatus runModal(IProgressMonitor monitor) {
- IStatus status = Status.OK_STATUS;
- try {
- ProvAdminUIActivator.getDefault().getProfileRegistry().addProfile(profileId, profileProperties);
- } catch (ProvisionException e) {
- status = getErrorStatus(null, e);
- }
- return status;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java
deleted file mode 100644
index a2bdc4e7b..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIProvisioningListener;
-import org.eclipse.equinox.internal.p2.ui.QueryableArtifactRepositoryManager;
-import org.eclipse.equinox.internal.p2.ui.admin.dialogs.AddArtifactRepositoryDialog;
-import org.eclipse.equinox.internal.p2.ui.model.ArtifactRepositories;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * This view allows users to interact with artifact repositories
- *
- * @since 3.4
- */
-public class ArtifactRepositoriesView extends RepositoriesView {
-
- private RepositoryTracker tracker;
-
- /**
- *
- */
- public ArtifactRepositoriesView() {
- // constructor
- }
-
- protected Object getInput() {
- return new ArtifactRepositories(getProvisioningUI(), new QueryableArtifactRepositoryManager(getProvisioningUI(), false));
- }
-
- protected String getAddCommandLabel() {
- return ProvAdminUIMessages.ArtifactRepositoriesView_AddRepositoryLabel;
- }
-
- protected String getAddCommandTooltip() {
- return ProvAdminUIMessages.ArtifactRepositoriesView_AddRepositoryTooltip;
- }
-
- protected String getRemoveCommandTooltip() {
- return ProvAdminUIMessages.ArtifactRepositoriesView_RemoveRepositoryTooltip;
- }
-
- protected int openAddRepositoryDialog(Shell shell) {
- return new AddArtifactRepositoryDialog(shell, getProvisioningUI()).open();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getListenerEventTypes()
- */
- protected int getListenerEventTypes() {
- return ProvUIProvisioningListener.PROV_EVENT_ARTIFACT_REPOSITORY;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getRepositoryTracker()
- */
- protected RepositoryTracker getRepositoryTracker() {
- if (tracker == null)
- tracker = new ArtifactRepositoryTracker(getProvisioningUI());
- return tracker;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java
deleted file mode 100644
index ba8ce8de6..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import java.net.URI;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-public class ArtifactRepositoryTracker extends RepositoryTracker {
-
- ProvisioningUI ui;
-
- public ArtifactRepositoryTracker(ProvisioningUI ui) {
- this.ui = ui;
- }
-
- public URI[] getKnownRepositories(ProvisioningSession session) {
- return getArtifactRepositoryManager().getKnownRepositories(getArtifactRepositoryFlags());
- }
-
- public void addRepository(URI repoLocation, String nickname, ProvisioningSession session) {
- ui.signalRepositoryOperationStart();
- try {
- getArtifactRepositoryManager().addRepository(repoLocation);
- if (nickname != null)
- getArtifactRepositoryManager().setRepositoryProperty(repoLocation, IRepository.PROP_NICKNAME, nickname);
- } finally {
- ui.signalRepositoryOperationComplete(new RepositoryEvent(repoLocation, IRepository.TYPE_ARTIFACT, RepositoryEvent.ADDED, true), true);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.RepositoryTracker#removeRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession)
- */
- public void removeRepositories(URI[] repoLocations, ProvisioningSession session) {
- ui.signalRepositoryOperationStart();
- try {
- for (int i = 0; i < repoLocations.length; i++) {
- getArtifactRepositoryManager().removeRepository(repoLocations[i]);
- }
- } finally {
- ui.signalRepositoryOperationComplete(null, true);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.RepositoryTracker#refreshRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void refreshRepositories(URI[] locations, ProvisioningSession session, IProgressMonitor monitor) {
- ui.signalRepositoryOperationStart();
- SubMonitor mon = SubMonitor.convert(monitor, locations.length * 100);
- for (int i = 0; i < locations.length; i++) {
- try {
- getArtifactRepositoryManager().refreshRepository(locations[i], mon.newChild(100));
- } catch (ProvisionException e) {
- //ignore problematic repositories when refreshing
- }
- }
- // We have no idea how many repos may have been added/removed as a result of
- // refreshing these, this one, so we do not use a specific repository event to represent it.
- ui.signalRepositoryOperationComplete(null, true);
- }
-
- IArtifactRepositoryManager getArtifactRepositoryManager() {
- return ProvUI.getArtifactRepositoryManager(ui.getSession());
- }
-} \ No newline at end of file
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 d4092e1f1..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Genuitec, LLC - added license support
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import java.util.List;
-import org.eclipse.equinox.internal.p2.ui.ProvUIProvisioningListener;
-import org.eclipse.equinox.internal.p2.ui.QueryableMetadataRepositoryManager;
-import org.eclipse.equinox.internal.p2.ui.actions.InstallAction;
-import org.eclipse.equinox.internal.p2.ui.admin.dialogs.AddMetadataRepositoryDialog;
-import org.eclipse.equinox.internal.p2.ui.admin.preferences.PreferenceConstants;
-import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositories;
-import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
-import org.eclipse.equinox.internal.p2.ui.viewers.IUDragAdapter;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.part.PluginTransfer;
-
-/**
- * This view allows users to interact with metadata repositories
- *
- * @since 3.4
- */
-public class MetadataRepositoriesView extends RepositoriesView {
-
- private InstallAction installAction;
- private RepositoryTracker tracker;
- MetadataRepositories input;
-
- /**
- * The constructor.
- */
- public MetadataRepositoriesView() {
- // constructor
- }
-
- protected Object getInput() {
- if (input == null) {
- // view by repo
- IUViewQueryContext context = new IUViewQueryContext(IUViewQueryContext.AVAILABLE_VIEW_BY_REPO);
- Policy policy = ProvAdminUIActivator.getDefault().getPolicy();
- context.setShowLatestVersionsOnly(policy.getShowLatestVersionsOnly());
- context.setShowInstallChildren(policy.getShowDrilldownRequirements());
- context.setShowProvisioningPlanChildren(policy.getShowDrilldownRequirements());
- context.setUseCategories(policy.getGroupByCategory());
-
- input = new MetadataRepositories(context, getProvisioningUI(), new QueryableMetadataRepositoryManager(getProvisioningUI(), false));
- }
- return input;
- }
-
- protected String getAddCommandLabel() {
- return ProvAdminUIMessages.MetadataRepositoriesView_AddRepositoryLabel;
- }
-
- protected String getAddCommandTooltip() {
- return ProvAdminUIMessages.MetadataRepositoriesView_AddRepositoryTooltip;
- }
-
- protected String getRemoveCommandTooltip() {
- return ProvAdminUIMessages.MetadataRepositoriesView_RemoveRepositoryTooltip;
- }
-
- protected int openAddRepositoryDialog(Shell shell) {
- return new AddMetadataRepositoryDialog(shell, getProvisioningUI()).open();
- }
-
- protected void makeActions() {
- super.makeActions();
- installAction = new InstallAction(getProvisioningUI(), viewer, 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 ProvUIProvisioningListener.PROV_EVENT_METADATA_REPOSITORY;
- }
-
- protected List<String> getVisualProperties() {
- List<String> list = super.getVisualProperties();
- list.add(PreferenceConstants.PREF_USE_CATEGORIES);
- list.add(PreferenceConstants.PREF_COLLAPSE_IU_VERSIONS);
- return list;
- }
-
- protected void updateCachesForPreferences() {
- // We want to reconstruct the input's query context based on the latest preferences
- input = null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getRepositoryTracker()
- */
- protected RepositoryTracker getRepositoryTracker() {
- if (tracker == null)
- tracker = new MetadataRepositoryTracker(getProvisioningUI());
- return tracker;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java
deleted file mode 100644
index 107a53152..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.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.internal.p2.ui.admin;
-
-import java.net.URI;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-public class MetadataRepositoryTracker extends RepositoryTracker {
-
- ProvisioningUI ui;
-
- public MetadataRepositoryTracker(ProvisioningUI ui) {
- this.ui = ui;
- }
-
- public URI[] getKnownRepositories(ProvisioningSession session) {
- return getMetadataRepositoryManager().getKnownRepositories(getArtifactRepositoryFlags());
- }
-
- public void addRepository(URI repoLocation, String nickname, ProvisioningSession session) {
- ui.signalRepositoryOperationStart();
- try {
- getMetadataRepositoryManager().addRepository(repoLocation);
- if (nickname != null)
- getMetadataRepositoryManager().setRepositoryProperty(repoLocation, IRepository.PROP_NICKNAME, nickname);
-
- } finally {
- ui.signalRepositoryOperationComplete(new RepositoryEvent(repoLocation, IRepository.TYPE_METADATA, RepositoryEvent.ADDED, true), true);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.RepositoryTracker#removeRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession)
- */
- public void removeRepositories(URI[] repoLocations, ProvisioningSession session) {
- ui.signalRepositoryOperationStart();
- try {
- for (int i = 0; i < repoLocations.length; i++) {
- getMetadataRepositoryManager().removeRepository(repoLocations[i]);
- }
- } finally {
- ui.signalRepositoryOperationComplete(null, true);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.RepositoryTracker#refreshRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void refreshRepositories(URI[] locations, ProvisioningSession session, IProgressMonitor monitor) {
- ui.signalRepositoryOperationStart();
- SubMonitor mon = SubMonitor.convert(monitor, locations.length * 100);
- for (int i = 0; i < locations.length; i++) {
- try {
- getMetadataRepositoryManager().refreshRepository(locations[i], mon.newChild(100));
- } catch (ProvisionException e) {
- //ignore problematic repositories when refreshing
- }
- }
- // We have no idea how many repos may have been added/removed as a result of
- // refreshing these, this one, so we do not use a specific repository event to represent it.
- ui.signalRepositoryOperationComplete(null, true);
- }
-
- IMetadataRepositoryManager getMetadataRepositoryManager() {
- return ProvUI.getMetadataRepositoryManager(ui.getSession());
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java
deleted file mode 100644
index 831213fe9..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-
-/**
- * Factory class that can create a new profile with the correct
- * default values.
- *
- * @since 3.4
- *
- */
-public class ProfileFactory {
-
- static private String FLAVOR_DEFAULT = "tooling"; //$NON-NLS-1$
- static private String EMPTY = ""; //$NON-NLS-1$
- static private EnvironmentInfo info;
-
- public static IProfile makeProfile(String profileId) {
- Map<String, String> profileProperties = new HashMap<String, String>();
- profileProperties.put(IProfile.PROP_INSTALL_FOLDER, getDefaultLocation());
- profileProperties.put(IProfile.PROP_ENVIRONMENTS, getDefaultEnvironments());
- profileProperties.put(IProfile.PROP_NL, getDefaultNL());
-
- try {
- return ProvAdminUIActivator.getDefault().getProfileRegistry().addProfile(profileId, profileProperties);
- } catch (ProvisionException e) {
- // log
- }
- return null;
- }
-
- public static String getDefaultLocation() {
- return Platform.getUserLocation().getURL().getPath();
- }
-
- public static String getDefaultFlavor() {
- return FLAVOR_DEFAULT;
- }
-
- private static EnvironmentInfo getEnvironmentInfo() {
- if (info == null) {
- info = (EnvironmentInfo) ServiceHelper.getService(ProvUIActivator.getContext(), EnvironmentInfo.class.getName());
- }
- return info;
- }
-
- public static String getDefaultNL() {
- if (getEnvironmentInfo() != null) {
- return info.getNL();
- }
- return EMPTY;
- }
-
- public static String getDefaultEnvironments() {
- if (getEnvironmentInfo() != null) {
- return "osgi.os=" //$NON-NLS-1$
- + info.getOS() + ",osgi.ws=" + info.getWS() //$NON-NLS-1$
- + ",osgi.arch=" + info.getOSArch(); //$NON-NLS-1$
- }
- return EMPTY;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java
deleted file mode 100644
index 43e5c566a..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Genuitec, LLC - added license support
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.actions.UninstallAction;
-import org.eclipse.equinox.internal.p2.ui.actions.UpdateAction;
-import org.eclipse.equinox.internal.p2.ui.admin.dialogs.AddProfileDialog;
-import org.eclipse.equinox.internal.p2.ui.admin.preferences.PreferenceConstants;
-import org.eclipse.equinox.internal.p2.ui.model.*;
-import org.eclipse.equinox.internal.p2.ui.viewers.*;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.dialogs.PropertyDialogAction;
-
-/**
- * This view allows users to interact with installed profiles.
- *
- * @since 3.4
- */
-public class ProfilesView extends ProvView {
- protected Action addProfileAction, removeProfileAction, uninstallAction;
- UpdateAction updateAction;
- private PropertyDialogAction propertiesAction;
- private StructuredViewerProvisioningListener listener;
-
- private class RemoveProfileAction extends Action {
- RemoveProfileAction() {
- setText(ProvAdminUIMessages.ProfilesView_RemoveProfileLabel);
- setToolTipText(ProvAdminUIMessages.ProfilesView_RemoveProfileTooltip);
- setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
- setDisabledImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED));
-
- }
-
- public void run() {
- Object[] selections = getSelection().toArray();
- List<String> profilesOnly = new ArrayList<String>();
- for (int i = 0; i < selections.length; i++) {
- if (selections[i] instanceof ProfileElement)
- profilesOnly.add(((ProfileElement) selections[i]).getProfileId());
- }
- RemoveProfilesJob op = new RemoveProfilesJob(ProvAdminUIMessages.Ops_RemoveProfileOperationLabel, getProvisioningUI().getSession(), profilesOnly.toArray(new String[profilesOnly.size()]));
- ProfilesView.this.run(op);
- }
- }
-
- private class AddProfileAction extends Action {
- AddProfileAction() {
- setText(ProvAdminUIMessages.ProfilesView_AddProfileLabel);
- setToolTipText(ProvAdminUIMessages.ProfilesView_AddProfileTooltip);
- setImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.IMG_PROFILE));
- }
-
- public void run() {
- new AddProfileDialog(viewer.getControl().getShell(), getKnownProfileIds()).open();
- }
- }
-
- public ProfilesView() {
- // constructor
- }
-
- protected void addListeners() {
- super.addListeners();
- listener = new StructuredViewerProvisioningListener(viewer, ProvUIProvisioningListener.PROV_EVENT_IU | ProvUIProvisioningListener.PROV_EVENT_PROFILE);
- ProvUI.addProvisioningListener(listener);
- }
-
- protected void removeListeners() {
- super.removeListeners();
- ProvUI.removeProvisioningListener(listener);
- }
-
- protected void configureViewer(TreeViewer treeViewer) {
- super.configureViewer(treeViewer);
- InstallIUDropAdapter adapter = new InstallIUDropAdapter(getProvisioningUI(), treeViewer);
- adapter.setFeedbackEnabled(false);
- Transfer[] transfers = new Transfer[] {org.eclipse.jface.util.LocalSelectionTransfer.getTransfer()};
- treeViewer.addDropSupport(DND.DROP_COPY, transfers, adapter);
- }
-
- protected void fillLocalPullDown(IMenuManager manager) {
- manager.add(addProfileAction);
- manager.add(removeProfileAction);
- manager.add(propertiesAction);
- manager.add(new Separator());
- manager.add(updateAction);
- manager.add(uninstallAction);
- }
-
- protected void fillContextMenu(IMenuManager manager) {
- manager.add(addProfileAction);
- if (removeProfileAction.isEnabled()) {
- manager.add(removeProfileAction);
- }
- if (propertiesAction.isEnabled()) {
- manager.add(propertiesAction);
- }
- if (updateAction.isEnabled()) {
- manager.add(new Separator());
- manager.add(updateAction);
- manager.add(uninstallAction);
- }
- }
-
- protected void fillLocalToolBar(IToolBarManager manager) {
- manager.add(new Separator());
- manager.add(addProfileAction);
- manager.add(removeProfileAction);
- }
-
- protected void makeActions() {
- super.makeActions();
- addProfileAction = new AddProfileAction();
- removeProfileAction = new RemoveProfileAction();
- uninstallAction = new UninstallAction(getProvisioningUI(), viewer, null);
- propertiesAction = new PropertyDialogAction(this.getSite(), viewer);
- updateAction = new UpdateAction(getProvisioningUI(), viewer, null, true);
- updateAction.setSkipSelectionPage(true);
-
- getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.PROPERTIES.getId(), propertiesAction);
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection ss = (IStructuredSelection) event.getSelection();
- ProfilesView.this.selectionChanged(ss);
- }
- });
-
- // prime the action validation
- selectionChanged((IStructuredSelection) viewer.getSelection());
- }
-
- protected void selectionChanged(IStructuredSelection ss) {
- super.selectionChanged(ss);
- propertiesAction.setEnabled(false);
- removeProfileAction.setEnabled(false);
- if (ss.size() == 1) {
- propertiesAction.setEnabled(true);
- }
- Object[] selectionArray = ss.toArray();
- if (selectionArray.length > 0) {
- removeProfileAction.setEnabled(true);
- for (int i = 0; i < selectionArray.length; i++) {
- IProfile profile = ProvUI.getAdapter(selectionArray[i], IProfile.class);
- if (profile == null) {
- removeProfileAction.setEnabled(false);
- break;
- }
- }
- }
- }
-
- protected IAction getDoubleClickAction() {
- return propertiesAction;
- }
-
- protected IContentProvider getContentProvider() {
- return new ProvElementContentProvider();
- }
-
- protected Object getInput() {
- return new Profiles(getProvisioningUI());
- }
-
- protected String getProfileId() {
- Object firstElement = getSelection().getFirstElement();
- if (firstElement instanceof InstalledIUElement) {
- return ((InstalledIUElement) firstElement).getProfileId();
- }
- IProfile profile = ProvUI.getAdapter(firstElement, IProfile.class);
- if (profile != null)
- return profile.getProfileId();
- return null;
- }
-
- protected List<String> getVisualProperties() {
- List<String> list = super.getVisualProperties();
- list.add(PreferenceConstants.PREF_SHOW_INSTALL_ROOTS_ONLY);
- return list;
- }
-
- String[] getKnownProfileIds() {
- IProfile[] allProfiles = ProvAdminUIActivator.getDefault().getProfileRegistry().getProfiles();
- String[] ids = new String[allProfiles.length];
- for (int i = 0; i < allProfiles.length; i++)
- ids[i] = allProfiles[i].getProfileId();
- return ids;
- }
-
- protected ProvisioningUI getProvisioningUI() {
- ProvisioningUI ui = ProvAdminUIActivator.getDefault().getProvisioningUI(getProfileId());
- if (ui != null)
- return ui;
- return super.getProvisioningUI();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java
deleted file mode 100644
index 0b93343fa..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.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.ui.admin;
-
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.admin.preferences.PreferenceConstants;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-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();
- 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();
- }
- };
- }
- return preferenceListener;
- }
-
- void updateForPreferences() {
-
- if (getPreferenceStore().getBoolean(PreferenceConstants.PREF_SHOW_GROUPS_ONLY))
- policy.setVisibleAvailableIUQuery(QueryUtil.createIUGroupQuery());
- else
- policy.setVisibleAvailableIUQuery(QueryUtil.createIUAnyQuery());
- if (getPreferenceStore().getBoolean(PreferenceConstants.PREF_SHOW_INSTALL_ROOTS_ONLY))
- policy.setVisibleInstalledIUQuery(new UserVisibleRootQuery());
- else
- policy.setVisibleInstalledIUQuery(QueryUtil.createIUAnyQuery());
-
- RepositoryTracker tracker = getRepositoryTracker();
- if (getPreferenceStore().getBoolean(PreferenceConstants.PREF_HIDE_SYSTEM_REPOS)) {
- tracker.setArtifactRepositoryFlags(IRepositoryManager.REPOSITORIES_NON_SYSTEM);
- tracker.setMetadataRepositoryFlags(IRepositoryManager.REPOSITORIES_NON_SYSTEM);
- } else {
- tracker.setArtifactRepositoryFlags(IRepositoryManager.REPOSITORIES_ALL);
- tracker.setMetadataRepositoryFlags(IRepositoryManager.REPOSITORIES_ALL);
- }
- // store in ui prefs
- policy.setShowLatestVersionsOnly(getPreferenceStore().getBoolean(PreferenceConstants.PREF_COLLAPSE_IU_VERSIONS));
- policy.setGroupByCategory(getPreferenceStore().getBoolean(PreferenceConstants.PREF_USE_CATEGORIES));
- }
-
- private RepositoryTracker getRepositoryTracker() {
- return (RepositoryTracker) ServiceHelper.getService(ProvUIActivator.getContext(), RepositoryTracker.class.getName());
- }
-
- void initializePolicy() {
- policy = new Policy();
- // Manipulate the default query context according to our preferences
- updateForPreferences();
- }
-
- public Policy getPolicy() {
- return policy;
- }
-
- public IProfileRegistry getProfileRegistry() {
- IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(context, IProvisioningAgent.SERVICE_NAME);
- return (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- }
-
- public ProvisioningUI getProvisioningUI(String profileId) {
- return new ProvisioningUI(ProvisioningUI.getDefaultUI().getSession(), profileId, policy);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIMessages.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIMessages.java
deleted file mode 100644
index b91502737..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIMessages.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Message class for provisioning UI messages.
- *
- * @since 3.4
- */
-public class ProvAdminUIMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.ui.admin.messages"; //$NON-NLS-1$
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ProvAdminUIMessages.class);
- }
- public static String AddProfileDialog_Title;
- public static String MetadataRepositoriesView_AddRepositoryTooltip;
- public static String MetadataRepositoriesView_AddRepositoryLabel;
- public static String MetadataRepositoriesView_RemoveRepositoryTooltip;
- public static String ArtifactRepositoriesView_AddRepositoryTooltip;
- public static String ArtifactRepositoriesView_AddRepositoryLabel;
- public static String ArtifactRepositoriesView_RemoveRepositoryTooltip;
- public static String ProfilesView_AddProfileTooltip;
- public static String ProfilesView_AddProfileLabel;
- public static String ProfilesView_RemoveProfileLabel;
- public static String ProfilesView_RemoveProfileTooltip;
- public static String RepositoriesView_RemoveCommandLabel;
- // Preferences
- public static String ProvisioningPrefPage_HideSystemRepos;
- public static String ProvisioningPrefPage_ShowGroupsOnly;
- public static String ProvisioningPrefPage_ShowInstallRootsOnly;
- public static String ProvisioningPrefPage_CollapseIUVersions;
- public static String ProvisioningPrefPage_UseCategories;
-
- public static String Ops_RemoveProfileOperationLabel;
- public static String AddProfileDialog_OperationLabel;
- public static String AddProfileDialog_DuplicateProfileID;
- public static String ProvView_RefreshCommandTooltip;
-
- public static String ProfileRootPropertyName;
-
- public static String RepositoryImplementationPropertyPage_DescriptionLabel;
- public static String RepositoryImplementationPropertyPage_LocationLabel;
- public static String RepositoryImplementationPropertyPage_NameColumnLabel;
- public static String RepositoryImplementationPropertyPage_NameLabel;
- public static String RepositoryImplementationPropertyPage_NicknameLabel;
- public static String RepositoryImplementationPropertyPage_NoRepositorySelected;
- public static String RepositoryImplementationPropertyPage_PropertiesLabel;
- public static String RepositoryImplementationPropertyPage_ValueColumnLabel;
-
- public static String IUGroup_ID;
- public static String IUGroup_IU_ID_Required;
- public static String IUGroup_Namespace;
- public static String IUGroup_ProvidedCapabilities;
- public static String IUGroup_RequiredCapabilities;
- public static String IUGroup_TouchpointData;
- public static String IUGroup_TouchpointType;
- public static String IUGroup_Version;
-
- public static String IUPropertiesGroup_DescriptionPropertyLabel;
- public static String IUPropertiesGroup_NamePropertyLabel;
- public static String IUPropertiesGroup_ProviderPropertyLabel;
- public static String InstalledIUPropertyPage_NoInfoAvailable;
-
- public static String No_Property_Item_Selected;
-
- public static String ProfileGroup_Browse;
- public static String ProfileGroup_Browse2;
- public static String ProfileGroup_Environments;
- public static String ProfileGroup_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 63a30fd74..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.QueryProvider;
-import org.eclipse.equinox.internal.p2.ui.actions.RefreshAction;
-import org.eclipse.equinox.internal.p2.ui.admin.preferences.PreferenceConstants;
-import org.eclipse.equinox.internal.p2.ui.viewers.*;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.operations.ProvisioningJob;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.part.ViewPart;
-import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
-
-/**
- * This class supports the common characteristics for views that manipulate
- * provisioning models.
- *
- * @since 3.4
- */
-abstract class ProvView extends ViewPart {
- protected TreeViewer viewer;
- RefreshAction refreshAction;
- private IPropertyChangeListener preferenceListener;
- protected Display display;
- private ProvisioningUI ui;
-
- /**
- * The constructor.
- */
- public ProvView() {
- // constructor
- }
-
- /**
- * Create and initialize the viewer
- */
- public void createPartControl(Composite parent) {
- // Store the display so we can make async calls from listeners
- display = parent.getDisplay();
- viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
- viewer.getTree().setHeaderVisible(true);
- configureViewer(viewer);
- // Do this after setting up sorters, filters, etc.
- // Otherwise it will retrieve content on each change.
- viewer.setContentProvider(getContentProvider());
-
- // Now set up the visuals, columns before labels.
- setTreeColumns(viewer.getTree());
- viewer.setLabelProvider(getLabelProvider());
-
- // Input is last
- viewer.setInput(getInput());
-
- addListeners();
- makeActions();
- hookContextMenu();
- hookDoubleClickAction();
- contributeToActionBars();
- }
-
- private void hookContextMenu() {
- MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- ProvView.this.fillContextMenu(manager);
- manager.add(new Separator());
- manager.add(refreshAction);
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- }
- });
- Menu menu = menuMgr.createContextMenu(viewer.getControl());
- viewer.getControl().setMenu(menu);
- getSite().registerContextMenu(menuMgr, viewer);
- }
-
- private void hookDoubleClickAction() {
- viewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- IAction action = getDoubleClickAction();
- if (action != null && action.isEnabled()) {
- action.run();
- }
- }
- });
- }
-
- private void contributeToActionBars() {
- IActionBars bars = getViewSite().getActionBars();
- IMenuManager manager = bars.getMenuManager();
- fillLocalPullDown(manager);
- manager.add(new Separator());
- manager.add(refreshAction);
-
- fillLocalToolBar(bars.getToolBarManager());
- }
-
- protected abstract void fillLocalPullDown(IMenuManager manager);
-
- protected abstract void fillContextMenu(IMenuManager manager);
-
- protected abstract void fillLocalToolBar(IToolBarManager manager);
-
- protected abstract IAction getDoubleClickAction();
-
- protected void makeActions() {
- refreshAction = new RefreshAction(ProvisioningUI.getDefaultUI(), viewer, viewer.getControl()) {
- protected void refresh() {
- refreshAll(true);
- }
- };
- refreshAction.setToolTipText(ProvAdminUIMessages.ProvView_RefreshCommandTooltip);
- }
-
- /**
- * Passing the focus request to the viewer's control.
- */
- public void setFocus() {
- viewer.getControl().setFocus();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.part.WorkbenchPart#dispose()
- */
- public void dispose() {
- removeListeners();
- super.dispose();
- }
-
- protected void addListeners() {
- IPreferenceStore store = ProvAdminUIActivator.getDefault().getPreferenceStore();
- preferenceListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (getVisualProperties().contains(event.getProperty())) {
- updateCachesForPreferences();
- ProvView.this.refreshAll(false);
- }
- }
-
- };
- store.addPropertyChangeListener(preferenceListener);
- }
-
- protected void updateCachesForPreferences() {
- // default is to do nothing
- }
-
- protected void removeListeners() {
- if (preferenceListener != null) {
- IPreferenceStore store = ProvAdminUIActivator.getDefault().getPreferenceStore();
- store.removePropertyChangeListener(preferenceListener);
- }
- }
-
- Shell getShell() {
- return viewer.getControl().getShell();
- }
-
- Control getViewerControl() {
- return viewer.getControl();
- }
-
- protected IStructuredSelection getSelection() {
- return (IStructuredSelection) viewer.getSelection();
- }
-
- protected void run(ProvisioningJob job) {
- IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) getSite().getService(IWorkbenchSiteProgressService.class);
- if (service != null)
- service.schedule(job);
- else
- job.runModal(new NullProgressMonitor());
- }
-
- protected void configureViewer(final TreeViewer treeViewer) {
- viewer.setComparator(new IUComparator(IUComparator.IU_ID));
- viewer.setComparer(new ProvElementComparer());
- }
-
- protected void selectionChanged(IStructuredSelection selection) {
- // subclasses may override. Do nothing here.
- }
-
- protected abstract IContentProvider getContentProvider();
-
- protected Object getInput() {
- return null;
- }
-
- protected void setTreeColumns(Tree tree) {
- // For now we set two columns and the content depends on the elements
- TreeColumn tc = new TreeColumn(tree, SWT.LEFT, 0);
- tc.setResizable(true);
- tc.setWidth(400);
- tc = new TreeColumn(tree, SWT.LEFT, 1);
- tc.setWidth(600);
- tc.setResizable(true);
- }
-
- protected ILabelProvider getLabelProvider() {
- return new ProvElementLabelProvider();
- }
-
- protected void refreshUnderlyingModel() {
- // do nothing by default
- }
-
- protected List<String> getVisualProperties() {
- ArrayList<String> list = new ArrayList<String>(1);
- list.add(PreferenceConstants.PREF_SHOW_GROUPS_ONLY);
- return list;
- }
-
- final void refreshAll(boolean refreshModel) {
- // Refresh the underlying elements
- if (refreshModel)
- refreshUnderlyingModel();
- // We then reset the input to ensure that anything the content providers
- // are caching gets reset also. The net effect is that everything
- // will get queried again.
- viewer.setInput(getInput());
- }
-
- protected String getProfileId() {
- return IProfileRegistry.SELF;
- }
-
- protected ProvisioningUI getProvisioningUI() {
- if (ui == null) {
- ui = ProvAdminUIActivator.getDefault().getProvisioningUI(getProfileId());
- ProvUI.setQueryProvider(new QueryProvider(ui));
- }
- return ui;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvisioningPerspective.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvisioningPerspective.java
deleted file mode 100644
index 4a5e01d56..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvisioningPerspective.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import org.eclipse.ui.*;
-
-/**
- * Perspective which makes the standard provisioning views available.
- *
- * @since 3.4
- *
- */
-public class ProvisioningPerspective implements IPerspectiveFactory {
-
- private IPageLayout factory;
-
- public ProvisioningPerspective() {
- super();
- }
-
- public void createInitialLayout(IPageLayout layout) {
- this.factory = layout;
- addViews();
- addActionSets();
- addNewWizardShortcuts();
- addPerspectiveShortcuts();
- addViewShortcuts();
- }
-
- private void addViews() {
- // Creates the overall folder layout.
- // Note that each new Folder uses a percentage of the remaining
- // EditorArea.
-
- IFolderLayout bottom = factory.createFolder("bottomRight", //$NON-NLS-1$
- IPageLayout.BOTTOM, 0.75f, factory.getEditorArea());
- bottom.addView("org.eclipse.p2.ui.admin.ProfilesView"); //$NON-NLS-1$
-
- IFolderLayout topLeft = factory.createFolder("topLeft", //$NON-NLS-1$
- IPageLayout.LEFT, 0.4f, factory.getEditorArea());
- topLeft.addView("org.eclipse.p2.ui.admin.MetadataRepositoriesView"); //$NON-NLS-1$
- topLeft.addView("org.eclipse.p2.ui.admin.ArtifactRepositoriesView"); //$NON-NLS-1$
- }
-
- private void addActionSets() {
- factory.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET); // NON-NLS-1
- }
-
- private void addPerspectiveShortcuts() {
- factory.addPerspectiveShortcut("org.eclipse.ui.resourcePerspective"); //$NON-NLS-1$
- }
-
- private void addNewWizardShortcuts() {
- // factory.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//NON-NLS-1
- }
-
- private void addViewShortcuts() {
- factory.addShowViewShortcut("org.eclipse.p2.ui.admin.MetadataRepositoriesView"); //$NON-NLS-1$
- factory.addShowViewShortcut("org.eclipse.p2.ui.admin.ArtifactRepositoriesView"); //$NON-NLS-1$
- factory.addShowViewShortcut("org.eclipse.p2.ui.admin.ProfilesView"); //$NON-NLS-1$
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java
deleted file mode 100644
index b43a74ce8..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.operations.ProvisioningJob;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-
-/**
- * Job that removes one or more profiles.
- *
- * @since 3.6
- */
-public class RemoveProfilesJob extends ProvisioningJob {
- String[] profileIds;
-
- public RemoveProfilesJob(String label, ProvisioningSession session, String[] profileIds) {
- super(label, session);
- this.profileIds = profileIds;
- }
-
- public IStatus runModal(IProgressMonitor monitor) {
- for (int i = 0; i < profileIds.length; i++) {
- ProvAdminUIActivator.getDefault().getProfileRegistry().removeProfile(profileIds[i]);
- }
- return Status.OK_STATUS;
-
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java
deleted file mode 100644
index cf21efabc..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import java.lang.reflect.InvocationTargetException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.ProvUIImages;
-import org.eclipse.equinox.internal.p2.ui.admin.preferences.PreferenceConstants;
-import org.eclipse.equinox.internal.p2.ui.model.IRepositoryElement;
-import org.eclipse.equinox.internal.p2.ui.viewers.RepositoryContentProvider;
-import org.eclipse.equinox.internal.p2.ui.viewers.StructuredViewerProvisioningListener;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.dialogs.PropertyDialogAction;
-import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * This class supports the common characteristics for views that manipulate
- * provisioning repositories.
- *
- * @since 3.4
- */
-abstract class RepositoriesView extends ProvView {
-
- private class RemoveRepositoryAction extends Action {
- RemoveRepositoryAction() {
- setText(getRemoveCommandLabel());
- setToolTipText(getRemoveCommandTooltip());
- setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
- setDisabledImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED));
-
- }
-
- public void run() {
- RepositoryTracker tracker = RepositoriesView.this.getRepositoryTracker();
- Object[] elements = getSelection().toArray();
- ArrayList<URI> uris = new ArrayList<URI>(elements.length);
- for (int i = 0; i < elements.length; i++) {
- if (elements[i] instanceof IRepositoryElement<?>)
- uris.add(((IRepositoryElement<?>) elements[i]).getLocation());
- }
- tracker.removeRepositories(uris.toArray(new URI[uris.size()]), RepositoriesView.this.getProvisioningUI().getSession());
- }
- }
-
- private class AddRepositoryAction extends Action {
- AddRepositoryAction() {
- setText(getAddCommandLabel());
- setToolTipText(getAddCommandTooltip());
- setImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.IMG_ARTIFACT_REPOSITORY));
-
- }
-
- public void run() {
- Object[] elements = ((ITreeContentProvider) viewer.getContentProvider()).getElements(getInput());
- ArrayList<URI> urls = new ArrayList<URI>();
- for (int i = 0; i < elements.length; i++)
- if (elements[i] instanceof IRepositoryElement<?>)
- urls.add(((IRepositoryElement<?>) elements[i]).getLocation());
- openAddRepositoryDialog(getShell());
- }
- }
-
- private Action addRepositoryAction, removeRepositoryAction;
- private PropertyDialogAction propertiesAction;
-
- private StructuredViewerProvisioningListener listener;
-
- /**
- * The constructor.
- */
- public RepositoriesView() {
- // nothing to do
- }
-
- protected void addListeners() {
- super.addListeners();
- listener = new StructuredViewerProvisioningListener(viewer, getListenerEventTypes()) {
- protected void refreshViewer() {
- RepositoriesView.this.refreshAll(false);
- }
- };
- ProvUI.addProvisioningListener(listener);
- }
-
- protected void removeListeners() {
- super.removeListeners();
- ProvUI.removeProvisioningListener(listener);
- }
-
- protected void fillLocalPullDown(IMenuManager manager) {
- manager.add(addRepositoryAction);
- manager.add(removeRepositoryAction);
- manager.add(propertiesAction);
- }
-
- protected void fillContextMenu(IMenuManager manager) {
- manager.add(addRepositoryAction);
- if (removeRepositoryAction.isEnabled()) {
- manager.add(removeRepositoryAction);
- }
- if (propertiesAction.isEnabled()) {
- manager.add(new Separator());
- manager.add(propertiesAction);
- }
- }
-
- protected void fillLocalToolBar(IToolBarManager manager) {
- manager.add(addRepositoryAction);
- manager.add(removeRepositoryAction);
- }
-
- protected void makeActions() {
- super.makeActions();
- addRepositoryAction = new AddRepositoryAction();
- removeRepositoryAction = new RemoveRepositoryAction();
- getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.DELETE.getId(), removeRepositoryAction);
-
- propertiesAction = new PropertyDialogAction(this.getSite(), viewer);
- getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.PROPERTIES.getId(), propertiesAction);
- IStructuredSelection selection = getSelection();
- if (selection.size() == 1 && isRepository(selection.getFirstElement())) {
- propertiesAction.setEnabled(true);
- removeRepositoryAction.setEnabled(true);
- } else {
- propertiesAction.setEnabled(false);
- removeRepositoryAction.setEnabled(false);
- }
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection ss = (IStructuredSelection) event.getSelection();
- RepositoriesView.this.selectionChanged(ss);
- }
- });
- }
-
- protected IAction getDoubleClickAction() {
- return propertiesAction;
- }
-
- protected void selectionChanged(IStructuredSelection selection) {
- propertiesAction.setEnabled(selection.size() == 1 && ((ProvUI.getAdapter(selection.getFirstElement(), IInstallableUnit.class) != null) || (isRepository(selection.getFirstElement()))));
- boolean enabled = false;
- Object[] selectionArray = selection.toArray();
- for (int i = 0; i < selectionArray.length; i++) {
- if (!isRepository(selectionArray[i])) {
- enabled = false;
- break;
- }
- enabled = true;
- }
- removeRepositoryAction.setEnabled(enabled);
- }
-
- protected IContentProvider getContentProvider() {
- return new RepositoryContentProvider();
-
- }
-
- protected abstract RepositoryTracker getRepositoryTracker();
-
- protected abstract int openAddRepositoryDialog(Shell shell);
-
- protected abstract String getAddCommandLabel();
-
- protected abstract String getAddCommandTooltip();
-
- protected String getRemoveCommandLabel() {
- return ProvAdminUIMessages.RepositoriesView_RemoveCommandLabel;
- }
-
- protected abstract String getRemoveCommandTooltip();
-
- protected boolean isRepository(Object element) {
- return element instanceof IRepositoryElement<?>;
- }
-
- protected abstract int getListenerEventTypes();
-
- protected List<String> getVisualProperties() {
- List<String> list = super.getVisualProperties();
- list.add(PreferenceConstants.PREF_HIDE_SYSTEM_REPOS);
- return list;
- }
-
- protected void refreshUnderlyingModel() {
- IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) getSite().getAdapter(IWorkbenchSiteProgressService.class);
- if (service != null) {
- try {
- service.run(true, false, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- getRepositoryTracker().refreshRepositories(getRepositoryTracker().getKnownRepositories(getProvisioningUI().getSession()), getProvisioningUI().getSession(), monitor);
- }
- });
- } catch (InvocationTargetException e) {
- ProvUI.handleException(e, null, StatusManager.SHOW);
- } catch (InterruptedException e) {
- // ignore
- }
- } else
- getRepositoryTracker().refreshRepositories(getRepositoryTracker().getKnownRepositories(getProvisioningUI().getSession()), getProvisioningUI().getSession(), new NullProgressMonitor());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java
deleted file mode 100644
index e94be5aac..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.admin.ArtifactRepositoryTracker;
-import org.eclipse.equinox.internal.p2.ui.dialogs.AddRepositoryDialog;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Dialog that allows an artifact repository to be defined and added.
- *
- * @since 3.4
- *
- */
-public class AddArtifactRepositoryDialog extends AddRepositoryDialog {
-
- RepositoryTracker tracker;
-
- public AddArtifactRepositoryDialog(Shell parentShell, ProvisioningUI ui) {
- super(parentShell, ui);
- }
-
- protected RepositoryTracker getRepositoryTracker() {
- if (tracker == null) {
- tracker = new ArtifactRepositoryTracker(getProvisioningUI());
- }
- return tracker;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java
deleted file mode 100644
index 8281f22bf..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.admin.MetadataRepositoryTracker;
-import org.eclipse.equinox.internal.p2.ui.dialogs.AddRepositoryDialog;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Dialog that allows a metadata repository to be defined and added.
- *
- * @since 3.4
- *
- */
-public class AddMetadataRepositoryDialog extends AddRepositoryDialog {
-
- RepositoryTracker tracker;
-
- public AddMetadataRepositoryDialog(Shell parentShell, ProvisioningUI ui) {
- super(parentShell, ui);
- }
-
- protected RepositoryTracker getRepositoryTracker() {
- if (tracker == null) {
- tracker = new MetadataRepositoryTracker(getProvisioningUI());
- }
- return tracker;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java
deleted file mode 100644
index 7d5d88ce2..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.admin.*;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Dialog that allows a profile to be defined and added.
- *
- * @since 3.4
- *
- */
-public class AddProfileDialog extends StatusDialog {
-
- private ProfileGroup profileGroup;
- private Button okButton;
- private String[] knownProfileIds;
- private String addedProfileId;
-
- public AddProfileDialog(Shell parentShell, String[] knownProfiles) {
-
- super(parentShell);
- this.knownProfileIds = knownProfiles;
- setTitle(ProvAdminUIMessages.AddProfileDialog_Title);
- }
-
- protected void createButtonsForButtonBar(Composite parent) {
- okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
-
- protected Control createDialogArea(Composite parent) {
- profileGroup = new ProfileGroup(parent, null, new ModifyListener() {
- public void modifyText(ModifyEvent event) {
- verifyComplete();
- }
- });
- Dialog.applyDialogFont(profileGroup.getComposite());
- return profileGroup.getComposite();
- }
-
- protected void okPressed() {
- verifyComplete();
- if (okButton.isEnabled()) {
- addProfile();
- super.okPressed();
- }
- }
-
- /*
- * We only get here if already validated (ok was pressed)
- */
- private void addProfile() {
- IProfile profile = profileGroup.getProfile();
- if (profile != null) {
- return;
- }
- addedProfileId = profileGroup.getProfileId();
- Map<String, String> profileProperties = profileGroup.getProfileProperties();
- AddProfileJob job = new AddProfileJob(ProvAdminUIMessages.AddProfileDialog_OperationLabel, ProvisioningUI.getDefaultUI().getSession(), addedProfileId, profileProperties);
- job.runModal(new NullProgressMonitor());
- }
-
- void verifyComplete() {
- if (okButton == null) {
- return;
- }
- IStatus status = profileGroup.verify();
- if (!status.isOK()) {
- this.updateStatus(status);
- setOkEnablement(false);
- return;
- }
- if (isDuplicate()) {
- return;
- }
- okButton.setEnabled(true);
- this.updateStatus(new Status(IStatus.OK, ProvAdminUIActivator.PLUGIN_ID, IStatus.OK, "", null)); //$NON-NLS-1$
-
- }
-
- private boolean isDuplicate() {
- if (knownProfileIds == null) {
- return false;
- }
-
- for (int i = 0; i < knownProfileIds.length; i++) {
- if (knownProfileIds[i].equals(profileGroup.getProfileId())) {
- setOkEnablement(false);
- this.updateStatus(new Status(IStatus.ERROR, ProvAdminUIActivator.PLUGIN_ID, IStatus.OK, ProvAdminUIMessages.AddProfileDialog_DuplicateProfileID, null));
- return true;
- }
- }
- return false;
- }
-
- protected void updateButtonsEnableState(IStatus status) {
- setOkEnablement(!status.matches(IStatus.ERROR));
- }
-
- protected void setOkEnablement(boolean enable) {
- if (okButton != null && !okButton.isDisposed())
- okButton.setEnabled(enable);
- }
-
- /**
- * Return the profile id that was added with this dialog, or null
- * if no profile has been added. This method will not return
- * a valid profile until the user has pressed OK and the profile
- * has been added to the profile registry.
- * @return the added profile's id
- */
- public String getAddedProfileId() {
- return addedProfileId;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUGroup.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUGroup.java
deleted file mode 100644
index e3729873a..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUGroup.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * An IUGroup is a reusable UI component that displays properties of an IU. It can be used in
- * different dialogs that manipulate or define IU's.
- *
- * @since 3.4
- */
-public abstract class IUGroup {
-
- protected Object iuElement;
- private Composite composite;
-
- protected IUGroup(final Composite parent, Object iu, ModifyListener listener) {
- this.iuElement = iu;
- composite = createGroupComposite(parent, listener);
- }
-
- protected abstract Composite createGroupComposite(Composite parent, ModifyListener modifyListener);
-
- public Composite getComposite() {
- return composite;
- }
-
- public IInstallableUnit getIU() {
- return ProvUI.getAdapter(iuElement, IInstallableUnit.class);
- }
-
- public void updateIU() {
- // default is to do nothing
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java
deleted file mode 100644
index 7f971df27..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import org.eclipse.equinox.p2.metadata.MetadataFactory;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
-import java.util.Collection;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIActivator;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.FontMetrics;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * An IUImplementationGroup is a reusable UI component that displays and edits the
- * implementation-oriented properties of an IU. It can be used in
- * different dialogs that manipulate or define IU's.
- *
- * @since 3.4
- */
-public class IUImplementationGroup extends IUGroup {
-
- private Text id;
- private Text version;
- private Text namespace;
- private Text touchpointType;
- private List touchpointData;
- private List requiredCapabilities;
- private List providedCapabilities;
-
- public IUImplementationGroup(final Composite parent, IInstallableUnit iu, ModifyListener listener) {
- super(parent, iu, listener);
- }
-
- protected Composite createGroupComposite(Composite parent, ModifyListener listener) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
- GridData data = new GridData();
- data.widthHint = 350;
- composite.setLayoutData(data);
-
- // Grid data for text controls
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-
- // Grid data for controls spanning both columns
- GridData gd2 = new GridData(GridData.FILL_HORIZONTAL);
- gd2.horizontalSpan = 2;
-
- // Grid data for lists grabbing vertical space
- GridData gdList = new GridData(GridData.FILL_HORIZONTAL);
- GC gc = new GC(parent);
- gc.setFont(JFaceResources.getDialogFont());
- FontMetrics fontMetrics = gc.getFontMetrics();
- gc.dispose();
- gdList.horizontalSpan = 2;
- gdList.heightHint = Dialog.convertHeightInCharsToPixels(fontMetrics, 5);
-
- boolean editable = iuElement == null && listener != null;
-
- Label label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.IUGroup_ID);
- id = new Text(composite, SWT.BORDER);
- id.setLayoutData(gd);
- if (editable) {
- id.addModifyListener(listener);
- } else {
- id.setEditable(false);
- }
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.IUGroup_Version);
- version = new Text(composite, SWT.BORDER);
- version.setLayoutData(gd);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.IUGroup_Namespace);
- namespace = new Text(composite, SWT.BORDER);
- namespace.setLayoutData(gd);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.IUGroup_TouchpointType);
- touchpointType = new Text(composite, SWT.BORDER | SWT.READ_ONLY);
- touchpointType.setLayoutData(gd);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.IUGroup_TouchpointData);
- label.setLayoutData(gd2);
- touchpointData = new List(composite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
- touchpointData.setLayoutData(gdList);
- createCopyMenu(touchpointData);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.IUGroup_RequiredCapabilities);
- label.setLayoutData(gd2);
- requiredCapabilities = new List(composite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
- requiredCapabilities.setLayoutData(gdList);
- createCopyMenu(requiredCapabilities);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.IUGroup_ProvidedCapabilities);
- label.setLayoutData(gd2);
- providedCapabilities = new List(composite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
- providedCapabilities.setLayoutData(gdList);
- createCopyMenu(providedCapabilities);
-
- if (editable) {
- id.addModifyListener(listener);
- version.addModifyListener(listener);
- namespace.addModifyListener(listener);
- touchpointType.addModifyListener(listener);
- } else {
- id.setEditable(false);
- version.setEditable(false);
- namespace.setEditable(false);
- touchpointType.setEditable(false);
- }
- initializeFields();
- return composite;
- }
-
- private void initializeFields() {
- IInstallableUnit iu = getIU();
- if (iu == null) {
- return;
- }
- id.setText(iu.getId());
- version.setText(iu.getVersion().toString());
-
- String value = iu.getProperty(IInstallableUnit.NAMESPACE_IU_ID);
- if (value != null) {
- namespace.setText(value);
- }
- ITouchpointType type = iu.getTouchpointType();
- if (type != null) {
- touchpointType.setText(type.getId());
- }
- Collection<ITouchpointData> data = iu.getTouchpointData();
- String[] items = new String[data.size()];
- int i = 0;
- for (ITouchpointData td : data) {
- items[i++] = td.toString();
- }
- touchpointData.setItems(items);
-
- Collection<IRequirement> reqs = iu.getRequirements();
- items = new String[reqs.size()];
- i = 0;
- for (IRequirement req : reqs) {
- items[i++] = req.toString();
- }
- requiredCapabilities.setItems(items);
- Collection<IProvidedCapability> prov = iu.getProvidedCapabilities();
- items = new String[prov.size()];
- i = 0;
- for (IProvidedCapability capability : prov) {
- items[i++] = capability.toString();
- }
- providedCapabilities.setItems(items);
- }
-
- public void updateIU() {
- // If it's not an InstallableUnit it is not editable
- if (iuElement == null || iuElement instanceof IInstallableUnit) {
- InstallableUnitDescription unit = new InstallableUnitDescription();
- unit.setId(id.getText().trim());
- unit.setVersion(Version.create(version.getText().trim()));
- unit.setProperty(IInstallableUnit.NAMESPACE_IU_ID, namespace.getText().trim());
- // TODO this is bogus because we don't let user provide a touchpoint type version
- unit.setTouchpointType(MetadataFactory.createTouchpointType(touchpointType.getText().trim(), Version.create("1.0.0"))); //$NON-NLS-1$
- iuElement = MetadataFactory.createInstallableUnit(unit);
- }
- }
-
- /**
- * Return a status indicating the validity of the profile info
- *
- * @return a status indicating the validity of the profile info
- */
- public IStatus verify() {
- if (id.getText().trim().length() == 0) {
- return new Status(IStatus.ERROR, ProvAdminUIActivator.PLUGIN_ID, 0, ProvAdminUIMessages.IUGroup_IU_ID_Required, null);
- }
-
- // TODO what kind of validation do we perform for other properties?
- return new Status(IStatus.OK, ProvAdminUIActivator.PLUGIN_ID, IStatus.OK, "", null); //$NON-NLS-1$
-
- }
-
- private void createCopyMenu(final List list) {
- Menu copyMenu = new Menu(list);
- MenuItem copyItem = new MenuItem(copyMenu, SWT.NONE);
- copyItem.addSelectionListener(new SelectionListener() {
- /*
- * @see SelectionListener.widgetSelected (SelectionEvent)
- */
- public void widgetSelected(SelectionEvent e) {
- copySelectionsToClipboard(list);
- }
-
- /*
- * @see SelectionListener.widgetDefaultSelected(SelectionEvent)
- */
- public void widgetDefaultSelected(SelectionEvent e) {
- copySelectionsToClipboard(list);
- }
- });
- copyItem.setText(JFaceResources.getString("copy")); //$NON-NLS-1$
- list.setMenu(copyMenu);
- }
-
- void copySelectionsToClipboard(List list) {
- StringBuffer buffer = new StringBuffer();
- String[] selections = list.getSelection();
- for (int i = 0; i < selections.length; i++) {
- buffer.append(selections[i]);
- buffer.append("\n"); //$NON-NLS-1$
- }
- Clipboard clipboard = new Clipboard(list.getDisplay());
- clipboard.setContents(new Object[] {buffer.toString()}, new Transfer[] {TextTransfer.getInstance()});
- clipboard.dispose();
-
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java
deleted file mode 100644
index 04a751e26..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-/**
- * PropertyPage that shows an IU's properties
- *
- * @since 3.4
- */
-public class IUImplementationPropertyPage extends PropertyPage {
-
- private IUImplementationGroup iuGroup;
-
- protected Control createContents(Composite parent) {
- IInstallableUnit iu = ProvUI.getAdapter(getElement(), IInstallableUnit.class);
- if (iu == null) {
- Label label = new Label(parent, SWT.DEFAULT);
- label.setText(ProvAdminUIMessages.No_Property_Item_Selected);
- }
- iuGroup = new IUImplementationGroup(parent, iu, new ModifyListener() {
- public void modifyText(ModifyEvent event) {
- verifyComplete();
- }
- });
- Dialog.applyDialogFont(iuGroup.getComposite());
- verifyComplete();
- return iuGroup.getComposite();
- }
-
- public boolean performOk() {
- return true;
- }
-
- void verifyComplete() {
- if (iuGroup == null) {
- return;
- }
- IStatus status = iuGroup.verify();
- setValid(status.isOK());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java
deleted file mode 100644
index db4f4c612..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIActivator;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * An IUPropertiesGroup is a reusable UI component that displays and edits the
- * user-oriented properties of an IU. It can be used in
- * different dialogs that manipulate or define IU's.
- *
- * @since 3.4
- */
-public class IUProfilePropertiesGroup extends IUGroup {
-
- private Table propertiesTable;
-
- public IUProfilePropertiesGroup(final Composite parent, InstalledIUElement iuElement, ModifyListener listener) {
- super(parent, iuElement, listener);
- }
-
- protected Composite createGroupComposite(Composite parent, ModifyListener listener) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- composite.setLayout(layout);
- GridData data = new GridData();
- data.widthHint = 400;
- composite.setLayoutData(data);
-
- propertiesTable = new Table(composite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- data = new GridData(GridData.FILL_BOTH);
- data.grabExcessVerticalSpace = true;
- propertiesTable.setLayoutData(data);
- propertiesTable.setHeaderVisible(true);
- TableColumn nameColumn = new TableColumn(propertiesTable, SWT.NONE);
- nameColumn.setResizable(true);
- nameColumn.setWidth(200);
- TableColumn valueColumn = new TableColumn(propertiesTable, SWT.NONE);
- valueColumn.setResizable(true);
- valueColumn.setWidth(250);
- initializeFields();
- return composite;
- }
-
- private void initializeFields() {
- if (iuElement == null || !(iuElement instanceof InstalledIUElement)) {
- return;
- }
- String[] propNames = new String[] {IProfile.PROP_PROFILE_ROOT_IU};
- String[] userPropNames = new String[] {ProvAdminUIMessages.ProfileRootPropertyName};
- for (int i = 0; i < propNames.length; i++) {
- TableItem item = new TableItem(propertiesTable, SWT.NULL);
- IProfile profile = getProfile((InstalledIUElement) iuElement);
- String value = profile == null ? null : profile.getInstallableUnitProperty(getIU(), propNames[i]);
- if (value != null)
- item.setText(new String[] {userPropNames[i], value});
- }
- }
-
- private IProfile getProfile(InstalledIUElement element) {
- return ProvAdminUIActivator.getDefault().getProfileRegistry().getProfile(element.getProfileId());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java
deleted file mode 100644
index ac7b80810..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Genuitec, LLC - added license support
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * An IUPropertiesGroup is a reusable UI component that displays and edits the
- * user-oriented properties of an IU. It can be used in
- * different dialogs that manipulate or define IU's.
- *
- * @since 3.4
- */
-public class IUPropertiesGroup extends IUGroup {
-
- private Table propertiesTable;
-
- public IUPropertiesGroup(final Composite parent, IInstallableUnit iu, ModifyListener listener) {
- super(parent, iu, listener);
- }
-
- protected Composite createGroupComposite(Composite parent, ModifyListener listener) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- composite.setLayout(layout);
- GridData data = new GridData();
- data.widthHint = 400;
- composite.setLayoutData(data);
-
- propertiesTable = new Table(composite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- data = new GridData(GridData.FILL_BOTH);
- data.grabExcessVerticalSpace = true;
- propertiesTable.setLayoutData(data);
- propertiesTable.setHeaderVisible(true);
- TableColumn nameColumn = new TableColumn(propertiesTable, SWT.NONE);
- nameColumn.setResizable(true);
- nameColumn.setWidth(200);
- TableColumn valueColumn = new TableColumn(propertiesTable, SWT.NONE);
- valueColumn.setResizable(true);
- valueColumn.setWidth(250);
- initializeFields();
- return composite;
- }
-
- private void initializeFields() {
- if (iuElement == null) {
- return;
- }
- String[] propNames = new String[] {IInstallableUnit.PROP_NAME, IInstallableUnit.PROP_DESCRIPTION, IInstallableUnit.PROP_PROVIDER};
- String[] userPropNames = new String[] {ProvAdminUIMessages.IUPropertiesGroup_NamePropertyLabel, ProvAdminUIMessages.IUPropertiesGroup_DescriptionPropertyLabel, ProvAdminUIMessages.IUPropertiesGroup_ProviderPropertyLabel};
- for (int i = 0; i < propNames.length; i++) {
- TableItem item = new TableItem(propertiesTable, SWT.NULL);
- String value = getIU().getProperty(propNames[i], null);
- if (value != null)
- item.setText(new String[] {userPropNames[i], value});
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java
deleted file mode 100644
index 7694a0138..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-/**
- * PropertyPage that shows an IU's properties
- *
- * @since 3.4
- */
-public class InstalledIUPropertyPage extends PropertyPage {
-
- private IUProfilePropertiesGroup iuGroup;
-
- protected Control createContents(Composite parent) {
- Object element = getElement();
- if (!(element instanceof InstalledIUElement)) {
- Label label = new Label(parent, SWT.DEFAULT);
- label.setText(ProvAdminUIMessages.InstalledIUPropertyPage_NoInfoAvailable);
- return label;
- }
- iuGroup = new IUProfilePropertiesGroup(parent, (InstalledIUElement) element, new ModifyListener() {
- public void modifyText(ModifyEvent event) {
- // not editable
- }
- });
- Dialog.applyDialogFont(iuGroup.getComposite());
- return iuGroup.getComposite();
- }
-
- public boolean performOk() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java
deleted file mode 100644
index 07f546092..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.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
- * Andrew Overholt <overholt@redhat.com> - Fix for Bug 197970
- * [prov] unset Profile name causes exception bringing up profile properties
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.ui.admin.*;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * A ProfileGroup is a reusable UI component that displays the
- * properties of a profile. It can be used to create a new profile.
- * . It can be used in different dialogs that manipulate
- * or define profiles.
- *
- * @since 3.4
- *
- */
-public class ProfileGroup {
-
- Text id;
- Text location;
- Text cache;
- Text name;
- Text description;
- Text environments;
- Text nl;
- IProfile profile;
-
- public ProfileGroup(final Composite parent, IProfile profile, ModifyListener listener) {
- this.profile = profile;
-
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- composite.setLayout(layout);
- GridData data = new GridData();
- data.widthHint = 350;
- composite.setLayoutData(data);
-
- // Grid data for most text controls
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
-
- Label label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.ProfileGroup_ID);
- id = new Text(composite, SWT.BORDER);
- id.setLayoutData(gd);
- setEditable(id, profile == null, listener);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.ProfileGroup_InstallFolder);
- location = new Text(composite, SWT.BORDER);
- location.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- setEditable(location, profile == null, listener);
-
- Button locationButton = new Button(composite, SWT.PUSH);
- locationButton.setText(ProvAdminUIMessages.ProfileGroup_Browse);
- locationButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- DirectoryDialog dialog = new DirectoryDialog(parent.getShell(), SWT.APPLICATION_MODAL);
- dialog.setMessage(ProvAdminUIMessages.ProfileGroup_SelectProfileMessage);
- String dir = dialog.open();
- if (dir != null) {
- location.setText(dir);
- }
- }
- });
- setEditable(locationButton, profile == null, listener);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.ProfileGroup_Cache);
- cache = new Text(composite, SWT.BORDER);
- cache.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- setEditable(cache, profile == null, listener);
-
- locationButton = new Button(composite, SWT.PUSH);
- locationButton.setText(ProvAdminUIMessages.ProfileGroup_Browse2);
- locationButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- DirectoryDialog dialog = new DirectoryDialog(parent.getShell(), SWT.APPLICATION_MODAL);
- dialog.setMessage(ProvAdminUIMessages.ProfileGroup_SelectBundlePoolCache);
- String dir = dialog.open();
- if (dir != null) {
- cache.setText(dir);
- }
- }
- });
- setEditable(locationButton, profile == null, listener);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.ProfileGroup_Name);
- name = new Text(composite, SWT.BORDER);
- name.setLayoutData(gd);
- setEditable(name, profile == null, listener);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.ProfileGroup_Description);
- description = new Text(composite, SWT.BORDER);
- description.setLayoutData(gd);
- setEditable(description, profile == null, listener);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.ProfileGroup_Flavor);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.ProfileGroup_Environments);
- environments = new Text(composite, SWT.BORDER);
- environments.setLayoutData(gd);
- setEditable(environments, profile == null, listener);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.ProfileGroup_NL);
- nl = new Text(composite, SWT.BORDER);
- nl.setLayoutData(gd);
- setEditable(nl, profile == null, listener);
-
- initializeFields();
- }
-
- private void initializeFields() {
- if (profile == null) {
- location.setText(ProfileFactory.getDefaultLocation());
- environments.setText(ProfileFactory.getDefaultEnvironments());
- nl.setText(ProfileFactory.getDefaultNL());
- } else {
- String value = profile.getProfileId();
- // Should not happen, profiles must have an id, but just in case.
- if (value == null)
- value = ""; //$NON-NLS-1$
- id.setText(value);
-
- // The remaining values may be null
- value = profile.getProperty(IProfile.PROP_INSTALL_FOLDER);
- if (value != null) {
- location.setText(value);
- }
- value = profile.getProperty(IProfile.PROP_CACHE);
- if (value != null) {
- cache.setText(value);
- }
-
- value = profile.getProperty(IProfile.PROP_NAME);
- if (value != null) {
- name.setText(value);
- }
- value = profile.getProperty(IProfile.PROP_DESCRIPTION);
- if (value != null) {
- description.setText(value);
- }
-
- value = profile.getProperty(IProfile.PROP_ENVIRONMENTS);
- if (value != null) {
- environments.setText(value);
- }
- value = profile.getProperty(IProfile.PROP_NL);
- if (value != null) {
- nl.setText(value);
- }
- }
- }
-
- public Map<String, String> getProfileProperties() {
- if (profile == null) {
- Map<String, String> profileProperties = new HashMap<String, String>();
-
- String value = location.getText().trim();
- if (value.length() > 0) {
- profileProperties.put(IProfile.PROP_INSTALL_FOLDER, value);
- }
-
- value = cache.getText().trim();
- if (value.length() > 0) {
- profileProperties.put(IProfile.PROP_CACHE, value);
- }
- value = name.getText().trim();
- if (value.length() > 0) {
- profileProperties.put(IProfile.PROP_NAME, value);
- }
- value = description.getText().trim();
- if (value.length() > 0) {
- profileProperties.put(IProfile.PROP_DESCRIPTION, value);
- }
- value = environments.getText().trim();
- if (value.length() > 0) {
- profileProperties.put(IProfile.PROP_ENVIRONMENTS, value);
- }
- value = nl.getText().trim();
- if (value.length() > 0) {
- profileProperties.put(IProfile.PROP_NL, value);
- }
- return profileProperties;
- }
- return profile.getProperties();
- }
-
- public Composite getComposite() {
- if (id == null) {
- return null;
- }
- return id.getParent();
- }
-
- public IProfile getProfile() {
- return profile;
- }
-
- public String getProfileId() {
- if (profile != null) {
- return profile.getProfileId();
- }
- return id.getText().trim();
- }
-
- /**
- * Return a status indicating the validity of the profile info
- *
- * @return a status indicating the validity of the profile info
- */
- public IStatus verify() {
- if (id.getText().trim().length() == 0) {
- return new Status(IStatus.ERROR, ProvAdminUIActivator.PLUGIN_ID, 0, ProvAdminUIMessages.ProfileGroup_ProfileIDRequired, null);
- }
- if (location.getText().trim().length() == 0) {
- return new Status(IStatus.ERROR, ProvAdminUIActivator.PLUGIN_ID, 0, ProvAdminUIMessages.ProfileGroup_ProfileInstallFolderRequired, null);
- }
-
- // TODO what kind of validation do we perform for other properties?
- return new Status(IStatus.OK, ProvAdminUIActivator.PLUGIN_ID, IStatus.OK, "", null); //$NON-NLS-1$
-
- }
-
- private void setEditable(Control control, boolean editable, ModifyListener listener) {
- if (control instanceof Text) {
- Text text = (Text) control;
- text.setEditable(editable);
- if (listener != null && editable)
- text.addModifyListener(listener);
- } else {
- control.setEnabled(editable);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java
deleted file mode 100644
index cea15ad83..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-/**
- * PropertyPage that shows an IU's properties
- *
- * @since 3.4
- */
-public class ProfilePropertyPage extends PropertyPage {
-
- private ProfileGroup profileGroup;
-
- protected Control createContents(Composite parent) {
- IProfile profile = ProvUI.getAdapter(getElement(), IProfile.class);
- if (profile == null) {
- Label label = new Label(parent, SWT.DEFAULT);
- label.setText(ProvAdminUIMessages.No_Property_Item_Selected);
- }
- // Assume that we do not edit profile properties for now
- noDefaultAndApplyButton();
-
- profileGroup = new ProfileGroup(parent, profile, null);
- Dialog.applyDialogFont(profileGroup.getComposite());
- return profileGroup.getComposite();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java
deleted file mode 100644
index 7c28fc184..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import java.util.Map;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.IRepositoryElement;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-/**
- * PropertyPage that shows a repository's properties
- *
- * @since 3.4
- */
-public class RepositoryImplementationPropertyPage extends PropertyPage {
- private IRepositoryElement<?> repositoryElement;
- private Composite composite;
- private Text name;
- private Text location;
- private Text nickname;
- private Text description;
- private Table propertiesTable;
-
- protected Control createContents(Composite parent) {
- this.repositoryElement = getRepositoryElement();
- if (repositoryElement == null) {
- Label label = new Label(parent, SWT.DEFAULT);
- label.setText(ProvAdminUIMessages.RepositoryImplementationPropertyPage_NoRepositorySelected);
- return label;
- }
- noDefaultAndApplyButton();
-
- composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
- GridData data = new GridData();
- data.widthHint = 350;
- composite.setLayoutData(data);
-
- Label urlLabel = new Label(composite, SWT.NONE);
- urlLabel.setText(ProvAdminUIMessages.RepositoryImplementationPropertyPage_LocationLabel);
- location = new Text(composite, SWT.WRAP | SWT.READ_ONLY);
- location.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label nameLabel = new Label(composite, SWT.NONE);
- nameLabel.setText(ProvAdminUIMessages.RepositoryImplementationPropertyPage_NameLabel);
- name = new Text(composite, SWT.WRAP | SWT.READ_ONLY);
- name.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label nicknameLabel = new Label(composite, SWT.NONE);
- nicknameLabel.setText(ProvAdminUIMessages.RepositoryImplementationPropertyPage_NicknameLabel);
- nickname = new Text(composite, SWT.WRAP | SWT.READ_ONLY);
- nickname.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label descriptionLabel = new Label(composite, SWT.NONE);
- descriptionLabel.setText(ProvAdminUIMessages.RepositoryImplementationPropertyPage_DescriptionLabel);
- data = new GridData();
- data.verticalAlignment = SWT.TOP;
- descriptionLabel.setLayoutData(data);
- description = new Text(composite, SWT.WRAP | SWT.READ_ONLY);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.verticalAlignment = SWT.TOP;
- data.grabExcessVerticalSpace = true;
- description.setLayoutData(data);
- Label propertiesLabel = new Label(composite, SWT.NONE);
- propertiesLabel.setText(ProvAdminUIMessages.RepositoryImplementationPropertyPage_PropertiesLabel);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- propertiesLabel.setLayoutData(data);
-
- propertiesTable = new Table(composite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 2;
- data.grabExcessVerticalSpace = true;
- propertiesTable.setLayoutData(data);
- propertiesTable.setHeaderVisible(true);
- TableColumn nameColumn = new TableColumn(propertiesTable, SWT.NONE);
- nameColumn.setText(ProvAdminUIMessages.RepositoryImplementationPropertyPage_NameColumnLabel);
- TableColumn valueColumn = new TableColumn(propertiesTable, SWT.NONE);
- valueColumn.setText(ProvAdminUIMessages.RepositoryImplementationPropertyPage_ValueColumnLabel);
-
- initializeFields();
- initializeTable();
-
- nameColumn.pack();
- valueColumn.pack();
-
- return composite;
-
- }
-
- private void initializeFields() {
- IRepositoryElement<?> element = getRepositoryElement();
- if (element != null) {
- IRepository<?> repo = getRepositoryElement().getRepository(null);
- location.setText(repo.getLocation().toString());
- String value = repo.getName();
- if (value != null)
- name.setText(value);
- value = repo.getDescription();
- if (value != null)
- description.setText(value);
- String nick = element.getName();
- // Kind of a hack, to avoid figuring out which manager to go to get the
- // nickname. Instead we are just assuming that any name stored in the element that
- // is not location or provider name is the nickname.
- if (!nick.equals(value) && !nick.equals(repo.getLocation().toString()))
- nickname.setText(nick);
- }
- }
-
- private void initializeTable() {
- if (getRepositoryElement() != null) {
- Map<String, String> repoProperties = getRepositoryElement().getRepository(null).getProperties();
- if (repoProperties != null) {
- String[] propNames = repoProperties.keySet().toArray(new String[repoProperties.size()]);
- for (int i = 0; i < propNames.length; i++) {
- TableItem item = new TableItem(propertiesTable, SWT.NULL);
- item.setText(new String[] {propNames[i], repoProperties.get(propNames[i]).toString()});
- }
- }
- }
- }
-
- private IRepositoryElement<?> getRepositoryElement() {
- if (repositoryElement == null) {
- repositoryElement = ProvUI.getAdapter(getElement(), IRepositoryElement.class);
- }
- return repositoryElement;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/messages.properties b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/messages.properties
deleted file mode 100644
index a818c8b06..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/messages.properties
+++ /dev/null
@@ -1,70 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-ProvisioningPrefPage_ShowGroupsOnly=Show only &group IU's in repository views
-ProvisioningPrefPage_ShowInstallRootsOnly=Show only the install &roots in a profile
-ProvisioningPrefPage_HideSystemRepos=Hide &system repositories in repository views
-ProvisioningPrefPage_CollapseIUVersions=Show only the latest &versions of IU's
-ProvisioningPrefPage_UseCategories=Show IUs by &category in repository views
-InstalledIUPropertyPage_NoInfoAvailable=No profile-specific properties are available.
-AddProfileDialog_Title=Add Profile
-AddProfileDialog_OperationLabel=Add Profile
-MetadataRepositoriesView_AddRepositoryLabel=Add repository...
-MetadataRepositoriesView_AddRepositoryTooltip=Add a new metadata repository
-RepositoriesView_RemoveCommandLabel=Remove
-MetadataRepositoriesView_RemoveRepositoryTooltip=Remove the selected metadata repositories
-ArtifactRepositoriesView_AddRepositoryLabel=Add repository...
-ArtifactRepositoriesView_AddRepositoryTooltip=Add a new artifact repository
-ArtifactRepositoriesView_RemoveRepositoryTooltip=Remove the selected artifact repositories
-ProfilesView_AddProfileTooltip=Add a new profile
-ProvView_RefreshCommandTooltip=Refresh the items in the view.
-ProfilesView_AddProfileLabel=Add profile...
-ProfilesView_RemoveProfileLabel=Remove
-ProfilesView_RemoveProfileTooltip=Remove the selected profiles
-AddProfileDialog_DuplicateProfileID=The profile ID is already in use.
-Ops_RemoveProfileOperationLabel=Remove Profiles
-ProfileRootPropertyName=Profile Root
-RepositoryImplementationPropertyPage_DescriptionLabel=Description:
-RepositoryImplementationPropertyPage_LocationLabel=Location:
-RepositoryImplementationPropertyPage_PropertiesLabel=Repository properties:
-RepositoryImplementationPropertyPage_NameColumnLabel=Name
-RepositoryImplementationPropertyPage_NameLabel=Name:
-RepositoryImplementationPropertyPage_NicknameLabel=User nickname:
-RepositoryImplementationPropertyPage_NoRepositorySelected=There was no repository selected
-RepositoryImplementationPropertyPage_ValueColumnLabel=Value
-IUGroup_ID=IU &id:
-IUGroup_Version=&Version:
-No_Property_Item_Selected=There is nothing to show in the properties
-IUGroup_Namespace=&Namespace:
-IUGroup_TouchpointType=&Touchpoint type:
-IUGroup_TouchpointData=Touchpoint &data:
-IUGroup_RequiredCapabilities=&Required capabilities:
-IUGroup_ProvidedCapabilities=&Provided capabilities:
-IUGroup_IU_ID_Required=Must set an IU ID
-IUPropertiesGroup_DescriptionPropertyLabel=Description
-IUPropertiesGroup_NamePropertyLabel=Name
-IUPropertiesGroup_ProviderPropertyLabel=Provider
-ProfileGroup_ID=Profile &id:
-ProfileGroup_Browse=&Browse...
-ProfileGroup_Browse2=B&rowse...
-ProfileGroup_SelectProfileMessage=Select an installation directory:
-ProfileGroup_SelectBundlePoolCache=Select a bundle pool directory:
-ProfileGroup_Name=&Name:
-ProfileGroup_Description=&Description:
-ProfileGroup_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.artifact.optimizers/.classpath b/bundles/org.eclipse.equinox.p2.ui.importexport/.classpath
index 64c5e31b7..64c5e31b7 100644..100755
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.classpath
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/.classpath
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.project b/bundles/org.eclipse.equinox.p2.ui.importexport/.project
index 256472c44..253aaf9e5 100644..100755
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.project
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/.project
@@ -1,39 +1,39 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.frameworkadmin.equinox</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.equinox.p2.importexport</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ds.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.ui.importexport/.settings/org.eclipse.jdt.core.prefs
index c98f1d59f..5e1105ff0 100644..100755
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Tue Dec 22 23:15:07 CET 2009
+#Mon Dec 21 23:16:26 CET 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.builder.cleanOutputFolder=clean
org.eclipse.jdt.core.builder.duplicateResourceTask=warning
diff --git a/bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.ui.importexport/.settings/org.eclipse.jdt.ui.prefs
index 014501b61..014501b61 100644..100755
--- a/bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.ui.prefs
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/.settings/org.eclipse.jdt.ui.prefs
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.ui.importexport/.settings/org.eclipse.pde.core.prefs
index 7913d20db..7913d20db 100644..100755
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.pde.core.prefs
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/.settings/org.eclipse.pde.core.prefs
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ui.importexport/META-INF/MANIFEST.MF
new file mode 100755
index 000000000..2df82a1c5
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/META-INF/MANIFEST.MF
@@ -0,0 +1,38 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.equinox.p2.ui.importexport;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.equinox.p2.ui,
+ org.eclipse.equinox.p2.extensionlocation,
+ org.eclipse.equinox.p2.metadata;bundle-version="2.1.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
+ CDC-1.1/Foundation-1.1
+Bundle-Localization: plugin
+Bundle-ActivationPolicy: lazy
+Import-Package: org.eclipse.equinox.internal.p2.metadata.repository.io,
+ org.eclipse.equinox.internal.p2.persistence,
+ org.eclipse.equinox.internal.p2.ui,
+ org.eclipse.equinox.internal.p2.ui.dialogs,
+ org.eclipse.equinox.internal.p2.ui.model,
+ org.eclipse.equinox.internal.p2.ui.viewers,
+ org.eclipse.equinox.internal.provisional.p2.director,
+ org.eclipse.equinox.p2.core;version="2.0.0",
+ org.eclipse.equinox.p2.engine;version="2.0.0",
+ org.eclipse.equinox.p2.engine.query;version="2.0.0",
+ org.eclipse.equinox.p2.metadata;version="2.0.0",
+ org.eclipse.equinox.p2.operations;version="2.0.0",
+ org.eclipse.equinox.p2.planner;version="2.0.0",
+ org.eclipse.equinox.p2.query;version="2.0.0",
+ org.eclipse.equinox.p2.repository;version="2.0.0",
+ org.eclipse.equinox.p2.repository.artifact;version="2.0.0",
+ org.eclipse.equinox.p2.repository.artifact.spi;version="2.0.0",
+ org.eclipse.equinox.p2.repository.metadata;version="2.0.0",
+ org.eclipse.equinox.p2.repository.metadata.spi;version="2.0.0"
+Service-Component: OSGI-INF/importexport.xml
+Export-Package: org.eclipse.equinox.internal.p2.importexport;version="1.3.0";x-friends:="org.eclipse.equinox.p2.tests",
+ org.eclipse.equinox.internal.p2.importexport.internal;x-friends:="org.eclipse.equinox.p2.tests"
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/OSGI-INF/importexport.xml b/bundles/org.eclipse.equinox.p2.ui.importexport/OSGI-INF/importexport.xml
new file mode 100755
index 000000000..e8b40f21a
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/OSGI-INF/importexport.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="P2 Import and Export">
+ <implementation class="org.eclipse.equinox.internal.p2.importexport.internal.ImportExportImpl"/>
+ <service>
+ <provide interface="org.eclipse.equinox.internal.p2.importexport.P2ImportExport"/>
+ </service>
+ <reference bind="bind" cardinality="1..1" interface="org.eclipse.equinox.p2.core.IProvisioningAgent" name="IProvisioningAgent" policy="static" unbind="unbind"/>
+</scr:component>
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/ProvAdminUI.launch b/bundles/org.eclipse.equinox.p2.ui.importexport/P2 Replication.launch
index 20af33589..f46ec9b58 100644..100755
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/ProvAdminUI.launch
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/P2 Replication.launch
@@ -1,307 +1,429 @@
-<?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="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="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.p2.profile=SDKProfile -Declipse.p2.data.area=file:/Applications/eclipse/p2/"/>
-<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.equinox.ds@1:true,org.eclipse.core.jobs@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.filesystem@default:default,org.eclipse.compare.core@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.ui.views@default:default,org.eclipse.ui.forms@default:default,org.eclipse.text@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.core.databinding@default:default,org.sat4j.pb@default:default,org.eclipse.swt@default:default,org.eclipse.core.resources@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.ant.core@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.equinox.common@2:true,org.eclipse.ui@default:default,org.eclipse.help@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.sat4j.core@default:default,org.eclipse.equinox.security.macosx@default:false,org.eclipse.ecf@default:default,org.eclipse.equinox.security@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.equinox.util@default:default,org.apache.commons.logging@default:default,org.eclipse.osgi.services@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.core.variables@default:default,org.eclipse.swt.cocoa.macosx.x86_64@default:false,com.ibm.icu@default:default,org.eclipse.osgi@-1:true,org.eclipse.jface@default:default,org.eclipse.compare@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.jface.text@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.equinox.app@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.net@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.apache.commons.codec@default:default,org.apache.commons.httpclient@default:default"/>
-<booleanAttribute key="tracing" value="true"/>
-<mapAttribute key="tracingOptions">
-<mapEntry key="org.eclipse.core.runtime/debug/context" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/beginend" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/completion" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/sources" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/indexmanager" value="false"/>
-<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/checkConditions" value="300"/>
-<mapEntry key="org.eclipse.jface.text.source/debug/RevisionRulerColumn" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/contexts" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/updateSequence" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/filename" value="runtime.traces"/>
-<mapEntry key="org.eclipse.jdt.core/debug" value="true"/>
-<mapEntry key="org.eclipse.debug.ui/debug/contextlaunching" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/dirtycaching" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javamodel" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/trace/printHTML" value="false"/>
-<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/createChanges" value="300"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPerspectiveListener" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/debug" value="false"/>
-<mapEntry key="org.eclipse.team.core/refreshjob" value="false"/>
-<mapEntry key="org.eclipse.jface.text/debug/AbstractInformationControlManager" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/installhandler" value="false"/>
-<mapEntry key="org.eclipse.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/infopop" value="false"/>
-<mapEntry key="org.eclipse.pde.core/classpath" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/threading" value="false"/>
-<mapEntry key="org.eclipse.equinox.preferences/general" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.performance" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/operations.verbose" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/activation" value="false"/>
-<mapEntry key="org.eclipse.debug.core/debug/commands" value="false"/>
-<mapEntry key="org.eclipse.team.core/threading" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/workbench.restore" value="30000"/>
-<mapEntry key="org.eclipse.update.core/debug/parsing" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/postaction" value="false"/>
-<mapEntry key="org.eclipse.jdt.apt.core/debug/generatedFileMaps" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/graphics" value="false"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/logsynchronously" value="false"/>
-<mapEntry key="org.eclipse.ecf.identity/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/workingSets" value="false"/>
-<mapEntry key="org.eclipse.osgi/monitor/activation" value="false"/>
-<mapEntry key="org.eclipse.ecf.identity/debug" value="true"/>
-<mapEntry key="org.eclipse.debug.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/buffermanager" value="false"/>
-<mapEntry key="org.eclipse.help.base/debug/search" value="false"/>
-<mapEntry key="org.eclipse.pde.build/debug" value="false"/>
-<mapEntry key="org.eclipse.jface.text/debug/ContentAssistSubjectAdapters" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/search/participants" value="300"/>
-<mapEntry key="org.eclipse.ecf.filetransfer/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/perspective.create" value="800"/>
-<mapEntry key="org.eclipse.update.core/debug/type" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPropertyChangeListener" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/generics" value="false"/>
-<mapEntry key="org.eclipse.ecf.filetransfer/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/requires" value="false"/>
-<mapEntry key="org.eclipse.core.resources/refresh" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/containerinitializer" value="5000"/>
-<mapEntry key="org.eclipse.osgi/profile/benchmark" value="false"/>
-<mapEntry key="org.eclipse.help.webapp/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/ASTProvider" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug" value="false"/>
-<mapEntry key="org.eclipse.ecf.filetransfer/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/contexts.performance" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/metafiles" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/completion" value="300"/>
-<mapEntry key="org.eclipse.osgi/profile/startup" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/save.participants" value="500"/>
-<mapEntry key="org.eclipse.ecf/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.help.base/debug" value="true"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/timing" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/reconcile" value="1000"/>
-<mapEntry key="org.eclipse.ecf.identity/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPageListener" value="false"/>
-<mapEntry key="org.eclipse.core.resources/contenttype/cache" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/locks" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/configuration" value="false"/>
-<mapEntry key="org.eclipse.ecf/debug" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/connect" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.verbose.commandId" value=""/>
-<mapEntry key="org.eclipse.ui.ide/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/profile/debug" value="false"/>
-<mapEntry key="org.eclipse.pde.core/debug" value="true"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPartReference" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/job.stale" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/explorer/createPartControl" value="1300"/>
-<mapEntry key="org.eclipse.jdt.core/debug/hierarchy" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/variableinitializer" value="5000"/>
-<mapEntry key="org.eclipse.ui.ide/debug/internalerror/openDialog" value="false"/>
-<mapEntry key="org.eclipse.core.resources/strings" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/sourcemapper" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/mastertable" value="false"/>
-<mapEntry key="org.eclipse.core.expressions/tracePropertyResolving" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/showHeapStatus" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javadelta" value="false"/>
-<mapEntry key="org.eclipse.core.resources/preferences" value="false"/>
-<mapEntry key="org.eclipse.ecf/debug/flag" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/selection" value="false"/>
-<mapEntry key="org.eclipse.jdt.apt.core/debug" value="false"/>
-<mapEntry key="org.eclipse.ecf.filetransfer/debug/flag" value="true"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/content_assist_sorters/extensions" value=""/>
-<mapEntry key="org.eclipse.jdt.core/debug/javamodel/cache" value="false"/>
-<mapEntry key="org.eclipse.ecf/debug/filter" value="*"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/logfilename" value=""/>
-<mapEntry key="org.eclipse.team.core/backgroundevents" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/keyBindings" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.core/artifacts/mirrors" value="true"/>
-<mapEntry key="org.eclipse.ui/perf/part.activate" value="200"/>
-<mapEntry key="org.eclipse.ecf.filetransfer/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug" value="true"/>
-<mapEntry key="org.eclipse.osgi/debug/security" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/needbuild" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/metainfo" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/swtdebugglobal" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/builders" value="10000"/>
-<mapEntry key="org.eclipse.ui/perf/perspective.listeners" value="200"/>
-<mapEntry key="org.eclipse.ui/debug/showAllJobs" value="false"/>
-<mapEntry key="org.eclipse.core.resources/history" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/search" value="false"/>
-<mapEntry key="org.eclipse.pde.core/validation" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/cvsprotocol" value="true"/>
-<mapEntry key="org.eclipse.jface.text/debug/AnnotationPainter" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/mastertable" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/debug" value="false"/>
-<mapEntry key="org.eclipse.equinox.preferences/set" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/snapshots" value="false"/>
-<mapEntry key="org.eclipse.ecf.filetransfer/debug" value="true"/>
-<mapEntry key="org.eclipse.ui/perf/perspective.switch" value="800"/>
-<mapEntry key="org.eclipse.help.webapp/debug/workingsets" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/bundleTime" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/uses" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/markers" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/workbench.start" value="45000"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachecopy" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/perf/success" value="false"/>
-<mapEntry key="org.eclipse.ecf/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.ecf/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/selection" value="300"/>
-<mapEntry key="org.eclipse.osgi/debug/startlevel" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/wiring" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/snapshot" value="1000"/>
-<mapEntry key="org.eclipse.ui.intro/trace/logPerformance" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/loader" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/contexts.verbose" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/explorer/makeActions" value="1000"/>
-<mapEntry key="org.eclipse.core.resources/save/markers" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin/resolver" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener2" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/operations" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug/markers" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/install" value="false"/>
-<mapEntry key="org.eclipse.equinox.registry/debug/events" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.garbagecollector/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/metainfo" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.core/generator/parsing" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/contentTypes" value="200"/>
-<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser/inprocess" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/javadeltalistener" value="500"/>
-<mapEntry key="org.eclipse.core.resources/perf/listeners" value="500"/>
-<mapEntry key="org.eclipse.ui.intro/flags/noBrowser" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.init" value="800"/>
-<mapEntry key="org.eclipse.core.contenttype/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/imports" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/tree" value="false"/>
-<mapEntry key="org.eclipse.ui.intro.universal/trace/logPerformance" value="false"/>
-<mapEntry key="org.eclipse.help/debug/context" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/manifest" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/multipageeditor" value="false"/>
-<mapEntry key="org.eclipse.jdt.apt.core/debug/generatedFiles" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/needbuildstack" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/swtdebug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ssh/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/failure" value="false"/>
-<mapEntry key="org.eclipse.team.core/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/builder" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/classLoading" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/errorondeadlock" value="false"/>
-<mapEntry key="org.eclipse.core.resources/contenttype" value="false"/>
-<mapEntry key="org.eclipse.jface.text/debug/FastPartitioner/PositionCache" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/compiler" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/events" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/commands" value="false"/>
-<mapEntry key="org.eclipse.equinox.preferences/get" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/ResultCollector" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/launchhistory" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.core/engine/installregistry" value="true"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/model" value="false"/>
-<mapEntry key="org.eclipse.equinox.registry/debug" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/debug" value="true"/>
-<mapEntry key="org.eclipse.ecf.identity/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/cpresolution/advanced" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/converter/debug" value="false"/>
-<mapEntry key="org.eclipse.pde.core/cache" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.core/debug" value="true"/>
-<mapEntry key="org.eclipse.debug.core/debug/events" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.osgi/monitor/classes" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.input" value="200"/>
-<mapEntry key="org.eclipse.ui.intro.universal/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/TypeConstraints" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/messageBundles" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/invoking" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javadelta/verbose" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/tree" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/contributions" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/warning" value="false"/>
-<mapEntry key="org.eclipse.core.resources/natures" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.core/metadata/parsing" value="true"/>
-<mapEntry key="org.eclipse.jdt.core.manipulation/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/cpresolution" value="false"/>
-<mapEntry key="org.eclipse.help/debug/search" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ssh/ssh_protocol" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/stacktrace" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.create" value="800"/>
-<mapEntry key="org.eclipse.ui.intro/trace/logInfo" value="true"/>
-<mapEntry key="org.eclipse.team.core/streams" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug/undomonitor" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/explorer/RefactorActionGroup" value="150"/>
-<mapEntry key="org.eclipse.ui/experimental/menus" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/shutdown" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/packageadmin" value="false"/>
-<mapEntry key="org.eclipse.ecf/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.jdt.apt.core/debug/compilationEnv" 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.update.core/debug/reconciler" value="false"/>
-<mapEntry key="org.eclipse.ecf.identity/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug/gc" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/contentProvider" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/services" value="false"/>
-<mapEntry key="org.eclipse.ui.workbench/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/content_assist/extensions" value="1000"/>
-<mapEntry key="org.eclipse.osgi/debug/filter" value="false"/>
-<mapEntry key="org.eclipse.debug.core/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/zipaccess" value="false"/>
-<mapEntry key="org.eclipse.ui.browser/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/profile/impl" value="org.eclipse.osgi.internal.profile.DefaultProfileLogger"/>
-<mapEntry key="org.eclipse.update.core/debug/web" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/debug" value="false"/>
-<mapEntry key="org.eclipse.help/debug" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/perf" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/filters" value="trace.properties"/>
-<mapEntry key="org.eclipse.ui/perf/part.listeners" value="200"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/viewer" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/keyBindings.verbose" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/buffersize" value="256"/>
-<mapEntry key="org.eclipse.ui/perf/page.listeners" value="200"/>
-<mapEntry key="org.eclipse.team.cvs.core/syncchangeevents" value="false"/>
-<mapEntry key="org.eclipse.jdt.apt.pluggable.core/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.verbose" value="false"/>
-<mapEntry key="org.eclipse.ecf.filetransfer/debug/filter" value="*"/>
-<mapEntry key="org.eclipse.osgi/monitor/resources" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.control" value="800"/>
-<mapEntry key="org.eclipse.ui/perf/uijob" value="200"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachelookup" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener2" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/delta" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.core/core/parseproblems" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/interrupt" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/preferences/plugin" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/cycles" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/resolution" value="false"/>
-<mapEntry key="org.eclipse.update.configurator/debug" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/deltas" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/location" value="false"/>
-<mapEntry key="org.eclipse.ui.intro.universal/trace/logInfo" value="true"/>
-</mapAttribute>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="false"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.artifact.optimizers@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,ie.wombat.jbdiff@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.p2.ui.admin@default:default,org.eclipse.equinox.frameworkadmin.equinox@2:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@3:true,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.artifact.processors@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.ui.admin.rcp@default:default,org.eclipse.equinox.p2.sar@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.frameworkadmin@2:true,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.ui@default:default"/>
-</launchConfiguration>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="true"/>
+<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/P2 Replication"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="generateProfile" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/runtime-New_configuration"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-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.p2.profile=SDKProfile&#13;&#10;-Declipse.p2.data.area=${target_home}/p2"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<mapAttribute key="tracingOptions">
+<mapEntry key="org.eclipse.cdt.core/debug" value="true"/>
+<mapEntry key="org.eclipse.cdt.core/debug/ASTCache" value="false"/>
+<mapEntry key="org.eclipse.cdt.core/debug/deltaprocessor" value="false"/>
+<mapEntry key="org.eclipse.cdt.core/debug/formatter" value="false"/>
+<mapEntry key="org.eclipse.cdt.core/debug/index/locks" value="false"/>
+<mapEntry key="org.eclipse.cdt.core/debug/indexer/activity" value="false"/>
+<mapEntry key="org.eclipse.cdt.core/debug/indexer/problems" value="false"/>
+<mapEntry key="org.eclipse.cdt.core/debug/indexer/problems/inclusion" value="false"/>
+<mapEntry key="org.eclipse.cdt.core/debug/indexer/problems/scanner" value="false"/>
+<mapEntry key="org.eclipse.cdt.core/debug/indexer/problems/syntax" value="false"/>
+<mapEntry key="org.eclipse.cdt.core/debug/indexer/statistics" value="false"/>
+<mapEntry key="org.eclipse.cdt.core/debug/matchlocator" value="false"/>
+<mapEntry key="org.eclipse.cdt.core/debug/model" value="false"/>
+<mapEntry key="org.eclipse.cdt.core/debug/parser" value="false"/>
+<mapEntry key="org.eclipse.cdt.core/debug/parser/exceptions" value="false"/>
+<mapEntry key="org.eclipse.cdt.core/debug/scanner" value="false"/>
+<mapEntry key="org.eclipse.cdt.core/debug/search" value="false"/>
+<mapEntry key="org.eclipse.cdt.core/debug/typeresolver" value="false"/>
+<mapEntry key="org.eclipse.cdt.debug.mi.core/debug" value="true"/>
+<mapEntry key="org.eclipse.cdt.dsf.gdb/debug" value="false"/>
+<mapEntry key="org.eclipse.cdt.dsf.ui/debug" value="false"/>
+<mapEntry key="org.eclipse.cdt.dsf.ui/debug/disassembly" value="false"/>
+<mapEntry key="org.eclipse.cdt.dsf.ui/debug/stepping" value="false"/>
+<mapEntry key="org.eclipse.cdt.dsf.ui/debug/vm/atomicUpdate" value="false"/>
+<mapEntry key="org.eclipse.cdt.dsf.ui/debug/vm/cache" value="false"/>
+<mapEntry key="org.eclipse.cdt.dsf.ui/debug/vm/contentProvider" value="false"/>
+<mapEntry key="org.eclipse.cdt.dsf.ui/debug/vm/delta" value="false"/>
+<mapEntry key="org.eclipse.cdt.dsf.ui/debug/vm/presentationId" value=""/>
+<mapEntry key="org.eclipse.cdt.dsf/debug" value="false"/>
+<mapEntry key="org.eclipse.cdt.dsf/debug/executor" value="false"/>
+<mapEntry key="org.eclipse.cdt.dsf/debug/executorName" value=""/>
+<mapEntry key="org.eclipse.cdt.ui/debug" value="true"/>
+<mapEntry key="org.eclipse.cdt.ui/debug/SemanticHighlighting" value="false"/>
+<mapEntry key="org.eclipse.cdt.ui/debug/contentassist" value="false"/>
+<mapEntry key="org.eclipse.cdt.ui/debug/folding" value="false"/>
+<mapEntry key="org.eclipse.core.contenttype/debug" value="false"/>
+<mapEntry key="org.eclipse.core.expressions/debug/TypeExtensionManager" value="false"/>
+<mapEntry key="org.eclipse.core.expressions/tracePropertyResolving" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs/beginend" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs/errorondeadlock" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs/locks" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs/shutdown" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs/timing" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/delta" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/failure" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/interrupt" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/invoking" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/needbuild" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/needbuildstack" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/stacktrace" value="false"/>
+<mapEntry key="org.eclipse.core.resources/contenttype" value="false"/>
+<mapEntry key="org.eclipse.core.resources/contenttype/cache" value="false"/>
+<mapEntry key="org.eclipse.core.resources/debug" value="false"/>
+<mapEntry key="org.eclipse.core.resources/history" value="false"/>
+<mapEntry key="org.eclipse.core.resources/natures" value="false"/>
+<mapEntry key="org.eclipse.core.resources/perf/builders" value="10000"/>
+<mapEntry key="org.eclipse.core.resources/perf/listeners" value="500"/>
+<mapEntry key="org.eclipse.core.resources/perf/save.participants" value="500"/>
+<mapEntry key="org.eclipse.core.resources/perf/snapshot" value="1000"/>
+<mapEntry key="org.eclipse.core.resources/preferences" value="false"/>
+<mapEntry key="org.eclipse.core.resources/refresh" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/markers" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/mastertable" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/metainfo" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/snapshots" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/syncinfo" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/tree" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save/markers" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save/mastertable" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save/metainfo" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save/syncinfo" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save/tree" value="false"/>
+<mapEntry key="org.eclipse.core.resources/strings" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/compatibility/debug" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/debug" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/debug/context" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/perf" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/perf/success" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/preferences/plugin" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/url/debug" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/url/debug/cachecopy" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/url/debug/cachelookup" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/url/debug/connect" value="false"/>
+<mapEntry key="org.eclipse.debug.core/debug" value="false"/>
+<mapEntry key="org.eclipse.debug.core/debug/commands" value="false"/>
+<mapEntry key="org.eclipse.debug.core/debug/events" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/breadcrumb" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/contextlaunching" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/launchhistory" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/contentProvider" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/deltas" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/model" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/presentationId" value=""/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/stateSaveRestore" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/updateSequence" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/viewer" value="false"/>
+<mapEntry key="org.eclipse.equinox.ds/debug" value="false"/>
+<mapEntry key="org.eclipse.equinox.ds/instantiate_all" value="false"/>
+<mapEntry key="org.eclipse.equinox.ds/performance" value="true"/>
+<mapEntry key="org.eclipse.equinox.ds/print_on_console" value="true"/>
+<mapEntry key="org.eclipse.equinox.p2.engine/engine/debug" value="false"/>
+<mapEntry key="org.eclipse.equinox.p2.engine/enginesession/debug" value="false"/>
+<mapEntry key="org.eclipse.equinox.p2.engine/profileregistry/debug" value="false"/>
+<mapEntry key="org.eclipse.equinox.preferences/general" value="false"/>
+<mapEntry key="org.eclipse.equinox.preferences/get" value="false"/>
+<mapEntry key="org.eclipse.equinox.preferences/set" value="false"/>
+<mapEntry key="org.eclipse.equinox.registry/debug" value="false"/>
+<mapEntry key="org.eclipse.equinox.registry/debug/events" value="false"/>
+<mapEntry key="org.eclipse.equinox.security.ui/debug" value="false"/>
+<mapEntry key="org.eclipse.equinox.security.ui/debug/storage" value="false"/>
+<mapEntry key="org.eclipse.equinox.security/debug" value="false"/>
+<mapEntry key="org.eclipse.equinox.security/debug/loginFramework" value="false"/>
+<mapEntry key="org.eclipse.help.ui/debug" value="true"/>
+<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser" value="false"/>
+<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser/inprocess" value="false"/>
+<mapEntry key="org.eclipse.help.ui/debug/infopop" value="false"/>
+<mapEntry key="org.eclipse.help.webapp/debug" value="true"/>
+<mapEntry key="org.eclipse.help.webapp/debug/workingsets" value="false"/>
+<mapEntry key="org.eclipse.help/debug" value="true"/>
+<mapEntry key="org.eclipse.help/debug/context" value="false"/>
+<mapEntry key="org.eclipse.help/debug/search" value="false"/>
+<mapEntry key="org.eclipse.help/debug/toc" value="false"/>
+<mapEntry key="org.eclipse.jdt.apt.core/debug" value="false"/>
+<mapEntry key="org.eclipse.jdt.apt.core/debug/compilationEnv" value="false"/>
+<mapEntry key="org.eclipse.jdt.apt.core/debug/generatedFileMaps" value="false"/>
+<mapEntry key="org.eclipse.jdt.apt.core/debug/generatedFiles" value="false"/>
+<mapEntry key="org.eclipse.jdt.apt.pluggable.core/debug" value="false"/>
+<mapEntry key="org.eclipse.jdt.core.manipulation/debug" value="true"/>
+<mapEntry key="org.eclipse.jdt.core/debug" value="true"/>
+<mapEntry key="org.eclipse.jdt.core/debug/buffermanager" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/builder" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/builder/stats" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/compiler" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/completion" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/cpresolution" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/cpresolution/advanced" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/cpresolution/failure" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/formatter" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/hierarchy" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/indexmanager" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/indexmanager/advanced" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/javadelta" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/javadelta/verbose" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/javamodel" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/javamodel/cache" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/postaction" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/resolution" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/search" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/selection" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/sourcemapper" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/zipaccess" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/perf/completion" value="300"/>
+<mapEntry key="org.eclipse.jdt.core/perf/containerinitializer" value="5000"/>
+<mapEntry key="org.eclipse.jdt.core/perf/javadeltalistener" value="500"/>
+<mapEntry key="org.eclipse.jdt.core/perf/reconcile" value="1000"/>
+<mapEntry key="org.eclipse.jdt.core/perf/selection" value="300"/>
+<mapEntry key="org.eclipse.jdt.core/perf/variableinitializer" value="5000"/>
+<mapEntry key="org.eclipse.jdt.ui/debug" value="true"/>
+<mapEntry key="org.eclipse.jdt.ui/debug/ASTProvider" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/debug/BreadcrumbItemDropDown" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/debug/ResultCollector" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/debug/TypeConstraints" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/content_assist/extensions" value="1000"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/content_assist_sorters/extensions" value=""/>
+<mapEntry key="org.eclipse.jdt.ui/perf/explorer/RefactorActionGroup" value="150"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/explorer/createPartControl" value="1300"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/explorer/makeActions" value="1000"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/search/participants" value="300"/>
+<mapEntry key="org.eclipse.jem.util/debug/loglevel" value="WARNING"/>
+<mapEntry key="org.eclipse.jem.util/debug/logtrace" value="false"/>
+<mapEntry key="org.eclipse.jem.util/debug/logtracefile" value="false"/>
+<mapEntry key="org.eclipse.jface.text.source/debug/RevisionRulerColumn" value="false"/>
+<mapEntry key="org.eclipse.jface.text/assert/TextSelection/validConstructorArguments" value="false"/>
+<mapEntry key="org.eclipse.jface.text/debug/AbstractInformationControlManager" value="false"/>
+<mapEntry key="org.eclipse.jface.text/debug/AnnotationPainter" value="false"/>
+<mapEntry key="org.eclipse.jface.text/debug/ContentAssistSubjectAdapters" value="false"/>
+<mapEntry key="org.eclipse.jface.text/debug/FastPartitioner/PositionCache" value="false"/>
+<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/checkConditions" value="300"/>
+<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/createChanges" value="300"/>
+<mapEntry key="org.eclipse.osgi/debug" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/bundleTime" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/events" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/filter" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/loader" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/manifest" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/messageBundles" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/packageadmin" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/security" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/services" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/startlevel" value="false"/>
+<mapEntry key="org.eclipse.osgi/defaultprofile/buffersize" value="256"/>
+<mapEntry key="org.eclipse.osgi/defaultprofile/logfilename" value=""/>
+<mapEntry key="org.eclipse.osgi/defaultprofile/logsynchronously" value="false"/>
+<mapEntry key="org.eclipse.osgi/eclipseadaptor/converter/debug" value="false"/>
+<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug" value="false"/>
+<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/location" value="false"/>
+<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin" value="false"/>
+<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin/resolver" value="false"/>
+<mapEntry key="org.eclipse.osgi/monitor/activation" value="false"/>
+<mapEntry key="org.eclipse.osgi/monitor/classes" value="false"/>
+<mapEntry key="org.eclipse.osgi/monitor/resources" value="false"/>
+<mapEntry key="org.eclipse.osgi/profile/benchmark" value="false"/>
+<mapEntry key="org.eclipse.osgi/profile/debug" value="false"/>
+<mapEntry key="org.eclipse.osgi/profile/impl" value="org.eclipse.osgi.internal.profile.DefaultProfileLogger"/>
+<mapEntry key="org.eclipse.osgi/profile/startup" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/cycles" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/debug" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/generics" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/imports" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/requires" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/uses" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/wiring" value="false"/>
+<mapEntry key="org.eclipse.osgi/trace/activation" value="false"/>
+<mapEntry key="org.eclipse.osgi/trace/classLoading" value="false"/>
+<mapEntry key="org.eclipse.osgi/trace/filename" value="runtime.traces"/>
+<mapEntry key="org.eclipse.osgi/trace/filters" value="trace.properties"/>
+<mapEntry key="org.eclipse.pde.build/debug" value="false"/>
+<mapEntry key="org.eclipse.pde.core/cache" value="false"/>
+<mapEntry key="org.eclipse.pde.core/classpath" value="false"/>
+<mapEntry key="org.eclipse.pde.core/debug" value="true"/>
+<mapEntry key="org.eclipse.pde.core/validation" value="false"/>
+<mapEntry key="org.eclipse.team.core/backgroundevents" value="false"/>
+<mapEntry key="org.eclipse.team.core/debug" value="false"/>
+<mapEntry key="org.eclipse.team.core/refreshjob" value="false"/>
+<mapEntry key="org.eclipse.team.core/streams" value="false"/>
+<mapEntry key="org.eclipse.team.core/threading" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.core/cvsprotocol" value="true"/>
+<mapEntry key="org.eclipse.team.cvs.core/debug" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.core/dirtycaching" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.core/metafiles" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.core/syncchangeevents" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.core/threading" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.ssh/debug" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.ssh/ssh_protocol" value="false"/>
+<mapEntry key="org.eclipse.ui.browser/debug" value="false"/>
+<mapEntry key="org.eclipse.ui.ide/debug" value="false"/>
+<mapEntry key="org.eclipse.ui.ide/debug/gc" value="false"/>
+<mapEntry key="org.eclipse.ui.ide/debug/internalerror/openDialog" value="false"/>
+<mapEntry key="org.eclipse.ui.ide/debug/markers" value="false"/>
+<mapEntry key="org.eclipse.ui.ide/debug/undomonitor" value="false"/>
+<mapEntry key="org.eclipse.ui.intro.universal/debug" value="true"/>
+<mapEntry key="org.eclipse.ui.intro.universal/trace/logInfo" value="true"/>
+<mapEntry key="org.eclipse.ui.intro.universal/trace/logPerformance" value="false"/>
+<mapEntry key="org.eclipse.ui.intro/debug" value="true"/>
+<mapEntry key="org.eclipse.ui.intro/debug/toolbar" value="false"/>
+<mapEntry key="org.eclipse.ui.intro/flags/noBrowser" value="false"/>
+<mapEntry key="org.eclipse.ui.intro/trace/logInfo" value="true"/>
+<mapEntry key="org.eclipse.ui.intro/trace/logPerformance" value="false"/>
+<mapEntry key="org.eclipse.ui.intro/trace/printHTML" value="false"/>
+<mapEntry key="org.eclipse.ui.navigator/debug" value="false"/>
+<mapEntry key="org.eclipse.ui.navigator/debug/dnd" value="false"/>
+<mapEntry key="org.eclipse.ui.navigator/debug/resolution" value="false"/>
+<mapEntry key="org.eclipse.ui.navigator/debug/setup" value="false"/>
+<mapEntry key="org.eclipse.ui.navigator/debug/sort" value="false"/>
+<mapEntry key="org.eclipse.ui.navigator/debug/viewermap" value="false"/>
+<mapEntry key="org.eclipse.ui.navigator/perf/explorer/createPartControl" value="1300"/>
+<mapEntry key="org.eclipse.ui.workbench/debug" value="false"/>
+<mapEntry key="org.eclipse.ui/debug" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/contributions" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/declaredImages" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/job.stale" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/showAllJobs" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/swtdebug" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/swtdebugglobal" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/workingSets" value="false"/>
+<mapEntry key="org.eclipse.ui/experimental/menus" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener2" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPropertyChangeListener" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPartReference" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPageListener" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener2" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPerspectiveListener" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/contentTypes" value="200"/>
+<mapEntry key="org.eclipse.ui/perf/page.listeners" value="200"/>
+<mapEntry key="org.eclipse.ui/perf/part.activate" value="200"/>
+<mapEntry key="org.eclipse.ui/perf/part.control" value="800"/>
+<mapEntry key="org.eclipse.ui/perf/part.create" value="800"/>
+<mapEntry key="org.eclipse.ui/perf/part.init" value="800"/>
+<mapEntry key="org.eclipse.ui/perf/part.input" value="200"/>
+<mapEntry key="org.eclipse.ui/perf/part.listeners" value="200"/>
+<mapEntry key="org.eclipse.ui/perf/perspective.create" value="800"/>
+<mapEntry key="org.eclipse.ui/perf/perspective.listeners" value="200"/>
+<mapEntry key="org.eclipse.ui/perf/perspective.switch" value="800"/>
+<mapEntry key="org.eclipse.ui/perf/showHeapStatus" value="true"/>
+<mapEntry key="org.eclipse.ui/perf/uijob" value="200"/>
+<mapEntry key="org.eclipse.ui/perf/workbench.restore" value="30000"/>
+<mapEntry key="org.eclipse.ui/perf/workbench.start" value="45000"/>
+<mapEntry key="org.eclipse.ui/trace/commands" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/contexts" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/contexts.performance" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/contexts.verbose" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/graphics" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/handlers" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/handlers.performance" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/handlers.verbose" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/handlers.verbose.commandId" value=""/>
+<mapEntry key="org.eclipse.ui/trace/keyBindings" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/keyBindings.verbose" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/multipageeditor" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/operations" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/operations.verbose" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/sources" value="false"/>
+<mapEntry key="org.eclipse.update.configurator/debug" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug" value="true"/>
+<mapEntry key="org.eclipse.update.core/debug/configuration" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/install" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/installhandler" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/parsing" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/reconciler" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/type" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/warning" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/web" value="false"/>
+<mapEntry key="org.eclipse.wst.common.environment/debug" value="true"/>
+<mapEntry key="org.eclipse.wst.common.environment/trace/command" value="true"/>
+<mapEntry key="org.eclipse.wst.common.environment/trace/data" value="true"/>
+<mapEntry key="org.eclipse.wst.common.environment/trace/emitter" value="true"/>
+<mapEntry key="org.eclipse.wst.common.environment/trace/error" value="true"/>
+<mapEntry key="org.eclipse.wst.common.environment/trace/info" value="true"/>
+<mapEntry key="org.eclipse.wst.common.environment/trace/warning" value="true"/>
+<mapEntry key="org.eclipse.wst.common.environment/trace/ws_ant" value="true"/>
+<mapEntry key="org.eclipse.wst.common.environment/trace/ws_dt_cmd_engine" value="true"/>
+<mapEntry key="org.eclipse.wst.common.environment/trace/ws_framework" value="true"/>
+<mapEntry key="org.eclipse.wst.common.project.facet.core/actionSorting" value="false"/>
+<mapEntry key="org.eclipse.wst.common.project.facet.core/activation" value="false"/>
+<mapEntry key="org.eclipse.wst.common.project.facet.core/delegate/calls" value="false"/>
+<mapEntry key="org.eclipse.wst.common.project.facet.core/events/project" value="false"/>
+<mapEntry key="org.eclipse.wst.common.project.facet.core/events/project/stacktrace" value="false"/>
+<mapEntry key="org.eclipse.wst.dtd.ui/projectionperf" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.core/debug" value="true"/>
+<mapEntry key="org.eclipse.wst.sse.core/dom/adapter/notification/time" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.core/dom/adapter/notification/time/criteria" value="10"/>
+<mapEntry key="org.eclipse.wst.sse.core/filebuffers/leaks" value="true"/>
+<mapEntry key="org.eclipse.wst.sse.core/filebuffers/lifecycle" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.core/filebuffers/modelmanagement" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.core/format" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.core/structureddocument" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.core/structuredmodel/lifecycle" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.core/structuredmodel/locks" value="true"/>
+<mapEntry key="org.eclipse.wst.sse.core/structuredmodel/modelmanager" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.core/structuredmodel/state" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.core/tasks" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.core/tasks/detection" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.core/tasks/job" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.core/tasks/overalltime" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.core/tasks/preferences" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.core/tasks/registry" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.core/tasks/time" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/actioncontributor/debugstatusfields" value="true"/>
+<mapEntry key="org.eclipse.wst.sse.ui/contentOutline" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/debug" value="true"/>
+<mapEntry key="org.eclipse.wst.sse.ui/debug/reconcilerSpelling" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/debug/reconcilerSpelling/showProblems" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/debug/reconcilerValidators" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/debug/reconcilerjob" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/debug/tracefilter" value=""/>
+<mapEntry key="org.eclipse.wst.sse.ui/extendedconfigurationbuilder" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/extendedconfigurationbuilder/time" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/extendededitoractionbuilder" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/extendededitoractionbuilder/contributetime" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/extendededitoractionbuilder/debugmenu" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/extendededitoractionbuilder/debugpopup" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/extendededitoractionbuilder/debugtoolbar" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/extendededitoractionbuilder/readtime" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/filemodelprovider/lifecyclelistener" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/filemodelprovider/modelstatelistener" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/filemodelprovider/operations" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/gotoNextAnnotation" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/preferences-properties" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/propertyChangeUpdateActionContributionItem" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/propertySheet" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/storagemodelprovider/elementstatelistener" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/storagemodelprovider/operations" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/structuredPresentationReconciler" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/structuredPresentationReconciler/time" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/transferbuilder/time" value="false"/>
+<mapEntry key="org.eclipse.wst.validation/debug" value="true"/>
+<mapEntry key="org.eclipse.wst.validation/extraValDetail" value=""/>
+<mapEntry key="org.eclipse.wst.validation/filter/allExcept" value=""/>
+<mapEntry key="org.eclipse.wst.validation/timings" value="false"/>
+<mapEntry key="org.eclipse.wst.validation/timings/tracefile" value=""/>
+<mapEntry key="org.eclipse.wst.validation/timings/useDoubles" value="false"/>
+<mapEntry key="org.eclipse.wst.validation/trace/level" value=""/>
+<mapEntry key="org.eclipse.wst.validation/v1" value="false"/>
+<mapEntry key="org.eclipse.wst.xml.core/debug" value="true"/>
+<mapEntry key="org.eclipse.wst.xml.core/debug/cmdocumentcache" value="false"/>
+<mapEntry key="org.eclipse.wst.xml.core/debug/cmdocumentmanager" value="false"/>
+<mapEntry key="org.eclipse.wst.xml.core/debug/tracefilter" value=""/>
+<mapEntry key="org.eclipse.wst.xml.ui/projectionperf" value="false"/>
+<mapEntry key="org.eclipse.wtp.common/debug/loglevel" value="WARNING"/>
+<mapEntry key="org.eclipse.wtp.common/debug/logtrace" value="false"/>
+<mapEntry key="org.eclipse.wtp.common/debug/logtracefile" value="false"/>
+</mapAttribute>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<booleanAttribute key="useProduct" value="true"/>
+<booleanAttribute key="usefeatures" value="false"/>
+</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/build.properties b/bundles/org.eclipse.equinox.p2.ui.importexport/build.properties
index db8ea728e..b36b763b9 100644..100755
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/build.properties
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/build.properties
@@ -1,8 +1,8 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
- about.html,\
+ plugin.xml,\
+ OSGI-INF/importexport.xml,\
plugin.properties,\
- OSGI-INF/
-src.includes = about.html
+ icons/
source.. = src/
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/icons/install_wiz.gif b/bundles/org.eclipse.equinox.p2.ui.importexport/icons/install_wiz.gif
new file mode 100644
index 000000000..7eee7c3a7
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/icons/install_wiz.gif
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/plugin.properties b/bundles/org.eclipse.equinox.p2.ui.importexport/plugin.properties
new file mode 100755
index 000000000..bf4b99ab6
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/plugin.properties
@@ -0,0 +1,9 @@
+pluginName=p2 import and export
+providerName=Eclipse.org - Equinox
+category.name=p2
+export.name=Installed Software items to file
+import.name=Install Software items from file
+importfrominstallation.name=From existing installation
+export.description=Export the list of your installed software to the local file system.
+import.description=Install a set of software from the local file system.
+importfrominstance.description=Install a batch of software from another eclipse instance. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/plugin.xml b/bundles/org.eclipse.equinox.p2.ui.importexport/plugin.xml
new file mode 100755
index 000000000..5422402cd
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/plugin.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.exportWizards">
+ <category
+ id="org.eclipse.equinox.p2.category"
+ name="%category.name">
+ </category>
+ <wizard
+ category="org.eclipse.equinox.p2.category"
+ class="org.eclipse.equinox.internal.p2.importexport.internal.wizard.ExportWizard"
+ icon="icons/install_wiz.gif"
+ id="org.eclipse.equinox.p2.replication.export"
+ name="%export.name">
+ <description>
+ %export.description
+ </description>
+ </wizard>
+ </extension>
+ <extension
+ point="org.eclipse.ui.importWizards">
+ <category
+ id="org.eclipse.equinox.p2.category"
+ name="%category.name">
+ </category>
+ <wizard
+ category="org.eclipse.equinox.p2.category"
+ class="org.eclipse.equinox.internal.p2.importexport.internal.wizard.ImportWizard"
+ icon="icons/install_wiz.gif"
+ id="org.eclipse.equinox.p2.replication.import"
+ name="%import.name">
+ <description>
+ %importfrominstance.description
+ </description>
+ </wizard>
+ <wizard
+ category="org.eclipse.equinox.p2.category"
+ class="org.eclipse.equinox.internal.p2.importexport.internal.wizard.ImportFromInstallationWizard"
+ icon="icons/install_wiz.gif"
+ id="org.eclipse.equinox.p2.replication.importfrominstallation"
+ name="%importfrominstallation.name">
+ <description>
+ %import.description
+ </description>
+ </wizard>
+ </extension>
+
+</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/pom.xml b/bundles/org.eclipse.equinox.p2.ui.importexport/pom.xml
index 85e7d1869..fa53b1e34 100644
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/pom.xml
@@ -8,7 +8,7 @@
<version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
</parent>
<groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.tests.verifier</artifactId>
+ <artifactId>org.eclipse.equinox.p2.ui.importexport</artifactId>
<version>1.0.0.qualifier</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/IUDetail.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/IUDetail.java
new file mode 100644
index 000000000..18f37352e
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/IUDetail.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2011 WindRiver Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * WindRiver Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.importexport;
+
+import java.net.URI;
+import java.util.List;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+
+public class IUDetail implements IAdaptable{
+
+ private final IInstallableUnit iu;
+ private final List<URI> referredRepo;
+
+ public IUDetail(IInstallableUnit iu, List<URI> uris) {
+ this.iu = iu;
+ referredRepo = uris;
+ }
+
+ public IInstallableUnit getIU() {
+ return iu;
+ }
+
+ public List<URI> getReferencedRepositories() {
+ return referredRepo;
+ }
+
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+ if (IInstallableUnit.class.equals(adapter))
+ return iu;
+ return null;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj instanceof IUDetail) {
+ if (iu.equals(((IUDetail)obj).getIU()))
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return iu.hashCode();
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/P2ImportExport.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/P2ImportExport.java
new file mode 100755
index 000000000..12175f4c2
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/P2ImportExport.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2011 WindRiver Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * WindRiver Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.importexport;
+
+import java.io.*;
+import java.util.List;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+
+public interface P2ImportExport {
+ List<IUDetail> importP2F(InputStream input) throws IOException;
+
+ IStatus exportP2F(OutputStream output, IInstallableUnit[] ius, IProgressMonitor monitor);
+
+ IStatus exportP2F(OutputStream output, List<IUDetail> ius, IProgressMonitor monitor);
+}
diff --git a/bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLFactory.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/Constants.java
index b87c00959..558afa1c5 100644..100755
--- a/bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLFactory.java
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/Constants.java
@@ -1,21 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
+ * Copyright (c) 2011 WindRiver Corporation and others.
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms 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
+ * WindRiver Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.equinox.p2.ql;
+package org.eclipse.equinox.internal.p2.importexport.internal;
-import org.eclipse.equinox.p2.metadata.expression.IExpressionFactory;
-
-/**
- * This interface provides all the factory methods needed to create the all possible
- * nodes of the expression tree.
- */
-public interface IQLFactory extends IExpressionFactory {
- //
+public interface Constants {
+ public final static String Bundle_ID = "org.eclipse.equinox.p2.ui.importexport"; //$NON-NLS-1$
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/ImportExportImpl.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/ImportExportImpl.java
new file mode 100755
index 000000000..8b72bc642
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/ImportExportImpl.java
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * Copyright (c) 2011 WindRiver Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * WindRiver Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.importexport.internal;
+
+import java.io.*;
+import java.net.URI;
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.importexport.IUDetail;
+import org.eclipse.equinox.internal.p2.importexport.P2ImportExport;
+import org.eclipse.equinox.internal.p2.importexport.persistence.P2FParser;
+import org.eclipse.equinox.internal.p2.importexport.persistence.P2FWriter;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.osgi.util.NLS;
+
+public class ImportExportImpl implements P2ImportExport {
+
+ private static final String SCHEME_FILE = "file"; //$NON-NLS-1$
+ public static final int IGNORE_LOCAL_REPOSITORY = 1;
+ public static final int CANNOT_FIND_REPOSITORY = 2;
+
+ private IProvisioningAgent agent = null;
+
+ public void bind(IProvisioningAgent agt) {
+ this.agent = agt;
+ }
+
+ public void unbind(IProvisioningAgent agt) {
+ if (this.agent == agt) {
+ this.agent = null;
+ }
+ }
+
+ public List<IUDetail> importP2F(InputStream input) throws IOException {
+ P2FParser parser = new P2FParser(Platform.getBundle(Constants.Bundle_ID).getBundleContext(), Constants.Bundle_ID);
+ parser.parse(input);
+ return parser.getIUs();
+ }
+
+ public IStatus exportP2F(OutputStream output, IInstallableUnit[] ius, IProgressMonitor monitor) {
+ if (monitor == null)
+ monitor = new NullProgressMonitor();
+ SubMonitor subMonitor = SubMonitor.convert(monitor, Messages.Replicator_ExportJobName, 1000);
+ IMetadataRepositoryManager repoManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+ URI[] uris = repoManager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
+ Arrays.sort(uris, new Comparator<URI>() {
+ public int compare(URI o1, URI o2) {
+ String scheme1 = o1.getScheme();
+ String scheme2 = o2.getScheme();
+ if (scheme1.equals(scheme2))
+ return 0;
+ if (SCHEME_FILE.equals(scheme1)) {
+ return 1;
+ } else if (SCHEME_FILE.equals(scheme2)) {
+ return -1;
+ }
+ return 0;
+ }
+ });
+ List<IMetadataRepository> repos = new ArrayList<IMetadataRepository>(uris.length);
+ for (URI uri : uris) {
+ try {
+ IMetadataRepository repo = repoManager.loadRepository(uri, subMonitor.newChild(500 / uris.length, SubMonitor.SUPPRESS_ALL_LABELS));
+ repos.add(repo);
+ } catch (ProvisionException e) {
+ // ignore
+ }
+ }
+ subMonitor.setWorkRemaining(500);
+ List<IUDetail> features = new ArrayList<IUDetail>(ius.length);
+ SubMonitor sub2 = subMonitor.newChild(450, SubMonitor.SUPPRESS_ALL_LABELS);
+ sub2.setWorkRemaining(ius.length * 100);
+ MultiStatus queryRepoResult = new MultiStatus(Constants.Bundle_ID, 0, null, null);
+ for (IInstallableUnit iu : ius) {
+ List<URI> referredRepos = new ArrayList<URI>(1);
+ if (sub2.isCanceled())
+ throw new OperationCanceledException();
+ SubMonitor sub3 = sub2.newChild(100);
+ sub3.setWorkRemaining(repos.size() * 100);
+ for (IMetadataRepository repo : repos) {
+ if (SCHEME_FILE.equals(repo.getLocation().getScheme()) && referredRepos.size() > 0)
+ break;
+ IQueryResult<IInstallableUnit> result = repo.query(QueryUtil.createIUQuery(iu.getId(), new VersionRange(iu.getVersion(), true, null, true)), sub3.newChild(100));
+ if (!result.isEmpty())
+ referredRepos.add(repo.getLocation());
+ }
+ sub3.setWorkRemaining(1).worked(1);
+ if (referredRepos.size() == 0) {
+ queryRepoResult.add(new Status(IStatus.WARNING, Constants.Bundle_ID, CANNOT_FIND_REPOSITORY, NLS.bind(Messages.Replicator_NotFoundInRepository, iu.getProperty(IInstallableUnit.PROP_NAME, Locale.getDefault().toString())), null));
+ } else {
+ if (SCHEME_FILE.equals(referredRepos.get(0).getScheme()))
+ queryRepoResult.add(new Status(IStatus.INFO, Constants.Bundle_ID, IGNORE_LOCAL_REPOSITORY, NLS.bind(Messages.Replicator_InstallFromLocal, iu.getProperty(IInstallableUnit.PROP_NAME, Locale.getDefault().toString())), null));
+ else {
+ IUDetail feature = new IUDetail(iu, referredRepos);
+ features.add(feature);
+ }
+ }
+ }
+ subMonitor.setWorkRemaining(50);
+ IStatus status = exportP2F(output, features, subMonitor);
+ if (status.isOK() && queryRepoResult.isOK())
+ return status;
+ MultiStatus rt = new MultiStatus(Constants.Bundle_ID, 0, new IStatus[] {queryRepoResult, status}, null, null);
+ return rt;
+ }
+
+ public IStatus exportP2F(OutputStream output, List<IUDetail> features, IProgressMonitor monitor) {
+ if (monitor == null)
+ monitor = new NullProgressMonitor();
+ SubMonitor sub = SubMonitor.convert(monitor, Messages.Replicator_SaveJobName, 100);
+ if (sub.isCanceled())
+ throw new OperationCanceledException();
+ try {
+ P2FWriter writer = new P2FWriter(output, null);
+ writer.write(features);
+ return Status.OK_STATUS;
+ } catch (UnsupportedEncodingException e) {
+ return new Status(IStatus.ERROR, Constants.Bundle_ID, e.getMessage(), e);
+ } finally {
+ sub.worked(100);
+ }
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/Messages.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/Messages.java
new file mode 100755
index 000000000..170127598
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/Messages.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2011 WindRiver Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * WindRiver Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.importexport.internal;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ public static String Column_Id;
+ public static String Column_Name;
+ public static String Column_Version;
+ public static String ExportPage_Title;
+ public static String ExportPage_Description;
+ public static String ExportPage_Label;
+ public static String ExportPage_DEST_ERRORMESSAGE;
+ public static String ExportPage_ERROR_CONFIG;
+ public static String ExportPage_EXPORT_WARNING;
+ public static String ExportPage_Fail;
+ public static String ExportPage_FILEDIALOG_TITLE;
+ public static String EXTENSION_ALL;
+ public static String EXTENSION_ALL_NAME;
+ public static String EXTENSION_p2F_NAME;
+ public static String EXTENSION_p2F;
+ public static String ExportPage_LABEL_EXPORTFILE;
+ public static String ExportPage_SuccessWithProblems;
+ public static String ExportWizard_WizardTitle;
+ public static String ImportPage_DESCRIPTION;
+ public static String ImportPage_DEST_ERROR;
+ public static String ImportPage_DESTINATION_LABEL;
+ public static String ImportPage_FILEDIALOG_TITLE;
+ public static String ImportPage_FILENOTFOUND;
+ public static String AbstractImportPage_HigherVersionInstalled;
+ public static String ImportPage_IMPORT_NOTIFICATION;
+ public static String ImportPage_InstallLatestVersion;
+ public static String ImportPage_QueryFeaturesJob;
+ public static String AbstractImportPage_SameVersionInstalled;
+ public static String ImportPage_TITLE;
+ public static String ImportWizard_WINDOWTITLE;
+ public static String Page_BUTTON_BROWSER;
+ public static String PAGE_NOINSTALLTION_ERROR;
+ public static String ImportFromInstallationPage_DESTINATION_LABEL;
+ public static String ImportFromInstallationPage_DIALOG_TITLE;
+ public static String ImportFromInstallationPage_INVALID_DESTINATION;
+ public static String ImportFromInstallationPage_DIALOG_DESCRIPTION;
+ public static String ImportFromInstallationPage_SELECT_COMPONENT;
+
+ public static String io_IncompatibleVersion;
+ public static String io_parseError;
+ public static String Replicator_ExportJobName;
+ public static String Replicator_InstallFromLocal;
+ public static String Replicator_NotFoundInRepository;
+ public static String Replicator_SaveJobName;
+
+ static {
+ NLS.initializeMessages("org.eclipse.equinox.internal.p2.importexport.internal.messages", Messages.class); //$NON-NLS-1$
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/messages.properties b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/messages.properties
new file mode 100755
index 000000000..717f9d370
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/messages.properties
@@ -0,0 +1,45 @@
+Column_Id=Id
+Column_Name=Name
+Column_Version=Version
+ExportPage_Title=Export software configuration
+ExportPage_Description=Export a list of installed software and their repositories to the local file system.
+ExportPage_Label=Select the software items to export:
+EXTENSION_ALL=*.*
+EXTENSION_ALL_NAME=All files(*.*)
+EXTENSION_p2F=*.p2f
+EXTENSION_p2F_NAME=p2 installation file (*.p2f)
+Page_BUTTON_BROWSER=Browse...
+ExportPage_DEST_ERRORMESSAGE=p2 installation file is not set, or is not a normal file.
+ExportPage_ERROR_CONFIG=Eclipse p2 is not properly configured.
+ExportPage_EXPORT_WARNING=Can't find repository for the following elements. Please check the network connection.\n
+ExportPage_Fail=Selected installed software failed to be export. See problems below:\n
+ExportPage_FILEDIALOG_TITLE=Export the list of installed software to file
+ExportPage_LABEL_EXPORTFILE=To p2 exported file:
+ExportPage_SuccessWithProblems=The export partially succeeded. The following elements failed to be exported:\n
+ExportWizard_WizardTitle=Export
+PAGE_NOINSTALLTION_ERROR=Nothing is selected.
+ImportPage_DESCRIPTION=Install the software mentioned in p2f description file.
+ImportPage_DEST_ERROR=Specified file doesn't exist or can't be read.
+ImportPage_DESTINATION_LABEL=Choose a p2 installation file:
+ImportPage_FILEDIALOG_TITLE=Import from file
+ImportPage_FILENOTFOUND=The specified file doesn't exist.
+AbstractImportPage_HigherVersionInstalled={0} (Disabled because a higher version is already installed)
+ImportPage_IMPORT_NOTIFICATION=The installation job has been scheduled.
+ImportPage_InstallLatestVersion=Install latest version of selected software.
+ImportPage_QueryFeaturesJob=Query selected software...
+AbstractImportPage_SameVersionInstalled={0} (Disabled due to it has been already installed)
+ImportPage_TITLE=Import software configuration
+ImportWizard_WINDOWTITLE=Import
+ImportFromInstallationPage_DESTINATION_LABEL=Specify an existing Eclipse installation
+ImportFromInstallationPage_DIALOG_TITLE=p2 Import
+ImportFromInstallationPage_DIALOG_DESCRIPTION=Import software items from the existing Eclipse's installation.
+ImportFromInstallationPage_INVALID_DESTINATION=Specify the path to a valid eclipse installation.
+ImportFromInstallationPage_SELECT_COMPONENT=Select at least one available element to be installed.
+io_IncompatibleVersion=\
+This p2f file is incompatible with this version of the application. Version {0}; expected {1}.
+io_parseError=\
+Error parsing .p2f file
+Replicator_ExportJobName=Exporting selected software...
+Replicator_InstallFromLocal=Aborted exporting software \"{0}\" because no remote repository can be found.
+Replicator_NotFoundInRepository=No enabled repository can find \"{0}\" or that repository can't be loaded due to network issues.
+Replicator_SaveJobName=Exporting selected software to file...
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/AbstractImportPage.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/AbstractImportPage.java
new file mode 100644
index 000000000..0669d4496
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/AbstractImportPage.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2011 WindRiver Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * WindRiver Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.importexport.internal.wizard;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.internal.p2.importexport.internal.Messages;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.viewers.ICheckStateProvider;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.*;
+
+public abstract class AbstractImportPage extends AbstractPage {
+
+ IProfile profile = null;
+ private final ProvisioningOperationWizard wizard;
+ private final ProvisioningUI ui;
+
+ public AbstractImportPage(String pageName, ProvisioningUI ui, ProvisioningOperationWizard wizard) {
+ super(pageName);
+ this.wizard = wizard;
+ this.ui = ui;
+ profile = getSelfProfile();
+ }
+
+ protected ProvisioningOperationWizard getProvisioningWizard() {
+ return wizard;
+ }
+
+ protected ProvisioningUI getProvisioningUI() {
+ return ui;
+ }
+
+ @Override
+ protected void createInstallationTable(Composite parent) {
+ super.createInstallationTable(parent);
+ viewer.getTable().addListener(SWT.Selection, new Listener() {
+
+ public void handleEvent(Event event) {
+ if( event.detail == SWT.CHECK ) {
+ if (hasInstalled(ProvUI.getAdapter(event.item.getData(), IInstallableUnit.class))) {
+ viewer.getTable().setRedraw(false);
+ ((TableItem)event.item).setChecked(false);
+ viewer.getTable().setRedraw(true);
+ }
+ }
+ }
+ });
+ }
+
+ public boolean hasInstalled(IInstallableUnit iu) {
+ IQueryResult<IInstallableUnit> results = profile.query(QueryUtil.createIUQuery(iu.getId(),
+ new VersionRange(iu.getVersion(), true, null, false)), null);
+ return !results.isEmpty();
+ }
+
+ public String getIUNameWithDetail(IInstallableUnit iu) {
+ IQueryResult<IInstallableUnit> results = profile.query(QueryUtil.createIUQuery(iu.getId(),
+ new VersionRange(iu.getVersion(), true, null, false)), null);
+ final String text = iu.getProperty(IProfile.PROP_NAME, null);
+ if (!results.isEmpty()) {
+ boolean hasHigherVersion = false;
+ boolean hasEqualVersion = false;
+ for (IInstallableUnit installedIU : results.toSet()) {
+ int compareValue = installedIU.getVersion().compareTo(iu.getVersion());
+ if (compareValue > 0) {
+ hasHigherVersion = true;
+ break;
+ } else if (compareValue == 0)
+ hasEqualVersion = true;
+ }
+ if (hasHigherVersion)
+ return NLS.bind(Messages.AbstractImportPage_HigherVersionInstalled, text);
+ else if (hasEqualVersion)
+ return NLS.bind(Messages.AbstractImportPage_SameVersionInstalled, text);
+ }
+ return text;
+ }
+
+ @Override
+ protected ICheckStateProvider getViewerDefaultState() {
+ return new ICheckStateProvider() {
+
+ public boolean isGrayed(Object element) {
+ return false;
+ }
+
+ public boolean isChecked(Object element) {
+ if (profile != null) {
+ IInstallableUnit iu = ProvUI.getAdapter(element, IInstallableUnit.class);
+ IQueryResult<IInstallableUnit> collector = profile.query(QueryUtil.createIUQuery(iu.getId(), new VersionRange(iu.getVersion(), true, null, false)), new NullProgressMonitor());
+ if(collector.isEmpty()) {
+ return true;
+ }
+ }
+ return false;
+ }
+ };
+ }
+
+ @Override
+ protected void doFinish() throws Exception {
+ // do nothing
+ }
+
+
+ @Override
+ public boolean canFlipToNextPage() {
+ return isPageComplete();
+ }
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/AbstractPage.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/AbstractPage.java
new file mode 100644
index 000000000..eecda9a14
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/AbstractPage.java
@@ -0,0 +1,433 @@
+/*******************************************************************************
+ * Copyright (c) 2011 WindRiver Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * WindRiver Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.importexport.internal.wizard;
+
+import java.io.File;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.equinox.internal.p2.importexport.P2ImportExport;
+import org.eclipse.equinox.internal.p2.importexport.internal.Constants;
+import org.eclipse.equinox.internal.p2.importexport.internal.Messages;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ILayoutConstants;
+import org.eclipse.equinox.internal.p2.ui.viewers.*;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.wizard.WizardPage;
+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.osgi.framework.BundleContext;
+import org.osgi.util.tracker.ServiceTracker;
+
+public abstract class AbstractPage extends WizardPage implements Listener {
+
+ protected String currentMessage;
+ protected Button destinationBrowseButton;
+ protected Combo destinationNameField;
+ protected P2ImportExport importexportService = null;
+ protected CheckboxTableViewer viewer = null;
+ protected Exception finishException;
+ protected static IProfileRegistry profileRegistry = null;
+ protected static IProvisioningAgent agent = null;
+
+ class TableViewerComparator extends ViewerComparator {
+ private int sortColumn = 0;
+ private int lastSortColumn = 0;
+ private boolean ascending = false;
+ private boolean lastAscending = false;
+
+ @Override
+ public int compare(Viewer viewer, Object e1, Object e2) {
+ IInstallableUnit iu1 = ProvUI.getAdapter(e1, IInstallableUnit.class);
+ IInstallableUnit iu2 = ProvUI.getAdapter(e2, IInstallableUnit.class);
+ if (iu1 != null && iu2 != null) {
+ if (viewer instanceof TableViewer) {
+ TableViewer tableViewer = (TableViewer) viewer;
+ IBaseLabelProvider baseLabel = tableViewer.getLabelProvider();
+ if (baseLabel instanceof ITableLabelProvider) {
+ ITableLabelProvider tableProvider = (ITableLabelProvider) baseLabel;
+ String e1p = tableProvider.getColumnText(e1, getSortColumn());
+ String e2p = tableProvider.getColumnText(e2, getSortColumn());
+ int result = getComparator().compare(e1p, e2p);
+ // Secondary column sort
+ if (result == 0) {
+ e1p = tableProvider.getColumnText(e1, lastSortColumn);
+ e2p = tableProvider.getColumnText(e2, lastSortColumn);
+ result = getComparator().compare(e1p, e2p);
+ return lastAscending ? result : (-1) * result;
+ }
+ return isAscending() ? result : (-1) * result;
+ }
+ }
+ // we couldn't determine a secondary sort, call it equal
+ return 0;
+ }
+ return super.compare(viewer, e1, e2);
+ }
+
+ /**
+ * @return Returns the sortColumn.
+ */
+ public int getSortColumn() {
+ return sortColumn;
+ }
+
+ /**
+ * @param sortColumn
+ * The sortColumn to set.
+ */
+ public void setSortColumn(int sortColumn) {
+ if (this.sortColumn != sortColumn) {
+ lastSortColumn = this.sortColumn;
+ lastAscending = this.ascending;
+ this.sortColumn = sortColumn;
+ }
+ }
+
+ /**
+ * @return Returns the ascending.
+ */
+ public boolean isAscending() {
+ return ascending;
+ }
+
+ /**
+ * @param ascending
+ * The ascending to set.
+ */
+ public void setAscending(boolean ascending) {
+ this.ascending = ascending;
+ }
+ }
+
+ static {
+ BundleContext context = Platform.getBundle(Constants.Bundle_ID).getBundleContext();
+ ServiceTracker<IProvisioningAgent, IProvisioningAgent> tracker = new ServiceTracker<IProvisioningAgent, IProvisioningAgent>(context, IProvisioningAgent.class, null);
+ tracker.open();
+ agent = tracker.getService();
+ tracker.close();
+ if (agent != null)
+ profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+ }
+
+ public AbstractPage(String pageName) {
+ super(pageName);
+ }
+
+ public AbstractPage(String pageName, String title, ImageDescriptor titleImage) {
+ super(pageName, title, titleImage);
+ }
+
+ protected IProfile getSelfProfile() {
+ if (profileRegistry != null) {
+ String selfID = System.getProperty("eclipse.p2.profile"); //$NON-NLS-1$
+ if (selfID == null)
+ selfID = IProfileRegistry.SELF;
+ return profileRegistry.getProfile(selfID);
+ }
+ return null;
+ }
+
+ private void createColumns(TableViewer viewer) {
+ String[] titles = {Messages.Column_Name, Messages.Column_Version, Messages.Column_Id};
+ for (int i = 0; i < titles.length; i++) {
+ TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
+ column.getColumn().setText(titles[i]);
+ column.getColumn().setResizable(true);
+ column.getColumn().setMoveable(true);
+ if (Messages.Column_Name.equals(titles[i]))
+ updateTableSorting(i);
+ final int columnIndex = i;
+ column.getColumn().addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ updateTableSorting(columnIndex);
+ }
+ });
+ }
+ }
+
+ protected void updateTableSorting(int columnIndex) {
+ TableViewerComparator comparator = (TableViewerComparator) viewer.getComparator();
+ // toggle direction if it's the same column
+ if (columnIndex == comparator.getSortColumn()) {
+ comparator.setAscending(!comparator.isAscending());
+ }
+ comparator.setSortColumn(columnIndex);
+ viewer.getTable().setSortColumn(viewer.getTable().getColumn(columnIndex));
+ viewer.getTable().setSortDirection(comparator.isAscending() ? SWT.UP : SWT.DOWN);
+ viewer.refresh(false);
+ }
+
+ protected abstract void createContents(Composite composite);
+
+ public void createControl(Composite parent) {
+ initializeDialogUnits(parent);
+ initializeService();
+ Composite composite = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout(1, true);
+ layout.horizontalSpacing = 0;
+ layout.verticalSpacing = 5;
+ composite.setLayout(layout);
+ composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
+
+ createContents(composite);
+
+ // can not finish initially, but don't want to start with an error
+ // message either
+ if (!(validDestination() && validateOptionsGroup())) {
+ setPageComplete(false);
+ }
+
+ setControl(composite);
+ giveFocusToDestination();
+ Dialog.applyDialogFont(composite);
+ }
+
+ protected void createDestinationGroup(Composite parent) {
+ Composite composite = new Composite(parent, SWT.BORDER);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ composite.setLayout(layout);
+ composite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+
+ Label label = new Label(composite, SWT.NONE);
+ label.setText(getDestinationLabel());
+
+ destinationNameField = new Combo(composite, SWT.SINGLE | SWT.BORDER);
+ GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
+ destinationNameField.setLayoutData(data);
+ destinationNameField.addListener(SWT.Modify | SWT.Selection, this);
+ destinationBrowseButton = new Button(composite, SWT.PUSH);
+ destinationBrowseButton.setText(Messages.Page_BUTTON_BROWSER);
+ destinationBrowseButton.addListener(SWT.Selection, this);
+ destinationBrowseButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
+ }
+
+ protected IUColumnConfig[] getColumnConfig() {
+ return new IUColumnConfig[] {new IUColumnConfig(ProvUIMessages.ProvUI_NameColumnTitle, IUColumnConfig.COLUMN_NAME, ILayoutConstants.DEFAULT_PRIMARY_COLUMN_WIDTH), new IUColumnConfig(ProvUIMessages.ProvUI_VersionColumnTitle, IUColumnConfig.COLUMN_VERSION, ILayoutConstants.DEFAULT_SMALL_COLUMN_WIDTH), new IUColumnConfig(ProvUIMessages.ProvUI_IdColumnTitle, IUColumnConfig.COLUMN_ID, ILayoutConstants.DEFAULT_COLUMN_WIDTH)};
+ }
+
+ protected void createInstallationTable(final Composite parent) {
+ viewer = CheckboxTableViewer.newCheckList(parent, SWT.MULTI | SWT.BORDER);
+ final Table table = viewer.getTable();
+ table.setHeaderVisible(true);
+ table.setLinesVisible(false);
+ viewer.setComparator(new TableViewerComparator());
+ createColumns(viewer);
+ viewer.setContentProvider(getContentProvider());
+ viewer.setLabelProvider(getLabelProvider());
+ parent.addControlListener(new ControlAdapter() {
+ private final int[] columnRate = new int[] {6, 2, 2};
+
+ @Override
+ public void controlResized(ControlEvent e) {
+ Rectangle area = parent.getClientArea();
+ Point size = table.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ ScrollBar vBar = table.getVerticalBar();
+ int width = area.width - table.computeTrim(0, 0, 0, 0).width - vBar.getSize().x;
+ if (size.y > area.height + table.getHeaderHeight()) {
+ // Subtract the scrollbar width from the total column width
+ // if a vertical scrollbar will be required
+ Point vBarSize = vBar.getSize();
+ width -= vBarSize.x;
+ }
+ Point oldSize = table.getSize();
+ TableColumn[] columns = table.getColumns();
+ int hasUsed = 0, i = 0;
+ if (oldSize.x > area.width) {
+ // table is getting smaller so make the columns
+ // smaller first and then resize the table to
+ // match the client area width
+ for (; i < columns.length - 1; i++) {
+ columns[i].setWidth(width * columnRate[i] / 10);
+ hasUsed += columns[i].getWidth();
+ }
+ columns[columns.length - 1].setWidth(width - hasUsed);
+ table.setSize(area.width, area.height);
+ } else {
+ // table is getting bigger so make the table
+ // bigger first and then make the columns wider
+ // to match the client area width
+ table.setSize(area.width, area.height);
+ for (; i < columns.length - 1; i++) {
+ columns[i].setWidth(width * columnRate[i] / 10);
+ hasUsed += columns[i].getWidth();
+ }
+ columns[columns.length - 1].setWidth(width - hasUsed);
+ }
+ }
+ });
+ viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ updatePageCompletion();
+ }
+ });
+ ICheckStateProvider provider = getViewerDefaultState();
+ if (provider != null)
+ viewer.setCheckStateProvider(provider);
+ viewer.getControl().setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
+ viewer.getControl().setSize(300, 200);
+ viewer.setInput(getInput());
+ }
+
+ protected ICheckStateProvider getViewerDefaultState() {
+ return null;
+ }
+
+ protected ITableLabelProvider getLabelProvider() {
+ return new IUDetailsLabelProvider(null, getColumnConfig(), null);
+ }
+
+ protected IContentProvider getContentProvider() {
+ return new DeferredQueryContentProvider();
+ }
+
+ protected boolean determinePageCompletion() {
+ // validate groups in order of priority so error message is the most important one
+ boolean complete = validateDestinationGroup() && validateOptionsGroup();
+
+ // Avoid draw flicker by not clearing the error
+ // message unless all is valid.
+ if (complete) {
+ setErrorMessage(null);
+ } else {
+ setErrorMessage(currentMessage);
+ }
+
+ return complete;
+ }
+
+ protected abstract void doFinish() throws Exception;
+
+ protected int getBrowseDialogStyle() {
+ return SWT.OPEN;
+ }
+
+ /**
+ * returns the destination label
+ * @return non null string
+ */
+ protected abstract String getDestinationLabel();
+
+ /**
+ * Answer the contents of self's destination specification widget
+ *
+ * @return java.lang.String
+ */
+ protected String getDestinationValue() {
+ return destinationNameField.getText().trim();
+ }
+
+ /**
+ * return the title of dialog
+ * @return non null string
+ */
+ protected abstract String getDialogTitle();
+
+ protected abstract Object getInput();
+
+ protected abstract String getInvalidDestinationMessage();
+
+ protected String getNoOptionsMessage() {
+ return Messages.PAGE_NOINSTALLTION_ERROR;
+ }
+
+ protected abstract void giveFocusToDestination();
+
+ /**
+ * Open an appropriate destination browser so that the user can specify a
+ * source to import from
+ */
+ protected void handleDestinationBrowseButtonPressed() {
+ FileDialog dialog = new FileDialog(getContainer().getShell(), getBrowseDialogStyle() | SWT.SHEET);
+ dialog.setText(getDialogTitle());
+ dialog.setFilterPath(getDestinationValue());
+ dialog.setFilterExtensions(new String[] {Messages.EXTENSION_p2F, Messages.EXTENSION_ALL});
+ dialog.setFilterNames(new String[] {Messages.EXTENSION_p2F_NAME, Messages.EXTENSION_ALL_NAME});
+ String selectedFileName = dialog.open();
+
+ if (selectedFileName != null) {
+ if (!selectedFileName.endsWith(Messages.EXTENSION_p2F.substring(1)))
+ selectedFileName += Messages.EXTENSION_p2F.substring(1);
+ setDestinationValue(selectedFileName);
+ }
+ }
+
+ public void handleEvent(Event event) {
+ Widget source = event.widget;
+
+ if (source == destinationBrowseButton) {
+ handleDestinationBrowseButtonPressed();
+ }
+ }
+
+ protected void initializeService() {
+ ServiceTracker<P2ImportExport, P2ImportExport> tracker = new ServiceTracker<P2ImportExport, P2ImportExport>(Platform.getBundle(Constants.Bundle_ID).getBundleContext(), P2ImportExport.class.getName(), null);
+ tracker.open();
+ importexportService = tracker.getService();
+ tracker.close();
+ }
+
+ protected void setDestinationValue(String selectedFileName) {
+ destinationNameField.setText(selectedFileName);
+ }
+
+ /**
+ * Determine if the page is complete and update the page appropriately.
+ */
+ protected void updatePageCompletion() {
+ boolean pageComplete = determinePageCompletion();
+ setPageComplete(pageComplete);
+ if (pageComplete) {
+ setMessage(null);
+ }
+ }
+
+ /**
+ * Validate the destination group.
+ * @return <code>true</code> if the group is valid. If
+ * not set the error message and return <code>false</code>.
+ */
+ protected boolean validateDestinationGroup() {
+ if (!validDestination()) {
+ currentMessage = getInvalidDestinationMessage();
+ return false;
+ }
+
+ return true;
+ }
+
+ protected boolean validateOptionsGroup() {
+ if (viewer == null || viewer.getCheckedElements().length > 0)
+ return true;
+
+ currentMessage = getNoOptionsMessage();
+ return false;
+ }
+
+ protected boolean validDestination() {
+ if (this.destinationNameField == null)
+ return true;
+ File file = new File(getDestinationValue());
+ return !(file.getPath().length() <= 0 || file.isDirectory());
+ }
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/AbstractWizard.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/AbstractWizard.java
new file mode 100755
index 000000000..501170c7f
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/AbstractWizard.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2011 WindRiver Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * WindRiver Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.importexport.internal.wizard;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.importexport.internal.Constants;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.MessageBox;
+
+public abstract class AbstractWizard extends Wizard {
+
+ protected AbstractPage mainPage = null;
+
+ public AbstractWizard() {
+ super();
+ }
+
+ @Override
+ public boolean performFinish() {
+ try {
+ mainPage.doFinish();
+ } catch (Exception e) {
+ Platform.getLog(Platform.getBundle(Constants.Bundle_ID)).log(
+ new Status(IStatus.ERROR, Constants.Bundle_ID, e.getMessage(), e));
+ MessageBox messageBox = new MessageBox(this.getShell(), SWT.ICON_ERROR);
+ messageBox.setMessage(e.getMessage() == null ? "Unknown error" : e.getMessage()); //$NON-NLS-1$
+ messageBox.open();
+ return false;
+ }
+ return true;
+ }
+
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ExportPage.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ExportPage.java
new file mode 100755
index 000000000..2ce89a9d6
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ExportPage.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2011 WindRiver Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * WindRiver Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.importexport.internal.wizard;
+
+import java.io.*;
+import java.lang.reflect.InvocationTargetException;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.importexport.internal.Messages;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.model.ProfileElement;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.*;
+
+public class ExportPage extends AbstractPage {
+
+ public ExportPage(String pageName) {
+ super(pageName);
+ setTitle(Messages.ExportPage_Title);
+ setDescription(Messages.ExportPage_Description);
+ }
+
+ @Override
+ protected void createContents(Composite composite) {
+ Label label = new Label(composite, SWT.NONE);
+ label.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
+ if(getSelfProfile() == null){
+ label.setText(Messages.ExportPage_ERROR_CONFIG);
+ }else {
+ label.setText(Messages.ExportPage_Label);
+
+ createInstallationTable(composite);
+ createDestinationGroup(composite);
+ }
+ }
+
+ @Override
+ public void doFinish() throws Exception {
+ finishException = null;
+ if(viewer == null)
+ return;
+ final Object[] checked = viewer.getCheckedElements();
+ OutputStream stream = null;
+ try {
+ File target = new File(ExportPage.this.destinationNameField.getText());
+ if(!target.exists())
+ target.createNewFile();
+ stream = new BufferedOutputStream(new FileOutputStream(target));
+ final OutputStream out = stream;
+ getContainer().run(true, true, new IRunnableWithProgress() {
+
+ public void run(IProgressMonitor monitor) throws InvocationTargetException,
+ InterruptedException {
+ try {
+ IInstallableUnit[] units = new IInstallableUnit[checked.length];
+ for(int i = 0; i < units.length; i++)
+ units[i] = ProvUI.getAdapter(checked[i], IInstallableUnit.class);
+ IStatus status = importexportService.exportP2F(out, units, monitor);
+ if (status.isMultiStatus()) {
+ final StringBuilder sb = new StringBuilder();
+ boolean info = true;
+ for (IStatus child : status.getChildren()) {
+ if (child.isMultiStatus()) {
+ for (IStatus grandchild : child.getChildren())
+ sb.append(grandchild.getMessage()).append("\n"); //$NON-NLS-1$
+ } else if (child.isOK())
+ sb.insert(0, Messages.ExportPage_SuccessWithProblems);
+ else {
+ info = false;
+ sb.insert(0, Messages.ExportPage_Fail);
+ sb.append(status.getMessage());
+ }
+ }
+ final boolean isInfo = info;
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ String title = Messages.ExportPage_Title;
+ if (isInfo == true)
+ MessageDialog.openInformation(getShell(), title, sb.toString());
+ else
+ MessageDialog.openWarning(getShell(), title, sb.toString());
+ }
+ });
+ }
+ } catch (OperationCanceledException e) {
+ throw new InterruptedException(e.getMessage());
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ // do nothing for cancelled by users
+ } finally {
+ if(stream != null) {
+ try {
+ stream.close();
+ } catch (IOException e) {
+ // do nothing
+ }
+ }
+ if(finishException != null)
+ throw finishException;
+ }
+ }
+
+ @Override
+ protected String getDialogTitle() {
+ return Messages.ExportPage_FILEDIALOG_TITLE;
+ }
+
+ @Override
+ protected Object getInput() {
+ // return importexportService.getRootIUs();
+ ProfileElement element = new ProfileElement(null, getSelfProfile().getProfileId());
+ return element;
+ }
+
+
+ @Override
+ protected String getInvalidDestinationMessage() {
+ return Messages.ExportPage_DEST_ERRORMESSAGE;
+ }
+
+ @Override
+ protected void giveFocusToDestination() {
+ if(viewer != null)
+ viewer.getControl().setFocus();
+ }
+
+ @Override
+ protected String getDestinationLabel() {
+ return Messages.ExportPage_LABEL_EXPORTFILE;
+ }
+
+ @Override
+ protected int getBrowseDialogStyle() {
+ return SWT.SAVE;
+ }
+
+ @Override
+ public void handleEvent(Event event) {
+ super.handleEvent(event);
+
+ updatePageCompletion();
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ExportWizard.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ExportWizard.java
new file mode 100755
index 000000000..0a75c19f0
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ExportWizard.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2011 WindRiver Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * WindRiver Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.importexport.internal.wizard;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.equinox.internal.p2.importexport.internal.Constants;
+import org.eclipse.equinox.internal.p2.importexport.internal.Messages;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IExportWizard;
+import org.eclipse.ui.IWorkbench;
+
+
+public class ExportWizard extends AbstractWizard implements IExportWizard {
+
+ public ExportWizard() {
+ }
+
+ @Override
+ public void addPages() {
+ super.addPages();
+ mainPage = new ExportPage("mainPage"); //$NON-NLS-1$
+ addPage(mainPage);
+ }
+
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ setWindowTitle(Messages.ExportWizard_WizardTitle);
+ setDefaultPageImageDescriptor(ImageDescriptor.createFromURL(Platform.getBundle(Constants.Bundle_ID).getEntry("icons/install_wiz.gif"))); //$NON-NLS-1$
+ setNeedsProgressMonitor(true);
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportFromInstallationPage.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportFromInstallationPage.java
new file mode 100644
index 000000000..ea258b2a5
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportFromInstallationPage.java
@@ -0,0 +1,353 @@
+/*******************************************************************************
+ * Copyright (c) 2011 WindRiver Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * WindRiver Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.importexport.internal.wizard;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.lang.reflect.InvocationTargetException;
+import java.net.URI;
+import java.util.concurrent.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.extensionlocation.ExtensionLocationArtifactRepositoryFactory;
+import org.eclipse.equinox.internal.p2.extensionlocation.ExtensionLocationMetadataRepositoryFactory;
+import org.eclipse.equinox.internal.p2.importexport.internal.Constants;
+import org.eclipse.equinox.internal.p2.importexport.internal.Messages;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ISelectableIUsPage;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard;
+import org.eclipse.equinox.internal.p2.ui.model.ProfileElement;
+import org.eclipse.equinox.internal.p2.ui.viewers.IUDetailsLabelProvider;
+import org.eclipse.equinox.p2.core.*;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactRepositoryFactory;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.widgets.*;
+import org.osgi.util.tracker.ServiceTracker;
+
+public class ImportFromInstallationPage extends AbstractImportPage implements ISelectableIUsPage {
+
+ protected IProvisioningAgent otherInstanceAgent = null;
+ private File instancePath = null;
+ private URI[] metaURIs = null;
+ private URI[] artiURIs = null;
+ private IProvisioningAgentProvider agentProvider;
+
+ public ImportFromInstallationPage(ProvisioningUI ui, ProvisioningOperationWizard wizard) {
+ super("importfrominstancepage", ui, wizard); //$NON-NLS-1$
+ setTitle(Messages.ImportFromInstallationPage_DIALOG_TITLE);
+ setDescription(Messages.ImportFromInstallationPage_DIALOG_DESCRIPTION);
+ }
+
+ @Override
+ protected void createContents(Composite composite) {
+ createDestinationGroup(composite);
+ createInstallationTable(composite);
+ }
+
+ @Override
+ protected String getDestinationLabel() {
+ return Messages.ImportFromInstallationPage_DESTINATION_LABEL;
+ }
+
+ @Override
+ protected String getDialogTitle() {
+ return Messages.ImportFromInstallationPage_DIALOG_TITLE;
+ }
+
+ @Override
+ protected Object getInput() {
+ return new IInstallableUnit[0];
+ }
+
+ @Override
+ protected String getInvalidDestinationMessage() {
+ return Messages.ImportFromInstallationPage_INVALID_DESTINATION;
+ }
+
+ @Override
+ protected String getNoOptionsMessage() {
+ return Messages.ImportFromInstallationPage_SELECT_COMPONENT;
+ }
+
+ @Override
+ public void handleEvent(Event event) {
+ super.handleEvent(event);
+ if(event.widget == viewer.getControl())
+ updatePageCompletion();
+ }
+
+ @Override
+ protected boolean validateDestinationGroup() {
+ return validateDestinationGroup(new NullProgressMonitor());
+ }
+
+ private IProvisioningAgentProvider getAgentProvider() {
+ if (agentProvider == null) {
+ ServiceTracker<IProvisioningAgentProvider, IProvisioningAgentProvider> tracker =
+ new ServiceTracker<IProvisioningAgentProvider, IProvisioningAgentProvider>(
+ Platform.getBundle(Constants.Bundle_ID).getBundleContext(), IProvisioningAgentProvider.class, null);
+ tracker.open();
+ agentProvider = tracker.getService();
+ tracker.close();
+ }
+ return agentProvider;
+ }
+
+ private boolean validateDestinationGroup(IProgressMonitor monitor) {
+ SubMonitor progress = SubMonitor.convert(monitor, 100);
+
+ boolean rt;
+ if (Display.findDisplay(Thread.currentThread()) == null) {
+ Callable<Boolean> getSuperValidateDest = new Callable<Boolean>() {
+ Boolean validated;
+ public Boolean call() throws Exception {
+ Display.getDefault().syncExec(new Runnable() {
+ public void run() {
+ validated = ImportFromInstallationPage.super.validateDestinationGroup();
+ }
+ });
+ return validated;
+ }
+ };
+ ExecutorService executor = Executors.newSingleThreadScheduledExecutor();
+ Future<Boolean> getSuperDestTask = executor.submit(getSuperValidateDest);
+
+ try {
+ rt = getSuperDestTask.get().booleanValue();
+ } catch (Exception e) {
+ return false;
+ } finally {
+ executor.shutdown();
+ }
+ } else
+ rt = super.validateDestinationGroup();
+
+ if (rt) {
+ try {
+ String destinate;
+ if (Display.findDisplay(Thread.currentThread()) == null) {
+ Callable<String> getDestinationValue = new Callable<String>() {
+ String destination;
+ public String call() throws Exception {
+ if (Display.findDisplay(Thread.currentThread()) == null) {
+ Display.getDefault().syncExec(new Runnable() {
+ public void run() {
+ destination = getDestinationValue();
+ }
+ });
+ } else
+ destination = getDestinationValue();
+ return destination;
+ }
+ };
+ ExecutorService executor = Executors.newSingleThreadScheduledExecutor();
+ Future<String> getDestTask = executor.submit(getDestinationValue);
+ try {
+ destinate = getDestTask.get();
+ } finally {
+ executor.shutdown();
+ }
+ } else
+ destinate = getDestinationValue();
+ try {
+ File p2 = new File(destinate, "p2"); //$NON-NLS-1$
+ if (p2.exists()) {
+ boolean createAgent = true;
+ if (otherInstanceAgent != null) {
+ // don't create agent again if the selection is not changed
+ if (!p2.equals(instancePath)) {
+ otherInstanceAgent.stop();
+ otherInstanceAgent = null;
+ // update cached specified path by users
+ instancePath = p2;
+ cleanLocalRepository();
+ } else
+ createAgent = false;
+ }
+ if (createAgent)
+ otherInstanceAgent = getAgentProvider().createAgent(p2.toURI());
+ ArtifactRepositoryFactory factory = new ExtensionLocationArtifactRepositoryFactory();
+ factory.setAgent(agent);
+ IArtifactRepository artiRepo = factory.load(new File(destinate).toURI(), 0, progress.newChild(50));
+ artiURIs = new URI[] {artiRepo.getLocation()};
+ MetadataRepositoryFactory metaFatory = new ExtensionLocationMetadataRepositoryFactory();
+ metaFatory.setAgent(agent);
+ IMetadataRepository metaRepo = metaFatory.load(new File(destinate).toURI(), 0, progress.newChild(50));
+ metaURIs = new URI[] {metaRepo.getLocation()};
+
+ } else
+ throw new FileNotFoundException();
+ } catch (ProvisionException e) {
+ if (otherInstanceAgent != null) {
+ IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+ IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
+ IProfile profile = ((IProfileRegistry)otherInstanceAgent.getService(IProfileRegistry.SERVICE_NAME)).getProfiles()[0];
+ IAgentLocation location = (IAgentLocation) otherInstanceAgent.getService(IAgentLocation.SERVICE_NAME);
+ URI engineDataArea = location.getDataArea("org.eclipse.equinox.p2.engine"); //$NON-NLS-1$
+ progress.setWorkRemaining(50);
+ IMetadataRepository metaRepo = manager.loadRepository(engineDataArea.resolve("profileRegistry/" + profile.getProfileId() + ".profile"), progress.newChild(25)); //$NON-NLS-1$//$NON-NLS-2$
+ metaURIs = new URI[] {metaRepo.getLocation()};
+ IArtifactRepository artiRepo = artifactManager.loadRepository(new File(destinate).toURI(), progress.newChild(25));
+ artiURIs = new URI[] {artiRepo.getLocation()};
+ } else
+ throw new Exception();
+ }
+ } catch (Exception e) {
+ currentMessage = getInvalidDestinationMessage();
+ rt = false;
+ if (otherInstanceAgent != null)
+ otherInstanceAgent.stop();
+ otherInstanceAgent = null;
+ cleanLocalRepository();
+ } finally {
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ setErrorMessage(currentMessage);
+ }
+ });
+ monitor.done();
+ }
+ }
+ return rt;
+ }
+
+ @Override
+ protected void giveFocusToDestination() {
+ destinationBrowseButton.setFocus();
+ }
+
+ @Override
+ protected void handleDestinationBrowseButtonPressed() {
+ DirectoryDialog dialog = new DirectoryDialog(getContainer().getShell());
+ dialog.setText(getDialogTitle());
+ dialog.setFilterPath(getDestinationValue());
+ final String selectedFileName = dialog.open();
+
+ if (selectedFileName != null) {
+ setDestinationValue(selectedFileName);
+ try {
+ getContainer().run(true, false, new IRunnableWithProgress() {
+
+ public void run(IProgressMonitor monitor) throws InvocationTargetException,
+ InterruptedException {
+ if (validateDestinationGroup(monitor)) {
+ IProfileRegistry registry = (IProfileRegistry) otherInstanceAgent.getService(IProfileRegistry.SERVICE_NAME);
+ final IProfile profile = registry.getProfiles()[0];
+ final ProfileElement element = new ProfileElement(null, profile.getProfileId()) {
+ @Override
+ public org.eclipse.equinox.p2.query.IQueryable<?> getQueryable() {
+ return profile;
+ };
+ };
+ element.setQueryable(profile);
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ viewer.setInput(element);
+ }
+ });
+ }
+ }
+ });
+ } catch (InvocationTargetException e) {
+ setErrorMessage(e.getLocalizedMessage());
+ } catch (InterruptedException e) {
+
+ }
+ }
+ }
+
+ @Override
+ protected boolean validDestination() {
+ if (this.destinationNameField == null)
+ return true;
+ File file = new File(getDestinationValue());
+ return file.exists() && file.isDirectory();
+ }
+
+ class ImportFromInstallationLabelProvider extends IUDetailsLabelProvider {
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ String text = super.getColumnText(element, columnIndex);
+ // it's the order of label provider
+ if (columnIndex == 0) {
+ IInstallableUnit iu = ProvUI.getAdapter(element, IInstallableUnit.class);
+ return getIUNameWithDetail(iu);
+ }
+ return text;
+ }
+
+ @Override
+ public Color getForeground(Object element) {
+ IInstallableUnit iu = ProvUI.getAdapter(element, IInstallableUnit.class);
+ if (hasInstalled(iu))
+ return Display.getDefault().getSystemColor(SWT.COLOR_GRAY);
+ return super.getForeground(element);
+ }
+ }
+
+ @Override
+ protected ITableLabelProvider getLabelProvider() {
+ return new ImportFromInstallationLabelProvider();
+ }
+
+ @Override
+ public void dispose() {
+ super.dispose();
+ if (otherInstanceAgent != null) {
+ otherInstanceAgent.stop();
+ otherInstanceAgent = null;
+ }
+ if (getWizard().performCancel())
+ cleanLocalRepository();
+ }
+
+ public void cleanLocalRepository() {
+ if (metaURIs != null && metaURIs.length > 0) {
+ IProvisioningAgent agent = getProvisioningUI().getSession().getProvisioningAgent();
+ IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+ for (URI uri : metaURIs)
+ manager.removeRepository(uri);
+ IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
+ for (URI uri : artiURIs)
+ artifactManager.removeRepository(uri);
+ }
+ }
+
+ public Object[] getCheckedIUElements() {
+ return viewer.getCheckedElements();
+ }
+
+ public Object[] getSelectedIUElements() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setCheckedElements(Object[] elements) {
+ new UnsupportedOperationException();
+ }
+
+ public ProvisioningContext getProvisioningContext() {
+ ProvisioningContext context = new ProvisioningContext(getProvisioningUI().getSession().getProvisioningAgent());
+ context.setArtifactRepositories(artiURIs);
+ context.setMetadataRepositories(metaURIs);
+ return context;
+ }
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportFromInstallationWizard.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportFromInstallationWizard.java
new file mode 100644
index 000000000..38ccc6230
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportFromInstallationWizard.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2011 WindRiver Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * WindRiver Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.importexport.internal.wizard;
+
+import java.util.Collection;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.equinox.internal.p2.importexport.internal.Constants;
+import org.eclipse.equinox.internal.p2.importexport.internal.Messages;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ISelectableIUsPage;
+import org.eclipse.equinox.internal.p2.ui.dialogs.InstallWizard;
+import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.InstallOperation;
+import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IImportWizard;
+import org.eclipse.ui.IWorkbench;
+
+public class ImportFromInstallationWizard extends InstallWizard implements IImportWizard {
+
+ public ImportFromInstallationWizard() {
+ this(ProvisioningUI.getDefaultUI(), null, null, null);
+ }
+
+ public ImportFromInstallationWizard(ProvisioningUI ui, InstallOperation operation, Collection<IInstallableUnit> initialSelections, LoadMetadataRepositoryJob preloadJob) {
+ super(ui, operation, initialSelections, preloadJob);
+ }
+
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ setWindowTitle(Messages.ImportWizard_WINDOWTITLE);
+ setDefaultPageImageDescriptor(ImageDescriptor.createFromURL(Platform.getBundle(Constants.Bundle_ID).getEntry("icons/install_wiz.gif"))); //$NON-NLS-1$
+ setNeedsProgressMonitor(true);
+ }
+
+ @Override
+ protected ISelectableIUsPage createMainPage(IUElementListRoot input,
+ Object[] selections) {
+ return new ImportFromInstallationPage(ui, this);
+ }
+
+ @Override
+ protected ProvisioningContext getProvisioningContext() {
+ return ((ImportFromInstallationPage) mainPage).getProvisioningContext();
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportPage.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportPage.java
new file mode 100644
index 000000000..785c37ca7
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportPage.java
@@ -0,0 +1,344 @@
+/*******************************************************************************
+ * Copyright (c) 2011 WindRiver Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * WindRiver Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.importexport.internal.wizard;
+
+import java.io.*;
+import java.net.URI;
+import java.util.*;
+import java.util.List;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.importexport.IUDetail;
+import org.eclipse.equinox.internal.p2.importexport.internal.Messages;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ISelectableIUsPage;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.query.CompoundQueryable;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+
+public class ImportPage extends AbstractImportPage implements ISelectableIUsPage {
+
+ private class InstallationContentProvider implements IStructuredContentProvider {
+
+ public void dispose() {
+ }
+
+ public Object[] getElements(Object inputElement) {
+ return (Object[]) inputElement;
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ }
+
+ private class InstallationLabelProvider extends LabelProvider implements ITableLabelProvider, IColorProvider {
+
+ public Image getColumnImage(Object element, int columnIndex) {
+ return null;
+ }
+
+ public String getColumnText(Object element, int columnIndex) {
+ IInstallableUnit iu = ((IUDetail) element).getIU();
+ switch (columnIndex) {
+ case 0 :
+ return getIUNameWithDetail(iu);
+ case 1 :
+ return iu.getVersion().toString();
+ case 2 :
+ return iu.getId();
+ default :
+ throw new RuntimeException("Should not happen"); //$NON-NLS-1$
+ }
+
+ }
+
+ public Color getForeground(Object element) {
+ if (hasInstalled(ProvUI.getAdapter(element, IInstallableUnit.class)))
+ return Display.getDefault().getSystemColor(SWT.COLOR_GRAY);
+ return null;
+ }
+
+ public Color getBackground(Object element) {
+ return null;
+ }
+ }
+
+ private List<IUDetail> features;
+ private final List<URI> loadRepos = new ArrayList<URI>();
+ private final Map<IUDetail, IUDetail[]> newProposedFeature = new HashMap<IUDetail, IUDetail[]>();
+ private Button contactAll;
+ private Button installLatest;
+
+ public ImportPage(ProvisioningUI ui, ProvisioningOperationWizard wizard) {
+ super("importpage", ui, wizard); //$NON-NLS-1$
+ setTitle(Messages.ImportPage_TITLE);
+ setDescription(Messages.ImportPage_DESCRIPTION);
+ }
+
+ @Override
+ protected void createContents(Composite composite) {
+ createDestinationGroup(composite);
+ createInstallationTable(composite);
+ createAdditionOptions(composite);
+ }
+
+ private void createAdditionOptions(Composite parent) {
+ Composite composite = new Composite(parent, SWT.BORDER);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 1;
+ composite.setLayout(layout);
+ composite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
+
+ contactAll = new Button(composite, SWT.CHECK);
+ contactAll.setText(ProvUIMessages.AvailableIUsPage_ResolveAllCheckbox);
+
+ installLatest = new Button(composite, SWT.CHECK);
+ installLatest.setText(Messages.ImportPage_InstallLatestVersion);
+ installLatest.setSelection(true);
+ }
+
+ @Override
+ protected IContentProvider getContentProvider() {
+ return new InstallationContentProvider();
+ }
+
+ @Override
+ protected ITableLabelProvider getLabelProvider() {
+ return new InstallationLabelProvider();
+ }
+
+ @Override
+ protected int getBrowseDialogStyle() {
+ return SWT.OPEN;
+ }
+
+ @Override
+ protected String getDestinationLabel() {
+ return Messages.ImportPage_DESTINATION_LABEL;
+ }
+
+ @Override
+ protected String getDialogTitle() {
+ return Messages.ImportPage_FILEDIALOG_TITLE;
+ }
+
+ @Override
+ protected IUDetail[] getInput() {
+ return new IUDetail[0];
+ }
+
+ @Override
+ protected String getInvalidDestinationMessage() {
+ return Messages.ImportPage_DEST_ERROR;
+ }
+
+ @Override
+ protected void giveFocusToDestination() {
+ destinationNameField.setFocus();
+ }
+
+ @Override
+ public void handleEvent(Event event) {
+ super.handleEvent(event);
+ updatePageCompletion();
+ }
+
+ @Override
+ protected void updatePageCompletion() {
+ super.updatePageCompletion();
+ if (isPageComplete())
+ getProvisioningWizard().operationSelectionsChanged(this);
+ }
+
+ @Override
+ protected void setDestinationValue(String selectedFileName) {
+ String oldValue = getDestinationValue();
+ super.setDestinationValue(selectedFileName);
+ if (validateDestinationGroup()) {
+ // p2f file is changed, update the cached data
+ if (!selectedFileName.equals(oldValue)) {
+ loadRepos.clear();
+ newProposedFeature.clear();
+ }
+ InputStream input = null;
+ try {
+ input = new BufferedInputStream(new FileInputStream(getDestinationValue()));
+ features = importexportService.importP2F(input);
+ viewer.setInput(features.toArray(new IUDetail[features.size()]));
+ input.close();
+ } catch (FileNotFoundException e) {
+ MessageDialog.openError(getShell(), Messages.ImportPage_TITLE, Messages.ImportPage_FILENOTFOUND);
+ } catch (IOException e) {
+ //TODO
+ e.printStackTrace();
+ }
+ }
+ }
+
+ @Override
+ protected boolean validDestination() {
+ File target = new File(getDestinationValue());
+ return super.validDestination() && target.exists() && target.canRead();
+ }
+
+ public Object[] getCheckedIUElements() {
+ Object[] checked = viewer.getCheckedElements();
+ List<IUDetail> features = new ArrayList<IUDetail>(checked.length);
+ for (int i = 0; i < checked.length; i++) {
+ IUDetail feature = (IUDetail) checked[i];
+ IUDetail[] existingFeatures = newProposedFeature.get(feature);
+ if (existingFeatures == null)
+ features.add(feature);
+ else {
+ IUDetail matchPolicy = null;
+ for (IUDetail f : existingFeatures) {
+ if (matchPolicy == null)
+ matchPolicy = f;
+ // here use exact match
+ else if (matchPolicy.getIU().getVersion().compareTo(f.getIU().getVersion()) < 0) {
+ if (installLatest.getSelection())
+ matchPolicy = f;
+ else
+ continue;
+ } else
+ matchPolicy = f;
+ }
+ if (matchPolicy != null)
+ features.add(matchPolicy);
+ }
+ }
+ return features.toArray(new IUDetail[features.size()]);
+ }
+
+ public Object[] getSelectedIUElements() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setCheckedElements(Object[] elements) {
+ new UnsupportedOperationException();
+ }
+
+ public ProvisioningContext getProvisioningContext() {
+ if (agent != null) {
+ Object[] checked = viewer.getCheckedElements();
+ List<URI> referredRepos = new ArrayList<URI>(checked.length);
+ for (Object checkItem : checked) {
+ IUDetail feature = (IUDetail) checkItem;
+ for (URI uri : feature.getReferencedRepositories()) {
+ referredRepos.add(uri);
+ }
+ }
+ ProvisioningContext context = new ProvisioningContext(agent);
+ if (!contactAll.getSelection()) {
+ context.setArtifactRepositories(referredRepos.toArray(new URI[referredRepos.size()]));
+ context.setMetadataRepositories(referredRepos.toArray(new URI[referredRepos.size()]));
+ }
+ return context;
+ }
+ return null;
+ }
+
+ public boolean hasUnloadedRepo() {
+ for (Object checked : viewer.getCheckedElements()) {
+ IUDetail feature = (IUDetail) checked;
+ for (URI uri : feature.getReferencedRepositories())
+ if (!loadRepos.contains(uri))
+ return true;
+ }
+ return false;
+ }
+
+ class GetCheckedElement implements Runnable {
+ Object[] checkedElements = null;
+
+ public void run() {
+ checkedElements = viewer.getCheckedElements();
+ }
+ }
+
+ public Object[] getChecked() {
+ if (Display.findDisplay(Thread.currentThread()) != null)
+ return viewer.getCheckedElements();
+ else {
+ GetCheckedElement get = new GetCheckedElement();
+ Display.getDefault().syncExec(get);
+ return get.checkedElements;
+ }
+ }
+
+ public void recompute(IProgressMonitor monitor) throws InterruptedException {
+ SubMonitor sub = SubMonitor.convert(monitor, Messages.ImportPage_QueryFeaturesJob, 1000);
+ if (agent != null) {
+ IMetadataRepositoryManager metaManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+ IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
+ Object[] checked = getChecked();
+ sub.setWorkRemaining(100 * checked.length);
+ for (Object item : checked) {
+ IUDetail feature = (IUDetail) item;
+ if (!newProposedFeature.containsKey(feature)) {
+ if (sub.isCanceled())
+ throw new InterruptedException();
+ SubMonitor sub2 = sub.newChild(100, SubMonitor.SUPPRESS_ALL_LABELS);
+ sub2.setWorkRemaining(feature.getReferencedRepositories().size() * 500 + 100);
+ List<IRepository<IInstallableUnit>> repos = new ArrayList<IRepository<IInstallableUnit>>();
+ for (URI uri : feature.getReferencedRepositories()) {
+ if (!metaManager.contains(uri)) {
+ metaManager.addRepository(uri);
+ }
+ metaManager.setEnabled(uri, true);
+ try {
+ repos.add(metaManager.loadRepository(uri, sub2.newChild(500)));
+ } catch (ProvisionException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (OperationCanceledException e) {
+ throw new InterruptedException(e.getLocalizedMessage());
+ }
+ if (!artifactManager.contains(uri)) {
+ artifactManager.addRepository(uri);
+ }
+ artifactManager.setEnabled(uri, true);
+ }
+ if (sub2.isCanceled())
+ throw new InterruptedException();
+ Set<IInstallableUnit> result = new CompoundQueryable<IInstallableUnit>(repos.toArray(new IRepository[repos.size()])).query(QueryUtil.createIUQuery(feature.getIU().getId(), new VersionRange(feature.getIU().getVersion(), true, null, false)), sub2.newChild(100)).toSet();
+ List<IUDetail> existingFeatures = new ArrayList<IUDetail>(result.size());
+ for (IInstallableUnit iu : result) {
+ existingFeatures.add(new IUDetail(iu, feature.getReferencedRepositories()));
+ }
+ newProposedFeature.put(feature, existingFeatures.toArray(new IUDetail[existingFeatures.size()]));
+ } else {
+ if (sub.isCanceled())
+ throw new InterruptedException();
+ sub.worked(100);
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportWizard.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportWizard.java
new file mode 100644
index 000000000..520102721
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportWizard.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * Copyright (c) 2011 WindRiver Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * WindRiver Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.importexport.internal.wizard;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Collection;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.importexport.internal.Constants;
+import org.eclipse.equinox.internal.p2.importexport.internal.Messages;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ISelectableIUsPage;
+import org.eclipse.equinox.internal.p2.ui.dialogs.InstallWizard;
+import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.InstallOperation;
+import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IImportWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+public class ImportWizard extends InstallWizard implements IImportWizard {
+
+ public ImportWizard() {
+ this(ProvisioningUI.getDefaultUI(), null, null, null);
+ }
+
+ public ImportWizard(ProvisioningUI ui, InstallOperation operation, Collection<IInstallableUnit> initialSelections, LoadMetadataRepositoryJob preloadJob) {
+ super(ui, operation, initialSelections, preloadJob);
+ }
+
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ setWindowTitle(Messages.ImportWizard_WINDOWTITLE);
+ setDefaultPageImageDescriptor(ImageDescriptor.createFromURL(Platform.getBundle(Constants.Bundle_ID).getEntry("icons/install_wiz.gif"))); //$NON-NLS-1$
+ setNeedsProgressMonitor(true);
+ }
+
+ @Override
+ protected ISelectableIUsPage createMainPage(IUElementListRoot input,
+ Object[] selections) {
+ return new ImportPage(ui, this);
+ }
+
+ @Override
+ protected ProvisioningContext getProvisioningContext() {
+ return ((ImportPage) mainPage).getProvisioningContext();
+ }
+
+ /**
+ * Recompute the provisioning plan based on the items in the IUElementListRoot and the given provisioning context.
+ * Report progress using the specified runnable context. This method may be called before the page is created.
+ *
+ * @param runnableContext
+ */
+ @Override
+ public void recomputePlan(IRunnableContext runnableContext) {
+ if (((ImportPage) mainPage).hasUnloadedRepo()) {
+ try {
+ runnableContext.run(true, true, new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) throws InterruptedException {
+ SubMonitor sub = SubMonitor.convert(monitor, 1000);
+ ((ImportPage) mainPage).recompute(sub.newChild(800));
+ if (sub.isCanceled())
+ throw new InterruptedException();
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ ProvisioningContext context = getProvisioningContext();
+ initializeResolutionModelElements(getOperationSelections());
+ if (planSelections.length == 0) {
+ operation = null;
+ couldNotResolve(ProvUIMessages.ResolutionWizardPage_NoSelections);
+ } else {
+ operation = getProfileChangeOperation(planSelections);
+ operation.setProvisioningContext(context);
+ }
+ }
+ });
+ if (sub.isCanceled())
+ throw new InterruptedException();
+ operation.resolveModal(sub.newChild(200));
+ Display.getDefault().asyncExec(new Runnable() {
+
+ public void run() {
+ planChanged();
+ }
+ });
+ }
+ });
+ } catch (InterruptedException e) {
+ // Nothing to report if thread was interrupted
+ } catch (InvocationTargetException e) {
+ ProvUI.handleException(e.getCause(), null, StatusManager.SHOW | StatusManager.LOG);
+ couldNotResolve(null);
+ }
+ } else
+ super.recomputePlan(runnableContext);
+ }
+
+ void couldNotResolve(String message) {
+ IStatus couldNotResolveStatus;
+ if (message != null) {
+ couldNotResolveStatus = new Status(IStatus.ERROR, Constants.Bundle_ID, message, null);
+ } else {
+ couldNotResolveStatus = new Status(IStatus.ERROR, Constants.Bundle_ID, ProvUIMessages.ProvisioningOperationWizard_UnexpectedFailureToResolve, null);
+ }
+ StatusManager.getManager().handle(couldNotResolveStatus, StatusManager.LOG);
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/persistence/P2FConstants.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/persistence/P2FConstants.java
new file mode 100644
index 000000000..295414db2
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/persistence/P2FConstants.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2011 WindRiver Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * WindRiver Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.importexport.persistence;
+
+import org.eclipse.equinox.p2.metadata.Version;
+
+public interface P2FConstants {
+
+ public static final Version CURRENT_VERSION = Version.createOSGi(1, 0, 0);
+
+ public static final String P2F_ELEMENT = "p2f"; //$NON-NLS-1$
+ public static final String IUS_ELEMENT = "ius"; //$NON-NLS-1$
+ public static final String IU_ELEMENT = "iu"; //$NON-NLS-1$
+
+ public static final String REPOSITORIES_ELEMENT = "repositories"; //$NON-NLS-1$
+ public static final String REPOSITORY_ELEMENT = "repository"; //$NON-NLS-1$
+ public static final String P2FURI_ATTRIBUTE = "uri"; //$NON-NLS-1$
+
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/persistence/P2FParser.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/persistence/P2FParser.java
new file mode 100644
index 000000000..ce550cb51
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/persistence/P2FParser.java
@@ -0,0 +1,236 @@
+/*******************************************************************************
+ * Copyright (c) 2011 WindRiver Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * WindRiver Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.importexport.persistence;
+
+import java.io.*;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.parsers.ParserConfigurationException;
+import org.eclipse.equinox.internal.p2.importexport.IUDetail;
+import org.eclipse.equinox.internal.p2.importexport.internal.Messages;
+import org.eclipse.equinox.internal.p2.persistence.XMLParser;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.BundleContext;
+import org.xml.sax.*;
+
+public class P2FParser extends XMLParser implements P2FConstants {
+ static final VersionRange XML_TOLERANCE = new VersionRange(CURRENT_VERSION, true, Version.createOSGi(2, 0, 0), false);
+
+ List<IUDetail> iusListed;
+
+ protected class RepositoryHandler extends AbstractHandler {
+
+ private final String[] required = new String[] {LOCATION_ELEMENT};
+ private final String[] optional = new String[] {};
+ private URI referredRepo;
+ private List<URI> uri;
+
+ public RepositoryHandler(AbstractHandler parentHandler, Attributes attributes, List<URI> uri) {
+ super(parentHandler, REPOSITORY_ELEMENT);
+ String[] values = parseAttributes(attributes, required, optional);
+ //skip entire subrepository if the location is missing
+ if (values[0] == null)
+ return;
+ this.uri = uri;
+ referredRepo = checkURI(REPOSITORY_ELEMENT, LOCATION_ELEMENT, values[0]);
+ }
+
+ @Override
+ public void startElement(String name, Attributes attributes) throws SAXException {
+ checkCancel();
+ }
+
+ @Override
+ protected void finished() {
+ if (referredRepo != null)
+ uri.add(referredRepo);
+ }
+ }
+
+ protected class RepositoriesHandler extends AbstractHandler {
+
+ List<URI> uris;
+
+ public RepositoriesHandler(AbstractHandler parentHandler, Attributes attributes) {
+ super(parentHandler, REPOSITORIES_ELEMENT);
+ String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
+ uris = (size == null) ? new ArrayList<URI>() : new ArrayList<URI>(new Integer(size).intValue());
+ }
+
+ @Override
+ public void startElement(String name, Attributes attributes) throws SAXException {
+ if (name.equals(REPOSITORY_ELEMENT)) {
+ new RepositoryHandler(this, attributes, uris);
+ }
+ }
+
+ public List<URI> getRepositories() {
+ return uris;
+ }
+ }
+
+ protected class IUHandler extends AbstractHandler {
+ private final String[] required = new String[] {ID_ATTRIBUTE, NAME_ATTRIBUTE, VERSION_ATTRIBUTE};
+ private final String[] optional = new String[] {};
+
+ IInstallableUnit iu = null;
+ private RepositoriesHandler repositoriesHandler;
+ private List<IUDetail> ius;
+
+ public IUHandler(AbstractHandler parentHandler, Attributes attributes, List<IUDetail> ius) {
+ super(parentHandler, IU_ELEMENT);
+ String[] values = parseAttributes(attributes, required, optional);
+ //skip entire record if the id is missing
+ if (values[0] == null)
+ return;
+ MetadataFactory.InstallableUnitDescription desc = new MetadataFactory.InstallableUnitDescription();
+ desc.setId(values[0]);
+ desc.setProperty(IInstallableUnit.PROP_NAME, values[1]);
+ desc.setVersion(Version.create(values[2]));
+ iu = MetadataFactory.createInstallableUnit(desc);
+ this.ius = ius;
+ }
+
+ @Override
+ public void startElement(String name, Attributes attributes) {
+ if (name.equals(REPOSITORIES_ELEMENT)) {
+ repositoriesHandler = new RepositoriesHandler(this, attributes);
+ }
+ }
+
+ @Override
+ protected void finished() {
+ if (isValidXML()) {
+ ius.add(new IUDetail(iu, repositoriesHandler.getRepositories()));
+ }
+ }
+ }
+
+ protected class IUsHandler extends AbstractHandler {
+
+ private final List<IUDetail> ius;
+
+ public IUsHandler(ContentHandler parentHandler, Attributes attributes) {
+ super(parentHandler, IUS_ELEMENT);
+ String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
+ ius = (size != null ? new ArrayList<IUDetail>(new Integer(size).intValue()) : new ArrayList<IUDetail>());
+ }
+
+ @Override
+ public void startElement(String name, Attributes attributes) {
+ if (name.equals(IU_ELEMENT)) {
+ new IUHandler(this, attributes, ius);
+ } else {
+ invalidElement(name, attributes);
+ }
+ }
+
+ public List<IUDetail> getIUs() {
+ return ius;
+ }
+ }
+
+ private final class P2FDocHandler extends DocHandler {
+
+ public P2FDocHandler(String rootName, RootHandler rootHandler) {
+ super(rootName, rootHandler);
+ }
+
+ @Override
+ public void processingInstruction(String target, String data) throws SAXException {
+ Version repositoryVersion = extractPIVersion(target, data);
+ if (!XML_TOLERANCE.isIncluded(repositoryVersion)) {
+ throw new SAXException(NLS.bind(Messages.io_IncompatibleVersion, repositoryVersion, XML_TOLERANCE));
+ }
+ }
+ }
+
+ final class P2FHandler extends RootHandler {
+ private final String[] required = new String[] {VERSION_ATTRIBUTE};
+ private final String[] optional = new String[] {};
+ private String[] attrValues = new String[required.length + optional.length];
+
+ private IUsHandler iusHandler;
+
+ @Override
+ protected void handleRootAttributes(Attributes attributes) {
+ attrValues = parseAttributes(attributes, required, optional);
+ attrValues[0] = checkVersion(P2F_ELEMENT, VERSION_ATTRIBUTE, attrValues[0]).toString();
+ }
+
+ @Override
+ public void startElement(String name, Attributes attributes) throws SAXException {
+ if (IUS_ELEMENT.equals(name)) {
+ if (iusHandler == null) {
+ iusHandler = new IUsHandler(this, attributes);
+ } else {
+ duplicateElement(this, name, attributes);
+ }
+ } else {
+ invalidElement(name, attributes);
+ }
+ }
+
+ @Override
+ protected void finished() {
+ if (isValidXML()) {
+ iusListed = iusHandler.getIUs();
+ }
+ }
+ }
+
+ public P2FParser(BundleContext context, String pluginId) {
+ super(context, pluginId);
+ }
+
+ public void parse(File file) throws IOException {
+ // don't overwrite if we already have a filename/location
+ if (errorContext == null)
+ setErrorContext(file.getAbsolutePath());
+ 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();
+ P2FHandler p2fHandler = new P2FHandler();
+ xmlReader.setContentHandler(new P2FDocHandler(P2F_ELEMENT, p2fHandler));
+ xmlReader.parse(new InputSource(stream));
+ } catch (SAXException e) {
+ throw new IOException(e.getMessage());
+ } catch (ParserConfigurationException e) {
+ throw new IOException(e.getMessage());
+ } finally {
+ stream.close();
+ }
+ }
+
+ public List<IUDetail> getIUs() {
+ return iusListed;
+ }
+
+ @Override
+ protected Object getRootObject() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ protected String getErrorMessage() {
+ return Messages.io_parseError;
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/persistence/P2FWriter.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/persistence/P2FWriter.java
new file mode 100755
index 000000000..13c5dc69e
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/persistence/P2FWriter.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2011 WindRiver Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * WindRiver Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.importexport.persistence;
+
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.URI;
+import java.util.List;
+import java.util.Locale;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.internal.p2.importexport.IUDetail;
+import org.eclipse.equinox.internal.p2.persistence.XMLWriter;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+
+public class P2FWriter extends XMLWriter implements P2FConstants {
+
+ public P2FWriter(OutputStream output, ProcessingInstruction[] piElements) throws UnsupportedEncodingException {
+ super(output, piElements);
+ }
+
+ public void write(List<IUDetail> features) {
+ start(P2F_ELEMENT);
+ attribute(VERSION_ATTRIBUTE, CURRENT_VERSION);
+ writeFeatures(features);
+ end(P2F_ELEMENT);
+ flush();
+ }
+
+ private void writeFeatures(List<IUDetail> features) {
+ start(IUS_ELEMENT);
+ attributeOptional(COLLECTION_SIZE_ATTRIBUTE, String.valueOf(features.size()));
+ for (IUDetail feature : features)
+ writeFeature(feature);
+ end(IUS_ELEMENT);
+ }
+
+ private void writeFeature(IUDetail feature) {
+ IInstallableUnit unit = feature.getIU();
+ start(IU_ELEMENT);
+ attribute(ID_ATTRIBUTE, unit.getId());
+ attribute(NAME_ATTRIBUTE, unit.getProperty(IInstallableUnit.PROP_NAME, Locale.getDefault().toString()));
+ attribute(VERSION_ATTRIBUTE, unit.getVersion().toString());
+ start(REPOSITORIES_ELEMENT);
+ attribute(COLLECTION_SIZE_ATTRIBUTE, feature.getReferencedRepositories().size());
+ for (URI uri : feature.getReferencedRepositories()) {
+ start(REPOSITORY_ELEMENT);
+ String unencoded = URIUtil.toUnencodedString(uri);
+ attribute(LOCATION_ELEMENT, unencoded);
+ end(REPOSITORY_ELEMENT);
+ }
+ end(REPOSITORIES_ELEMENT);
+ end(IU_ELEMENT);
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.classpath b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.cvsignore b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.cvsignore
deleted file mode 100644
index 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 f14e3bffe..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,329 +0,0 @@
-#Tue Mar 16 19:07:09 EDT 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 2ee161f08..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:59:31 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF
deleted file mode 100644
index db8df9b91..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,39 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-SymbolicName: org.eclipse.equinox.p2.ui.sdk.scheduler;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.ui.sdk.scheduler.AutomaticUpdatePlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.ui.sdk.scheduler;x-internal:=true
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.equinox.p2.updatechecker,
- org.eclipse.equinox.p2.ui
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: com.ibm.icu.util;version="4.0.1",
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.engine,
- org.eclipse.equinox.internal.p2.engine.phases,
- org.eclipse.equinox.internal.p2.metadata.query,
- org.eclipse.equinox.internal.p2.ui.actions,
- org.eclipse.equinox.internal.p2.ui.query,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.p2.updatechecker,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.operations;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.ui;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.service.resolver;version="1.1.0",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.service.packageadmin;version="1.2.0"
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/about.html b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/build.properties b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/build.properties
deleted file mode 100644
index 2d22063e4..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.properties,\
- icons/,\
- .,\
- about.html,\
- META-INF/,\
- plugin.xml
-src.includes = about.html
-source.. = src/
-javacTarget=jsr14
-javacSource=1.5 \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close.gif b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close.gif
deleted file mode 100644
index 1aca259db..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close_hot.gif b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close_hot.gif
deleted file mode 100644
index d5360165c..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close_hot.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update.gif b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update.gif
deleted file mode 100644
index aa84ebeaa..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update_problems.gif b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update_problems.gif
deleted file mode 100644
index c0cfaca34..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update_problems.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/plugin.properties b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/plugin.properties
deleted file mode 100644
index 13b5161b8..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/plugin.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-#
-# Provisioning Automatic Update plugin resources
-#
-providerName = Eclipse.org - Equinox
-bundleName=Equinox Provisioning Platform Automatic Update Support
-IU.general=General Information
-IU.license=License Agreement
-IU.copyright=Copyright
-automaticUpdatesPrefPage = Automatic Updates
-preferenceKeywords.general=automatic update schedule download software install import bundle \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/plugin.xml b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/plugin.xml
deleted file mode 100644
index 3072ef78b..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/plugin.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- id="preferences" point="org.eclipse.core.runtime.preferences" name="%automaticUpdatesPrefPage">
- <initializer class="org.eclipse.equinox.internal.p2.ui.sdk.scheduler.PreferenceInitializer"/>
- </extension>
- <extension
- point="org.eclipse.ui.startup">
- <startup class="org.eclipse.equinox.internal.p2.ui.sdk.scheduler.AutomaticUpdateScheduler">
- </startup>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%automaticUpdatesPrefPage"
- category="org.eclipse.equinox.internal.p2.ui.sdk.ProvisioningPreferencePage"
- class="org.eclipse.equinox.internal.p2.ui.sdk.scheduler.AutomaticUpdatesPreferencePage"
- id="org.eclipse.equinox.internal.p2.ui.sdk.scheduler.AutomaticUpdatesPreferencePage">
- <keywordReference id="org.eclipse.equinox.p2.ui.sdk.updates.general"/>
- </page>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/pom.xml b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/pom.xml
deleted file mode 100644
index 5689df805..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.ui.sdk.scheduler</artifactId>
- <version>1.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateMessages.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateMessages.java
deleted file mode 100644
index 17be7f356..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateMessages.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Message class for provisioning UI messages.
- *
- * @since 3.5
- */
-public class AutomaticUpdateMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.ui.sdk.scheduler.messages"; //$NON-NLS-1$
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, AutomaticUpdateMessages.class);
- }
- public static String SchedulerStartup_day;
- public static String SchedulerStartup_Monday;
- public static String SchedulerStartup_Tuesday;
- public static String SchedulerStartup_Wednesday;
- public static String SchedulerStartup_Thursday;
- public static String SchedulerStartup_Friday;
- public static String SchedulerStartup_Saturday;
- public static String SchedulerStartup_Sunday;
- public static String SchedulerStartup_1AM;
- public static String SchedulerStartup_2AM;
- public static String SchedulerStartup_3AM;
- public static String SchedulerStartup_4AM;
- public static String SchedulerStartup_5AM;
- public static String SchedulerStartup_6AM;
- public static String SchedulerStartup_7AM;
- public static String SchedulerStartup_8AM;
- public static String SchedulerStartup_9AM;
- public static String SchedulerStartup_10AM;
- public static String SchedulerStartup_11AM;
- public static String SchedulerStartup_12PM;
- public static String SchedulerStartup_1PM;
- public static String SchedulerStartup_2PM;
- public static String SchedulerStartup_3PM;
- public static String SchedulerStartup_4PM;
- public static String SchedulerStartup_5PM;
- public static String SchedulerStartup_6PM;
- public static String SchedulerStartup_7PM;
- public static String SchedulerStartup_8PM;
- public static String SchedulerStartup_9PM;
- public static String SchedulerStartup_10PM;
- public static String SchedulerStartup_11PM;
- public static String SchedulerStartup_12AM;
- public static String AutomaticUpdatesPopup_PrefLinkOnly;
- public static String AutomaticUpdatesPopup_RemindAndPrefLink;
- public static String AutomaticUpdatesPopup_ReminderJobTitle;
- public static String AutomaticUpdatesPreferencePage_findUpdates;
- public static String AutomaticUpdateScheduler_30Minutes;
- public static String AutomaticUpdateScheduler_60Minutes;
- public static String AutomaticUpdateScheduler_240Minutes;
- public static String AutomaticUpdateScheduler_UpdateNotInitialized;
- public static String AutomaticUpdatesPopup_UpdatesAvailableTitle;
- public static String AutomaticUpdater_AutomaticDownloadOperationName;
- public static String AutomaticUpdater_ClickToReviewUpdates;
- public static String AutomaticUpdater_ClickToReviewUpdatesWithProblems;
- public static String AutomaticUpdatesPreferencePage_UpdateSchedule;
- public static String AutomaticUpdatesPreferencePage_findOnStart;
- public static String AutomaticUpdatesPreferencePage_findOnSchedule;
- public static String AutomaticUpdatesPreferencePage_downloadOptions;
- public static String AutomaticUpdatesPreferencePage_searchAndNotify;
- public static String AutomaticUpdatesPreferencePage_downloadAndNotify;
- public static String AutomaticUpdatesPreferencePage_at;
- public static String AutomaticUpdatesPreferencePage_GenericProductName;
- public static String AutomaticUpdatesPreferencePage_RemindGroup;
- public static String AutomaticUpdatesPreferencePage_RemindSchedule;
- public static String AutomaticUpdatesPreferencePage_RemindOnce;
- public static String AutomaticUpdatesPopup_ClickToReviewDownloaded;
- public static String AutomaticUpdatesPopup_ClickToReviewNotDownloaded;
- public static String ErrorSavingPreferences;
- public static String ErrorSavingClassicPreferences;
- public static String ErrorLoadingPreferenceKeys;
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java
deleted file mode 100644
index 8b5a97e11..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
-
-import java.io.IOException;
-import java.net.URL;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.engine.ProfileScope;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.ui.preferences.ScopedPreferenceStore;
-import org.eclipse.ui.statushandlers.StatusManager;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-/**
- * Activator class for the automatic updates plugin
- */
-public class AutomaticUpdatePlugin extends AbstractUIPlugin {
-
- // bundle-relative icon path
- public final static String ICON_PATH = "$nl$/icons/"; //$NON-NLS-1$
-
- // tool icons
- public final static String IMG_TOOL_UPDATE = "tool/update.gif"; //$NON-NLS-1$
- public final static String IMG_TOOL_UPDATE_PROBLEMS = "tool/update_problems.gif"; //$NON-NLS-1$
- public final static String IMG_TOOL_CLOSE = "tool/close.gif"; //$NON-NLS-1$
- public final static String IMG_TOOL_CLOSE_HOT = "tool/close_hot.gif"; //$NON-NLS-1$
-
- private static AutomaticUpdatePlugin plugin;
- private static BundleContext context;
-
- private AutomaticUpdateScheduler scheduler;
- private AutomaticUpdater updater;
- private ScopedPreferenceStore preferenceStore;
-
- private ProvisioningSession session;
-
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.ui.sdk.scheduler"; //$NON-NLS-1$
-
- public static BundleContext getContext() {
- return context;
- }
-
- /**
- * Returns the singleton plugin instance
- *
- * @return the instance
- */
- public static AutomaticUpdatePlugin getDefault() {
- return plugin;
- }
-
- public AutomaticUpdatePlugin() {
- // constructor
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
- * )
- */
- public void start(BundleContext bundleContext) throws Exception {
- super.start(bundleContext);
- plugin = this;
- context = bundleContext;
- IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(getContext(), IProvisioningAgent.SERVICE_NAME);
- session = new ProvisioningSession(agent);
-
- PreferenceInitializer.migratePreferences();
- }
-
- public void stop(BundleContext bundleContext) throws Exception {
- if (scheduler != null) {
- scheduler.shutdown();
- scheduler = null;
- }
- if (updater != null) {
- updater.shutdown();
- updater = null;
- }
- plugin = null;
- super.stop(bundleContext);
- context = null;
- }
-
- public AutomaticUpdateScheduler getScheduler() {
- // If the scheduler was disabled, it does not get initialized
- if (scheduler == null)
- scheduler = new AutomaticUpdateScheduler();
- return scheduler;
- }
-
- public AutomaticUpdater getAutomaticUpdater() {
- if (updater == null)
- updater = new AutomaticUpdater();
- return updater;
- }
-
- void setScheduler(AutomaticUpdateScheduler scheduler) {
- this.scheduler = scheduler;
- }
-
- public IProvisioningEventBus getProvisioningEventBus() {
- ServiceReference busReference = context.getServiceReference(IProvisioningEventBus.SERVICE_NAME);
- if (busReference == null)
- return null;
- return (IProvisioningEventBus) context.getService(busReference);
- }
-
- /*
- * Overridden to use a profile scoped preference store. (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#getPreferenceStore()
- */
- public IPreferenceStore getPreferenceStore() {
- // Create the preference store lazily.
- if (preferenceStore == null) {
- final IAgentLocation agentLocation = getAgentLocation();
- if (agentLocation == null)
- return super.getPreferenceStore();
- preferenceStore = new ScopedPreferenceStore(new ProfileScope(agentLocation, IProfileRegistry.SELF), PLUGIN_ID);
- }
- return preferenceStore;
- }
-
- public IAgentLocation getAgentLocation() {
- ServiceReference ref = getContext().getServiceReference(IAgentLocation.SERVICE_NAME);
- if (ref == null)
- return null;
- IAgentLocation location = (IAgentLocation) getContext().getService(ref);
- getContext().ungetService(ref);
- return location;
- }
-
- public void savePreferences() {
- if (preferenceStore != null)
- try {
- preferenceStore.save();
- } catch (IOException e) {
- StatusManager.getManager().handle(new Status(IStatus.ERROR, AutomaticUpdatePlugin.PLUGIN_ID, 0, AutomaticUpdateMessages.ErrorSavingPreferences, e), StatusManager.LOG | StatusManager.SHOW);
- }
- }
-
- protected void initializeImageRegistry(ImageRegistry reg) {
- createImageDescriptor(IMG_TOOL_UPDATE, reg);
- createImageDescriptor(IMG_TOOL_UPDATE_PROBLEMS, reg);
- createImageDescriptor(IMG_TOOL_CLOSE, reg);
- createImageDescriptor(IMG_TOOL_CLOSE_HOT, reg);
- }
-
- /**
- * Creates the specified image descriptor and registers it
- */
- private void createImageDescriptor(String id, ImageRegistry reg) {
- URL url = FileLocator.find(getBundle(), new Path(ICON_PATH).append(id), null);
- ImageDescriptor desc = ImageDescriptor.createFromURL(url);
- reg.put(id, desc);
- }
-
- public ProvisioningSession getSession() {
- return session;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.java
deleted file mode 100644
index cfb42f3cc..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
-
-import com.ibm.icu.util.Calendar;
-import com.ibm.icu.util.ULocale;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.updatechecker.*;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.ui.IStartup;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * This plug-in is loaded on startup to register with the update checker.
- *
- * @since 3.5
- */
-public class AutomaticUpdateScheduler implements IStartup {
- // values are to be picked up from the arrays DAYS and HOURS
- public static final String P_DAY = "day"; //$NON-NLS-1$
-
- public static final String P_HOUR = "hour"; //$NON-NLS-1$
-
- public static final String[] DAYS;
-
- public static final String[] HOURS = {AutomaticUpdateMessages.SchedulerStartup_1AM, AutomaticUpdateMessages.SchedulerStartup_2AM, AutomaticUpdateMessages.SchedulerStartup_3AM, AutomaticUpdateMessages.SchedulerStartup_4AM, AutomaticUpdateMessages.SchedulerStartup_5AM, AutomaticUpdateMessages.SchedulerStartup_6AM, AutomaticUpdateMessages.SchedulerStartup_7AM, AutomaticUpdateMessages.SchedulerStartup_8AM, AutomaticUpdateMessages.SchedulerStartup_9AM, AutomaticUpdateMessages.SchedulerStartup_10AM, AutomaticUpdateMessages.SchedulerStartup_11AM, AutomaticUpdateMessages.SchedulerStartup_12PM, AutomaticUpdateMessages.SchedulerStartup_1PM, AutomaticUpdateMessages.SchedulerStartup_2PM, AutomaticUpdateMessages.SchedulerStartup_3PM, AutomaticUpdateMessages.SchedulerStartup_4PM,
- AutomaticUpdateMessages.SchedulerStartup_5PM, AutomaticUpdateMessages.SchedulerStartup_6PM, AutomaticUpdateMessages.SchedulerStartup_7PM, AutomaticUpdateMessages.SchedulerStartup_8PM, AutomaticUpdateMessages.SchedulerStartup_9PM, AutomaticUpdateMessages.SchedulerStartup_10PM, AutomaticUpdateMessages.SchedulerStartup_11PM, AutomaticUpdateMessages.SchedulerStartup_12AM,};
-
- private IUpdateListener listener = null;
- private IUpdateChecker checker = null;
- String profileId;
-
- static {
- Calendar calendar = Calendar.getInstance(new ULocale(Platform.getNL()));
- String[] daysAsStrings = {AutomaticUpdateMessages.SchedulerStartup_day, AutomaticUpdateMessages.SchedulerStartup_Sunday, AutomaticUpdateMessages.SchedulerStartup_Monday, AutomaticUpdateMessages.SchedulerStartup_Tuesday, AutomaticUpdateMessages.SchedulerStartup_Wednesday, AutomaticUpdateMessages.SchedulerStartup_Thursday, AutomaticUpdateMessages.SchedulerStartup_Friday, AutomaticUpdateMessages.SchedulerStartup_Saturday};
- int firstDay = calendar.getFirstDayOfWeek();
- DAYS = new String[8];
- DAYS[0] = daysAsStrings[0];
- int countDays = 0;
- for (int i = firstDay; i <= 7; i++) {
- DAYS[++countDays] = daysAsStrings[i];
- }
- for (int i = 1; i < firstDay; i++) {
- DAYS[++countDays] = daysAsStrings[i];
- }
- }
-
- /**
- * The constructor.
- */
- public AutomaticUpdateScheduler() {
- AutomaticUpdatePlugin.getDefault().setScheduler(this);
- IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(AutomaticUpdatePlugin.getContext(), IProvisioningAgent.SERVICE_NAME);
- checker = (IUpdateChecker) agent.getService(IUpdateChecker.SERVICE_NAME);
- if (checker == null) {
- // Something did not initialize properly
- IStatus status = new Status(IStatus.ERROR, AutomaticUpdatePlugin.PLUGIN_ID, AutomaticUpdateMessages.AutomaticUpdateScheduler_UpdateNotInitialized);
- StatusManager.getManager().handle(status, StatusManager.LOG);
- return;
- }
- profileId = IProfileRegistry.SELF;
- }
-
- public void earlyStartup() {
- scheduleUpdate();
- }
-
- public void shutdown() {
- removeUpdateListener();
- }
-
- public void rescheduleUpdate() {
- removeUpdateListener();
- IPreferenceStore pref = AutomaticUpdatePlugin.getDefault().getPreferenceStore();
- String schedule = pref.getString(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE);
- // See if we have a scheduled check or startup only. If it is
- // startup only, there is nothing more to do now, a listener will
- // be created on the next startup.
- if (schedule.equals(PreferenceConstants.PREF_UPDATE_ON_STARTUP)) {
- return;
- }
- scheduleUpdate();
- }
-
- private void scheduleUpdate() {
- // Nothing to do if we don't know what profile we are checking
- if (profileId == null)
- return;
- IPreferenceStore pref = AutomaticUpdatePlugin.getDefault().getPreferenceStore();
- // See if automatic search is enabled at all
- if (!pref.getBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED))
- return;
- String schedule = pref.getString(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE);
- long delay = IUpdateChecker.ONE_TIME_CHECK;
- long poll = IUpdateChecker.ONE_TIME_CHECK;
- if (!schedule.equals(PreferenceConstants.PREF_UPDATE_ON_STARTUP)) {
- delay = computeDelay(pref);
- poll = computePoll(pref);
- }
- // We do not access the AutomaticUpdater directly when we register
- // the listener. This prevents the UI classes from being started up
- // too soon.
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=227582
- listener = new IUpdateListener() {
- public void updatesAvailable(UpdateEvent event) {
- AutomaticUpdatePlugin.getDefault().getAutomaticUpdater().updatesAvailable(event);
- }
-
- };
- checker.addUpdateCheck(profileId, getProfileQuery(), delay, poll, listener);
-
- }
-
- private IQuery<IInstallableUnit> getProfileQuery() {
- // We specifically avoid using the default policy's root property so that we don't load all the
- // p2 UI classes in doing so.
- return new IUProfilePropertyQuery(IProfile.PROP_PROFILE_ROOT_IU, Boolean.TRUE.toString());
- }
-
- private int getDay(IPreferenceStore pref) {
- String day = pref.getString(P_DAY);
- for (int d = 0; d < DAYS.length; d++)
- if (DAYS[d].equals(day))
- switch (d) {
- case 0 :
- return -1;
- case 1 :
- return Calendar.MONDAY;
- case 2 :
- return Calendar.TUESDAY;
- case 3 :
- return Calendar.WEDNESDAY;
- case 4 :
- return Calendar.THURSDAY;
- case 5 :
- return Calendar.FRIDAY;
- case 6 :
- return Calendar.SATURDAY;
- case 7 :
- return Calendar.SUNDAY;
- }
- return -1;
- }
-
- private int getHour(IPreferenceStore pref) {
- String hour = pref.getString(P_HOUR);
- for (int h = 0; h < HOURS.length; h++)
- if (HOURS[h].equals(hour))
- return h + 1;
- return 1;
- }
-
- /*
- * Computes the number of milliseconds from this moment to the next
- * scheduled update check. If that moment has already passed, returns 0L (start
- * immediately).
- */
- private long computeDelay(IPreferenceStore pref) {
-
- int target_d = getDay(pref);
- int target_h = getHour(pref);
-
- Calendar calendar = Calendar.getInstance();
- // may need to use the BootLoader locale
- int current_d = calendar.get(Calendar.DAY_OF_WEEK);
- // starts with SUNDAY
- int current_h = calendar.get(Calendar.HOUR_OF_DAY);
- int current_m = calendar.get(Calendar.MINUTE);
- int current_s = calendar.get(Calendar.SECOND);
- int current_ms = calendar.get(Calendar.MILLISECOND);
-
- long delay = 0L; // milliseconds
-
- if (target_d == -1) {
- // Compute the delay for "every day at x o'clock"
- // Is it now ?
- if (target_h == current_h && current_m == 0 && current_s == 0)
- return delay;
-
- int delta_h = target_h - current_h;
- if (target_h <= current_h)
- delta_h += 24;
- delay = ((delta_h * 60 - current_m) * 60 - current_s) * 1000 - current_ms;
- return delay;
- }
- // Compute the delay for "every Xday at x o'clock"
- // Is it now ?
- if (target_d == current_d && target_h == current_h && current_m == 0 && current_s == 0)
- return delay;
-
- int delta_d = target_d - current_d;
- if (target_d < current_d || target_d == current_d && (target_h < current_h || target_h == current_h && current_m > 0))
- delta_d += 7;
-
- delay = (((delta_d * 24 + target_h - current_h) * 60 - current_m) * 60 - current_s) * 1000 - current_ms;
- return delay;
- }
-
- /*
- * Computes the number of milliseconds for the polling frequency.
- * We have already established that there is a schedule, vs. only
- * on startup.
- */
- private long computePoll(IPreferenceStore pref) {
-
- int target_d = getDay(pref);
- if (target_d == -1) {
- // Every 24 hours
- return 24 * 60 * 60 * 1000;
- }
- return 7 * 24 * 60 * 60 * 1000;
- }
-
- private void removeUpdateListener() {
- // Remove the current listener if there is one
- if (listener != null && checker != null) {
- checker.removeUpdateCheck(listener);
- listener = null;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
deleted file mode 100644
index d6adf2684..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
+++ /dev/null
@@ -1,383 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.ProvisioningListener;
-import org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateListener;
-import org.eclipse.equinox.internal.provisional.p2.updatechecker.UpdateEvent;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.*;
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * @since 3.5
- */
-public class AutomaticUpdater implements IUpdateListener {
-
- StatusLineCLabelContribution updateAffordance;
- IStatusLineManager statusLineManager;
- Collection<IInstallableUnit> iusWithUpdates;
- String profileId;
- ProvisioningListener profileListener;
- AutomaticUpdatesPopup popup;
- boolean alreadyDownloaded = false;
- UpdateOperation operation;
- private static final String AUTO_UPDATE_STATUS_ITEM = "AutoUpdatesStatus"; //$NON-NLS-1$
-
- public AutomaticUpdater() {
- createProfileListener();
- }
-
- private void createProfileListener() {
- profileListener = new ProvisioningListener() {
- public void notify(EventObject o) {
- if (o instanceof IProfileEvent) {
- IProfileEvent event = (IProfileEvent) o;
- if (event.getReason() == IProfileEvent.CHANGED && sameProfile(event.getProfileId())) {
- triggerNewUpdateNotification();
- }
- }
- }
- };
- getProvisioningEventBus().addListener(profileListener);
- }
-
- private boolean sameProfile(String another) {
- if (another.equals(IProfileRegistry.SELF)) {
- another = getProfileRegistry().getProfile(another).getProfileId();
- }
- if (profileId.equals(IProfileRegistry.SELF)) {
- profileId = getProfileRegistry().getProfile(profileId).getProfileId();
- }
- return profileId.equals(another);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateListener
- * #
- * updatesAvailable(org.eclipse.equinox.internal.provisional.p2.updatechecker
- * .UpdateEvent)
- */
- public void updatesAvailable(UpdateEvent event) {
- updatesAvailable(event, true);
- }
-
- void updatesAvailable(final UpdateEvent event, final boolean notifyWithPopup) {
- final boolean download = getPreferenceStore().getBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY);
- profileId = event.getProfileId();
- iusWithUpdates = event.getIUs();
- validateIusToUpdate();
- alreadyDownloaded = false;
-
- // Create an update operation to reflect the new updates that are available.
- operation = new UpdateOperation(getSession(), iusWithUpdates);
- operation.setProfileId(event.getProfileId());
- IStatus status = operation.resolveModal(new NullProgressMonitor());
-
- if (!status.isOK() || operation.getPossibleUpdates() == null || operation.getPossibleUpdates().length == 0) {
- if (PlatformUI.isWorkbenchRunning()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- clearUpdateAffordances();
- }
- });
- }
- return;
- }
- // Download the items before notifying user if the
- // preference dictates.
-
- if (download) {
- ProfileModificationJob job = new ProfileModificationJob(AutomaticUpdateMessages.AutomaticUpdater_AutomaticDownloadOperationName, getSession(), event.getProfileId(), operation.getProvisioningPlan(), new ProvisioningContext(getSession().getProvisioningAgent()));
- job.setPhaseSet(PhaseSetFactory.createPhaseSetIncluding(new String[] {PhaseSetFactory.PHASE_COLLECT}));
- job.setUser(false);
- job.setSystem(true);
- job.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent jobEvent) {
- IStatus jobStatus = jobEvent.getResult();
- if (jobStatus.isOK()) {
- alreadyDownloaded = true;
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- notifyUserOfUpdates(operation.getResolutionResult().isOK(), notifyWithPopup);
- }
- });
- } else if (jobStatus.getSeverity() != IStatus.CANCEL) {
- StatusManager.getManager().handle(jobStatus, StatusManager.LOG);
- }
- }
- });
- job.schedule();
- } else {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- notifyUserOfUpdates(operation.getResolutionResult().isOK(), notifyWithPopup);
- }
- });
- }
-
- }
-
- ProvisioningSession getSession() {
- return AutomaticUpdatePlugin.getDefault().getSession();
- }
-
- /*
- * Use with caution, as this still start the whole UI bundle. Shouldn't be used
- * in any of the update checking code, only the code that presents updates when notified.
- */
- ProvisioningUI getProvisioningUI() {
- return ProvisioningUI.getDefaultUI();
- }
-
- /*
- * Filter out the ius that aren't visible to the user or are
- * locked for updating.
- */
-
- void validateIusToUpdate() {
- ArrayList<IInstallableUnit> list = new ArrayList<IInstallableUnit>(iusWithUpdates.size());
- IProfile profile = getProfileRegistry().getProfile(profileId);
-
- for (IInstallableUnit iuWithUpdate : iusWithUpdates) {
- try {
- if (validToUpdate(profile, iuWithUpdate))
- list.add(iuWithUpdate);
- } catch (OperationCanceledException e) {
- // Nothing to report
- }
- }
- iusWithUpdates = list;
- }
-
- // A proposed update is valid if it is still visible to the user as an
- // installed item (it is a root)
- // and if it is not locked for updating.
- private boolean validToUpdate(IProfile profile, IInstallableUnit iu) {
- int lock = IProfile.LOCK_NONE;
- boolean isRoot = false;
- try {
- String value = profile.getInstallableUnitProperty(iu, IProfile.PROP_PROFILE_LOCKED_IU);
- if (value != null)
- lock = Integer.parseInt(value);
- value = profile.getInstallableUnitProperty(iu, IProfile.PROP_PROFILE_ROOT_IU);
- isRoot = value == null ? false : Boolean.valueOf(value).booleanValue();
- } catch (NumberFormatException e) {
- // ignore and assume no lock
- }
- return isRoot && (lock & IProfile.LOCK_UPDATE) == 0;
- }
-
- Shell getWorkbenchWindowShell() {
- IWorkbenchWindow activeWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- return activeWindow != null ? activeWindow.getShell() : null;
-
- }
-
- IStatusLineManager getStatusLineManager() {
- if (statusLineManager != null)
- return statusLineManager;
- IWorkbenchWindow activeWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (activeWindow == null)
- return null;
- // YUCK! YUCK! YUCK!
- // IWorkbenchWindow does not define getStatusLineManager(), yet
- // WorkbenchWindow does
- try {
- Method method = activeWindow.getClass().getDeclaredMethod("getStatusLineManager", new Class[0]); //$NON-NLS-1$
- try {
- Object statusLine = method.invoke(activeWindow, new Object[0]);
- if (statusLine instanceof IStatusLineManager) {
- statusLineManager = (IStatusLineManager) statusLine;
- return statusLineManager;
- }
- } catch (InvocationTargetException e) {
- // oh well
- } catch (IllegalAccessException e) {
- // I tried
- }
- } catch (NoSuchMethodException e) {
- // can't blame us for trying.
- }
-
- IWorkbenchPartSite site = activeWindow.getActivePage().getActivePart().getSite();
- if (site instanceof IViewSite) {
- statusLineManager = ((IViewSite) site).getActionBars().getStatusLineManager();
- } else if (site instanceof IEditorSite) {
- statusLineManager = ((IEditorSite) site).getActionBars().getStatusLineManager();
- }
- return statusLineManager;
- }
-
- void updateStatusLine() {
- IStatusLineManager manager = getStatusLineManager();
- if (manager != null)
- manager.update(true);
- }
-
- void createUpdateAffordance() {
- updateAffordance = new StatusLineCLabelContribution(AUTO_UPDATE_STATUS_ITEM, 5);
- updateAffordance.addListener(SWT.MouseDown, new Listener() {
- public void handleEvent(Event event) {
- launchUpdate();
- }
- });
- IStatusLineManager manager = getStatusLineManager();
- if (manager != null) {
- manager.add(updateAffordance);
- manager.update(true);
- }
- }
-
- void notifyUserOfUpdates(boolean isValid, boolean showPopup) {
- if (updateAffordance == null)
- createUpdateAffordance();
- if (isValid) {
- if (showPopup)
- openUpdatePopup();
- updateAffordance.setTooltip(AutomaticUpdateMessages.AutomaticUpdater_ClickToReviewUpdates);
- updateAffordance.setImage(AutomaticUpdatePlugin.getDefault().getImageRegistry().get((AutomaticUpdatePlugin.IMG_TOOL_UPDATE)));
- } else {
- updateAffordance.setTooltip(AutomaticUpdateMessages.AutomaticUpdater_ClickToReviewUpdatesWithProblems);
- updateAffordance.setImage(AutomaticUpdatePlugin.getDefault().getImageRegistry().get((AutomaticUpdatePlugin.IMG_TOOL_UPDATE_PROBLEMS)));
- }
- IStatusLineManager manager = getStatusLineManager();
- if (manager != null) {
- manager.update(true);
- }
- }
-
- void checkUpdateAffordanceEnablement() {
- // We don't currently support enablement in the affordance,
- // so we hide it if it should not be enabled.
- if (updateAffordance == null)
- return;
- boolean shouldBeVisible = getProvisioningUI().hasScheduledOperations();
- if (updateAffordance.isVisible() != shouldBeVisible) {
- IStatusLineManager manager = getStatusLineManager();
- if (manager != null) {
- updateAffordance.setVisible(shouldBeVisible);
- manager.update(true);
- }
- }
- }
-
- void openUpdatePopup() {
- if (popup == null)
- popup = new AutomaticUpdatesPopup(getWorkbenchWindowShell(), alreadyDownloaded, getPreferenceStore());
- popup.open();
-
- }
-
- void clearUpdateAffordances() {
- if (updateAffordance != null) {
- IStatusLineManager manager = getStatusLineManager();
- if (manager != null) {
- manager.remove(updateAffordance);
- manager.update(true);
- }
- updateAffordance.dispose();
- updateAffordance = null;
- }
- if (popup != null) {
- popup.close(false);
- popup = null;
- }
- }
-
- public void launchUpdate() {
- getProvisioningUI().openUpdateWizard(false, operation, null);
- }
-
- /*
- * The profile has changed. Make sure our toUpdate list is still valid and
- * if there is nothing to update, get rid of the update popup and
- * affordance.
- */
- void triggerNewUpdateNotification() {
- Job notifyJob = new Job("Update validate job") { //$NON-NLS-1$
- public IStatus run(IProgressMonitor monitor) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- // notify that updates are available for all roots. We don't know for sure that
- // there are any, but this will cause everything to be rechecked. Don't trigger
- // a popup, just update the affordance and internal state.
- updatesAvailable(new UpdateEvent(profileId, getInstalledIUs()));
- return Status.OK_STATUS;
- }
- };
- notifyJob.setSystem(true);
- notifyJob.setUser(false);
- notifyJob.setPriority(Job.LONG);
- notifyJob.schedule();
- }
-
- /*
- * Get the IInstallable units for the specified profile
- *
- * @param profileId the profile in question
- * @param all <code>true</code> if all IInstallableUnits in the profile should
- * be returned, <code>false</code> only those IInstallableUnits marked as (user visible) roots
- * should be returned.
- *
- * @return an array of IInstallableUnits installed in the profile.
- */
- public Collection<IInstallableUnit> getInstalledIUs() {
- IProfile profile = getProfileRegistry().getProfile(profileId);
- if (profile == null)
- return CollectionUtils.emptyList();
- IQuery<IInstallableUnit> query = new UserVisibleRootQuery();
- IQueryResult<IInstallableUnit> queryResult = profile.query(query, null);
- return queryResult.toUnmodifiableSet();
- }
-
- public void shutdown() {
- statusLineManager = null;
- if (profileListener != null) {
- getProvisioningEventBus().removeListener(profileListener);
- profileListener = null;
- }
- }
-
- IProfileRegistry getProfileRegistry() {
- return (IProfileRegistry) getSession().getProvisioningAgent().getService(IProfileRegistry.SERVICE_NAME);
- }
-
- IProvisioningEventBus getProvisioningEventBus() {
- return (IProvisioningEventBus) getSession().getProvisioningAgent().getService(IProvisioningEventBus.SERVICE_NAME);
- }
-
- IPreferenceStore getPreferenceStore() {
- return AutomaticUpdatePlugin.getDefault().getPreferenceStore();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java
deleted file mode 100644
index af7b27685..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java
+++ /dev/null
@@ -1,294 +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.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(AutomaticUpdatePlugin.getDefault().getImageRegistry().get((AutomaticUpdatePlugin.IMG_TOOL_CLOSE)));
- closeButton.setHotImage(AutomaticUpdatePlugin.getDefault().getImageRegistry().get((AutomaticUpdatePlugin.IMG_TOOL_CLOSE_HOT)));
- closeButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- close();
- }
- });
- // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=177183
- toolBar.addMouseListener(new MouseAdapter() {
- public void mouseDown(MouseEvent e) {
- close();
- }
- });
- return titleComposite;
- }
-
- /*
- * Overridden to adjust the span of the title label.
- * Reachy, reachy....
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.PopupDialog#createTitleControl(org.eclipse.swt.widgets.Composite)
- */
- protected Control createTitleControl(Composite parent) {
- Control control = super.createTitleControl(parent);
- Object data = control.getLayoutData();
- if (data instanceof GridData) {
- ((GridData) data).horizontalSpan = 1;
- }
- return control;
- }
-}
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 6fd107811..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPreferencePage.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
-
-import org.eclipse.core.runtime.IProduct;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-
-/**
- * Preference page for automated updates.
- *
- * @since 3.4
- *
- */
-public class AutomaticUpdatesPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
- private Button enabledCheck;
- private Button onStartupRadio, onScheduleRadio;
- private Combo dayCombo;
- private Label atLabel;
- private Combo hourCombo;
- private Button searchOnlyRadio, searchAndDownloadRadio;
- private Button remindOnceRadio, remindScheduleRadio;
- private Combo remindElapseCombo;
- private Group updateScheduleGroup, downloadGroup, remindGroup;
-
- public void init(IWorkbench workbench) {
- // nothing to init
- }
-
- protected Control createContents(Composite parent) {
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IAutomaticUpdaterHelpContextIds.AUTOMATIC_UPDATES_PREFERENCE_PAGE);
-
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginWidth = layout.marginHeight = 0;
- container.setLayout(layout);
-
- enabledCheck = new Button(container, SWT.CHECK);
- enabledCheck.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_findUpdates);
-
- createSpacer(container, 1);
-
- updateScheduleGroup = new Group(container, SWT.NONE);
- updateScheduleGroup.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_UpdateSchedule);
- layout = new GridLayout();
- layout.numColumns = 3;
- updateScheduleGroup.setLayout(layout);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- updateScheduleGroup.setLayoutData(gd);
-
- onStartupRadio = new Button(updateScheduleGroup, SWT.RADIO);
- IProduct product = Platform.getProduct();
- String productName = product != null && product.getName() != null ? product.getName() : AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_GenericProductName;
- onStartupRadio.setText(NLS.bind(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_findOnStart, productName));
- gd = new GridData();
- gd.horizontalSpan = 3;
- onStartupRadio.setLayoutData(gd);
- onStartupRadio.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- pageChanged();
- }
- });
-
- onScheduleRadio = new Button(updateScheduleGroup, SWT.RADIO);
- onScheduleRadio.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_findOnSchedule);
- gd = new GridData();
- gd.horizontalSpan = 3;
- onScheduleRadio.setLayoutData(gd);
- onScheduleRadio.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- pageChanged();
- }
- });
-
- dayCombo = new Combo(updateScheduleGroup, SWT.READ_ONLY);
- dayCombo.setItems(AutomaticUpdateScheduler.DAYS);
- gd = new GridData();
- gd.widthHint = 200;
- gd.horizontalIndent = 30;
- dayCombo.setLayoutData(gd);
-
- atLabel = new Label(updateScheduleGroup, SWT.NULL);
- atLabel.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_at);
-
- hourCombo = new Combo(updateScheduleGroup, SWT.READ_ONLY);
- hourCombo.setItems(AutomaticUpdateScheduler.HOURS);
- gd = new GridData();
- hourCombo.setLayoutData(gd);
-
- createSpacer(container, 1);
-
- downloadGroup = new Group(container, SWT.NONE);
- downloadGroup.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_downloadOptions);
- layout = new GridLayout();
- layout.numColumns = 3;
- downloadGroup.setLayout(layout);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- downloadGroup.setLayoutData(gd);
-
- searchOnlyRadio = new Button(downloadGroup, SWT.RADIO);
- searchOnlyRadio.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_searchAndNotify);
- gd = new GridData();
- gd.horizontalSpan = 3;
- searchOnlyRadio.setLayoutData(gd);
- searchOnlyRadio.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- pageChanged();
- }
- });
-
- searchAndDownloadRadio = new Button(downloadGroup, SWT.RADIO);
- searchAndDownloadRadio.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_downloadAndNotify);
- gd = new GridData();
- gd.horizontalSpan = 3;
- searchAndDownloadRadio.setLayoutData(gd);
- searchAndDownloadRadio.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- pageChanged();
- }
- });
-
- createSpacer(container, 1);
-
- remindGroup = new Group(container, SWT.NONE);
- remindGroup.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_RemindGroup);
- layout = new GridLayout();
- layout.numColumns = 3;
- remindGroup.setLayout(layout);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- remindGroup.setLayoutData(gd);
-
- remindOnceRadio = new Button(remindGroup, SWT.RADIO);
- remindOnceRadio.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_RemindOnce);
- gd = new GridData();
- gd.horizontalSpan = 3;
- remindOnceRadio.setLayoutData(gd);
- remindOnceRadio.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- pageChanged();
- }
- });
-
- remindScheduleRadio = new Button(remindGroup, SWT.RADIO);
- remindScheduleRadio.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_RemindSchedule);
- gd = new GridData();
- gd.horizontalSpan = 3;
- remindScheduleRadio.setLayoutData(gd);
- remindScheduleRadio.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- pageChanged();
- }
- });
-
- remindElapseCombo = new Combo(remindGroup, SWT.READ_ONLY);
- remindElapseCombo.setItems(AutomaticUpdatesPopup.ELAPSED);
-
- 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 e75357d4f..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java
+++ /dev/null
@@ -1,146 +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.*;
-import org.eclipse.core.runtime.preferences.*;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.engine.ProfileScope;
-import org.eclipse.ui.statushandlers.StatusManager;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
-
- private static final String P_ENABLED = "enabled"; //$NON-NLS-1$
- private static final String UPDATE_PLUGIN_ID = "org.eclipse.update.scheduler"; //$NON-NLS-1$
- private static final String SDK_UI_PLUGIN_ID = "org.eclipse.equinox.p2.ui.sdk"; //$NON-NLS-1$
-
- public static void migratePreferences() {
- // Migrate preference values that were stored in alternate locations.
- // 1) migrate from instance scope (during 3.5 development) to profile
- // scope (final 3.5 format)
- // 2) if applicable, migrate from 3.4 prefs kept in a different bundle
- // 3) if applicable, migrate from 3.3 prefs known by Update Manager
- final IAgentLocation agentLocation = AutomaticUpdatePlugin.getDefault().getAgentLocation();
- if (agentLocation == null)
- return;
- Preferences pref = new ProfileScope(agentLocation, IProfileRegistry.SELF).getNode(AutomaticUpdatePlugin.PLUGIN_ID);
- try {
- if (pref.keys().length == 0) {
- // migrate preferences from instance scope to profile scope
- Preferences oldPref = new InstanceScope().getNode(AutomaticUpdatePlugin.PLUGIN_ID);
- String[] keys = oldPref.keys();
- for (int i = 0; i < keys.length; i++)
- pref.put(keys[i], oldPref.get(keys[i], "")); //$NON-NLS-1$
-
- if (keys.length > 0)
- pref.flush();
- }
- } catch (BackingStoreException e) {
- handleException(e, AutomaticUpdateMessages.ErrorLoadingPreferenceKeys);
- }
-
- // Have we migrated from 3.4 pref values?
- boolean migrated34 = pref.getBoolean(PreferenceConstants.PREF_MIGRATED_34, false);
- boolean node34exists = false;
- if (!migrated34) {
- // first look for the 3.4 automatic update preferences, which were
- // located in a different bundle than now, in the instance scope.
- Preferences instanceScope = Platform.getPreferencesService().getRootNode().node(InstanceScope.SCOPE);
- try {
- node34exists = instanceScope.nodeExists(SDK_UI_PLUGIN_ID);
- } catch (BackingStoreException e1) {
- // nothing to report, assume node does not exist
- }
- if (node34exists) {
- Preferences node34 = instanceScope.node(SDK_UI_PLUGIN_ID);
- // We only migrate the preferences associated with auto update.
- // Other preferences still remain in that bundle and are handled
- // there. We don't migrate if the value was never set.
- // We use string literals rather than pref constants because we want to
- // ensure we match the 3.4 values.
- if (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) {
- handleException(e, AutomaticUpdateMessages.ErrorSavingPreferences);
- }
- }
- // pref used to track 3.3 migration
- // Have we initialized the auto update prefs from previous
- // releases?
- boolean autoUpdateInit = pref.getBoolean(PreferenceConstants.PREF_AUTO_UPDATE_INIT, false);
-
- if (!migrated34 && !autoUpdateInit) {
- // Look for the 3.3 UM automatic update preferences. We will
- // not migrate them if we already pulled values from 3.4.
- // However, we always want to turn off the UM automatic update
- // checker if it is found to be on.
- Preferences instanceScope = Platform.getPreferencesService().getRootNode().node(InstanceScope.SCOPE);
- try {
- boolean updateNodeExists = instanceScope.nodeExists(UPDATE_PLUGIN_ID);
- Preferences prefUM = instanceScope.node(UPDATE_PLUGIN_ID);
- boolean enableUpdate = prefUM.getBoolean(P_ENABLED, false);
- // set p2 automatic update preference to match UM preference,
- // only if we haven't already set a value.
- if (pref.get(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED, null) == null) {
- pref.putBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED, enableUpdate);
- }
- // turn off UM automatic update preference if it exists
- if (updateNodeExists) {
- prefUM.putBoolean(P_ENABLED, false);
- prefUM.flush();
- }
- // mark the pref that says we migrated
- pref.putBoolean(PreferenceConstants.PREF_AUTO_UPDATE_INIT, true);
- pref.flush();
- } catch (BackingStoreException e) {
- handleException(e, AutomaticUpdateMessages.ErrorSavingClassicPreferences);
- }
- }
- }
-
- private static void handleException(Exception e, String message) {
- StatusManager.getManager().handle(new Status(IStatus.ERROR, AutomaticUpdatePlugin.PLUGIN_ID, 0, message, e), StatusManager.LOG);
- }
-
- public void initializeDefaultPreferences() {
- // initialize the default scope
- Preferences node = new DefaultScope().getNode(AutomaticUpdatePlugin.PLUGIN_ID);
- node.putBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED, false);
- node.put(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE, PreferenceConstants.PREF_UPDATE_ON_STARTUP);
- node.putBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY, false);
- node.putBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE, false);
- node.put(PreferenceConstants.PREF_REMIND_ELAPSED, 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 497a0e695..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/messages.properties
+++ /dev/null
@@ -1,72 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2010 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-
-SchedulerStartup_day=Every day
-SchedulerStartup_Monday=Every Monday
-SchedulerStartup_Tuesday=Every Tuesday
-SchedulerStartup_Wednesday=Every Wednesday
-SchedulerStartup_Thursday=Every Thursday
-SchedulerStartup_Friday=Every Friday
-SchedulerStartup_Saturday=Every Saturday
-SchedulerStartup_Sunday=Every Sunday
-SchedulerStartup_1AM=1:00 AM
-SchedulerStartup_2AM=2:00 AM
-SchedulerStartup_3AM=3:00 AM
-SchedulerStartup_4AM=4:00 AM
-SchedulerStartup_5AM=5:00 AM
-SchedulerStartup_6AM=6:00 AM
-SchedulerStartup_7AM=7:00 AM
-SchedulerStartup_8AM=8:00 AM
-SchedulerStartup_9AM=9:00 AM
-SchedulerStartup_10AM=10:00 AM
-SchedulerStartup_11AM=11:00 AM
-SchedulerStartup_12PM=12:00 PM
-SchedulerStartup_1PM=1:00 PM
-SchedulerStartup_2PM=2:00 PM
-SchedulerStartup_3PM=3:00 PM
-SchedulerStartup_4PM=4:00 PM
-SchedulerStartup_5PM=5:00 PM
-SchedulerStartup_6PM=6:00 PM
-SchedulerStartup_7PM=7:00 PM
-SchedulerStartup_8PM=8:00 PM
-SchedulerStartup_9PM=9:00 PM
-SchedulerStartup_10PM=10:00 PM
-SchedulerStartup_11PM=11:00 PM
-SchedulerStartup_12AM=12:00 AM
-AutomaticUpdatesPopup_PrefLinkOnly=Set up <a>Reminder options</a>
-AutomaticUpdatesPopup_RemindAndPrefLink=You will be reminded in {0}.\nSet reminder <a href="{1}">preferences</a>
-AutomaticUpdatesPopup_ReminderJobTitle=Update reminder job
-AutomaticUpdatesPreferencePage_findUpdates=Automatically &find new updates and notify me
-AutomaticUpdateScheduler_30Minutes=30 minutes
-AutomaticUpdateScheduler_60Minutes=Hour
-AutomaticUpdateScheduler_240Minutes= 4 Hours
-AutomaticUpdateScheduler_UpdateNotInitialized=The update checker service is not initialized
-AutomaticUpdatesPopup_UpdatesAvailableTitle=Updates Available
-AutomaticUpdater_AutomaticDownloadOperationName=Automatic updates download
-AutomaticUpdater_ClickToReviewUpdates=Updates are available. Click here to review and install them.
-AutomaticUpdater_ClickToReviewUpdatesWithProblems=Updates are available, but there may be some compatibility problems. Click here to review them.
-AutomaticUpdatesPreferencePage_UpdateSchedule=&Update schedule
-AutomaticUpdatesPreferencePage_findOnStart=Look for u&pdates each time {0} is started
-AutomaticUpdatesPreferencePage_findOnSchedule=Look for updates on the following &schedule:
-AutomaticUpdatesPreferencePage_downloadOptions=&Download options
-AutomaticUpdatesPreferencePage_searchAndNotify=Search for updates and &notify me when they are available
-AutomaticUpdatesPreferencePage_downloadAndNotify=Down&load new updates automatically and notify me when ready to install them
-AutomaticUpdatesPopup_ClickToReviewDownloaded=Software updates have been downloaded.\nClick to review and install updates.
-AutomaticUpdatesPopup_ClickToReviewNotDownloaded=Updates are available for your software.\nClick to review and install updates.
-AutomaticUpdatesPreferencePage_at=at
-AutomaticUpdatesPreferencePage_GenericProductName=the application
-AutomaticUpdatesPreferencePage_RemindGroup=&When updates are found
-AutomaticUpdatesPreferencePage_RemindSchedule=&Remind me about updates every:
-AutomaticUpdatesPreferencePage_RemindOnce=Notify me &once about updates
-ErrorSavingPreferences=Error saving update preferences
-ErrorSavingClassicPreferences=Error saving classic update preferences
-ErrorLoadingPreferenceKeys=Error loading preference keys \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/.classpath b/bundles/org.eclipse.equinox.p2.ui.sdk/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/.cvsignore b/bundles/org.eclipse.equinox.p2.ui.sdk/.cvsignore
deleted file mode 100644
index c5e82d745..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/.project b/bundles/org.eclipse.equinox.p2.ui.sdk/.project
deleted file mode 100644
index e28ff32f6..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/.project
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.ui.sdk</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/.settings/.api_filters b/bundles/org.eclipse.equinox.p2.ui.sdk/.settings/.api_filters
deleted file mode 100644
index 69033c6c2..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/.settings/.api_filters
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.equinox.p2.ui.sdk" version="2">
- <resource path="src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java" type="org.eclipse.equinox.internal.p2.ui.sdk.PreloadingRepositoryHandler">
- <filter id="571519004">
- <message_arguments>
- <message_argument value="org.eclipse.equinox.internal.p2.ui.sdk.PreloadingRepositoryHandler.doExecuteAndLoad()"/>
- <message_argument value="LoadMetadataRepositoryJob"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/equinox/internal/p2/ui/sdk/RevertProfilePageWithCompare.java" type="org.eclipse.equinox.internal.p2.ui.sdk.RevertProfilePageWithCompare">
- <filter id="571473929">
- <message_arguments>
- <message_argument value="RevertProfilePage"/>
- <message_argument value="RevertProfilePageWithCompare"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 19b78b9fd..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,329 +0,0 @@
-#Tue Dec 22 23:22:15 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index dbe72f165..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:59:14 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF
deleted file mode 100644
index 4f5e0f9c5..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-SymbolicName: org.eclipse.equinox.p2.ui.sdk;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.ui.sdk.ProvSDKUIActivator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.ui.sdk;x-internal:=true,
- org.eclipse.equinox.internal.p2.ui.sdk.prefs;x-internal:=true
-Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
- org.eclipse.core.runtime,
- org.eclipse.equinox.p2.ui,
- org.eclipse.compare
-Import-Package: javax.xml.parsers,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.operations;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0",
- org.w3c.dom,
- org.xml.sax
-Service-Component: OSGI-INF/policy_component.xml, OSGI-INF/licenseManager_component.xml
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/licenseManager_component.xml b/bundles/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/licenseManager_component.xml
deleted file mode 100644
index bdaeb067d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/licenseManager_component.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.ui.sdk.licenseManager">
- <implementation class="org.eclipse.equinox.internal.p2.ui.sdk.SimpleLicenseManager"/>
- <service>
- <provide interface="org.eclipse.equinox.p2.ui.LicenseManager"/>
- </service>
-</scr:component>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/policy_component.xml b/bundles/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/policy_component.xml
deleted file mode 100644
index c02500765..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/policy_component.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.ui.sdk">
- <implementation class="org.eclipse.equinox.internal.p2.ui.sdk.SDKPolicy"/>
- <service>
- <provide interface="org.eclipse.equinox.p2.ui.Policy"/>
- </service>
-</scr:component>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/about.html b/bundles/org.eclipse.equinox.p2.ui.sdk/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/build.properties b/bundles/org.eclipse.equinox.p2.ui.sdk/build.properties
deleted file mode 100644
index 8be3e849c..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.properties,\
- .,\
- about.html,\
- META-INF/,\
- plugin.xml,\
- OSGI-INF/
-src.includes = about.html
-source.. = src/
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/plugin.properties b/bundles/org.eclipse.equinox.p2.ui.sdk/plugin.properties
deleted file mode 100644
index c25e1e6cc..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/plugin.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-#
-# Provisioning UI plugin resources
-#
-providerName = Eclipse.org - Equinox
-bundleName=Equinox Provisioning Platform Update Support
-Update.command=Check for Updates
-Update.command.mnemonic=U
-Install.command=Install New Software...
-Install.command.mnemonic=S
-TempInstallView.command=Installation Information
-TempInstallView.mnemonic=I
-provisioningPrefPage = Install/Update
-sitesPrefPage = Available Software Sites
-installedSoftwarePage = Installed Software
-installHistoryPage = Installation History
-preferenceKeywords.general=automatic update schedule download site software install import bundle
-preferences=Update and Install Preferences
-classicCategoryName=Classic Update
-classicCategoryDesc=Enables classic update functionality \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/plugin.xml b/bundles/org.eclipse.equinox.p2.ui.sdk/plugin.xml
deleted file mode 100644
index 8722ca97c..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/plugin.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- id="preferences" point="org.eclipse.core.runtime.preferences" name="%preferences">
- <initializer class="org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceInitializer"/>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%provisioningPrefPage"
- class="org.eclipse.equinox.internal.p2.ui.sdk.prefs.ProvisioningPreferencePage"
- id="org.eclipse.equinox.internal.p2.ui.sdk.ProvisioningPreferencePage">
- <keywordReference id="org.eclipse.equinox.p2.ui.sdk.updates.general"/>
- </page>
-
- <page
- name="%sitesPrefPage"
- category="org.eclipse.equinox.internal.p2.ui.sdk.ProvisioningPreferencePage"
- class="org.eclipse.equinox.p2.ui.RepositoryManipulationPage"
- id="org.eclipse.equinox.internal.p2.ui.sdk.SitesPreferencePage">
- <keywordReference id="org.eclipse.equinox.p2.ui.sdk.updates.general"/>
- </page>
-
- </extension>
-
- <extension
- point="org.eclipse.ui.keywords">
- <keyword
- label="%preferenceKeywords.general"
- id="org.eclipse.equinox.p2.ui.sdk.updates.general"/>
- </extension>
-
-
- <extension
- point="org.eclipse.ui.commands">
- <command
- name="%Update.command"
- id="org.eclipse.equinox.p2.ui.sdk.update">
- </command>
- <command
- name="%Install.command"
- id="org.eclipse.equinox.p2.ui.sdk.install">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- commandId="org.eclipse.equinox.p2.ui.sdk.update"
- class="org.eclipse.equinox.internal.p2.ui.sdk.UpdateHandler">
- </handler>
- <handler
- commandId="org.eclipse.equinox.p2.ui.sdk.install"
- class="org.eclipse.equinox.internal.p2.ui.sdk.InstallNewSoftwareHandler">
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="menu:help?after=additions">
- <command
- commandId="org.eclipse.equinox.p2.ui.sdk.update"
- mnemonic="%Update.command.mnemonic"
- id="org.eclipse.equinox.p2.ui.sdk.update">
- </command>
-
- </menuContribution>
- <menuContribution
- locationURI="menu:help?after=org.eclipse.equinox.p2.ui.sdk.update">
- <command
- commandId="org.eclipse.equinox.p2.ui.sdk.install"
- mnemonic="%Install.command.mnemonic"
- id="org.eclipse.equinox.p2.ui.sdk.install">
- </command>
-
- </menuContribution>
- </extension>
- <extension
- point="org.eclipse.ui.activities">
- <activity
- description="%classicCategoryDesc"
- id="org.eclipse.equinox.p2.ui.sdk.classicUpdate"
- name="%classicCategoryName">
- </activity>
- <activityPatternBinding
- activityId="org.eclipse.equinox.p2.ui.sdk.classicUpdate"
- isEqualityPattern="false"
- pattern=".*org\.eclipse\.update\.internal.*">
- </activityPatternBinding>
- <activityPatternBinding
- activityId="org.eclipse.equinox.p2.ui.sdk.classicUpdate"
- isEqualityPattern="false"
- pattern=".*org\.eclipse\.ui\.update.*">
- </activityPatternBinding>
- <category
- description="%classicCategoryDesc"
- id="org.eclipse.equinox.p2.ui.sdk.category.classicUpdate"
- name="%classicCategoryName">
- </category>
- <categoryActivityBinding
- activityId="org.eclipse.equinox.p2.ui.sdk.classicUpdate"
- categoryId="org.eclipse.equinox.p2.ui.sdk.category.classicUpdate">
- </categoryActivityBinding>
- </extension>
- <extension
- id="preferences" point="org.eclipse.core.runtime.preferences" name="%preferences">
- <initializer class="org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceInitializer"/>
- </extension>
- <extension
- point="org.eclipse.ui.installationPages">
- <page
- name="%installedSoftwarePage"
- class="org.eclipse.equinox.p2.ui.InstalledSoftwarePage"
- id="10.org.eclipse.equinox.internal.p2.ui.sdk.InstalledSoftwarePage">
- </page>
- <page
- name="%installHistoryPage"
- class="org.eclipse.equinox.internal.p2.ui.sdk.RevertProfilePageWithCompare"
- id="11.org.eclipse.equinox.internal.p2.ui.sdk.RevertProfilePage">
- </page>
-
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/pom.xml b/bundles/org.eclipse.equinox.p2.ui.sdk/pom.xml
deleted file mode 100644
index b57ed505e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.ui.sdk</artifactId>
- <version>1.0.100.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/IProvSDKHelpContextIds.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/IProvSDKHelpContextIds.java
deleted file mode 100644
index c89ab61a5..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/IProvSDKHelpContextIds.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-/**
- * Help context ids for the P2 SDK
- * <p>
- * This interface contains constants only; it is not intended to be implemented
- * or extended.
- * </p>
- * @since 3.4
- */
-
-public interface IProvSDKHelpContextIds {
- public static final String PREFIX = ProvSDKUIActivator.PLUGIN_ID + "."; //$NON-NLS-1$
-
- public static final String PROVISIONING_PREFERENCE_PAGE = PREFIX + "provisioning_preference_page_context"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java
deleted file mode 100644
index 0da34d40e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-
-/**
- * InstallNewSoftwareHandler invokes the install wizard
- *
- * @since 3.5
- */
-public class InstallNewSoftwareHandler extends PreloadingRepositoryHandler {
-
- /**
- * The constructor.
- */
- public InstallNewSoftwareHandler() {
- super();
- }
-
- protected void doExecute(LoadMetadataRepositoryJob job) {
- getProvisioningUI().openInstallWizard(null, null, job);
- }
-
- protected boolean waitForPreload() {
- // If the user cannot see repositories, then we may as well wait
- // for existing repos to load so that content is available.
- // If the user can manipulate the repositories, then we don't wait,
- // because we don't know which ones they want to work with.
- return !getProvisioningUI().getPolicy().getRepositoriesVisible();
- }
-
- protected void setLoadJobProperties(Job loadJob) {
- super.setLoadJobProperties(loadJob);
- // If we are doing a background load, we do not wish to authenticate, as the
- // user is unaware that loading was needed
- if (!waitForPreload()) {
- loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_AUTHENTICATION_JOB_MARKER, Boolean.toString(true));
- loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_REPOSITORY_EVENTS, Boolean.toString(true));
- }
- }
-
- @Override
- protected String getProgressTaskName() {
- return ProvSDKMessages.InstallNewSoftwareHandler_ProgressTaskName;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java
deleted file mode 100644
index 7a20a9f8f..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.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.ui.sdk;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * PreloadingRepositoryHandler provides background loading of
- * repositories before executing the provisioning handler.
- *
- * @since 3.5
- */
-abstract class PreloadingRepositoryHandler extends AbstractHandler {
-
- /**
- * The constructor.
- */
- public PreloadingRepositoryHandler() {
- // constructor
- }
-
- /**
- * Execute the command.
- */
- public Object execute(ExecutionEvent event) {
- doExecuteAndLoad();
- return null;
- }
-
- void doExecuteAndLoad() {
- if (preloadRepositories()) {
- //cancel any load that is already running
- Job.getJobManager().cancel(LoadMetadataRepositoryJob.LOAD_FAMILY);
- final LoadMetadataRepositoryJob loadJob = new LoadMetadataRepositoryJob(getProvisioningUI()) {
- public IStatus runModal(IProgressMonitor monitor) {
- SubMonitor sub = SubMonitor.convert(monitor, getProgressTaskName(), 1000);
- IStatus status = super.runModal(sub.newChild(500));
- if (status.getSeverity() == IStatus.CANCEL)
- return status;
- try {
- doPostLoadBackgroundWork(sub.newChild(500));
- } catch (OperationCanceledException e) {
- return Status.CANCEL_STATUS;
- }
- return status;
- }
- };
- setLoadJobProperties(loadJob);
- if (waitForPreload()) {
- loadJob.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- if (PlatformUI.isWorkbenchRunning())
- if (event.getResult().isOK()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- doExecute(loadJob);
- }
- });
- }
- }
- });
- loadJob.setUser(true);
- loadJob.schedule();
-
- } else {
- loadJob.setSystem(true);
- loadJob.setUser(false);
- loadJob.schedule();
- doExecute(null);
- }
- } else {
- doExecute(null);
- }
- }
-
- protected abstract String getProgressTaskName();
-
- protected abstract void doExecute(LoadMetadataRepositoryJob job);
-
- protected boolean preloadRepositories() {
- return true;
- }
-
- protected void doPostLoadBackgroundWork(IProgressMonitor monitor) throws OperationCanceledException {
- // default is to do nothing more.
- }
-
- protected boolean waitForPreload() {
- return true;
- }
-
- protected void setLoadJobProperties(Job loadJob) {
- loadJob.setProperty(LoadMetadataRepositoryJob.ACCUMULATE_LOAD_ERRORS, Boolean.toString(true));
- }
-
- protected ProvisioningUI getProvisioningUI() {
- return ProvisioningUI.getDefaultUI();
- }
-
- /**
- * Return a shell appropriate for parenting dialogs of this handler.
- * @return a Shell
- */
- protected Shell getShell() {
- return PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java
deleted file mode 100644
index 4a258e64c..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Message class for provisioning UI messages.
- *
- * @since 3.4
- */
-public class ProvSDKMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.ui.sdk.messages"; //$NON-NLS-1$
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ProvSDKMessages.class);
- }
- public static String InstallNewSoftwareHandler_ProgressTaskName;
- public static String PreferenceInitializer_Error;
- public static String ProvisioningPreferencePage_AlwaysOpenWizard;
- public static String ProvisioningPreferencePage_BrowsingPrefsGroup;
- public static String ProvisioningPreferencePage_ShowLatestVersions;
- public static String ProvisioningPreferencePage_ShowAllVersions;
- public static String ProvisioningPreferencePage_NeverOpenWizard;
- public static String ProvisioningPreferencePage_OpenWizardIfInvalid;
- public static String ProvisioningPreferencePage_PromptToOpenWizard;
- public static String ProvSDKUIActivator_ErrorSavingPrefs;
- public static String ProvSDKUIActivator_NoSelfProfile;
- public static String ProvSDKUIActivator_OpenWizardAnyway;
- public static String ProvSDKUIActivator_Question;
- public static String SDKPolicy_PrefPageName;
- public static String UpdateHandler_NoSitesMessage;
- public static String UpdateHandler_NoSitesTitle;
- public static String UpdateHandler_ProgressTaskName;
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java
deleted file mode 100644
index 792fb63c3..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import java.io.IOException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceConstants;
-import org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceInitializer;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.engine.ProfileScope;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.ui.preferences.ScopedPreferenceStore;
-import org.eclipse.ui.statushandlers.StatusManager;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-/**
- * Activator class for the p2 UI.
- */
-public class ProvSDKUIActivator extends AbstractUIPlugin {
-
- private static ProvSDKUIActivator plugin;
- private static BundleContext context;
- private ScopedPreferenceStore preferenceStore;
-
- private IPropertyChangeListener preferenceListener;
-
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.ui.sdk"; //$NON-NLS-1$
-
- public static BundleContext getContext() {
- return context;
- }
-
- /**
- * Returns the singleton plugin instance
- *
- * @return the instance
- */
- public static ProvSDKUIActivator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in
- * relative path
- *
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- public ProvSDKUIActivator() {
- // constructor
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext bundleContext) throws Exception {
- super.start(bundleContext);
- plugin = this;
- ProvSDKUIActivator.context = bundleContext;
- PreferenceInitializer.migratePreferences();
- getPreferenceStore().addPropertyChangeListener(getPreferenceListener());
- }
-
- private IPropertyChangeListener getPreferenceListener() {
- if (preferenceListener == null) {
- preferenceListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- updateWithPreferences(getPolicy());
- }
- };
- }
- return preferenceListener;
- }
-
- public ProvisioningUI getProvisioningUI() {
- return ProvisioningUI.getDefaultUI();
- }
-
- private Policy getPolicy() {
- return getProvisioningUI().getPolicy();
- }
-
- public IProvisioningAgent getProvisioningAgent() {
- return getProvisioningUI().getSession().getProvisioningAgent();
- }
-
- public void stop(BundleContext bundleContext) throws Exception {
- plugin = null;
- getPreferenceStore().removePropertyChangeListener(preferenceListener);
- super.stop(bundleContext);
- }
-
- static IStatus getNoSelfProfileStatus() {
- return new Status(IStatus.WARNING, PLUGIN_ID, ProvSDKMessages.ProvSDKUIActivator_NoSelfProfile);
- }
-
- void updateWithPreferences(Policy policy) {
- policy.setShowLatestVersionsOnly(getPreferenceStore().getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
- }
-
- /*
- * Overridden to use a profile scoped preference store.
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#getPreferenceStore()
- */
- public IPreferenceStore getPreferenceStore() {
- // Create the preference store lazily.
- if (preferenceStore == null) {
- final IAgentLocation agentLocation = getAgentLocation();
- if (agentLocation == null)
- return super.getPreferenceStore();
- preferenceStore = new ScopedPreferenceStore(new ProfileScope(agentLocation, IProfileRegistry.SELF), PLUGIN_ID);
- }
- return preferenceStore;
- }
-
- private IAgentLocation getAgentLocation() {
- ServiceReference ref = getContext().getServiceReference(IAgentLocation.SERVICE_NAME);
- if (ref == null)
- return null;
- IAgentLocation location = (IAgentLocation) getContext().getService(ref);
- getContext().ungetService(ref);
- return location;
- }
-
- public void savePreferences() {
- if (preferenceStore != null)
- try {
- preferenceStore.save();
- } catch (IOException e) {
- StatusManager.getManager().handle(new Status(IStatus.ERROR, PLUGIN_ID, 0, ProvSDKMessages.ProvSDKUIActivator_ErrorSavingPrefs, e), StatusManager.LOG | StatusManager.SHOW);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/RevertProfilePageWithCompare.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/RevertProfilePageWithCompare.java
deleted file mode 100644
index 0cd99a4d0..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/RevertProfilePageWithCompare.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.util.HashSet;
-import java.util.Set;
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.compare.structuremergeviewer.IStructureComparator;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.equinox.p2.ui.RevertProfilePage;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * Same as {@link RevertProfilePage} but adds a compare button to compare profiles.
- *
- * @see RevertProfilePage
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- * @since 2.0
- */
-public class RevertProfilePageWithCompare extends RevertProfilePage {
-
- private static final int COMPARE_ID = IDialogConstants.CLIENT_ID + 2;
- Button compareButton;
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.about.InstallationPage#createPageButtons(org.eclipse.swt.widgets.Composite)
- */
- public void createPageButtons(Composite parent) {
- if (ProvisioningUI.getDefaultUI().getProfileId() == null)
- return;
- compareButton = createButton(parent, COMPARE_ID, ProvUIMessages.RevertProfilePage_CompareLabel);
- compareButton.setToolTipText(ProvUIMessages.RevertProfilePage_CompareTooltip);
- compareButton.setEnabled(computeCompareEnablement(getSelection()));
- super.createPageButtons(parent);
- }
-
- protected void buttonPressed(int buttonId) {
- switch (buttonId) {
- case COMPARE_ID :
- compare();
- break;
- default :
- super.buttonPressed(buttonId);
- break;
- }
- }
-
- boolean computeCompareEnablement(IStructuredSelection structuredSelection) {
- // compare is enabled if there are two elements selected
- Object[] selection = structuredSelection.toArray();
- if (selection.length == 2) {
- for (int i = 0; i < selection.length; i++) {
- if (!(selection[i] instanceof RollbackProfileElement))
- return false;
- }
- return true;
- }
- return false;
- }
-
- protected void handleSelectionChanged(IStructuredSelection selection) {
- super.handleSelectionChanged(selection);
- if (!selection.isEmpty()) {
- if (selection.size() == 1) {
- if (compareButton != null)
- compareButton.setEnabled(false);
- } else {
- // multiple selections, we can compare
- if (compareButton != null)
- compareButton.setEnabled(computeCompareEnablement(selection));
- }
- } else {
- // Nothing is selected
- if (compareButton != null)
- compareButton.setEnabled(false);
- }
- }
-
- private RollbackProfileElement[] getRollbackProfileElementsToCompare() {
- // expecting two items selected
- RollbackProfileElement[] result = new RollbackProfileElement[2];
- IStructuredSelection selection = getSelection();
- int i = 0;
- for (Object selected : selection.toList()) {
- if (selected != null && selected instanceof RollbackProfileElement) {
- result[i++] = (RollbackProfileElement) selected;
- }
- if (i == 2)
- break;
- }
- return result;
- }
-
- void compare() {
- final RollbackProfileElement[] rpe = getRollbackProfileElementsToCompare();
- CompareUI.openCompareDialog(new ProfileCompareEditorInput(rpe));
- }
-
- private class ProfileCompareEditorInput extends CompareEditorInput {
- private Object root;
- private ProvElementNode l;
- private ProvElementNode r;
-
- public ProfileCompareEditorInput(RollbackProfileElement[] rpe) {
- super(new CompareConfiguration());
- Assert.isTrue(rpe.length == 2);
- l = new ProvElementNode(rpe[0]);
- r = new ProvElementNode(rpe[1]);
- }
-
- protected Object prepareInput(IProgressMonitor monitor) {
- initLabels();
- Differencer d = new Differencer();
- root = d.findDifferences(false, monitor, null, null, l, r);
- return root;
- }
-
- private void initLabels() {
- CompareConfiguration cc = getCompareConfiguration();
- cc.setLeftEditable(false);
- cc.setRightEditable(false);
- cc.setLeftLabel(l.getName());
- cc.setLeftImage(l.getImage());
- cc.setRightLabel(r.getName());
- cc.setRightImage(r.getImage());
- }
-
- public String getOKButtonLabel() {
- return IDialogConstants.OK_LABEL;
- }
- }
-
- private class ProvElementNode implements IStructureComparator, ITypedElement, IStreamContentAccessor {
- private ProvElement pe;
- private IInstallableUnit iu;
- final static String BLANK = ""; //$NON-NLS-1$
- private String id = BLANK;
-
- public ProvElementNode(Object input) {
- pe = (ProvElement) input;
- iu = ProvUI.getAdapter(pe, IInstallableUnit.class);
- if (iu != null) {
- id = iu.getId();
- }
- }
-
- public Object[] getChildren() {
- Set<ProvElementNode> children = new HashSet<ProvElementNode>();
- if (pe instanceof RollbackProfileElement) {
- Object[] c = ((RollbackProfileElement) pe).getChildren(null);
- for (int i = 0; i < c.length; i++) {
- children.add(new ProvElementNode(c[i]));
- }
- } else if (pe instanceof InstalledIUElement) {
- Object[] c = ((InstalledIUElement) pe).getChildren(null);
- for (int i = 0; i < c.length; i++) {
- children.add(new ProvElementNode(c[i]));
- }
- }
- return children.toArray();
- }
-
- /**
- * Implementation based on <code>id</code>.
- * @param other the object to compare this <code>ProvElementNode</code> against.
- * @return <code>true</code> if the <code>ProvElementNodes</code>are equal; <code>false</code> otherwise.
- */
- public boolean equals(Object other) {
- if (other instanceof ProvElementNode)
- return id.equals(((ProvElementNode) other).id);
- return super.equals(other);
- }
-
- /**
- * Implementation based on <code>id</code>.
- * @return a hash code for this object.
- */
- public int hashCode() {
- return id.hashCode();
- }
-
- public Image getImage() {
- return pe.getImage(null);
- }
-
- public String getName() {
- if (iu != null) {
- return iu.getProperty(IInstallableUnit.PROP_NAME, null);
- }
- return pe.getLabel(null);
- }
-
- public String getType() {
- return ITypedElement.UNKNOWN_TYPE;
- }
-
- public InputStream getContents() {
- String contents = BLANK;
- if (iu != null) {
- contents = iu.getVersion().toString();
- }
- return new ByteArrayInputStream(contents.getBytes());
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SDKPolicy.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SDKPolicy.java
deleted file mode 100644
index 0305cf0a7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SDKPolicy.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceConstants;
-import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
-import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * SDKPolicy defines the Eclipse SDK UI policies for the
- * p2 UI. The policy is declared as an OSGi service in
- * the policy_component.xml file.
- *
- * @since 3.6
- */
-public class SDKPolicy extends Policy {
-
- public SDKPolicy() {
- // initialize for our values
- setVisibleAvailableIUQuery(QueryUtil.createIUGroupQuery());
- // If this ever changes, we must change AutomaticUpdateSchedule.getProfileQuery()
- setVisibleInstalledIUQuery(new UserVisibleRootQuery());
- setRepositoryPreferencePageId("org.eclipse.equinox.internal.p2.ui.sdk.SitesPreferencePage"); //$NON-NLS-1$
- setRepositoryPreferencePageName(ProvSDKMessages.SDKPolicy_PrefPageName);
- ProvSDKUIActivator.getDefault().updateWithPreferences(this);
- }
-
- public IStatus getNoProfileChosenStatus() {
- return ProvSDKUIActivator.getNoSelfProfileStatus();
- }
-
- public boolean continueWorkingOperation(ProfileChangeOperation operation, Shell shell) {
- // don't continue if superclass has already identified problem scenarios
- boolean ok = super.continueWorkingWithOperation(operation, shell);
- if (!ok)
- return false;
-
- IProvisioningPlan plan = operation.getProvisioningPlan();
- if (plan == null)
- return false;
-
- // Check the preference to see whether to continue.
- IPreferenceStore prefs = ProvSDKUIActivator.getDefault().getPreferenceStore();
- String openPlan = prefs.getString(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN);
- if (MessageDialogWithToggle.ALWAYS.equals(openPlan)) {
- return true;
- }
- if (MessageDialogWithToggle.NEVER.equals(openPlan)) {
- StatusManager.getManager().handle(plan.getStatus(), StatusManager.SHOW | StatusManager.LOG);
- return false;
- }
- MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoCancelQuestion(shell, ProvSDKMessages.ProvSDKUIActivator_Question, ProvSDKMessages.ProvSDKUIActivator_OpenWizardAnyway, null, false, prefs, PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN);
-
- // Any answer but yes will stop the performance of the plan, but NO is interpreted to mean, show me the error.
- if (dialog.getReturnCode() == IDialogConstants.NO_ID)
- StatusManager.getManager().handle(plan.getStatus(), StatusManager.SHOW | StatusManager.LOG);
- return dialog.getReturnCode() == IDialogConstants.YES_ID;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java
deleted file mode 100644
index b0abbe990..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Genuitec, LLC - added license support
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import java.util.HashSet;
-import java.util.StringTokenizer;
-import org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceConstants;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.engine.ProfileScope;
-import org.eclipse.equinox.p2.metadata.ILicense;
-import org.eclipse.equinox.p2.ui.LicenseManager;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * SimpleLicenseManager is a license manager that keeps track of
- * IInstallableUnit licenses using their UUID. The licenses ids
- * are stored in the profile's preferences.
- *
- * @since 3.6
- */
-public class SimpleLicenseManager extends LicenseManager {
- java.util.Set<String> accepted = new HashSet<String>();
- String profileId;
-
- public SimpleLicenseManager(String profileId) {
- super();
- this.profileId = profileId;
- initializeFromPreferences();
- }
-
- public SimpleLicenseManager() {
- this(IProfileRegistry.SELF);
- }
-
- public boolean accept(ILicense license) {
- accepted.add(license.getUUID());
- updatePreferences();
- return true;
- }
-
- public boolean reject(ILicense license) {
- accepted.remove(license.getUUID());
- updatePreferences();
- return true;
- }
-
- public boolean isAccepted(ILicense license) {
- return accepted.contains(license.getUUID());
- }
-
- public boolean hasAcceptedLicenses() {
- return !accepted.isEmpty();
- }
-
- private Preferences getPreferences() {
- IAgentLocation location = (IAgentLocation) ProvSDKUIActivator.getDefault().getProvisioningAgent().getService(IAgentLocation.SERVICE_NAME);
- return new ProfileScope(location, profileId).getNode(ProvSDKUIActivator.PLUGIN_ID);
- }
-
- private void initializeFromPreferences() {
- Preferences pref = getPreferences();
- if (pref != null) {
- String digestList = pref.get(PreferenceConstants.PREF_LICENSE_DIGESTS, ""); //$NON-NLS-1$
- StringTokenizer tokenizer = new StringTokenizer(digestList, ","); //$NON-NLS-1$
- while (tokenizer.hasMoreTokens()) {
- accepted.add(tokenizer.nextToken().trim());
- }
- }
- }
-
- private void updatePreferences() {
- Preferences pref = getPreferences();
- StringBuffer result = new StringBuffer();
- Object[] indexedList = accepted.toArray();
- for (int i = 0; i < indexedList.length; i++) {
- if (i != 0)
- result.append(","); //$NON-NLS-1$
- result.append((String) indexedList[i]);
- }
- pref.put(PreferenceConstants.PREF_LICENSE_DIGESTS, result.toString());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java
deleted file mode 100644
index 9bdfdb794..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.jface.dialogs.MessageDialog;
-
-/**
- * UpdateHandler invokes the check for updates UI
- *
- * @since 3.4
- */
-public class UpdateHandler extends PreloadingRepositoryHandler {
-
- boolean hasNoRepos = false;
- UpdateOperation operation;
-
- protected void doExecute(LoadMetadataRepositoryJob job) {
- if (hasNoRepos) {
- if (getProvisioningUI().getPolicy().getRepositoriesVisible()) {
- boolean goToSites = MessageDialog.openQuestion(getShell(), ProvSDKMessages.UpdateHandler_NoSitesTitle, ProvSDKMessages.UpdateHandler_NoSitesMessage);
- if (goToSites) {
- getProvisioningUI().manipulateRepositories(getShell());
- }
- }
- return;
- }
- if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
- getProvisioningUI().openUpdateWizard(false, operation, job);
- }
- }
-
- protected void doPostLoadBackgroundWork(IProgressMonitor monitor) throws OperationCanceledException {
- operation = getProvisioningUI().getUpdateOperation(null, null);
- // check for updates
- IStatus resolveStatus = operation.resolveModal(monitor);
- if (resolveStatus.getSeverity() == IStatus.CANCEL)
- throw new OperationCanceledException();
- }
-
- protected boolean preloadRepositories() {
- hasNoRepos = false;
- RepositoryTracker repoMan = getProvisioningUI().getRepositoryTracker();
- if (repoMan.getKnownRepositories(getProvisioningUI().getSession()).length == 0) {
- hasNoRepos = true;
- return false;
- }
- return super.preloadRepositories();
- }
-
- @Override
- protected String getProgressTaskName() {
- return ProvSDKMessages.UpdateHandler_ProgressTaskName;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties
deleted file mode 100644
index 8c95028ec..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2010 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-InstallNewSoftwareHandler_ProgressTaskName=Searching for available software...
-PreferenceInitializer_Error=Error accessing preferences.
-ProvSDKUIActivator_ErrorSavingPrefs=Error saving update preferences
-ProvSDKUIActivator_NoSelfProfile=Could not locate the running profile instance. The eclipse.p2.data.area and eclipse.p2.profile properties may not be set correctly in this application's config.ini file.
-ProvSDKUIActivator_OpenWizardAnyway=The software items you selected may not be valid with your current installation. Do you want to open the wizard anyway to review the selections?
-ProvSDKUIActivator_Question=Question
-ProvisioningPreferencePage_AlwaysOpenWizard=&Open the wizard anyway to review or change selections
-ProvisioningPreferencePage_BrowsingPrefsGroup=Browsing for updates
-ProvisioningPreferencePage_ShowLatestVersions=Show only the &latest versions of available software
-ProvisioningPreferencePage_ShowAllVersions=Show all &versions of available software
-ProvisioningPreferencePage_NeverOpenWizard=&Report the problems and do not open the wizard
-ProvisioningPreferencePage_OpenWizardIfInvalid=When software selected for an install wizard may not be compatible
-ProvisioningPreferencePage_PromptToOpenWizard=As&k me what to do when it happens
-SDKPolicy_PrefPageName=Available Software Sites
-UpdateHandler_NoSitesMessage=There are no update sites to search. Do you wish to open the "Available Software Sites" preferences?
-UpdateHandler_NoSitesTitle=No Updates Found
-UpdateHandler_ProgressTaskName=Checking for updates...
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java
deleted file mode 100644
index abb5085d7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.prefs;
-
-/**
- * @since 3.4
- */
-public class PreferenceConstants {
- public static final String PREF_PAGE_PROVISIONING = "org.eclipse.equinox.internal.p2.ui.sdk.ProvisioningPreferencePage"; //$NON-NLS-1$
- public static final String PREF_PAGE_SITES = "org.eclipse.equinox.internal.p2.ui.sdk.SitesPreferencePage"; //$NON-NLS-1$
- public static final String PREF_SHOW_LATEST_VERSION = "showLatestVersion"; //$NON-NLS-1$
- public static final String PREF_OPEN_WIZARD_ON_ERROR_PLAN = "allowNonOKPlan"; //$NON-NLS-1$
- public static final String PREF_LICENSE_DIGESTS = "licenseDigestList"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java
deleted file mode 100644
index 29417af06..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.prefs;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.preferences.*;
-import org.eclipse.equinox.internal.p2.ui.sdk.ProvSDKMessages;
-import org.eclipse.equinox.internal.p2.ui.sdk.ProvSDKUIActivator;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.engine.ProfileScope;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.ui.statushandlers.StatusManager;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * @since 3.4
- */
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
-
- public static void migratePreferences() {
- Preferences pref = new ProfileScope(getDefaultAgentLocation(), IProfileRegistry.SELF).getNode(ProvSDKUIActivator.PLUGIN_ID);
- try {
- if (pref.keys().length == 0) {
- // migrate preferences from instance scope to profile scope
- Preferences oldPref = new InstanceScope().getNode(ProvSDKUIActivator.PLUGIN_ID);
- // don't migrate everything. Some of the preferences moved to
- // another bundle.
- pref.put(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, oldPref.get(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.PROMPT));
- pref.putBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, oldPref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, true));
- pref.flush();
- }
- } catch (BackingStoreException e) {
- StatusManager.getManager().handle(new Status(IStatus.ERROR, ProvSDKUIActivator.PLUGIN_ID, 0, ProvSDKMessages.PreferenceInitializer_Error, e), StatusManager.LOG);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void initializeDefaultPreferences() {
- Preferences node = new DefaultScope().getNode("org.eclipse.equinox.p2.ui.sdk"); //$NON-NLS-1$
- // default values
- node.putBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, true);
- node.put(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.PROMPT);
- }
-
- private static IAgentLocation getDefaultAgentLocation() {
- ServiceReference reference = ProvSDKUIActivator.getContext().getServiceReference(IAgentLocation.SERVICE_NAME);
- if (reference == null)
- return null;
- IAgentLocation result = (IAgentLocation) ProvSDKUIActivator.getContext().getService(reference);
- ProvSDKUIActivator.getContext().ungetService(reference);
- return result;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java
deleted file mode 100644
index 0df8aa82d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.prefs;
-
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.equinox.internal.p2.ui.sdk.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * Preference page for general provisioning preferences.
- *
- * @since 3.4
- */
-
-public class ProvisioningPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
- private Group browsingGroup, validateGroup;
- private Button showLatestRadio, showAllRadio;
- private Button alwaysShowFailedPlan, neverShowFailedPlan, promptOnFailedPlan;
-
- protected Control createContents(Composite parent) {
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IProvSDKHelpContextIds.PROVISIONING_PREFERENCE_PAGE);
-
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginWidth = layout.marginHeight = 0;
- container.setLayout(layout);
-
- // Group for show all versions vs. show latest
- browsingGroup = new Group(container, SWT.NONE);
- browsingGroup.setText(ProvSDKMessages.ProvisioningPreferencePage_BrowsingPrefsGroup);
- layout = new GridLayout();
- layout.numColumns = 3;
- browsingGroup.setLayout(layout);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- browsingGroup.setLayoutData(gd);
-
- showLatestRadio = new Button(browsingGroup, SWT.RADIO);
- showLatestRadio.setText(ProvSDKMessages.ProvisioningPreferencePage_ShowLatestVersions);
- gd = new GridData();
- gd.horizontalSpan = 3;
- showLatestRadio.setLayoutData(gd);
-
- showAllRadio = new Button(browsingGroup, SWT.RADIO);
- showAllRadio.setText(ProvSDKMessages.ProvisioningPreferencePage_ShowAllVersions);
- gd = new GridData();
- gd.horizontalSpan = 3;
- showAllRadio.setLayoutData(gd);
-
- //Group for validating a failed plan
- validateGroup = new Group(container, SWT.NONE);
- validateGroup.setText(ProvSDKMessages.ProvisioningPreferencePage_OpenWizardIfInvalid);
- layout = new GridLayout();
- layout.numColumns = 3;
- validateGroup.setLayout(layout);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- validateGroup.setLayoutData(gd);
-
- alwaysShowFailedPlan = new Button(validateGroup, SWT.RADIO);
- alwaysShowFailedPlan.setText(ProvSDKMessages.ProvisioningPreferencePage_AlwaysOpenWizard);
- gd = new GridData();
- gd.horizontalSpan = 3;
- alwaysShowFailedPlan.setLayoutData(gd);
-
- neverShowFailedPlan = new Button(validateGroup, SWT.RADIO);
- neverShowFailedPlan.setText(ProvSDKMessages.ProvisioningPreferencePage_NeverOpenWizard);
- gd = new GridData();
- gd.horizontalSpan = 3;
- neverShowFailedPlan.setLayoutData(gd);
-
- promptOnFailedPlan = new Button(validateGroup, SWT.RADIO);
- promptOnFailedPlan.setText(ProvSDKMessages.ProvisioningPreferencePage_PromptToOpenWizard);
- gd = new GridData();
- gd.horizontalSpan = 3;
- promptOnFailedPlan.setLayoutData(gd);
-
- initialize();
-
- Dialog.applyDialogFont(container);
- return container;
-
- }
-
- private void initialize() {
- IPreferenceStore pref = ProvSDKUIActivator.getDefault().getPreferenceStore();
- showLatestRadio.setSelection(pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
- showAllRadio.setSelection(!pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
- String openWizard = pref.getString(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN);
- alwaysShowFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.ALWAYS));
- neverShowFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.NEVER));
- promptOnFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.PROMPT));
- }
-
- protected void performDefaults() {
- super.performDefaults();
- Preferences pref = new DefaultScope().getNode(ProvSDKUIActivator.PLUGIN_ID);
- showLatestRadio.setSelection(pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, false));
- showAllRadio.setSelection(!pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, false));
- String openWizard = pref.get(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, ""); //$NON-NLS-1$
- alwaysShowFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.ALWAYS));
- neverShowFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.NEVER));
- promptOnFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.PROMPT));
- }
-
- public boolean performOk() {
- IPreferenceStore pref = ProvSDKUIActivator.getDefault().getPreferenceStore();
- pref.setValue(PreferenceConstants.PREF_SHOW_LATEST_VERSION, showLatestRadio.getSelection());
- if (alwaysShowFailedPlan.getSelection())
- pref.setValue(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.ALWAYS);
- else if (neverShowFailedPlan.getSelection())
- pref.setValue(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.NEVER);
- else
- pref.setValue(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.PROMPT);
-
- ProvSDKUIActivator.getDefault().savePreferences();
- return true;
- }
-
- public void init(IWorkbench workbench) {
- // Nothing to do
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_disabled_patch_obj.gif b/bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_disabled_patch_obj.gif
new file mode 100644
index 000000000..196b83d60
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_disabled_patch_obj.gif
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_patch_obj.gif b/bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_patch_obj.gif
new file mode 100755
index 000000000..57fc499b8
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_patch_obj.gif
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryComponent.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryTrackerComponent.java
index 6a0a01505..fa416c2d4 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryComponent.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryTrackerComponent.java
@@ -1,25 +1,30 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2011 EclipseSource Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * EclipseSource Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository;
+package org.eclipse.equinox.internal.p2.ui;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
/**
- * Service factory providing {@link IArtifactRepositoryManager} instances.
+ * Component that provides a factory that can create and initialize
+ * {@link RepositoryTracker} instances.
*/
-public class ArtifactRepositoryComponent implements IAgentServiceFactory {
+public class RepositoryTrackerComponent implements IAgentServiceFactory {
public Object createService(IProvisioningAgent agent) {
- return new ArtifactRepositoryManager(agent);
+ ProvisioningUI ui = (ProvisioningUI) agent.getService(ProvisioningUI.class.getName());
+ if (ui == null)
+ return null;
+ return new ColocatedRepositoryTracker(ui);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java
index 852c587d7..2c7496b90 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java
@@ -568,6 +568,10 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
if (resolveAllCheckbox.getSelection())
return new ProvisioningContext(getProvisioningUI().getSession().getProvisioningAgent());
// Use the contents of the combo to determine the context
- return repoSelector.getProvisioningContext();
+ ProvisioningContext context = repoSelector.getProvisioningContext();
+ // This should really be a property value retrieved by API
+ // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=303258
+ context.setProperty("org.eclipse.equinox.p2.operations.customContext", Boolean.toString(true)); //$NON-NLS-1$
+ return context;
}
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IPreFilterJobProvider.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IPreFilterJobProvider.java
new file mode 100644
index 000000000..b4e72b88c
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IPreFilterJobProvider.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.dialogs;
+
+import org.eclipse.core.runtime.jobs.Job;
+
+/**
+ * IPreFilterJobProvider provides an optional job that must be run before
+ * filtering can be allowed to occur in a filtered tree. The client is assumed
+ * to have set the expected job priority.
+ *
+ */
+public interface IPreFilterJobProvider {
+ public Job getPreFilterJob();
+}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IRepositoryManipulationHook.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IRepositoryManipulationHook.java
new file mode 100644
index 000000000..fe9e1676b
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IRepositoryManipulationHook.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.dialogs;
+
+
+/**
+ * IRepositoryManipulationHood defines callbacks that are called when the
+ * UI is manipulating repositories.
+ */
+public interface IRepositoryManipulationHook {
+ public void preManipulateRepositories();
+
+ public void postManipulateRepositories();
+}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java
index 90035f8b3..bf441018a 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java
@@ -20,10 +20,11 @@ import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.ui.*;
import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
+import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.engine.ProvisioningContext;
import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.*;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
import org.eclipse.equinox.p2.ui.ProvisioningUI;
import org.eclipse.jface.action.Action;
@@ -570,16 +571,44 @@ public class RepositorySelectionGroup {
if (locals.length > 0 && siteSel == repoCombo.getItemCount() - 1) {
ProvisioningContext context = new ProvisioningContext(ui.getSession().getProvisioningAgent());
context.setMetadataRepositories(locals);
- context.setArtifactRepositories(locals);
+ setArtifactRepositories(context, locals);
return context;
}
// A single site is selected.
ProvisioningContext context = new ProvisioningContext(ui.getSession().getProvisioningAgent());
context.setMetadataRepositories(new URI[] {comboRepos[siteSel]});
- context.setArtifactRepositories(new URI[] {comboRepos[siteSel]});
+ setArtifactRepositories(context, (new URI[] {comboRepos[siteSel]}));
return context;
}
+ private void setArtifactRepositories(ProvisioningContext context, URI[] metadataRepos) {
+ ArrayList<URI> list = new ArrayList<URI>(metadataRepos.length);
+ IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ui.getSession().getProvisioningAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
+ if (manager == null)
+ return;
+
+ for (int i = 0; i < metadataRepos.length; i++) {
+ // first assume a colocated artifact repository
+ list.add(metadataRepos[i]);
+ // Load the repository so that we can get its references.
+ // Since this method is only called when the repositories are selected, we can safely
+ // assume that the repo has already been loaded (so this is fast).
+ IMetadataRepository repository;
+ try {
+ repository = manager.loadRepository(metadataRepos[i], new NullProgressMonitor());
+ Collection<IRepositoryReference> references = repository.getReferences();
+ for (IRepositoryReference ref : references) {
+ if (ref.getType() == IRepository.TYPE_ARTIFACT && (ref.getOptions() | IRepository.ENABLED) != 0) {
+ list.add(ref.getLocation());
+ }
+ }
+ } catch (ProvisionException e) {
+ // ignore, this will have been reported elsewhere.
+ }
+ }
+ context.setArtifactRepositories(list.toArray(new URI[list.size()]));
+ }
+
void repoComboSelectionChanged() {
int repoChoice = -1;
URI repoLocation = null;
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/.classpath b/bundles/org.eclipse.equinox.p2.updatechecker/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/.cvsignore b/bundles/org.eclipse.equinox.p2.updatechecker/.cvsignore
deleted file mode 100644
index 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 c6151439a..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/.project
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.updatechecker</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index e515fdb64..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,329 +0,0 @@
-#Wed Dec 30 07:21:17 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index dbe72f165..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:59:14 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 6904bd96c..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Sat Aug 11 20:17:52 EDT 2007
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.updatechecker/META-INF/MANIFEST.MF
deleted file mode 100644
index a5ed6b4a9..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,24 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.updatechecker;singleton:=true
-Bundle-Version: 1.1.0.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.updatechecker;x-internal:=true,
- org.eclipse.equinox.internal.provisional.p2.updatechecker;x-friends:="org.eclipse.equinox.p2.ui.sdk.scheduler"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.3.0,4.0)"
-Service-Component: OSGI-INF/updatechecker.xml
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.core.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.planner;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)"
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/about.html b/bundles/org.eclipse.equinox.p2.updatechecker/about.html
deleted file mode 100644
index d62785d75..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/about.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
- <h3>Third Party Content</h3>
- <p>The Content includes items that have been sourced from third parties as set out below. If you
- did not receive this Content directly from the Eclipse Foundation, the following is provided
- for informational purposes only, and you should look to the Redistributor's license for
- terms and conditions of use.</p>
-
- <h4>FileInstall 1.0</h4>
- <p>The bundle includes derivative works of software originally developed by Peter Kriens (aQute).
- That original work was licensed under the EPL v1.0 and this derivative work is similarly licensed.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/build.properties b/bundles/org.eclipse.equinox.p2.updatechecker/build.properties
deleted file mode 100644
index c15f3da6f..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties,\
- OSGI-INF/
-src.includes = about.html
-javacSource = 1.5
-javacTarget = jsr14
-source.. = src/
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/plugin.properties b/bundles/org.eclipse.equinox.p2.updatechecker/plugin.properties
deleted file mode 100644
index 3c8feb57a..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Equinox Provisioning Update Checker
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/pom.xml b/bundles/org.eclipse.equinox.p2.updatechecker/pom.xml
deleted file mode 100644
index b523afee9..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.updatechecker</artifactId>
- <version>1.1.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java b/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java
deleted file mode 100644
index f3b4b2a65..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.updatechecker;
-
-import java.net.URI;
-import java.text.SimpleDateFormat;
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.provisional.p2.updatechecker.*;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.planner.IPlanner;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-
-/**
- * Default implementation of {@link IUpdateChecker}.
- * <p>
- * This implementation is not optimized. It doesn't optimize for multiple
- * polls on the same profile, nor does it cache any info about a profile from
- * poll to poll.
- */
-public class UpdateChecker implements IUpdateChecker {
- public static boolean DEBUG = false;
- public static boolean TRACE = false;
- /**
- * Map of IUpdateListener->UpdateCheckThread.
- */
- private HashMap<IUpdateListener, UpdateCheckThread> checkers = new HashMap<IUpdateListener, UpdateCheckThread>();
-
- private final IProvisioningAgent agent;
- IProfileRegistry profileRegistry;
- IPlanner planner;
-
- private class UpdateCheckThread extends Thread {
- boolean done = false;
- long poll, delay;
- IUpdateListener listener;
- String profileId;
- IQuery<IInstallableUnit> query;
-
- UpdateCheckThread(String profileId, IQuery<IInstallableUnit> query, long delay, long poll, IUpdateListener listener) {
- this.poll = poll;
- this.delay = delay;
- this.profileId = profileId;
- this.query = query;
- this.listener = listener;
- }
-
- public void run() {
- try {
- if (delay != ONE_TIME_CHECK && delay > 0) {
- Thread.sleep(delay);
- }
- while (!done) {
-
- trace("Checking for updates for " + profileId + " at " + getTimeStamp()); //$NON-NLS-1$ //$NON-NLS-2$
- Collection<IInstallableUnit> iusWithUpdates = checkForUpdates(profileId, query);
- if (iusWithUpdates.size() > 0) {
- trace("Notifying listener of available updates"); //$NON-NLS-1$
- UpdateEvent event = new UpdateEvent(profileId, iusWithUpdates);
- if (!done)
- listener.updatesAvailable(event);
- } else {
- trace("No updates were available"); //$NON-NLS-1$
- }
- if (delay == ONE_TIME_CHECK || delay <= 0) {
- done = true;
- } else {
- Thread.sleep(poll);
- }
- }
- } catch (InterruptedException e) {
- // nothing
- } catch (Exception e) {
- LogHelper.log(new Status(IStatus.ERROR, UpdateCheckerComponent.BUNDLE_ID, "Exception in update check thread", e)); //$NON-NLS-1$
- }
- }
- }
-
- public UpdateChecker(IProvisioningAgent agent) {
- this.agent = agent;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateChecker#addUpdateCheck(java.lang.String, long, long, org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateListener)
- */
- public void addUpdateCheck(String profileId, IQuery<IInstallableUnit> query, long delay, long poll, IUpdateListener listener) {
- if (checkers.containsKey(listener))
- return;
- trace("Adding update checker for " + profileId + " at " + getTimeStamp()); //$NON-NLS-1$ //$NON-NLS-2$
- UpdateCheckThread thread = new UpdateCheckThread(profileId, query, delay, poll, listener);
- checkers.put(listener, thread);
- thread.start();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateChecker#removeUpdateCheck(org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateListener)
- */
- public void removeUpdateCheck(IUpdateListener listener) {
- checkers.remove(listener);
- }
-
- /*
- * Return the array of ius in the profile that have updates
- * available.
- */
- Collection<IInstallableUnit> checkForUpdates(String profileId, IQuery<IInstallableUnit> query) {
- IProfile profile = getProfileRegistry().getProfile(profileId);
- ArrayList<IInstallableUnit> iusWithUpdates = new ArrayList<IInstallableUnit>();
- if (profile == null)
- return CollectionUtils.emptyList();
- ProvisioningContext context = new ProvisioningContext(agent);
- context.setMetadataRepositories(getAvailableRepositories());
- if (query == null)
- query = QueryUtil.createIUAnyQuery();
- Iterator<IInstallableUnit> iter = profile.query(query, null).iterator();
- while (iter.hasNext()) {
- IInstallableUnit iu = iter.next();
- IQueryResult<IInstallableUnit> replacements = getPlanner().updatesFor(iu, context, null);
- if (!replacements.isEmpty())
- iusWithUpdates.add(iu);
- }
- return iusWithUpdates;
- }
-
- /**
- * Returns the list of metadata repositories that are currently available.
- */
- private URI[] getAvailableRepositories() {
- IMetadataRepositoryManager repoMgr = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- URI[] repositories = repoMgr.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
- ArrayList<URI> available = new ArrayList<URI>();
- for (int i = 0; i < repositories.length; i++) {
- try {
- repoMgr.loadRepository(repositories[i], null);
- available.add(repositories[i]);
- } catch (ProvisionException e) {
- LogHelper.log(e.getStatus());
- }
- }
- return available.toArray(new URI[available.size()]);
- }
-
- void trace(String message) {
- if (Tracing.DEBUG_UPDATE_CHECK)
- Tracing.debug(message);
- }
-
- String getTimeStamp() {
- Date d = new Date();
- SimpleDateFormat df = new SimpleDateFormat("[MM/dd/yy;HH:mm:ss:SSS]"); //$NON-NLS-1$
- return df.format(d);
- }
-
- IPlanner getPlanner() {
- if (planner == null) {
- planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
- if (planner == null) {
- throw new IllegalStateException("Provisioning system has not been initialized"); //$NON-NLS-1$
- }
- }
- return planner;
- }
-
- IProfileRegistry getProfileRegistry() {
- if (profileRegistry == null) {
- profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null) {
- throw new IllegalStateException("Provisioning system has not been initialized"); //$NON-NLS-1$
- }
- }
- return profileRegistry;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateCheckerComponent.java b/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateCheckerComponent.java
deleted file mode 100644
index e5c4e4d94..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateCheckerComponent.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.updatechecker;
-
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
-
-/**
- * Component for instantiating update checker service instances.
- */
-public class UpdateCheckerComponent implements IAgentServiceFactory {
- public static final String BUNDLE_ID = "org.eclipse.equinox.p2.updatechecker"; //$NON-NLS-1$
-
- public Object createService(IProvisioningAgent agent) {
- return new UpdateChecker(agent);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateChecker.java b/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateChecker.java
deleted file mode 100644
index 31c6e5618..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateChecker.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.updatechecker;
-
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.IQuery;
-
-/**
- * An update checker periodically polls for updates to specified profiles and
- * informs listeners if updates are available. Listeners may then determine
- * whether to retrieve the updates, inform the user, etc.
- */
-public interface IUpdateChecker {
- public static final String SERVICE_NAME = IUpdateChecker.class.getName();
- public static long ONE_TIME_CHECK = -1L;
-
- /**
- * Adds an update listener that will be notified when updates are available for all
- * installable units that satisfy the given query. The listener will remain
- * registered until removed using the {@link #removeUpdateCheck(IUpdateListener)}
- * method. Adding a listener that is identical to a listener that is already registered
- * has no effect.
- * <p>
- * Once the listener is registered, it will continue to receive notification of updates
- * based on the specified polling frequency. However, if a delay value of {@link #ONE_TIME_CHECK}
- * is used, only a single update check will occur for that listener. If this delay value
- * is used, the specified polling frequency is ignored.
- *
- * @param profileId The profile id to check for updates
- * @param iusToCheckQuery An installable unit query that matches the units to check for updates
- * @param delay The delay in milliseconds before the first query should occur, or {@link #ONE_TIME_CHECK}
- * to indicate that a single update check should occur immediately
- * @param poll The polling frequency, in milliseconds, between checks for updates
- * @param listener The listener to be notified of updates
- * @see #removeUpdateCheck(IUpdateListener)
- */
- public abstract void addUpdateCheck(String profileId, IQuery<IInstallableUnit> iusToCheckQuery, long delay, long poll, IUpdateListener listener);
-
- /**
- * Removes an update listener from the set of listeners registered with this update
- * checker. If an update check is currently in progress the listener may still receive
- * events after this method returns. Removing a listener that is not registered has
- * no effect.
- *
- * @param listener The listener to remove
- * @see #addUpdateCheck(String, IQuery, long, long, IUpdateListener)
- */
- public abstract void removeUpdateCheck(IUpdateListener listener);
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateListener.java b/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateListener.java
deleted file mode 100644
index 7cde63663..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateListener.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.updatechecker;
-
-/**
- * An IUpdateListener informs listeners that an update is available for
- * the specified profile. Listeners should expect to receive this notification
- * from a background thread.
- */
-public interface IUpdateListener {
-
- public void updatesAvailable(UpdateEvent event);
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/UpdateEvent.java b/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/UpdateEvent.java
deleted file mode 100644
index 7c4a38890..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/UpdateEvent.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.updatechecker;
-
-import java.util.Collection;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-
-/**
- * An UpdateEvent describes what IU's have updates for a given profile.
- */
-public class UpdateEvent {
-
- String profileId;
- Collection<IInstallableUnit> iusWithUpdates;
-
- public UpdateEvent(String profileId, Collection<IInstallableUnit> iusWithUpdates) {
- this.profileId = profileId;
- this.iusWithUpdates = iusWithUpdates;
- }
-
- public Collection<IInstallableUnit> getIUs() {
- return iusWithUpdates;
- }
-
- public String getProfileId() {
- return profileId;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/.classpath b/bundles/org.eclipse.equinox.p2.updatesite/.classpath
deleted file mode 100644
index 64c5e31b7..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.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.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.launching.prefs b/bundles/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.jdt.launching.prefs
deleted file mode 100644
index ff827d560..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.jdt.launching.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Sun Dec 06 23:05:15 EST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
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 8273b9e72..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,44 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.updatesite;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.updatesite.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-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
-Require-Bundle: 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"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: javax.xml.parsers,
- org.eclipse.equinox.app;version="1.1.0",
- org.eclipse.equinox.internal.p2.artifact.repository.simple,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.publisher.eclipse,
- org.eclipse.equinox.internal.p2.repository,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.publisher.actions,
- org.eclipse.equinox.p2.publisher.eclipse,
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.spi.p2.publisher,
- org.eclipse.osgi.service.resolver;version="1.2.0",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0",
- org.w3c.dom,
- org.xml.sax,
- org.xml.sax.helpers
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 a449d8520..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2010 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.properties,\
- about.html
-src.includes = about.html
-javacTarget=jsr14
-javacSource=1.5
-javacWarnings..=+unusedAllocation,unusedImport,unusedLocal,unusedPrivate \ No newline at end of file
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/pom.xml b/bundles/org.eclipse.equinox.p2.updatesite/pom.xml
deleted file mode 100644
index 7bf1c8aa9..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.updatesite</artifactId>
- <version>1.0.200.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
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/CategoryParser.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryParser.java
deleted file mode 100644
index 9bd569a7e..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryParser.java
+++ /dev/null
@@ -1,773 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.updatesite;
-
-import java.io.IOException;
-import java.io.InputStream;
-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.xml.sax.*;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Parses a category.xml file.
- * This class was initially copied from org.eclipse.update.core.model.DefaultSiteParser.
- */
-public class CategoryParser extends DefaultHandler {
- private final static SAXParserFactory parserFactory = SAXParserFactory.newInstance();
- private static final String PLUGIN_ID = Activator.ID;
-
- 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 DESCRIPTION = "description"; //$NON-NLS-1$
- private static final String FEATURE = "feature"; //$NON-NLS-1$
- private static final String SITE = "site"; //$NON-NLS-1$
- private static final String IU = "iu"; //$NON-NLS-1$
- private static final String QUERY = "query"; //$NON-NLS-1$
- private static final String EXPRESSION = "expression"; //$NON-NLS-1$
- private static final String PARAM = "param"; //$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_IU = 8;
- private static final int STATE_EXPRESSION = 9;
- private static final int STATE_PARAM = 10;
- private static final int STATE_QUERY = 11;
- private static final int STATE_SITE = 1;
-
- private boolean DESCRIPTION_SITE_ALREADY_SEEN = false;
- // Current object stack (used to hold the current object we are
- // populating in this plugin descriptor
- Stack<Object> objectStack = new Stack<Object>();
-
- private SAXParser parser;
-
- // Current State Information
- Stack<Integer> stateStack = new Stack<Integer>();
-
- // List of string keys for translated strings
- private final List<String> messageKeys = new ArrayList<String>(4);
-
- private MultiStatus status;
-
- /*
- *
- */
- private static void debug(String s) {
- Tracing.debug("CategoryParser: " + s); //$NON-NLS-1$
- }
-
- 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 CategoryParser(URI siteLocation) {
- super();
- stateStack = new Stack<Integer>();
- objectStack = new Stack<Object>();
- 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$
- }
-
- public int currentState() {
- Integer state = stateStack.peek();
- if (state != null)
- return state.intValue();
- return STATE_IGNORED_ELEMENT;
- }
-
- /**
- * 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 = currentState();
- switch (state) {
- case STATE_DESCRIPTION_SITE :
- case STATE_DESCRIPTION_CATEGORY_DEF :
- objectStack.push(text);
- break;
-
- case STATE_EXPRESSION :
- case STATE_PARAM :
- text = text.trim();
- String existing = null;
- if (objectStack.peek() instanceof String)
- existing = (String) objectStack.pop();
- if (existing != null)
- text = existing + text;
- objectStack.push(text);
- break;
- default :
- break; // nothing
- }
- }
-
- /**
- * 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 = currentState();
- switch (state) {
- case STATE_IGNORED_ELEMENT :
- case STATE_ARCHIVE :
- case STATE_CATEGORY :
- case STATE_QUERY :
- 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_IU :
- stateStack.pop();
- SiteIU completeIU = (SiteIU) objectStack.pop();
- String id = completeIU.getID();
- String expression = completeIU.getQueryExpression();
- if (id == null && expression == null)
- internalError("The IU must specify an id or an expression to match against."); //$NON-NLS-1$
- break;
-
- case STATE_EXPRESSION :
- stateStack.pop();
- if (objectStack.peek() instanceof String) {
- text = (String) objectStack.pop();
- SiteIU iu = (SiteIU) objectStack.peek();
- iu.setQueryExpression(text);
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("Found Expression: " + text); //$NON-NLS-1$
- }
- break;
- case STATE_PARAM :
- stateStack.pop();
- if (objectStack.peek() instanceof String) {
- text = (String) objectStack.pop();
- SiteIU iu = (SiteIU) objectStack.peek();
- iu.addQueryParams(text);
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("Found Param: " + text); //$NON-NLS-1$
- }
- 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_IU :
- return "IU"; //$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(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) {
- internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState())})));
- }
-
- private void handleFeatureState(String elementName, Attributes attributes) {
- 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(IU)) {
- stateStack.push(new Integer(STATE_IU));
- processIU(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 handleIUState(String elementName, Attributes attributes) {
- if (elementName.equals(QUERY)) {
- stateStack.push(new Integer(STATE_QUERY));
- processQuery(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 handleQueryState(String elementName, Attributes attributes) {
- if (elementName.equals(EXPRESSION)) {
- stateStack.push(new Integer(STATE_EXPRESSION));
- processExpression(attributes);
- } else if (elementName.equals(PARAM)) {
- stateStack.push(new Integer(STATE_PARAM));
- processParam(attributes);
- } else
- internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState())})));
- }
-
- private void handleExpression(String elementName, Attributes attributes) {
- internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState())})));
- }
-
- private void handleParamState(String elementName, Attributes attributes) {
- 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));
- 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<Object> 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) {
- // don't care about archives in category xml
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End processing Archive"); //$NON-NLS-1$
- }
-
- /*
- * process the Category info
- */
- private void processCategory(Attributes attributes) {
- String category = attributes.getValue("name"); //$NON-NLS-1$
- Object obj = objectStack.peek();
- // TODO could create common class/interface for adding categories
- if (obj instanceof SiteFeature)
- ((SiteFeature) obj).addCategoryName(category);
- else if (obj instanceof SiteIU)
- ((SiteIU) obj).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();
-
- // identifier and version
- String id = attributes.getValue("id"); //$NON-NLS-1$
- String ver = attributes.getValue("version"); //$NON-NLS-1$
-
- boolean noId = (id == null || id.trim().equals("")); //$NON-NLS-1$
-
- // We need to have id and version, or the url, or both.
- if (noId)
- internalError(NLS.bind(Messages.DefaultSiteParser_Missing, (new String[] {"url", getState(currentState())}))); //$NON-NLS-1$
-
- feature.setFeatureIdentifier(id);
- feature.setFeatureVersion(ver);
-
- SiteModel site = (SiteModel) objectStack.peek();
- site.addFeature(feature);
- feature.setSiteModel(site);
-
- objectStack.push(feature);
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End Processing Feature Tag: id:" + id + " version:" + ver); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /*
- * process IU info
- */
- private void processIU(Attributes attributes) {
- SiteIU iu = new SiteIU();
- SiteModel site = (SiteModel) objectStack.peek();
-
- // identifier and version
- String id = attributes.getValue("id"); //$NON-NLS-1$
- String range = attributes.getValue("range"); //$NON-NLS-1$
- id = id == null ? null : id.trim();
- range = range == null ? null : range.trim();
-
- iu.setID(id);
- iu.setRange(range);
-
- site.addIU(iu);
- objectStack.push(iu);
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End processing iu."); //$NON-NLS-1$
- }
-
- /*
- * process expression info
- */
- private void processExpression(Attributes attributes) {
- SiteIU iu = (SiteIU) objectStack.peek();
- iu.setQueryType(attributes.getValue("type")); //$NON-NLS-1$
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End processing Expression: " + iu.getQueryType()); //$NON-NLS-1$
- }
-
- /*
- * process query info
- */
- private void processQuery(Attributes attributes) {
- // TODO may have simple attriutes for id and range
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End processing Query."); //$NON-NLS-1$
- }
-
- /*
- * process param info
- */
- private void processParam(Attributes attributes) {
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End processing Param."); //$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();
- objectStack.push(site);
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End process Site tag."); //$NON-NLS-1$
-
- }
-
- /**
- * 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_IU :
- handleIUState(localName, attributes);
- break;
-
- case STATE_EXPRESSION :
- handleExpression(localName, attributes);
- break;
-
- case STATE_QUERY :
- handleQueryState(localName, attributes);
- break;
-
- case STATE_PARAM :
- handleParamState(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;
- }
-
- }
-
- 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/CategoryPublisherApplication.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryPublisherApplication.java
deleted file mode 100644
index 4f5346e99..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryPublisherApplication.java
+++ /dev/null
@@ -1,76 +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.core.ProvisionException;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-
-/**
- * <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
- }
-
- /*
- * Check to see if an existing repository already has the "compressed" flag set
- */
- protected void initializeRepositories(PublisherInfo publisherInfo) throws ProvisionException {
- try {
- if (metadataLocation != null) {
- // Try to load the metadata repository. If it loads, check the "compressed" flag, and cache it.
- // If there are any errors loading it (i.e. it doesn't exist), just skip this step
- // If there are serious problems with the repository, the superclass initializeRepositories method
- // will handle it.
- IMetadataRepository result = Publisher.loadMetadataRepository(agent, metadataLocation, true, true);
- if (result != null) {
- Object property = result.getProperties().get(IRepository.PROP_COMPRESSED);
- if (property != null) {
- boolean compressProperty = Boolean.valueOf((String) property);
- this.compress = compressProperty || compress;
- }
- }
- }
- } catch (ProvisionException e) {
- //do nothing
- }
- super.initializeRepositories(publisherInfo);
- }
-
- 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 8a48a093b..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryXMLAction.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.internal.p2.updatesite;
-
-import org.eclipse.equinox.p2.core.ProvisionException;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-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 publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- try {
- updateSite = UpdateSite.loadCategoryFile(location, monitor);
- } catch (ProvisionException e) {
- return new Status(IStatus.ERROR, Activator.ID, Messages.Error_generating_category, e);
- }
- if (updateSite == null)
- return new Status(IStatus.ERROR, Activator.ID, Messages.Error_generating_category);
- return super.perform(publisherInfo, 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 cdc70b705..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<Object> objectStack = new Stack<Object>();
-
- private SAXParser parser;
-
- // Current State Information
- Stack<Integer> stateStack = new Stack<Integer>();
-
- // List of string keys for translated strings
- private final List<String> messageKeys = new ArrayList<String>(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<Integer>();
- objectStack = new Stack<Object>();
- 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 = 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 = 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 = 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<Object> 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 = 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 9a0809483..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<Feature> features = new ArrayList<Feature>();
- 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 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 6f4545f5d..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/LocalUpdateSiteAction.java
+++ /dev/null
@@ -1,111 +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;
- private String categoryVersion;
-
- 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 void setCategoryVersion(String version) {
- categoryVersion = version;
- }
-
- 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<IPublisherAction> result = new ArrayList<IPublisherAction>();
- // create an action that just publishes the raw bundles and features
- IPublisherAction action = new MergeResultsAction(new IPublisherAction[] {createFeaturesAction(), createBundlesAction()}, IPublisherResult.MERGE_ALL_NON_ROOT);
- result.add(action);
- result.add(createSiteXMLAction());
- return result.toArray(new IPublisherAction[result.size()]);
- }
-
- private IPublisherAction createSiteXMLAction() {
- SiteXMLAction action = null;
- if (updateSite != null)
- action = new SiteXMLAction(updateSite, categoryQualifier);
- else if (source != null) {
- action = new SiteXMLAction(new File(source, "site.xml").toURI(), categoryQualifier); //$NON-NLS-1$
- }
- if (action != null && categoryVersion != null)
- action.setCategoryVersion(categoryVersion);
- return action;
- }
-
- 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 8fb88510a..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/Messages.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.equinox.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_generating_category;
- public static String Error_generating_siteXML;
- 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;
-
- public static String Unexpected_exception;
-
- 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 26434ef8e..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteFeaturesAction.java
+++ /dev/null
@@ -1,81 +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 org.eclipse.equinox.p2.core.ProvisionException;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.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) {
- Map<String, String> extraProperties = new HashMap<String, String>();
- 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<String, String> mockManifest = new Hashtable<String, String>();
- 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<IInstallableUnit> childIUs = new ArrayList<IInstallableUnit>();
- 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 f7278e23e..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteUpdateSiteAction.java
+++ /dev/null
@@ -1,69 +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 org.eclipse.equinox.p2.publisher.IPublisherAction;
-
-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<IPublisherAction> result = new ArrayList<IPublisherAction>();
- result.add(new RemoteFeaturesAction(updateSite));
- result.add(createSiteXMLAction());
- return 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 06ed2a961..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteCategory.java
+++ /dev/null
@@ -1,195 +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.*;
-
-/**
- * A category in an update site.
- *
- * Based on org.eclipse.update.core.model.CategoryModel.
- */
-public class SiteCategory {
-
- private static Comparator<SiteCategory> comp;
- private String description;
- private String label;
- private String name;
- private Map<Locale, Map<String, String>> localizations;
-
- /**
- * Returns a comparator for category models.
- *
- * @return comparator
- * @since 2.0
- */
- public static Comparator<SiteCategory> getComparator() {
- if (comp == null) {
- comp = new Comparator<SiteCategory>() {
- /*
- * @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(SiteCategory cat1, SiteCategory cat2) {
-
- 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<Locale, Map<String, String>> 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<Locale, Map<String, String>> 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 0a70eba90..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<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<String>();
- 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 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<String>(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/SiteIU.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteIU.java
deleted file mode 100644
index bacf48ae4..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteIU.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.updatesite;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class SiteIU {
-
- public static final String QUERY_TYPE_CONTEXT = "context"; //$NON-NLS-1$
- public static final String QUERY_TYPE_MATCH = "match"; //$NON-NLS-1$
-
- private String id = null;
- private String range = null;
- private String queryExpression = null;
- private String queryType = null;
- private List<String> queryParams = null;
- private List<String> categoryNames = null;
-
- /**
- * Returns the id of the IU
- * @return the id of the IU
- */
- public String getID() {
- return id;
- }
-
- /**
- * Returns the range of the IU
- * @return the range of the IU
- */
- public String getRange() {
- return range;
- }
-
- /**
- * Returns the query expression for the IU.
- *
- * @return query expression
- */
- public String getQueryExpression() {
- return queryExpression;
- }
-
- /**
- * Returns the query type for the IU.
- *
- * @return the query type
- */
- public String getQueryType() {
- return queryType;
- }
-
- /**
- * Returns the params for the query expression for the IU
- *
- * @return an array of query params.
- */
- public String[] getQueryParams() {
- if (queryParams == null)
- return new String[0];
-
- return queryParams.toArray(new String[0]);
- }
-
- /**
- * Returns the names of categories the referenced IU belongs to.
- *
- * @return an array of names, or an empty array.
- */
- public String[] getCategoryNames() {
- if (categoryNames == null)
- return new String[0];
-
- return categoryNames.toArray(new String[0]);
- }
-
- /**
- * Sets the id for the IU.
- * @param id the id
- */
- public void setID(String id) {
- this.id = id;
- }
-
- /**
- * Sets the range for the IU.
- * @param range the range
- */
- public void setRange(String range) {
- this.range = range;
- }
-
- /**
- * Sets the query expression for the IU.
- *
- * @param queryExpression query expression
- */
- public void setQueryExpression(String queryExpression) {
- this.queryExpression = queryExpression;
- }
-
- /**
- * Sets the query type for the IU.
- *
- * @param queryType the query type
- */
- public void setQueryType(String queryType) {
- this.queryType = queryType;
- }
-
- /**
- * Adds the name of a category this IU belongs to.
- *
- * @param categoryName category name
- */
- public void addCategoryName(String categoryName) {
- if (this.categoryNames == null)
- this.categoryNames = new ArrayList<String>();
- if (!this.categoryNames.contains(categoryName))
- this.categoryNames.add(categoryName);
- }
-
- /**
- * Adds a param for the query expression for this IU.
- *
- * @param queryParam a query param.
- */
- public void addQueryParams(String queryParam) {
- if (this.queryParams == null)
- this.queryParams = new ArrayList<String>();
- // don't do contains check, order matters and there may be duplicates
- this.queryParams.add(queryParam);
- }
-}
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 9beaa9f6b..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteModel.java
+++ /dev/null
@@ -1,335 +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<URLEntry> archiveReferences;
- /**
- * Map of String (category id) -> SiteCategory
- */
- private Map<String, SiteCategory> categories;
- private URLEntry description;
- /**
- * Map of String (feature id) -> SiteFeature
- */
- private List<SiteFeature> features;
- private List<SiteIU> ius;
- private URI locationURI;
- private String locationURIString;
- private String mirrorsURIString;
- private boolean supportsPack200;
- private String type;
- private URLEntry[] associateSites;
- private String digestURIString;
- private List<String> messageKeys;
- private Map<Locale, Map<String, String>> 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<URLEntry>();
- 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<String, SiteCategory>();
- 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<SiteFeature>();
- this.features.add(featureReference);
- }
-
- /**
- * Adds a iu model to site.
- *
- * @param iu iu model
- */
- public void addIU(SiteIU iu) {
- if (this.ius == null)
- this.ius = new ArrayList<SiteIU>();
- this.ius.add(iu);
- }
-
- /**
- * 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 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 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 (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 features.toArray(new SiteFeature[0]);
- }
-
- /**
- * Returns an array of IU models on this site.
- *
- * @return an array of IU models, or an empty array.
- */
- public SiteIU[] getIUs() {
- if (ius == null || ius.size() == 0)
- return new SiteIU[0];
- return ius.toArray(new SiteIU[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<Locale, Map<String, String>> 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<String> 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<Locale, Map<String, String>> localizations) {
- this.localizations = localizations;
- if (localizations != null && !localizations.isEmpty() && //
- categories != null && !categories.isEmpty()) {
- for (SiteCategory category : categories.values()) {
- 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<String> 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 6e338ef84..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteXMLAction.java
+++ /dev/null
@@ -1,411 +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 java.util.Map.Entry;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.publisher.eclipse.URLEntry;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.IRepositoryReference;
-import org.eclipse.equinox.p2.repository.spi.RepositoryReference;
-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$
- private static final VersionSuffixGenerator versionSuffixGenerator = new VersionSuffixGenerator();
- protected UpdateSite updateSite;
- private SiteCategory defaultCategory;
- private HashSet<SiteCategory> defaultCategorySet;
- protected URI location;
- private String categoryQualifier = null;
- private Version categoryVersion = 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;
- }
-
- public void setCategoryVersion(String version) {
- categoryVersion = Version.parseVersion(version);
- }
-
- 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<SiteCategory>(1);
- defaultCategorySet.add(defaultCategory);
- }
-
- public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- if (updateSite == null) {
- try {
- updateSite = UpdateSite.load(location, monitor);
- } catch (ProvisionException e) {
- return new Status(IStatus.ERROR, Activator.ID, Messages.Error_generating_siteXML, e);
- } catch (OperationCanceledException e) {
- return Status.CANCEL_STATUS;
- }
- }
- initialize();
- return generateCategories(publisherInfo, results, monitor);
- }
-
- private IStatus generateCategories(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- Map<SiteCategory, Set<IInstallableUnit>> categoriesToIUs = new HashMap<SiteCategory, Set<IInstallableUnit>>();
- Map<SiteFeature, Set<SiteCategory>> featuresToCategories = getFeatureToCategoryMappings(publisherInfo);
- for (SiteFeature feature : featuresToCategories.keySet()) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- IInstallableUnit iu = getFeatureIU(feature, publisherInfo, results);
- if (iu == null)
- continue;
- Set<SiteCategory> categories = 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 (SiteCategory category : categories) {
- Set<IInstallableUnit> featureIUs = categoriesToIUs.get(category);
- if (featureIUs == null) {
- featureIUs = new HashSet<IInstallableUnit>();
- categoriesToIUs.put(category, featureIUs);
- }
- featureIUs.add(iu);
- }
- }
- addSiteIUsToCategories(categoriesToIUs, publisherInfo, results);
- generateCategoryIUs(categoriesToIUs, results);
- return Status.OK_STATUS;
- }
-
- private void addSiteIUsToCategories(Map<SiteCategory, Set<IInstallableUnit>> categoriesToIUs, IPublisherInfo publisherInfo, IPublisherResult results) {
- if (updateSite == null)
- return;
- SiteModel site = updateSite.getSite();
- if (site == null)
- return;
- SiteIU[] siteIUs = site.getIUs();
- for (SiteIU siteIU : siteIUs) {
- String[] categoryNames = siteIU.getCategoryNames();
- if (categoryNames.length == 0)
- continue;
- Collection<IInstallableUnit> ius = getIUs(siteIU, publisherInfo, results);
- if (ius.size() == 0)
- continue;
- for (String categoryName : categoryNames) {
- SiteCategory category = site.getCategory(categoryName);
- if (category == null)
- continue;
- Set<IInstallableUnit> categoryIUs = categoriesToIUs.get(category);
- if (categoryIUs == null) {
- categoryIUs = new HashSet<IInstallableUnit>();
- categoriesToIUs.put(category, categoryIUs);
- }
- categoryIUs.addAll(ius);
- }
- }
- }
-
- private Collection<IInstallableUnit> getIUs(SiteIU siteIU, IPublisherInfo publisherInfo, IPublisherResult results) {
- String id = siteIU.getID();
- String range = siteIU.getRange();
- String type = siteIU.getQueryType();
- String expression = siteIU.getQueryExpression();
- Object[] params = siteIU.getQueryParams();
- if (id == null && (type == null || expression == null))
- return CollectionUtils.emptyList();
- IQuery<IInstallableUnit> query = null;
- if (id != null) {
- VersionRange vRange = new VersionRange(range);
- query = QueryUtil.createIUQuery(id, vRange);
- } else if (type.equals("context")) { //$NON-NLS-1$
- query = QueryUtil.createQuery(expression, params);
- } else if (type.equals("match")) //$NON-NLS-1$
- query = QueryUtil.createMatchQuery(expression, params);
- if (query == null)
- return CollectionUtils.emptyList();
- IQueryResult<IInstallableUnit> queryResult = results.query(query, null);
- if (queryResult.isEmpty())
- queryResult = publisherInfo.getMetadataRepository().query(query, null);
- if (queryResult.isEmpty() && publisherInfo.getContextMetadataRepository() != null)
- queryResult = publisherInfo.getContextMetadataRepository().query(query, null);
-
- return queryResult.toUnmodifiableSet();
- }
-
- private static final IExpression qualifierMatchExpr = ExpressionUtil.parse("id == $0 && version ~= $1"); //$NON-NLS-1$
-
- 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 ? Version.create(versionString) : Version.emptyVersion;
- IQuery<IInstallableUnit> query = null;
- if (version.equals(Version.emptyVersion)) {
- query = QueryUtil.createLatestQuery(QueryUtil.createIUQuery(id));
- } else {
- String qualifier;
- try {
- qualifier = PublisherHelper.toOSGiVersion(version).getQualifier();
- } catch (UnsupportedOperationException e) {
- qualifier = null;
- }
- if (qualifier != null && qualifier.endsWith(QUALIFIER)) {
- VersionRange range = createVersionRange(version.toString());
- IQuery<IInstallableUnit> qualifierQuery = QueryUtil.createMatchQuery(qualifierMatchExpr, id, range);
- query = QueryUtil.createLatestQuery(qualifierQuery);
- } else {
- query = QueryUtil.createLimitQuery(QueryUtil.createIUQuery(id, version), 1);
- }
- }
-
- IQueryResult<IInstallableUnit> queryResult = results.query(query, null);
- if (queryResult.isEmpty())
- queryResult = publisherInfo.getMetadataRepository().query(query, null);
- if (queryResult.isEmpty() && publisherInfo.getContextMetadataRepository() != null)
- queryResult = publisherInfo.getContextMetadataRepository().query(query, null);
-
- if (!queryResult.isEmpty())
- return queryResult.iterator().next();
- return null;
- }
-
- protected VersionRange createVersionRange(String versionId) {
- VersionRange range = null;
- if (versionId == null || "0.0.0".equals(versionId)) //$NON-NLS-1$
- range = VersionRange.emptyRange;
- else {
- int qualifierIdx = versionId.indexOf(QUALIFIER);
- if (qualifierIdx != -1) {
- String newVersion = versionId.substring(0, qualifierIdx);
- if (newVersion.endsWith(".")) //$NON-NLS-1$
- newVersion = newVersion.substring(0, newVersion.length() - 1);
-
- Version lower = Version.parseVersion(newVersion);
- Version upper = null;
- String newQualifier = VersionSuffixGenerator.incrementQualifier(PublisherHelper.toOSGiVersion(lower).getQualifier());
- org.osgi.framework.Version osgiVersion = PublisherHelper.toOSGiVersion(lower);
- if (newQualifier == null)
- upper = Version.createOSGi(osgiVersion.getMajor(), osgiVersion.getMinor(), osgiVersion.getMicro() + 1);
- else
- upper = Version.createOSGi(osgiVersion.getMajor(), osgiVersion.getMinor(), osgiVersion.getMicro(), newQualifier);
- range = new VersionRange(lower, true, upper, false);
- } else {
- range = new VersionRange(Version.parseVersion(versionId), true, Version.parseVersion(versionId), true);
- }
- }
- return range;
- }
-
- /**
- * 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<SiteFeature, Set<SiteCategory>> getFeatureToCategoryMappings(IPublisherInfo publisherInfo) {
- HashMap<SiteFeature, Set<SiteCategory>> mappings = new HashMap<SiteFeature, Set<SiteCategory>>();
- 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$
- publisherInfo.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 (publisherInfo.getArtifactRepository() != null)
- publisherInfo.getArtifactRepository().setProperty(IRepository.PROP_MIRRORS_URL, mirrors);
- }
-
- //publish associate sites as repository references
- URLEntry[] associatedSites = site.getAssociatedSites();
- if (associatedSites != null) {
- ArrayList<IRepositoryReference> refs = new ArrayList<IRepositoryReference>(associatedSites.length * 2);
- for (int i = 0; i < associatedSites.length; i++) {
- URLEntry associatedSite = associatedSites[i];
- String siteLocation = associatedSite.getURL();
- try {
- URI associateLocation = new URI(siteLocation);
- String label = associatedSite.getAnnotation();
- refs.add(new RepositoryReference(associateLocation, label, IRepository.TYPE_METADATA, IRepository.ENABLED));
- refs.add(new RepositoryReference(associateLocation, label, IRepository.TYPE_ARTIFACT, IRepository.ENABLED));
- } catch (URISyntaxException e) {
- String message = "Invalid site reference: " + siteLocation; //$NON-NLS-1$
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message));
- }
- }
- publisherInfo.getMetadataRepository().addReferences(refs);
- }
-
- File siteFile = URIUtil.toFile(updateSite.getLocation());
- if (siteFile != null && siteFile.exists()) {
- File siteParent = siteFile.getParentFile();
- List<String> messageKeys = site.getMessageKeys();
- if (siteParent.isDirectory()) {
- String[] keyStrings = 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 = 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<SiteCategory> categories = new HashSet<SiteCategory>();
- 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 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<SiteCategory, Set<IInstallableUnit>> categoriesToFeatures, IPublisherResult result) {
- for (SiteCategory category : categoriesToFeatures.keySet()) {
- result.addIU(createCategoryIU(category, 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<IInstallableUnit> featureIUs, IInstallableUnit parentCategory) {
- InstallableUnitDescription cat = new MetadataFactory.InstallableUnitDescription();
- cat.setSingleton(true);
- String categoryId = buildCategoryId(category.getName());
- cat.setId(categoryId);
- if (categoryVersion == null)
- cat.setVersion(Version.createOSGi(1, 0, 0, versionSuffixGenerator.generateSuffix(featureIUs, CollectionUtils.<IVersionedId> emptyList())));
- else {
- if (categoryVersion.isOSGiCompatible()) {
- org.osgi.framework.Version osgiVersion = PublisherHelper.toOSGiVersion(categoryVersion);
- String qualifier = osgiVersion.getQualifier();
- if (qualifier.endsWith(QUALIFIER)) {
- String suffix = versionSuffixGenerator.generateSuffix(featureIUs, CollectionUtils.<IVersionedId> emptyList());
- qualifier = qualifier.substring(0, qualifier.length() - 9) + suffix;
- categoryVersion = Version.createOSGi(osgiVersion.getMajor(), osgiVersion.getMinor(), osgiVersion.getMicro(), qualifier);
- }
- }
- cat.setVersion(categoryVersion);
- }
-
- String label = category.getLabel();
- cat.setProperty(IInstallableUnit.PROP_NAME, label != null ? label : category.getName());
- cat.setProperty(IInstallableUnit.PROP_DESCRIPTION, category.getDescription());
-
- ArrayList<IRequirement> reqsConfigurationUnits = new ArrayList<IRequirement>(featureIUs.size());
- for (IInstallableUnit iu : featureIUs) {
- VersionRange range = new VersionRange(iu.getVersion(), true, iu.getVersion(), true);
- reqsConfigurationUnits.add(MetadataFactory.createRequirement(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.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, parentCategory.getId(), VersionRange.emptyRange, parentCategory.getFilter(), false, false));
- }
- cat.setRequirements(reqsConfigurationUnits.toArray(new IRequirement[reqsConfigurationUnits.size()]));
-
- // Create set of provided capabilities
- ArrayList<IProvidedCapability> providedCapabilities = new ArrayList<IProvidedCapability>();
- providedCapabilities.add(PublisherHelper.createSelfCapability(categoryId, cat.getVersion()));
-
- Map<Locale, Map<String, String>> localizations = category.getLocalizations();
- if (localizations != null) {
- for (Entry<Locale, Map<String, String>> locEntry : localizations.entrySet()) {
- Locale locale = locEntry.getKey();
- Map<String, String> translatedStrings = locEntry.getValue();
- for (Entry<String, String> e : translatedStrings.entrySet()) {
- cat.setProperty(locale.toString() + '.' + e.getKey(), e.getValue());
- }
- providedCapabilities.add(PublisherHelper.makeTranslationCapability(categoryId, locale));
- }
- }
-
- cat.setCapabilities(providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
-
- cat.setArtifacts(new IArtifactKey[0]);
- cat.setProperty(InstallableUnitDescription.PROP_TYPE_CATEGORY, "true"); //$NON-NLS-1$
- return MetadataFactory.createInstallableUnit(cat);
- }
-
- /**
- * 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;
- }
-}
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 6c09b548a..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSite.java
+++ /dev/null
@@ -1,579 +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.lang.ref.SoftReference;
-import java.net.*;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.zip.*;
-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.repository.RepositoryTransport;
-import org.eclipse.equinox.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<String, SoftReference<UpdateSite>> siteCache = new HashMap<String, SoftReference<UpdateSite>>();
- // map of String (URI.toString()) to UpdateSite (for category xmls)
- private static Map<String, SoftReference<UpdateSite>> categoryCache = new HashMap<String, SoftReference<UpdateSite>>();
- // map of String (featureID_featureVersion) to Feature
- private Map<String, Feature> featureCache = new HashMap<String, Feature>();
-
- /*
- * 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 = null;
- if (!PROTOCOL_FILE.equals(location.getScheme()) && categoryCache.containsKey(location.toString())) {
- result = categoryCache.get(location.toString()).get();
- if (result != null)
- return result;
- //else soft reference has been cleared, take it out of the cache
- categoryCache.remove(location.toString());
- }
-
- InputStream input = null;
- File siteFile = loadActualSiteFile(location, location, monitor);
- try {
- CategoryParser siteParser = new CategoryParser(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);
- if (!PROTOCOL_FILE.equals(location.getScheme()))
- categoryCache.put(location.toString(), new SoftReference<UpdateSite>(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 = null;
- //only caching remote sites
- if (!PROTOCOL_FILE.equals(location.getScheme()) && siteCache.containsKey(location.toString())) {
- result = siteCache.get(location.toString()).get();
- if (result != null)
- return result;
- //else soft reference has been cleared, take it out of the cache
- siteCache.remove(location.toString());
- }
-
- 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);
- if (!PROTOCOL_FILE.equals(location.getScheme()))
- siteCache.put(location.toString(), new SoftReference<UpdateSite>(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;
- }
-
- /*
- * 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 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<String, Feature> tmpFeatureCache = new HashMap<String, Feature>(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<String, Feature> tmpFeatureCache = new HashMap<String, Feature>(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 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<String, Feature> 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 bfba4f751..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSitePublisherApplication.java
+++ /dev/null
@@ -1,45 +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;
- private String categoryVersion = 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;
-
- if (arg.equalsIgnoreCase("-categoryVersion")) //$NON-NLS-1$
- categoryVersion = parameter;
- }
-
- protected IPublisherAction[] createActions() {
- LocalUpdateSiteAction action = new LocalUpdateSiteAction(source, categoryQualifier);
- action.setCategoryVersion(categoryVersion);
- return new IPublisherAction[] {action};
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/VersionSuffixGenerator.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/VersionSuffixGenerator.java
deleted file mode 100644
index d2f7cbd79..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/VersionSuffixGenerator.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- * G&H Softwareentwicklung GmbH - internationalization implementation (bug 150933)
- * Cloudsmith Inc. Refactored for more general use with VersionedId
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.updatesite;
-
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.IVersionedId;
-import org.eclipse.equinox.p2.metadata.Version;
-
-/**
- * Refactored from org.eclipse.pde.internal.build.builder.BuildDirector
- */
-public class VersionSuffixGenerator {
- public static final String VERSION_QUALIFIER = "qualifier"; //$NON-NLS-1$
-
- private static final int QUALIFIER_SUFFIX_VERSION = 1;
-
- // The 64 characters that are legal in a version qualifier, in lexicographical order.
- public static final String BASE_64_ENCODING = "-0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; //$NON-NLS-1$
-
- public static String incrementQualifier(String qualifier) {
- int idx = qualifier.length() - 1;
-
- for (; idx >= 0; idx--) {
- //finding last non-'z' character
- if (qualifier.charAt(idx) != 'z')
- break;
- }
-
- if (idx >= 0) {
- // charAt(idx) is < 'z', so don't need to check bounds
- int c = BASE_64_ENCODING.indexOf(qualifier.charAt(idx)) + 1;
- String newQualifier = qualifier.substring(0, idx);
- newQualifier += BASE_64_ENCODING.charAt(c);
- return newQualifier;
- }
-
- return null;
- }
-
- private static void appendEncodedCharacter(StringBuffer buffer, int c) {
- while (c > 62) {
- buffer.append('z');
- c -= 63;
- }
- buffer.append(base64Character(c));
- }
-
- // Integer to character conversion in our base-64 encoding scheme. If the
- // input is out of range, an illegal character will be returned.
- //
- private static char base64Character(int number) {
- return (number < 0 || number > 63) ? ' ' : BASE_64_ENCODING.charAt(number);
- }
-
- private static int charValue(char c) {
- int index = BASE_64_ENCODING.indexOf(c);
- // The "+ 1" is very intentional. For a blank (or anything else that
- // is not a legal character), we want to return 0. For legal
- // characters, we want to return one greater than their position, so
- // that a blank is correctly distinguished from '-'.
- return index + 1;
- }
-
- private static int computeNameSum(String name) {
- int sum = 0;
- int top = name.length();
- int lshift = 20;
- for (int idx = 0; idx < top; ++idx) {
- int c = name.charAt(idx) & 0xffff;
- if (c == '.' && lshift > 0)
- lshift -= 4;
- else
- sum += c << lshift;
- }
- return sum;
- }
-
- private static int getIntSegment(Version v, int segment) {
- int segCount = v.getSegmentCount();
- if (segCount <= segment)
- return 0;
- Object seg = v.getSegment(segment);
- return seg instanceof Integer ? ((Integer) seg).intValue() : 0;
- }
-
- private static int getMajor(Version v) {
- return getIntSegment(v, 0);
- }
-
- private static int getMicro(Version v) {
- return getIntSegment(v, 2);
- }
-
- private static int getMinor(Version v) {
- return getIntSegment(v, 1);
- }
-
- private static String getQualifier(Version v) {
- int segCount = v.getSegmentCount();
- if (segCount == 0)
- return null;
- Object seg = v.getSegment(segCount - 1);
- return seg instanceof String ? (String) seg : null;
- }
-
- // Encode a non-negative number as a variable length string, with the
- // property that if X > Y then the encoding of X is lexicographically
- // greater than the enocding of Y. This is accomplished by encoding the
- // length of the string at the beginning of the string. The string is a
- // series of base 64 (6-bit) characters. The first three bits of the first
- // character indicate the number of additional characters in the string.
- // The last three bits of the first character and all of the rest of the
- // characters encode the actual value of the number. Examples:
- // 0 --> 000 000 --> "-"
- // 7 --> 000 111 --> "6"
- // 8 --> 001 000 001000 --> "77"
- // 63 --> 001 000 111111 --> "7z"
- // 64 --> 001 001 000000 --> "8-"
- // 511 --> 001 111 111111 --> "Dz"
- // 512 --> 010 000 001000 000000 --> "E7-"
- // 2^32 - 1 --> 101 011 111111 ... 111111 --> "fzzzzz"
- // 2^45 - 1 --> 111 111 111111 ... 111111 --> "zzzzzzzz"
- // (There are some wasted values in this encoding. For example,
- // "7-" through "76" and "E--" through "E6z" are not legal encodings of
- // any number. But the benefit of filling in those wasted ranges would not
- // be worth the added complexity.)
- private static String lengthPrefixBase64(long number) {
- int length = 7;
- for (int i = 0; i < 7; ++i) {
- if (number < (1L << ((i * 6) + 3))) {
- length = i;
- break;
- }
- }
- StringBuffer result = new StringBuffer(length + 1);
- result.append(base64Character((length << 3) + (int) ((number >> (6 * length)) & 0x7)));
- while (--length >= 0) {
- result.append(base64Character((int) ((number >> (6 * length)) & 0x3f)));
- }
- return result.toString();
- }
-
- private final int maxVersionSuffixLength;
-
- private final int significantDigits;
-
- public VersionSuffixGenerator() {
- this(-1, -1);
- }
-
- public VersionSuffixGenerator(int maxVersionSuffixLenght, int significantDigits) {
- this.maxVersionSuffixLength = maxVersionSuffixLenght < 0 ? 28 : maxVersionSuffixLenght;
- this.significantDigits = significantDigits < 0 ? Integer.MAX_VALUE : significantDigits;
- }
-
- /**
- * Version suffix generation.
- * @param features A collection of @{link IVersionedId} instances representing the features to include
- * @param others A list of @{link IVersionedId} instances representing other IUs to include
- * @return The generated suffix or <code>null</code>
- */
- public String generateSuffix(Collection<? extends IVersionedId> features, Collection<? extends IVersionedId> others) {
- if (maxVersionSuffixLength <= 0 || (features.isEmpty() && others.isEmpty()))
- return null; // do nothing
-
- long majorSum = 0L;
- long minorSum = 0L;
- long serviceSum = 0L;
- long nameCharsSum = 0L;
-
- // Include the version of this algorithm as part of the suffix, so that
- // we have a way to make sure all suffixes increase when the algorithm
- // changes.
- //
- majorSum += QUALIFIER_SUFFIX_VERSION;
- ArrayList<String> qualifiers = new ArrayList<String>();
-
- // Loop through the included features, adding the version number parts
- // to the running totals and storing the qualifier suffixes.
- //
- Iterator<? extends IVersionedId> itor = features.iterator();
- while (itor.hasNext()) {
- IVersionedId refFeature = itor.next();
- Version version = refFeature.getVersion();
- majorSum += getMajor(version);
- minorSum += getMinor(version);
- serviceSum += getMicro(version);
- qualifiers.add(getQualifier(version));
- nameCharsSum = computeNameSum(refFeature.getId());
- }
-
- // Loop through the included plug-ins and fragments, adding the version
- // number parts to the running totals and storing the qualifiers.
- //
- itor = features.iterator();
- while (itor.hasNext()) {
- IVersionedId refOther = itor.next();
- Version version = refOther.getVersion();
- majorSum += getMajor(version);
- minorSum += getMinor(version);
- serviceSum += getMicro(version);
-
- String qualifier = getQualifier(version);
- if (qualifier != null && qualifier.endsWith(VERSION_QUALIFIER)) {
- int resultingLength = qualifier.length() - VERSION_QUALIFIER.length();
- if (resultingLength > 0) {
- if (qualifier.charAt(resultingLength - 1) == '.')
- resultingLength--;
- qualifier = resultingLength > 0 ? qualifier.substring(0, resultingLength) : null;
- } else
- qualifier = null;
- }
- qualifiers.add(qualifier);
- }
-
- // Limit the qualifiers to the specified number of significant digits,
- // and figure out what the longest qualifier is.
- //
- int longestQualifier = 0;
- int idx = qualifiers.size();
- while (--idx >= 0) {
- String qualifier = qualifiers.get(idx);
- if (qualifier == null)
- continue;
-
- if (qualifier.length() > significantDigits) {
- qualifier = qualifier.substring(0, significantDigits);
- qualifiers.set(idx, qualifier);
- }
- if (qualifier.length() > longestQualifier)
- longestQualifier = qualifier.length();
- }
-
- StringBuffer result = new StringBuffer();
-
- // Encode the sums of the first three parts of the version numbers.
- result.append(lengthPrefixBase64(majorSum));
- result.append(lengthPrefixBase64(minorSum));
- result.append(lengthPrefixBase64(serviceSum));
- result.append(lengthPrefixBase64(nameCharsSum));
-
- if (longestQualifier > 0) {
- // Calculate the sum at each position of the qualifiers.
- int[] qualifierSums = new int[longestQualifier];
- int top = qualifiers.size();
- for (idx = 0; idx < top; ++idx) {
- String qualifier = qualifiers.get(idx);
- if (qualifier == null)
- continue;
-
- int qlen = qualifier.length();
- for (int j = 0; j < qlen; ++j)
- qualifierSums[j] += charValue(qualifier.charAt(j));
- }
-
- // Normalize the sums to be base 65.
- int carry = 0;
- for (int k = longestQualifier - 1; k >= 1; --k) {
- qualifierSums[k] += carry;
- carry = qualifierSums[k] / 65;
- qualifierSums[k] = qualifierSums[k] % 65;
- }
- qualifierSums[0] += carry;
-
- // Always use one character for overflow. This will be handled
- // correctly even when the overflow character itself overflows.
- result.append(lengthPrefixBase64(qualifierSums[0]));
- for (int m = 1; m < longestQualifier; ++m)
- appendEncodedCharacter(result, qualifierSums[m]);
- }
-
- // If the resulting suffix is too long, shorten it to the designed length.
- //
- if (result.length() > maxVersionSuffixLength)
- result.setLength(maxVersionSuffixLength);
-
- // It is safe to strip any '-' characters from the end of the suffix.
- // (This won't happen very often, but it will save us a character or
- // two when it does.)
- //
- int len = result.length();
- while (len > 0 && result.charAt(len - 1) == '-')
- result.setLength(--len);
- return result.toString();
- }
-}
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 414c28492..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepository.java
+++ /dev/null
@@ -1,168 +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.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
-import org.eclipse.equinox.p2.repository.artifact.*;
-
-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 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<String, String> getProperties() {
- return delegate.getProperties();
- }
-
- public String getProperty(String key) {
- return delegate.getProperty(key);
- }
-
- public String getProvider() {
- return delegate.getProvider();
- }
-
- public IProvisioningAgent getProvisioningAgent() {
- return delegate.getProvisioningAgent();
- }
-
- 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$
- }
-
- @SuppressWarnings("rawtypes")
- public Object getAdapter(Class adapter) {
- return delegate.getAdapter(adapter);
- }
-
- public IArtifactDescriptor createArtifactDescriptor(IArtifactKey key) {
- return delegate.createArtifactDescriptor(key);
- }
-
- public IArtifactKey createArtifactKey(String classifier, String id, Version version) {
- return delegate.createArtifactKey(classifier, id, version);
- }
-
- public IQueryable<IArtifactDescriptor> descriptorQueryable() {
- return delegate.descriptorQueryable();
- }
-
- public IQueryResult<IArtifactKey> query(IQuery<IArtifactKey> query, IProgressMonitor monitor) {
- return delegate.query(query, monitor);
- }
-
- public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
- return delegate.executeBatch(runnable, monitor);
- }
-}
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 8a65d2d00..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepositoryFactory.java
+++ /dev/null
@@ -1,152 +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.artifact.repository.simple.SimpleArtifactDescriptor;
-import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepositoryFactory;
-import org.eclipse.equinox.internal.p2.updatesite.*;
-import org.eclipse.equinox.internal.p2.updatesite.metadata.UpdateSiteMetadataRepositoryFactory;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.publisher.eclipse.*;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactRepositoryFactory;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-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<String, String> 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_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();
- factory.setAgent(getAgent());
- 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 = 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<IArtifactDescriptor> allSiteArtifacts = new HashSet<IArtifactDescriptor>();
- 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());
- SimpleArtifactDescriptor featureArtifactDescriptor = new SimpleArtifactDescriptor(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 SimpleArtifactDescriptor(featureKey);
- featureURL = updateSite.getFeatureURI(feature.getId(), feature.getVersion());
- featureArtifactDescriptor.setRepositoryProperty(PROP_ARTIFACT_REFERENCE, featureURL.toString() + PACK_EXT);
- IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
- featureArtifactDescriptor.setProcessingSteps(steps);
- featureArtifactDescriptor.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.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());
- SimpleArtifactDescriptor artifactDescriptor = new SimpleArtifactDescriptor(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 SimpleArtifactDescriptor(key);
- pluginURL = updateSite.getPluginURI(entry);
- artifactDescriptor.setRepositoryProperty(PROP_ARTIFACT_REFERENCE, pluginURL.toString() + PACK_EXT);
- IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
- artifactDescriptor.setProcessingSteps(steps);
- artifactDescriptor.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
- allSiteArtifacts.add(artifactDescriptor);
- }
- }
- }
- }
-
- IArtifactDescriptor[] descriptors = 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 3f4b29bc5..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/messages.properties
+++ /dev/null
@@ -1,32 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-ErrorReadingDigest=Error reading site digest {0}.
-ErrorReadingFeature=Error reading feature {0}.
-ErrorReadingSite=Error reading update site {0}.
-Error_generating_category=Error generating category xml action.
-Error_generating_siteXML=Error generating site xml action.
-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.
-Unexpected_exception=Unexpected exception while loading {0}.
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 3dcdc6b49..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepository.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.updatesite.metadata;
-
-import java.net.URI;
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.repository.IRepositoryReference;
-import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-
-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;
- }
-
- // TODO remove
- public void addInstallableUnits(IInstallableUnit[] installableUnits) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#addInstallableUnits(java.util.Collection)
- */
- public void addInstallableUnits(Collection<IInstallableUnit> installableUnits) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#addReferences(java.util.Collection)
- */
- public void addReferences(Collection<? extends IRepositoryReference> references) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#getReferences()
- */
- public Collection<IRepositoryReference> getReferences() {
- return delegate.getReferences();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#removeAll()
- */
- public void removeAll() {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- // TODO remove
- public boolean removeInstallableUnits(IInstallableUnit[] installableUnits, IProgressMonitor monitor) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#removeInstallableUnits(java.util.Collection)
- */
- public boolean removeInstallableUnits(Collection<IInstallableUnit> installableUnits) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.IRepository#getDescription()
- */
- public String getDescription() {
- return delegate.getDescription();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.IRepository#getLocation()
- */
- public URI getLocation() {
- return location;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.IRepository#getName()
- */
- public String getName() {
- return delegate.getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.IRepository#getProperties()
- */
- public Map<String, String> getProperties() {
- return delegate.getProperties();
- }
-
- public String getProperty(String key) {
- return delegate.getProperty(key);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.IRepository#getProvider()
- */
- public String getProvider() {
- return delegate.getProvider();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.IRepository#getProvisioningAgent()
- */
- public IProvisioningAgent getProvisioningAgent() {
- return delegate.getProvisioningAgent();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.IRepository#getType()
- */
- public String getType() {
- return TYPE;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.IRepository#getVersion()
- */
- public String getVersion() {
- return VERSION;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.IRepository#isModifiable()
- */
- public boolean isModifiable() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.IRepository#setDescription(java.lang.String)
- */
- public void setDescription(String description) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.IRepository#setName(java.lang.String)
- */
- public void setName(String name) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.IRepository#setProperty(java.lang.String, java.lang.String)
- */
- public String setProperty(String key, String value) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.IRepository#setProvider(java.lang.String)
- */
- public void setProvider(String provider) {
- throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
- }
-
- @SuppressWarnings("rawtypes")
- public Object getAdapter(Class adapter) {
- return delegate.getAdapter(adapter);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.query.IQueryable#query(org.eclipse.equinox.p2.query.IQuery, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- return delegate.query(query, monitor);
- }
-
- /**
- * {@inheritDoc}
- */
- public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
- return delegate.executeBatch(runnable, 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 7a9112607..000000000
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepositoryFactory.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
- * 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.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository;
-import org.eclipse.equinox.internal.p2.metadata.repository.SimpleMetadataRepositoryFactory;
-import org.eclipse.equinox.internal.p2.updatesite.*;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory;
-import org.eclipse.osgi.util.NLS;
-
-public class 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.p2.repository.metadata.spi.MetadataRepositoryFactory#create(java.net.URL, java.lang.String, java.lang.String, java.util.Map)
- */
- public IMetadataRepository create(URI location, String name, String type, Map<String, String> properties) {
- return null;
- }
-
- public IMetadataRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
- //return null if the caller wanted a modifiable repo
- if ((flags & IRepositoryManager.REPOSITORY_HINT_MODIFIABLE) > 0) {
- return null;
- }
-
- 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();
- factory.setAgent(getAgent());
- 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 = 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.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 4de3c836f..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.project
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.simpleconfigurator.manipulator</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index a40cecb5e..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,343 +0,0 @@
-#Thu Mar 04 09:59:51 EST 2010
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.formatter.comment.format_header=true
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=false
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=true
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index fe84d458f..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:59:48 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/META-INF/MANIFEST.MF
deleted file mode 100644
index c4d585c60..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,23 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-SymbolicName: org.eclipse.equinox.simpleconfigurator.manipulator;singleton:=true
-Bundle-Version: 2.0.0.qualifier
-Bundle-Localization: plugin
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.internal.frameworkadmin.equinox,
- org.eclipse.equinox.internal.frameworkadmin.utils,
- org.eclipse.equinox.internal.provisional.configuratormanipulator,
- org.eclipse.equinox.internal.provisional.frameworkadmin,
- org.eclipse.equinox.internal.simpleconfigurator,
- org.eclipse.equinox.internal.simpleconfigurator.utils,
- org.eclipse.osgi.service.datalocation,
- org.osgi.framework;version="1.3.0"
-Bundle-Vendor: %providerName
-Export-Package: org.eclipse.equinox.internal.simpleconfigurator.manipulator;x-friends:="org.eclipse.equinox.p2.touchpoint.eclipse",
- org.eclipse.equinox.simpleconfigurator.manipulator;version="2.0.0"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.0"
-Service-Component: OSGI-INF/configurator.xml
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/OSGI-INF/configurator.xml b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/OSGI-INF/configurator.xml
deleted file mode 100644
index 0887bd3b1..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/OSGI-INF/configurator.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.simpleconfigurator.manipulator">
- <implementation class="org.eclipse.equinox.internal.simpleconfigurator.manipulator.SimpleConfiguratorManipulatorImpl"/>
- <property name="org.eclipse.equinox.configurator.BundleSymbolicName" type="String" value="org.eclipse.equinox.simpleconfigurator"/>
- <property name="service.vendor" type="String" value="Eclipse.org"/>
- <service>
- <provide interface="org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator"/>
- <provide interface="org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator"/>
- </service>
-</scr:component>
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/about.html b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/build.properties b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/build.properties
deleted file mode 100644
index 3d8dfe4be..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/build.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties,\
- OSGI-INF/
-src.includes = about.html
-qualifier = context
-source.. = src/
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/plugin.properties b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/plugin.properties
deleted file mode 100644
index 71be7bbe8..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bundleName= Simple Configurator Manipulator
-providerName = Eclipse.org - Equinox
-
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/pom.xml b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/pom.xml
deleted file mode 100644
index b52d1de71..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.simpleconfigurator.manipulator</artifactId>
- <version>2.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorFactoryImpl.java b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorFactoryImpl.java
deleted file mode 100644
index 3819aac02..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorFactoryImpl.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.manipulator;
-
-import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
-import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulatorFactory;
-
-public class SimpleConfiguratorManipulatorFactoryImpl extends ConfiguratorManipulatorFactory {
-
- protected ConfiguratorManipulator createConfiguratorManipulator() {
- return new SimpleConfiguratorManipulatorImpl();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
deleted file mode 100644
index 66de40090..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
+++ /dev/null
@@ -1,541 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.manipulator;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URL;
-import java.util.*;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils;
-import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
-import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl;
-import org.eclipse.equinox.internal.simpleconfigurator.utils.EquinoxUtils;
-import org.eclipse.equinox.internal.simpleconfigurator.utils.SimpleConfiguratorUtils;
-import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
-import org.eclipse.osgi.service.datalocation.Location;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
-
-/**
- *
- */
-public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorManipulator, ConfiguratorManipulator {
- class LocationInfo {
- URI[] prerequisiteLocations = null;
- URI systemBundleLocation = null;
- URI[] systemFragmentedBundleLocations = null;
- }
-
- private final static boolean DEBUG = false;
-
- private static final BundleInfo[] NULL_BUNDLEINFOS = new BundleInfo[0];
-
- public static final String PROP_KEY_EXCLUSIVE_INSTALLATION = "org.eclipse.equinox.simpleconfigurator.exclusiveInstallation"; //$NON-NLS-1$
- public static final String CONFIG_LIST = "bundles.info"; //$NON-NLS-1$
- public static final String CONFIGURATOR_FOLDER = "org.eclipse.equinox.simpleconfigurator"; //$NON-NLS-1$
- public static final String PROP_KEY_CONFIGURL = "org.eclipse.equinox.simpleconfigurator.configUrl"; //$NON-NLS-1$
-
- private Set manipulators = new HashSet();
-
- /**
- * Return the ConfiguratorConfigFile which is determined
- * by the parameters set in Manipulator.
- *
- * @param manipulator
- * @return File
- */
- private static File getConfigFile(Manipulator manipulator) throws IllegalStateException {
- File fwConfigLoc = manipulator.getLauncherData().getFwConfigLocation();
- File baseDir = null;
- if (fwConfigLoc == null) {
- baseDir = manipulator.getLauncherData().getHome();
- if (baseDir == null) {
- if (manipulator.getLauncherData().getLauncher() != null) {
- baseDir = manipulator.getLauncherData().getLauncher().getParentFile();
- } else {
- throw new IllegalStateException("All of fwConfigFile, home, launcher are not set.");
- }
- }
- } else {
- if (fwConfigLoc.exists())
- if (fwConfigLoc.isDirectory())
- baseDir = fwConfigLoc;
- else
- baseDir = fwConfigLoc.getParentFile();
- else {
- // TODO We need to decide whether launcher data configLocation is the location of a file or a directory
- if (fwConfigLoc.getName().endsWith(".ini")) //$NON-NLS-1$
- baseDir = fwConfigLoc.getParentFile();
- else
- baseDir = fwConfigLoc;
- }
- }
- File configuratorFolder = new File(baseDir, SimpleConfiguratorManipulatorImpl.CONFIGURATOR_FOLDER);
- File targetFile = new File(configuratorFolder, SimpleConfiguratorManipulatorImpl.CONFIG_LIST);
- if (!Utils.createParentDir(targetFile))
- return null;
- return targetFile;
- }
-
- static boolean isPrerequisiteBundles(URI location, LocationInfo info) {
- boolean ret = false;
-
- if (info.prerequisiteLocations == null)
- return false;
- for (int i = 0; i < info.prerequisiteLocations.length; i++)
- if (location.equals(info.prerequisiteLocations[i])) {
- ret = true;
- break;
- }
-
- return ret;
- }
-
- static boolean isSystemBundle(URI location, LocationInfo info) {
- if (info.systemBundleLocation == null)
- return false;
- if (location.equals(info.systemBundleLocation))
- return true;
- return false;
- }
-
- static boolean isSystemFragmentBundle(URI location, LocationInfo info) {
- boolean ret = false;
- if (info.systemFragmentedBundleLocations == null)
- return false;
- for (int i = 0; i < info.systemFragmentedBundleLocations.length; i++)
- if (location.equals(info.systemFragmentedBundleLocations[i])) {
- ret = true;
- break;
- }
- return ret;
- }
-
- private static boolean isTargetConfiguratorBundle(BundleInfo[] bInfos) {
- for (int i = 0; i < bInfos.length; i++) {
- if (isTargetConfiguratorBundle(bInfos[i].getLocation())) {
- return true;
- //TODO confirm that startlevel of configurator bundle must be no larger than beginning start level of fw. However, there is no way to know the start level of cached ones.
- }
- }
- return false;
- }
-
- private static boolean isTargetConfiguratorBundle(URI location) {
- final String symbolic = Utils.getPathFromClause(Utils.getManifestMainAttributes(location, Constants.BUNDLE_SYMBOLICNAME));
- return (SimpleConfiguratorManipulator.SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME.equals(symbolic));
- }
-
- private void algorithm(int initialSl, SortedMap bslToList, BundleInfo configuratorBInfo, List setToInitialConfig, List setToSimpleConfig, LocationInfo info) {
- int configuratorSL = configuratorBInfo.getStartLevel();
-
- Integer sL0 = (Integer) bslToList.keySet().iterator().next();// StartLevel == 0;
- List list0 = (List) bslToList.get(sL0);
- if (sL0.intValue() == 0)
- for (Iterator ite2 = list0.iterator(); ite2.hasNext();) {
- BundleInfo bInfo = (BundleInfo) ite2.next();
- if (isSystemBundle(bInfo.getLocation(), info)) {
- setToSimpleConfig.add(bInfo);
- break;
- }
- }
-
- for (Iterator ite = bslToList.keySet().iterator(); ite.hasNext();) {
- Integer sL = (Integer) ite.next();
- List list = (List) bslToList.get(sL);
-
- if (sL.intValue() < configuratorSL) {
- for (Iterator ite2 = list.iterator(); ite2.hasNext();) {
- BundleInfo bInfo = (BundleInfo) ite2.next();
- if (!isSystemBundle(bInfo.getLocation(), info))
- setToInitialConfig.add(bInfo);
- }
- } else if (sL.intValue() > configuratorSL) {
- for (Iterator ite2 = list.iterator(); ite2.hasNext();) {
- BundleInfo bInfo = (BundleInfo) ite2.next();
- if (isPrerequisiteBundles(bInfo.getLocation(), info) || isSystemFragmentBundle(bInfo.getLocation(), info))
- if (!isSystemBundle(bInfo.getLocation(), info))
- setToInitialConfig.add(bInfo);
- setToSimpleConfig.add(bInfo);
- }
- } else {
- boolean found = false;
- for (Iterator ite2 = list.iterator(); ite2.hasNext();) {
- BundleInfo bInfo = (BundleInfo) ite2.next();
- if (found) {
- if (!isSystemBundle(bInfo.getLocation(), info))
- if (isPrerequisiteBundles(bInfo.getLocation(), info) || isSystemFragmentBundle(bInfo.getLocation(), info))
- setToInitialConfig.add(bInfo);
- setToSimpleConfig.add(bInfo);
- continue;
- }
- if (isTargetConfiguratorBundle(bInfo.getLocation()))
- found = true;
- else if (!isSystemBundle(bInfo.getLocation(), info))
- setToInitialConfig.add(bInfo);
- setToSimpleConfig.add(bInfo);
- }
- }
- }
-
- setToInitialConfig.add(configuratorBInfo);
- }
-
- private boolean checkResolve(BundleInfo bInfo, BundlesState state) {//throws ManipulatorException {
- if (bInfo == null)
- throw new IllegalArgumentException("bInfo is null.");
-
- if (!state.isResolved())
- state.resolve(false);
- // if (DEBUG)
- // System.out.println(state.toString());
-
- if (!state.isResolved(bInfo)) {
- printoutUnsatisfiedConstraints(bInfo, state);
- return false;
- }
- return true;
- }
-
- private boolean divideBundleInfos(Manipulator manipulator, List setToInitialConfig, List setToSimpleConfig, final int initialBSL) {
- BundlesState state = manipulator.getBundlesState();
- BundleInfo[] targetBundleInfos = null;
- if (state.isFullySupported()) {
- targetBundleInfos = state.getExpectedState();
- } else {
- targetBundleInfos = manipulator.getConfigData().getBundles();
- }
- BundleInfo configuratorBInfo = null;
- for (int i = 0; i < targetBundleInfos.length; i++) {
- if (isTargetConfiguratorBundle(targetBundleInfos[i].getLocation())) {
- if (targetBundleInfos[i].isMarkedAsStarted()) {
- configuratorBInfo = targetBundleInfos[i];
- break;
- }
- }
- }
- if (configuratorBInfo == null && !manipulators.contains(manipulator)) {
- return false;
- } else if (manipulators.contains(manipulator) && targetBundleInfos.length == 0) {
- // Resulting state will have no bundles - so is an uninstall, including
- // uninstall of the configurator. However, we have seen this manipulator
- // before with a target configurator bundle, so allow uninstall to proceed,
- // but only get one chance.
- manipulators.remove(manipulator);
- } else if (!manipulators.contains(manipulator)) {
- manipulators.add(manipulator);
- }
-
- if (state.isFullySupported()) {
- state.resolve(false);
- }
-
- LocationInfo info = new LocationInfo();
- setSystemBundles(state, info);
- if (configuratorBInfo != null) {
- setPrerequisiteBundles(configuratorBInfo, state, info);
- SortedMap bslToList = getSortedMap(initialBSL, targetBundleInfos);
- algorithm(initialBSL, bslToList, configuratorBInfo, setToInitialConfig, setToSimpleConfig, info);
- }
- return true;
- }
-
- private SortedMap getSortedMap(int initialSl, BundleInfo[] bInfos) {
- SortedMap bslToList = new TreeMap();
- for (int i = 0; i < bInfos.length; i++) {
- Integer sL = new Integer(bInfos[i].getStartLevel());
- if (sL.intValue() == BundleInfo.NO_LEVEL)
- sL = new Integer(initialSl);
- List list = (List) bslToList.get(sL);
- if (list == null) {
- list = new LinkedList();
- bslToList.put(sL, list);
- }
- list.add(bInfos[i]);
- }
- return bslToList;
- }
-
- private BundleInfo[] orderingInitialConfig(List setToInitialConfig) {
- List notToBeStarted = new LinkedList();
- List toBeStarted = new LinkedList();
- for (Iterator ite2 = setToInitialConfig.iterator(); ite2.hasNext();) {
- BundleInfo bInfo = (BundleInfo) ite2.next();
- if (bInfo.isMarkedAsStarted())
- toBeStarted.add(bInfo);
- else
- notToBeStarted.add(bInfo);
- }
- setToInitialConfig.clear();
- setToInitialConfig.addAll(notToBeStarted);
- setToInitialConfig.addAll(toBeStarted);
- return Utils.getBundleInfosFromList(setToInitialConfig);
-
- }
-
- private void printoutUnsatisfiedConstraints(BundleInfo bInfo, BundlesState state) {
- if (DEBUG) {
- StringBuffer sb = new StringBuffer();
- sb.append("Missing constraints:\n"); //$NON-NLS-1$
- String[] missings = state.getUnsatisfiedConstraints(bInfo);
- for (int i = 0; i < missings.length; i++)
- sb.append(" " + missings[i] + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println(sb.toString());
- }
- }
-
- public BundleInfo[] loadConfiguration(BundleContext context, String infoPath) throws IOException {
- URI installArea = EquinoxUtils.getInstallLocationURI(context);
-
- URL configURL = null;
- InputStream stream = null;
-
- if (infoPath == null) {
- SimpleConfiguratorImpl simpleImpl = new SimpleConfiguratorImpl(context, null);
- configURL = simpleImpl.getConfigurationURL();
- } else {
- // == (not .equals) use the default source info, currently SOURCE_INFO_PATH
- boolean defaultSource = (infoPath == SOURCE_INFO);
- if (defaultSource)
- infoPath = SOURCE_INFO_PATH;
-
- Location configLocation = EquinoxUtils.getConfigLocation(context);
- configURL = configLocation.getDataArea(infoPath);
- try {
- stream = configURL.openStream();
- } catch (FileNotFoundException e) {
- if (defaultSource && configLocation.getParentLocation() != null) {
- configURL = configLocation.getParentLocation().getDataArea(infoPath);
- } else {
- return new BundleInfo[0];
- }
- }
- }
- if (configURL == null)
- return new BundleInfo[0];
- else if (stream == null) {
- try {
- stream = configURL.openStream();
- } catch (FileNotFoundException e) {
- return new BundleInfo[0];
- }
- }
-
- //stream will be closed
- return loadConfiguration(stream, installArea);
- }
-
- /*
- * InputStream must be closed
- * (non-Javadoc)
- * @see org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator#loadConfiguration(java.io.InputStream, java.net.URI)
- */
- public BundleInfo[] loadConfiguration(InputStream stream, URI installArea) throws IOException {
- if (stream == null)
- return NULL_BUNDLEINFOS;
-
- List simpleBundles = SimpleConfiguratorUtils.readConfiguration(stream, installArea);
-
- // convert to FrameworkAdmin BundleInfo Type
- BundleInfo[] result = new BundleInfo[simpleBundles.size()];
- int i = 0;
- for (Iterator iterator = simpleBundles.iterator(); iterator.hasNext();) {
- org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo simpleInfo = (org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo) iterator.next();
- URI location = simpleInfo.getLocation();
- if (!location.isAbsolute() && simpleInfo.getBaseLocation() != null)
- location = URIUtil.makeAbsolute(location, simpleInfo.getBaseLocation());
-
- BundleInfo bundleInfo = new BundleInfo(simpleInfo.getSymbolicName(), simpleInfo.getVersion(), location, simpleInfo.getStartLevel(), simpleInfo.isMarkedAsStarted());
- bundleInfo.setBaseLocation(simpleInfo.getBaseLocation());
- result[i++] = bundleInfo;
- }
- return result;
- }
-
- public void saveConfiguration(BundleInfo[] configuration, OutputStream stream, URI installArea) throws IOException {
- org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] simpleInfos = convertBundleInfos(configuration, installArea);
- SimpleConfiguratorManipulatorUtils.writeConfiguration(simpleInfos, stream);
- }
-
- public void saveConfiguration(BundleInfo[] configuration, File outputFile, URI installArea) throws IOException {
- saveConfiguration(configuration, outputFile, installArea, false);
- }
-
- private void saveConfiguration(BundleInfo[] configuration, File outputFile, URI installArea, boolean backup) throws IOException {
- if (backup && outputFile.exists()) {
- File backupFile = Utils.getSimpleDataFormattedFile(outputFile);
- if (!outputFile.renameTo(backupFile)) {
- throw new IOException("Fail to rename from (" + outputFile + ") to (" + backupFile + ")");
- }
- }
-
- org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] simpleInfos = convertBundleInfos(configuration, installArea);
-
- // if empty remove the configuration file
- if (simpleInfos == null || simpleInfos.length == 0) {
- if (outputFile.exists()) {
- outputFile.delete();
- }
- File parentDir = outputFile.getParentFile();
- if (parentDir.exists()) {
- parentDir.delete();
- }
- return;
- }
- SimpleConfiguratorManipulatorUtils.writeConfiguration(simpleInfos, outputFile);
- }
-
- private org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] convertBundleInfos(BundleInfo[] configuration, URI installArea) {
- // convert to SimpleConfigurator BundleInfo Type
- org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] simpleInfos = new org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[configuration.length];
- for (int i = 0; i < configuration.length; i++) {
- BundleInfo bundleInfo = configuration[i];
- URI location = bundleInfo.getLocation();
- if (bundleInfo.getSymbolicName() == null || bundleInfo.getVersion() == null || location == null)
- throw new IllegalArgumentException("Cannot persist bundleinfo: " + bundleInfo.toString());
- //only need to make a new BundleInfo if we are changing it.
- if (installArea != null)
- location = URIUtil.makeRelative(location, installArea);
- simpleInfos[i] = new org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo(bundleInfo.getSymbolicName(), bundleInfo.getVersion(), location, bundleInfo.getStartLevel(), bundleInfo.isMarkedAsStarted());
- simpleInfos[i].setBaseLocation(bundleInfo.getBaseLocation());
- }
- return simpleInfos;
- }
-
- public BundleInfo[] save(Manipulator manipulator, boolean backup) throws IOException {
- List setToInitialConfig = new LinkedList();
- List setToSimpleConfig = new LinkedList();
- ConfigData configData = manipulator.getConfigData();
-
- if (!divideBundleInfos(manipulator, setToInitialConfig, setToSimpleConfig, configData.getInitialBundleStartLevel()))
- return configData.getBundles();
-
- File outputFile = getConfigFile(manipulator);
- URI installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData()).toURI();
- saveConfiguration((BundleInfo[]) setToSimpleConfig.toArray(new BundleInfo[setToSimpleConfig.size()]), outputFile, installArea, backup);
- configData.setProperty(SimpleConfiguratorManipulatorImpl.PROP_KEY_CONFIGURL, outputFile.toURL().toExternalForm());
- return orderingInitialConfig(setToInitialConfig);
- }
-
- void setPrerequisiteBundles(BundleInfo configuratorBundleInfo, BundlesState state, LocationInfo info) {
- if (state.isFullySupported())
- if (!this.checkResolve(configuratorBundleInfo, state)) {
- printoutUnsatisfiedConstraints(configuratorBundleInfo, state);
- return;
- }
- BundleInfo[] prerequisites = state.getPrerequisteBundles(configuratorBundleInfo);
- info.prerequisiteLocations = new URI[prerequisites.length];
- for (int i = 0; i < prerequisites.length; i++)
- info.prerequisiteLocations[i] = prerequisites[i].getLocation();
- return;
-
- }
-
- void setSystemBundles(BundlesState state, LocationInfo info) {
- BundleInfo systemBundleInfo = state.getSystemBundle();
- if (systemBundleInfo == null) {
- // TODO Log
- //throw new IllegalStateException("There is no systemBundle.\n");
- return;
- }
- if (state.isFullySupported())
- if (!this.checkResolve(systemBundleInfo, state)) {
- printoutUnsatisfiedConstraints(systemBundleInfo, state);
- return;
- }
- info.systemBundleLocation = systemBundleInfo.getLocation();
- BundleInfo[] fragments = state.getSystemFragmentedBundles();
- info.systemFragmentedBundleLocations = new URI[fragments.length];
- for (int i = 0; i < fragments.length; i++)
- info.systemFragmentedBundleLocations[i] = fragments[i].getLocation();
- }
-
- public void updateBundles(Manipulator manipulator) throws IOException {
- if (DEBUG)
- System.out.println("SimpleConfiguratorManipulatorImpl#updateBundles()"); //$NON-NLS-1$
-
- BundlesState bundleState = manipulator.getBundlesState();
-
- if (bundleState == null)
- return;
- if (bundleState.isFullySupported())
- bundleState.resolve(true);
-
- BundleInfo[] currentBInfos = bundleState.getExpectedState();
- if (!isTargetConfiguratorBundle(currentBInfos))
- return;
- Properties properties = new Properties();
- String[] jvmArgs = manipulator.getLauncherData().getJvmArgs();
- for (int i = 0; i < jvmArgs.length; i++) {
- if (jvmArgs[i].startsWith("-D")) { //$NON-NLS-1$
- int index = jvmArgs[i].indexOf("="); //$NON-NLS-1$
- if (index > 0 && jvmArgs[i].length() > 2) {
- String key = jvmArgs[i].substring(2, index);
- String value = jvmArgs[i].substring(index + 1);
- properties.setProperty(key, value);
- }
- }
- }
-
- Utils.appendProperties(properties, manipulator.getConfigData().getProperties());
- boolean exclusiveInstallation = Boolean.valueOf(properties.getProperty(SimpleConfiguratorManipulatorImpl.PROP_KEY_EXCLUSIVE_INSTALLATION)).booleanValue();
- File configFile = getConfigFile(manipulator);
-
- File installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData());
- BundleInfo[] toInstall = null;
- try {
- //input stream will be closed for us
- toInstall = loadConfiguration(new FileInputStream(configFile), installArea.toURI());
- } catch (FileNotFoundException e) {
- //no file, just return an empty list
- toInstall = new BundleInfo[0];
- }
-
- List toUninstall = new LinkedList();
- if (exclusiveInstallation)
- for (int i = 0; i < currentBInfos.length; i++) {
- boolean install = false;
- for (int j = 0; j < toInstall.length; j++)
- if (currentBInfos[i].getLocation().equals(toInstall[j].getLocation())) {
- install = true;
- break;
- }
- if (!install)
- toUninstall.add(currentBInfos[i]);
- }
-
- for (int i = 0; i < toInstall.length; i++) {
- try {
- bundleState.installBundle(toInstall[i]);
- } catch (RuntimeException e) {
- //Ignore
- }
- }
- if (exclusiveInstallation)
- for (Iterator ite = toUninstall.iterator(); ite.hasNext();) {
- BundleInfo bInfo = (BundleInfo) ite.next();
- bundleState.uninstallBundle(bInfo);
- }
-
- bundleState.resolve(true);
- manipulator.getConfigData().setBundles(bundleState.getExpectedState());
- }
-
- public void cleanup(Manipulator manipulator) {
- File outputFile = getConfigFile(manipulator);
- outputFile.delete();
-
- if (outputFile.getParentFile().isDirectory())
- outputFile.getParentFile().delete();
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java
deleted file mode 100644
index 84c8c7b31..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.manipulator;
-
-import java.io.*;
-import java.net.URI;
-import java.util.Arrays;
-import java.util.Comparator;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.Messages;
-import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
-import org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo;
-import org.eclipse.equinox.internal.simpleconfigurator.utils.SimpleConfiguratorUtils;
-import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
-import org.osgi.framework.Version;
-
-public class SimpleConfiguratorManipulatorUtils {
-
- private static final String VERSION_PREFIX = "#version="; //$NON-NLS-1$
- private static final String VERSION_1 = "1"; //$NON-NLS-1$
- private static final Version OLD_STYLE_SIMPLE_CONFIGURATOR_VERSION = new Version("1.0.100.v20081206"); //$NON-NLS-1$
- private static final Version DEFAULT_ENCODING_CONFIGURATOR_VERSION = new Version("2.0.0.v20100329"); //$NON-NLS-1$
-
- public static void writeConfiguration(BundleInfo[] simpleInfos, File outputFile) throws IOException {
- if (!Utils.createParentDir(outputFile)) {
- throw new IllegalStateException(Messages.exception_failedToCreateDir);
- }
-
- IOException caughtException = null;
- OutputStream stream = null;
- try {
- stream = new FileOutputStream(outputFile);
- writeConfiguration(simpleInfos, stream);
- } catch (IOException e) {
- caughtException = e;
- } finally {
- try {
- if (stream != null)
- stream.close();
- } catch (IOException e) {
- // we want to avoid over-writing the original exception
- if (caughtException != null)
- caughtException = e;
- }
- }
- if (caughtException != null)
- throw caughtException;
- }
-
- /**
- * The output stream is left open
- * @param simpleInfos
- * @param stream
- * @throws IOException
- */
- public static void writeConfiguration(BundleInfo[] simpleInfos, OutputStream stream) throws IOException {
- // sort by symbolic name
- Arrays.sort(simpleInfos, new Comparator() {
- public int compare(Object o1, Object o2) {
- if (o1 instanceof BundleInfo && o2 instanceof BundleInfo) {
- return ((BundleInfo) o1).getSymbolicName().compareTo(((BundleInfo) o2).getSymbolicName());
- }
- return 0;
- }
- });
-
- BufferedWriter writer = null;
- boolean oldStyle = false;
- boolean utf8 = true;
- for (int i = 0; i < simpleInfos.length; i++) {
- if (SimpleConfiguratorManipulator.SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME.equals(simpleInfos[i].getSymbolicName())) {
- Version version = new Version(simpleInfos[i].getVersion());
- if (version.compareTo(OLD_STYLE_SIMPLE_CONFIGURATOR_VERSION) < 0)
- oldStyle = true;
- if (version.compareTo(DEFAULT_ENCODING_CONFIGURATOR_VERSION) <= 0)
- utf8 = false;
- break;
- }
- }
-
- if (utf8) {
- writer = new BufferedWriter(new OutputStreamWriter(stream, "UTF-8")); //$NON-NLS-1$
- //encoding is expected to be the first line
- writer.write(SimpleConfiguratorUtils.ENCODING_UTF8);
- writer.newLine();
- } else {
- writer = new BufferedWriter(new OutputStreamWriter(stream));
- }
- writer.write(createVersionLine());
- writer.newLine();
-
- // bundle info lines
- for (int i = 0; i < simpleInfos.length; i++) {
- writer.write(createBundleInfoLine(simpleInfos[i], oldStyle));
- writer.newLine();
- }
- writer.flush();
- }
-
- public static String createVersionLine() {
- return VERSION_PREFIX + VERSION_1;
- }
-
- public static String createBundleInfoLine(BundleInfo bundleInfo, boolean oldStyle) {
- // symbolicName,version,location,startLevel,markedAsStarted
- StringBuffer buffer = new StringBuffer();
- buffer.append(bundleInfo.getSymbolicName());
- buffer.append(',');
- buffer.append(bundleInfo.getVersion());
- buffer.append(',');
- buffer.append(createBundleLocation(bundleInfo.getLocation(), oldStyle));
- buffer.append(',');
- buffer.append(bundleInfo.getStartLevel());
- buffer.append(',');
- buffer.append(bundleInfo.isMarkedAsStarted());
- return buffer.toString();
- }
-
- public static String createBundleLocation(URI location, boolean oldStyle) {
- if (oldStyle) {
- String scheme = location.getScheme();
- if (scheme == null)
- scheme = "file"; //$NON-NLS-1$
- return scheme + ':' + location.getSchemeSpecificPart();
- }
-
- //encode comma characters because it is used as the segment delimiter in the bundle info file
- String result = location.toString();
- int commaIndex = result.indexOf(',');
- while (commaIndex != -1) {
- result = result.substring(0, commaIndex) + "%2C" + result.substring(commaIndex + 1); //$NON-NLS-1$
- commaIndex = result.indexOf(',');
- }
- return result;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java
deleted file mode 100644
index fbd55c155..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.simpleconfigurator.manipulator;
-
-import java.io.*;
-import java.net.URI;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.osgi.framework.BundleContext;
-
-/**
- * A ConfiguratorManipulator Service used to read and write bundles.info configuration files
- * @since 2.0
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface SimpleConfiguratorManipulator {
- /**
- * A common location to find the bundle configuration file
- */
- public static final String BUNDLES_INFO_PATH = "org.eclipse.equinox.simpleconfigurator/bundles.info"; //$NON-NLS-1$
-
- /**
- * A common location to find the source configuration file
- */
- public static final String SOURCE_INFO_PATH = "org.eclipse.equinox.source/source.info"; //$NON-NLS-1$
-
- /**
- * Pass this to {@link #loadConfiguration(BundleContext, String)} to read the default source configuration file
- */
- public static final String SOURCE_INFO = new String("source.info"); //$NON-NLS-1$
-
- /**
- * An instance of an ISimpleConfiguratorManipulator is registered as a ConfiguratorManipulator
- * service with ConfiguratorManipulator.SERVICE_PROP_KEY_CONFIGURATOR_BUNDLESYMBOLICNAME =
- * SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME.
- */
- public static final String SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME = "org.eclipse.equinox.simpleconfigurator"; //$NON-NLS-1$
-
- /**
- * Load the configuration file for the currently running system.
- * <p>
- * Pass null for bundleInfoPath to read the bundle configuration file for the running system as
- * specified by the "org.eclipse.equinox.simpleconfigurator.configUrl" system property.
- * </p>
- * <p>If bundleInfoPath == {@link #SOURCE_INFO} the default source configuration file for the running
- * system will be loaded.
- * </p>
- * @param context - the BundleContext for the running system
- * @param bundleInfoPath - pass null or a path to the bundle info file to read, relative to the configuration location. Pass {@link #SOURCE_INFO}
- * to load the default source configuration. Common locations are {@link #BUNDLES_INFO_PATH} and {@link #SOURCE_INFO_PATH}.
- * @return The loaded configuration. Bundles will have at least symbolic name, version and location information.
- * @throws IOException
- */
- public BundleInfo[] loadConfiguration(BundleContext context, String bundleInfoPath) throws IOException;
-
- /**
- * Load the configuration from the given input stream
- * The supplied input stream is consumed by this method and will be closed.
- *
- * @param configuration - the input stream to read the configuration from. The stream will be closed even if an exception is thrown
- * @param installArea - Relative URIs from the configuration file will be resolved relative to here
- * @return The loaded configuration. Bundles will have at least symbolic name, version and location information.
- * @throws IOException
- */
- public BundleInfo[] loadConfiguration(InputStream configuration, URI installArea) throws IOException;
-
- /**
- * Save the configuration to the given output stream
- * The output stream is flushed and left open.
- * To be persisted, bundles are required to have at least a symbolic name, version and location.
- *
- * @param configuration - bundle information to save
- * @param outputStream - the output stream to write to. Stream is not closed
- * @param installArea - bundle locations are written as relative to this URI
- * @throws IOException
- */
- public void saveConfiguration(BundleInfo[] configuration, OutputStream outputStream, URI installArea) throws IOException;
-
- /**
- * Save the configuration to the specified file
- * To be persisted, bundles are required to have at least a symbolic name, version and location.
- *
- * @param configuration - bundle information to save
- * @param configurationFile - file to save the configuration in
- * @param installArea - bundle locations are written as relative to this URI
- *
- * @throws IOException
- */
- public void saveConfiguration(BundleInfo[] configuration, File configurationFile, URI installArea) throws IOException;
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/.classpath b/bundles/org.eclipse.equinox.simpleconfigurator/.classpath
deleted file mode 100644
index 6f3b481ac..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/.cvsignore b/bundles/org.eclipse.equinox.simpleconfigurator/.cvsignore
deleted file mode 100644
index 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 ec72a23c5..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,283 +0,0 @@
-#Thu Mar 04 09:52:05 EST 2010
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.join_wrapped_lines=true
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.simpleconfigurator/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 40cde6858..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,61 +0,0 @@
-#Wed Jan 07 13:39:10 EST 2009
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.simpleconfigurator/META-INF/MANIFEST.MF
deleted file mode 100644
index 2360a0e57..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,27 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.simpleconfigurator;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Bundle-Name: %bundleName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Activator: org.eclipse.equinox.internal.simpleconfigurator.Activator
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.osgi.framework.console;version="1.0.0";resolution:=optional,
- org.eclipse.osgi.service.datalocation;version="1.0.0";resolution:=optional,
- org.eclipse.osgi.service.resolver;version="1.2.0";resolution:=optional,
- org.osgi.framework;version="1.3.0",
- org.osgi.service.packageadmin;version="1.2.0",
- org.osgi.service.startlevel;version="1.0.0",
- org.osgi.util.tracker;version="1.3.0"
-Export-Package: org.eclipse.equinox.internal.provisional.configurator;
- x-friends:="org.eclipse.equinox.p2.reconciler.dropins,
- org.eclipse.equinox.p2.console,
- org.eclipse.equinox.p2.operations,
- org.eclipse.equinox.p2.ui,
- org.eclipse.equinox.p2.director",
- org.eclipse.equinox.internal.simpleconfigurator;x-friends:="org.eclipse.equinox.simpleconfigurator.manipulator",
- org.eclipse.equinox.internal.simpleconfigurator.console;x-internal:=true,
- org.eclipse.equinox.internal.simpleconfigurator.utils;x-friends:="org.eclipse.equinox.simpleconfigurator.manipulator"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/about.html b/bundles/org.eclipse.equinox.simpleconfigurator/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/build.properties b/bundles/org.eclipse.equinox.simpleconfigurator/build.properties
deleted file mode 100644
index ac72e5e75..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
-qualifier=context
-src.includes = about.html
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/localbuild.xml b/bundles/org.eclipse.equinox.simpleconfigurator/localbuild.xml
deleted file mode 100644
index a5d7fd718..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/localbuild.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0"?>
-<!-- ======================================================================
- Mar 14, 2007 11:17:02 AM
-
- project
- description
-
- Administrator
- ====================================================================== -->
-<project name="project" default="default">
- <description>
- description
- </description>
-
- <!-- =================================
- target: default
- ================================= -->
- <target name="default" description="--> description">
- <echo message="bd is ${buildDirectory}"/>
- <tstamp/>
- <eclipse.buildScript elements="plugin@org.eclipse.equinox.simpleconfigurator"
- buildDirectory="${buildDirectory}"
- configInfo="*,*,*"
- baseLocation="${baseLocation}"
- buildingOSGi="true"
- outputUpdateJars="false"
- pluginpath="${thisPlugin}"
- forceContextQualifier="z${DSTAMP}${TSTAMP}"
- />
- <ant antfile="build.xml" target="build.jars"/>
- <ant antfile="build.xml" target="build.update.jar"/>
- <move todir="${targetFolder}" includeEmptyDirs="no" failonerror="yes">
- <fileset dir="${basedir}">
- <include name="*.jar"/>
- </fileset>
- <regexpmapper from="^(.*)_.*$" to="\1.jar"/>
- </move>
- <ant antfile="build.xml" target="clean"/>
- <delete file="build.xml"/>
- <delete file="javaCompiler...args"/>
- </target>
-
-
-</project>
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/plugin.properties b/bundles/org.eclipse.equinox.simpleconfigurator/plugin.properties
deleted file mode 100644
index b9da99e0b..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bundleName= Simple Configurator
-providerName = Eclipse.org - Equinox
-
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/pom.xml b/bundles/org.eclipse.equinox.simpleconfigurator/pom.xml
deleted file mode 100644
index bef764a22..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.simpleconfigurator</artifactId>
- <version>1.0.200.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/provisional/configurator/Configurator.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/provisional/configurator/Configurator.java
deleted file mode 100644
index b28832758..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/provisional/configurator/Configurator.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.configurator;
-
-import java.io.IOException;
-import java.net.URL;
-
-/**
- * The implementation of this interface will be registered into a service registry
- * by a Configurator Bundle.
- *
- * The client bundle can apply configuration which can be interpreted by referring
- * the specified location to the current running OSGi environment. In addition,
- * the client can expect bundle state in advance .
- *
- * TODO: this interface might not be required to be defined.
- *
- *
- * **********************************************
- * Current Definition of Configurator Bundle:
- *
- * Configurator Bundle will do the following operation at its startup.
- *
- * 1. Create a Configurator object.
- * 2. Register it as a service to the service registry.
- * 3. Get where to read for knowing what kinds of bundles in its implementation dependent way.
- * 4. Call {@link Configurator#applyConfiguration(URL)} with the URL.
- *
- * At its stopping, the service registered will be unregistered.
- *
- * see org.eclipse.equinox.internal.provisional.configuratormanipulato.ConfiguratorManipulator
- *
- */
-public interface Configurator {
-
- /**
- * Apply configuration read from the specified url to the OSGi
- * environment currently running.
- *
- * @param url URL to be read.
- * @throws IOException - If reading information from the specified url fails.
- */
- void applyConfiguration(URL url) throws IOException;
-
- /**
- * Apply configuration read from the previously used url to the OSGi
- * environment currently running. If it is never used, do nothing.
- *
- * @throws IOException - If reading information from the specified url fails.
- */
- void applyConfiguration() throws IOException;
-
- /**
- * Return the url in use.
- * If it is never used, return null.
- *
- * @return URL
- */
- URL getUrlInUse();
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/Activator.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/Activator.java
deleted file mode 100644
index 333df29e7..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/Activator.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator;
-
-import java.util.Dictionary;
-import java.util.Hashtable;
-import org.eclipse.equinox.internal.provisional.configurator.Configurator;
-import org.eclipse.equinox.internal.simpleconfigurator.utils.EquinoxUtils;
-import org.eclipse.equinox.internal.simpleconfigurator.utils.SimpleConfiguratorConstants;
-import org.osgi.framework.*;
-
-/**
- * At its start, SimpleConfigurator bundle does the followings.
- *
- * 1. A value will be gotten by @{link BundleContext#getProperty(key)} with
- * {@link SimpleConfiguratorConstants#PROP_KEY_CONFIGURL} as a key.
- * The value will be used for the referal URL. Under the url, there must be a simple
- * bundles list file to be installed with thier start level and flag of marked as started.
- *
- * 2. If the value is null, do nothing any more.
- * 3. Otherwise, retrieve the bundles list from the url and install,
- * set start level of and start bundles, as specified.
- *
- * 4. A value will be gotten by @{link BundleContext#getProperty(key)} with
- * {@link SimpleConfiguratorConstants#PROP_KEY_EXCLUSIVE_INSTALLATION} as a key.
- *
- * 5. If it equals "false", it will do exclusive installation, which means that
- * the bundles will not be listed in the specified url but installed at the time
- * of the method call except SystemBundle will be uninstalled.
- * Otherwise, no uninstallation will not be done.
- *
- */
-public class Activator implements BundleActivator {
- public final static boolean DEBUG = false;
- private ServiceRegistration configuratorRegistration;
- private ServiceRegistration commandRegistration;
-
- public void start(BundleContext context) throws Exception {
- SimpleConfiguratorImpl bundleConfigurator = new SimpleConfiguratorImpl(context, context.getBundle());
- bundleConfigurator.applyConfiguration();
-
- Dictionary props = new Hashtable();
- props.put(Constants.SERVICE_VENDOR, "Eclipse"); //$NON-NLS-1$
- props.put(Constants.SERVICE_PID, SimpleConfiguratorConstants.TARGET_CONFIGURATOR_NAME);
- ServiceFactory configurationFactory = new SimpleConfiguratorFactory(context);
- configuratorRegistration = context.registerService(Configurator.class.getName(), configurationFactory, props);
-
- try {
- if (null != context.getBundle().loadClass("org.eclipse.osgi.framework.console.CommandProvider")) //$NON-NLS-1$
- commandRegistration = EquinoxUtils.registerConsoleCommands(context);
- } catch (ClassNotFoundException e) {
- // CommandProvider is not available
- // Ok -- optional
- }
-
- if (DEBUG)
- System.out.println("registered Configurator"); //$NON-NLS-1$
- }
-
- public void stop(BundleContext context) throws Exception {
- if (configuratorRegistration != null) {
- configuratorRegistration.unregister();
- configuratorRegistration = null;
- }
- if (commandRegistration != null) {
- commandRegistration.unregister();
- commandRegistration = null;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/ConfigApplier.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/ConfigApplier.java
deleted file mode 100644
index 1da445cc4..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/ConfigApplier.java
+++ /dev/null
@@ -1,372 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URL;
-import java.util.*;
-import org.eclipse.equinox.internal.simpleconfigurator.utils.*;
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
-import org.osgi.service.startlevel.StartLevel;
-
-class ConfigApplier {
- private static final String LAST_BUNDLES_INFO = "last.bundles.info"; //$NON-NLS-1$
- private static final String PROP_DEVMODE = "osgi.dev"; //$NON-NLS-1$
-
- private final BundleContext manipulatingContext;
- private final PackageAdmin packageAdminService;
- private final StartLevel startLevelService;
- private final boolean runningOnEquinox;
- private final boolean inDevMode;
-
- private final Bundle callingBundle;
- private final URI baseLocation;
-
- ConfigApplier(BundleContext context, Bundle callingBundle) {
- manipulatingContext = context;
- this.callingBundle = callingBundle;
- runningOnEquinox = "Eclipse".equals(context.getProperty(Constants.FRAMEWORK_VENDOR)); //$NON-NLS-1$
- inDevMode = manipulatingContext.getProperty(PROP_DEVMODE) != null;
- baseLocation = runningOnEquinox ? EquinoxUtils.getInstallLocationURI(context) : null;
-
- ServiceReference packageAdminRef = manipulatingContext.getServiceReference(PackageAdmin.class.getName());
- if (packageAdminRef == null)
- throw new IllegalStateException("No PackageAdmin service is available."); //$NON-NLS-1$
- packageAdminService = (PackageAdmin) manipulatingContext.getService(packageAdminRef);
-
- ServiceReference startLevelRef = manipulatingContext.getServiceReference(StartLevel.class.getName());
- if (startLevelRef == null)
- throw new IllegalStateException("No StartLevelService service is available."); //$NON-NLS-1$
- startLevelService = (StartLevel) manipulatingContext.getService(startLevelRef);
- }
-
- void install(URL url, boolean exclusiveMode) throws IOException {
- List bundleInfoList = SimpleConfiguratorUtils.readConfiguration(url, baseLocation);
- if (Activator.DEBUG)
- System.out.println("applyConfiguration() bundleInfoList.size()=" + bundleInfoList.size());
- if (bundleInfoList.size() == 0)
- return;
-
- BundleInfo[] expectedState = Utils.getBundleInfosFromList(bundleInfoList);
-
- // check for an update to the system bundle
- String systemBundleSymbolicName = manipulatingContext.getBundle(0).getSymbolicName();
- Version systemBundleVersion = manipulatingContext.getBundle(0).getVersion();
- if (systemBundleSymbolicName != null) {
- for (int i = 0; i < expectedState.length; i++) {
- String symbolicName = expectedState[i].getSymbolicName();
- if (!systemBundleSymbolicName.equals(symbolicName))
- continue;
-
- Version version = Version.parseVersion(expectedState[i].getVersion());
- if (!systemBundleVersion.equals(version))
- throw new IllegalStateException("The System Bundle was updated. The framework must be restarted to finalize the configuration change");
- }
- }
-
- HashSet toUninstall = null;
- if (!exclusiveMode) {
- BundleInfo[] lastInstalledBundles = getLastState();
- if (lastInstalledBundles != null) {
- toUninstall = new HashSet(Arrays.asList(lastInstalledBundles));
- toUninstall.removeAll(Arrays.asList(expectedState));
- }
- saveStateAsLast(url);
- }
-
- Collection prevouslyResolved = getResolvedBundles();
- Collection toRefresh = new ArrayList();
- Collection toStart = new ArrayList();
- if (exclusiveMode) {
- toRefresh.addAll(installBundles(expectedState, toStart));
- toRefresh.addAll(uninstallBundles(expectedState, packageAdminService));
- } else {
- toRefresh.addAll(installBundles(expectedState, toStart));
- if (toUninstall != null)
- toRefresh.addAll(uninstallBundles(toUninstall));
- }
- refreshPackages((Bundle[]) toRefresh.toArray(new Bundle[toRefresh.size()]), manipulatingContext);
- if (toRefresh.size() > 0)
- try {
- manipulatingContext.getBundle().loadClass("org.eclipse.osgi.service.resolver.PlatformAdmin"); //$NON-NLS-1$
- // now see if there are any currently resolved bundles with option imports which could be resolved or
- // if there are fragments with additional constraints which conflict with an already resolved host
- Bundle[] additionalRefresh = StateResolverUtils.getAdditionalRefresh(prevouslyResolved, manipulatingContext);
- if (additionalRefresh.length > 0)
- refreshPackages(additionalRefresh, manipulatingContext);
- } catch (ClassNotFoundException cnfe) {
- // do nothing; no resolver package available
- }
- startBundles((Bundle[]) toStart.toArray(new Bundle[toStart.size()]));
- }
-
- private Collection getResolvedBundles() {
- Collection resolved = new HashSet();
- Bundle[] allBundles = manipulatingContext.getBundles();
- for (int i = 0; i < allBundles.length; i++)
- if ((allBundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0)
- resolved.add(allBundles[i]);
- return resolved;
- }
-
- private Collection uninstallBundles(HashSet toUninstall) {
- Collection removedBundles = new ArrayList(toUninstall.size());
- for (Iterator iterator = toUninstall.iterator(); iterator.hasNext();) {
- BundleInfo current = (BundleInfo) iterator.next();
- Bundle[] matchingBundles = packageAdminService.getBundles(current.getSymbolicName(), getVersionRange(current.getVersion()));
- for (int j = 0; matchingBundles != null && j < matchingBundles.length; j++) {
- try {
- removedBundles.add(matchingBundles[j]);
- matchingBundles[j].uninstall();
- } catch (BundleException e) {
- //TODO log in debug mode...
- }
- }
- }
- return removedBundles;
- }
-
- private void saveStateAsLast(URL url) {
- InputStream sourceStream = null;
- OutputStream destinationStream = null;
-
- File lastBundlesTxt = getLastBundleInfo();
- try {
- try {
- destinationStream = new FileOutputStream(lastBundlesTxt);
- sourceStream = url.openStream();
- SimpleConfiguratorUtils.transferStreams(sourceStream, destinationStream);
- } finally {
- if (destinationStream != null)
- destinationStream.close();
- if (sourceStream != null)
- sourceStream.close();
- }
- } catch (IOException e) {
- //nothing
- }
- }
-
- private File getLastBundleInfo() {
- return manipulatingContext.getDataFile(LAST_BUNDLES_INFO);
- }
-
- private BundleInfo[] getLastState() {
- File lastBundlesInfo = getLastBundleInfo();
- if (!lastBundlesInfo.isFile())
- return null;
- try {
- return (BundleInfo[]) SimpleConfiguratorUtils.readConfiguration(lastBundlesInfo.toURL(), baseLocation).toArray(new BundleInfo[1]);
- } catch (IOException e) {
- return null;
- }
- }
-
- private ArrayList installBundles(BundleInfo[] finalList, Collection toStart) {
- ArrayList toRefresh = new ArrayList();
-
- String useReferenceProperty = manipulatingContext.getProperty(SimpleConfiguratorConstants.PROP_KEY_USE_REFERENCE);
- boolean useReference = useReferenceProperty == null ? runningOnEquinox : Boolean.valueOf(useReferenceProperty).booleanValue();
-
- for (int i = 0; i < finalList.length; i++) {
- if (finalList[i] == null)
- continue;
- //TODO here we do not deal with bundles that don't have a symbolic id
- //TODO Need to handle the case where getBundles return multiple value
-
- String symbolicName = finalList[i].getSymbolicName();
- String version = finalList[i].getVersion();
-
- Bundle[] matches = null;
- if (symbolicName != null && version != null)
- matches = packageAdminService.getBundles(symbolicName, getVersionRange(version));
-
- String bundleLocation = SimpleConfiguratorUtils.getBundleLocation(finalList[i], useReference);
-
- Bundle current = matches == null ? null : (matches.length == 0 ? null : matches[0]);
- if (current == null) {
- try {
- current = manipulatingContext.installBundle(bundleLocation);
- if (Activator.DEBUG)
- System.out.println("installed bundle:" + finalList[i]); //$NON-NLS-1$
- toRefresh.add(current);
- } catch (BundleException e) {
- if (Activator.DEBUG) {
- System.err.println("Can't install " + symbolicName + '/' + version + " from location " + finalList[i].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$
- e.printStackTrace();
- }
- continue;
- }
- } else if (inDevMode && current.getBundleId() != 0 && current != manipulatingContext.getBundle() && !bundleLocation.equals(current.getLocation()) && !current.getLocation().startsWith("initial@")) {
- // We do not do this for the system bundle (id==0), the manipulating bundle or any bundle installed from the osgi.bundles list (locations starting with "@initial"
- // The bundle exists; but the location is different. Uninstall the current and install the new one (bug 229700)
- try {
- current.uninstall();
- toRefresh.add(current);
- } catch (BundleException e) {
- if (Activator.DEBUG) {
- System.err.println("Can't uninstall " + symbolicName + '/' + version + " from location " + current.getLocation()); //$NON-NLS-1$ //$NON-NLS-2$
- e.printStackTrace();
- }
- continue;
- }
- try {
- current = manipulatingContext.installBundle(bundleLocation);
- if (Activator.DEBUG)
- System.out.println("installed bundle:" + finalList[i]); //$NON-NLS-1$
- toRefresh.add(current);
- } catch (BundleException e) {
- if (Activator.DEBUG) {
- System.err.println("Can't install " + symbolicName + '/' + version + " from location " + finalList[i].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$
- e.printStackTrace();
- }
- continue;
- }
- }
-
- // Mark Started
- if (finalList[i].isMarkedAsStarted()) {
- toStart.add(current);
- }
-
- // Set Start Level
- int startLevel = finalList[i].getStartLevel();
- if (startLevel < 1)
- continue;
- if (current.getBundleId() == 0)
- continue;
- if (packageAdminService.getBundleType(current) == PackageAdmin.BUNDLE_TYPE_FRAGMENT)
- continue;
- if (SimpleConfiguratorConstants.TARGET_CONFIGURATOR_NAME.equals(current.getSymbolicName()))
- continue;
-
- try {
- startLevelService.setBundleStartLevel(current, startLevel);
- } catch (IllegalArgumentException ex) {
- Utils.log(4, null, null, "Failed to set start level of Bundle:" + finalList[i], ex); //$NON-NLS-1$
- }
- }
- return toRefresh;
- }
-
- private void refreshPackages(Bundle[] bundles, BundleContext context) {
- if (bundles.length == 0 || packageAdminService == null)
- return;
-
- final boolean[] flag = new boolean[] {false};
- FrameworkListener listener = new FrameworkListener() {
- public void frameworkEvent(FrameworkEvent event) {
- if (event.getType() == FrameworkEvent.PACKAGES_REFRESHED) {
- synchronized (flag) {
- flag[0] = true;
- flag.notifyAll();
- }
- }
- }
- };
- context.addFrameworkListener(listener);
- packageAdminService.refreshPackages(bundles);
- synchronized (flag) {
- while (!flag[0]) {
- try {
- flag.wait();
- } catch (InterruptedException e) {
- //ignore
- }
- }
- }
- // if (DEBUG) {
- // for (int i = 0; i < bundles.length; i++) {
- // System.out.println(SimpleConfiguratorUtils.getBundleStateString(bundles[i]));
- // }
- // }
- context.removeFrameworkListener(listener);
- }
-
- private void startBundles(Bundle[] bundles) {
- for (int i = 0; i < bundles.length; i++) {
- Bundle bundle = bundles[i];
- if (bundle.getState() == Bundle.UNINSTALLED) {
- System.err.println("Could not start: " + bundle.getSymbolicName() + '(' + bundle.getLocation() + ':' + bundle.getBundleId() + ')' + ". It's state is uninstalled.");
- continue;
- }
- if (bundle.getState() == Bundle.STARTING && (bundle == callingBundle || bundle == manipulatingContext.getBundle()))
- continue;
- if (packageAdminService.getBundleType(bundle) == PackageAdmin.BUNDLE_TYPE_FRAGMENT)
- continue;
-
- try {
- bundle.start();
- if (Activator.DEBUG)
- System.out.println("started Bundle:" + bundle.getSymbolicName() + '(' + bundle.getLocation() + ':' + bundle.getBundleId() + ')'); //$NON-NLS-1$
- } catch (BundleException e) {
- e.printStackTrace();
- // FrameworkLogEntry entry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, NLS.bind(EclipseAdaptorMsg.ECLIPSE_STARTUP_FAILED_START, bundle.getLocation()), 0, e, null);
- // log.log(entry);
- }
- }
- }
-
- /**
- * Uninstall bundles which are not listed on finalList.
- *
- * @param finalList bundles list not to be uninstalled.
- * @param packageAdmin package admin service.
- * @return Collection HashSet of bundles finally installed.
- */
- private Collection uninstallBundles(BundleInfo[] finalList, PackageAdmin packageAdmin) {
- Bundle[] allBundles = manipulatingContext.getBundles();
-
- //Build a set with all the bundles from the system
- Set removedBundles = new HashSet(allBundles.length);
- // configurator.setPrerequisiteBundles(allBundles);
- for (int i = 0; i < allBundles.length; i++) {
- if (allBundles[i].getBundleId() == 0)
- continue;
- removedBundles.add(allBundles[i]);
- }
-
- //Remove all the bundles appearing in the final list from the set of installed bundles
- for (int i = 0; i < finalList.length; i++) {
- if (finalList[i] == null)
- continue;
- Bundle[] toAdd = packageAdmin.getBundles(finalList[i].getSymbolicName(), getVersionRange(finalList[i].getVersion()));
- for (int j = 0; toAdd != null && j < toAdd.length; j++) {
- removedBundles.remove(toAdd[j]);
- }
- }
-
- for (Iterator iter = removedBundles.iterator(); iter.hasNext();) {
- try {
- Bundle bundle = ((Bundle) iter.next());
- if (bundle.getLocation().startsWith("initial@")) {
- if (Activator.DEBUG)
- System.out.println("Simple configurator thinks a bundle installed by the boot strap should be uninstalled:" + bundle.getSymbolicName() + '(' + bundle.getLocation() + ':' + bundle.getBundleId() + ')'); //$NON-NLS-1$
- // Avoid uninstalling bundles that the boot strap code thinks should be installed (bug 232191)
- iter.remove();
- continue;
- }
- bundle.uninstall();
- if (Activator.DEBUG)
- System.out.println("uninstalled Bundle:" + bundle.getSymbolicName() + '(' + bundle.getLocation() + ':' + bundle.getBundleId() + ')'); //$NON-NLS-1$
- } catch (BundleException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- return removedBundles;
- }
-
- private String getVersionRange(String version) {
- return version == null ? null : new StringBuffer().append('[').append(version).append(',').append(version).append(']').toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorFactory.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorFactory.java
deleted file mode 100644
index 7e8dbeb5d..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorFactory.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator;
-
-import org.osgi.framework.*;
-
-public class SimpleConfiguratorFactory implements ServiceFactory {
- private BundleContext context;
-
- public SimpleConfiguratorFactory(BundleContext context) {
- this.context = context;
- }
-
- public Object getService(Bundle bundle, ServiceRegistration registration) {
- return new SimpleConfiguratorImpl(context, bundle);
- }
-
- public void ungetService(Bundle bundle, ServiceRegistration registration, Object service) {
- // nothing to do
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorImpl.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorImpl.java
deleted file mode 100644
index 6c6f70e7f..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorImpl.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.*;
-import java.util.List;
-import org.eclipse.equinox.internal.provisional.configurator.Configurator;
-import org.eclipse.equinox.internal.simpleconfigurator.utils.*;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-/*
- * SimpleConfigurator provides ways to install bundles listed in a file
- * accessible by the specified URL and expect states for it in advance without
- * actual application.
- *
- * In every methods of SimpleConfiguration object,
- *
- * 1. A value will be gotten by @{link BundleContext#getProperty(key) with
- * {@link SimpleConfiguratorConstants#PROP_KEY_EXCLUSIVE_INSTALLATION} as a key.
- * 2. If it equals "true", it will do exclusive installation, which means that
- * the bundles will not be listed in the specified url but installed at the time
- * of the method call except SystemBundle will be uninstalled. Otherwise, no
- * uninstallation will not be done.
- */
-public class SimpleConfiguratorImpl implements Configurator {
-
- private static URL configurationURL = null;
- private static Object configurationLock = new Object();
-
- private BundleContext context;
- private ConfigApplier configApplier;
- private Bundle bundle;
-
- public SimpleConfiguratorImpl(BundleContext context, Bundle bundle) {
- this.context = context;
- this.bundle = bundle;
- }
-
- public URL getConfigurationURL() throws IOException {
- String specifiedURL = context.getProperty(SimpleConfiguratorConstants.PROP_KEY_CONFIGURL);
- if (specifiedURL == null)
- specifiedURL = "file:" + SimpleConfiguratorConstants.CONFIGURATOR_FOLDER + "/" + SimpleConfiguratorConstants.CONFIG_LIST;
-
- try {
- //If it is not a file URL use it as is
- if (!specifiedURL.startsWith("file:"))
- return new URL(specifiedURL);
- } catch (MalformedURLException e) {
- return null;
- }
-
- try {
- // if it is an absolute file URL, use it as is
- boolean done = false;
- URL url = null;
- String file = specifiedURL;
- while (!done) {
- // TODO what is this while loop for? nested file:file:file: urls?
- try {
- url = Utils.buildURL(file);
- file = url.getFile();
- } catch (java.net.MalformedURLException e) {
- done = true;
- }
- }
- if (url != null && new File(url.getFile()).isAbsolute())
- return url;
-
- //if it is an relative file URL, then resolve it against the configuration area
- // TODO Support relative file URLs when not on Equinox
- URL[] configURL = EquinoxUtils.getConfigAreaURL(context);
- if (configURL != null) {
- File userConfig = new File(configURL[0].getFile(), url.getFile());
- if (configURL.length == 1)
- return userConfig.exists() ? userConfig.toURL() : null;
-
- File sharedConfig = new File(configURL[1].getFile(), url.getFile());
- if (!userConfig.exists())
- return sharedConfig.exists() ? sharedConfig.toURL() : null;
-
- if (!sharedConfig.exists())
- return userConfig.toURL();
-
- URI base = EquinoxUtils.getInstallLocationURI(context);
-
- URL sharedConfigURL = sharedConfig.toURL();
- List sharedBundles = SimpleConfiguratorUtils.readConfiguration(sharedConfigURL, base);
-
- URL userConfigURL = userConfig.toURL();
- List userBundles = SimpleConfiguratorUtils.readConfiguration(userConfigURL, base);
-
- return (userBundles.containsAll(sharedBundles)) ? userConfigURL : sharedConfigURL;
- }
- } catch (MalformedURLException e) {
- return null;
- }
-
- //Last resort
- try {
- return Utils.buildURL(specifiedURL);
- } catch (MalformedURLException e) {
- //Ignore
- }
-
- return null;
- }
-
- public void applyConfiguration(URL url) throws IOException {
- synchronized (configurationLock) {
- if (Activator.DEBUG)
- System.out.println("applyConfiguration() URL=" + url);
- if (url == null)
- return;
- configurationURL = url;
-
- if (this.configApplier == null)
- configApplier = new ConfigApplier(context, bundle);
- configApplier.install(url, isExclusiveInstallation());
- }
- }
-
- private boolean isExclusiveInstallation() {
- String value = context.getProperty(SimpleConfiguratorConstants.PROP_KEY_EXCLUSIVE_INSTALLATION);
- if (value == null || value.trim().length() == 0)
- value = "true";
- return Boolean.valueOf(value).booleanValue();
- }
-
- public void applyConfiguration() throws IOException {
- synchronized (configurationLock) {
- configurationURL = getConfigurationURL();
- applyConfiguration(configurationURL);
- }
- }
-
- public URL getUrlInUse() {
- synchronized (configurationLock) {
- return configurationURL;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ApplyCommand.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ApplyCommand.java
deleted file mode 100644
index b4bb8b0d5..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ApplyCommand.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.console;
-
-import java.io.IOException;
-import java.net.URL;
-import org.eclipse.equinox.internal.provisional.configurator.Configurator;
-import org.eclipse.osgi.framework.console.CommandInterpreter;
-import org.osgi.framework.BundleContext;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * An OSGi console command to apply a configuration
- */
-public class ApplyCommand {
-
- private URL configURL;
- private CommandInterpreter interpreter;
- private BundleContext context;
-
- public ApplyCommand(CommandInterpreter interpreter, BundleContext context, URL configURL) {
- this.interpreter = interpreter;
- this.context = context;
- this.configURL = configURL;
- }
-
- /**
- * Runs the apply console command
- */
- public void run() {
- ServiceTracker tracker = new ServiceTracker(context, Configurator.class.getName(), null);
- tracker.open();
- Configurator configurator = (Configurator) tracker.getService();
- if (configurator != null) {
- try {
- if (configURL != null)
- configurator.applyConfiguration(configURL);
- else
- configurator.applyConfiguration();
-
- if (configurator.getUrlInUse() == null)
- interpreter.println("Config URL not set.");
- } catch (IOException e) {
- interpreter.println(e.getMessage());
- }
- } else {
- interpreter.println("No configurator registered"); //$NON-NLS-1$
- }
- tracker.close();
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ConfiguratorCommandProvider.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ConfiguratorCommandProvider.java
deleted file mode 100644
index 99a667eed..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ConfiguratorCommandProvider.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.console;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.equinox.internal.simpleconfigurator.utils.Utils;
-import org.eclipse.osgi.framework.console.CommandInterpreter;
-import org.eclipse.osgi.framework.console.CommandProvider;
-import org.osgi.framework.BundleContext;
-
-public class ConfiguratorCommandProvider implements CommandProvider {
- public static final String NEW_LINE = System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
-
- private BundleContext context;
-
- public ConfiguratorCommandProvider(BundleContext context) {
- this.context = context;
- }
-
- /**
- * Returns the given string as an URL, or <code>null</code> if
- * the string could not be interpreted as an URL.
- */
- private URL toURL(CommandInterpreter interpreter, String urlString) {
- try {
- return Utils.buildURL(urlString);
- } catch (MalformedURLException e) {
- interpreter.println(e.getMessage());
- return null;
- }
- }
-
- /**
- * Apply the current configuration
- * @param interpreter
- */
- public void _confapply(CommandInterpreter interpreter) {
- String parameter = interpreter.nextArgument();
- URL configURL = null;
- if (parameter != null)
- configURL = toURL(interpreter, parameter);
-
- new ApplyCommand(interpreter, context, configURL).run();
- }
-
- public String getHelp() {
- StringBuffer help = new StringBuffer();
- help.append("---"); //$NON-NLS-1$
- help.append("Configurator Commands"); //$NON-NLS-1$
- help.append("---"); //$NON-NLS-1$
- help.append(NEW_LINE);
- help.append("\tconfapply [<config URL>] - Applies a configuration"); //$NON-NLS-1$
- help.append(NEW_LINE);
- return help.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/BundleInfo.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/BundleInfo.java
deleted file mode 100644
index 8f44d08b3..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/BundleInfo.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.utils;
-
-import java.net.URI;
-
-/*
- * This object represents information of a bundle.
- */
-public class BundleInfo {
- public static final int NO_LEVEL = -1;
-
- private String symbolicName = null;
- private String version = null;
- private URI location;
- private URI baseLocation;
-
- private boolean markedAsStarted = false;
- private int startLevel = NO_LEVEL;
-
- public BundleInfo(String symbolic, String version, URI location, int startLevel, boolean started) {
- this.symbolicName = symbolic;
- this.version = version;
- this.location = location;
- this.markedAsStarted = started;
- this.startLevel = startLevel;
- }
-
- public URI getLocation() {
- return location;
- }
-
- public int getStartLevel() {
- return startLevel;
- }
-
- public String getSymbolicName() {
- return symbolicName;
- }
-
- public String getVersion() {
- return version;
- }
-
- public boolean isMarkedAsStarted() {
- return markedAsStarted;
- }
-
- public URI getBaseLocation() {
- return baseLocation;
- }
-
- public void setBaseLocation(URI baseLocation) {
- this.baseLocation = baseLocation;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append("BundleInfo("); //$NON-NLS-1$
- if (symbolicName != null)
- buffer.append(symbolicName);
- buffer.append(", "); //$NON-NLS-1$
- if (version != null)
- buffer.append(version);
- if (baseLocation != null) {
- buffer.append(", baseLocation="); //$NON-NLS-1$
- buffer.append(baseLocation);
- }
- buffer.append(", location="); //$NON-NLS-1$
- buffer.append(location);
- buffer.append(", startLevel="); //$NON-NLS-1$
- buffer.append(startLevel);
- buffer.append(", toBeStarted="); //$NON-NLS-1$
- buffer.append(markedAsStarted);
- buffer.append(')');
- return buffer.toString();
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((symbolicName == null) ? 0 : symbolicName.hashCode());
- result = prime * result + ((version == null) ? 0 : version.hashCode());
- return result;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
-
- if (obj == null)
- return false;
-
- if (getClass() != obj.getClass())
- return false;
-
- BundleInfo other = (BundleInfo) obj;
- if (symbolicName == null) {
- if (other.symbolicName != null)
- return false;
- } else if (!symbolicName.equals(other.symbolicName))
- return false;
-
- if (version == null) {
- if (other.version != null)
- return false;
- } else if (!version.equals(other.version))
- return false;
-
- if (location == null || other.location == null)
- return true;
-
- //compare absolute location URIs
- URI absoluteLocation = baseLocation == null ? location : URIUtil.append(baseLocation, location.toString());
- URI otherAbsoluteLocation = other.baseLocation == null ? other.location : URIUtil.append(other.baseLocation, other.location.toString());
- return URIUtil.sameURI(absoluteLocation, otherAbsoluteLocation);
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/EquinoxUtils.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/EquinoxUtils.java
deleted file mode 100644
index 66454c087..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/EquinoxUtils.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.utils;
-
-import java.net.*;
-import org.eclipse.equinox.internal.simpleconfigurator.console.ConfiguratorCommandProvider;
-import org.eclipse.osgi.framework.console.CommandProvider;
-import org.eclipse.osgi.service.datalocation.Location;
-import org.osgi.framework.*;
-import org.osgi.util.tracker.ServiceTracker;
-
-public class EquinoxUtils {
-
- public static URL[] getConfigAreaURL(BundleContext context) {
- Location configLocation = getConfigLocation(context);
- if (configLocation == null)
- return null;
-
- URL baseURL = configLocation.getURL();
- if (configLocation.getParentLocation() != null && configLocation.getURL() != null) {
- if (baseURL == null)
- return new URL[] {configLocation.getParentLocation().getURL()};
- else
- return new URL[] {baseURL, configLocation.getParentLocation().getURL()};
- }
- if (baseURL != null)
- return new URL[] {baseURL};
-
- return null;
- }
-
- public static Location getConfigLocation(BundleContext context) {
- Filter filter = null;
- try {
- filter = context.createFilter(Location.CONFIGURATION_FILTER);
- } catch (InvalidSyntaxException e) {
- // should not happen
- }
- ServiceTracker configLocationTracker = new ServiceTracker(context, filter, null);
- configLocationTracker.open();
- try {
- return (Location) configLocationTracker.getService();
- } finally {
- configLocationTracker.close();
- }
- }
-
- public static URI getInstallLocationURI(BundleContext context) {
- try {
- ServiceReference[] references = context.getServiceReferences(Location.class.getName(), Location.INSTALL_FILTER);
- if (references != null && references.length > 0) {
- ServiceReference reference = references[0];
- Location installLocation = (Location) context.getService(reference);
- if (installLocation != null) {
- try {
- if (installLocation.isSet()) {
- URL location = installLocation.getURL();
- return URIUtil.toURI(location);
- }
- } catch (URISyntaxException e) {
- //TODO: log an error
- } finally {
- context.ungetService(reference);
- }
- }
- }
- } catch (InvalidSyntaxException e) {
- //TODO: log an error
- }
- return null;
- }
-
- public static ServiceRegistration registerConsoleCommands(BundleContext context) {
- return context.registerService(CommandProvider.class.getName(), new ConfiguratorCommandProvider(context), null);
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorConstants.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorConstants.java
deleted file mode 100644
index 425c16028..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorConstants.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.utils;
-
-public class SimpleConfiguratorConstants {
- /**
- * If BundleContext#getProperty(PROP_KEY_EXCLUSIVE_INSTALLATION) equals "true" ignoring case,
- * Configurator.applyConfiguration(url) will uninstall the installed bundles which are not
- * listed in the simpleconfigurator config file after install bundles listed.
- * Otherwise, it never uninstall any bundles.
- *
- * Default: true
- */
- public static final String PROP_KEY_EXCLUSIVE_INSTALLATION = "org.eclipse.equinox.simpleconfigurator.exclusiveInstallation"; //$NON-NLS-1$
-
- /**
- * If BundleContext#getProperty(PROP_KEY_USE_REFERENCE) does not equal "false" ignoring case,
- * when a SimpleConfigurator installs a bundle, "reference:" is added to its bundle location in order to avoid
- * caching its bundle jar. Otherwise, it will add nothing to any bundle location.
- *
- * Default: true
- */
- public static final String PROP_KEY_USE_REFERENCE = "org.eclipse.equinox.simpleconfigurator.useReference"; //$NON-NLS-1$
-
- /**
- * BundleContext#getProperty(PROP_KEY_CONFIGURL) is used for SimpleConfigurator to do life cycle control of bundles.
- * The file specified by the returned url is read by SimpleConfigurator and do life cycle control according to it.
- * If improper value or null is returned, SimpleConfigurator doesn't do it.
- *
- * Default: null
- */
- public static final String PROP_KEY_CONFIGURL = "org.eclipse.equinox.simpleconfigurator.configUrl"; //$NON-NLS-1$
-
- public static final String CONFIG_LIST = "bundles.info"; //$NON-NLS-1$
- public static final String CONFIGURATOR_FOLDER = "org.eclipse.equinox.simpleconfigurator"; //$NON-NLS-1$
-
- public static final String TARGET_CONFIGURATOR_NAME = "org.eclipse.equinox.simpleconfigurator"; //$NON-NLS-1$
-
- public static final String PARAMETER_BASEURL = "org.eclipse.equinox.simpleconfigurator.baseUrl"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java
deleted file mode 100644
index 0ab0582f2..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.utils;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-import org.eclipse.osgi.service.resolver.VersionRange;
-import org.osgi.framework.Version;
-
-public class SimpleConfiguratorUtils {
-
- private static final String UNC_PREFIX = "//";
- private static final String VERSION_PREFIX = "#version=";
- public static final String ENCODING_UTF8 = "#encoding=UTF-8";
- public static final Version COMPATIBLE_VERSION = new Version(1, 0, 0);
- public static final VersionRange VERSION_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, new Version(2, 0, 0), false);
-
- private static final String FILE_SCHEME = "file";
- private static final String REFERENCE_PREFIX = "reference:";
- private static final String FILE_PREFIX = "file:";
- private static final String COMMA = ",";
- private static final String ENCODED_COMMA = "%2C";
-
- public static List readConfiguration(URL url, URI base) throws IOException {
- InputStream stream = null;
- try {
- stream = url.openStream();
- } catch (IOException e) {
- // if the exception is a FNF we return an empty bundle list
- if (e instanceof FileNotFoundException)
- return Collections.EMPTY_LIST;
- throw e;
- }
-
- try {
- return readConfiguration(stream, base);
- } finally {
- stream.close();
- }
- }
-
- /**
- * Read the configuration from the given InputStream
- *
- * @param stream - the stream is always closed
- * @param base
- * @return List of {@link BundleInfo}
- * @throws IOException
- */
- public static List readConfiguration(InputStream stream, URI base) throws IOException {
- List bundles = new ArrayList();
-
- BufferedInputStream bufferedStream = new BufferedInputStream(stream);
- String encoding = determineEncoding(bufferedStream);
- BufferedReader r = new BufferedReader(encoding == null ? new InputStreamReader(bufferedStream) : new InputStreamReader(bufferedStream, encoding));
-
- String line;
- try {
- while ((line = r.readLine()) != null) {
- line = line.trim();
- //ignore any comment or empty lines
- if (line.length() == 0)
- continue;
-
- if (line.startsWith("#")) {//$NON-NLS-1$
- parseCommentLine(line);
- continue;
- }
-
- BundleInfo bundleInfo = parseBundleInfoLine(line, base);
- if (bundleInfo != null)
- bundles.add(bundleInfo);
- }
- } finally {
- try {
- r.close();
- } catch (IOException ex) {
- // ignore
- }
- }
- return bundles;
- }
-
- /*
- * We expect the first line of the bundles.info to be
- * #encoding=UTF-8
- * if it isn't, then it is an older bundles.info and should be
- * read with the default encoding
- */
- private static String determineEncoding(BufferedInputStream stream) {
- byte[] utfBytes = ENCODING_UTF8.getBytes();
- byte[] buffer = new byte[utfBytes.length];
-
- int bytesRead = -1;
- stream.mark(utfBytes.length + 1);
- try {
- bytesRead = stream.read(buffer);
- } catch (IOException e) {
- //do nothing
- }
-
- if (bytesRead == utfBytes.length && Arrays.equals(utfBytes, buffer))
- return "UTF-8";
-
- //if the first bytes weren't the encoding, need to reset
- try {
- stream.reset();
- } catch (IOException e) {
- // nothing
- }
- return null;
- }
-
- public static void parseCommentLine(String line) {
- // version
- if (line.startsWith(VERSION_PREFIX)) {
- String version = line.substring(VERSION_PREFIX.length()).trim();
- if (!VERSION_TOLERANCE.isIncluded(new Version(version)))
- throw new IllegalArgumentException("Invalid version: " + version);
- }
- }
-
- public static BundleInfo parseBundleInfoLine(String line, URI base) {
- // symbolicName,version,location,startLevel,markedAsStarted
- StringTokenizer tok = new StringTokenizer(line, COMMA);
- int numberOfTokens = tok.countTokens();
- if (numberOfTokens < 5)
- throw new IllegalArgumentException("Line does not contain at least 5 tokens: " + line);
-
- String symbolicName = tok.nextToken().trim();
- String version = tok.nextToken().trim();
- URI location = parseLocation(tok.nextToken().trim());
- int startLevel = Integer.parseInt(tok.nextToken().trim());
- boolean markedAsStarted = Boolean.valueOf(tok.nextToken()).booleanValue();
- BundleInfo result = new BundleInfo(symbolicName, version, location, startLevel, markedAsStarted);
- if (!location.isAbsolute())
- result.setBaseLocation(base);
- return result;
- }
-
- public static URI parseLocation(String location) {
- // decode any commas we previously encoded when writing this line
- int encodedCommaIndex = location.indexOf(ENCODED_COMMA);
- while (encodedCommaIndex != -1) {
- location = location.substring(0, encodedCommaIndex) + COMMA + location.substring(encodedCommaIndex + 3);
- encodedCommaIndex = location.indexOf(ENCODED_COMMA);
- }
-
- if (File.separatorChar != '/') {
- int colon = location.indexOf(':');
- String scheme = colon < 0 ? null : location.substring(0, colon);
- if (scheme == null || scheme.equals(FILE_SCHEME))
- location = location.replace(File.separatorChar, '/');
- //if the file is a UNC path, insert extra leading // if needed to make a valid URI (see bug 207103)
- if (scheme == null) {
- if (location.startsWith(UNC_PREFIX) && !location.startsWith(UNC_PREFIX, 2))
- location = UNC_PREFIX + location;
- } else {
- //insert UNC prefix after the scheme
- if (location.startsWith(UNC_PREFIX, colon + 1) && !location.startsWith(UNC_PREFIX, colon + 3))
- location = location.substring(0, colon + 3) + location.substring(colon + 1);
- }
- }
-
- try {
- URI uri = new URI(location);
- if (!uri.isOpaque())
- return uri;
- } catch (URISyntaxException e1) {
- // this will catch the use of invalid URI characters (e.g. spaces, etc.)
- // ignore and fall through
- }
-
- try {
- return URIUtil.fromString(location);
- } catch (URISyntaxException e) {
- throw new IllegalArgumentException("Invalid location: " + location);
- }
- }
-
- public static void transferStreams(InputStream source, OutputStream destination) throws IOException {
- source = new BufferedInputStream(source);
- destination = new BufferedOutputStream(destination);
- try {
- byte[] buffer = new byte[8192];
- while (true) {
- int bytesRead = -1;
- if ((bytesRead = source.read(buffer)) == -1)
- break;
- destination.write(buffer, 0, bytesRead);
- }
- } finally {
- try {
- source.close();
- } catch (IOException e) {
- // ignore
- }
- try {
- destination.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-
- // This will produce an unencoded URL string
- public static String getBundleLocation(BundleInfo bundle, boolean useReference) {
- URI location = bundle.getLocation();
- String scheme = location.getScheme();
- String host = location.getHost();
- String path = location.getPath();
-
- if (location.getScheme() == null) {
- URI baseLocation = bundle.getBaseLocation();
- if (baseLocation != null && baseLocation.getScheme() != null) {
- scheme = baseLocation.getScheme();
- host = baseLocation.getHost();
- }
- }
-
- String bundleLocation = null;
- try {
- URL bundleLocationURL = new URL(scheme, host, path);
- bundleLocation = bundleLocationURL.toExternalForm();
-
- } catch (MalformedURLException e1) {
- bundleLocation = location.toString();
- }
-
- if (useReference && bundleLocation.startsWith(FILE_PREFIX))
- bundleLocation = REFERENCE_PREFIX + bundleLocation;
- return bundleLocation;
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/StateResolverUtils.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/StateResolverUtils.java
deleted file mode 100644
index 0b1b5f935..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/StateResolverUtils.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.utils;
-
-import java.util.*;
-import org.eclipse.osgi.service.resolver.*;
-import org.osgi.framework.*;
-
-public class StateResolverUtils {
-
- public static Bundle[] getAdditionalRefresh(Collection currentResolved, BundleContext context) {
- ServiceReference ref = context.getServiceReference(PlatformAdmin.class.getName());
- if (ref == null)
- return new Bundle[0];
- PlatformAdmin platformAdmin = (PlatformAdmin) context.getService(ref);
- if (platformAdmin == null)
- return new Bundle[0];
- try {
- State state = platformAdmin.getState(false);
- BundleDescription[] bundles = state.getBundles();
- HashSet results = new HashSet(bundles.length);
- getAdditionRefresh(bundles, state, currentResolved, results, context);
- return (Bundle[]) results.toArray(new Bundle[results.size()]);
- } finally {
- context.ungetService(ref);
- }
- }
-
- private static void getAdditionRefresh(BundleDescription[] bundleDescriptions, State state, Collection currentResolved, Set results, BundleContext context) {
- bundles: for (int i = 0; i < bundleDescriptions.length; i++) {
- Bundle bundle = context.getBundle(bundleDescriptions[i].getBundleId());
- if (bundle == null)
- continue bundles;
- // look for a fragment which adds a conflicted constraint to an already resolved host
- if (!bundleDescriptions[i].isResolved() && bundleDescriptions[i].getHost() != null) {
- ResolverError[] errors = state.getResolverErrors(bundleDescriptions[i]);
- for (int j = 0; j < errors.length; j++) {
- if ((errors[j].getType() & ResolverError.FRAGMENT_CONFLICT) != 0) {
- BundleDescription[] possibleHosts = state.getBundles(bundleDescriptions[i].getHost().getName());
- for (int k = 0; k < possibleHosts.length; k++) {
- Bundle hostBundle = context.getBundle(possibleHosts[k].getBundleId());
- if (hostBundle != null && currentResolved.contains(hostBundle) && bundleDescriptions[i].getHost().isSatisfiedBy(possibleHosts[k]))
- results.add(hostBundle);
- }
- }
- }
- continue bundles;
- }
- if (!currentResolved.contains(bundle) || !bundleDescriptions[i].isResolved())
- continue bundles;
- // look for optional imports which are unresolved but are resolvable
- ImportPackageSpecification[] imports = bundleDescriptions[i].getImportPackages();
- for (int j = 0; j < imports.length; j++)
- if (ImportPackageSpecification.RESOLUTION_OPTIONAL.equals(imports[j].getDirective(Constants.RESOLUTION_DIRECTIVE)) && !imports[j].isResolved() && state.getStateHelper().isResolvable(imports[j])) {
- results.add(bundle);
- continue bundles;
- }
- // look for optional requires which are unresolved but are resolvable
- BundleSpecification[] requires = bundleDescriptions[i].getRequiredBundles();
- for (int j = 0; j < requires.length; j++)
- if (requires[j].isOptional() && !requires[j].isResolved() && state.getStateHelper().isResolvable(requires[j])) {
- results.add(bundle);
- continue bundles;
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/URIUtil.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/URIUtil.java
deleted file mode 100644
index 7f74610ce..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/URIUtil.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.utils;
-
-import java.io.File;
-import java.net.*;
-
-/**
- * This class copies various methods from the URIUtil class in
- * org.eclipse.equinox.common. Unless otherwise noted the implementations here
- * should mirror those in the common implementation.
- */
-public class URIUtil {
-
- private static final String SCHEME_FILE = "file"; //$NON-NLS-1$
- private static final String UNC_PREFIX = "//"; //$NON-NLS-1$
-
- /**
- * Appends the given extension to the path of the give base URI and returns
- * the corresponding new path.
- * @param base The base URI to append to
- * @param extension The path extension to be added
- * @return The appended URI
- */
- public static URI append(URI base, String extension) {
- try {
- String path = base.getPath();
- if (path == null)
- return appendOpaque(base, extension);
- //if the base is already a directory then resolve will just do the right thing
- if (path.endsWith("/")) {//$NON-NLS-1$
- URI result = base.resolve(extension);
- //Fix UNC paths that are incorrectly normalized by URI#resolve (see Java bug 4723726)
- String resultPath = result.getPath();
- if (path.startsWith(UNC_PREFIX) && (resultPath == null || !resultPath.startsWith(UNC_PREFIX)))
- result = new URI(result.getScheme(), "///" + result.getSchemeSpecificPart(), result.getFragment()); //$NON-NLS-1$
- return result;
- }
- path = path + "/" + extension; //$NON-NLS-1$
- return new URI(base.getScheme(), base.getUserInfo(), base.getHost(), base.getPort(), path, base.getQuery(), base.getFragment());
- } catch (URISyntaxException e) {
- //shouldn't happen because we started from a valid URI
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Special case of appending to an opaque URI. Since opaque URIs
- * have no path segment the best we can do is append to the scheme-specific part
- */
- private static URI appendOpaque(URI base, String extension) throws URISyntaxException {
- String ssp = base.getSchemeSpecificPart();
- if (ssp.endsWith("/")) //$NON-NLS-1$
- ssp += extension;
- else
- ssp = ssp + "/" + extension; //$NON-NLS-1$
- return new URI(base.getScheme(), ssp, base.getFragment());
- }
-
- /**
- * Returns a URI corresponding to the given unencoded string.
- * @throws URISyntaxException If the string cannot be formed into a valid URI
- */
- public static URI fromString(String uriString) throws URISyntaxException {
- int colon = uriString.indexOf(':');
- int hash = uriString.lastIndexOf('#');
- boolean noHash = hash < 0;
- if (noHash)
- hash = uriString.length();
- String scheme = colon < 0 ? null : uriString.substring(0, colon);
- String ssp = uriString.substring(colon + 1, hash);
- String fragment = noHash ? null : uriString.substring(hash + 1);
- //use java.io.File for constructing file: URIs
- if (scheme != null && scheme.equals(SCHEME_FILE)) {
- File file = new File(uriString.substring(5));
- if (file.isAbsolute())
- return file.toURI();
- scheme = null;
- if (File.separatorChar != '/')
- ssp = ssp.replace(File.separatorChar, '/');
- }
- return new URI(scheme, ssp, fragment);
- }
-
- /*
- * Compares two URI for equality.
- * Return false if one of them is null
- */
- public static boolean sameURI(URI url1, URI url2) {
- if (url1 == url2)
- return true;
- if (url1 == null || url2 == null)
- return false;
- if (url1.equals(url2))
- return true;
-
- if (url1.isAbsolute() != url2.isAbsolute())
- return false;
-
- // check if we have two local file references that are case variants
- File file1 = toFile(url1);
- return file1 == null ? false : file1.equals(toFile(url2));
- }
-
- /**
- * Returns the URI as a local file, or <code>null</code> if the given
- * URI does not represent a local file.
- * @param uri The URI to return the file for
- * @return The local file corresponding to the given URI, or <code>null</code>
- */
- public static File toFile(URI uri) {
- try {
- if (!SCHEME_FILE.equalsIgnoreCase(uri.getScheme()))
- return null;
- //assume all illegal characters have been properly encoded, so use URI class to unencode
- return new File(uri);
- } catch (IllegalArgumentException e) {
- //File constructor does not support non-hierarchical URI
- String path = uri.getPath();
- //path is null for non-hierarchical URI such as file:c:/tmp
- if (path == null)
- path = uri.getSchemeSpecificPart();
- return new File(path);
- }
- }
-
- /**
- * Returns a string representation of the given URI that doesn't have illegal
- * characters encoded. This string is suitable for later passing to {@link #fromString(String)}.
- * @param uri The URI to convert to string format
- * @return An unencoded string representation of the URI
- */
- public static String toUnencodedString(URI uri) {
- StringBuffer result = new StringBuffer();
- String scheme = uri.getScheme();
- if (scheme != null)
- result.append(scheme).append(':');
- //there is always a ssp
- result.append(uri.getSchemeSpecificPart());
- String fragment = uri.getFragment();
- if (fragment != null)
- result.append('#').append(fragment);
- return result.toString();
- }
-
- /**
- * Returns the URL as a URI. This method will handle broken URLs that are
- * not properly encoded (for example they contain unencoded space characters).
- */
- public static URI toURI(URL url) throws URISyntaxException {
- //URL behaves differently across platforms so for file: URLs we parse from string form
- if (SCHEME_FILE.equals(url.getProtocol())) {
- String pathString = url.toExternalForm().substring(5);
- //ensure there is a leading slash to handle common malformed URLs such as file:c:/tmp
- if (pathString.indexOf('/') != 0)
- pathString = '/' + pathString;
- else if (pathString.startsWith(UNC_PREFIX) && !pathString.startsWith(UNC_PREFIX, 2)) {
- //URL encodes UNC path with two slashes, but URI uses four (see bug 207103)
- pathString = UNC_PREFIX + pathString;
- }
- return new URI(SCHEME_FILE, null, pathString, null);
- }
- try {
- return new URI(url.toExternalForm());
- } catch (URISyntaxException e) {
- //try multi-argument URI constructor to perform encoding
- return new URI(url.getProtocol(), url.getUserInfo(), url.getHost(), url.getPort(), url.getPath(), url.getQuery(), url.getRef());
- }
- }
-
- /**
- * Returns a URI as a URL.
- *
- * @throws MalformedURLException
- */
- public static URL toURL(URI uri) throws MalformedURLException {
- return new URL(uri.toString());
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/Utils.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/Utils.java
deleted file mode 100644
index 2d21e13bb..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/Utils.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.utils;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.List;
-
-/*
- * This class was copied from org.eclipse.equinox.internal.frameworkadmin.utils
- * package of org.eclipse.equinox.frameworkadmin plugin on March 3 2007.
- *
- * The reason why it was copied is to make simpleconfigurator dependent on any
- * bundles(org.eclipse.equinox.framework).
- */
-
-public class Utils {
- private final static String PATH_SEP = "/"; //$NON-NLS-1$
-
- public static URL checkFullUrl(URL url, String urlName) throws IllegalArgumentException {//throws ManipulatorException {
- if (url == null)
- throw new IllegalArgumentException(urlName + " is null");
- if (!url.getProtocol().endsWith("file"))
- return url;
- File file = new File(url.getFile());
- if (!file.isAbsolute())
- throw new IllegalArgumentException(urlName + "(" + url + ") does not have absolute path");
- if (file.getAbsolutePath().startsWith(PATH_SEP))
- return url;
- try {
- return getUrl("file", null, PATH_SEP + file.getAbsolutePath());
- } catch (MalformedURLException e) {
- throw new IllegalArgumentException(urlName + "(" + "file:" + PATH_SEP + file.getAbsolutePath() + ") is not fully quallified");
- }
- }
-
- public static void deleteDir(File file) throws IOException {
- if (file.isFile()) {
- if (!file.delete())
- throw new IOException("Fail to delete File(" + file.getAbsolutePath() + ")");
- return;
- }
- File[] children = file.listFiles();
- for (int i = 0; i < children.length; i++) {
- deleteDir(children[i]);
- }
- if (!file.delete())
- throw new IOException("Fail to delete Dir(" + file.getAbsolutePath() + ")");
- return;
- }
-
- public static BundleInfo[] getBundleInfosFromList(List list) {
- if (list == null)
- return new BundleInfo[0];
- BundleInfo[] ret = new BundleInfo[list.size()];
- list.toArray(ret);
- return ret;
- }
-
- public static URL getUrl(String protocol, String host, String file) throws MalformedURLException {// throws ManipulatorException {
- file = Utils.replaceAll(file, File.separator, "/");
- return new URL(protocol, host, file);
- }
-
- public static String removeLastCh(String target, char ch) {
- while (target.charAt(target.length() - 1) == ch) {
- target = target.substring(0, target.length() - 1);
- }
- return target;
- }
-
- public static String replaceAll(String st, String oldSt, String newSt) {
- int index = -1;
- while ((index = st.indexOf(oldSt)) != -1) {
- st = st.substring(0, index) + newSt + st.substring(index + oldSt.length());
- }
- return st;
- }
-
- public static void log(int level, Object obj, String method, String message, Throwable e) {
- String msg = "";
- if (method == null) {
- if (obj != null)
- msg = "(" + obj.getClass().getName() + ")";
- } else if (obj == null)
- msg = "[" + method + "]" + message;
- else
- msg = "[" + method + "](" + obj.getClass().getName() + ")";
- msg += message;
-
-// if (LogService logService = Activator.getLogService();
-// if (logService != null) {
-// logService.log(level, msg, e);
-// } else {
- String levelSt = null;
- if (level == 1)
- levelSt = "DEBUG";
- else if (level == 2)
- levelSt = "INFO";
- else if (level == 3)
- levelSt = "WARNING";
- else if (level == 4) {
- levelSt = "ERROR";
-// useLog = true;
- }
-// if (useLog) {
- System.err.println("[" + levelSt + "]" + msg);
- if (e != null)
- e.printStackTrace();
-// }
- }
-
- public static URL buildURL(String spec) throws MalformedURLException {
- if (spec == null)
- throw new NullPointerException("URL spec is null."); //$NON-NLS-1$
- // Construct the URL carefully so as to preserve UNC paths etc.
- if (spec.startsWith("file:")) { //$NON-NLS-1$
- // need to do this for UNC paths
- File file = new File(spec.substring(5));
- if (file.isAbsolute())
- return file.toURL();
- }
- return new URL(spec);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/.cvsignore b/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/.cvsignore
deleted file mode 100644
index 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 8f8669add..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Thu Mar 12 11:04:59 PDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/META-INF/MANIFEST.MF b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/META-INF/MANIFEST.MF
deleted file mode 100644
index 789636ca3..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: RCP Mail (Cloud Update Example)
-Bundle-SymbolicName: org.eclipse.equinox.p2.examples.rcp.cloud; singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.p2.examples.rcp.cloud.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
- org.eclipse.core.runtime,
- org.eclipse.equinox.p2.operations;bundle-version="2.0.0",
- org.eclipse.equinox.p2.ui;bundle-version="2.0.0",
- org.eclipse.equinox.p2.metadata;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata.repository;bundle-version="1.0.0",
- org.eclipse.equinox.p2.artifact.repository;bundle-version="1.1.0",
- org.eclipse.equinox.p2.extensionlocation;bundle-version="1.0.100",
- org.eclipse.equinox.p2.updatesite;bundle-version="1.0.0",
- org.eclipse.equinox.p2.director;bundle-version="2.0.0",
- org.eclipse.equinox.p2.engine;bundle-version="2.0.0",
- org.eclipse.equinox.p2.core;bundle-version="2.0.0",
- org.eclipse.ecf;bundle-version="3.0.0",
- org.eclipse.ecf.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.identity;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer.httpclient;bundle-version="3.0.0",
- org.apache.commons.codec;bundle-version="1.2.0",
- org.apache.commons.httpclient;bundle-version="3.0.1",
- org.eclipse.equinox.p2.ui.sdk.scheduler;bundle-version="1.0.0",
- org.eclipse.equinox.ds;bundle-version="1.2.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/build.properties b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/build.properties
deleted file mode 100644
index 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 a95f241f8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="RCP Mail Example (Cloud Update)" id="org.eclipse.equinox.p2.examples.rcp.cloud.product" application="org.eclipse.equinox.p2.examples.rcp.cloud.application" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="true">
-
- <aboutInfo>
- <image path="product_lg.gif"/>
- <text>
- RCP Mail template created by PDE
- </text>
- </aboutInfo>
-
- <configIni use="default">
- </configIni>
-
- <launcherArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <windowImages i16="icons/sample2.gif"/>
-
- <splash
- location="org.eclipse.equinox.p2.examples.rcp.cloud" />
- <launcher name="cloud">
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- <plugin id="com.ibm.icu"/>
- <plugin id="org.apache.commons.codec"/>
- <plugin id="org.apache.commons.httpclient"/>
- <plugin id="org.apache.commons.logging"/>
- <plugin id="org.eclipse.core.commands"/>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.databinding"/>
- <plugin id="org.eclipse.core.databinding.observable"/>
- <plugin id="org.eclipse.core.databinding.property"/>
- <plugin id="org.eclipse.core.expressions"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.runtime"/>
- <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
- <plugin id="org.eclipse.ecf"/>
- <plugin id="org.eclipse.ecf.filetransfer"/>
- <plugin id="org.eclipse.ecf.identity"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.ds"/>
- <plugin id="org.eclipse.equinox.event"/>
- <plugin id="org.eclipse.equinox.frameworkadmin"/>
- <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
- <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
- <plugin id="org.eclipse.equinox.p2.core"/>
- <plugin id="org.eclipse.equinox.p2.director"/>
- <plugin id="org.eclipse.equinox.p2.directorywatcher"/>
- <plugin id="org.eclipse.equinox.p2.discovery"/>
- <plugin id="org.eclipse.equinox.p2.discovery.compatibility"/>
- <plugin id="org.eclipse.equinox.p2.engine"/>
- <plugin id="org.eclipse.equinox.p2.examples.rcp.cloud"/>
- <plugin id="org.eclipse.equinox.p2.extensionlocation"/>
- <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
- <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
- <plugin id="org.eclipse.equinox.p2.metadata"/>
- <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
- <plugin id="org.eclipse.equinox.p2.operations"/>
- <plugin id="org.eclipse.equinox.p2.publisher"/>
- <plugin id="org.eclipse.equinox.p2.ql"/>
- <plugin id="org.eclipse.equinox.p2.repository"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
- <plugin id="org.eclipse.equinox.p2.ui"/>
- <plugin id="org.eclipse.equinox.p2.ui.discovery"/>
- <plugin id="org.eclipse.equinox.p2.ui.sdk.scheduler"/>
- <plugin id="org.eclipse.equinox.p2.updatechecker"/>
- <plugin id="org.eclipse.equinox.p2.updatesite"/>
- <plugin id="org.eclipse.equinox.preferences"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <plugin id="org.eclipse.equinox.security"/>
- <plugin id="org.eclipse.equinox.security.ui"/>
- <plugin id="org.eclipse.equinox.security.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
- <plugin id="org.eclipse.equinox.util"/>
- <plugin id="org.eclipse.help"/>
- <plugin id="org.eclipse.jface"/>
- <plugin id="org.eclipse.jface.databinding"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.services"/>
- <plugin id="org.eclipse.swt"/>
- <plugin id="org.eclipse.swt.gtk.linux.x86" fragment="true"/>
- <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.ui"/>
- <plugin id="org.eclipse.ui.browser"/>
- <plugin id="org.eclipse.ui.workbench"/>
- <plugin id="org.sat4j.core"/>
- <plugin id="org.sat4j.pb"/>
- </plugins>
-
-
-</product>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.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 db4288806..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.p2.ui.InstalledSoftwarePage"
- id="10.org.eclipse.equinox.p2.examples.rcp.cloud.InstalledSoftwarePage">
- </page>
- <page
- name="%installHistoryPage"
- class="org.eclipse.equinox.p2.ui.RevertProfilePage"
- id="11.org.eclipse.equinox.p2.examples.rcp.cloud.RevertProfilePage">
- </page>
-
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- name="%Update.command"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.command.update">
- </command>
- <command
- name="%Install.command"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.command.install">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.command.update"
- class="org.eclipse.equinox.p2.examples.rcp.cloud.p2.UpdateHandler">
- </handler>
- <handler
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.command.install"
- class="org.eclipse.equinox.p2.examples.rcp.cloud.p2.InstallNewSoftwareHandler">
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="menu:tools?after=additions">
- <command
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.command.update"
- mnemonic="%Update.command.mnemonic"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.menu.update">
- </command>
-
- </menuContribution>
- <menuContribution
- locationURI="menu:tools?after=org.eclipse.equinox.p2.examples.rcp.cloud.menu.update">
- <command
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.command.install"
- mnemonic="%Install.command.mnemonic"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.menu.install">
- </command>
- </menuContribution>
- </extension>
-
-</plugin>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/pom.xml b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/pom.xml
deleted file mode 100644
index 9e60cbe1e..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.examples.rcp.cloud</artifactId>
- <version>1.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/product_lg.gif b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/product_lg.gif
deleted file mode 100644
index bd95e283f..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/product_lg.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/splash.bmp b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/splash.bmp
deleted file mode 100644
index d7d2e3032..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/splash.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Activator.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Activator.java
deleted file mode 100644
index c0589471a..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Activator.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.equinox.p2.examples.rcp.cloud.p2.CloudPolicy;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.examples.rcp.cloud";
-
- // The shared instance
- private static Activator plugin;
-
- ServiceRegistration policyRegistration;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- /// XXX register the p2 UI policy
- registerP2Policy(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- // XXX unregister the UI policy
- policyRegistration.unregister();
- policyRegistration = null;
- super.stop(context);
-
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- private void registerP2Policy(BundleContext context) {
- policyRegistration = context.registerService(Policy.class.getName(), new CloudPolicy(), null);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.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 c5b754f93..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/CloudPolicy.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.cloud.p2;
-
-import org.eclipse.equinox.p2.ui.Policy;
-
-/**
- * CloudPolicy defines the RCP Cloud Example policies for the p2 UI. The policy
- * is registered as an OSGi service when the example bundle starts.
- *
- * @since 3.5
- */
-public class CloudPolicy extends Policy {
- public CloudPolicy() {
- // XXX User has no visibility for repos
- setRepositoriesVisible(false);
-
- // XXX Default view is by category
- setGroupByCategory(true);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java
deleted file mode 100644
index 06643cca1..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.cloud.p2;
-
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-
-/**
- * InstallNewSoftwareHandler invokes the install wizard
- *
- * @since 3.5
- */
-public class InstallNewSoftwareHandler extends PreloadingRepositoryHandler {
-
- /**
- * The constructor.
- */
- public InstallNewSoftwareHandler() {
- super();
- }
-
- protected void doExecute(LoadMetadataRepositoryJob job) {
- getProvisioningUI().openInstallWizard(null, null, job);
- }
-
- protected boolean waitForPreload() {
- // If the user cannot see repositories, then we may as well wait
- // for existing repos to load so that content is available.
- // If the user can manipulate the repositories, then we don't wait,
- // because we don't know which ones they want to work with.
- return !getProvisioningUI().getPolicy().getRepositoriesVisible();
- }
-
- protected void setLoadJobProperties(Job loadJob) {
- super.setLoadJobProperties(loadJob);
- // If we are doing a background load, we do not wish to authenticate, as the
- // user is unaware that loading was needed
- if (!waitForPreload()) {
- loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_AUTHENTICATION_JOB_MARKER, Boolean.toString(true));
- loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_REPOSITORY_EVENTS, Boolean.toString(true));
- }
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java
deleted file mode 100644
index a4c4710a2..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.cloud.p2;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * PreloadingRepositoryHandler provides background loading of
- * repositories before executing the provisioning handler.
- *
- * @since 3.5
- */
-abstract class PreloadingRepositoryHandler extends AbstractHandler {
-
- /**
- * The constructor.
- */
- public PreloadingRepositoryHandler() {
- // constructor
- }
-
- /**
- * Execute the command.
- */
- public Object execute(ExecutionEvent event) {
- doExecuteAndLoad();
- return null;
- }
-
- void doExecuteAndLoad() {
- if (preloadRepositories()) {
- //cancel any load that is already running
- Job.getJobManager().cancel(LoadMetadataRepositoryJob.LOAD_FAMILY);
- final LoadMetadataRepositoryJob loadJob = new LoadMetadataRepositoryJob(getProvisioningUI());
- setLoadJobProperties(loadJob);
- if (waitForPreload()) {
- loadJob.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- if (PlatformUI.isWorkbenchRunning())
- if (event.getResult().isOK()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- doExecute(loadJob);
- }
- });
- }
- }
- });
- loadJob.setUser(true);
- loadJob.schedule();
-
- } else {
- loadJob.setSystem(true);
- loadJob.setUser(false);
- loadJob.schedule();
- doExecute(null);
- }
- } else {
- doExecute(null);
- }
- }
-
- protected abstract void doExecute(LoadMetadataRepositoryJob job);
-
- protected boolean preloadRepositories() {
- return true;
- }
-
- protected boolean waitForPreload() {
- return true;
- }
-
- protected void setLoadJobProperties(Job loadJob) {
- loadJob.setProperty(LoadMetadataRepositoryJob.ACCUMULATE_LOAD_ERRORS, Boolean.toString(true));
- }
-
- protected ProvisioningUI getProvisioningUI() {
- return ProvisioningUI.getDefaultUI();
- }
-
- /**
- * Return a shell appropriate for parenting dialogs of this handler.
- * @return a Shell
- */
- protected Shell getShell() {
- return PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java
deleted file mode 100644
index e484212a0..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.cloud.p2;
-
-import org.eclipse.equinox.internal.p2.ui.dialogs.UpdateSingleIUWizard;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.jface.wizard.WizardDialog;
-
-/**
- * UpdateHandler invokes the check for updates UI
- *
- * @since 3.4
- */
-public class UpdateHandler extends PreloadingRepositoryHandler {
-
- boolean hasNoRepos = false;
-
- protected void doExecute(LoadMetadataRepositoryJob job) {
- if (hasNoRepos) {
- return;
- }
- UpdateOperation operation = getProvisioningUI().getUpdateOperation(null, null);
- // check for updates
- operation.resolveModal(null);
- if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
- if (UpdateSingleIUWizard.validFor(operation)) {
- // Special case for only updating a single root
- UpdateSingleIUWizard wizard = new UpdateSingleIUWizard(getProvisioningUI(), operation);
- WizardDialog dialog = new WizardDialog(getShell(), wizard);
- dialog.create();
- dialog.open();
- } else {
- // Open the normal version of the update wizard
- getProvisioningUI().openUpdateWizard(false, operation, job);
- }
- }
- }
-
- protected boolean preloadRepositories() {
- hasNoRepos = false;
- RepositoryTracker repoMan = getProvisioningUI().getRepositoryTracker();
- if (repoMan.getKnownRepositories(getProvisioningUI().getSession()).length == 0) {
- hasNoRepos = true;
- return false;
- }
- return super.preloadRepositories();
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/.project b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/.project
deleted file mode 100644
index 593704fe5..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/Build PrestartUpdate Example.launch b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/Build PrestartUpdate Example.launch
deleted file mode 100644
index d0ceb1341..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/Build PrestartUpdate Example.launch
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/buildProduct.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/buildProduct.xml}"/>
-<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
-</launchConfiguration>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/build.properties b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/build.properties
deleted file mode 100644
index 44358173c..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/build.properties
+++ /dev/null
@@ -1,119 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-product=/org.eclipse.equinox.p2.examples.rcp.prestartupdate/prestartupdate.product
-runPackager=true
-
-p2.gathering=true
- p2.metadata.repo=file:${builder}/repository
-p2.artifact.repo=file:${builder}/repository
-
-#Set the name of the archive that will result from the product build.
-#archiveNamePrefix=
-
-# The prefix that will be used in the generated archive.
-archivePrefix=eclipse
-
-# The location underwhich all of the build output will be collected.
-collectingFolder=${archivePrefix}
-
-# The list of {os, ws, arch} configurations to build. This
-# value is a '&' separated list of ',' separate triples. For example,
-# configs=win32,win32,x86 & linux,motif,x86
-# By default the value is *,*,*
-configs = win32, win32, x86
-#configs=win32, win32, x86 & \
-# linux, gtk, ppc &\
-# linux, gtk, x86 & \
-# linux, gtk, x86_64 & \
-# linux, motif, x86 & \
-# solaris, motif, sparc & \
-# solaris, gtk, sparc & \
-# aix, motif, ppc & \
-# hpux, motif, PA_RISC & \
-# macosx, carbon, ppc
-
-#Allow cycles involving at most one bundle that needs to be compiled with the rest being binary bundles.
-allowBinaryCycles = true
-
-# Type of build. Used in naming the build output. Typically this value is
-# one of I, N, M, S, ...
-buildType=I
-
-# ID of the build. Used in naming the build output.
-buildId=TestBuild
-
-# Label for the build. Used in naming the build output
-buildLabel=${buildType}.${buildId}
-
-# Timestamp for the build. Used in naming the build output
-timestamp=007
-
-#this property indicates whether the resolution should be done in development mode (i.e. ignore multiple bundles with singletons)
-resolution.devMode=false
-
-skipBase=true
-skipMaps=true
-skipFetch=true
-
-
-############# JAVA COMPILER OPTIONS ##############
-# For this example:
-# We specify the JRE locations for CDC-1.1/Foundation-1.1 and J2SE-1.5
-# because these are the required execution environments defined for the
-# bundles in the example.
-
-# The location of the Java jars to compile against. Typically the rt.jar for your JDK/JRE
-#bootclasspath=${java.home}/lib/rt.jar
-
-# If using an IBM VM, use
-#bootclasspath=${java.home}/lib/core.jar;${java.home}/lib/vm.jar
-
-# specific JRE locations to compile against. These values are used to compile bundles specifying a
-# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support
-#CDC-1.0/Foundation-1.0= /path/to/rt.jar
-CDC-1.1/Foundation-1.1=${java.home}/lib/rt.jar
-#OSGi/Minimum-1.0=
-#OSGi/Minimum-1.1=
-#JRE-1.1=
-#J2SE-1.2=
-#J2SE-1.3=
-#J2SE-1.4=
-J2SE-1.5=${java.home}/lib/rt.jar
-#JavaSE-1.6=
-#PersonalJava-1.1=
-#PersonalJava-1.2=
-#CDC-1.0/PersonalBasis-1.0=
-#CDC-1.0/PersonalJava-1.0=
-#CDC-1.1/PersonalBasis-1.1=
-#CDC-1.1/PersonalJava-1.1=
-
-# Specify the output format of the compiler log when eclipse jdt is used
-logExtension=.log
-
-# Whether or not to include debug info in the output jars
-javacDebugInfo=false
-
-# Whether or not to fail the build if there are compiler errors
-javacFailOnError=true
-
-# Enable or disable verbose mode of the compiler
-javacVerbose=true
-
-# Extra arguments for the compiler. These are specific to the java compiler being used.
-#compilerArg=
-
-# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties
-#javacSource=1.3
-
-# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties.
-#javacTarget=1.1
-
-
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/buildProduct.xml b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/buildProduct.xml
deleted file mode 100644
index 2f1b9a970..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/buildProduct.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<project default="main">
- <target name="main">
- <property name="baseLocation" value="${eclipse.home}"/>
- <!-- by default, check for deltapack co-located with eclipse -->
- <property name="deltapack" value="${eclipse.home}/../deltapack/eclipse"/>
-
- <!-- Check that we have a deltapack -->
- <available property="haveDeltaPack" file="${deltapack}"/>
- <fail unless="haveDeltaPack" message="The deltapack is required to build this product. Please edit buildProduct.xml or set the &quot;deltapack&quot; property." />
-
- <property name="builder" value="${basedir}" />
- <property name="buildDirectory" value="${basedir}/buildDirectory"/>
- <property name="pluginPath" value="${basedir}/..${path.separator}${deltapack}" />
- <property name="buildTempFolder" value="${buildDirectory}" />
-
- <ant antfile="${eclipse.pdebuild.scripts}/productBuild/productBuild.xml" />
-
- <move todir="${basedir}">
- <fileset dir="${buildDirectory}/I.TestBuild" includes="*.zip"/>
- </move>
-
- <!-- refresh the workspace -->
- <eclipse.convertPath fileSystemPath="${basedir}" property="resourcePath"/>
- <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
- </target>
-</project> \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/readme.txt b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/readme.txt
deleted file mode 100644
index e0ab34ec4..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/readme.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-This project is a releng builder for the org.eclipse.equinox.p2.examples.rcp.prestartupdate project.
-
-1) This build requires 3.5M6 or later
-
-2) This build requires the deltapack. By default it looks beside the eclipse install for "deltapack/eclipse/*".
- If your deltapack is located elsewhere, set the "deltapack" property or edit the buildProduct.xml file. The
- version of the deltapack used should match the version of the eclipse that is running.
-
-3) Due to bug 268867, if the buildDirectory/buildRepo is deleted/cleaned, then the repo must also be removed from
- the workspace Available Software Sites preferences.
-
-4) Use the included launch config, or run buildProduct.xml as an ant build using the same JRE as the workspace
-
-5) The build.properties file specifically defines the JRE's for CDC-1.1/Foundation-1.1 and
- J2SE-1.5 because these are the required bundle execution environments in the example.
- The build should be run on a 1.5 VM. \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.classpath b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.project b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.project
deleted file mode 100644
index 1646bc9ad..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.examples.rcp.prestartupdate</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 92bb3f369..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Mon Mar 16 12:12:08 PDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/META-INF/MANIFEST.MF b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/META-INF/MANIFEST.MF
deleted file mode 100644
index 6ee61c3c6..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Prestartupdate
-Bundle-SymbolicName: org.eclipse.equinox.p2.examples.rcp.prestartupdate; singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.p2.examples.rcp.prestartupdate.Activator
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.equinox.p2.core,
- org.eclipse.equinox.p2.metadata,
- org.eclipse.equinox.p2.operations,
- org.eclipse.ecf;bundle-version="3.0.0",
- org.eclipse.ecf.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.identity;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer.httpclient;bundle-version="3.0.0",
- org.apache.commons.codec;bundle-version="1.2.0",
- org.apache.commons.httpclient;bundle-version="3.0.1"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/build.properties b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/build.properties
deleted file mode 100644
index bb0913764..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- product_lg.gif,\
- splash.bmp \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/mail.ico b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/mail.ico
deleted file mode 100644
index b00006113..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/mail.ico
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample.gif b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample.gif
deleted file mode 100644
index 34fb3c9d8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample.icns b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample.icns
deleted file mode 100644
index 1e92ccce1..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample.icns
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample2.gif b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample2.gif
deleted file mode 100644
index 252d7ebcb..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample2.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample3.gif b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample3.gif
deleted file mode 100644
index b949ac948..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample3.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/p2.inf b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/p2.inf
deleted file mode 100644
index 24aefb41a..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/p2.inf
+++ /dev/null
@@ -1,3 +0,0 @@
-instructions.configure=\
- addRepository(type:0,location:http${#58}//www.eclipse.org/equinox/p2/demos);\
- addRepository(type:1,location:http${#58}//www.eclipse.org/equinox/p2/demos); \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/plugin.xml b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/plugin.xml
deleted file mode 100644
index 283ed1da8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/plugin.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
- <extension
- id="application"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run
- class="org.eclipse.equinox.p2.examples.rcp.prestartupdate.Application">
- </run>
- </application>
- </extension>
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="RCP Perspective"
- class="org.eclipse.equinox.p2.examples.rcp.prestartupdate.Perspective"
- id="org.eclipse.equinox.p2.examples.rcp.prestartupdate.perspective">
- </perspective>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- name="Message"
- allowMultiple="true"
- icon="icons/sample2.gif"
- class="org.eclipse.equinox.p2.examples.rcp.prestartupdate.View"
- id="org.eclipse.equinox.p2.examples.rcp.prestartupdate.view">
- </view>
- <view
- name="Mailboxes"
- allowMultiple="true"
- icon="icons/sample3.gif"
- class="org.eclipse.equinox.p2.examples.rcp.prestartupdate.NavigationView"
- id="org.eclipse.equinox.p2.examples.rcp.prestartupdate.navigationView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <category
- name="Mail"
- id="org.eclipse.equinox.p2.examples.rcp.prestartupdate.category">
- </category>
- <command
- name="Open Mailbox"
- description="Opens a mailbox"
- categoryId="org.eclipse.equinox.p2.examples.rcp.prestartupdate.category"
- id="org.eclipse.equinox.p2.examples.rcp.prestartupdate.open">
- </command>
- <command
- name="Open Message Dialog"
- description="Open a message dialog"
- categoryId="org.eclipse.equinox.p2.examples.rcp.prestartupdate.category"
- id="org.eclipse.equinox.p2.examples.rcp.prestartupdate.openMessage">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.bindings">
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.prestartupdate.open"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+2">
- </key>
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.prestartupdate.openMessage"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+3">
- </key>
- <key
- commandId="org.eclipse.ui.file.exit"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+X">
- </key>
- </extension>
- <extension
- id="product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.eclipse.equinox.p2.examples.rcp.prestartupdate.application"
- name="RCP Product">
- <property
- name="aboutText"
- value="RCP Mail template created by PDE">
- </property>
- <property
- name="windowImages"
- value="icons/sample2.gif">
- </property>
- <property
- name="aboutImage"
- value="product_lg.gif">
- </property>
- </product>
- </extension>
-
-</plugin>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/pom.xml b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/pom.xml
deleted file mode 100644
index 4d4642a92..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.examples.rcp.prestartupdate</artifactId>
- <version>1.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/prestartupdate.product b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/prestartupdate.product
deleted file mode 100644
index 0ca301cd8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/prestartupdate.product
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="RCP Mail Example (Pre-Startup Example)" id="org.eclipse.equinox.p2.examples.rcp.prestartupdate.product" application="org.eclipse.equinox.p2.examples.rcp.prestartupdate.application" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="true">
-
- <aboutInfo>
- <image path="product_lg.gif"/>
- <text>
- RCP Mail Example (Pre-Startup Example)
- </text>
- </aboutInfo>
-
- <configIni use="default">
- </configIni>
-
- <launcherArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <windowImages i16="icons/sample2.gif"/>
-
- <splash
- location="org.eclipse.equinox.p2.examples.rcp.prestartupdate" />
- <launcher name="prestartupdate">
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- <plugin id="com.ibm.icu"/>
- <plugin id="com.ibm.icu.source"/>
- <plugin id="org.apache.commons.codec"/>
- <plugin id="org.apache.commons.httpclient"/>
- <plugin id="org.apache.commons.logging"/>
- <plugin id="org.eclipse.core.commands"/>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.databinding"/>
- <plugin id="org.eclipse.core.databinding.observable"/>
- <plugin id="org.eclipse.core.databinding.property"/>
- <plugin id="org.eclipse.core.expressions"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.runtime"/>
- <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
- <plugin id="org.eclipse.ecf"/>
- <plugin id="org.eclipse.ecf.filetransfer"/>
- <plugin id="org.eclipse.ecf.identity"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.ds"/>
- <plugin id="org.eclipse.equinox.frameworkadmin"/>
- <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
- <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
- <plugin id="org.eclipse.equinox.p2.core"/>
- <plugin id="org.eclipse.equinox.p2.director"/>
- <plugin id="org.eclipse.equinox.p2.directorywatcher"/>
- <plugin id="org.eclipse.equinox.p2.engine"/>
- <plugin id="org.eclipse.equinox.p2.examples.rcp.prestartupdate"/>
- <plugin id="org.eclipse.equinox.p2.extensionlocation"/>
- <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
- <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
- <plugin id="org.eclipse.equinox.p2.metadata"/>
- <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
- <plugin id="org.eclipse.equinox.p2.operations"/>
- <plugin id="org.eclipse.equinox.p2.publisher"/>
- <plugin id="org.eclipse.equinox.p2.ql"/>
- <plugin id="org.eclipse.equinox.p2.repository"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.natives"/>
- <plugin id="org.eclipse.equinox.p2.updatesite"/>
- <plugin id="org.eclipse.equinox.preferences"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <plugin id="org.eclipse.equinox.security"/>
- <plugin id="org.eclipse.equinox.security.ui"/>
- <plugin id="org.eclipse.equinox.security.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
- <plugin id="org.eclipse.help"/>
- <plugin id="org.eclipse.jface"/>
- <plugin id="org.eclipse.jface.databinding"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.services"/>
- <plugin id="org.eclipse.swt"/>
- <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.ui"/>
- <plugin id="org.eclipse.ui.workbench"/>
- <plugin id="org.sat4j.core"/>
- <plugin id="org.sat4j.pb"/>
- </plugins>
-
- <configurations>
- <plugin id="org.eclipse.equinox.p2.examples.rcp.prestartupdate" autoStart="true" startLevel="5" />
- </configurations>
-
-</product>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/product_lg.gif b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/product_lg.gif
deleted file mode 100644
index bd95e283f..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/product_lg.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/splash.bmp b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/splash.bmp
deleted file mode 100644
index d7d2e3032..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/splash.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Activator.java b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Activator.java
deleted file mode 100644
index c005f61f7..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Activator.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.examples.rcp.prestartupdate";
-
- // The shared instance
- private static Activator plugin;
-
- // XXX Shared instance of bundle context
- static BundleContext bundleContext;
-
- // XXX services for starting bundles
- private static PackageAdmin packageAdmin = null;
- private static ServiceReference packageAdminRef = null;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- bundleContext = context;
-
- packageAdminRef = bundleContext.getServiceReference(PackageAdmin.class.getName());
- packageAdmin = (PackageAdmin) bundleContext.getService(packageAdminRef);
- }
-
- private static Bundle getBundle(String symbolicName) {
- if (packageAdmin == null)
- return null;
- Bundle[] bundles = packageAdmin.getBundles(symbolicName, null);
- if (bundles == null)
- return null;
- // Return the first bundle that is not installed or uninstalled
- for (int i = 0; i < bundles.length; i++) {
- if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) {
- return bundles[i];
- }
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Application.java b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Application.java
deleted file mode 100644
index 0f180eee9..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Application.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This class controls all aspects of the application's execution
- */
-public class Application implements IApplication {
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext context) {
- Display display = PlatformUI.createDisplay();
- try {
- int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
- if (returnCode == PlatformUI.RETURN_RESTART) {
- return IApplication.EXIT_RESTART;
- }
- return IApplication.EXIT_OK;
- } finally {
- display.dispose();
- }
- }
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
- public void stop() {
- final IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench == null)
- return;
- final Display display = workbench.getDisplay();
- display.syncExec(new Runnable() {
- public void run() {
- if (!display.isDisposed())
- workbench.close();
- }
- });
- }
-
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationActionBarAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationActionBarAdvisor.java
deleted file mode 100644
index 68f0ad7c4..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationActionBarAdvisor.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.ICoolBarManager;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.action.ToolBarContributionItem;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-
-/**
- * An action bar advisor is responsible for creating, adding, and disposing of the
- * actions added to a workbench window. Each window will be populated with
- * new actions.
- */
-public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
-
- // Actions - important to allocate these only in makeActions, and then use them
- // in the fill methods. This ensures that the actions aren't recreated
- // when fillActionBars is called with FILL_PROXY.
- private IWorkbenchAction exitAction;
- private IWorkbenchAction aboutAction;
- private IWorkbenchAction newWindowAction;
- private OpenViewAction openViewAction;
- private Action messagePopupAction;
-
-
- public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
- super(configurer);
- }
-
- protected void makeActions(final IWorkbenchWindow window) {
- // Creates the actions and registers them.
- // Registering is needed to ensure that key bindings work.
- // The corresponding commands keybindings are defined in the plugin.xml file.
- // Registering also provides automatic disposal of the actions when
- // the window is closed.
-
- exitAction = ActionFactory.QUIT.create(window);
- register(exitAction);
-
- aboutAction = ActionFactory.ABOUT.create(window);
- register(aboutAction);
-
- newWindowAction = ActionFactory.OPEN_NEW_WINDOW.create(window);
- register(newWindowAction);
-
- openViewAction = new OpenViewAction(window, "Open Another Message View", View.ID);
- register(openViewAction);
-
- messagePopupAction = new MessagePopupAction("Open Message", window);
- register(messagePopupAction);
- }
-
- protected void fillMenuBar(IMenuManager menuBar) {
- MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
- MenuManager helpMenu = new MenuManager("&Help", IWorkbenchActionConstants.M_HELP);
-
- menuBar.add(fileMenu);
- // Add a group marker indicating where action set menus will appear.
- menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
- menuBar.add(helpMenu);
-
- // File
- fileMenu.add(newWindowAction);
- fileMenu.add(new Separator());
- fileMenu.add(messagePopupAction);
- fileMenu.add(openViewAction);
- fileMenu.add(new Separator());
- fileMenu.add(exitAction);
-
- // Help
- helpMenu.add(aboutAction);
- }
-
- protected void fillCoolBar(ICoolBarManager coolBar) {
- IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
- coolBar.add(new ToolBarContributionItem(toolbar, "main"));
- toolbar.add(openViewAction);
- toolbar.add(messagePopupAction);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchAdvisor.java
deleted file mode 100644
index ee686a763..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchAdvisor.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.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() {
- final IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper
- .getService(Activator.bundleContext,
- IProvisioningAgent.SERVICE_NAME);
- if (agent == null) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "No provisioning agent found. This application is not set up for updates."));
- }
-
- // XXX check for updates before starting up.
- // If an update is performed, restart. Otherwise log
- // the status.
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- IStatus updateStatus = P2Util.checkForUpdates(agent, monitor);
- if (updateStatus.getCode() == UpdateOperation.STATUS_NOTHING_TO_UPDATE) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- MessageDialog.openInformation(null, "Updates", "No updates were found");
- }
- });
- }
- if (updateStatus.getSeverity() != IStatus.ERROR)
- PlatformUI.getWorkbench().restart();
- else
- LogHelper.log(updateStatus);
- }
- };
- try {
- new ProgressMonitorDialog(null).run(true, true, runnable);
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- } catch (InterruptedException e) {
- }
- }
-
- 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 cca8f3f7d..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/P2Util.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.operations.ProvisioningJob;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
-
-/**
- * This class shows an example for checking for updates and performing the
- * update synchronously. It is up to the caller to run this in a job if
- * a background update check is desired. This is a reasonable way to run an
- * operation when user intervention is not required. Another approach is
- * to separately perform the resolution and provisioning steps, deciding
- * whether to perform these synchronously or in a job.
- *
- * Any p2 operation can be run modally (synchronously), or the job
- * can be requested and scheduled by the caller.
- *
- * @see UpdateOperation#resolveModal(IProgressMonitor)
- * @see UpdateOperation#getResolveJob(IProgressMonitor)
- * @see UpdateOperation#getProvisioningJob(IProgressMonitor)
- */
-public class P2Util {
- // XXX Check for updates to this application and return a status.
- static IStatus checkForUpdates(IProvisioningAgent agent, IProgressMonitor monitor) throws OperationCanceledException {
- ProvisioningSession session = new ProvisioningSession(agent);
- // the default update operation looks for updates to the currently
- // running profile, using the default profile root marker. To change
- // which installable units are being updated, use the more detailed
- // constructors.
- UpdateOperation operation = new UpdateOperation(session);
- SubMonitor sub = SubMonitor.convert(monitor,
- "Checking for application updates...", 200);
- IStatus status = operation.resolveModal(sub.newChild(100));
- if (status.getCode() == UpdateOperation.STATUS_NOTHING_TO_UPDATE) {
- return status;
- }
- if (status.getSeverity() == IStatus.CANCEL)
- throw new OperationCanceledException();
-
- if (status.getSeverity() != IStatus.ERROR) {
- // More complex status handling might include showing the user what updates
- // are available if there are multiples, differentiating patches vs. updates, etc.
- // In this example, we simply update as suggested by the operation.
- ProvisioningJob job = operation.getProvisioningJob(null);
- status = job.runModal(sub.newChild(100));
- if (status.getSeverity() == IStatus.CANCEL)
- throw new OperationCanceledException();
- }
- return status;
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Perspective.java b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Perspective.java
deleted file mode 100644
index 244eca03c..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Perspective.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-
-public class Perspective implements IPerspectiveFactory {
-
- /**
- * The ID of the perspective as specified in the extension.
- */
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.prestartupdate.perspective";
-
- public void createInitialLayout(IPageLayout layout) {
- String editorArea = layout.getEditorArea();
- layout.setEditorAreaVisible(false);
-
- layout.addStandaloneView(NavigationView.ID, false, IPageLayout.LEFT, 0.25f, editorArea);
- IFolderLayout folder = layout.createFolder("messages", IPageLayout.TOP, 0.5f, editorArea);
- folder.addPlaceholder(View.ID + ":*");
- folder.addView(View.ID);
-
- layout.getViewLayout(NavigationView.ID).setCloseable(false);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/View.java b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/View.java
deleted file mode 100644
index 38be31690..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/View.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.part.ViewPart;
-
-public class View extends ViewPart {
-
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.prestartupdate.view";
-
- public void createPartControl(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- top.setLayout(layout);
- // top banner
- Composite banner = new Composite(top, SWT.NONE);
- banner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_BEGINNING, true, false));
- layout = new GridLayout();
- layout.marginHeight = 5;
- layout.marginWidth = 10;
- layout.numColumns = 2;
- banner.setLayout(layout);
-
- // setup bold font
- Font boldFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
-
- Label l = new Label(banner, SWT.WRAP);
- l.setText("Subject:");
- l.setFont(boldFont);
- l = new Label(banner, SWT.WRAP);
- l.setText("This is a message about the cool Eclipse RCP!");
-
- l = new Label(banner, SWT.WRAP);
- l.setText("From:");
- l.setFont(boldFont);
-
- final Link link = new Link(banner, SWT.NONE);
- link.setText("<a>nicole@mail.org</a>");
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- MessageDialog.openInformation(getSite().getShell(), "Not Implemented", "Imagine the address book or a new message being created now.");
- }
- });
-
- l = new Label(banner, SWT.WRAP);
- l.setText("Date:");
- l.setFont(boldFont);
- l = new Label(banner, SWT.WRAP);
- l.setText("10:34 am");
- // message contents
- Text text = new Text(top, SWT.MULTI | SWT.WRAP);
- text.setText("This RCP Application was generated from the PDE Plug-in Project wizard. This sample shows how to:\n"+
- "- add a top-level menu and toolbar with actions\n"+
- "- add keybindings to actions\n" +
- "- create views that can't be closed and\n"+
- " multiple instances of the same view\n"+
- "- perspectives with placeholders for new views\n"+
- "- use the default about dialog\n"+
- "- create a product definition\n");
- text.setLayoutData(new GridData(GridData.FILL_BOTH));
- }
-
- public void setFocus() {
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.classpath b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.project b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.project
deleted file mode 100644
index 0b1635933..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 1be1d28ec..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Mon Mar 16 12:11:08 PDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/META-INF/MANIFEST.MF b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/META-INF/MANIFEST.MF
deleted file mode 100644
index 72b45e32f..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Sdkbundlevisibility
-Bundle-SymbolicName: org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility; singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Localization: plugin
-Bundle-Activator: org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.Activator
-Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
- org.eclipse.core.runtime,
- org.eclipse.equinox.ds,
- org.eclipse.equinox.p2.operations;bundle-version="2.0.0",
- org.eclipse.equinox.p2.ui;bundle-version="2.0.0",
- org.eclipse.equinox.p2.metadata;bundle-version="1.0.0",
- org.eclipse.equinox.p2.metadata.repository;bundle-version="1.0.0",
- org.eclipse.equinox.p2.artifact.repository;bundle-version="1.0.0",
- org.eclipse.equinox.p2.extensionlocation;bundle-version="1.0.100",
- org.eclipse.equinox.p2.updatesite;bundle-version="1.0.0",
- org.eclipse.equinox.p2.director;bundle-version="1.0.100",
- org.eclipse.equinox.p2.engine;bundle-version="1.0.100",
- org.eclipse.equinox.p2.core;bundle-version="1.0.100",
- org.eclipse.ecf;bundle-version="3.0.0",
- org.eclipse.ecf.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.identity;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer.httpclient;bundle-version="3.0.0",
- org.apache.commons.codec;bundle-version="1.2.0",
- org.apache.commons.httpclient;bundle-version="3.0.1"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Service-Component: OSGI-INF/policy_component.xml
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/OSGI-INF/policy_component.xml b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/OSGI-INF/policy_component.xml
deleted file mode 100644
index adb20bed6..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/OSGI-INF/policy_component.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.policy">
- <implementation class="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2.AllIUsAreVisiblePolicy"/>
- <service>
- <provide interface="org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy"/>
- </service>
- <property name="service.ranking" type="Integer" value="1000"/>
-</scr:component>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/build.properties b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/build.properties
deleted file mode 100644
index 91db6ad8f..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- product_lg.gif,\
- splash.bmp,\
- plugin.properties,\
- OSGI-INF/
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/mail.ico b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/mail.ico
deleted file mode 100644
index b00006113..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/mail.ico
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample.gif
deleted file mode 100644
index 34fb3c9d8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample.icns b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample.icns
deleted file mode 100644
index 1e92ccce1..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample.icns
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample2.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample2.gif
deleted file mode 100644
index 252d7ebcb..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample2.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample3.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample3.gif
deleted file mode 100644
index b949ac948..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample3.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/p2.inf b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/p2.inf
deleted file mode 100644
index 48f31a324..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/p2.inf
+++ /dev/null
@@ -1,3 +0,0 @@
-instructions.configure=\
- addRepository(type:0,location:http${#58}//www.eclipse.org/equinox/p2/testing/updateSite);\
- addRepository(type:1,location:http${#58}//www.eclipse.org/equinox/p2/testing/updateSite); \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.properties b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.properties
deleted file mode 100644
index 2dee9a537..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-#
-# RCP Mail Plug-in Resources
-#
-Update.command=Check for Updates
-Update.command.mnemonic=U
-Install.command=Install New Software...
-Install.command.mnemonic=S
-provisioningPrefPage = Install/Update
-sitesPrefPage = Available Software Sites
-installedSoftwarePage = Installed Software
-installHistoryPage = Installation History
-preferenceKeywords.general=automatic update schedule download site software install import bundle
-preferences=Update and Install Preferences \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.xml b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.xml
deleted file mode 100644
index 13964a440..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.xml
+++ /dev/null
@@ -1,183 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
- <extension
- id="application"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run
- class="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.Application">
- </run>
- </application>
- </extension>
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="RCP Perspective"
- class="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.Perspective"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.perspective">
- </perspective>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- name="Message"
- allowMultiple="true"
- icon="icons/sample2.gif"
- class="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.View"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.view">
- </view>
- <view
- name="Mailboxes"
- allowMultiple="true"
- icon="icons/sample3.gif"
- class="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.NavigationView"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.navigationView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <category
- name="Mail"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.category">
- </category>
- <command
- name="Open Mailbox"
- description="Opens a mailbox"
- categoryId="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.category"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.open">
- </command>
- <command
- name="Open Message Dialog"
- description="Open a message dialog"
- categoryId="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.category"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.openMessage">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.bindings">
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.open"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+2">
- </key>
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.openMessage"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+3">
- </key>
- <key
- commandId="org.eclipse.ui.file.exit"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+X">
- </key>
- </extension>
- <extension
- id="product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.application"
- name="RCP Product">
- <property
- name="aboutText"
- value="RCP Mail template created by PDE">
- </property>
- <property
- name="windowImages"
- value="icons/sample2.gif">
- </property>
- <property
- name="aboutImage"
- value="product_lg.gif">
- </property>
- </product>
- </extension>
- <extension
- point="org.eclipse.ui.installationPages">
- <page
- name="%installedSoftwarePage"
- class="org.eclipse.equinox.internal.provisional.p2.ui.dialogs.InstalledSoftwarePage"
- id="10.org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.InstalledSoftwarePage">
- </page>
- <page
- name="%installHistoryPage"
- class="org.eclipse.equinox.internal.provisional.p2.ui.dialogs.RevertProfilePage"
- id="11.org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.RevertProfilePage">
- </page>
-
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- name="%Update.command"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.command.update">
- </command>
- <command
- name="%Install.command"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.command.install">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- commandId="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.command.update"
- class="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2.UpdateHandler">
- </handler>
- <handler
- commandId="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.command.install"
- class="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2.InstallNewSoftwareHandler">
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="menu:tools?after=additions">
- <command
- commandId="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.command.update"
- mnemonic="%Update.command.mnemonic"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.menu.update">
- </command>
-
- </menuContribution>
- <menuContribution
- locationURI="menu:tools?after=org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.menu.update">
- <command
- commandId="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.command.install"
- mnemonic="%Install.command.mnemonic"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.menu.install">
- </command>
- </menuContribution>
- </extension>
-
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%provisioningPrefPage"
- class="org.eclipse.equinox.p2.ui.ProvisioningPreferencePage"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.ProvisioningPreferencePage">
- <keywordReference id="org.eclipse.equinox.p2.ui.sdk.updates.general"/>
- </page>
-
- <page
- name="%sitesPrefPage"
- category="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.ProvisioningPreferencePage"
- class="org.eclipse.equinox.p2.ui.RepositoryManipulationPage"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.SitesPreferencePage">
- <keywordReference id="org.eclipse.equinox.p2.ui.sdk.updates.general"/>
- </page>
-
- </extension>
-
- <extension
- point="org.eclipse.ui.keywords">
- <keyword
- label="%preferenceKeywords.general"
- id="org.eclipse.equinox.p2.ui.sdk.updates.general"/>
- </extension>
-
- <extension
- id="preferences" point="org.eclipse.core.runtime.preferences" name="%preferences">
- <initializer class="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.PreferenceInitializer"/>
- </extension>
-</plugin>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/pom.xml b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/pom.xml
deleted file mode 100644
index 0b27af10a..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility</artifactId>
- <version>1.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/product_lg.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/product_lg.gif
deleted file mode 100644
index bd95e283f..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/product_lg.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/sdkbundlevisibility.product b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/sdkbundlevisibility.product
deleted file mode 100644
index c791093f9..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/sdkbundlevisibility.product
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="RCP Mail Example (Bundle Visibility Update Example)" id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.product" application="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.application" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="true">
-
- <aboutInfo>
- <image path="product_lg.gif"/>
- <text>
- RCP Mail Example (Bundle Visibility Update Example)
- </text>
- </aboutInfo>
-
- <configIni use="default">
- </configIni>
-
- <launcherArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <windowImages i16="icons/sample2.gif"/>
-
- <splash
- location="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility" />
- <launcher name="sdkbundlevisibility">
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- <plugin id="com.ibm.icu"/>
- <plugin id="org.apache.commons.codec"/>
- <plugin id="org.apache.commons.httpclient"/>
- <plugin id="org.apache.commons.logging"/>
- <plugin id="org.eclipse.core.commands"/>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.databinding"/>
- <plugin id="org.eclipse.core.databinding.observable"/>
- <plugin id="org.eclipse.core.databinding.property"/>
- <plugin id="org.eclipse.core.expressions"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.runtime"/>
- <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
- <plugin id="org.eclipse.ecf"/>
- <plugin id="org.eclipse.ecf.filetransfer"/>
- <plugin id="org.eclipse.ecf.identity"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.ds"/>
- <plugin id="org.eclipse.equinox.frameworkadmin"/>
- <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
- <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
- <plugin id="org.eclipse.equinox.p2.core"/>
- <plugin id="org.eclipse.equinox.p2.director"/>
- <plugin id="org.eclipse.equinox.p2.directorywatcher"/>
- <plugin id="org.eclipse.equinox.p2.engine"/>
- <plugin id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility"/>
- <plugin id="org.eclipse.equinox.p2.exemplarysetup" fragment=""/>
- <plugin id="org.eclipse.equinox.p2.extensionlocation"/>
- <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
- <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
- <plugin id="org.eclipse.equinox.p2.metadata"/>
- <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
- <plugin id="org.eclipse.equinox.p2.operations"/>
- <plugin id="org.eclipse.equinox.p2.publisher"/>
- <plugin id="org.eclipse.equinox.p2.ql"/>
- <plugin id="org.eclipse.equinox.p2.repository"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
- <plugin id="org.eclipse.equinox.p2.ui"/>
- <plugin id="org.eclipse.equinox.p2.ui.sdk.scheduler"/>
- <plugin id="org.eclipse.equinox.p2.updatechecker"/>
- <plugin id="org.eclipse.equinox.p2.updatesite"/>
- <plugin id="org.eclipse.equinox.preferences"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <plugin id="org.eclipse.equinox.security"/>
- <plugin id="org.eclipse.equinox.security.macosx" fragment="true"/>
- <plugin id="org.eclipse.equinox.security.ui"/>
- <plugin id="org.eclipse.equinox.security.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
- <plugin id="org.eclipse.equinox.util"/>
- <plugin id="org.eclipse.help"/>
- <plugin id="org.eclipse.jface"/>
- <plugin id="org.eclipse.jface.databinding"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.services"/>
- <plugin id="org.eclipse.swt"/>
- <plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/>
- <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.ui"/>
- <plugin id="org.eclipse.ui.cocoa" fragment="true"/>
- <plugin id="org.eclipse.ui.workbench"/>
- <plugin id="org.sat4j.core"/>
- <plugin id="org.sat4j.pb"/>
- </plugins>
-
-
-</product>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/splash.bmp b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/splash.bmp
deleted file mode 100644
index d7d2e3032..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/splash.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Activator.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Activator.java
deleted file mode 100644
index 0141e950a..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Activator.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Application.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Application.java
deleted file mode 100644
index 2fb79727e..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Application.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This class controls all aspects of the application's execution
- */
-public class Application implements IApplication {
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext context) {
- Display display = PlatformUI.createDisplay();
- try {
- int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
- if (returnCode == PlatformUI.RETURN_RESTART) {
- return IApplication.EXIT_RESTART;
- }
- return IApplication.EXIT_OK;
- } finally {
- display.dispose();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
- public void stop() {
- final IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench == null)
- return;
- final Display display = workbench.getDisplay();
- display.syncExec(new Runnable() {
- public void run() {
- if (!display.isDisposed())
- workbench.close();
- }
- });
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationActionBarAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationActionBarAdvisor.java
deleted file mode 100644
index 86b3594f2..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationActionBarAdvisor.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.ICoolBarManager;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.action.ToolBarContributionItem;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-
-/**
- * An action bar advisor is responsible for creating, adding, and disposing of the
- * actions added to a workbench window. Each window will be populated with
- * new actions.
- */
-public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
-
- // Actions - important to allocate these only in makeActions, and then use them
- // in the fill methods. This ensures that the actions aren't recreated
- // when fillActionBars is called with FILL_PROXY.
- private IWorkbenchAction exitAction;
- private IWorkbenchAction aboutAction;
- private IWorkbenchAction newWindowAction;
- // XXX we want to show preferences
- private IWorkbenchAction preferencesAction;
- private OpenViewAction openViewAction;
- private Action messagePopupAction;
-
- public static final String M_TOOLS = "tools";
-
-
- public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
- super(configurer);
- }
-
- protected void makeActions(final IWorkbenchWindow window) {
- // Creates the actions and registers them.
- // Registering is needed to ensure that key bindings work.
- // The corresponding commands keybindings are defined in the plugin.xml file.
- // Registering also provides automatic disposal of the actions when
- // the window is closed.
-
- exitAction = ActionFactory.QUIT.create(window);
- register(exitAction);
-
- aboutAction = ActionFactory.ABOUT.create(window);
- register(aboutAction);
-
- // XXX we want to show auto update preferences
- preferencesAction = ActionFactory.PREFERENCES.create(window);
- register(preferencesAction);
-
- newWindowAction = ActionFactory.OPEN_NEW_WINDOW.create(window);
- register(newWindowAction);
-
- openViewAction = new OpenViewAction(window, "Open Another Message View", View.ID);
- register(openViewAction);
-
- messagePopupAction = new MessagePopupAction("Open Message", window);
- register(messagePopupAction);
- }
-
- protected void fillMenuBar(IMenuManager menuBar) {
- MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
- // XXX add a tools menu
- MenuManager toolsMenu = new MenuManager("&Tools", M_TOOLS);
- MenuManager helpMenu = new MenuManager("&Help", IWorkbenchActionConstants.M_HELP);
-
- menuBar.add(fileMenu);
- menuBar.add(toolsMenu);
- // Add a group marker indicating where action set menus will appear.
- menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
- menuBar.add(helpMenu);
-
- // File
- fileMenu.add(newWindowAction);
- fileMenu.add(new Separator());
- fileMenu.add(messagePopupAction);
- fileMenu.add(openViewAction);
- fileMenu.add(new Separator());
- fileMenu.add(exitAction);
-
- // XXX add preferences to tools
- toolsMenu.add(preferencesAction);
- toolsMenu.add(new Separator());
- toolsMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
-
- // Help
- helpMenu.add(aboutAction);
- }
-
- protected void fillCoolBar(ICoolBarManager coolBar) {
- IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
- coolBar.add(new ToolBarContributionItem(toolbar, "main"));
- toolbar.add(openViewAction);
- toolbar.add(messagePopupAction);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationWorkbenchAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationWorkbenchAdvisor.java
deleted file mode 100644
index ce56de956..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationWorkbenchAdvisor.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchAdvisor;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-/**
- * This workbench advisor creates the window advisor, and specifies
- * the perspective id for the initial window.
- */
-public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
-
- public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- return new ApplicationWorkbenchWindowAdvisor(configurer);
- }
-
- public String getInitialWindowPerspectiveId() {
- return Perspective.ID;
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationWorkbenchWindowAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationWorkbenchWindowAdvisor.java
deleted file mode 100644
index 2f512930a..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationWorkbenchWindowAdvisor.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
-
- public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- super(configurer);
- }
-
- public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
- return new ApplicationActionBarAdvisor(configurer);
- }
-
- public void preWindowOpen() {
- IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
- configurer.setInitialSize(new Point(600, 400));
- configurer.setShowCoolBar(true);
- // XXX Set the status line and progress indicator so that update
- // information can be shown there
- configurer.setShowStatusLine(true);
- configurer.setShowProgressIndicator(true);
-
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ICommandIds.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ICommandIds.java
deleted file mode 100644
index 96e8172ef..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ICommandIds.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-/**
- * Interface defining the application's command IDs.
- * Key bindings can be defined for specific commands.
- * To associate an action with a command, use IAction.setActionDefinitionId(commandId).
- *
- * @see org.eclipse.jface.action.IAction#setActionDefinitionId(String)
- */
-public interface ICommandIds {
-
- public static final String CMD_OPEN = "org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.open";
- public static final String CMD_OPEN_MESSAGE = "org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.openMessage";
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/MessagePopupAction.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/MessagePopupAction.java
deleted file mode 100644
index a9a83e99c..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/MessagePopupAction.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-public class MessagePopupAction extends Action {
-
- private final IWorkbenchWindow window;
-
- MessagePopupAction(String text, IWorkbenchWindow window) {
- super(text);
- this.window = window;
- // The id is used to refer to the action in a menu or toolbar
- setId(ICommandIds.CMD_OPEN_MESSAGE);
- // Associate the action with a pre-defined command, to allow key bindings.
- setActionDefinitionId(ICommandIds.CMD_OPEN_MESSAGE);
- setImageDescriptor(org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.Activator.getImageDescriptor("/icons/sample3.gif"));
- }
-
- public void run() {
- MessageDialog.openInformation(window.getShell(), "Open", "Open Message Dialog!");
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/NavigationView.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/NavigationView.java
deleted file mode 100644
index 87949a3bc..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/NavigationView.java
+++ /dev/null
@@ -1,151 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.ViewPart;
-
-public class NavigationView extends ViewPart {
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.navigationView";
- private TreeViewer viewer;
-
- class TreeObject {
- private String name;
- private TreeParent parent;
-
- public TreeObject(String name) {
- this.name = name;
- }
- public String getName() {
- return name;
- }
- public void setParent(TreeParent parent) {
- this.parent = parent;
- }
- public TreeParent getParent() {
- return parent;
- }
- public String toString() {
- return getName();
- }
- }
-
- class TreeParent extends TreeObject {
- private ArrayList children;
- public TreeParent(String name) {
- super(name);
- children = new ArrayList();
- }
- public void addChild(TreeObject child) {
- children.add(child);
- child.setParent(this);
- }
- public void removeChild(TreeObject child) {
- children.remove(child);
- child.setParent(null);
- }
- public TreeObject[] getChildren() {
- return (TreeObject[]) children.toArray(new TreeObject[children.size()]);
- }
- public boolean hasChildren() {
- return children.size()>0;
- }
- }
-
- class ViewContentProvider implements IStructuredContentProvider,
- ITreeContentProvider {
-
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object parent) {
- return getChildren(parent);
- }
-
- public Object getParent(Object child) {
- if (child instanceof TreeObject) {
- return ((TreeObject)child).getParent();
- }
- return null;
- }
-
- public Object[] getChildren(Object parent) {
- if (parent instanceof TreeParent) {
- return ((TreeParent)parent).getChildren();
- }
- return new Object[0];
- }
-
- public boolean hasChildren(Object parent) {
- if (parent instanceof TreeParent)
- return ((TreeParent)parent).hasChildren();
- return false;
- }
- }
-
- class ViewLabelProvider extends LabelProvider {
-
- public String getText(Object obj) {
- return obj.toString();
- }
- public Image getImage(Object obj) {
- String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
- if (obj instanceof TreeParent)
- imageKey = ISharedImages.IMG_OBJ_FOLDER;
- return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
- }
- }
-
- /**
- * We will set up a dummy model to initialize tree heararchy. In real
- * code, you will connect to a real model and expose its hierarchy.
- */
- private TreeObject createDummyModel() {
- TreeObject to1 = new TreeObject("Inbox");
- TreeObject to2 = new TreeObject("Drafts");
- TreeObject to3 = new TreeObject("Sent");
- TreeParent p1 = new TreeParent("me@this.com");
- p1.addChild(to1);
- p1.addChild(to2);
- p1.addChild(to3);
-
- TreeObject to4 = new TreeObject("Inbox");
- TreeParent p2 = new TreeParent("other@aol.com");
- p2.addChild(to4);
-
- TreeParent root = new TreeParent("");
- root.addChild(p1);
- root.addChild(p2);
- return root;
- }
-
- /**
- * This is a callback that will allow us to create the viewer and initialize
- * it.
- */
- public void createPartControl(Composite parent) {
- viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- viewer.setContentProvider(new ViewContentProvider());
- viewer.setLabelProvider(new ViewLabelProvider());
- viewer.setInput(createDummyModel());
- }
-
- /**
- * Passing the focus request to the viewer's control.
- */
- public void setFocus() {
- viewer.getControl().setFocus();
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/OpenViewAction.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/OpenViewAction.java
deleted file mode 100644
index 162da81c3..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/OpenViewAction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-
-
-public class OpenViewAction extends Action {
-
- private final IWorkbenchWindow window;
- private int instanceNum = 0;
- private final String viewId;
-
- public OpenViewAction(IWorkbenchWindow window, String label, String viewId) {
- this.window = window;
- this.viewId = viewId;
- setText(label);
- // The id is used to refer to the action in a menu or toolbar
- setId(ICommandIds.CMD_OPEN);
- // Associate the action with a pre-defined command, to allow key bindings.
- setActionDefinitionId(ICommandIds.CMD_OPEN);
- setImageDescriptor(org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.Activator.getImageDescriptor("/icons/sample2.gif"));
- }
-
- public void run() {
- if(window != null) {
- try {
- window.getActivePage().showView(viewId, Integer.toString(instanceNum++), IWorkbenchPage.VIEW_ACTIVATE);
- } catch (PartInitException e) {
- MessageDialog.openError(window.getShell(), "Error", "Error opening view:" + e.getMessage());
- }
- }
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Perspective.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Perspective.java
deleted file mode 100644
index 08aefe17e..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Perspective.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-
-public class Perspective implements IPerspectiveFactory {
-
- /**
- * The ID of the perspective as specified in the extension.
- */
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.perspective";
-
- public void createInitialLayout(IPageLayout layout) {
- String editorArea = layout.getEditorArea();
- layout.setEditorAreaVisible(false);
-
- layout.addStandaloneView(NavigationView.ID, false, IPageLayout.LEFT, 0.25f, editorArea);
- IFolderLayout folder = layout.createFolder("messages", IPageLayout.TOP, 0.5f, editorArea);
- folder.addPlaceholder(View.ID + ":*");
- folder.addView(View.ID);
-
- layout.getViewLayout(NavigationView.ID).setCloseable(false);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/View.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/View.java
deleted file mode 100644
index 66f6584f9..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/View.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.part.ViewPart;
-
-public class View extends ViewPart {
-
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.view";
-
- public void createPartControl(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- top.setLayout(layout);
- // top banner
- Composite banner = new Composite(top, SWT.NONE);
- banner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_BEGINNING, true, false));
- layout = new GridLayout();
- layout.marginHeight = 5;
- layout.marginWidth = 10;
- layout.numColumns = 2;
- banner.setLayout(layout);
-
- // setup bold font
- Font boldFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
-
- Label l = new Label(banner, SWT.WRAP);
- l.setText("Subject:");
- l.setFont(boldFont);
- l = new Label(banner, SWT.WRAP);
- l.setText("This is a message about the cool Eclipse RCP!");
-
- l = new Label(banner, SWT.WRAP);
- l.setText("From:");
- l.setFont(boldFont);
-
- final Link link = new Link(banner, SWT.NONE);
- link.setText("<a>nicole@mail.org</a>");
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- MessageDialog.openInformation(getSite().getShell(), "Not Implemented", "Imagine the address book or a new message being created now.");
- }
- });
-
- l = new Label(banner, SWT.WRAP);
- l.setText("Date:");
- l.setFont(boldFont);
- l = new Label(banner, SWT.WRAP);
- l.setText("10:34 am");
- // message contents
- Text text = new Text(top, SWT.MULTI | SWT.WRAP);
- text.setText("This RCP Application was generated from the PDE Plug-in Project wizard. This sample shows how to:\n"+
- "- add a top-level menu and toolbar with actions\n"+
- "- add keybindings to actions\n" +
- "- create views that can't be closed and\n"+
- " multiple instances of the same view\n"+
- "- perspectives with placeholders for new views\n"+
- "- use the default about dialog\n"+
- "- create a product definition\n");
- text.setLayoutData(new GridData(GridData.FILL_BOTH));
- }
-
- public void setFocus() {
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/AllIUsAreVisiblePolicy.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/AllIUsAreVisiblePolicy.java
deleted file mode 100644
index 1c61138ce..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/AllIUsAreVisiblePolicy.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2;
-
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.equinox.p2.ui.Policy;
-
-/**
- * AllIUsAreVisiblePolicy redefines the IU visibility. In this
- * example, the policy is declared using OSGi declarative services.
- * The declaration is in the policy_component.xml file.
- *
- * @since 3.5
- */
-public class AllIUsAreVisiblePolicy extends Policy {
- public AllIUsAreVisiblePolicy() {
- // XXX Use the pref-based repository manipulator
- setRepositoryPreferencePageId(PreferenceConstants.PREF_PAGE_SITES);
-
- // XXX All available IU's should be shown, not just groups/features
- setVisibleAvailableIUQuery(QueryUtil.createIUAnyQuery());
- // XXX All installed IU's should be shown, not just the user-installed.
- setVisibleInstalledIUQuery(QueryUtil.createIUAnyQuery());
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/IProvSDKHelpContextIds.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/IProvSDKHelpContextIds.java
deleted file mode 100644
index eccbe3555..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/IProvSDKHelpContextIds.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2;
-
-/**
- * Help context ids for the P2 SDK
- * <p>
- * This interface contains constants only; it is not intended to be implemented
- * or extended.
- * </p>
- * @since 3.4
- */
-
-public interface IProvSDKHelpContextIds {
- // XXX Must match the id used in the help doc
- public static final String PREFIX = "org.eclipse.equinox.p2.ui.sdk"; //$NON-NLS-1$
-
- public static final String PROVISIONING_PREFERENCE_PAGE = PREFIX + "provisioning_preference_page_context"; //$NON-NLS-1$
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/InstallNewSoftwareHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/InstallNewSoftwareHandler.java
deleted file mode 100644
index 4432c07fa..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/InstallNewSoftwareHandler.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2;
-
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-
-/**
- * InstallNewSoftwareHandler invokes the install wizard
- *
- * @since 3.5
- */
-public class InstallNewSoftwareHandler extends PreloadingRepositoryHandler {
-
- /**
- * The constructor.
- */
- public InstallNewSoftwareHandler() {
- super();
- }
-
- protected void doExecute(LoadMetadataRepositoryJob job) {
- getProvisioningUI().openInstallWizard(null, null, job);
- }
-
- protected boolean waitForPreload() {
- // If the user cannot see repositories, then we may as well wait
- // for existing repos to load so that content is available.
- // If the user can manipulate the repositories, then we don't wait,
- // because we don't know which ones they want to work with.
- return !getProvisioningUI().getPolicy().getRepositoriesVisible();
- }
-
- protected void setLoadJobProperties(Job loadJob) {
- super.setLoadJobProperties(loadJob);
- // If we are doing a background load, we do not wish to authenticate, as the
- // user is unaware that loading was needed
- if (!waitForPreload()) {
- loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_AUTHENTICATION_JOB_MARKER, Boolean.toString(true));
- loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_REPOSITORY_EVENTS, Boolean.toString(true));
- }
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/Messages.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/Messages.java
deleted file mode 100644
index 5a480f75d..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/Messages.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2.messages"; //$NON-NLS-1$
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
- public static String UpdateHandler_NoSitesMessage;
- public static String UpdateHandler_NoSitesTitle;
- public static String ProvisioningPreferencePage_AlwaysOpenWizard;
- public static String ProvisioningPreferencePage_BrowsingPrefsGroup;
- public static String ProvisioningPreferencePage_ShowLatestVersions;
- public static String ProvisioningPreferencePage_ShowAllVersions;
- public static String ProvisioningPreferencePage_NeverOpenWizard;
- public static String ProvisioningPreferencePage_OpenWizardIfInvalid;
- public static String ProvisioningPreferencePage_PromptToOpenWizard;
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceConstants.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceConstants.java
deleted file mode 100644
index bd133104e..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceConstants.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2;
-
-/**
- * @since 3.6
- */
-public class PreferenceConstants {
- public static final String PREF_PAGE_PROVISIONING = "org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.ProvisioningPreferencePage"; //$NON-NLS-1$
- public static final String PREF_PAGE_SITES = "org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.SitesPreferencePage"; //$NON-NLS-1$
- public static final String PREF_SHOW_LATEST_VERSION = "showLatestVersion"; //$NON-NLS-1$
- public static final String PREF_OPEN_WIZARD_ON_ERROR_PLAN = "allowNonOKPlan"; //$NON-NLS-1$
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceInitializer.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceInitializer.java
deleted file mode 100644
index 858b04fd6..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceInitializer.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * @since 3.4
- */
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void initializeDefaultPreferences() {
- Preferences node = new DefaultScope().getNode("org.eclipse.equinox.p2.ui.sdk"); //$NON-NLS-1$
- node.putBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, true);
- node.put(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.PROMPT);
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreloadingRepositoryHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreloadingRepositoryHandler.java
deleted file mode 100644
index df8436790..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreloadingRepositoryHandler.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * PreloadingRepositoryHandler provides background loading of
- * repositories before executing the provisioning handler.
- *
- * @since 3.5
- */
-abstract class PreloadingRepositoryHandler extends AbstractHandler {
-
- /**
- * The constructor.
- */
- public PreloadingRepositoryHandler() {
- // constructor
- }
-
- /**
- * Execute the command.
- */
- public Object execute(ExecutionEvent event) {
- doExecuteAndLoad();
- return null;
- }
-
- void doExecuteAndLoad() {
- if (preloadRepositories()) {
- //cancel any load that is already running
- Job.getJobManager().cancel(LoadMetadataRepositoryJob.LOAD_FAMILY);
- final LoadMetadataRepositoryJob loadJob = new LoadMetadataRepositoryJob(getProvisioningUI());
- setLoadJobProperties(loadJob);
- if (waitForPreload()) {
- loadJob.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- if (PlatformUI.isWorkbenchRunning())
- if (event.getResult().isOK()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- doExecute(loadJob);
- }
- });
- }
- }
- });
- loadJob.setUser(true);
- loadJob.schedule();
-
- } else {
- loadJob.setSystem(true);
- loadJob.setUser(false);
- loadJob.schedule();
- doExecute(null);
- }
- } else {
- doExecute(null);
- }
- }
-
- protected abstract void doExecute(LoadMetadataRepositoryJob job);
-
- protected boolean preloadRepositories() {
- return true;
- }
-
- protected boolean waitForPreload() {
- return true;
- }
-
- protected void setLoadJobProperties(Job loadJob) {
- loadJob.setProperty(LoadMetadataRepositoryJob.ACCUMULATE_LOAD_ERRORS, Boolean.toString(true));
- }
-
- protected ProvisioningUI getProvisioningUI() {
- return ProvisioningUI.getDefaultUI();
- }
-
- /**
- * Return a shell appropriate for parenting dialogs of this handler.
- * @return a Shell
- */
- protected Shell getShell() {
- return PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/ProvisioningPreferencePage.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/ProvisioningPreferencePage.java
deleted file mode 100644
index b6cd2b8c4..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/ProvisioningPreferencePage.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.Activator;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Preference page for general provisioning preferences.
- *
- * @since 3.4
- */
-
-public class ProvisioningPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
- private Group browsingGroup, validateGroup;
- private Button showLatestRadio, showAllRadio;
- private Button alwaysShowFailedPlan, neverShowFailedPlan, promptOnFailedPlan;
-
- protected Control createContents(Composite parent) {
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IProvSDKHelpContextIds.PROVISIONING_PREFERENCE_PAGE);
-
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginWidth = layout.marginHeight = 0;
- container.setLayout(layout);
-
- // Group for show all versions vs. show latest
- browsingGroup = new Group(container, SWT.NONE);
- browsingGroup.setText(Messages.ProvisioningPreferencePage_BrowsingPrefsGroup);
- layout = new GridLayout();
- layout.numColumns = 3;
- browsingGroup.setLayout(layout);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- browsingGroup.setLayoutData(gd);
-
- showLatestRadio = new Button(browsingGroup, SWT.RADIO);
- showLatestRadio.setText(Messages.ProvisioningPreferencePage_ShowLatestVersions);
- gd = new GridData();
- gd.horizontalSpan = 3;
- showLatestRadio.setLayoutData(gd);
-
- showAllRadio = new Button(browsingGroup, SWT.RADIO);
- showAllRadio.setText(Messages.ProvisioningPreferencePage_ShowAllVersions);
- gd = new GridData();
- gd.horizontalSpan = 3;
- showAllRadio.setLayoutData(gd);
-
- //Group for validating a failed plan
- validateGroup = new Group(container, SWT.NONE);
- validateGroup.setText(Messages.ProvisioningPreferencePage_OpenWizardIfInvalid);
- layout = new GridLayout();
- layout.numColumns = 3;
- validateGroup.setLayout(layout);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- validateGroup.setLayoutData(gd);
-
- alwaysShowFailedPlan = new Button(validateGroup, SWT.RADIO);
- alwaysShowFailedPlan.setText(Messages.ProvisioningPreferencePage_AlwaysOpenWizard);
- gd = new GridData();
- gd.horizontalSpan = 3;
- alwaysShowFailedPlan.setLayoutData(gd);
-
- neverShowFailedPlan = new Button(validateGroup, SWT.RADIO);
- neverShowFailedPlan.setText(Messages.ProvisioningPreferencePage_NeverOpenWizard);
- gd = new GridData();
- gd.horizontalSpan = 3;
- neverShowFailedPlan.setLayoutData(gd);
-
- promptOnFailedPlan = new Button(validateGroup, SWT.RADIO);
- promptOnFailedPlan.setText(Messages.ProvisioningPreferencePage_PromptToOpenWizard);
- gd = new GridData();
- gd.horizontalSpan = 3;
- promptOnFailedPlan.setLayoutData(gd);
-
- initialize();
-
- Dialog.applyDialogFont(container);
- return container;
-
- }
-
- private void initialize() {
- Preferences pref = Activator.getDefault().getPluginPreferences();
- showLatestRadio.setSelection(pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
- showAllRadio.setSelection(!pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
- String openWizard = pref.getString(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN);
- alwaysShowFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.ALWAYS));
- neverShowFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.NEVER));
- promptOnFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.PROMPT));
- }
-
- protected void performDefaults() {
- super.performDefaults();
- Preferences pref = Activator.getDefault().getPluginPreferences();
- showLatestRadio.setSelection(pref.getDefaultBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
- showAllRadio.setSelection(!pref.getDefaultBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
- String openWizard = pref.getDefaultString(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN);
- alwaysShowFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.ALWAYS));
- neverShowFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.NEVER));
- promptOnFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.PROMPT));
- }
-
- public boolean performOk() {
- Preferences pref = Activator.getDefault().getPluginPreferences();
- pref.setValue(PreferenceConstants.PREF_SHOW_LATEST_VERSION, showLatestRadio.getSelection());
- if (alwaysShowFailedPlan.getSelection())
- pref.setValue(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.ALWAYS);
- else if (neverShowFailedPlan.getSelection())
- pref.setValue(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.NEVER);
- else
- pref.setValue(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.PROMPT);
-
- Activator.getDefault().savePluginPreferences();
- return true;
- }
-
- public void init(IWorkbench workbench) {
- // Nothing to do
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/UpdateHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/UpdateHandler.java
deleted file mode 100644
index 1883b78fc..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/UpdateHandler.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2;
-
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.jface.dialogs.MessageDialog;
-
-/**
- * UpdateHandler invokes the check for updates UI
- *
- * @since 3.4
- */
-public class UpdateHandler extends PreloadingRepositoryHandler {
-
- boolean hasNoRepos = false;
-
- protected void doExecute(LoadMetadataRepositoryJob job) {
- if (hasNoRepos) {
- if (getProvisioningUI().getPolicy().getRepositoriesVisible()) {
- boolean goToSites = MessageDialog.openQuestion(getShell(), Messages.UpdateHandler_NoSitesTitle, Messages.UpdateHandler_NoSitesMessage);
- if (goToSites) {
- getProvisioningUI().manipulateRepositories(getShell());
- }
- }
- return;
- }
- UpdateOperation operation = getProvisioningUI().getUpdateOperation(null, null);
- // check for updates
- operation.resolveModal(null);
- if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
- getProvisioningUI().openUpdateWizard(true, operation, job);
- }
- }
-
- protected boolean preloadRepositories() {
- hasNoRepos = false;
- RepositoryTracker repoMan = getProvisioningUI().getRepositoryTracker();
- if (repoMan.getKnownRepositories(getProvisioningUI().getSession()).length == 0) {
- hasNoRepos = true;
- return false;
- }
- return super.preloadRepositories();
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/messages.properties b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/messages.properties
deleted file mode 100644
index 3da5a90c0..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/messages.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-
-UpdateHandler_NoSitesMessage=There are no update sites to search. Do you wish to open the "Available Software Sites" preferences?
-UpdateHandler_NoSitesTitle=No Updates Found
-ProvisioningPreferencePage_AlwaysOpenWizard=&Open the wizard anyway to review or change selections
-ProvisioningPreferencePage_BrowsingPrefsGroup=Browsing for updates
-ProvisioningPreferencePage_ShowLatestVersions=Show only the &latest versions of available software
-ProvisioningPreferencePage_ShowAllVersions=Show all &versions of available software
-ProvisioningPreferencePage_NeverOpenWizard=&Report the problems and do not open the wizard
-ProvisioningPreferencePage_OpenWizardIfInvalid=When software selected for an install wizard may not be compatible
-ProvisioningPreferencePage_PromptToOpenWizard=&Ask me what to do when it happens
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.classpath b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.project b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.project
deleted file mode 100644
index ca9f8bc17..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 1fe1140c0..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Mon Mar 16 11:53:51 PDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/META-INF/MANIFEST.MF b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/META-INF/MANIFEST.MF
deleted file mode 100644
index d574720e3..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,27 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Sdknoautoupdates
-Bundle-SymbolicName: org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates; singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.Activator
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.equinox.p2.ui;bundle-version="2.0.0",
- org.eclipse.equinox.p2.metadata;bundle-version="1.0.0",
- org.eclipse.equinox.p2.metadata.repository;bundle-version="1.0.0",
- org.eclipse.equinox.p2.artifact.repository;bundle-version="1.0.0",
- org.eclipse.equinox.p2.extensionlocation;bundle-version="1.0.100",
- org.eclipse.equinox.p2.updatesite;bundle-version="1.0.0",
- org.eclipse.equinox.p2.director;bundle-version="1.0.100",
- org.eclipse.equinox.p2.engine;bundle-version="1.0.100",
- org.eclipse.equinox.p2.core;bundle-version="1.0.100",
- org.eclipse.ecf;bundle-version="3.0.0",
- org.eclipse.ecf.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.identity;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer.httpclient;bundle-version="3.0.0",
- org.apache.commons.codec;bundle-version="1.2.0",
- org.apache.commons.httpclient;bundle-version="3.0.1",
- org.eclipse.equinox.p2.ui.sdk;bundle-version="1.0.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/build.properties b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/build.properties
deleted file mode 100644
index 4b6aaf25b..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- product_lg.gif,\
- splash.bmp
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/mail.ico b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/mail.ico
deleted file mode 100644
index b00006113..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/mail.ico
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample.gif
deleted file mode 100644
index 34fb3c9d8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample.icns b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample.icns
deleted file mode 100644
index 1e92ccce1..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample.icns
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample2.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample2.gif
deleted file mode 100644
index 252d7ebcb..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample2.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample3.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample3.gif
deleted file mode 100644
index b949ac948..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample3.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/p2.inf b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/p2.inf
deleted file mode 100644
index 48f31a324..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/p2.inf
+++ /dev/null
@@ -1,3 +0,0 @@
-instructions.configure=\
- addRepository(type:0,location:http${#58}//www.eclipse.org/equinox/p2/testing/updateSite);\
- addRepository(type:1,location:http${#58}//www.eclipse.org/equinox/p2/testing/updateSite); \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/plugin.xml b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/plugin.xml
deleted file mode 100644
index e786d2934..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/plugin.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
- <extension
- id="application"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run
- class="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.Application">
- </run>
- </application>
- </extension>
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="RCP Perspective"
- class="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.Perspective"
- id="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.perspective">
- </perspective>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- name="Message"
- allowMultiple="true"
- icon="icons/sample2.gif"
- class="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.View"
- id="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.view">
- </view>
- <view
- name="Mailboxes"
- allowMultiple="true"
- icon="icons/sample3.gif"
- class="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.NavigationView"
- id="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.navigationView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <category
- name="Mail"
- id="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.category">
- </category>
- <command
- name="Open Mailbox"
- description="Opens a mailbox"
- categoryId="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.category"
- id="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.open">
- </command>
- <command
- name="Open Message Dialog"
- description="Open a message dialog"
- categoryId="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.category"
- id="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.openMessage">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.bindings">
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.open"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+2">
- </key>
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.openMessage"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+3">
- </key>
- <key
- commandId="org.eclipse.ui.file.exit"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+X">
- </key>
- </extension>
- <extension
- id="product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.application"
- name="RCP Product">
- <property
- name="aboutText"
- value="RCP Mail template created by PDE">
- </property>
- <property
- name="windowImages"
- value="icons/sample2.gif">
- </property>
- <property
- name="aboutImage"
- value="product_lg.gif">
- </property>
- </product>
- </extension>
-
-</plugin>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/product_lg.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/product_lg.gif
deleted file mode 100644
index bd95e283f..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/product_lg.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/sdknoautoupdates.product b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/sdknoautoupdates.product
deleted file mode 100644
index 09e70ab09..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/sdknoautoupdates.product
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="RCP Mail Example (No Automatic Updates)" id="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.product" application="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.application" version="1.0.0.qualifier" useFeatures="false">
-
- <aboutInfo>
- <image path="product_lg.gif"/>
- <text>
- RCP Mail Example (No Automatic Updates)
- </text>
- </aboutInfo>
-
- <configIni use="default">
- </configIni>
-
- <launcherArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <windowImages i16="icons/sample2.gif"/>
-
- <splash
- location="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates" />
- <launcher name="sdknoautoupdates">
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- <plugin id="com.ibm.icu"/>
- <plugin id="org.apache.commons.codec"/>
- <plugin id="org.apache.commons.httpclient"/>
- <plugin id="org.apache.commons.logging"/>
- <plugin id="org.eclipse.core.commands"/>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.databinding"/>
- <plugin id="org.eclipse.core.databinding.observable"/>
- <plugin id="org.eclipse.core.databinding.property"/>
- <plugin id="org.eclipse.core.expressions"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.runtime"/>
- <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
- <plugin id="org.eclipse.ecf"/>
- <plugin id="org.eclipse.ecf.filetransfer"/>
- <plugin id="org.eclipse.ecf.identity"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.frameworkadmin"/>
- <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
- <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
- <plugin id="org.eclipse.equinox.p2.core"/>
- <plugin id="org.eclipse.equinox.p2.director"/>
- <plugin id="org.eclipse.equinox.p2.directorywatcher"/>
- <plugin id="org.eclipse.equinox.p2.engine"/>
- <plugin id="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates"/>
- <plugin id="org.eclipse.equinox.p2.exemplarysetup"/>
- <plugin id="org.eclipse.equinox.p2.extensionlocation"/>
- <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
- <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
- <plugin id="org.eclipse.equinox.p2.metadata"/>
- <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
- <plugin id="org.eclipse.equinox.p2.publisher"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
- <plugin id="org.eclipse.equinox.p2.ui"/>
- <plugin id="org.eclipse.equinox.p2.ui.sdk"/>
- <plugin id="org.eclipse.equinox.p2.updatesite"/>
- <plugin id="org.eclipse.equinox.preferences"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <plugin id="org.eclipse.equinox.security"/>
- <plugin id="org.eclipse.equinox.security.ui"/>
- <plugin id="org.eclipse.equinox.security.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
- <plugin id="org.eclipse.help"/>
- <plugin id="org.eclipse.jface"/>
- <plugin id="org.eclipse.jface.databinding"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.services"/>
- <plugin id="org.eclipse.swt"/>
- <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.ui"/>
- <plugin id="org.eclipse.ui.workbench"/>
- <plugin id="org.sat4j.core"/>
- <plugin id="org.sat4j.pb"/>
- </plugins>
-
-
-</product>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/splash.bmp b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/splash.bmp
deleted file mode 100644
index d7d2e3032..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/splash.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Activator.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Activator.java
deleted file mode 100644
index c23f9256d..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Activator.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Application.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Application.java
deleted file mode 100644
index 3279bab80..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Application.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This class controls all aspects of the application's execution
- */
-public class Application implements IApplication {
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext context) {
- Display display = PlatformUI.createDisplay();
- try {
- int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
- if (returnCode == PlatformUI.RETURN_RESTART) {
- return IApplication.EXIT_RESTART;
- }
- return IApplication.EXIT_OK;
- } finally {
- display.dispose();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
- public void stop() {
- final IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench == null)
- return;
- final Display display = workbench.getDisplay();
- display.syncExec(new Runnable() {
- public void run() {
- if (!display.isDisposed())
- workbench.close();
- }
- });
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationActionBarAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationActionBarAdvisor.java
deleted file mode 100644
index 0794fc426..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationActionBarAdvisor.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.ICoolBarManager;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.action.ToolBarContributionItem;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-
-/**
- * An action bar advisor is responsible for creating, adding, and disposing of the
- * actions added to a workbench window. Each window will be populated with
- * new actions.
- */
-public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
-
- // Actions - important to allocate these only in makeActions, and then use them
- // in the fill methods. This ensures that the actions aren't recreated
- // when fillActionBars is called with FILL_PROXY.
- private IWorkbenchAction exitAction;
- private IWorkbenchAction aboutAction;
- private IWorkbenchAction newWindowAction;
- // XXX we want to show all update preferences
- private IWorkbenchAction preferencesAction;
- private OpenViewAction openViewAction;
- private Action messagePopupAction;
-
-
- public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
- super(configurer);
- }
-
- protected void makeActions(final IWorkbenchWindow window) {
- // Creates the actions and registers them.
- // Registering is needed to ensure that key bindings work.
- // The corresponding commands keybindings are defined in the plugin.xml file.
- // Registering also provides automatic disposal of the actions when
- // the window is closed.
-
- exitAction = ActionFactory.QUIT.create(window);
- register(exitAction);
-
- aboutAction = ActionFactory.ABOUT.create(window);
- register(aboutAction);
-
- newWindowAction = ActionFactory.OPEN_NEW_WINDOW.create(window);
- register(newWindowAction);
-
- //XXX preferences action
- preferencesAction = ActionFactory.PREFERENCES.create(window);
- register(preferencesAction);
-
- openViewAction = new OpenViewAction(window, "Open Another Message View", View.ID);
- register(openViewAction);
-
- messagePopupAction = new MessagePopupAction("Open Message", window);
- register(messagePopupAction);
- }
-
- protected void fillMenuBar(IMenuManager menuBar) {
- MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
- // XXX Window menu
- MenuManager windowMenu = new MenuManager("&Window", IWorkbenchActionConstants.M_WINDOW);
- MenuManager helpMenu = new MenuManager("&Help", IWorkbenchActionConstants.M_HELP);
-
- menuBar.add(fileMenu);
- // XXX Window menu
- menuBar.add(windowMenu);
- // Add a group marker indicating where action set menus will appear.
- menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
- menuBar.add(helpMenu);
-
- // File
- fileMenu.add(newWindowAction);
- fileMenu.add(new Separator());
- fileMenu.add(messagePopupAction);
- fileMenu.add(openViewAction);
- fileMenu.add(new Separator());
- fileMenu.add(exitAction);
-
- // XXX Window menu
- windowMenu.add(preferencesAction);
-
- // Help
- // XXX add an additions group because this is what SDK UI expects
- helpMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
- helpMenu.add(new Separator());
- helpMenu.add(aboutAction);
-
- }
-
- protected void fillCoolBar(ICoolBarManager coolBar) {
- IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
- coolBar.add(new ToolBarContributionItem(toolbar, "main"));
- toolbar.add(openViewAction);
- toolbar.add(messagePopupAction);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationWorkbenchAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationWorkbenchAdvisor.java
deleted file mode 100644
index 183ba01f2..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationWorkbenchAdvisor.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchAdvisor;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-/**
- * This workbench advisor creates the window advisor, and specifies
- * the perspective id for the initial window.
- */
-public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
-
- public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- return new ApplicationWorkbenchWindowAdvisor(configurer);
- }
-
- public String getInitialWindowPerspectiveId() {
- return Perspective.ID;
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationWorkbenchWindowAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationWorkbenchWindowAdvisor.java
deleted file mode 100644
index 94a996d07..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationWorkbenchWindowAdvisor.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
-
- public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- super(configurer);
- }
-
- public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
- return new ApplicationActionBarAdvisor(configurer);
- }
-
- public void preWindowOpen() {
- IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
- configurer.setInitialSize(new Point(600, 400));
- configurer.setShowCoolBar(true);
- // XXX We set the status line and progress indicator so that update
- // information can be shown there
- configurer.setShowStatusLine(true);
- configurer.setShowProgressIndicator(true);
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ICommandIds.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ICommandIds.java
deleted file mode 100644
index 018fef16d..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ICommandIds.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-/**
- * Interface defining the application's command IDs.
- * Key bindings can be defined for specific commands.
- * To associate an action with a command, use IAction.setActionDefinitionId(commandId).
- *
- * @see org.eclipse.jface.action.IAction#setActionDefinitionId(String)
- */
-public interface ICommandIds {
-
- public static final String CMD_OPEN = "org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.open";
- public static final String CMD_OPEN_MESSAGE = "org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.openMessage";
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/MessagePopupAction.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/MessagePopupAction.java
deleted file mode 100644
index 09cf1f900..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/MessagePopupAction.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-public class MessagePopupAction extends Action {
-
- private final IWorkbenchWindow window;
-
- MessagePopupAction(String text, IWorkbenchWindow window) {
- super(text);
- this.window = window;
- // The id is used to refer to the action in a menu or toolbar
- setId(ICommandIds.CMD_OPEN_MESSAGE);
- // Associate the action with a pre-defined command, to allow key bindings.
- setActionDefinitionId(ICommandIds.CMD_OPEN_MESSAGE);
- setImageDescriptor(org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.Activator.getImageDescriptor("/icons/sample3.gif"));
- }
-
- public void run() {
- MessageDialog.openInformation(window.getShell(), "Open", "Open Message Dialog!");
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/NavigationView.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/NavigationView.java
deleted file mode 100644
index 8eeaa6ece..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/NavigationView.java
+++ /dev/null
@@ -1,151 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.ViewPart;
-
-public class NavigationView extends ViewPart {
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.navigationView";
- private TreeViewer viewer;
-
- class TreeObject {
- private String name;
- private TreeParent parent;
-
- public TreeObject(String name) {
- this.name = name;
- }
- public String getName() {
- return name;
- }
- public void setParent(TreeParent parent) {
- this.parent = parent;
- }
- public TreeParent getParent() {
- return parent;
- }
- public String toString() {
- return getName();
- }
- }
-
- class TreeParent extends TreeObject {
- private ArrayList children;
- public TreeParent(String name) {
- super(name);
- children = new ArrayList();
- }
- public void addChild(TreeObject child) {
- children.add(child);
- child.setParent(this);
- }
- public void removeChild(TreeObject child) {
- children.remove(child);
- child.setParent(null);
- }
- public TreeObject[] getChildren() {
- return (TreeObject[]) children.toArray(new TreeObject[children.size()]);
- }
- public boolean hasChildren() {
- return children.size()>0;
- }
- }
-
- class ViewContentProvider implements IStructuredContentProvider,
- ITreeContentProvider {
-
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object parent) {
- return getChildren(parent);
- }
-
- public Object getParent(Object child) {
- if (child instanceof TreeObject) {
- return ((TreeObject)child).getParent();
- }
- return null;
- }
-
- public Object[] getChildren(Object parent) {
- if (parent instanceof TreeParent) {
- return ((TreeParent)parent).getChildren();
- }
- return new Object[0];
- }
-
- public boolean hasChildren(Object parent) {
- if (parent instanceof TreeParent)
- return ((TreeParent)parent).hasChildren();
- return false;
- }
- }
-
- class ViewLabelProvider extends LabelProvider {
-
- public String getText(Object obj) {
- return obj.toString();
- }
- public Image getImage(Object obj) {
- String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
- if (obj instanceof TreeParent)
- imageKey = ISharedImages.IMG_OBJ_FOLDER;
- return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
- }
- }
-
- /**
- * We will set up a dummy model to initialize tree heararchy. In real
- * code, you will connect to a real model and expose its hierarchy.
- */
- private TreeObject createDummyModel() {
- TreeObject to1 = new TreeObject("Inbox");
- TreeObject to2 = new TreeObject("Drafts");
- TreeObject to3 = new TreeObject("Sent");
- TreeParent p1 = new TreeParent("me@this.com");
- p1.addChild(to1);
- p1.addChild(to2);
- p1.addChild(to3);
-
- TreeObject to4 = new TreeObject("Inbox");
- TreeParent p2 = new TreeParent("other@aol.com");
- p2.addChild(to4);
-
- TreeParent root = new TreeParent("");
- root.addChild(p1);
- root.addChild(p2);
- return root;
- }
-
- /**
- * This is a callback that will allow us to create the viewer and initialize
- * it.
- */
- public void createPartControl(Composite parent) {
- viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- viewer.setContentProvider(new ViewContentProvider());
- viewer.setLabelProvider(new ViewLabelProvider());
- viewer.setInput(createDummyModel());
- }
-
- /**
- * Passing the focus request to the viewer's control.
- */
- public void setFocus() {
- viewer.getControl().setFocus();
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/OpenViewAction.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/OpenViewAction.java
deleted file mode 100644
index e55917985..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/OpenViewAction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-
-
-public class OpenViewAction extends Action {
-
- private final IWorkbenchWindow window;
- private int instanceNum = 0;
- private final String viewId;
-
- public OpenViewAction(IWorkbenchWindow window, String label, String viewId) {
- this.window = window;
- this.viewId = viewId;
- setText(label);
- // The id is used to refer to the action in a menu or toolbar
- setId(ICommandIds.CMD_OPEN);
- // Associate the action with a pre-defined command, to allow key bindings.
- setActionDefinitionId(ICommandIds.CMD_OPEN);
- setImageDescriptor(org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.Activator.getImageDescriptor("/icons/sample2.gif"));
- }
-
- public void run() {
- if(window != null) {
- try {
- window.getActivePage().showView(viewId, Integer.toString(instanceNum++), IWorkbenchPage.VIEW_ACTIVATE);
- } catch (PartInitException e) {
- MessageDialog.openError(window.getShell(), "Error", "Error opening view:" + e.getMessage());
- }
- }
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Perspective.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Perspective.java
deleted file mode 100644
index dbe205e64..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Perspective.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-
-public class Perspective implements IPerspectiveFactory {
-
- /**
- * The ID of the perspective as specified in the extension.
- */
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.perspective";
-
- public void createInitialLayout(IPageLayout layout) {
- String editorArea = layout.getEditorArea();
- layout.setEditorAreaVisible(false);
-
- layout.addStandaloneView(NavigationView.ID, false, IPageLayout.LEFT, 0.25f, editorArea);
- IFolderLayout folder = layout.createFolder("messages", IPageLayout.TOP, 0.5f, editorArea);
- folder.addPlaceholder(View.ID + ":*");
- folder.addView(View.ID);
-
- layout.getViewLayout(NavigationView.ID).setCloseable(false);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/View.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/View.java
deleted file mode 100644
index ec39948c7..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/View.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.part.ViewPart;
-
-public class View extends ViewPart {
-
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.view";
-
- public void createPartControl(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- top.setLayout(layout);
- // top banner
- Composite banner = new Composite(top, SWT.NONE);
- banner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_BEGINNING, true, false));
- layout = new GridLayout();
- layout.marginHeight = 5;
- layout.marginWidth = 10;
- layout.numColumns = 2;
- banner.setLayout(layout);
-
- // setup bold font
- Font boldFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
-
- Label l = new Label(banner, SWT.WRAP);
- l.setText("Subject:");
- l.setFont(boldFont);
- l = new Label(banner, SWT.WRAP);
- l.setText("This is a message about the cool Eclipse RCP!");
-
- l = new Label(banner, SWT.WRAP);
- l.setText("From:");
- l.setFont(boldFont);
-
- final Link link = new Link(banner, SWT.NONE);
- link.setText("<a>nicole@mail.org</a>");
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- MessageDialog.openInformation(getSite().getShell(), "Not Implemented", "Imagine the address book or a new message being created now.");
- }
- });
-
- l = new Label(banner, SWT.WRAP);
- l.setText("Date:");
- l.setFont(boldFont);
- l = new Label(banner, SWT.WRAP);
- l.setText("10:34 am");
- // message contents
- Text text = new Text(top, SWT.MULTI | SWT.WRAP);
- text.setText("This RCP Application was generated from the PDE Plug-in Project wizard. This sample shows how to:\n"+
- "- add a top-level menu and toolbar with actions\n"+
- "- add keybindings to actions\n" +
- "- create views that can't be closed and\n"+
- " multiple instances of the same view\n"+
- "- perspectives with placeholders for new views\n"+
- "- use the default about dialog\n"+
- "- create a product definition\n");
- text.setLayoutData(new GridData(GridData.FILL_BOTH));
- }
-
- public void setFocus() {
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.classpath b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.project b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.project
deleted file mode 100644
index bdfbea86a..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.examples.rcp.sdkui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0168ffa74..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Mon Mar 16 11:26:17 PDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/META-INF/MANIFEST.MF b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/META-INF/MANIFEST.MF
deleted file mode 100644
index d3e191cb5..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,29 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: RCP Mail (SDK UI)
-Bundle-SymbolicName: org.eclipse.equinox.p2.examples.rcp.sdkui; singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.p2.examples.rcp.sdkui.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.equinox.p2.ui;bundle-version="2.0.0",
- org.eclipse.equinox.p2.metadata;bundle-version="1.0.0",
- org.eclipse.equinox.p2.metadata.repository;bundle-version="1.0.0",
- org.eclipse.equinox.p2.artifact.repository;bundle-version="1.0.0",
- org.eclipse.equinox.p2.extensionlocation;bundle-version="1.0.100",
- org.eclipse.equinox.p2.updatesite;bundle-version="1.0.0",
- org.eclipse.equinox.p2.director;bundle-version="1.0.100",
- org.eclipse.equinox.p2.engine;bundle-version="1.0.100",
- org.eclipse.equinox.p2.core;bundle-version="1.0.100",
- org.eclipse.ecf;bundle-version="3.0.0",
- org.eclipse.ecf.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.identity;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer.httpclient;bundle-version="3.0.0",
- org.apache.commons.codec;bundle-version="1.2.0",
- org.apache.commons.httpclient;bundle-version="3.0.1",
- org.eclipse.equinox.p2.ui.sdk;bundle-version="1.0.0",
- org.eclipse.equinox.p2.ui.sdk.scheduler;bundle-version="1.0.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/build.properties b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/build.properties
deleted file mode 100644
index 4b6aaf25b..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- product_lg.gif,\
- splash.bmp
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/mail.ico b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/mail.ico
deleted file mode 100644
index b00006113..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/mail.ico
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample.gif
deleted file mode 100644
index 34fb3c9d8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample.icns b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample.icns
deleted file mode 100644
index 1e92ccce1..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample.icns
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample2.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample2.gif
deleted file mode 100644
index 252d7ebcb..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample2.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample3.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample3.gif
deleted file mode 100644
index b949ac948..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample3.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/p2.inf b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/p2.inf
deleted file mode 100644
index 48f31a324..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/p2.inf
+++ /dev/null
@@ -1,3 +0,0 @@
-instructions.configure=\
- addRepository(type:0,location:http${#58}//www.eclipse.org/equinox/p2/testing/updateSite);\
- addRepository(type:1,location:http${#58}//www.eclipse.org/equinox/p2/testing/updateSite); \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/plugin.xml b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/plugin.xml
deleted file mode 100644
index 7dd551117..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/plugin.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
- <extension
- id="application"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run
- class="org.eclipse.equinox.p2.examples.rcp.sdkui.Application">
- </run>
- </application>
- </extension>
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="RCP Perspective"
- class="org.eclipse.equinox.p2.examples.rcp.sdkui.Perspective"
- id="org.eclipse.equinox.p2.examples.rcp.sdkui.perspective">
- </perspective>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- name="Message"
- allowMultiple="true"
- icon="icons/sample2.gif"
- class="org.eclipse.equinox.p2.examples.rcp.sdkui.View"
- id="org.eclipse.equinox.p2.examples.rcp.sdkui.view">
- </view>
- <view
- name="Mailboxes"
- allowMultiple="true"
- icon="icons/sample3.gif"
- class="org.eclipse.equinox.p2.examples.rcp.sdkui.NavigationView"
- id="org.eclipse.equinox.p2.examples.rcp.sdkui.navigationView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <category
- name="Mail"
- id="org.eclipse.equinox.p2.examples.rcp.sdkui.category">
- </category>
- <command
- name="Open Mailbox"
- description="Opens a mailbox"
- categoryId="org.eclipse.equinox.p2.examples.rcp.sdkui.category"
- id="org.eclipse.equinox.p2.examples.rcp.sdkui.open">
- </command>
- <command
- name="Open Message Dialog"
- description="Open a message dialog"
- categoryId="org.eclipse.equinox.p2.examples.rcp.sdkui.category"
- id="org.eclipse.equinox.p2.examples.rcp.sdkui.openMessage">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.bindings">
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.sdkui.open"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+2">
- </key>
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.sdkui.openMessage"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+3">
- </key>
- <key
- commandId="org.eclipse.ui.file.exit"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+X">
- </key>
- </extension>
- <extension
- id="product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.eclipse.equinox.p2.examples.rcp.sdkui.application"
- name="RCP Product">
- <property
- name="aboutText"
- value="RCP Mail template created by PDE">
- </property>
- <property
- name="windowImages"
- value="icons/sample2.gif">
- </property>
- <property
- name="aboutImage"
- value="product_lg.gif">
- </property>
- </product>
- </extension>
-
-</plugin>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/product_lg.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/product_lg.gif
deleted file mode 100644
index bd95e283f..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/product_lg.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/sdkui.product b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/sdkui.product
deleted file mode 100644
index 5d8f28e92..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/sdkui.product
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="RCP Mail Example (with p2 SDK UI)" id="org.eclipse.equinox.p2.examples.rcp.sdkui.product" application="org.eclipse.equinox.p2.examples.rcp.sdkui.application" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="true">
-
- <aboutInfo>
- <image path="product_lg.gif"/>
- <text>
- RCP Mail Example (with p2 SDK UI)
- </text>
- </aboutInfo>
-
- <configIni use="default">
- </configIni>
-
- <launcherArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <windowImages i16="icons/sample2.gif"/>
-
- <splash
- location="org.eclipse.equinox.p2.examples.rcp.sdkui" />
- <launcher name="sdkui">
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- <plugin id="com.ibm.icu"/>
- <plugin id="org.apache.commons.codec"/>
- <plugin id="org.apache.commons.httpclient"/>
- <plugin id="org.apache.commons.logging"/>
- <plugin id="org.eclipse.compare"/>
- <plugin id="org.eclipse.compare.core"/>
- <plugin id="org.eclipse.core.commands"/>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.databinding"/>
- <plugin id="org.eclipse.core.databinding.observable"/>
- <plugin id="org.eclipse.core.databinding.property"/>
- <plugin id="org.eclipse.core.expressions"/>
- <plugin id="org.eclipse.core.filebuffers"/>
- <plugin id="org.eclipse.core.filesystem"/>
- <plugin id="org.eclipse.core.filesystem.macosx" fragment="true"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.resources"/>
- <plugin id="org.eclipse.core.runtime"/>
- <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
- <plugin id="org.eclipse.ecf"/>
- <plugin id="org.eclipse.ecf.filetransfer"/>
- <plugin id="org.eclipse.ecf.identity"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.ds"/>
- <plugin id="org.eclipse.equinox.frameworkadmin"/>
- <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
- <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
- <plugin id="org.eclipse.equinox.p2.core"/>
- <plugin id="org.eclipse.equinox.p2.director"/>
- <plugin id="org.eclipse.equinox.p2.directorywatcher"/>
- <plugin id="org.eclipse.equinox.p2.engine"/>
- <plugin id="org.eclipse.equinox.p2.examples.rcp.sdkui"/>
- <plugin id="org.eclipse.equinox.p2.exemplarysetup" fragment=""/>
- <plugin id="org.eclipse.equinox.p2.extensionlocation"/>
- <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
- <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
- <plugin id="org.eclipse.equinox.p2.metadata"/>
- <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
- <plugin id="org.eclipse.equinox.p2.operations"/>
- <plugin id="org.eclipse.equinox.p2.publisher"/>
- <plugin id="org.eclipse.equinox.p2.ql"/>
- <plugin id="org.eclipse.equinox.p2.repository"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
- <plugin id="org.eclipse.equinox.p2.ui"/>
- <plugin id="org.eclipse.equinox.p2.ui.sdk"/>
- <plugin id="org.eclipse.equinox.p2.ui.sdk.scheduler"/>
- <plugin id="org.eclipse.equinox.p2.updatechecker"/>
- <plugin id="org.eclipse.equinox.p2.updatesite"/>
- <plugin id="org.eclipse.equinox.preferences"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <plugin id="org.eclipse.equinox.security"/>
- <plugin id="org.eclipse.equinox.security.macosx" fragment="true"/>
- <plugin id="org.eclipse.equinox.security.ui"/>
- <plugin id="org.eclipse.equinox.security.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
- <plugin id="org.eclipse.equinox.util"/>
- <plugin id="org.eclipse.help"/>
- <plugin id="org.eclipse.jface"/>
- <plugin id="org.eclipse.jface.databinding"/>
- <plugin id="org.eclipse.jface.text"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.services"/>
- <plugin id="org.eclipse.swt"/>
- <plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/>
- <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.text"/>
- <plugin id="org.eclipse.ui"/>
- <plugin id="org.eclipse.ui.cocoa" fragment="true"/>
- <plugin id="org.eclipse.ui.editors"/>
- <plugin id="org.eclipse.ui.forms"/>
- <plugin id="org.eclipse.ui.ide"/>
- <plugin id="org.eclipse.ui.views"/>
- <plugin id="org.eclipse.ui.workbench"/>
- <plugin id="org.eclipse.ui.workbench.texteditor"/>
- <plugin id="org.sat4j.core"/>
- <plugin id="org.sat4j.pb"/>
- </plugins>
-
-
-</product>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/splash.bmp b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/splash.bmp
deleted file mode 100644
index d7d2e3032..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/splash.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Activator.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Activator.java
deleted file mode 100644
index be08d5ac8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Activator.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkui;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.examples.rcp.sdkui";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Application.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Application.java
deleted file mode 100644
index 333f4c610..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Application.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkui;
-
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This class controls all aspects of the application's execution
- */
-public class Application implements IApplication {
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext context) {
- Display display = PlatformUI.createDisplay();
- try {
- int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
- if (returnCode == PlatformUI.RETURN_RESTART) {
- return IApplication.EXIT_RESTART;
- }
- return IApplication.EXIT_OK;
- } finally {
- display.dispose();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
- public void stop() {
- final IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench == null)
- return;
- final Display display = workbench.getDisplay();
- display.syncExec(new Runnable() {
- public void run() {
- if (!display.isDisposed())
- workbench.close();
- }
- });
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationActionBarAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationActionBarAdvisor.java
deleted file mode 100644
index 588f0106b..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationActionBarAdvisor.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkui;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.ICoolBarManager;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.action.ToolBarContributionItem;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-
-/**
- * An action bar advisor is responsible for creating, adding, and disposing of the
- * actions added to a workbench window. Each window will be populated with
- * new actions.
- */
-public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
-
- // Actions - important to allocate these only in makeActions, and then use them
- // in the fill methods. This ensures that the actions aren't recreated
- // when fillActionBars is called with FILL_PROXY.
- private IWorkbenchAction exitAction;
- private IWorkbenchAction aboutAction;
- private IWorkbenchAction newWindowAction;
- // XXX we want to show all update preferences
- private IWorkbenchAction preferencesAction;
- private OpenViewAction openViewAction;
- private Action messagePopupAction;
-
-
- public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
- super(configurer);
- }
-
- protected void makeActions(final IWorkbenchWindow window) {
- // Creates the actions and registers them.
- // Registering is needed to ensure that key bindings work.
- // The corresponding commands keybindings are defined in the plugin.xml file.
- // Registering also provides automatic disposal of the actions when
- // the window is closed.
-
- exitAction = ActionFactory.QUIT.create(window);
- register(exitAction);
-
- aboutAction = ActionFactory.ABOUT.create(window);
- register(aboutAction);
-
- newWindowAction = ActionFactory.OPEN_NEW_WINDOW.create(window);
- register(newWindowAction);
-
- //XXX preferences action
- preferencesAction = ActionFactory.PREFERENCES.create(window);
- register(preferencesAction);
-
- openViewAction = new OpenViewAction(window, "Open Another Message View", View.ID);
- register(openViewAction);
-
- messagePopupAction = new MessagePopupAction("Open Message", window);
- register(messagePopupAction);
- }
-
- protected void fillMenuBar(IMenuManager menuBar) {
- MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
- // XXX Window menu
- MenuManager windowMenu = new MenuManager("&Window", IWorkbenchActionConstants.M_WINDOW);
- MenuManager helpMenu = new MenuManager("&Help", IWorkbenchActionConstants.M_HELP);
-
- menuBar.add(fileMenu);
- // XXX Window menu
- menuBar.add(windowMenu);
- // Add a group marker indicating where action set menus will appear.
- menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
- menuBar.add(helpMenu);
-
- // File
- fileMenu.add(newWindowAction);
- fileMenu.add(new Separator());
- fileMenu.add(messagePopupAction);
- fileMenu.add(openViewAction);
- fileMenu.add(new Separator());
- fileMenu.add(exitAction);
-
- // XXX Window menu
- windowMenu.add(preferencesAction);
-
- // Help
- // XXX add an additions group because this is what SDK UI expects
- helpMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
- helpMenu.add(new Separator());
- helpMenu.add(aboutAction);
-
- }
-
- protected void fillCoolBar(ICoolBarManager coolBar) {
- IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
- coolBar.add(new ToolBarContributionItem(toolbar, "main"));
- toolbar.add(openViewAction);
- toolbar.add(messagePopupAction);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationWorkbenchAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationWorkbenchAdvisor.java
deleted file mode 100644
index effefa115..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationWorkbenchAdvisor.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkui;
-
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchAdvisor;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-/**
- * This workbench advisor creates the window advisor, and specifies
- * the perspective id for the initial window.
- */
-public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
-
- public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- return new ApplicationWorkbenchWindowAdvisor(configurer);
- }
-
- public String getInitialWindowPerspectiveId() {
- return Perspective.ID;
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationWorkbenchWindowAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationWorkbenchWindowAdvisor.java
deleted file mode 100644
index 0391fe090..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationWorkbenchWindowAdvisor.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkui;
-
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
-
- public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- super(configurer);
- }
-
- public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
- return new ApplicationActionBarAdvisor(configurer);
- }
-
- public void preWindowOpen() {
- IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
- configurer.setInitialSize(new Point(600, 400));
- configurer.setShowCoolBar(true);
- // XXX We set the status line and progress indicator so that update
- // information can be shown there
- configurer.setShowStatusLine(true);
- configurer.setShowProgressIndicator(true);
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ICommandIds.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ICommandIds.java
deleted file mode 100644
index 1f4928f3d..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ICommandIds.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkui;
-
-/**
- * Interface defining the application's command IDs.
- * Key bindings can be defined for specific commands.
- * To associate an action with a command, use IAction.setActionDefinitionId(commandId).
- *
- * @see org.eclipse.jface.action.IAction#setActionDefinitionId(String)
- */
-public interface ICommandIds {
-
- public static final String CMD_OPEN = "org.eclipse.equinox.p2.examples.rcp.sdkui.open";
- public static final String CMD_OPEN_MESSAGE = "org.eclipse.equinox.p2.examples.rcp.sdkui.openMessage";
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/MessagePopupAction.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/MessagePopupAction.java
deleted file mode 100644
index 223749337..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/MessagePopupAction.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkui;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-public class MessagePopupAction extends Action {
-
- private final IWorkbenchWindow window;
-
- MessagePopupAction(String text, IWorkbenchWindow window) {
- super(text);
- this.window = window;
- // The id is used to refer to the action in a menu or toolbar
- setId(ICommandIds.CMD_OPEN_MESSAGE);
- // Associate the action with a pre-defined command, to allow key bindings.
- setActionDefinitionId(ICommandIds.CMD_OPEN_MESSAGE);
- setImageDescriptor(org.eclipse.equinox.p2.examples.rcp.sdkui.Activator.getImageDescriptor("/icons/sample3.gif"));
- }
-
- public void run() {
- MessageDialog.openInformation(window.getShell(), "Open", "Open Message Dialog!");
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/NavigationView.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/NavigationView.java
deleted file mode 100644
index 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.discovery.feature/.project b/features/org.eclipse.equinox.p2.discovery.feature/.project
deleted file mode 100644
index 774ef70e4..000000000
--- a/features/org.eclipse.equinox.p2.discovery.feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.discovery.feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/epl-v10.html b/features/org.eclipse.equinox.p2.discovery.feature/epl-v10.html
deleted file mode 100755
index ed4b19665..000000000
--- a/features/org.eclipse.equinox.p2.discovery.feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/feature.properties b/features/org.eclipse.equinox.p2.discovery.feature/feature.properties
deleted file mode 100755
index 0c66ac4bc..000000000
--- a/features/org.eclipse.equinox.p2.discovery.feature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2010 Tasktop Technologies and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Tasktop Technologies - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Equinox p2 Discovery
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse Equinox Project
-
-# "updateSiteName" property - label for the update site
-updateSiteName=The Equinox Project Repository
-
-# "description" property - description of the feature
-description=All of the bundles that comprise Equinox p2 discovery. \n\
-This feature is intended to be used by integrators building on discovery.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2010 Tasktop Technologies and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- Tasktop Technologies - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-Eclipse Foundation Software User Agreement\n\
-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\n\
-Eclipse Foundation is provided to you under the terms and conditions of\n\
-the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
-provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.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(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-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" found within a Feature.\n\
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
-terms and conditions (or references to such terms and conditions) that\n\
-govern your use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - 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, and\n\
-re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/feature.xml b/features/org.eclipse.equinox.p2.discovery.feature/feature.xml
deleted file mode 100644
index 5faa18b95..000000000
--- a/features/org.eclipse.equinox.p2.discovery.feature/feature.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.equinox.p2.discovery.feature"
- label="%featureName"
- version="1.0.0.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <plugin
- id="org.eclipse.equinox.p2.discovery"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.discovery.compatibility"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ui.discovery"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/license.html b/features/org.eclipse.equinox.p2.discovery.feature/license.html
deleted file mode 100755
index c6af966b6..000000000
--- a/features/org.eclipse.equinox.p2.discovery.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/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index 3b5a98e30..000000000
--- a/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,144 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Eclipse p2 Discovery Developer Resources
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=The Eclipse Project Updates
-
-# "description" property - description of the feature
-description=Source code for the Equinox p2 Discovery
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2010 Sonatype Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- Sonatype Inc. - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/license.html b/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/.project b/features/org.eclipse.equinox.p2.rcp.feature/.project
index 7d1eaedb0..e46a3befc 100644
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/.project
+++ b/features/org.eclipse.equinox.p2.rcp.feature/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.equinox.p2.agent.feature</name>
+ <name>org.eclipse.equinox.p2.rcp.feature</name>
<comment></comment>
<projects>
</projects>
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/build.properties b/features/org.eclipse.equinox.p2.rcp.feature/build.properties
index 0d205334c..21d41116f 100644
--- a/features/org.eclipse.equinox.p2.discovery.feature/build.properties
+++ b/features/org.eclipse.equinox.p2.rcp.feature/build.properties
@@ -1,11 +1,14 @@
###############################################################################
-# Copyright (c) 2010 Tasktop Technologies and others.
+# Copyright (c) 2011 EclipseSource Inc. and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
-# Tasktop Technologies - initial API and implementation
+# EclipseSource - initial API and implementation
+# IBM Corporation - Ongoing development
###############################################################################
-bin.includes = feature.xml,license.html,epl-v10.html,license.html,feature.properties
+bin.includes = feature.xml,\
+ feature.properties,\
+ eclipse_update_120.jpg
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.equinox.p2.rcp.feature/eclipse_update_120.jpg
index bfdf708ad..bfdf708ad 100644
--- a/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/eclipse_update_120.jpg
+++ b/features/org.eclipse.equinox.p2.rcp.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.equinox.p2.rcp.feature/feature.properties b/features/org.eclipse.equinox.p2.rcp.feature/feature.properties
new file mode 100644
index 000000000..1c790244d
--- /dev/null
+++ b/features/org.eclipse.equinox.p2.rcp.feature/feature.properties
@@ -0,0 +1,33 @@
+###############################################################################
+# Copyright (c) 2011 EclipseSource Inc. and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# EclipseSource - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Equinox p2 RCP Management Facilities
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Equinox Project
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2011 EclipseSource Inc. and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ EclipseSource - initial API and implementation\n
+################ end of copyright property ####################################
diff --git a/features/org.eclipse.equinox.p2.rcp.feature/feature.xml b/features/org.eclipse.equinox.p2.rcp.feature/feature.xml
new file mode 100644
index 000000000..6b7e0815c
--- /dev/null
+++ b/features/org.eclipse.equinox.p2.rcp.feature/feature.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.equinox.p2.rcp.feature"
+ label="%featureName"
+ version="1.0.0.qualifier"
+ provider-name="%providerName"
+ image="eclipse_update_120.jpg"
+ license-feature="org.eclipse.license"
+ license-feature-version="1.0.0.qualifier">
+
+ <description url="%descriptionURL">
+ %description
+ </description>
+
+ <copyright url="%copyrightURL">
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <includes
+ id="org.eclipse.equinox.p2.core.feature"
+ version="0.0.0"/>
+
+ <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.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.security.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"/>
+
+</feature>
diff --git a/features/org.eclipse.equinox.p2.sdk/build.properties b/features/org.eclipse.equinox.p2.sdk/build.properties
index be846fa4e..a3dcc55c1 100644
--- a/features/org.eclipse.equinox.p2.sdk/build.properties
+++ b/features/org.eclipse.equinox.p2.sdk/build.properties
@@ -9,7 +9,7 @@
# EclipseSource - initial API and implementation
# IBM - Ongoing changes
###############################################################################
-bin.includes = feature.xml,license.html,epl-v10.html,license.html,feature.properties
+bin.includes = feature.xml,feature.properties
generate.plugin@org.apache.commons.codec.source=org.apache.commons.codec
generate.plugin@org.apache.commons.httpclient.source=org.apache.commons.httpclient
@@ -35,7 +35,6 @@ generate.plugin@org.eclipse.equinox.p2.extensionlocation.source=org.eclipse.equi
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.operations.source=org.eclipse.equinox.p2.operations
@@ -48,6 +47,7 @@ generate.plugin@org.eclipse.equinox.p2.touchpoint.eclipse.source=org.eclipse.equ
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.importexport.source=org.eclipse.equinox.p2.ui.importexport
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
@@ -55,3 +55,4 @@ generate.plugin@org.eclipse.equinox.p2.updatechecker.source=org.eclipse.equinox.
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
+generate.plugin@org.eclipse.equinox.p2.publisher.eclipse.source=org.eclipse.equinox.p2.publisher.eclipse \ No newline at end of file
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
index 481c607e4..869aee00e 100755
--- a/features/org.eclipse.equinox.p2.sdk/feature.properties
+++ b/features/org.eclipse.equinox.p2.sdk/feature.properties
@@ -40,105 +40,4 @@ http://www.eclipse.org/legal/epl-v10.html\n\
Contributors:\n\
EclipseSource - initial API and implementation\n
IBM - ongoing development\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\n\
-Eclipse Foundation is provided to you under the terms and conditions of\n\
-the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
-provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.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(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-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" found within a Feature.\n\
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
-terms and conditions (or references to such terms and conditions) that\n\
-govern your use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - 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, and\n\
-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 ##########################################
+################ end of copyright property #################################### \ No newline at end of file
diff --git a/features/org.eclipse.equinox.p2.sdk/feature.xml b/features/org.eclipse.equinox.p2.sdk/feature.xml
index a0a9fcff7..9f734fb17 100644
--- a/features/org.eclipse.equinox.p2.sdk/feature.xml
+++ b/features/org.eclipse.equinox.p2.sdk/feature.xml
@@ -2,8 +2,10 @@
<feature
id="org.eclipse.equinox.p2.sdk"
label="%featureName"
- version="3.6.0.qualifier"
- provider-name="%providerName">
+ version="3.7.0.qualifier"
+ provider-name="%providerName"
+ license-feature="org.eclipse.license"
+ license-feature-version="1.0.0.qualifier">
<description>
%description
@@ -225,20 +227,6 @@
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"
@@ -370,7 +358,21 @@
install-size="0"
version="0.0.0"
unpack="false"/>
-
+
+ <plugin
+ id="org.eclipse.equinox.p2.ui.importexport"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.equinox.p2.ui.importexport.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
<plugin
id="org.eclipse.equinox.p2.ui"
download-size="0"
@@ -654,4 +656,25 @@
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.eclipse.equinox.p2.transport.ecf"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.equinox.p2.publisher.eclipse"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.equinox.p2.publisher.eclipse.source"
+ 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/bundles/org.eclipse.equinox.p2.ui.admin/pom.xml b/features/org.eclipse.equinox.p2.sdk/pom.xml
index c329656b1..d53b10f0e 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/pom.xml
+++ b/features/org.eclipse.equinox.p2.sdk/pom.xml
@@ -8,7 +8,7 @@
<version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
</parent>
<groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.ui.admin</artifactId>
+ <artifactId>org.eclipse.equinox.p2.sdk</artifactId>
<version>1.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
+ <packaging>eclipse-feature</packaging>
</project>
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/.project b/features/org.eclipse.equinox.p2.user.ui/.project
index 14cf063d6..14cf063d6 100644
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/.project
+++ b/features/org.eclipse.equinox.p2.user.ui/.project
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/build.properties b/features/org.eclipse.equinox.p2.user.ui/build.properties
index 9e53b4e24..0115aa8e5 100644
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/build.properties
+++ b/features/org.eclipse.equinox.p2.user.ui/build.properties
@@ -9,8 +9,6 @@
# 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/features/org.eclipse.equinox.p2.user.ui/eclipse_update_120.jpg
index bfdf708ad..bfdf708ad 100644
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/eclipse_update_120.jpg
+++ b/features/org.eclipse.equinox.p2.user.ui/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.equinox.p2.user.ui/feature.properties b/features/org.eclipse.equinox.p2.user.ui/feature.properties
new file mode 100644
index 000000000..c9282a77d
--- /dev/null
+++ b/features/org.eclipse.equinox.p2.user.ui/feature.properties
@@ -0,0 +1,23 @@
+# "featureName" property - name of the feature
+featureName=Equinox p2 Provisioning for IDEs
+
+# "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 p2 Provisioning Platform for use in IDE related scenarios
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2008, 2010 IBM Corporation and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ IBM Corporation - initial API and implementation\n
+################ end of copyright property #################################### \ No newline at end of file
diff --git a/features/org.eclipse.equinox.p2.user.ui/feature.xml b/features/org.eclipse.equinox.p2.user.ui/feature.xml
new file mode 100644
index 000000000..b112dfe5d
--- /dev/null
+++ b/features/org.eclipse.equinox.p2.user.ui/feature.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.equinox.p2.user.ui"
+ label="%featureName"
+ version="2.1.1.qualifier"
+ provider-name="%providerName"
+ image="eclipse_update_120.jpg"
+ license-feature="org.eclipse.license"
+ license-feature-version="1.0.0.qualifier">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <includes
+ id="org.eclipse.equinox.p2.core.feature"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.equinox.p2.extras.feature"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.equinox.p2.rcp.feature"
+ version="0.0.0"/>
+
+ <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.ui.importexport"
+ 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.user.ui/pom.xml b/features/org.eclipse.equinox.p2.user.ui/pom.xml
index bfd9f370d..bfd9f370d 100644
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/pom.xml
+++ b/features/org.eclipse.equinox.p2.user.ui/pom.xml
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/build.properties
index 5278417b9..5278417b9 100644
--- a/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/build.properties
+++ b/features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/build.properties
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/eclipse_update_120.jpg
index bfdf708ad..bfdf708ad 100644
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/eclipse_update_120.jpg
+++ b/features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/feature.properties b/features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/feature.properties
new file mode 100644
index 000000000..abbaeb101
--- /dev/null
+++ b/features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/feature.properties
@@ -0,0 +1,38 @@
+###############################################################################
+# 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
+
+# "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 #################################### \ No newline at end of file
diff --git a/org.eclipse.equinox.p2.releng/.project b/org.eclipse.equinox.p2.releng/.project
deleted file mode 100644
index 5383151e6..000000000
--- a/org.eclipse.equinox.p2.releng/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.releng</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.equinox.p2.releng/HOW TO RUN.txt b/org.eclipse.equinox.p2.releng/HOW TO RUN.txt
deleted file mode 100644
index 4db026ad9..000000000
--- a/org.eclipse.equinox.p2.releng/HOW TO RUN.txt
+++ /dev/null
@@ -1 +0,0 @@
-See http://wiki.eclipse.org/Equinox_Provisioning_Getting_Started \ No newline at end of file
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/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 2c42fefc8..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/feature.properties
+++ /dev/null
@@ -1,121 +0,0 @@
-# "featureName" property - name of the feature
-featureName=Equinox p2 Agent feature
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "description" property - description of the feature
-description=p2 Agent
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2008, 2010 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- IBM Corporation - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-Eclipse Foundation Software User Agreement\n\
-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\n\
-Eclipse Foundation is provided to you under the terms and conditions of\n\
-the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
-provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.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(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-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" found within a Feature.\n\
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
-terms and conditions (or references to such terms and conditions) that\n\
-govern your use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - 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, and\n\
-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 5a48e3d76..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/feature.xml
+++ /dev/null
@@ -1,236 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.equinox.p2.agent.feature"
- label="%featureName"
- version="2.0.0.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <requires>
- <import plugin="org.eclipse.ecf" version="3.0.0.v20090505-1437" match="compatible"/>
- <import plugin="org.eclipse.ecf.filetransfer" version="3.0.0.v20090505-1437" match="compatible"/>
- <import plugin="org.eclipse.ecf.identity" version="3.0.0.v20090505-1437" match="compatible"/>
- <import plugin="org.eclipse.ecf.provider.filetransfer" version="3.0.0.v20090505-1437" match="compatible"/>
- <import plugin="org.eclipse.ecf.provider.filetransfer.ssl" version="1.0.0.v20090505-1437" match="compatible"/>
- <import plugin="org.eclipse.ecf.ssl" version="1.0.0.v20090505-1437" match="compatible"/>
- <import plugin="org.eclipse.ecf.provider.filetransfer.httpclient" version="3.0.0.v20090505-1437" match="compatible"/>
- <import plugin="org.eclipse.ecf.provider.filetransfer.httpclient.ssl" version="1.0.0.v20090505-1437" match="compatible"/>
- <import plugin="org.apache.commons.codec" version="1.3.0" match="compatible"/>
- <import plugin="org.apache.commons.httpclient" version="3.1.0" match="compatible"/>
- </requires>
-
- <plugin
- id="org.eclipse.equinox.p2.director"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.engine"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.jarprocessor"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata.repository"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.artifact.repository"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.touchpoint.eclipse"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.touchpoint.natives"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.frameworkadmin"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.simpleconfigurator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.frameworkadmin.equinox"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.console"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.simpleconfigurator.manipulator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ui.admin"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ui.admin.rcp"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.updatechecker"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.garbagecollector"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata.generator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.updatesite"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.sat4j.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.sat4j.pb"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.security"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.publisher"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.repository.tools"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.repository"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.security.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ql"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/license.html b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/license.html
deleted file mode 100644
index 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 28c2a9d87..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/feature.properties
+++ /dev/null
@@ -1,121 +0,0 @@
-# "featureName" property - name of the feature
-featureName=Equinox p2 director feature
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "description" property - description of the feature
-description=Equinox p2 director
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2008, 2010 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- IBM Corporation - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-Eclipse Foundation Software User Agreement\n\
-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\n\
-Eclipse Foundation is provided to you under the terms and conditions of\n\
-the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
-provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.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(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-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" found within a Feature.\n\
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
-terms and conditions (or references to such terms and conditions) that\n\
-govern your use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - 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, and\n\
-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 88daabc91..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/feature.xml
+++ /dev/null
@@ -1,188 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.equinox.p2.director.feature"
- label="%featureName"
- version="2.0.0.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <plugin
- id="org.eclipse.equinox.p2.director"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.director.app"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.engine"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.jarprocessor"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata.repository"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.artifact.repository"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.filetransfer"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.identity"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.touchpoint.eclipse"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.touchpoint.natives"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.frameworkadmin"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.simpleconfigurator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.frameworkadmin.equinox"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.console"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.provider.filetransfer"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.simpleconfigurator.manipulator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.garbagecollector"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.sat4j.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.sat4j.pb"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.security"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ql"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/license.html b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/license.html
deleted file mode 100644
index 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 cbb38a795..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/feature.properties
+++ /dev/null
@@ -1,121 +0,0 @@
-# "featureName" property - name of the feature
-featureName=Equinox p2 generator feature
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "description" property - description of the feature
-description=Equinox p2 Generator feature
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2008, 2010 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- IBM Corporation - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-Eclipse Foundation Software User Agreement\n\
-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\n\
-Eclipse Foundation is provided to you under the terms and conditions of\n\
-the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
-provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.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(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-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" found within a Feature.\n\
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
-terms and conditions (or references to such terms and conditions) that\n\
-govern your use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - 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, and\n\
-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 898258706..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/feature.xml
+++ /dev/null
@@ -1,188 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.equinox.p2.generator.feature"
- label="%featureName"
- version="2.0.0.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <plugin
- id="org.eclipse.equinox.p2.artifact.repository"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.console"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.director"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.engine"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.jarprocessor"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata.generator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata.repository"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.touchpoint.eclipse"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.touchpoint.natives"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.filetransfer"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.identity"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.provider.filetransfer"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.frameworkadmin"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.frameworkadmin.equinox"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.simpleconfigurator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.simpleconfigurator.manipulator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.garbagecollector"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.sat4j.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.sat4j.pb"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.security"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.publisher"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/license.html b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/license.html
deleted file mode 100644
index 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/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 64ae43738..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/feature.properties
+++ /dev/null
@@ -1,124 +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, 2010 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- IBM Corporation - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-Eclipse Foundation Software User Agreement\n\
-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\n\
-Eclipse Foundation is provided to you under the terms and conditions of\n\
-the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
-provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.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(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-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" found within a Feature.\n\
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
-terms and conditions (or references to such terms and conditions) that\n\
-govern your use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - 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, and\n\
-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 47f41ef01..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui/feature.xml
+++ /dev/null
@@ -1,333 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.equinox.p2.user.ui"
- label="%featureName"
- version="2.0.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.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"/>
-
- <plugin
- id="org.apache.commons.logging"
- download-size="0"
- install-size="0"
- version="1.0.4.qualifier"
- unpack="false"/>
-
-
- <plugin
- id="org.eclipse.equinox.p2.operations"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ql"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.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/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/examples.psf b/org.eclipse.equinox.p2.releng/examples.psf
deleted file mode 100644
index f23dc1295..000000000
--- a/org.eclipse.equinox.p2.releng/examples.psf
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<psf version="2.0">
-<provider id="org.eclipse.team.cvs.core.cvsnature">
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility,org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.cloud,org.eclipse.equinox.p2.examples.rcp.cloud"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate,org.eclipse.equinox.p2.examples.rcp.prestartupdate"/>
-</provider>
-</psf> \ No newline at end of file
diff --git a/org.eclipse.equinox.p2.releng/incubator.psf b/org.eclipse.equinox.p2.releng/incubator.psf
deleted file mode 100644
index 93e876b3c..000000000
--- a/org.eclipse.equinox.p2.releng/incubator.psf
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<psf version="2.0">
-<provider id="org.eclipse.team.cvs.core.cvsnature">
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/incubator/p2/bundles/org.eclipse.equinox.p2.afterthefact,org.eclipse.equinox.p2.afterthefact"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/incubator/p2/bundles/org.eclipse.equinox.p2.diagnostic,org.eclipse.equinox.p2.diagnostic"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/incubator/p2/bundles/org.eclipse.equinox.p2.profile.recovery,org.eclipse.equinox.p2.profile.recovery"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/incubator/p2/bundles/org.eclipse.equinox.p2.touchpoint.osgi,org.eclipse.equinox.p2.touchpoint.osgi"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/incubator/p2/bundles/org.eclipse.equinox.p2.weblistener,org.eclipse.equinox.p2.weblistener"/>
-</provider>
-</psf> \ No newline at end of file
diff --git a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/.project b/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/.project
deleted file mode 100644
index 141b7adc7..000000000
--- a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2-aggregator</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/pom.xml b/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/pom.xml
deleted file mode 100644
index 8623236c5..000000000
--- a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/pom.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version>
- <relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2-aggregator</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <modules>
- <module>../ie.wombat.jbdiff</module>
- <module>../ie.wombat.jbdiff.test</module>
- <module>../org.eclipse.equinox.frameworkadmin</module>
- <module>../org.eclipse.equinox.frameworkadmin.equinox</module>
- <module>../org.eclipse.equinox.frameworkadmin.test</module>
- <module>../org.eclipse.equinox.p2.artifact.optimizers</module>
- <module>../org.eclipse.equinox.p2.artifact.processors</module>
- <module>../org.eclipse.equinox.p2.artifact.repository</module>
- <module>../org.eclipse.equinox.p2.console</module>
- <module>../org.eclipse.equinox.p2.core</module>
- <module>../org.eclipse.equinox.p2.director</module>
- <module>../org.eclipse.equinox.p2.director.app</module>
- <module>../org.eclipse.equinox.p2.directorywatcher</module>
- <module>../org.eclipse.equinox.p2.discovery</module>
- <module>../org.eclipse.equinox.p2.discovery.compatibility</module>
- <module>../org.eclipse.equinox.p2.engine</module>
- <module>../org.eclipse.equinox.p2.extensionlocation</module>
- <module>../org.eclipse.equinox.p2.garbagecollector</module>
- <module>../org.eclipse.equinox.p2.installer</module>
- <module>../org.eclipse.equinox.p2.jarprocessor</module>
- <module>../org.eclipse.equinox.p2.metadata</module>
- <module>../org.eclipse.equinox.p2.metadata.generator</module>
- <module>../org.eclipse.equinox.p2.metadata.repository</module>
- <module>../org.eclipse.equinox.p2.operations</module>
- <module>../org.eclipse.equinox.p2.publisher</module>
- <module>../org.eclipse.equinox.p2.ql</module>
- <module>../org.eclipse.equinox.p2.reconciler.dropins</module>
- <module>../org.eclipse.equinox.p2.repository</module>
- <module>../org.eclipse.equinox.p2.repository.tools</module>
- <module>../org.eclipse.equinox.p2.sar</module>
-<!-- <module>../org.eclipse.equinox.p2.tests</module>-->
- <module>../org.eclipse.equinox.p2.tests.ui</module>
- <module>../org.eclipse.equinox.p2.testserver</module>
- <module>../org.eclipse.equinox.p2.touchpoint.eclipse</module>
- <module>../org.eclipse.equinox.p2.touchpoint.natives</module>
- <module>../org.eclipse.equinox.p2.ui</module>
- <module>../org.eclipse.equinox.p2.ui.admin</module>
- <module>../org.eclipse.equinox.p2.ui.admin.rcp</module>
- <module>../org.eclipse.equinox.p2.ui.discovery</module>
- <module>../org.eclipse.equinox.p2.ui.sdk</module>
- <module>../org.eclipse.equinox.p2.ui.sdk.scheduler</module>
- <module>../org.eclipse.equinox.p2.updatechecker</module>
- <module>../org.eclipse.equinox.p2.updatesite</module>
- <module>../org.eclipse.equinox.p2.user.ui</module>
- <module>../org.eclipse.equinox.simpleconfigurator</module>
- <module>../org.eclipse.equinox.simpleconfigurator.manipulator</module>
- </modules>
-</project>
diff --git a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent/.project b/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent/.project
deleted file mode 100644
index 06f02164b..000000000
--- a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2-parent</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent/pom.xml b/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent/pom.xml
deleted file mode 100644
index 32500148c..000000000
--- a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent/pom.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <properties>
- <tycho-version>0.8.0-SNAPSHOT</tycho-version>
- </properties>
- <repositories>
- <repository>
- <id>helios</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/eclipse/updates/3.6-I-builds</url>
- </repository>
- <repository>
- <id>galileoTest</id>
- <layout>p2</layout>
- <url>file:/Users/Pascal/Downloads/eclipse-testing/eclipse-junit-tests-I20100312-0800</url>
- </repository>
- </repositories>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>tycho-maven-plugin</artifactId>
- <version>${tycho-version}</version>
- <extensions>true</extensions>
- </plugin>
-
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <resolver>p2</resolver>
- <environments>
- <environment>
- <os>linux</os>
- <ws>gtk</ws>
- <arch>x86</arch>
- </environment>
- <environment>
- <os>linux</os>
- <ws>gtk</ws>
- <arch>x86_64</arch>
- </environment>
- <environment>
- <os>win32</os>
- <ws>win32</ws>
- <arch>x86</arch>
- </environment>
- <environment>
- <os>win32</os>
- <ws>win32</ws>
- <arch>x86_64</arch>
- </environment>
- <environment>
- <os>macosx</os>
- <ws>cocoa</ws>
- <arch>x86_64</arch>
- </environment>
- </environments>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>osx</id>
- <activation>
- <property>
- <name>java.vendor.url</name>
- <value>http://www.apple.com/</value>
- </property>
- </activation>
- <properties>
- <tycho.test.jvmArgs>-Xmx800m -XX:MaxPermSize=256m -Dosgi.ws=cocoa -XstartOnFirstThread</tycho.test.jvmArgs>
- <osgi.ws>cocoa</osgi.ws>
- </properties>
- </profile>
- </profiles>
-</project> \ No newline at end of file
diff --git a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/.project b/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/.project
deleted file mode 100644
index 7c3bbe5b7..000000000
--- a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.obr-aggregator</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/.settings/org.maven.ide.eclipse.prefs b/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/.settings/org.maven.ide.eclipse.prefs
deleted file mode 100644
index cfad75109..000000000
--- a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/.settings/org.maven.ide.eclipse.prefs
+++ /dev/null
@@ -1,9 +0,0 @@
-#Mon Mar 15 12:27:44 EDT 2010
-activeProfiles=
-eclipse.preferences.version=1
-fullBuildGoals=process-test-resources
-includeModules=false
-resolveWorkspaceProjects=true
-resourceFilterGoals=process-resources resources\:testResources
-skipCompilerPlugin=true
-version=1
diff --git a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/obr.target b/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/obr.target
deleted file mode 100644
index 1b8b78cec..000000000
--- a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/obr.target
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?pde version="3.6"?>
-
-<target name="p2">
-<locations>
-<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
-<unit id="org.eclipse.sdk.ide" version="3.6.0.I20100312-1448"/>
-<repository location="http://download.eclipse.org/eclipse/updates/3.6-I-builds"/>
-</location>
-</locations>
-<includeBundles>
-<plugin id="org.eclipse.ecf.filetransfer"/>
-<plugin id="org.sat4j.core"/>
-<plugin id="org.eclipse.core.net"/>
-<plugin id="org.eclipse.ecf.provider.filetransfer.ssl"/>
-<plugin id="org.eclipse.ecf.provider.filetransfer"/>
-<plugin id="org.eclipse.osgi"/>
-<plugin id="org.eclipse.osgi.services"/>
-<plugin id="org.eclipse.ecf"/>
-<plugin id="org.eclipse.core.jobs"/>
-<plugin id="org.eclipse.equinox.preferences"/>
-<plugin id="org.eclipse.ecf.ssl"/>
-<plugin id="org.eclipse.ecf.identity"/>
-<plugin id="org.eclipse.equinox.security"/>
-<plugin id="org.eclipse.equinox.common"/>
-<plugin id="org.eclipse.equinox.registry"/>
-<plugin id="org.sat4j.pb"/>
-<plugin id="org.eclipse.equinox.ds"/>
-<plugin id="org.eclipse.equinox.security.macosx"/>
-</includeBundles>
-</target>
diff --git a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/pom.xml b/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/pom.xml
deleted file mode 100644
index b3eddc4f4..000000000
--- a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/pom.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version>
- <relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.obr</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>pom</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <resolver>p2</resolver>
- <target>
- <artifact>
- <groupId>${project.groupId}</groupId>
- <artifactId>${project.artifactId}</artifactId>
- <version>${project.version}</version>
- <classifier>obr</classifier>
- </artifact>
- </target>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <modules>
- <module>../org.eclipse.equinox.p2.core</module>
- <module>../org.eclipse.equinox.p2.metadata</module>
- <module>../org.eclipse.equinox.p2.repository</module>
- <module>../org.eclipse.equinox.p2.planner</module>
- </modules>
-</project> \ No newline at end of file
diff --git a/org.eclipse.equinox.p2.releng/p2_users_R_3_6_api_cleanup_projectSet.psf b/org.eclipse.equinox.p2.releng/p2_users_R_3_6_api_cleanup_projectSet.psf
deleted file mode 100644
index c86475bb6..000000000
--- a/org.eclipse.equinox.p2.releng/p2_users_R_3_6_api_cleanup_projectSet.psf
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<psf version="2.0">
-<provider id="org.eclipse.team.cvs.core.cvsnature">
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/eclipse,pde/ui/org.eclipse.pde.core,org.eclipse.pde.core,HEAD"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/eclipse,pde/ui/org.eclipse.pde.ui,org.eclipse.pde.ui,HEAD"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/eclipse,pde/ui/org.eclipse.pde.ui.tests,org.eclipse.pde.ui.tests,HEAD"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/eclipse,pde/build/org.eclipse.pde.build,org.eclipse.pde.build,HEAD"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/eclipse,pde/build/org.eclipse.pde.build.tests,org.eclipse.pde.build.tests,HEAD"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/eclipse,org.eclipse.ui.ide,org.eclipse.ui.ide,HEAD"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/webtools,servertools/plugins/org.eclipse.wst.server.discovery,org.eclipse.wst.server.discovery,HEAD"/>
-</provider>
-</psf> \ No newline at end of file
diff --git a/org.eclipse.equinox.p2.releng/projectSet-extssh.psf b/org.eclipse.equinox.p2.releng/projectSet-extssh.psf
deleted file mode 100644
index e553a00ea..000000000
--- a/org.eclipse.equinox.p2.releng/projectSet-extssh.psf
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<psf version="2.0">
-<provider id="org.eclipse.team.cvs.core.cvsnature">
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/ie.wombat.jbdiff,ie.wombat.jbdiff"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/ie.wombat.jbdiff.test,ie.wombat.jbdiff.test"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin.equinox,org.eclipse.equinox.frameworkadmin.equinox"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin,org.eclipse.equinox.frameworkadmin"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin.test,org.eclipse.equinox.frameworkadmin.test"/>
-
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator,org.eclipse.equinox.p2-aggregator"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent,org.eclipse.equinox.p2-parent"/>
-
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.optimizers,org.eclipse.equinox.p2.artifact.optimizers"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.processors,org.eclipse.equinox.p2.artifact.processors"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.repository,org.eclipse.equinox.p2.artifact.repository"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.console,org.eclipse.equinox.p2.console"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.core,org.eclipse.equinox.p2.core"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.director,org.eclipse.equinox.p2.director"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.director.app,org.eclipse.equinox.p2.director.app"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.directorywatcher,org.eclipse.equinox.p2.directorywatcher"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.discovery,org.eclipse.equinox.p2.discovery"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.discovery.compatibility,org.eclipse.equinox.p2.discovery.compatibility"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.engine,org.eclipse.equinox.p2.engine"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.extensionlocation,org.eclipse.equinox.p2.extensionlocation"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.garbagecollector,org.eclipse.equinox.p2.garbagecollector"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.installer,org.eclipse.equinox.p2.installer"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.jarprocessor,org.eclipse.equinox.p2.jarprocessor"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata,org.eclipse.equinox.p2.metadata"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.generator,org.eclipse.equinox.p2.metadata.generator"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.repository,org.eclipse.equinox.p2.metadata.repository"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.operations,org.eclipse.equinox.p2.operations"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.publisher"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ql,org.eclipse.equinox.p2.ql"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.p2.reconciler.dropins"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng,org.eclipse.equinox.p2.releng"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.repository,org.eclipse.equinox.p2.repository"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.repository.tools,org.eclipse.equinox.p2.repository.tools"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.sar,org.eclipse.equinox.p2.sar"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests,org.eclipse.equinox.p2.tests"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.discovery,org.eclipse.equinox.p2.tests.discovery"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.optimizers,org.eclipse.equinox.p2.tests.optimizers"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.ui,org.eclipse.equinox.p2.tests.ui"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.verifier,org.eclipse.equinox.p2.tests.verifier"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.testserver,org.eclipse.equinox.p2.testserver"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.equinox.p2.touchpoint.eclipse"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.touchpoint.natives,org.eclipse.equinox.p2.touchpoint.natives"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui,org.eclipse.equinox.p2.user.ui"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui,org.eclipse.equinox.p2.ui"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.discovery,org.eclipse.equinox.p2.ui.discovery"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.admin,org.eclipse.equinox.p2.ui.admin"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.admin.rcp,org.eclipse.equinox.p2.ui.admin.rcp"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.sdk,org.eclipse.equinox.p2.ui.sdk"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler,org.eclipse.equinox.p2.ui.sdk.scheduler"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.updatechecker,org.eclipse.equinox.p2.updatechecker"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.p2.updatesite"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.simpleconfigurator.manipulator,org.eclipse.equinox.simpleconfigurator.manipulator"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.simpleconfigurator,org.eclipse.equinox.simpleconfigurator"/>
-
-
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/eclipse,org.eclipse.core.tests.harness,org.eclipse.core.tests.harness"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/eclipse,org.eclipse.test.performance,org.eclipse.test.performance"/>
-
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http,org.eclipse.equinox.http"/>
-
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/org.sat4j.core,org.sat4j.core_v2.2.0,v2_2_0"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/org.sat4j.pb,org.sat4j.pb_v2.2.0,v2_2_0"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/org.easymock,org.easymock,v2_4"/>
-
-</provider>
-</psf>
diff --git a/org.eclipse.equinox.p2.releng/projectSet.psf b/org.eclipse.equinox.p2.releng/projectSet.psf
deleted file mode 100644
index 744b29086..000000000
--- a/org.eclipse.equinox.p2.releng/projectSet.psf
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<psf version="2.0">
-<provider id="org.eclipse.team.cvs.core.cvsnature">
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/ie.wombat.jbdiff,ie.wombat.jbdiff"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/ie.wombat.jbdiff.test,ie.wombat.jbdiff.test"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin.equinox,org.eclipse.equinox.frameworkadmin.equinox"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin,org.eclipse.equinox.frameworkadmin"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin.test,org.eclipse.equinox.frameworkadmin.test"/>
-
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.optimizers,org.eclipse.equinox.p2.artifact.optimizers"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.processors,org.eclipse.equinox.p2.artifact.processors"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.repository,org.eclipse.equinox.p2.artifact.repository"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.console,org.eclipse.equinox.p2.console"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.core,org.eclipse.equinox.p2.core"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.director,org.eclipse.equinox.p2.director"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.director.app,org.eclipse.equinox.p2.director.app"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.directorywatcher,org.eclipse.equinox.p2.directorywatcher"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.discovery,org.eclipse.equinox.p2.discovery"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.discovery.compatibility,org.eclipse.equinox.p2.discovery.compatibility"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.engine,org.eclipse.equinox.p2.engine"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.extensionlocation,org.eclipse.equinox.p2.extensionlocation"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.garbagecollector,org.eclipse.equinox.p2.garbagecollector"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.installer,org.eclipse.equinox.p2.installer"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.jarprocessor,org.eclipse.equinox.p2.jarprocessor"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata,org.eclipse.equinox.p2.metadata"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.generator,org.eclipse.equinox.p2.metadata.generator"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.repository,org.eclipse.equinox.p2.metadata.repository"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.operations,org.eclipse.equinox.p2.operations"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.publisher"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ql,org.eclipse.equinox.p2.ql"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.p2.reconciler.dropins"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng,org.eclipse.equinox.p2.releng"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.repository,org.eclipse.equinox.p2.repository"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.repository.tools,org.eclipse.equinox.p2.repository.tools"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.sar,org.eclipse.equinox.p2.sar"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests,org.eclipse.equinox.p2.tests"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.discovery,org.eclipse.equinox.p2.tests.discovery"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.optimizers,org.eclipse.equinox.p2.tests.optimizers"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.ui,org.eclipse.equinox.p2.tests.ui"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.verifier,org.eclipse.equinox.p2.tests.verifier"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.testserver,org.eclipse.equinox.p2.testserver"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.equinox.p2.touchpoint.eclipse"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.touchpoint.natives,org.eclipse.equinox.p2.touchpoint.natives"/>
-
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui,org.eclipse.equinox.p2.ui"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.admin,org.eclipse.equinox.p2.ui.admin"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.admin.rcp,org.eclipse.equinox.p2.ui.admin.rcp"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.discovery,org.eclipse.equinox.p2.ui.discovery"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.sdk,org.eclipse.equinox.p2.ui.sdk"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler,org.eclipse.equinox.p2.ui.sdk.scheduler"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.updatechecker,org.eclipse.equinox.p2.updatechecker"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.p2.updatesite"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator,org.eclipse.equinox.p2-aggregator"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent,org.eclipse.equinox.p2-parent"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui,org.eclipse.equinox.p2.user.ui"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.simpleconfigurator.manipulator,org.eclipse.equinox.simpleconfigurator.manipulator"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.simpleconfigurator,org.eclipse.equinox.simpleconfigurator"/>
-
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/eclipse,org.eclipse.core.tests.harness,org.eclipse.core.tests.harness"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/eclipse,org.eclipse.test.performance,org.eclipse.test.performance"/>
-
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http,org.eclipse.equinox.http"/>
-
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/org.sat4j.core,org.sat4j.core_v2.2.0,v2_2_0"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/org.sat4j.pb,org.sat4j.pb_v2.2.0,v2_2_0"/>
-
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/org.easymock,org.easymock,v2_4"/>
-
-</provider>
-</psf>

Back to the top