Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonrad Kolosowski2005-04-24 22:10:16 +0000
committerKonrad Kolosowski2005-04-24 22:10:16 +0000
commit4de223c8ec6361f539730f70e6d5dc8396b605d9 (patch)
tree22ae5bc824b232ce509a6a008a991786cb1af842 /org.eclipse.help.base/src/org/eclipse/help/internal/search/ProgressDistributor.java
parentea3f37fc2771b8d54a62fa5829531632f128a4cb (diff)
downloadeclipse.platform.ua-4de223c8ec6361f539730f70e6d5dc8396b605d9.tar.gz
eclipse.platform.ua-4de223c8ec6361f539730f70e6d5dc8396b605d9.tar.xz
eclipse.platform.ua-4de223c8ec6361f539730f70e6d5dc8396b605d9.zip
57455 Aggregated plugin search indexes
Diffstat (limited to 'org.eclipse.help.base/src/org/eclipse/help/internal/search/ProgressDistributor.java')
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/ProgressDistributor.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/ProgressDistributor.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/ProgressDistributor.java
index 8e9853b08..f0ed4bce7 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/ProgressDistributor.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/ProgressDistributor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * Copyright (c) 2000, 2005 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
@@ -19,7 +19,7 @@ import org.eclipse.core.runtime.*;
*/
public class ProgressDistributor implements IProgressMonitor {
private int totalWork = -1;
- private int worked = 0;
+ private double worked = 0;
private boolean done = false;
String taskName;
String subTaskName;
@@ -56,6 +56,11 @@ public class ProgressDistributor implements IProgressMonitor {
* @see IProgressMonitor#internalWorked(double)
*/
public void internalWorked(double work) {
+ worked += work;
+ for (Iterator it = monitors.iterator(); it.hasNext();) {
+ IProgressMonitor m = (IProgressMonitor) it.next();
+ m.internalWorked(work);
+ }
}
/**
@@ -103,19 +108,16 @@ public class ProgressDistributor implements IProgressMonitor {
* @see IProgressMonitor#worked(int)
*/
public synchronized void worked(int work) {
- worked += work;
- for (Iterator it = monitors.iterator(); it.hasNext();) {
- IProgressMonitor m = (IProgressMonitor) it.next();
- m.worked(work);
- }
+ internalWorked(work);
}
+
public synchronized void addMonitor(IProgressMonitor m) {
if (totalWork > -1)
m.beginTask(taskName, totalWork);
if (subTaskName != null)
m.subTask(subTaskName);
if (worked > 0)
- m.worked(worked);
+ m.internalWorked(worked);
if (done)
m.done();
monitors.add(m);

Back to the top