-
Notifications
You must be signed in to change notification settings - Fork 449
Added a new DownloadProgress class to Get.java to display a progress bar. #224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Added a new DownloadProgress class to Get.java to display a progress bar. #224
Conversation
} | ||
|
||
public void printProgressBar(int downloadedBytesPercentage, double downloadSpeed) { | ||
int size = 50; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is dit ook mogelijk?
const int size = 50;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry. Should not have written that in Dutch! I asked here whether "const" could be added to the definition of variable size
.
private String userAgent = | ||
System.getProperty(MagicNames.HTTP_AGENT_PROPERTY, | ||
DEFAULT_AGENT_PREFIX + "/" | ||
+ Main.getShortAntVersion()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have a lot of changes that are only styling. Some developers do not like that because it makes reviewing harder. And maybe the styling that the developers of this project want is different from what you are doing here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, I see this is mentioned in the https://github.com/apache/ant/blob/master/CONTRIBUTING.md
private String userAgent = | ||
System.getProperty(MagicNames.HTTP_AGENT_PROPERTY, | ||
DEFAULT_AGENT_PREFIX + "/" | ||
+ Main.getShortAntVersion()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, I see this is mentioned in the https://github.com/apache/ant/blob/master/CONTRIBUTING.md
private final Resources sources = new Resources(); | ||
private File destination; // required | ||
private boolean verbose = false; | ||
private boolean progressbar = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not simply replace the dots with a progress bar? So when verbose="true" show a progress bar instead of dots. Or would some people prefer the dots? My feeling is that this is not the case but maybe it's good to discuss this on the dev list, see https://github.com/apache/ant/blob/master/CONTRIBUTING.md too
Added a new DownloadProgress class in Get.Java so when progressbar="on" is set in an get-task it shows a progress bar, remaining time and download speed for extra information besides the verbose option.
