Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordj2011-09-07 15:55:32 +0000
committerdj2011-09-07 15:55:32 +0000
commitcca13ad4e969670bcb3025d11ac5ec6b31c1ebf3 (patch)
tree159e86152f128e810a0a40eb8e72cd9805b83620
parent335a33422606f5d409e8eb5b727a56206adf93ac (diff)
parent56435dc1aabbeeda28b95f1e990db2c564a663fb (diff)
downloadrt.equinox.p2-cca13ad4e969670bcb3025d11ac5ec6b31c1ebf3.tar.gz
rt.equinox.p2-cca13ad4e969670bcb3025d11ac5ec6b31c1ebf3.tar.xz
rt.equinox.p2-cca13ad4e969670bcb3025d11ac5ec6b31c1ebf3.zip
Merge remote branch 'origin/master'
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/.options2
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DebugHelper.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CertificateChecker.java37
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/All p2 Tests.launch2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/AllTests.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/MirrorRequestTest2.java157
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllTests.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TestNoopChangeRequest.java44
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/Activator.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/IntermittentTimeout.java83
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/emptyJarRepo/artifacts.xml52
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/emptyJarRepo/mirror-two/plugins/HelloWorldText_1.0.0.txt1
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/emptyJarRepo/mirrors.xml5
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/emptyJarRepo/plugins/HelloWorldText_1.0.0.txt1
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/emptyJarRepo/readme.txt12
-rw-r--r--bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java46
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/.gitignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/.project39
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/.settings/.api_filters11
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/.settings/org.eclipse.jdt.core.prefs329
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/META-INF/MANIFEST.MF29
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/OSGI-INF/licenseManager_component.xml7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/OSGI-INF/policy_component.xml7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/build.properties20
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/plugin.properties30
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/plugin.xml124
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/pom.xml15
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/IProvSDKHelpContextIds.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java56
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java152
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java47
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java159
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/SDKPolicy.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java92
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java68
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties31
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java67
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java151
45 files changed, 455 insertions, 1661 deletions
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml b/bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml
index b71cce1fa..1a61df72c 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml
@@ -10,6 +10,6 @@
</parent>
<groupId>org.eclipse</groupId>
<artifactId>org.eclipse.equinox.frameworkadmin.equinox</artifactId>
- <version>1.0.300-SNAPSHOT</version>
+ <version>1.0.400-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
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 e8d6be1e7..63447fd65 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
@@ -21,7 +21,8 @@ import org.eclipse.equinox.internal.p2.director.Explanation.MissingIU;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.p2.metadata.query.UpdateQuery;
import org.eclipse.equinox.internal.p2.rollback.FormerState;
-import org.eclipse.equinox.internal.provisional.p2.director.*;
+import org.eclipse.equinox.internal.provisional.p2.director.PlannerStatus;
+import org.eclipse.equinox.internal.provisional.p2.director.RequestStatus;
import org.eclipse.equinox.p2.core.IAgentLocation;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.engine.*;
@@ -93,7 +94,9 @@ public class SimplePlanner implements IPlanner {
private Map<IInstallableUnit, RequestStatus>[] computeActualChangeRequest(Collection<IInstallableUnit> toState, ProfileChangeRequest changeRequest) {
Collection<IInstallableUnit> requestedAdditions = changeRequest.getAdditions();
- Collection<IInstallableUnit> requestedRemovals = changeRequest.getRemovals();
+ Collection<IInstallableUnit> requestedRemovals = new ArrayList<IInstallableUnit>(changeRequest.getRemovals());
+ requestedRemovals.removeAll(requestedAdditions);
+
Map<IInstallableUnit, RequestStatus> requestStatus = new HashMap<IInstallableUnit, RequestStatus>(requestedAdditions.size() + requestedRemovals.size());
for (IInstallableUnit added : requestedAdditions) {
if (toState.contains(added))
diff --git a/bundles/org.eclipse.equinox.p2.engine/.options b/bundles/org.eclipse.equinox.p2.engine/.options
index 0792967be..04cd230d9 100644
--- a/bundles/org.eclipse.equinox.p2.engine/.options
+++ b/bundles/org.eclipse.equinox.p2.engine/.options
@@ -1,3 +1,5 @@
org.eclipse.equinox.p2.engine/profileregistry/debug = false
org.eclipse.equinox.p2.engine/engine/debug = false
org.eclipse.equinox.p2.engine/enginesession/debug = false
+org.eclipse.equinox.p2.engine/certificatechecker/unsigned = false
+org.eclipse.equinox.p2.engine/certificatechecker/untrusted = false \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DebugHelper.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DebugHelper.java
index c6283ac76..0726908d9 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DebugHelper.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DebugHelper.java
@@ -27,6 +27,8 @@ public class DebugHelper {
public static final boolean DEBUG_PROFILE_REGISTRY;
public static final boolean DEBUG_ENGINE;
public static final boolean DEBUG_ENGINE_SESSION;
+ public static final boolean DEBUG_CERTIFICATE_CHECKER_UNSIGNED;
+ public static final boolean DEBUG_CERTIFICATE_CHECKER_UNTRUSTED;
static {
DebugOptions options = (DebugOptions) ServiceHelper.getService(EngineActivator.getContext(), DebugOptions.class.getName());
@@ -34,10 +36,14 @@ public class DebugHelper {
DEBUG_PROFILE_REGISTRY = options.getBooleanOption(EngineActivator.ID + "/profileregistry/debug", false); //$NON-NLS-1$
DEBUG_ENGINE = options.getBooleanOption(EngineActivator.ID + "/engine/debug", false); //$NON-NLS-1$
DEBUG_ENGINE_SESSION = options.getBooleanOption(EngineActivator.ID + "/enginesession/debug", false); //$NON-NLS-1$
+ DEBUG_CERTIFICATE_CHECKER_UNSIGNED = options.getBooleanOption(EngineActivator.ID + "/certificatechecker/unsigned", false); //$NON-NLS-1$
+ DEBUG_CERTIFICATE_CHECKER_UNTRUSTED = options.getBooleanOption(EngineActivator.ID + "/certificatechecker/untrusted", false); //$NON-NLS-1$
} else {
DEBUG_PROFILE_REGISTRY = false;
DEBUG_ENGINE = false;
DEBUG_ENGINE_SESSION = false;
+ DEBUG_CERTIFICATE_CHECKER_UNSIGNED = false;
+ DEBUG_CERTIFICATE_CHECKER_UNTRUSTED = false;
}
}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java
index 3ad54c108..0c679a59f 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java
@@ -63,9 +63,6 @@ public class ProvisioningPlan implements IProvisioningPlan {
return profile;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.IProvisioningPlan#getOperands()
- */
public Operand[] getOperands() {
return operands.toArray(new Operand[operands.size()]);
}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CertificateChecker.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CertificateChecker.java
index 397cd6da9..53881b522 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CertificateChecker.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CertificateChecker.java
@@ -14,11 +14,10 @@ import java.io.File;
import java.io.IOException;
import java.security.GeneralSecurityException;
import java.security.cert.Certificate;
-import java.util.ArrayList;
+import java.util.*;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.engine.EngineActivator;
-import org.eclipse.equinox.internal.p2.engine.Messages;
+import org.eclipse.equinox.internal.p2.engine.*;
import org.eclipse.equinox.p2.core.*;
import org.eclipse.equinox.p2.core.UIServices.TrustInfo;
import org.eclipse.osgi.service.security.TrustEngine;
@@ -29,6 +28,8 @@ import org.osgi.framework.ServiceReference;
import org.osgi.util.tracker.ServiceTracker;
public class CertificateChecker {
+ private static final String CC = "certificate checker";
+
private ArrayList<File> artifacts;
private final IProvisioningAgent agent;
@@ -59,6 +60,7 @@ public class CertificateChecker {
ArrayList<Certificate> untrusted = new ArrayList<Certificate>();
ArrayList<File> unsigned = new ArrayList<File>();
ArrayList<Certificate[]> untrustedChain = new ArrayList<Certificate[]>();
+ Map<Certificate, Collection<File>> untrustedArtifacts = new HashMap<Certificate, Collection<File>>();
IStatus status = Status.OK_STATUS;
if (artifacts.size() == 0 || serviceUI == null)
return status;
@@ -82,6 +84,35 @@ public class CertificateChecker {
untrusted.add(certificateChain[0]);
untrustedChain.add(certificateChain);
}
+ if (DebugHelper.DEBUG_CERTIFICATE_CHECKER_UNTRUSTED) {
+ if (untrustedArtifacts.containsKey(certificateChain[0])) {
+ untrustedArtifacts.get(certificateChain[0]).add(artifact);
+ } else {
+ untrustedArtifacts.put(certificateChain[0], new ArrayList<File>(Arrays.asList(artifact)));
+ }
+ }
+ }
+
+ // log the unsigned artifacts if requested
+ if (DebugHelper.DEBUG_CERTIFICATE_CHECKER_UNSIGNED && !unsigned.isEmpty()) {
+ StringBuilder message = new StringBuilder("The following artifacts are unsigned:\n"); //$NON-NLS-1$
+ for (File file : unsigned) {
+ message.append(NLS.bind(" {0}\n", file.getPath())); //$NON-NLS-1$
+ }
+ DebugHelper.debug(CC, message.toString());
+ }
+
+ // log the untrusted certificates if requested
+ if (DebugHelper.DEBUG_CERTIFICATE_CHECKER_UNTRUSTED && !untrusted.isEmpty()) {
+ StringBuilder message = new StringBuilder("The following certificates are untrusted:\n"); //$NON-NLS-1$
+ for (Certificate cert : untrustedArtifacts.keySet()) {
+ message.append(cert.toString() + "\n"); //$NON-NLS-1$
+ message.append(" used by the following artifacts:\n"); //$NON-NLS-1$
+ for (File file : untrustedArtifacts.get(cert)) {
+ message.append(NLS.bind(" {0}\n", file.getPath())); //$NON-NLS-1$
+ }
+ }
+ DebugHelper.debug(CC, message.toString());
}
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/All p2 Tests.launch b/bundles/org.eclipse.equinox.p2.tests/All p2 Tests.launch
index e6bb76b06..e28d16008 100644
--- a/bundles/org.eclipse.equinox.p2.tests/All p2 Tests.launch
+++ b/bundles/org.eclipse.equinox.p2.tests/All p2 Tests.launch
@@ -57,7 +57,7 @@
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consolelog -console"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.tests"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dorg.eclipse.equinox.p2.reconciler.tests.platform.archive=c:/dev/platform/zips/eclipse-platform-3.6M6-win32.zip&#13;&#10;-Dorg.eclipse.equinox.p2.reconciler.tests.35.platform.archive=c:/dev/platform/zips/eclipse-platform-3.5-win32.zip&#13;&#10;-Dorg.eclipse.equinox.p2.repository&#13;&#10;-Dorg.eclipse.equinox.p2.tests.current.build.repo=http://eclipsebuildserv/3.6-I-builds/&#13;&#13;&#10;-Xmx512m"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dorg.eclipse.equinox.p2.reconciler.tests.platform.archive=c:/dev/platform/zips/eclipse-platform-3.6M6-win32.zip&#13;&#10;-Dorg.eclipse.equinox.p2.reconciler.tests.35.platform.archive=c:/dev/platform/zips/eclipse-platform-3.5-win32.zip&#13;&#10;-Dorg.eclipse.equinox.p2.repository&#13;&#10;-Dorg.eclipse.equinox.p2.tests.current.build.repo=http://eclipsebuildserv/3.6-I-builds/&#13;&#13;&#10;-Xmx512m&#10;-Dorg.eclipse.ecf.provider.filetransfer.httpclient.browse.connectTimeout=10000&#10;-Dorg.eclipse.ecf.provider.filetransfer.httpclient.retrieve.connectTimeout=10000&#10;-Dorg.eclipse.ecf.provider.filetransfer.httpclient.retrieve.readTimeout=10000"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
<booleanAttribute key="run_in_ui_thread" value="true"/>
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/AllTests.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/AllTests.java
index 74095af3b..7dade7be2 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/AllTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/AllTests.java
@@ -35,6 +35,7 @@ public class AllTests extends TestCase {
suite.addTestSuite(MD5Tests.class);
suite.addTestSuite(MirrorSelectorTest.class);
suite.addTestSuite(MirrorRequestTest.class);
+ suite.addTestSuite(MirrorRequestTest2.class);
suite.addTestSuite(SimpleArtifactRepositoryTest.class);
suite.addTestSuite(TransferTest.class);
return suite;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/MirrorRequestTest2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/MirrorRequestTest2.java
new file mode 100644
index 000000000..0c9d67cbe
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/MirrorRequestTest2.java
@@ -0,0 +1,157 @@
+package org.eclipse.equinox.p2.tests.artifact.repository;
+
+import java.io.File;
+import java.io.OutputStream;
+import java.lang.reflect.Field;
+import java.net.URI;
+import java.util.HashMap;
+import java.util.Map;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest;
+import org.eclipse.equinox.internal.p2.artifact.repository.MirrorSelector;
+import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository;
+import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
+import org.eclipse.equinox.internal.p2.repository.Transport;
+import org.eclipse.equinox.internal.p2.transport.ecf.RepositoryTransport;
+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.IRepository;
+import org.eclipse.equinox.p2.repository.artifact.*;
+import org.eclipse.equinox.p2.repository.artifact.spi.AbstractArtifactRepository;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+import org.eclipse.equinox.p2.tests.testserver.helper.AbstractTestServerClientCase;
+
+public class MirrorRequestTest2 extends AbstractTestServerClientCase {
+
+ private SimpleArtifactRepository sourceRepository;
+ private File targetLocation;
+ private SimpleArtifactRepository targetRepository;
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ targetLocation = File.createTempFile("target", ".repo");
+ targetLocation.delete();
+ targetLocation.mkdirs();
+ targetRepository = new SimpleArtifactRepository(getAgent(), "TargetRepo", targetLocation.toURI(), null);
+
+ URI location = URI.create(getBaseURL() + "/mirrorrequest");
+
+ IArtifactRepositoryManager mgr = (IArtifactRepositoryManager) getAgent().getService(IArtifactRepositoryManager.SERVICE_NAME);
+ sourceRepository = (SimpleArtifactRepository) mgr.loadRepository(location, null);
+ }
+
+ public void tearDown() throws Exception {
+ IArtifactRepositoryManager mgr = (IArtifactRepositoryManager) getAgent().getService(IArtifactRepositoryManager.SERVICE_NAME);
+ mgr.removeRepository(targetLocation.toURI());
+ AbstractProvisioningTest.delete(targetLocation);
+ super.tearDown();
+ }
+
+ public void testRetryMirrorAfterTimeout() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
+ // call test
+ IArtifactKey key = new ArtifactKey("test.txt", "HelloWorldText", Version.parseVersion("1.0.0"));
+ MirrorRequest request = new MirrorRequest(key, targetRepository, null, null, (Transport) getAgent().getService(Transport.SERVICE_NAME));
+ MirrorRepo mirrorRepo = new MirrorRepo(sourceRepository);
+ Field field = sourceRepository.getClass().getDeclaredField("mirrors");
+ field.setAccessible(true);
+ field.set(sourceRepository, new MirrorSelector(mirrorRepo, (Transport) getAgent().getService(Transport.SERVICE_NAME)) {
+ private int count = 0;
+
+ @Override
+ public synchronized URI getMirrorLocation(URI inputLocation, IProgressMonitor monitor) {
+ if (count++ == 0) {
+ return inputLocation;
+ }
+ return URI.create(getBaseURL() + "/mirrorrequest/mirror-two/plugins/HelloWorldText_1.0.0.txt");
+ }
+
+ @Override
+ public synchronized boolean hasValidMirror() {
+ return true;
+ }
+ });
+
+ request.perform(mirrorRepo, new NullProgressMonitor());
+
+ // The download succeeded
+ assertTrue(request.getResult().toString(), request.getResult().isOK());
+ }
+
+ public void testTimeoutForgivableAfterTimeout() {
+ try {
+ System.setProperty(RepositoryTransport.TIMEOUT_RETRY, "4");
+ // call test
+ IArtifactKey key = new ArtifactKey("test.txt", "HelloWorldText", Version.parseVersion("1.0.0"));
+ MirrorRequest request = new MirrorRequest(key, targetRepository, null, null, (Transport) getAgent().getService(Transport.SERVICE_NAME));
+ request.perform(sourceRepository, new NullProgressMonitor());
+
+ // The download succeeded
+ assertTrue(request.getResult().toString(), request.getResult().isOK());
+ } finally {
+ System.clearProperty(RepositoryTransport.TIMEOUT_RETRY);
+ }
+ }
+
+ protected class MirrorRepo extends AbstractArtifactRepository {
+ SimpleArtifactRepository delegate;
+ int downloadCount = 0;
+
+ MirrorRepo(SimpleArtifactRepository repo) {
+ super(getAgent(), repo.getName(), repo.getType(), repo.getVersion(), repo.getLocation(), repo.getDescription(), repo.getProvider(), repo.getProperties());
+ delegate = repo;
+ }
+
+ @Override
+ public String getProperty(String key) {
+ return getProperties().get(key);
+ }
+
+ @Override
+ public synchronized Map<String, String> getProperties() {
+ Map<String, String> newProperties = new HashMap<String, String>(super.getProperties());
+ newProperties.put(IRepository.PROP_MIRRORS_URL, getBaseURL() + "/mirrorrequest/mirrors.xml");
+ newProperties.put(IRepository.PROP_MIRRORS_BASE_URL, getBaseURL() + "/mirrorrequest");
+ return newProperties;
+ }
+
+ 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) {
+ downloadCount++;
+ 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 {
+ return delegate.getOutputStream(descriptor);
+ }
+
+ public IStatus getRawArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
+ return delegate.getRawArtifact(descriptor, destination, monitor);
+ }
+
+ public IQueryable<IArtifactDescriptor> descriptorQueryable() {
+ return delegate.descriptorQueryable();
+ }
+
+ public IQueryResult<IArtifactKey> query(IQuery<IArtifactKey> query, IProgressMonitor monitor) {
+ return delegate.query(query, monitor);
+ }
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllTests.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllTests.java
index 0ec488de4..3a02876c1 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllTests.java
@@ -152,6 +152,7 @@ public class AllTests extends TestCase {
suite.addTestSuite(SingletonOptionallyInstalled2.class);
suite.addTestSuite(SWTFragment.class);
suite.addTestSuite(SynchronizeOperationTest.class);
+ suite.addTestSuite(TestNoopChangeRequest.class);
suite.addTestSuite(TopLevelFilterTest.class);
suite.addTestSuite(TwoVersionsOfWSDL.class);
suite.addTestSuite(UninstallEverything.class);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TestNoopChangeRequest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TestNoopChangeRequest.java
new file mode 100644
index 000000000..7f02ee651
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TestNoopChangeRequest.java
@@ -0,0 +1,44 @@
+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.internal.provisional.p2.director.PlannerStatus;
+import org.eclipse.equinox.internal.provisional.p2.director.RequestStatus;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+
+public class TestNoopChangeRequest extends AbstractProvisioningTest {
+
+ private IInstallableUnit a;
+ private IPlanner planner;
+ private IEngine engine;
+ private IProfile profile;
+
+ @Override
+ protected void setUp() throws Exception {
+ // TODO Auto-generated method stub
+ super.setUp();
+
+ a = createIU("A");
+
+ createTestMetdataRepository(new IInstallableUnit[] {a});
+
+ planner = createPlanner();
+ engine = createEngine();
+ profile = createProfile("TestProfile." + getName());
+ assertOK(install(profile, new IInstallableUnit[] {a}, true, planner, engine));
+ }
+
+ public void testNoopInstall() {
+ ProfileChangeRequest pcr = new ProfileChangeRequest(profile);
+ pcr.add(a);
+ pcr.remove(a);
+ IProvisioningPlan plan = planner.getProvisioningPlan(pcr, null, new NullProgressMonitor());
+ PlannerStatus plannerStatus = plan.getStatus() instanceof PlannerStatus ? (PlannerStatus) plan.getStatus() : null;
+ RequestStatus rs = plannerStatus.getRequestChanges().get(a);
+ assertEquals(IStatus.OK, rs.getSeverity());
+ }
+}
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
index 746d63487..90cbd16ac 100644
--- 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
@@ -17,6 +17,7 @@ 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.IntermittentTimeout;
import org.eclipse.equinox.p2.testserver.servlets.LastModifiedLier;
import org.eclipse.equinox.p2.testserver.servlets.Redirector;
import org.eclipse.equinox.p2.testserver.servlets.StatusCodeResponse;
@@ -70,9 +71,11 @@ public class Activator implements BundleActivator, ServiceTrackerCustomizer {
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.registerResources("/mirrorrequest", "/webfiles/emptyJarRepo", null); //$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("/mirrorrequest", new IntermittentTimeout("/mirrorrequest", URI.create("http://localhost:" + System.getProperty("org.osgi.service.http.port", "8080") + "/public/emptyJarRepo")), null, null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
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$
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/IntermittentTimeout.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/IntermittentTimeout.java
new file mode 100644
index 000000000..ac17e7ad5
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/IntermittentTimeout.java
@@ -0,0 +1,83 @@
+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.HttpConstants;
+
+public class IntermittentTimeout extends BasicResourceDelivery {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 2216234319571297257L;
+ int count = 1;
+
+ public IntermittentTimeout(String theAlias, URI thePath) {
+ super(theAlias, thePath);
+ }
+
+ 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 */
+
+ doDelay(filename, 150);
+
+ 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 */
+
+ doDelay(filename, 150);
+
+ byte buffer[] = new byte[4096];
+ int read;
+ while ((read = in.read(buffer, 0, buffer.length)) != -1) {
+ out.write(buffer, 0, read);
+ out.flush();
+ }
+ }
+ }
+ }
+
+ private void doDelay(String filename, int seconds) {
+ if (filename.endsWith("emptyJarRepo/plugins/HelloWorldText_1.0.0.txt") && (count++ % 3 != 0)) {//$NON-NLS-1$
+ try {
+ Thread.sleep(1000 * seconds);
+ } catch (InterruptedException e) {
+ // ignore
+ }
+ }
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/emptyJarRepo/artifacts.xml b/bundles/org.eclipse.equinox.p2.testserver/webfiles/emptyJarRepo/artifacts.xml
new file mode 100644
index 000000000..914362402
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.testserver/webfiles/emptyJarRepo/artifacts.xml
@@ -0,0 +1,52 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?artifactRepository class='org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository' version='1.0.0'?>
+<repository name='HelloWorld Artifacts' type='org.eclipse.equinox.p2.artifact.repository.simpleRepository' version='1.0.0'>
+ <properties size='5'>
+ <property name='publishPackFilesAsSiblings' value='true'/>
+ <property name='p2.compressed' value='false'/>
+ <property name='p2.timestamp' value='1222368069078'/>
+ <property name='eclipse.p2.force.threading' value='true'/>
+ <property name='p2.mirrorsURL' value='mirrors.xml'/>
+ </properties>
+ <mappings size='6'>
+ <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))' output='${repoUrl}/features/${id}_${version}.jar'/>
+ <rule filter='(&amp; (classifier=test.txt) (format=packed))' output='${repoUrl}/plugins/${id}_${version}.txt.pack.gz'/>
+ <rule filter='(&amp; (classifier=test.txt))' output='${repoUrl}/plugins/${id}_${version}.txt'/>
+ </mappings>
+ <artifacts size='4'>
+ <artifact classifier='org.eclipse.update.feature' id='HelloWorldFeature' version='1.0.0'>
+ <properties size='2'>
+ <property name='artifact.size' value='0'/>
+ <property name='download.size' value='0'/>
+ </properties>
+ </artifact>
+ <artifact classifier='test.txt' id='HelloWorldText' version='1.0.0'>
+ <properties size='3'>
+ <property name='artifact.size' value='12'/>
+ <property name='download.size' value='12'/>
+ <property name='download.md5' value='ed076287532e86365e841e92bfc50d8c'/>
+ </properties>
+ </artifact>
+ <artifact classifier='test.txt' id='fail_to_canonical' version='1.0.0'>
+ <properties size='3'>
+ <property name='artifact.size' value='12'/>
+ <property name='download.size' value='12'/>
+ <property name='download.md5' value='ed076287532e86365e841e92bfc50d8c'/>
+ </properties>
+ </artifact>
+ <artifact classifier='test.txt' id='fail_to_canonical' version='1.0.0'>
+ <processing size='1'>
+ <step id='org.eclipse.equinox.p2.processing.Pack200Unpacker' required='true'/>
+ </processing>
+ <properties size='4'>
+ <property name='artifact.size' value='12'/>
+ <property name='download.size' value='12'/>
+ <property name='download.md5' value='ed076287532e86365e841e92bfc50d8c'/>
+ <property name='format' value='packed'/>
+ </properties>
+ </artifact>
+ </artifacts>
+</repository> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/emptyJarRepo/mirror-two/plugins/HelloWorldText_1.0.0.txt b/bundles/org.eclipse.equinox.p2.testserver/webfiles/emptyJarRepo/mirror-two/plugins/HelloWorldText_1.0.0.txt
new file mode 100644
index 000000000..c57eff55e
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.testserver/webfiles/emptyJarRepo/mirror-two/plugins/HelloWorldText_1.0.0.txt
@@ -0,0 +1 @@
+Hello World! \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/emptyJarRepo/mirrors.xml b/bundles/org.eclipse.equinox.p2.testserver/webfiles/emptyJarRepo/mirrors.xml
new file mode 100644
index 000000000..9faec8f17
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.testserver/webfiles/emptyJarRepo/mirrors.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<mirrors>
+ <mirror url="mirror-one" label="MirrorOne" />
+ <mirror url="mirror-two" label="MirrorTwo" />
+</mirrors> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/emptyJarRepo/plugins/HelloWorldText_1.0.0.txt b/bundles/org.eclipse.equinox.p2.testserver/webfiles/emptyJarRepo/plugins/HelloWorldText_1.0.0.txt
new file mode 100644
index 000000000..c57eff55e
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.testserver/webfiles/emptyJarRepo/plugins/HelloWorldText_1.0.0.txt
@@ -0,0 +1 @@
+Hello World! \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/emptyJarRepo/readme.txt b/bundles/org.eclipse.equinox.p2.testserver/webfiles/emptyJarRepo/readme.txt
new file mode 100644
index 000000000..133499d32
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.testserver/webfiles/emptyJarRepo/readme.txt
@@ -0,0 +1,12 @@
+
+Artifact: test.txt,HelloWorldText,1.0.0
+ Used by MirrorRequestTest2#testRetryMirrorAfterTimeout()
+ Mirror one: missing file
+ Mirror two: get it
+ Main: intermittent timeout
+
+Artifact: test.txt,HelloWorldText,1.0.0
+ Used by MirrorRequestTest2#testTimeoutForgivableAfterTimeout()
+ Mirror one: missing file
+ Mirror two: won't use
+ Main: intermittent timeout \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java
index bef589f0f..cf433090c 100644
--- a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java
+++ b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java
@@ -16,8 +16,12 @@ import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.ConnectException;
+import java.net.SocketException;
+import java.net.SocketTimeoutException;
import java.net.URI;
import java.net.UnknownHostException;
+import java.util.HashMap;
+import java.util.Map;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -44,6 +48,7 @@ import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.core.UIServices.AuthenticationInfo;
import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
import org.eclipse.osgi.util.NLS;
/**
@@ -54,6 +59,8 @@ import org.eclipse.osgi.util.NLS;
public class RepositoryTransport extends Transport implements IAgentServiceFactory {
private static RepositoryTransport instance;
+ public static final String TIMEOUT_RETRY = "org.eclipse.equinox.p2.transport.ecf.retry"; //$NON-NLS-1$
+ private static Map<URI, Integer> socketExceptionRetry = null;
/**
* Returns an shared instance of Generic Transport
*/
@@ -226,12 +233,51 @@ public class RepositoryTransport extends Transport implements IAgentServiceFacto
throw new AuthenticationFailedException();
}
+ private static boolean isForgiveableException(Throwable t) {
+ if (t instanceof SocketTimeoutException)
+ return true;
+ else if (t instanceof SocketException)
+ return true;
+ return false;
+ }
+
public static DownloadStatus forStatus(IStatus original, URI toDownload) {
Throwable t = original.getException();
+ if (isForgiveableException(t) && original.getCode() == IArtifactRepository.CODE_RETRY)
+ return new DownloadStatus(original.getSeverity(), Activator.ID, original.getCode(), original.getMessage(), t);
return forException(t, toDownload);
}
public static DownloadStatus forException(Throwable t, URI toDownload) {
+ if (isForgiveableException(t)) {
+ String value = System.getProperty(TIMEOUT_RETRY);
+ if (value != null) {
+ try {
+ int retry = Integer.valueOf(value).intValue();
+ if (retry > 0) {
+ Integer retryCount = null;
+ if (socketExceptionRetry == null) {
+ socketExceptionRetry = new HashMap<URI, Integer>();
+ retryCount = new Integer(1);
+ } else {
+ Integer alreadyRetryCount = socketExceptionRetry.get(toDownload);
+ if (alreadyRetryCount == null)
+ retryCount = new Integer(1);
+ else if (alreadyRetryCount.intValue() < retry) {
+ retryCount = new Integer(alreadyRetryCount.intValue() + 1);
+ }
+ }
+ if (retryCount != null) {
+ socketExceptionRetry.put(toDownload, retryCount);
+ return new DownloadStatus(IStatus.ERROR, Activator.ID, IArtifactRepository.CODE_RETRY,
+ NLS.bind(Messages.connection_to_0_failed_on_1_retry_attempt_2, new String[] {toDownload.toString(), t.getMessage(), retryCount.toString()}), t);
+ }
+ }
+ } catch (NumberFormatException e) {
+ // ignore
+ }
+ }
+ }
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)
diff --git a/bundles/org.eclipse.equinox.p2.ui.rcp/.classpath b/bundles/org.eclipse.equinox.p2.ui.rcp/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/.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.rcp/.gitignore b/bundles/org.eclipse.equinox.p2.ui.rcp/.gitignore
deleted file mode 100644
index c5e82d745..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.rcp/.project b/bundles/org.eclipse.equinox.p2.ui.rcp/.project
deleted file mode 100644
index a3eb44ea1..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/.project
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.ui.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.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.rcp/.settings/.api_filters b/bundles/org.eclipse.equinox.p2.ui.rcp/.settings/.api_filters
deleted file mode 100644
index 220218a80..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/.settings/.api_filters
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.equinox.p2.ui.rcp" 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>
-</component>
diff --git a/bundles/org.eclipse.equinox.p2.ui.rcp/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.ui.rcp/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 19b78b9fd..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/.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.rcp/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.ui.rcp/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index dbe72f165..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/.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.rcp/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ui.rcp/META-INF/MANIFEST.MF
deleted file mode 100644
index c07630d63..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,29 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-SymbolicName: org.eclipse.equinox.p2.ui.rcp;singleton:=true
-Bundle-Version: 1.0.0.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
-Import-Package: javax.xml.parsers,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.operations;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.6.0",
- org.w3c.dom,
- org.xml.sax
-Service-Component: OSGI-INF/policy_component.xml, OSGI-INF/licenseManager_component.xml
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
diff --git a/bundles/org.eclipse.equinox.p2.ui.rcp/OSGI-INF/licenseManager_component.xml b/bundles/org.eclipse.equinox.p2.ui.rcp/OSGI-INF/licenseManager_component.xml
deleted file mode 100644
index bdaeb067d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/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.rcp/OSGI-INF/policy_component.xml b/bundles/org.eclipse.equinox.p2.ui.rcp/OSGI-INF/policy_component.xml
deleted file mode 100644
index c02500765..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/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.rcp/about.html b/bundles/org.eclipse.equinox.p2.ui.rcp/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.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.rcp/build.properties b/bundles/org.eclipse.equinox.p2.ui.rcp/build.properties
deleted file mode 100644
index 8be3e849c..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/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.rcp/plugin.properties b/bundles/org.eclipse.equinox.p2.ui.rcp/plugin.properties
deleted file mode 100644
index 62a0cf111..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/plugin.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-###############################################################################
-# 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
-# EclipseSource - Copy to create RCP UI
-###############################################################################
-#
-# Provisioning UI plugin resources
-#
-providerName = Eclipse.org - Equinox
-bundleName=Equinox p2 RCP 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.rcp/plugin.xml b/bundles/org.eclipse.equinox.p2.ui.rcp/plugin.xml
deleted file mode 100644
index 380c82540..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/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.p2.ui.RevertProfilePage"
- id="11.org.eclipse.equinox.internal.p2.ui.sdk.RevertProfilePage">
- </page>
-
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.ui.rcp/pom.xml b/bundles/org.eclipse.equinox.p2.ui.rcp/pom.xml
deleted file mode 100644
index 2bdb355b2..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/pom.xml
+++ /dev/null
@@ -1,15 +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.releng/org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.ui.rcp</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/IProvSDKHelpContextIds.java b/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/IProvSDKHelpContextIds.java
deleted file mode 100644
index c89ab61a5..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/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.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java b/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java
deleted file mode 100644
index 5c6da40e6..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-
-/**
- * InstallNewSoftwareHandler invokes the install wizard
- *
- * @since 3.5
- */
-public class InstallNewSoftwareHandler extends PreloadingRepositoryHandler {
-
- /**
- * The constructor.
- */
- public InstallNewSoftwareHandler() {
- super();
- }
-
- protected void doExecute(LoadMetadataRepositoryJob job) {
- getProvisioningUI().openInstallWizard(null, null, job);
- }
-
- protected boolean waitForPreload() {
- // If the user cannot see repositories, then we may as well wait
- // for existing repos to load so that content is available.
- // If the user can manipulate the repositories, then we don't wait,
- // because we don't know which ones they want to work with.
- return !getProvisioningUI().getPolicy().getRepositoriesVisible();
- }
-
- protected void setLoadJobProperties(Job loadJob) {
- super.setLoadJobProperties(loadJob);
- // If we are doing a background load, we do not wish to authenticate, as the
- // user is unaware that loading was needed
- if (!waitForPreload()) {
- loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_AUTHENTICATION_JOB_MARKER, Boolean.toString(true));
- loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_REPOSITORY_EVENTS, Boolean.toString(true));
- }
- }
-
- @Override
- protected String getProgressTaskName() {
- return ProvSDKMessages.InstallNewSoftwareHandler_ProgressTaskName;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java b/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java
deleted file mode 100644
index e1f89a97a..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * PreloadingRepositoryHandler provides background loading of
- * repositories before executing the provisioning handler.
- *
- * @since 3.5
- */
-abstract class PreloadingRepositoryHandler extends AbstractHandler {
-
- /**
- * The constructor.
- */
- public PreloadingRepositoryHandler() {
- // constructor
- }
-
- /**
- * Execute the command.
- */
- public Object execute(ExecutionEvent event) {
- // Look for a profile. We may not immediately need it in the
- // handler, but if we don't have one, whatever we are trying to do
- // will ultimately fail in a more subtle/low-level way. So determine
- // up front if the system is configured properly.
- String profileId = getProvisioningUI().getProfileId();
- IProvisioningAgent agent = getProvisioningUI().getSession().getProvisioningAgent();
- IProfile profile = null;
- if (agent != null) {
- IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (registry != null) {
- profile = registry.getProfile(profileId);
- }
- }
- if (profile == null) {
- // Inform the user nicely
- MessageDialog.openInformation(null, ProvSDKMessages.Handler_SDKUpdateUIMessageTitle, ProvSDKMessages.Handler_CannotLaunchUI);
- // Log the detailed message
- StatusManager.getManager().handle(ProvSDKUIActivator.getNoSelfProfileStatus());
- } else {
- BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
- public void run() {
- doExecuteAndLoad();
- }
- });
- }
- return null;
- }
-
- void doExecuteAndLoad() {
- if (preloadRepositories()) {
- //cancel any load that is already running
- Job.getJobManager().cancel(LoadMetadataRepositoryJob.LOAD_FAMILY);
- final LoadMetadataRepositoryJob loadJob = new LoadMetadataRepositoryJob(getProvisioningUI()) {
- public IStatus runModal(IProgressMonitor monitor) {
- SubMonitor sub = SubMonitor.convert(monitor, getProgressTaskName(), 1000);
- IStatus status = super.runModal(sub.newChild(500));
- if (status.getSeverity() == IStatus.CANCEL)
- return status;
- try {
- doPostLoadBackgroundWork(sub.newChild(500));
- } catch (OperationCanceledException e) {
- return Status.CANCEL_STATUS;
- }
- return status;
- }
- };
- setLoadJobProperties(loadJob);
- if (waitForPreload()) {
- loadJob.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- if (PlatformUI.isWorkbenchRunning())
- if (event.getResult().isOK()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- doExecute(loadJob);
- }
- });
- }
- }
- });
- loadJob.setUser(true);
- loadJob.schedule();
-
- } else {
- loadJob.setSystem(true);
- loadJob.setUser(false);
- loadJob.schedule();
- doExecute(null);
- }
- } else {
- doExecute(null);
- }
- }
-
- protected abstract String getProgressTaskName();
-
- protected abstract void doExecute(LoadMetadataRepositoryJob job);
-
- protected boolean preloadRepositories() {
- return true;
- }
-
- protected void doPostLoadBackgroundWork(IProgressMonitor monitor) throws OperationCanceledException {
- // default is to do nothing more.
- }
-
- protected boolean waitForPreload() {
- return true;
- }
-
- protected void setLoadJobProperties(Job loadJob) {
- loadJob.setProperty(LoadMetadataRepositoryJob.ACCUMULATE_LOAD_ERRORS, Boolean.toString(true));
- }
-
- protected ProvisioningUI getProvisioningUI() {
- return ProvisioningUI.getDefaultUI();
- }
-
- /**
- * Return a shell appropriate for parenting dialogs of this handler.
- * @return a Shell
- */
- protected Shell getShell() {
- return PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java b/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java
deleted file mode 100644
index 01d537adf..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Message class for provisioning UI messages.
- *
- * @since 3.4
- */
-public class ProvSDKMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.ui.sdk.messages"; //$NON-NLS-1$
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ProvSDKMessages.class);
- }
- public static String Handler_CannotLaunchUI;
- public static String Handler_SDKUpdateUIMessageTitle;
- public static String InstallNewSoftwareHandler_ProgressTaskName;
- public static String PreferenceInitializer_Error;
- public static String ProvisioningPreferencePage_AlwaysOpenWizard;
- public static String ProvisioningPreferencePage_BrowsingPrefsGroup;
- public static String ProvisioningPreferencePage_ShowLatestVersions;
- public static String ProvisioningPreferencePage_ShowAllVersions;
- public static String ProvisioningPreferencePage_NeverOpenWizard;
- public static String ProvisioningPreferencePage_OpenWizardIfInvalid;
- public static String ProvisioningPreferencePage_PromptToOpenWizard;
- public static String ProvisioningPreferencePage_UninstallUpdateLink;
- public static String ProvSDKUIActivator_ErrorSavingPrefs;
- public static String ProvSDKUIActivator_NoSelfProfile;
- public static String ProvSDKUIActivator_OpenWizardAnyway;
- public static String ProvSDKUIActivator_Question;
- public static String SDKPolicy_PrefPageName;
- public static String UpdateHandler_NoSitesMessage;
- public static String UpdateHandler_NoSitesTitle;
- public static String UpdateHandler_ProgressTaskName;
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java b/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java
deleted file mode 100644
index 61ea6c7df..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import java.io.IOException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceConstants;
-import org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceInitializer;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.engine.ProfileScope;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.ui.preferences.ScopedPreferenceStore;
-import org.eclipse.ui.statushandlers.StatusManager;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-/**
- * Activator class for the p2 UI.
- */
-public class ProvSDKUIActivator extends AbstractUIPlugin {
-
- private static ProvSDKUIActivator plugin;
- private static BundleContext context;
- private ScopedPreferenceStore preferenceStore;
-
- private IPropertyChangeListener preferenceListener;
-
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.ui.sdk"; //$NON-NLS-1$
-
- public static BundleContext getContext() {
- return context;
- }
-
- /**
- * Returns the singleton plugin instance
- *
- * @return the instance
- */
- public static ProvSDKUIActivator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in
- * relative path
- *
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- public ProvSDKUIActivator() {
- // constructor
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext bundleContext) throws Exception {
- super.start(bundleContext);
- plugin = this;
- ProvSDKUIActivator.context = bundleContext;
- PreferenceInitializer.migratePreferences();
- getPreferenceStore().addPropertyChangeListener(getPreferenceListener());
- }
-
- private IPropertyChangeListener getPreferenceListener() {
- if (preferenceListener == null) {
- preferenceListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- updateWithPreferences(getPolicy());
- }
- };
- }
- return preferenceListener;
- }
-
- public ProvisioningUI getProvisioningUI() {
- return ProvisioningUI.getDefaultUI();
- }
-
- Policy getPolicy() {
- return getProvisioningUI().getPolicy();
- }
-
- public IProvisioningAgent getProvisioningAgent() {
- return getProvisioningUI().getSession().getProvisioningAgent();
- }
-
- public void stop(BundleContext bundleContext) throws Exception {
- plugin = null;
- getPreferenceStore().removePropertyChangeListener(preferenceListener);
- super.stop(bundleContext);
- }
-
- static IStatus getNoSelfProfileStatus() {
- return new Status(IStatus.WARNING, PLUGIN_ID, ProvSDKMessages.ProvSDKUIActivator_NoSelfProfile);
- }
-
- void updateWithPreferences(Policy policy) {
- policy.setShowLatestVersionsOnly(getPreferenceStore().getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
- }
-
- /*
- * Overridden to use a profile scoped preference store.
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#getPreferenceStore()
- */
- public IPreferenceStore getPreferenceStore() {
- // Create the preference store lazily.
- if (preferenceStore == null) {
- final IAgentLocation agentLocation = getAgentLocation();
- if (agentLocation == null)
- return super.getPreferenceStore();
- preferenceStore = new ScopedPreferenceStore(new ProfileScope(agentLocation, IProfileRegistry.SELF), PLUGIN_ID);
- }
- return preferenceStore;
- }
-
- private IAgentLocation getAgentLocation() {
- ServiceReference<?> ref = getContext().getServiceReference(IAgentLocation.SERVICE_NAME);
- if (ref == null)
- return null;
- IAgentLocation location = (IAgentLocation) getContext().getService(ref);
- getContext().ungetService(ref);
- return location;
- }
-
- public void savePreferences() {
- if (preferenceStore != null)
- try {
- preferenceStore.save();
- } catch (IOException e) {
- StatusManager.getManager().handle(new Status(IStatus.ERROR, PLUGIN_ID, 0, ProvSDKMessages.ProvSDKUIActivator_ErrorSavingPrefs, e), StatusManager.LOG | StatusManager.SHOW);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/SDKPolicy.java b/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/SDKPolicy.java
deleted file mode 100644
index c6149bc17..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/SDKPolicy.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceConstants;
-import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
-import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * SDKPolicy defines the Eclipse SDK UI policies for the
- * p2 UI. The policy is declared as an OSGi service in
- * the policy_component.xml file.
- *
- * @since 3.6
- */
-public class SDKPolicy extends Policy {
-
- public SDKPolicy() {
- // initialize for our values
- setVisibleAvailableIUQuery(QueryUtil.createIUGroupQuery());
- // If this ever changes, we must change AutomaticUpdateSchedule.getProfileQuery()
- setVisibleInstalledIUQuery(new UserVisibleRootQuery());
- setRepositoryPreferencePageId("org.eclipse.equinox.internal.p2.ui.sdk.SitesPreferencePage"); //$NON-NLS-1$
- setRepositoryPreferencePageName(ProvSDKMessages.SDKPolicy_PrefPageName);
- ProvSDKUIActivator.getDefault().updateWithPreferences(this);
- }
-
- public IStatus getNoProfileChosenStatus() {
- return ProvSDKUIActivator.getNoSelfProfileStatus();
- }
-
- public boolean continueWorkingOperation(ProfileChangeOperation operation, Shell shell) {
- // don't continue if superclass has already identified problem scenarios
- boolean ok = super.continueWorkingWithOperation(operation, shell);
- if (!ok)
- return false;
-
- IProvisioningPlan plan = operation.getProvisioningPlan();
- if (plan == null)
- return false;
-
- // Check the preference to see whether to continue.
- IPreferenceStore prefs = ProvSDKUIActivator.getDefault().getPreferenceStore();
- String openPlan = prefs.getString(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN);
- if (MessageDialogWithToggle.ALWAYS.equals(openPlan)) {
- return true;
- }
- if (MessageDialogWithToggle.NEVER.equals(openPlan)) {
- StatusManager.getManager().handle(plan.getStatus(), StatusManager.SHOW | StatusManager.LOG);
- return false;
- }
- MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoCancelQuestion(shell, ProvSDKMessages.ProvSDKUIActivator_Question, ProvSDKMessages.ProvSDKUIActivator_OpenWizardAnyway, null, false, prefs, PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN);
-
- // Any answer but yes will stop the performance of the plan, but NO is interpreted to mean, show me the error.
- if (dialog.getReturnCode() == IDialogConstants.NO_ID)
- StatusManager.getManager().handle(plan.getStatus(), StatusManager.SHOW | StatusManager.LOG);
- return dialog.getReturnCode() == IDialogConstants.YES_ID;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java b/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java
deleted file mode 100644
index 166b2ef4e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Genuitec, LLC - added license support
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import java.util.HashSet;
-import java.util.StringTokenizer;
-import org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceConstants;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.engine.ProfileScope;
-import org.eclipse.equinox.p2.metadata.ILicense;
-import org.eclipse.equinox.p2.ui.LicenseManager;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * SimpleLicenseManager is a license manager that keeps track of
- * IInstallableUnit licenses using their UUID. The licenses ids
- * are stored in the profile's preferences.
- *
- * @since 3.6
- */
-public class SimpleLicenseManager extends LicenseManager {
- java.util.Set<String> accepted = new HashSet<String>();
- String profileId;
-
- public SimpleLicenseManager(String profileId) {
- super();
- this.profileId = profileId;
- initializeFromPreferences();
- }
-
- public SimpleLicenseManager() {
- this(IProfileRegistry.SELF);
- }
-
- public boolean accept(ILicense license) {
- accepted.add(license.getUUID());
- updatePreferences();
- return true;
- }
-
- public boolean reject(ILicense license) {
- accepted.remove(license.getUUID());
- updatePreferences();
- return true;
- }
-
- public boolean isAccepted(ILicense license) {
- return accepted.contains(license.getUUID());
- }
-
- public boolean hasAcceptedLicenses() {
- return !accepted.isEmpty();
- }
-
- private Preferences getPreferences() {
- IAgentLocation location = (IAgentLocation) ProvSDKUIActivator.getDefault().getProvisioningAgent().getService(IAgentLocation.SERVICE_NAME);
- return new ProfileScope(location, profileId).getNode(ProvSDKUIActivator.PLUGIN_ID);
- }
-
- private void initializeFromPreferences() {
- Preferences pref = getPreferences();
- if (pref != null) {
- String digestList = pref.get(PreferenceConstants.PREF_LICENSE_DIGESTS, ""); //$NON-NLS-1$
- StringTokenizer tokenizer = new StringTokenizer(digestList, ","); //$NON-NLS-1$
- while (tokenizer.hasMoreTokens()) {
- accepted.add(tokenizer.nextToken().trim());
- }
- }
- }
-
- private void updatePreferences() {
- Preferences pref = getPreferences();
- StringBuffer result = new StringBuffer();
- Object[] indexedList = accepted.toArray();
- for (int i = 0; i < indexedList.length; i++) {
- if (i != 0)
- result.append(","); //$NON-NLS-1$
- result.append((String) indexedList[i]);
- }
- pref.put(PreferenceConstants.PREF_LICENSE_DIGESTS, result.toString());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java b/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java
deleted file mode 100644
index f2ce43ad5..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.jface.dialogs.MessageDialog;
-
-/**
- * UpdateHandler invokes the check for updates UI
- *
- * @since 3.4
- */
-public class UpdateHandler extends PreloadingRepositoryHandler {
-
- boolean hasNoRepos = false;
- UpdateOperation operation;
-
- protected void doExecute(LoadMetadataRepositoryJob job) {
- if (hasNoRepos) {
- if (getProvisioningUI().getPolicy().getRepositoriesVisible()) {
- boolean goToSites = MessageDialog.openQuestion(getShell(), ProvSDKMessages.UpdateHandler_NoSitesTitle, ProvSDKMessages.UpdateHandler_NoSitesMessage);
- if (goToSites) {
- getProvisioningUI().manipulateRepositories(getShell());
- }
- }
- return;
- }
- // Report any missing repositories.
- job.reportAccumulatedStatus();
- if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
- getProvisioningUI().openUpdateWizard(false, operation, job);
- }
- }
-
- protected void doPostLoadBackgroundWork(IProgressMonitor monitor) throws OperationCanceledException {
- operation = getProvisioningUI().getUpdateOperation(null, null);
- // check for updates
- IStatus resolveStatus = operation.resolveModal(monitor);
- if (resolveStatus.getSeverity() == IStatus.CANCEL)
- throw new OperationCanceledException();
- }
-
- protected boolean preloadRepositories() {
- hasNoRepos = false;
- RepositoryTracker repoMan = getProvisioningUI().getRepositoryTracker();
- if (repoMan.getKnownRepositories(getProvisioningUI().getSession()).length == 0) {
- hasNoRepos = true;
- return false;
- }
- return super.preloadRepositories();
- }
-
- @Override
- protected String getProgressTaskName() {
- return ProvSDKMessages.UpdateHandler_ProgressTaskName;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties b/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties
deleted file mode 100644
index 19395ce46..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2010 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-Handler_CannotLaunchUI=Cannot complete the request. This installation has not been configured properly for Software Updates. See the error log for details.
-Handler_SDKUpdateUIMessageTitle=Software Updates
-InstallNewSoftwareHandler_ProgressTaskName=Searching for available software...
-PreferenceInitializer_Error=Error accessing preferences.
-ProvSDKUIActivator_ErrorSavingPrefs=Error saving update preferences
-ProvSDKUIActivator_NoSelfProfile=Could not locate the running profile instance. The eclipse.p2.data.area and eclipse.p2.profile properties may not be set correctly in this application's config.ini file.
-ProvSDKUIActivator_OpenWizardAnyway=The software items you selected may not be valid with your current installation. Do you want to open the wizard anyway to review the selections?
-ProvSDKUIActivator_Question=Question
-ProvisioningPreferencePage_AlwaysOpenWizard=&Open the wizard anyway to review or change selections
-ProvisioningPreferencePage_BrowsingPrefsGroup=Browsing for updates
-ProvisioningPreferencePage_ShowLatestVersions=Show only the &latest versions of available software
-ProvisioningPreferencePage_ShowAllVersions=Show all &versions of available software
-ProvisioningPreferencePage_NeverOpenWizard=&Report the problems and do not open the wizard
-ProvisioningPreferencePage_OpenWizardIfInvalid=When software selected for an install wizard may not be compatible
-ProvisioningPreferencePage_PromptToOpenWizard=As&k me what to do when it happens
-ProvisioningPreferencePage_UninstallUpdateLink=<a>Uninstall or update</a> software that is already installed
-SDKPolicy_PrefPageName=Available Software Sites
-UpdateHandler_NoSitesMessage=There are no update sites to search. Do you wish to open the "Available Software Sites" preferences?
-UpdateHandler_NoSitesTitle=No Updates Found
-UpdateHandler_ProgressTaskName=Checking for updates...
diff --git a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java b/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java
deleted file mode 100644
index 144ac50eb..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.prefs;
-
-/**
- * @since 3.4
- */
-public class PreferenceConstants {
- public static final String PREF_PAGE_PROVISIONING = "org.eclipse.equinox.internal.p2.ui.sdk.ProvisioningPreferencePage"; //$NON-NLS-1$
- public static final String PREF_PAGE_SITES = "org.eclipse.equinox.internal.p2.ui.sdk.SitesPreferencePage"; //$NON-NLS-1$
- public static final String PREF_SHOW_LATEST_VERSION = "showLatestVersion"; //$NON-NLS-1$
- public static final String PREF_OPEN_WIZARD_ON_ERROR_PLAN = "allowNonOKPlan"; //$NON-NLS-1$
- public static final String PREF_LICENSE_DIGESTS = "licenseDigestList"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java b/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java
deleted file mode 100644
index d1bfc9b15..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.prefs;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.preferences.*;
-import org.eclipse.equinox.internal.p2.ui.sdk.ProvSDKMessages;
-import org.eclipse.equinox.internal.p2.ui.sdk.ProvSDKUIActivator;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.engine.ProfileScope;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.ui.statushandlers.StatusManager;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * @since 3.4
- */
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
-
- public static void migratePreferences() {
- Preferences pref = new ProfileScope(getDefaultAgentLocation(), IProfileRegistry.SELF).getNode(ProvSDKUIActivator.PLUGIN_ID);
- try {
- if (pref.keys().length == 0) {
- // migrate preferences from instance scope to profile scope
- Preferences oldPref = new InstanceScope().getNode(ProvSDKUIActivator.PLUGIN_ID);
- // don't migrate everything. Some of the preferences moved to
- // another bundle.
- pref.put(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, oldPref.get(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.PROMPT));
- pref.putBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, oldPref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, true));
- pref.flush();
- }
- } catch (BackingStoreException e) {
- StatusManager.getManager().handle(new Status(IStatus.ERROR, ProvSDKUIActivator.PLUGIN_ID, 0, ProvSDKMessages.PreferenceInitializer_Error, e), StatusManager.LOG);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void initializeDefaultPreferences() {
- Preferences node = new DefaultScope().getNode("org.eclipse.equinox.p2.ui.sdk"); //$NON-NLS-1$
- // default values
- node.putBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, true);
- node.put(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.PROMPT);
- }
-
- private static IAgentLocation getDefaultAgentLocation() {
- ServiceReference<?> reference = ProvSDKUIActivator.getContext().getServiceReference(IAgentLocation.SERVICE_NAME);
- if (reference == null)
- return null;
- IAgentLocation result = (IAgentLocation) ProvSDKUIActivator.getContext().getService(reference);
- ProvSDKUIActivator.getContext().ungetService(reference);
- return result;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java b/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java
deleted file mode 100644
index 7a49f117f..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.rcp/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.prefs;
-
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.sdk.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * Preference page for general provisioning preferences.
- *
- * @since 3.4
- */
-
-public class ProvisioningPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
- private Group browsingGroup, validateGroup;
- private Button showLatestRadio, showAllRadio;
- private Button alwaysShowFailedPlan, neverShowFailedPlan, promptOnFailedPlan;
-
- protected Control createContents(Composite parent) {
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IProvSDKHelpContextIds.PROVISIONING_PREFERENCE_PAGE);
-
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginWidth = layout.marginHeight = 0;
- container.setLayout(layout);
-
- // Group for show all versions vs. show latest
- browsingGroup = new Group(container, SWT.NONE);
- browsingGroup.setText(ProvSDKMessages.ProvisioningPreferencePage_BrowsingPrefsGroup);
- layout = new GridLayout();
- layout.numColumns = 3;
- browsingGroup.setLayout(layout);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- browsingGroup.setLayoutData(gd);
-
- showLatestRadio = new Button(browsingGroup, SWT.RADIO);
- showLatestRadio.setText(ProvSDKMessages.ProvisioningPreferencePage_ShowLatestVersions);
- gd = new GridData();
- gd.horizontalSpan = 3;
- showLatestRadio.setLayoutData(gd);
-
- showAllRadio = new Button(browsingGroup, SWT.RADIO);
- showAllRadio.setText(ProvSDKMessages.ProvisioningPreferencePage_ShowAllVersions);
- gd = new GridData();
- gd.horizontalSpan = 3;
- showAllRadio.setLayoutData(gd);
-
- //Group for validating a failed plan
- validateGroup = new Group(container, SWT.NONE);
- validateGroup.setText(ProvSDKMessages.ProvisioningPreferencePage_OpenWizardIfInvalid);
- layout = new GridLayout();
- layout.numColumns = 3;
- validateGroup.setLayout(layout);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- validateGroup.setLayoutData(gd);
-
- alwaysShowFailedPlan = new Button(validateGroup, SWT.RADIO);
- alwaysShowFailedPlan.setText(ProvSDKMessages.ProvisioningPreferencePage_AlwaysOpenWizard);
- gd = new GridData();
- gd.horizontalSpan = 3;
- alwaysShowFailedPlan.setLayoutData(gd);
-
- neverShowFailedPlan = new Button(validateGroup, SWT.RADIO);
- neverShowFailedPlan.setText(ProvSDKMessages.ProvisioningPreferencePage_NeverOpenWizard);
- gd = new GridData();
- gd.horizontalSpan = 3;
- neverShowFailedPlan.setLayoutData(gd);
-
- promptOnFailedPlan = new Button(validateGroup, SWT.RADIO);
- promptOnFailedPlan.setText(ProvSDKMessages.ProvisioningPreferencePage_PromptToOpenWizard);
- gd = new GridData();
- gd.horizontalSpan = 3;
- promptOnFailedPlan.setLayoutData(gd);
-
- //Link to installed software page
- //See https://bugs.eclipse.org/bugs/show_bug.cgi?id=313242
- Link link = new Link(container, SWT.PUSH);
- link.setText(ProvSDKMessages.ProvisioningPreferencePage_UninstallUpdateLink);
- link.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- ProvUI.openInstallationDialog(event);
- }
- });
-
- initialize();
-
- Dialog.applyDialogFont(container);
- return container;
-
- }
-
- private void initialize() {
- IPreferenceStore pref = ProvSDKUIActivator.getDefault().getPreferenceStore();
- showLatestRadio.setSelection(pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
- showAllRadio.setSelection(!pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
- String openWizard = pref.getString(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN);
- alwaysShowFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.ALWAYS));
- neverShowFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.NEVER));
- promptOnFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.PROMPT));
- }
-
- protected void performDefaults() {
- super.performDefaults();
- Preferences pref = new DefaultScope().getNode(ProvSDKUIActivator.PLUGIN_ID);
- showLatestRadio.setSelection(pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, false));
- showAllRadio.setSelection(!pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, false));
- String openWizard = pref.get(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, ""); //$NON-NLS-1$
- alwaysShowFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.ALWAYS));
- neverShowFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.NEVER));
- promptOnFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.PROMPT));
- }
-
- public boolean performOk() {
- IPreferenceStore pref = ProvSDKUIActivator.getDefault().getPreferenceStore();
- pref.setValue(PreferenceConstants.PREF_SHOW_LATEST_VERSION, showLatestRadio.getSelection());
- if (alwaysShowFailedPlan.getSelection())
- pref.setValue(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.ALWAYS);
- else if (neverShowFailedPlan.getSelection())
- pref.setValue(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.NEVER);
- else
- pref.setValue(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.PROMPT);
-
- ProvSDKUIActivator.getDefault().savePreferences();
- return true;
- }
-
- public void init(IWorkbench workbench) {
- // Nothing to do
- }
-
-}

Back to the top