Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2011-02-04 15:32:26 -0500
committerDJ Houghton2011-02-04 15:32:26 -0500
commita42e7400572fbce148e9474109e0b8368e645556 (patch)
treeb90c478daa3f698941608f3e74a25cb76543d967 /bundles/org.eclipse.equinox.p2.repository
parent9220f1e487dc117a5bc4bebec0d689ee8b71e75d (diff)
downloadrt.equinox.p2-a42e7400572fbce148e9474109e0b8368e645556.tar.gz
rt.equinox.p2-a42e7400572fbce148e9474109e0b8368e645556.tar.xz
rt.equinox.p2-a42e7400572fbce148e9474109e0b8368e645556.zip
Bug 316916 - [repository] loading children of a composite repo is not covered by progress monitors
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository')
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java
index b8b17e076..2e1f20cb5 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -623,13 +623,12 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager
protected IRepository<T> loadRepository(URI location, IProgressMonitor monitor, String type, int flags) throws ProvisionException {
checkValidLocation(location);
- if (monitor == null)
- monitor = new NullProgressMonitor();
+ SubMonitor sub = SubMonitor.convert(monitor, 100);
boolean added = false;
IRepository<T> result = null;
try {
- enterLoad(location, monitor);
+ enterLoad(location, sub.newChild(5));
result = basicGetRepository(location);
if (result != null)
return result;
@@ -638,11 +637,11 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager
//add the repository first so that it will be enabled, but don't send add event until after the load
added = addRepository(location, true, false);
- LocationProperties indexFile = loadIndexFile(location, monitor);
+ LocationProperties indexFile = loadIndexFile(location, sub.newChild(15));
String[] preferredOrder = getPreferredRepositorySearchOrder(indexFile);
String[] suffixes = sortSuffixes(getAllSuffixes(), location, preferredOrder);
- SubMonitor sub = SubMonitor.convert(monitor, NLS.bind(Messages.repoMan_adding, location), suffixes.length * 100);
+ sub = SubMonitor.convert(sub, NLS.bind(Messages.repoMan_adding, location), suffixes.length * 100);
ProvisionException failure = null;
try {
for (int i = 0; i < suffixes.length; i++) {

Back to the top