|
Re: Stuck progress bar while installing p2 artifacts [message #1818823 is a reply to message #1818622] |
Mon, 30 December 2019 06:18 |
Ed Merks Messages: 33226 Registered: July 2009 |
Senior Member |
|
|
It looks to me like the SubMonitor API is not being used properly in these places (and not just these places). Also even your code doesn't look right to me though it's based on the wiki which also doesn't look quite right to me either. The Javadoc for SubMonitor says things like "It is not necessary to call beginTask() or done() on an instance of SubMonitor", "Use SubMonitor.split(...) whenever you need to call another method that accepts an IProgressMonitor.", and even "It is never necessary to call done() on a monitor obtained from convert or progress.split(). The JavaDoc contract makes this the responsibility of the caller." But in these places we see it uses newChild, not split, and there are calls to done; calls to done should be done by the thing that created the progress monitor, so not in a method that is passed a progress monitor argument. It all just looks very wrong to me. :-(
So one needs to question, where in the overall call stack is this all going horribly wrong and when will a change/fix in a method that looks wrong break some bad assumption in a caller that itself is also wrong? This will not be easy to fix and it will not be easy to test whether any changes fix one use case without breaking another. ..
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.04057 seconds