diff options
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/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java')
-rw-r--r-- | bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java | 5 |
1 files changed, 3 insertions, 2 deletions
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 { |