Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2008-02-28 02:46:03 +0000
committerPascal Rapicault2008-02-28 02:46:03 +0000
commit22711f7db1bbd4ad3cf3da9875232df3ab1d6cda (patch)
tree5ce6bd9ac45bdaad70285feb9026c7271aad5c15
parent972df3cb69cadf8f47ab273eb3fcb6eee4bcd1e6 (diff)
downloadrt.equinox.p2-22711f7db1bbd4ad3cf3da9875232df3ab1d6cda.tar.gz
rt.equinox.p2-22711f7db1bbd4ad3cf3da9875232df3ab1d6cda.tar.xz
rt.equinox.p2-22711f7db1bbd4ad3cf3da9875232df3ab1d6cda.zip
Bug 220675 - Renamed default configuration IUs
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/ProductQuery.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java8
3 files changed, 9 insertions, 8 deletions
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/ProductQuery.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/ProductQuery.java
index 90c6be3d9..049a097de 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/ProductQuery.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/ProductQuery.java
@@ -13,6 +13,7 @@ package org.eclipse.equinox.internal.p2.metadata.generator;
import java.util.*;
import org.eclipse.equinox.internal.p2.metadata.generator.features.ProductFile;
import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.internal.provisional.p2.metadata.generator.MetadataGeneratorHelper;
import org.eclipse.equinox.internal.provisional.p2.metadata.generator.Generator.GeneratorResult;
import org.eclipse.equinox.internal.provisional.p2.query.Query;
import org.eclipse.osgi.service.resolver.VersionRange;
@@ -36,7 +37,7 @@ public class ProductQuery extends Query {
for (Iterator iterator = contents.iterator(); iterator.hasNext();) {
String item = (String) iterator.next();
if (features) // for features we want the group
- item += ".featureGroup"; //$NON-NLS-1$
+ item = MetadataGeneratorHelper.getTransformedId(item, false, true);
children.put(item, VersionRange.emptyRange);
if (configIUs.containsKey(item)) {
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java
index fb1a7c3ab..a8587e55f 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java
@@ -164,10 +164,10 @@ public class Generator {
requires.add(MetadataFactory.createRequiredCapability(info.getFlavor() + productFile.getId(), productFile.getId() + ".config", VersionRange.emptyRange, null, false, false)); //$NON-NLS-1$
//default CUs
- requires.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, info.getFlavor() + ".plugin.default", VersionRange.emptyRange, null, false, false)); //$NON-NLS-1$
- requires.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, info.getFlavor() + ".source.default", VersionRange.emptyRange, null, true, false)); //$NON-NLS-1$
+ requires.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, MetadataGeneratorHelper.createDefaultConfigUnitId(MetadataGeneratorHelper.OSGI_BUNDLE_CLASSIFIER, info.getFlavor()), VersionRange.emptyRange, null, false, false));
+ requires.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, MetadataGeneratorHelper.createDefaultConfigUnitId("source", info.getFlavor()), VersionRange.emptyRange, null, true, false)); //$NON-NLS-1$
if (productFile.useFeatures())
- requires.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, info.getFlavor() + ".feature.default", VersionRange.emptyRange, null, true, false)); //$NON-NLS-1$
+ requires.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, MetadataGeneratorHelper.createDefaultConfigUnitId(MetadataGeneratorHelper.ECLIPSE_FEATURE_CLASSIFIER, info.getFlavor()), VersionRange.emptyRange, null, true, false));
InstallableUnitDescription root = createTopLevelIUDescription(productContents, productFile.getId(), version, productFile.getProductName(), requires, false);
return MetadataFactory.createInstallableUnit(root);
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java
index b9ad7965e..057450cb5 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java
@@ -67,8 +67,8 @@ public class MetadataGeneratorHelper {
private static final Version DEFAULT_JRE_VERSION = new Version("1.6"); //$NON-NLS-1$
- private static final String ECLIPSE_FEATURE_CLASSIFIER = "org.eclipse.update.feature"; //$NON-NLS-1$
- private static final String OSGI_BUNDLE_CLASSIFIER = "osgi.bundle"; //$NON-NLS-1$
+ public static final String ECLIPSE_FEATURE_CLASSIFIER = "org.eclipse.update.feature"; //$NON-NLS-1$
+ public static final String OSGI_BUNDLE_CLASSIFIER = "osgi.bundle"; //$NON-NLS-1$
public static final String BINARY_ARTIFACT_CLASSIFIER = "binary"; //$NON-NLS-1$
private static final String INSTALL_FEATURES_FILTER = "(org.eclipse.update.install.features=true)"; //$NON-NLS-1$
@@ -327,7 +327,7 @@ public class MetadataGeneratorHelper {
return createUnconfigScript(unconfigInfo, false);
}
- private static String createDefaultConfigUnitId(String classifier, String configurationFlavor) {
+ public static String createDefaultConfigUnitId(String classifier, String configurationFlavor) {
return configurationFlavor + "." + classifier + ".default"; //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -701,7 +701,7 @@ public class MetadataGeneratorHelper {
return result.toString();
}
- private static String getTransformedId(String original, boolean isPlugin, boolean isGroup) {
+ public static String getTransformedId(String original, boolean isPlugin, boolean isGroup) {
return (isPlugin ? original : original + (isGroup ? ".feature.group" : ".feature.jar")); //$NON-NLS-1$//$NON-NLS-2$
}

Back to the top