Don't use SubMonitor when saving project in SaveManager#1759
Don't use SubMonitor when saving project in SaveManager#1759ptziegler merged 2 commits intoeclipse-platform:masterfrom
Conversation
|
The other usages of the SubMonitor look fine, so that seems to be the only place that needs to be adapted. |
|
|
||
| public InternalMonitorWrapper(IProgressMonitor monitor) { | ||
| super(SubMonitor.convert(monitor)); | ||
| super(Policy.monitorFor(monitor)); |
There was a problem hiding this comment.
I noticed that Policy.monitorFor
and IProgressMonitor.nullSafe(...)
static IProgressMonitor nullSafe(IProgressMonitor monitor) {
if (monitor == null) {
return new NullProgressMonitor();
}
return monitor;
}are functionally identical. It probably makes sense to get rid of the former altogether...
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
The migration from the IProgressMonitor to the SubMonitor done as part of 40114d2 also converts the progress monitor used within the InternalMonitorWrapper. If the parent monitor is a SubMonitor, this calls beginTask() both when the InternalMonitorWrapper is created, as well as explicitly later on. To avoid this, switch back to create a null-safe progress monitor via Policy.monitorFor(...). Closes eclipse-platform#1758
|
The failure on the Windows node also happens on the master, so it's likely unrelated. |
The migration from the IProgressMonitor to the SubMonitor done as part of 40114d2 also converts the progress monitor used within the InternalMonitorWrapper.
If the parent monitor is a SubMonitor, this calls beginTask() both when the InternalMonitorWrapper is created, as well as explicitly later on. To avoid this, switch back to create a null-safe progress monitor via Policy.monitorFor(...).
Closes #1758