Author: hibou
Date: Tue Nov 16 12:53:14 2010
New Revision: 1035617
URL: http://svn.apache.org/viewvc?rev=1035617&view=rev
Log:
Improve the download progress bar
Modified:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJobListener.java
Modified:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJobListener.java
URL:
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJobListener.java?rev=1035617&r1=1035616&r2=1035617&view=diff
==============================================================================
---
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJobListener.java
(original)
+++
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/resolve/IvyResolveJobListener.java
Tue Nov 16 12:53:14 2010
@@ -54,7 +54,7 @@ public class IvyResolveJobListener imple
public IvyResolveJobListener(final IProgressMonitor monitor, int step) {
this.monitor = monitor;
this.resolveStep = step / RESOLVE_PERCENT;
- this.downloadStep = step;
+ this.downloadStep = step - resolveStep;
}
public void transferProgress(TransferEvent evt) {
@@ -98,6 +98,8 @@ public class IvyResolveJobListener imple
Artifact[] artifacts = pde.getArtifacts();
if (artifacts.length > 0) {
workPerArtifact = downloadStep / artifacts.length;
+ } else {
+ monitor.worked(downloadStep);
}
} else if (event instanceof StartArtifactDownloadEvent) {
StartArtifactDownloadEvent evt = (StartArtifactDownloadEvent)
event;