Cleanup progress monitor handling in resource plugin#1778
Merged
ptziegler merged 1 commit intoeclipse-platform:masterfrom Mar 21, 2025
Merged
Cleanup progress monitor handling in resource plugin#1778ptziegler merged 1 commit intoeclipse-platform:masterfrom
ptziegler merged 1 commit intoeclipse-platform:masterfrom
Conversation
Contributor
Author
ptziegler
commented
Mar 18, 2025
...bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/CopyVisitor.java
Outdated
Show resolved
Hide resolved
ptziegler
commented
Mar 18, 2025
...bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/CopyVisitor.java
Show resolved
Hide resolved
Contributor
This resolves several trace errors thrown by an improper use of the progress monitor while moving, deleting or copying files or folders. - ResourceTree The deprecated SubProgressMonitor has been replaced by a SubMonitor, due to an improved handling of rounding errors when reporting fractional work back to its parent. In addition, the standardMoveFile() method now explicitly calls beginTask() on its given progress monitor, to remain consistent with the standardMoveFolder() and standardMoveProject() methods and to avoid an error being reported when moving files. - DeleteVisitor beginTask() is called on the given progress monitor by converting it to a SubMonitor with the given number of ticks. This number is based on the number of to-be-deleted files. When deleting a file, a SubMonitor is used instead of the deprecated SubProgressMonitor, consuming a number of ticks based on the total number of ticks. - CopyVisitor This method has been adapted similarly to the DeleteVisitor as beginTask() also needs to be called on the given progress monitor here. Additionally, the progress handling has been adapted to avoid creating "zero ticks" SubMonitors, as this also causes an error.
Contributor
Author
|
The OOM error on Windows seems sadly unrelated. Unless there are any objections, I'd like to merge this at the end of the week. |
Contributor
Author
|
The other builds are looking fine. Merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This resolves several trace errors thrown by an improper use of the
progress monitor while moving, deleting or copying files or folders.
The deprecated SubProgressMonitor has been replaced by a SubMonitor, due
to an improved handling of rounding errors when reporting fractional
work back to its parent. In addition, the standardMoveFile() method now
explicitly calls beginTask() on its given progress monitor, to remain
consistent with the standardMoveFolder() and standardMoveProject()
methods and to avoid an error being reported when moving files.
beginTask() is called on the given progress monitor by converting it to
a SubMonitor with the given number of ticks. This number is based on the
number of to-be-deleted files. When deleting a file, a SubMonitor is
used instead of the deprecated SubProgressMonitor, consuming a number of
ticks based on the total number of ticks.
This method has been adapted similarly to the DeleteVisitor as
beginTask() also needs to be called on the given progress monitor here.
Additionally, the progress handling has been adapted to avoid creating
"zero ticks" SubMonitors, as this also causes an error.
Closes #1776