Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2011-06-28 21:06:41 -0400
committerPascal Rapicault2011-06-28 21:06:41 -0400
commita8d6e37f63cc02019f45617749e042019abf2626 (patch)
treefdfb3c424c6ca4739f5906e2bb6028ce30c74522 /bundles/org.eclipse.equinox.p2.engine/src
parentefe861669515b887e58660a129680c4feb4f2998 (diff)
downloadrt.equinox.p2-a8d6e37f63cc02019f45617749e042019abf2626.tar.gz
rt.equinox.p2-a8d6e37f63cc02019f45617749e042019abf2626.tar.xz
rt.equinox.p2-a8d6e37f63cc02019f45617749e042019abf2626.zip
Bug 350380 - Java package can't install because of dependency on m2e
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.engine/src')
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java
index 37ab89e44..bc83ea9a5 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java
@@ -24,6 +24,8 @@ import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
import org.eclipse.equinox.p2.query.*;
import org.eclipse.osgi.service.datalocation.Location;
import org.eclipse.osgi.util.NLS;
@@ -82,8 +84,8 @@ public class SurrogateProfileHandler implements ISurrogateProfileHandler {
IQueryResult<IInstallableUnit> allIUs = sharedProfile.query(QueryUtil.createIUAnyQuery(), null);
for (Iterator<IInstallableUnit> iterator = allIUs.iterator(); iterator.hasNext();) {
IInstallableUnit iu = iterator.next();
- IRequirement iuRequirement = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), new VersionRange(iu.getVersion(), true, iu.getVersion(), true), null, false, false, true);
- iuRequirements.add(iuRequirement);
+ IMatchExpression<IInstallableUnit> iuMatcher = ExpressionUtil.getFactory().<IInstallableUnit> matchExpression(ExpressionUtil.parse("id == $0 && version == $1"), iu.getId(), iu.getVersion()); //$NON-NLS-1$
+ iuRequirements.add(MetadataFactory.createRequirement(iuMatcher, null, 0, 1, true));
}
iuDescription.addRequirements(iuRequirements);
iuDescription.setProperty(IInstallableUnit.PROP_NAME, NLS.bind(Messages.Shared_Profile, null));

Back to the top