From a8d6e37f63cc02019f45617749e042019abf2626 Mon Sep 17 00:00:00 2001 From: Pascal Rapicault Date: Wed, 29 Jun 2011 01:06:41 +0000 Subject: Bug 350380 - Java package can't install because of dependency on m2e --- .../org/eclipse/equinox/internal/p2/director/QueryableArray.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'bundles/org.eclipse.equinox.p2.director/src') diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/QueryableArray.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/QueryableArray.java index 2c8ba97d5..575496d5f 100644 --- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/QueryableArray.java +++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/QueryableArray.java @@ -16,8 +16,7 @@ import java.util.List; import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils; import org.eclipse.equinox.internal.p2.metadata.InstallableUnit; import org.eclipse.equinox.internal.p2.metadata.TranslationSupport; -import org.eclipse.equinox.internal.p2.metadata.index.CapabilityIndex; -import org.eclipse.equinox.internal.p2.metadata.index.IndexProvider; +import org.eclipse.equinox.internal.p2.metadata.index.*; import org.eclipse.equinox.p2.metadata.IInstallableUnit; import org.eclipse.equinox.p2.metadata.KeyWithLocale; import org.eclipse.equinox.p2.metadata.index.IIndex; @@ -25,6 +24,7 @@ import org.eclipse.equinox.p2.metadata.index.IIndex; public class QueryableArray extends IndexProvider { private final List dataSet; private IIndex capabilityIndex; + private IIndex idIndex; private TranslationSupport translationSupport; public QueryableArray(IInstallableUnit[] ius) { @@ -41,6 +41,11 @@ public class QueryableArray extends IndexProvider { capabilityIndex = new CapabilityIndex(dataSet.iterator()); return capabilityIndex; } + if (InstallableUnit.MEMBER_ID.equals(memberName)) { + if (idIndex == null) + idIndex = new IdIndex(dataSet.iterator()); + return idIndex; + } return null; } -- cgit v1.2.3