Skip to content

Commit 128a3f3

Browse files
committed
Don't use SubMonitor when saving project in SaveManager
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
1 parent 14db9ea commit 128a3f3

File tree

1 file changed

+2
-2
lines changed
  • resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources

1 file changed

+2
-2
lines changed

resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/SaveManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2023 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -1188,7 +1188,7 @@ class InternalMonitorWrapper extends ProgressMonitorWrapper {
11881188
private boolean ignoreCancel;
11891189

11901190
public InternalMonitorWrapper(IProgressMonitor monitor) {
1191-
super(SubMonitor.convert(monitor));
1191+
super(Policy.monitorFor(monitor));
11921192
}
11931193

11941194
public void ignoreCancelState(boolean ignore) {

0 commit comments

Comments
 (0)