Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoribull2010-03-09 04:22:05 +0000
committeribull2010-03-09 04:22:05 +0000
commit6811abcca7f2fd085936197acaa74b64c4132956 (patch)
treea6ed4c03a5bed3ecec1d8bd1dcf79ca15e99740d /bundles/org.eclipse.equinox.p2.artifact.repository
parent90215b3eeef942560b1ca950c70aceee175d3da6 (diff)
downloadrt.equinox.p2-6811abcca7f2fd085936197acaa74b64c4132956.tar.gz
rt.equinox.p2-6811abcca7f2fd085936197acaa74b64c4132956.tar.xz
rt.equinox.p2-6811abcca7f2fd085936197acaa74b64c4132956.zip
bug 305064: [api] Add a progress monitor to the execute batch method
https://bugs.eclipse.org/bugs/show_bug.cgi?id=305064
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.artifact.repository')
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java5
2 files changed, 6 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
index a1de069d8..e0e4b0d5d 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
@@ -24,8 +24,7 @@ import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.ICompositeRepository;
-import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.*;
import org.eclipse.equinox.p2.repository.artifact.*;
import org.eclipse.equinox.p2.repository.artifact.spi.AbstractArtifactRepository;
import org.eclipse.osgi.util.NLS;
@@ -563,12 +562,12 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
return QueryUtil.compoundQueryable(repos);
}
- public IStatus executeBatch(Runnable runnable) {
+ public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
IStatus result = null;
synchronized (this) {
try {
disableSave = true;
- runnable.run();
+ runnable.run(monitor);
} catch (Throwable e) {
result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
} finally {
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
index 929c9c4b1..90ce128d6 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
@@ -38,6 +38,7 @@ import org.eclipse.equinox.p2.metadata.index.IIndex;
import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
import org.eclipse.equinox.p2.query.*;
import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
import org.eclipse.equinox.p2.repository.artifact.*;
import org.eclipse.equinox.p2.repository.artifact.spi.AbstractArtifactRepository;
import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
@@ -1010,12 +1011,12 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
return artifactMap.keySet().iterator();
}
- public IStatus executeBatch(Runnable runnable) {
+ public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
IStatus result = null;
synchronized (this) {
try {
disableSave = true;
- runnable.run();
+ runnable.run(monitor);
} catch (Throwable e) {
result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
} finally {

Back to the top