Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2011-12-08 16:02:27 -0500
committerDJ Houghton2011-12-08 16:02:27 -0500
commite7751bddbe2ec653d48da730f5411b839c4c0f5c (patch)
tree145be141c16b89cc11088bb6a3ce16914a2d28a0
parentdd61465eaa0d5f56fa01cacd1621c6daa830dd29 (diff)
downloadrt.equinox.p2-e7751bddbe2ec653d48da730f5411b839c4c0f5c.tar.gz
rt.equinox.p2-e7751bddbe2ec653d48da730f5411b839c4c0f5c.tar.xz
rt.equinox.p2-e7751bddbe2ec653d48da730f5411b839c4c0f5c.zip
Bug 364475 - allow customization of p2.inf requirement processingv20111208-2102
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AdviceFileParser.java10
2 files changed, 9 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java
index 2c88cb7a0..10790a05f 100644
--- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java
@@ -803,7 +803,7 @@ public class BundlesAction extends AbstractPublisherAction {
/**
* Adds advice for any p2.inf file found in this bundle.
*/
- private void createAdviceFileAdvice(BundleDescription bundleDescription, IPublisherInfo publisherInfo) {
+ protected void createAdviceFileAdvice(BundleDescription bundleDescription, IPublisherInfo publisherInfo) {
String location = bundleDescription.getLocation();
if (location == null)
return;
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AdviceFileParser.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AdviceFileParser.java
index 7453ee66a..2bf051ed8 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AdviceFileParser.java
+++ b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AdviceFileParser.java
@@ -259,8 +259,14 @@ public class AdviceFileParser {
}
next();
}
- IRequirement capability = MetadataFactory.createRequirement(namespace, name, range, filter, optional, multiple, greedy);
- requires.add(capability);
+ IRequirement capability = createRequirement(namespace, name, range, filter, optional, multiple, greedy);
+ if (capability != null) {
+ requires.add(capability);
+ }
+ }
+
+ protected IRequirement createRequirement(String namespace, String name, VersionRange range, String filter, boolean optional, boolean multiple, boolean greedy) {
+ return MetadataFactory.createRequirement(namespace, name, range, filter, optional, multiple, greedy);
}
private void parseInstructions(String prefix, Map<String, ITouchpointInstruction> instructions) {

Back to the top