summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault (JBoss)2013-04-27 22:32:19 (EDT)
committerPascal Rapicault2013-04-27 22:32:19 (EDT)
commit8851e2cc4b34e7324233c360650c802e90c8a747 (patch)
tree0605c2d58f133e75064adf4aff72b1077c35a8bf
parent835ef11107cc31e0a28dadc6ad5afbb43c655334 (diff)
downloadrt.equinox.p2-8851e2cc4b34e7324233c360650c802e90c8a747.zip
rt.equinox.p2-8851e2cc4b34e7324233c360650c802e90c8a747.tar.gz
rt.equinox.p2-8851e2cc4b34e7324233c360650c802e90c8a747.tar.bz2
Improve toString so for requirement not representing IRequiredCapability
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java
index 8fedfae..6408e7b 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java
@@ -180,6 +180,15 @@ public class RequiredCapability implements IRequiredCapability, IMemberProvider
StringBuffer result = new StringBuffer();
if (matchExpression.getParameters().length == 0)
return matchExpression.toString();
+
+ if (matchExpression.getParameters().length < 3 || matchExpression.getParameters().length > 3) {
+ result.append(matchExpression.toString()).append(' ');
+ for (int i = 0; i < matchExpression.getParameters().length; i++) {
+ result.append(matchExpression.getParameters()[i]).append(' ');
+ }
+ return result.toString();
+ }
+
if (IInstallableUnit.NAMESPACE_IU_ID.equals(getNamespace())) {
//print nothing for an IU id dependency because this is the default (most common) case
result.append(""); //$NON-NLS-1$