-
Notifications
You must be signed in to change notification settings - Fork 147
Don't use SubMonitor when saving project in SaveManager #1759
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that Policy.monitorFor
Lines 177 to 179 in 8186345
| public static IProgressMonitor monitorFor(IProgressMonitor monitor) { | |
| return monitor == null ? new NullProgressMonitor() : monitor; | |
| } |
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