Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hallgren2010-02-24 15:49:46 -0500
committerThomas Hallgren2010-02-24 15:49:46 -0500
commit8bac67a557cac9a676f1116dd5412048a7ba2241 (patch)
treef360f4d8f1f7b72e0cc97e6ddfa0f20d71291186 /bundles/org.eclipse.equinox.p2.directorywatcher
parente659d374347a03d5662203090fa7e38a53bc2ff6 (diff)
downloadrt.equinox.p2-8bac67a557cac9a676f1116dd5412048a7ba2241.tar.gz
rt.equinox.p2-8bac67a557cac9a676f1116dd5412048a7ba2241.tar.xz
rt.equinox.p2-8bac67a557cac9a676f1116dd5412048a7ba2241.zip
302201 : Unify the two query approaches used in p2, step 6.
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.directorywatcher')
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/META-INF/MANIFEST.MF1
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java4
2 files changed, 3 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.directorywatcher/META-INF/MANIFEST.MF
index 920bf7474..352d69551 100644
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.directorywatcher/META-INF/MANIFEST.MF
@@ -16,6 +16,7 @@ Import-Package: org.eclipse.equinox.internal.p2.artifact.repository,
org.eclipse.equinox.internal.p2.artifact.repository.simple,
org.eclipse.equinox.internal.p2.core.helpers,
org.eclipse.equinox.internal.p2.metadata.expression,
+ org.eclipse.equinox.internal.p2.metadata.index,
org.eclipse.equinox.internal.p2.update,
org.eclipse.equinox.internal.provisional.p2.core,
org.eclipse.equinox.internal.provisional.p2.metadata,
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java
index 035b59409..7abea5696 100644
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java
+++ b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java
@@ -25,7 +25,7 @@ import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.publisher.*;
import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
import org.eclipse.equinox.p2.publisher.eclipse.FeaturesAction;
-import org.eclipse.equinox.p2.query.IMatchQuery;
+import org.eclipse.equinox.p2.query.IQuery;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.repository.IRepository;
import org.eclipse.equinox.p2.repository.artifact.*;
@@ -217,7 +217,7 @@ public class RepositoryListener extends DirectoryChangeListener {
// create a query that will identify all ius related to removed files.
// It's safe to compare a String with a File since the auto coercion will
// first convert the String into a File.
- IMatchQuery<IInstallableUnit> removeQuery = new ExpressionQuery<IInstallableUnit>(IInstallableUnit.class, //
+ IQuery<IInstallableUnit> removeQuery = ExpressionQuery.create( //
"$1.exists(x | properties[$0] == x)", FILE_NAME, removedFiles); //$NON-NLS-1$
IQueryResult<IInstallableUnit> toRemove = metadataRepository.query(removeQuery, null);
metadataRepository.removeInstallableUnits(toRemove.toSet());

Back to the top