Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2011-03-31 21:28:46 +0000
committerPascal Rapicault2011-03-31 21:28:46 +0000
commitc377674f48d8946bbd6b8229a523f738540fbfb4 (patch)
tree25084152526b5299f69bd96e09a480eae6eea20c /bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java
parentb3382f1399d1d434084b66cdb72e35b050bea8f7 (diff)
downloadrt.equinox.p2-c377674f48d8946bbd6b8229a523f738540fbfb4.tar.gz
rt.equinox.p2-c377674f48d8946bbd6b8229a523f738540fbfb4.tar.xz
rt.equinox.p2-c377674f48d8946bbd6b8229a523f738540fbfb4.zip
Merging changes from work done for https://bugs.eclipse.org/bugs/show_bug.cgi?id=331974
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java')
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java31
1 files changed, 4 insertions, 27 deletions
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java
index 907c1d791..67abd747f 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java
+++ b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
* IBM Corporation - initial API and implementation
* Genuitec, LLC - added license support
* Code 9 - Ongoing development
+# SAP AG - consolidation of publishers for PDE formats
*******************************************************************************/
package org.eclipse.equinox.spi.p2.publisher;
@@ -16,18 +17,15 @@ import java.io.*;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.equinox.internal.p2.metadata.*;
+import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
+import org.eclipse.equinox.internal.p2.metadata.BasicVersion;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
import org.eclipse.equinox.p2.publisher.IPublisherInfo;
-import org.eclipse.equinox.p2.publisher.PublisherInfo;
-import org.eclipse.equinox.p2.publisher.eclipse.*;
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.osgi.service.resolver.BundleDescription;
import org.osgi.framework.Constants;
/**
@@ -210,27 +208,6 @@ public class PublisherHelper {
return MetadataFactory.createInstallableUnit(cu);
}
- private static void addExtraProperties(IInstallableUnit iiu, Map<String, String> extraProperties) {
- if (iiu instanceof InstallableUnit) {
- InstallableUnit iu = (InstallableUnit) iiu;
-
- for (Entry<String, String> entry : extraProperties.entrySet()) {
- iu.setProperty(entry.getKey(), entry.getValue());
- }
- }
- }
-
- public static IInstallableUnit[] createEclipseIU(BundleDescription bd, boolean isFolderPlugin, IArtifactKey key, Map<String, String> extraProperties) {
- ArrayList<IInstallableUnit> iusCreated = new ArrayList<IInstallableUnit>(1);
- IPublisherInfo info = new PublisherInfo();
- String shape = isFolderPlugin ? IBundleShapeAdvice.DIR : IBundleShapeAdvice.JAR;
- info.addAdvice(new BundleShapeAdvice(bd.getSymbolicName(), fromOSGiVersion(bd.getVersion()), shape));
- IInstallableUnit iu = BundlesAction.createBundleIU(bd, key, info);
- addExtraProperties(iu, extraProperties);
- iusCreated.add(iu);
- return (iusCreated.toArray(new IInstallableUnit[iusCreated.size()]));
- }
-
public static ArtifactKey createBinaryArtifactKey(String id, Version version) {
return new ArtifactKey(BINARY_ARTIFACT_CLASSIFIER, id, version);
}

Back to the top