Skip to main content
summaryrefslogtreecommitdiffstats
path: root/p2
diff options
context:
space:
mode:
authorDoug Schaefer2010-01-31 15:02:12 -0500
committerDoug Schaefer2010-01-31 15:02:12 -0500
commitb0fca42beb50451b7d1d8e74dfc675b3880557fe (patch)
treeeaec5d482a529b4af346e733bbc87ca82bae0907 /p2
parent0315c2f844041b68ade5d34ee5d940065a50738a (diff)
downloadorg.eclipse.cdt-b0fca42beb50451b7d1d8e74dfc675b3880557fe.tar.gz
org.eclipse.cdt-b0fca42beb50451b7d1d8e74dfc675b3880557fe.tar.xz
org.eclipse.cdt-b0fca42beb50451b7d1d8e74dfc675b3880557fe.zip
Updates to adjust to p2 API changes.
Diffstat (limited to 'p2')
-rw-r--r--p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/WascanaGenerator.java38
-rw-r--r--p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/CleanupUntarAction.java4
-rw-r--r--p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/UntarAction.java18
3 files changed, 31 insertions, 29 deletions
diff --git a/p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/WascanaGenerator.java b/p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/WascanaGenerator.java
index 1222fad5b6..aa275c4167 100644
--- a/p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/WascanaGenerator.java
+++ b/p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/WascanaGenerator.java
@@ -25,24 +25,24 @@ import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository;
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.ArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.ILicense;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IProvidedCapability;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.metadata.ITouchpointType;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IUpdateDescriptor;
+import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
-import org.eclipse.equinox.internal.provisional.p2.metadata.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.VersionRange;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.ILicense;
+import org.eclipse.equinox.p2.metadata.IProvidedCapability;
+import org.eclipse.equinox.p2.metadata.ITouchpointType;
+import org.eclipse.equinox.p2.metadata.IUpdateDescriptor;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
/**
* @author DSchaefe
@@ -280,7 +280,7 @@ public class WascanaGenerator implements IApplication {
InstallableUnitDescription iuDesc = new MetadataFactory.InstallableUnitDescription();
iuDesc.setId(id);
iuDesc.setVersion(version);
- iuDesc.setLicense(license);
+ iuDesc.setLicenses(new ILicense[] { license });
iuDesc.setSingleton(true);
iuDesc.setProperty(IInstallableUnit.PROP_NAME, name);
iuDesc.setCapabilities(new IProvidedCapability[] {
@@ -296,7 +296,7 @@ public class WascanaGenerator implements IApplication {
if (reqs != null)
iuDesc.setRequiredCapabilities(reqs);
- iuDesc.setProperty(IInstallableUnit.PROP_TYPE_GROUP, String.valueOf(true));
+ iuDesc.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, String.valueOf(true));
iuDesc.setTouchpointType(NATIVE_TOUCHPOINT);
Map<String, String> tpdata = new HashMap<String, String>();
@@ -318,7 +318,7 @@ public class WascanaGenerator implements IApplication {
InstallableUnitDescription iuDesc = createIUDesc(id, name, version, null);
if (reqs != null)
iuDesc.setRequiredCapabilities(reqs);
- iuDesc.setProperty(IInstallableUnit.PROP_TYPE_CATEGORY, String.valueOf(true));
+ iuDesc.setProperty(InstallableUnitDescription.PROP_TYPE_CATEGORY, String.valueOf(true));
IInstallableUnit iu = MetadataFactory.createInstallableUnit(iuDesc);
iuList.add(iu);
return iu;
diff --git a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/CleanupUntarAction.java b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/CleanupUntarAction.java
index 0a0e975a99..f727bf6b15 100644
--- a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/CleanupUntarAction.java
+++ b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/CleanupUntarAction.java
@@ -21,8 +21,8 @@ import org.eclipse.equinox.internal.p2.engine.Profile;
import org.eclipse.equinox.internal.p2.touchpoint.natives.Messages;
import org.eclipse.equinox.internal.p2.touchpoint.natives.Util;
import org.eclipse.equinox.internal.p2.touchpoint.natives.actions.ActionConstants;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.osgi.util.NLS;
/**
diff --git a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/UntarAction.java b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/UntarAction.java
index 1478fbc252..d0d0587785 100644
--- a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/UntarAction.java
+++ b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/UntarAction.java
@@ -29,11 +29,12 @@ import org.eclipse.equinox.internal.p2.touchpoint.natives.Messages;
import org.eclipse.equinox.internal.p2.touchpoint.natives.Util;
import org.eclipse.equinox.internal.p2.touchpoint.natives.actions.ActionConstants;
import org.eclipse.equinox.internal.p2.touchpoint.natives.actions.UnzipAction;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IFileArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepository;
import org.eclipse.osgi.util.NLS;
/**
@@ -99,17 +100,18 @@ public class UntarAction extends ProvisioningAction {
IInstallableUnit iu = (IInstallableUnit) parameters.get(ActionConstants.PARM_IU);
Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
+ IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
if (source.equals(ActionConstants.PARM_AT_ARTIFACT)) {
//TODO: fix wherever this occurs -- investigate as this is probably not desired
- if (iu.getArtifacts() == null || iu.getArtifacts().length == 0)
+ if (iu.getArtifacts() == null || iu.getArtifacts().size() == 0)
return Status.OK_STATUS;
- IArtifactKey artifactKey = iu.getArtifacts()[0];
+ IArtifactKey artifactKey = iu.getArtifacts().iterator().next();
IFileArtifactRepository downloadCache;
try {
- downloadCache = Util.getDownloadCacheRepo();
+ downloadCache = Util.getDownloadCacheRepo(agent);
} catch (ProvisionException e) {
return e.getStatus();
}

Back to the top