Migrate from SubProgressMonitor to SubMonitor#2273
Draft
vogella wants to merge 2 commits intoeclipse-platform:masterfrom
Draft
Migrate from SubProgressMonitor to SubMonitor#2273vogella wants to merge 2 commits intoeclipse-platform:masterfrom
vogella wants to merge 2 commits intoeclipse-platform:masterfrom
Conversation
Migrated all usages of the deprecated SubProgressMonitor class to use SubMonitor following Eclipse 4.6+ best practices: - resources/Policy.java: Updated subMonitorFor() to use SubMonitor.convert() - team/InfiniteSubProgressMonitor: Refactored from inheritance to composition, now implements IProgressMonitor and delegates to SubMonitor - team/SubscriberSyncInfoEventHandler: Replaced anonymous SubProgressMonitor with IProgressMonitor wrapper that delegates to SubMonitor All changes follow the official Eclipse SubMonitor migration guide.
a69fe4f to
877f0f4
Compare
Contributor
Test Results 1 872 files - 81 1 872 suites - 81 1h 16m 28s ⏱️ - 7m 12s For more details on these failures and errors, see this check. Results for commit 50398d1. ± Comparison against base commit 3e8e40e. This pull request removes 153 tests.♻️ This comment has been updated with latest results. |
The previous implementation used SubMonitor.convert(monitor, ticks) which sets work remaining on the converted monitor. This causes an error when beginTask() is called again on the returned monitor, as SubMonitor only allows beginTask() to be called once. The correct approach is to use SubMonitor.convert(monitor).split(ticks), which creates a properly configured child monitor that can have beginTask() called on it. This fixes test failures in org.eclipse.core.tests.resources where tests were failing with: "beginTask may only be called once" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
Migrated all usages of the deprecated SubProgressMonitor class to use SubMonitor following Eclipse 4.6+ best practices:
All changes follow the official Eclipse SubMonitor migration guide.