Skip to content

I20250323-1800

@ptziegler ptziegler tagged this 21 Mar 11:36
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.
Assets 2
Loading